/* =====================================================================
   dashboard.css — design du tableau de bord (inspiré de Vaultly)
   Langage : jaune-citron « volt », cartes noires et blanches, pilules,
   grands rayons. Chargé après style.css et refine.css.
   Responsive : téléphone (< 760 px, barre du bas + tiroir), tablette
   (760–1100 px, rail d'icônes), ordinateur (> 1100 px, menu complet).
   Le préfixe html[lang] body sert à passer devant les règles historiques.
   ===================================================================== */

/* 1. Jetons ----------------------------------------------------------- */
html[lang] body .app-shell{
  --vl-volt:#dff51f; --vl-volt-2:#c9de0d; --vl-on-volt:#141414;
  --vl-ink:#111111; --vl-ink-2:#1c1c1c; --vl-ink-3:#2a2a2a;
  --vl-bg:#efefeb; --vl-surface:#ffffff; --vl-surface-2:#f6f6f3;
  --vl-text:#121212; --vl-muted:#5c5c57; --vl-line:rgba(17,17,17,.08);
  --vl-accent-text:#4f5c00;
  --vl-r-xl:30px; --vl-r-lg:24px; --vl-r-md:18px; --vl-r-sm:12px;
  --vl-shadow:0 1px 2px rgba(0,0,0,.04),0 18px 40px -28px rgba(0,0,0,.28);
  --vl-gap:16px;
  background:var(--vl-bg); color:var(--vl-text);
}
html[data-theme=dark][lang] body .app-shell{
  --vl-bg:#0b0b0b; --vl-surface:#161616; --vl-surface-2:#1d1d1d;
  --vl-text:#f2f2ee; --vl-muted:#a7a7a1; --vl-line:rgba(255,255,255,.08);
  --vl-accent-text:#dff51f;
  --vl-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 20px 40px -30px rgba(0,0,0,.9);
}
html[lang] body:has(.app-shell:not([hidden])){background:var(--vl-bg,#efefeb)}
html[data-theme=dark][lang] body:has(.app-shell:not([hidden])){background:#0b0b0b}

/* 2. Structure générale ---------------------------------------------- */
html[lang] body .main-area{background:transparent;padding-bottom:32px}
html[lang] body .app-shell .page-title-row h1,html[lang] body .app-shell .welcome-row h1{color:var(--vl-text);letter-spacing:-.035em}
html[lang] body .app-shell :is(h1,h2,h3) em{color:var(--vl-accent-text)!important}
html[lang] body .app-shell :is(.subtitle,.muted,.panel-head p,.section-head p){color:var(--vl-muted)}
html[lang] body .app-shell .eyebrow{color:var(--vl-muted);letter-spacing:.12em}

/* 3. Menu latéral : panneau noir flottant ------------------------------ */
html[lang] body .sidebar{
  background:var(--vl-ink); color:#f2f2ee; border:0;
  margin:12px; height:calc(100% - 24px); inset:0 auto 0 0;
  border-radius:var(--vl-r-xl); padding:22px 14px 14px;
  box-shadow:0 24px 60px -30px rgba(0,0,0,.6);
  -webkit-backdrop-filter:none; backdrop-filter:none;
  overflow-y:auto; scrollbar-width:thin;
}
html[lang] body .sidebar .brand,html[lang] body .sidebar .brand span{color:#fff}
html[lang] body .sidebar .brand-mark{background:var(--vl-volt);color:var(--vl-on-volt)}
html[lang] body .sidebar .brand-dot{color:var(--vl-volt)}
html[lang] body .sidebar .store-switch{background:var(--vl-ink-2);border:1px solid var(--vl-ink-3);border-radius:var(--vl-r-md);box-shadow:none}
html[lang] body .sidebar .store-switch b{color:#fff}
html[lang] body .sidebar .store-switch small,html[lang] body .sidebar .chevron{color:#a7a7a1!important}
html[lang] body .sidebar .store-avatar{background:var(--vl-volt);color:var(--vl-on-volt)}
html[lang] body .sidebar .nav-label{color:#8d8d87!important}
html[lang] body .sidebar .nav-item{color:#d6d6d0;border-radius:999px;height:44px;padding:0 10px;background:transparent;box-shadow:none}
html[lang] body .sidebar .nav-item:hover{background:var(--vl-ink-2);color:#fff}
html[lang] body .sidebar .nav-item .nav-icon{background:var(--vl-ink-2);color:#e8e8e2;box-shadow:none;border-radius:999px}
html[lang] body .sidebar .nav-item.active{background:var(--vl-volt);color:var(--vl-on-volt);font-weight:600;box-shadow:none}
html[lang] body .sidebar .nav-item.active .nav-icon{background:var(--vl-on-volt);color:var(--vl-volt)}
html[lang] body .sidebar .nav-count{background:var(--vl-volt);color:var(--vl-on-volt)}
html[lang] body .sidebar .nav-item.active .nav-count{background:var(--vl-on-volt);color:var(--vl-volt)}
html[lang] body .sidebar :is(.wa-connect,.profile){background:var(--vl-ink-2)!important;border:1px solid var(--vl-ink-3)!important;border-radius:var(--vl-r-md);box-shadow:none}
html[lang] body .sidebar :is(.wa-connect,.profile) :is(b,strong,span){color:#f2f2ee}
html[lang] body .sidebar :is(.wa-connect,.profile) small{color:#a7a7a1!important}
html[lang] body .sidebar .wa-icon{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important}
html[lang] body .sidebar :is(.wa-connect button,.profile .chevron,.dots){color:#d6d6d0!important}
html[lang] body .sidebar .tools-label{color:#8d8d87!important}
html[lang] body .sidebar .new-badge,html[lang] body .sidebar [class*=badge]{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important;border:0}

/* 4. Barre du haut ----------------------------------------------------- */
html[lang] body .topbar{background:color-mix(in srgb,var(--vl-bg) 82%,transparent);border-bottom:0;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
html[lang] body .topbar .crumb,html[lang] body .topbar .crumb span{color:var(--vl-muted)!important}
html[lang] body .topbar .crumb b{color:var(--vl-text)}
html[lang] body .app-shell :is(.icon-btn,.top-avatar,.account-btn,.mobile-menu){background:var(--vl-surface)!important;color:var(--vl-text)!important;border:1px solid var(--vl-line)!important;border-radius:999px!important;box-shadow:none!important}
html[lang] body .app-shell .account-btn{height:44px;padding:0 16px;font-size:13px;font-weight:600}
html[lang] body .app-shell .top-avatar{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important;border-color:transparent!important;font-weight:700}
html[lang] body .app-shell .saved-label{color:var(--vl-muted)!important}
html[lang] body .app-shell .live-dot{background:#3fbf5f}

/* 5. Boutons : pilules ------------------------------------------------- */
html[lang] body .app-shell .btn,html[lang] body dialog .btn{border-radius:999px!important;min-height:44px;padding:0 20px;font-weight:600}
html[lang] body .app-shell .btn-primary,html[lang] body dialog .btn-primary{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important;border:0!important;box-shadow:0 10px 24px -14px rgba(160,180,0,.9)!important}
html[lang] body .app-shell .btn-primary:hover,html[lang] body dialog .btn-primary:hover{background:var(--vl-volt-2)!important}
html[lang] body .app-shell .btn-secondary,html[lang] body dialog .btn-secondary{background:var(--vl-surface)!important;color:var(--vl-text)!important;border:1px solid var(--vl-line)!important;box-shadow:none!important}
html[data-theme=dark][lang] body dialog .btn-secondary{background:#1d1d1d!important;color:#f2f2ee!important}
html[lang] body .app-shell .text-button{color:var(--vl-text);font-weight:600}
html[lang] body .app-shell .back-btn{background:var(--vl-surface);border-color:var(--vl-line);color:var(--vl-text)}
html[lang] body .app-shell :focus-visible,html[lang] body dialog :focus-visible{outline:3px solid var(--vl-volt-2)!important;outline-offset:2px;box-shadow:0 0 0 5px var(--vl-ink)!important}

/* 6. Bannière : carte noire ------------------------------------------- */
html[lang] body .app-shell .promo-banner{background:var(--vl-ink)!important;border-radius:var(--vl-r-xl);box-shadow:var(--vl-shadow)!important;border:1px solid var(--vl-ink-3)}
html[lang] body .app-shell .promo-banner :is(h2,h3,strong,b){color:#fff!important}
html[lang] body .app-shell .promo-banner p{color:#c9c9c3!important}
html[lang] body .app-shell .promo-tag{color:var(--vl-volt)!important}
html[lang] body .app-shell .promo-spark{border-color:var(--vl-volt)!important;color:var(--vl-volt)!important}
html[lang] body .app-shell .promo-link{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important;border-radius:999px!important}
html[lang] body .app-shell .promo-link *{color:var(--vl-on-volt)!important}
html[lang] body .app-shell .banner-orb{border-color:rgba(223,245,31,.22)!important}

/* 7. Indicateurs : une carte volt, une noire, deux claires ------------- */
html[lang] body .app-shell .stats-grid{gap:var(--vl-gap)}
html[lang] body .app-shell .stat-card{background:var(--vl-surface);border:1px solid var(--vl-line);border-radius:var(--vl-r-lg);box-shadow:var(--vl-shadow);color:var(--vl-text)}
html[lang] body .app-shell .stat-card .stat-top span:first-child{color:var(--vl-muted)}
html[lang] body .app-shell .stat-card .stat-value{color:var(--vl-text);font-size:clamp(24px,2.4vw,32px)}
html[lang] body .app-shell .stat-card .stat-icon{background:var(--vl-surface-2)!important;color:var(--vl-text)!important;border-radius:999px}
html[lang] body .app-shell .stat-card .sparkline i{background:var(--vl-ink)!important;opacity:.14;border-radius:4px}
html[lang] body .app-shell .stat-card .sparkline i:last-child{opacity:1}
html[data-theme=dark][lang] body .app-shell .stat-card .sparkline i{background:#f2f2ee!important;opacity:.18}
html[data-theme=dark][lang] body .app-shell .stat-card .sparkline i:last-child{background:var(--vl-volt)!important;opacity:1}
/* carte 1 : volt */
html[lang] body .app-shell .stats-grid .stat-card:nth-child(1){background:var(--vl-volt);border-color:transparent;color:var(--vl-on-volt)}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(1) :is(.stat-value,.stat-top span,.stat-foot span,.positive){color:var(--vl-on-volt)!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(1) .stat-icon{background:var(--vl-on-volt)!important;color:var(--vl-volt)!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(1) .sparkline i{background:var(--vl-on-volt)!important;opacity:.22}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(1) .sparkline i:last-child{opacity:1}
/* carte 2 : noire */
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2){background:var(--vl-ink);border-color:var(--vl-ink-3);color:#f2f2ee}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) :is(.stat-value){color:#fff!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) :is(.stat-top span,.stat-foot span){color:#c9c9c3!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) .positive{color:var(--vl-volt)!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) .stat-icon{background:var(--vl-ink-3)!important;color:var(--vl-volt)!important}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) .sparkline i{background:var(--vl-volt)!important;opacity:.28}
html[lang] body .app-shell .stats-grid .stat-card:nth-child(2) .sparkline i:last-child{opacity:1}
html[lang] body .app-shell .stat-card .positive{color:#2f6a12}
html[data-theme=dark][lang] body .app-shell .stat-card .positive{color:var(--vl-volt)}
html[lang] body .app-shell .stat-card .neutral{color:#8a4b0b}
html[data-theme=dark][lang] body .app-shell .stat-card .neutral{color:#f0b574}
html[lang] body .app-shell .stat-card .margin-hint{color:var(--vl-muted)}

/* 8. Panneaux, listes, tableaux ---------------------------------------- */
html[lang] body .app-shell :is(.panel,.customer-panel,.store-preview,.payment-connect-panel,.delivery-panel,.wa-inbox,.price-card,.product-card,.customer-toolbar,.insight-panel,.archived-section){background:var(--vl-surface)!important;border:1px solid var(--vl-line)!important;border-radius:var(--vl-r-lg)!important;box-shadow:var(--vl-shadow)!important;color:var(--vl-text)}
html[lang] body .app-shell .content-grid{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:var(--vl-gap)}
html[lang] body .app-shell :is(.panel-head h2,.section-head h2,.archived-section h2){color:var(--vl-text)}
html[lang] body .app-shell .table-wrap{background:transparent!important;border:0!important;box-shadow:none!important;overflow-x:auto}
html[lang] body .app-shell th{color:var(--vl-muted)!important;border-bottom:1px solid var(--vl-line)!important;background:transparent!important}
html[lang] body .app-shell td{border-bottom:1px solid var(--vl-line)!important;color:var(--vl-text)}
html[lang] body .app-shell tbody tr:last-child td{border-bottom:0!important}
html[lang] body .app-shell tbody tr:hover{background:var(--vl-surface-2)!important}
html[lang] body .app-shell .status{border-radius:999px!important}
html[lang] body .app-shell :is(.invoice-action,.reminder-action,.payment-link-action){border:1px solid var(--vl-line);background:var(--vl-surface-2);color:var(--vl-text);border-radius:999px;min-height:32px;padding:0 12px;font:600 12px var(--sans);cursor:pointer;margin:2px}
html[lang] body .app-shell .reminder-action{background:var(--vl-ink);color:var(--vl-volt);border-color:transparent}
html[data-theme=dark][lang] body .app-shell .reminder-action{background:var(--vl-volt);color:var(--vl-on-volt)}
html[lang] body .app-shell .contact-btn{border-radius:999px}
html[lang] body .app-shell .filter-tab{border-radius:999px;padding:8px 14px}
html[lang] body .app-shell .filter-tab.active{background:var(--vl-ink)!important;color:var(--vl-volt)!important;border-color:transparent!important}
html[data-theme=dark][lang] body .app-shell .filter-tab.active{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important}
html[lang] body .app-shell .filter-tab.active span{color:inherit!important}
html[lang] body .app-shell .stock-alert-item{border-radius:999px}
html[lang] body .app-shell .top-product{border-bottom:1px solid var(--vl-line)}
html[lang] body .app-shell .product-card{overflow:hidden}
html[lang] body .app-shell .product-art{border-radius:calc(var(--vl-r-lg) - 6px);margin:6px}
html[lang] body .app-shell .price-card.featured{background:var(--vl-ink)!important;color:#f2f2ee;border-color:var(--vl-ink-3)!important}
html[lang] body .app-shell .price-card.featured :is(h2,h3,strong,b,.price-amount,li){color:#fff!important}
html[lang] body .app-shell .price-card.featured :is(p,.price-label,.price-amount span,small){color:#c9c9c3!important}
html[lang] body .app-shell .price-card.featured .btn-primary{background:var(--vl-volt)!important}
html[lang] body .app-shell .footer{color:var(--vl-muted)}

/* 9. WhatsApp, bot et rappels ----------------------------------------- */
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.automation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--vl-gap,16px);margin:0 0 var(--vl-gap,16px)}
.automation-grid .panel{padding:20px;display:flex;flex-direction:column;gap:10px}
.automation-grid .panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.automation-grid h2{margin:0;font-size:18px}
.automation-grid .panel-head p{margin:4px 0 0;font-size:13px}
.bot-card .bot-mode{margin:0;font-size:13px;color:var(--vl-muted)}
.bot-card .bot-mode b{color:var(--vl-text)}
.bot-card .bot-hint{margin:0;font-size:13px;line-height:1.55;color:var(--vl-muted)}
html[lang] body .app-shell .bot-card.is-on{background:var(--vl-ink)!important;border-color:var(--vl-ink-3)!important}
html[lang] body .app-shell .bot-card.is-on :is(h2,.bot-mode b){color:#fff}
html[lang] body .app-shell .bot-card.is-on :is(.panel-head p,.bot-mode,.bot-hint){color:#c9c9c3}
.bot-card .store-actions{margin-top:auto;display:flex;flex-wrap:wrap;gap:8px}
.switch{position:relative;display:inline-flex;align-items:center;width:56px;height:32px;flex:none;cursor:pointer}
.switch input{position:absolute;inset:0;opacity:0;cursor:pointer;margin:0}
.switch span{position:absolute;inset:0;border-radius:999px;background:#cfcfca;transition:background .25s}
.switch span:after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.25);transition:transform .25s var(--ease,ease)}
.switch input:checked+span{background:var(--vl-volt,#dff51f)}
.switch input:checked+span:after{transform:translateX(24px);background:#141414}
.switch input:focus-visible+span{outline:3px solid #c9de0d;outline-offset:3px}
html[data-theme=dark] .switch span{background:#3a3a3a}
.reminder-list{display:grid;gap:8px;max-height:340px;overflow:auto}
.reminder-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px 14px;border-radius:var(--vl-r-md,18px);background:var(--vl-surface-2,#f6f6f3);border:1px solid var(--vl-line,rgba(0,0,0,.08))}
.reminder-main{display:grid;gap:3px;min-width:0}
.reminder-main b{font-size:14px}
.reminder-main small{color:var(--vl-muted);font-size:12px}
.reminder-main p{margin:2px 0 0;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.reminder-row.manual .reminder-status,.reminder-row.failed .reminder-status{color:#8a4b0b;font-weight:600}
html[data-theme=dark] .reminder-row.manual .reminder-status,html[data-theme=dark] .reminder-row.failed .reminder-status{color:#f0b574}
.reminder-error{color:#8a4b0b!important}
.reminder-actions{display:flex;flex-direction:column;gap:6px;flex:none}
.reminder-actions button{min-height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--vl-line,rgba(0,0,0,.1));background:var(--vl-surface,#fff);color:var(--vl-text,#121212);font:600 12px var(--sans);cursor:pointer}
.reminder-actions button[data-reminder-send]{background:var(--vl-ink,#111);color:var(--vl-volt,#dff51f);border-color:transparent}
.reminder-history summary{cursor:pointer;font-size:13px;color:var(--vl-muted);padding:8px 2px;min-height:36px}
.handoff-badge{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:var(--vl-volt,#dff51f);color:#141414;font:700 10px var(--sans);letter-spacing:.02em}
html[lang] body .app-shell .wa-thread.active{background:var(--vl-ink)!important;color:#fff}
html[lang] body .app-shell .wa-thread.active :is(b,small,time){color:#fff!important}
html[lang] body .app-shell .wa-bubble.outgoing{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important}
html[lang] body .app-shell .wa-bubble.outgoing small{color:#3a3a00!important}
html[lang] body .app-shell .wa-quick-replies button{border-radius:999px}
.bot-test-dialog{width:min(520px,calc(100vw - 24px))}
.bot-test-messages{height:min(52vh,420px);overflow:auto;display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:18px;background:var(--vl-surface-2,#f6f6f3);margin:10px 0}
.bot-test-messages .wa-bubble{max-width:85%;padding:10px 12px;border-radius:16px;font-size:13px;line-height:1.45}
.bot-test-messages .wa-bubble.incoming{align-self:flex-end;background:#111;color:#fff;border-bottom-right-radius:4px}
.bot-test-messages .wa-bubble.outgoing{align-self:flex-start;background:#fff;color:#121212;border:1px solid rgba(0,0,0,.08);border-bottom-left-radius:4px}
.bot-test-messages .wa-bubble small{display:block;margin-top:6px;font-weight:700;color:#5c6b00}
html[data-theme=dark] .bot-test-messages{background:#111}
html[data-theme=dark] .bot-test-messages .wa-bubble.outgoing{background:#1d1d1d;color:#f2f2ee;border-color:rgba(255,255,255,.1)}
html[data-theme=dark] .bot-test-messages .wa-bubble.incoming{background:#dff51f;color:#141414}
html[data-theme=dark] .bot-test-messages .wa-bubble small{color:#dff51f}

/* 10. Fenêtres ----------------------------------------------------------- */
html[lang] body dialog{border-radius:var(--vl-r-xl,28px)!important;border:1px solid rgba(17,17,17,.08)}
html[lang] body dialog::backdrop{background:rgba(10,10,10,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
html[lang] body dialog :is(input,select,textarea){border-radius:14px!important;min-height:44px}
html[lang] body dialog textarea{min-height:72px}

/* 11. Barre de navigation du bas (téléphones) -------------------------- */
.bottom-nav{display:none}
@media (max-width:760px){
  .bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;z-index:40;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));padding:6px;border-radius:24px;background:#111;box-shadow:0 18px 40px -12px rgba(0,0,0,.55)}
  .app-shell[hidden] .bottom-nav{display:none}
  .bn-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border:0;border-radius:18px;background:transparent;color:#c9c9c3;font:600 10.5px var(--sans);cursor:pointer;padding:4px 2px}
  .bn-item svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .bn-item.active{background:#dff51f;color:#141414}
  .bn-item:focus-visible{outline:3px solid #dff51f;outline-offset:2px}
  html[lang] body .main-area{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
  html[lang] body .app-shell .footer{padding-bottom:8px}
}

/* 12. Responsive ---------------------------------------------------------- */
/* Grand écran */
@media (min-width:1101px){
  html[lang] body .main-area{margin-left:270px;width:calc(100% - 270px)}
  html[lang] body .sidebar{width:246px}
}
/* Tablette : rail d'icônes compact */
@media (min-width:761px) and (max-width:1100px){
  html[lang] body .sidebar{width:84px;padding:18px 12px;align-items:center}
  html[lang] body .main-area{margin-left:108px!important;width:calc(100% - 108px)!important;padding:0 24px 32px!important}
  html[lang] body .sidebar :is(.store-switch,.nav-label,.wa-connect,.tools-label){display:none!important}
  html[lang] body .sidebar .brand{justify-content:center;width:100%}
  html[lang] body .sidebar .brand>span:last-child{display:none}
  html[lang] body .sidebar .main-nav,html[lang] body .sidebar nav{width:100%}
  html[lang] body .sidebar .nav-item{font-size:0;width:56px;height:56px;justify-content:center;padding:0;margin:2px auto;position:relative;gap:0}
  html[lang] body .sidebar .nav-item .nav-icon{width:36px;height:36px}
  html[lang] body .sidebar .nav-count{position:absolute;top:4px;right:2px;font-size:10px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center}
  html[lang] body .sidebar [class*=badge]{display:none!important}
  html[lang] body .sidebar .profile{padding:8px!important;justify-content:center;width:100%}
  html[lang] body .sidebar .profile>:not(:first-child){display:none!important}
  html[lang] body .app-shell .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  html[lang] body .app-shell .content-grid{grid-template-columns:minmax(0,1fr)}
  html[lang] body .app-shell .product-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
  html[lang] body .app-shell .wa-inbox{grid-template-columns:minmax(0,1fr)!important}
}
/* Téléphone */
@media (max-width:760px){
  html[lang] body .sidebar{margin:0;height:100%;border-radius:0 28px 28px 0;width:min(300px,86vw)!important}
  html[lang] body .main-area{margin-left:0!important;width:100%!important;padding:0 14px!important}
  html[lang] body .topbar{height:60px;padding:0}
  html[lang] body .app-shell .saved-label,html[lang] body .app-shell .live-dot{display:none}
  html[lang] body .app-shell .account-btn{padding:0 12px}
  html[lang] body .app-shell .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  html[lang] body .app-shell .stat-card{min-height:0;padding:14px}
  html[lang] body .app-shell .stat-card .sparkline,html[lang] body .app-shell .stat-card .pending-avatars,html[lang] body .app-shell .stat-card .margin-hint{display:none}
  html[lang] body .app-shell .stat-card .stat-foot{flex-wrap:wrap;row-gap:2px}
  html[lang] body .app-shell .content-grid{grid-template-columns:minmax(0,1fr)}
  html[lang] body .app-shell :is(.panel,.orders-panel,.top-products){padding:14px!important;border-radius:var(--vl-r-md)!important}
  html[lang] body .app-shell .automation-grid{grid-template-columns:minmax(0,1fr)}
  html[lang] body .app-shell .welcome-row{flex-direction:column;align-items:stretch;gap:14px}
  html[lang] body .app-shell .welcome-row .btn,html[lang] body .app-shell .page-title-row>.btn{width:100%}
  html[lang] body .app-shell .page-title-row{flex-direction:column;align-items:stretch;gap:12px}
  html[lang] body .app-shell .store-actions{display:grid;grid-template-columns:1fr;gap:8px}
  html[lang] body .app-shell .store-actions .btn{width:100%}
  html[lang] body .app-shell .promo-banner{flex-direction:column;align-items:flex-start;height:auto!important;padding:20px!important;gap:14px}
  html[lang] body .app-shell .promo-banner .promo-link{width:100%;justify-content:center}
  html[lang] body .app-shell .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  html[lang] body .app-shell .pricing-grid{grid-template-columns:minmax(0,1fr)!important}
  html[lang] body .app-shell .tabs-filter{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html[lang] body .app-shell .filter-row{flex-direction:column;align-items:stretch;gap:10px}
  html[lang] body .app-shell .order-actions{display:grid;grid-template-columns:1fr auto;gap:8px}
  /* Tableaux de commandes → cartes */
  html[lang] body .app-shell table{min-width:0!important;width:100%}
  html[lang] body .app-shell table thead{display:none}
  html[lang] body .app-shell table tbody{display:grid;gap:10px}
  html[lang] body .app-shell table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"client total" "item status" "date date" "actions actions";gap:6px 10px;padding:12px;border:1px solid var(--vl-line);border-radius:var(--vl-r-md);background:var(--vl-surface)}
  html[lang] body .app-shell table td{display:block;padding:0!important;border:0!important;white-space:normal;min-width:0}
  html[lang] body .app-shell td.c-client{grid-area:client;font-weight:600}
  html[lang] body .app-shell td.c-total{grid-area:total;text-align:right}
  html[lang] body .app-shell td.c-item{grid-area:item;color:var(--vl-muted);font-size:13px;overflow-wrap:anywhere}
  html[lang] body .app-shell td.c-status{grid-area:status;justify-self:end}
  html[lang] body .app-shell td.c-date{grid-area:date;color:var(--vl-muted);font-size:12px}
  html[lang] body .app-shell td.c-date:empty{display:none}
  html[lang] body .app-shell td.c-actions{grid-area:actions;display:flex;flex-wrap:wrap;gap:6px;padding-top:6px!important;border-top:1px solid var(--vl-line)!important}
  html[lang] body .app-shell td.c-actions :is(button,a){min-height:40px}
  html[lang] body .app-shell .table-wrap{overflow:visible}
  /* WhatsApp empilé */
  html[lang] body .app-shell .wa-inbox{grid-template-columns:minmax(0,1fr)!important;min-height:0}
  html[lang] body .app-shell .wa-threads #waThreads{display:flex;overflow-x:auto;gap:8px;padding-bottom:6px;scrollbar-width:none}
  html[lang] body .app-shell .wa-threads .wa-thread{flex:0 0 220px}
  html[lang] body .app-shell .wa-chat-head{flex-wrap:wrap;gap:6px}
  html[lang] body .app-shell .wa-compose{gap:8px}
  html[lang] body .app-shell .wa-compose input{min-width:0}
  html[lang] body .app-shell .reminder-row{flex-direction:column}
  html[lang] body .app-shell .reminder-actions{flex-direction:row;flex-wrap:wrap}
  /* Fenêtres en feuille du bas */
  html[lang] body dialog[open]{width:100%!important;max-width:100%!important;margin:auto 0 0!important;border-radius:26px 26px 0 0!important;max-height:92dvh;overflow:auto}
}
@media (max-width:360px){
  html[lang] body .app-shell .stats-grid,html[lang] body .app-shell .product-grid{grid-template-columns:minmax(0,1fr)}
  .bn-item span{font-size:9.5px}
}
@media (prefers-reduced-motion:reduce){
  .switch span,.switch span:after{transition:none}
}

/* 13. Ajustements ------------------------------------------------------ */
/* le « + » et les icônes des boutons volt prennent la couleur du texte */
html[lang] body .app-shell .btn-primary :is(span,svg){color:inherit!important;stroke:currentColor}
/* accueil : la date est masquée dans le tableau compact, les actions passent à la ligne */
@media (min-width:761px){
  html[lang] body .app-shell .orders-panel :is(th,td).c-date{display:none}
  html[lang] body .app-shell .orders-panel td.c-actions{white-space:normal;min-width:150px}
  html[lang] body .app-shell .orders-panel td.c-actions .contact-btn{display:inline-flex}
}
html[lang] body .sidebar .new-chip{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important;border:0!important}
html[lang] body .sidebar .profile-avatar{background:var(--vl-volt)!important;color:var(--vl-on-volt)!important}
@media (min-width:761px) and (max-width:1100px){
  html[lang] body .sidebar .new-chip{display:none!important}
  html[lang] body .sidebar .profile{font-size:0}
  html[lang] body .sidebar .profile .profile-avatar{font-size:12px;width:40px;height:40px;display:grid;place-items:center}
  html[lang] body .sidebar .tools-label+.main-nav{margin-top:6px;padding-top:8px;border-top:1px solid var(--vl-ink-3)}
}
/* mode sombre : l'icône du menu actif reste noire sur la pilule volt */
html[data-theme=dark][lang] body .app-shell .sidebar .nav-item.active .nav-icon{background:var(--vl-on-volt)!important;color:var(--vl-volt)!important;box-shadow:none!important}
html[data-theme=dark][lang] body .app-shell .sidebar .nav-item:not(.active) .nav-icon{background:var(--vl-ink-2)!important;color:#e8e8e2!important;box-shadow:none!important}
/* pied de page : liens lisibles (>= 4,5:1) */
html[lang] body .app-shell .footer :is(button,a,b,span:not(.footer-flower)){color:#4a4a45!important}
html[data-theme=dark][lang] body .app-shell .footer :is(button,a,b,span:not(.footer-flower)){color:#b9b9b3!important}
html[lang] body .app-shell .small-wa{color:#1f6b3f!important}
