/* =====================================================================================================
   Office Pro — système de design
   Principes : un seul accent (bleu), neutres froids, ombres douces superposées, pastilles (pills),
   chiffres tabulaires, montants avec décimales atténuées, cibles larges en mode tactile.
   ===================================================================================================== */
:root{
  --bg:#f5f6f8;--surface:#fff;--surface2:#f8f9fb;--surface3:#eceff3;
  --text:#101828;--muted:#667085;--border:#e4e7ec;--border-strong:#d0d5dd;
  --accent:#2457d6;--accent-hover:#1c47b3;--accent-bg:#eaf0fd;--accent-text:#173a94;
  --ok:#067647;--ok-bg:#ecfdf3;--warn:#b54708;--warn-bg:#fffaeb;--danger:#b42318;--danger-bg:#fef3f2;
  --radius:8px;--radius-lg:12px;--row:36px;--ctl:36px;--fs:14px;
  --sh1:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
  --sh2:0 2px 4px -2px rgba(16,24,40,.06),0 6px 14px -2px rgba(16,24,40,.10);
  --sh3:0 8px 8px -4px rgba(16,24,40,.04),0 24px 32px -6px rgba(16,24,40,.18);
  --ring:0 0 0 3px rgba(36,87,214,.24);
  --icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --icon-basket:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 24 24' fill='none' stroke='%23b0b7c3' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9h14l-1.4 9.2a2 2 0 0 1-2 1.8H8.4a2 2 0 0 1-2-1.8L5 9Z'/%3E%3Cpath d='m9 9 3-5 3 5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0c111b;--surface:#151b28;--surface2:#1a2132;--surface3:#232c40;
  --text:#eef1f6;--muted:#9aa4b6;--border:#272f42;--border-strong:#36405a;
  --accent:#6b93f0;--accent-hover:#82a4f4;--accent-bg:#1a2744;--accent-text:#c3d4fb;
  --ok:#5fd39a;--ok-bg:#12301f;--warn:#f0b455;--warn-bg:#35280d;--danger:#f58b82;--danger-bg:#3a1916;
  --sh1:0 1px 2px rgba(0,0,0,.4);--sh2:0 6px 14px rgba(0,0,0,.45);--sh3:0 24px 40px rgba(0,0,0,.6);--ring:0 0 0 3px rgba(107,147,240,.35);
}}
:root[data-theme="dark"]{
  --bg:#0c111b;--surface:#151b28;--surface2:#1a2132;--surface3:#232c40;
  --text:#eef1f6;--muted:#9aa4b6;--border:#272f42;--border-strong:#36405a;
  --accent:#6b93f0;--accent-hover:#82a4f4;--accent-bg:#1a2744;--accent-text:#c3d4fb;
  --ok:#5fd39a;--ok-bg:#12301f;--warn:#f0b455;--warn-bg:#35280d;--danger:#f58b82;--danger-bg:#3a1916;
  --sh1:0 1px 2px rgba(0,0,0,.4);--sh2:0 6px 14px rgba(0,0,0,.45);--sh3:0 24px 40px rgba(0,0,0,.6);--ring:0 0 0 3px rgba(107,147,240,.35);
}
body.touch{--row:60px;--ctl:56px;--fs:16px}
*{box-sizing:border-box}
html{color-scheme:light dark}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:var(--fs)/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Helvetica Neue",Arial,sans-serif;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---- boutons */
button{min-height:var(--ctl);padding:0 14px;border:1px solid var(--border-strong);background:var(--surface);border-radius:var(--radius);cursor:pointer;font-weight:500;box-shadow:var(--sh1);transition:background .12s,border-color .12s,box-shadow .12s,transform .06s}
button:hover{background:var(--surface2);border-color:#b8bfcc}
button:active{transform:scale(.98)}
button:disabled{opacity:.5;cursor:not-allowed}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:none;box-shadow:var(--ring)}
.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;min-height:calc(var(--ctl) + 6px);box-shadow:0 1px 2px rgba(36,87,214,.35)}
.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.primary kbd{background:rgba(255,255,255,.16);color:#e8efff;border-color:rgba(255,255,255,.35)}
.danger-btn{border-color:var(--danger);color:var(--danger);background:var(--surface)}
.danger-btn:hover{background:var(--danger-bg)}
.link{border:0;background:none;box-shadow:none;color:var(--accent);min-height:0;padding:0}
.link:hover{background:none;text-decoration:underline}

/* ---- champs */
input,select,textarea{min-height:var(--ctl);padding:0 12px;border:1px solid var(--border-strong);background:var(--surface);border-radius:var(--radius);transition:border-color .12s,box-shadow .12s}
textarea{padding:8px 12px}
input:hover,select:hover,textarea:hover{border-color:#b8bfcc}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:var(--ring);outline:none}
input[type=search]{border-radius:999px;padding-left:40px;background:var(--icon-search) 14px center/18px no-repeat var(--surface)}
input[type=checkbox],input[type=radio]{accent-color:var(--accent)}
kbd{font:600 11px ui-monospace,Consolas,monospace;padding:1px 6px;border:1px solid var(--border-strong);border-bottom-width:2px;border-radius:5px;background:var(--surface2);color:var(--muted)}
body.touch .hint{display:none}
.muted{color:var(--muted)}

/* ---- montants : décimales atténuées */
.money{font-variant-numeric:tabular-nums;white-space:nowrap}
.money .m-dec{color:var(--muted);font-weight:500}
.money .m-cur{font-size:.5em;color:var(--muted);margin-left:.3em;font-weight:600;letter-spacing:.02em}

/* ---- en-tête */
.top{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--sh1);position:relative;z-index:5}
.brand{display:flex;gap:10px;align-items:center}
.brand strong{font-size:16px;font-weight:700;letter-spacing:-.01em}
.logo{width:30px;height:30px;border-radius:9px;background:linear-gradient(145deg,#3b6fe6,#1c47b3);color:#fff;font-weight:800;font-size:12px;letter-spacing:.02em;display:grid;place-items:center;box-shadow:0 2px 6px rgba(36,87,214,.35)}
.top-mid{display:flex;gap:8px;flex:1;justify-content:center}
.top-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 12px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-size:13px;font-weight:500}
.btn-chip{min-height:var(--ctl);cursor:pointer;box-shadow:none;background:var(--surface);text-decoration:none;color:var(--text)}
.btn-chip:hover{background:var(--surface3);border-color:var(--border-strong)}
.btn-chip.on{background:var(--accent-bg);color:var(--accent-text);border-color:var(--accent)}
.top-mid select{border-radius:999px;padding:0 14px;font-weight:500}
#totals{font-size:12px;white-space:nowrap}
/* écrans moyens : on retire les rappels de raccourcis pour que l'en-tête tienne sur une ligne */
@media (max-width:1560px){.top .hint{display:none}.top{gap:8px}}
.avatar{width:24px;height:24px;border-radius:50%;background:var(--accent-bg);color:var(--accent-text);display:inline-grid;place-items:center;font-weight:700;font-size:12px;flex:none}
#btn-lock{gap:8px;padding-left:6px}
#btn-lock small{color:var(--muted);font-weight:500}
.seg{display:inline-flex;background:var(--surface3);padding:3px;border-radius:10px;gap:2px}
.seg button{border:0;box-shadow:none;background:transparent;min-height:calc(var(--ctl) - 6px);border-radius:8px;padding:0 14px;color:var(--muted)}
.seg button:hover{background:rgba(255,255,255,.55);color:var(--text)}
.seg button[aria-pressed=true]{background:var(--surface);color:var(--text);font-weight:600;box-shadow:var(--sh1)}

/* ---- caisse : deux panneaux */
.grid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(360px,5fr) minmax(0,7fr);gap:16px;padding:16px}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--sh1);display:flex;flex-direction:column;min-height:0;overflow:hidden}
.ticket-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border)}
.ticket-head h2{margin:0;font-size:15px;font-weight:700}
.lines{flex:1;overflow:auto;padding:6px 8px}
.empty{color:var(--muted);padding:28px 12px;text-align:center}
.lines .empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding-top:56px}
.lines .empty::before{content:"";width:56px;height:56px;background:var(--icon-basket) center/contain no-repeat}
.line{display:grid;grid-template-columns:1fr auto auto;gap:4px 12px;align-items:center;padding:10px 10px;border-radius:10px;cursor:pointer;min-height:var(--row);border-left:3px solid transparent;transition:background .1s}
.line+.line{margin-top:2px}
.line:hover{background:var(--surface2)}
.line.sel{background:var(--accent-bg);border-left-color:var(--accent)}
.line .nm{grid-column:1;grid-row:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.line .meta{grid-column:1 / span 3;grid-row:2;font-size:12px;color:var(--muted)}
.line .amt{grid-column:3;grid-row:1;font-weight:700;text-align:right;min-width:88px;font-variant-numeric:tabular-nums}
.qty{display:flex;align-items:center;grid-row:1;grid-column:2;border:1px solid var(--border-strong);border-radius:999px;background:var(--surface);overflow:hidden}
.qty button{width:calc(var(--ctl) - 4px);min-height:calc(var(--ctl) - 4px);padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;font-size:18px;line-height:1}
.qty button:hover{background:var(--surface3)}
.qty input{width:46px;text-align:center;padding:0;border:0;border-radius:0;min-height:calc(var(--ctl) - 4px);background:transparent;font-weight:600;font-variant-numeric:tabular-nums}
.qty input:focus{box-shadow:none;background:var(--accent-bg)}
body.touch .qty input{width:64px}
.badge{font-size:11px;font-weight:600;padding:1px 8px;border-radius:999px;background:var(--warn-bg);color:var(--warn)}
.badge.disc{background:var(--ok-bg);color:var(--ok)}
.ticket-foot{border-top:1px solid var(--border);padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;background:var(--surface2)}
.sum{display:flex;justify-content:space-between;align-items:baseline}
.sum .muted{font-weight:500}
.total{font-size:36px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.1}
.sub{font-size:12px;min-height:16px}
.pay{min-height:60px;font-size:18px;border-radius:var(--radius-lg);letter-spacing:.01em}
body.touch .pay{min-height:76px;font-size:20px}

/* ---- recherche et articles */
.search{position:relative;padding:14px 14px 8px}
.search input{width:100%;padding-right:52px;font-size:1.05em;min-height:calc(var(--ctl) + 8px)}
.search kbd{position:absolute;right:26px;top:50%;transform:translateY(-30%)}
.results{flex:1;overflow:auto;padding:8px 14px 14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;align-content:start}
body.touch .results{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.tile{display:flex;flex-direction:column;gap:4px;text-align:left;padding:12px 14px;min-height:96px;height:auto;justify-content:space-between;border:1px solid var(--border);border-left:4px solid var(--cat,var(--border-strong));border-radius:10px;box-shadow:var(--sh1);background:var(--surface)}
.tile:hover{box-shadow:var(--sh2);transform:translateY(-1px);background:var(--surface);border-color:var(--border-strong);border-left-color:var(--cat,var(--border-strong))}
body.touch .tile{min-height:116px}
.tile.active{border-color:var(--accent);border-left-color:var(--accent);box-shadow:var(--ring);background:var(--accent-bg)}
.tile .t-name{font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tile .t-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tile .t-row{display:flex;justify-content:space-between;align-items:center;gap:6px}
.tile .t-price{font-weight:700;font-size:1.08em;font-variant-numeric:tabular-nums}
.tile .t-price.none{color:var(--warn)}
.stock{font-size:11px;font-weight:600;padding:1px 9px;border-radius:999px;background:var(--ok-bg);color:var(--ok);white-space:nowrap}
.stock.low{background:var(--danger-bg);color:var(--danger)}
.keys{margin:0;padding:10px 16px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);background:var(--surface2)}
.keys kbd{margin:0 2px}

/* ---- boîtes de dialogue */
dialog{border:0;border-radius:16px;background:var(--surface);color:var(--text);padding:0;max-width:min(560px,94vw);width:100%;box-shadow:var(--sh3)}
dialog[open]{animation:pop .16s ease-out;max-height:92vh;overflow:auto}
dialog::backdrop{background:rgba(16,24,40,.52);backdrop-filter:blur(3px)}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.dlg{padding:22px 24px;display:flex;flex-direction:column;gap:14px}
.dlg h3{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em}
.dlg .row{display:grid;grid-template-columns:110px 1fr;gap:10px;align-items:center}
.dlg .row label{font-weight:500}
.dlg .row input{text-align:right;font-variant-numeric:tabular-nums;font-size:1.1em}
.dlg .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px;position:sticky;bottom:-22px;padding:12px 0 2px;background:linear-gradient(to bottom,transparent,var(--surface) 38%)}
.bigtotal{font-size:46px;font-weight:700;text-align:center;letter-spacing:-.02em;line-height:1.1;padding:6px 0 2px}
.quick{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.quick button{border-radius:999px;min-height:calc(var(--ctl) - 2px);padding:0 16px;font-weight:600;background:var(--surface2);box-shadow:none}
.quick button:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text)}
dialog:has(.dlg.wide){max-width:min(780px,96vw)}
.menu{display:flex;flex-direction:column;gap:8px}.menu button{text-align:left;box-shadow:none;min-height:calc(var(--ctl) + 4px)}
.menu .danger{border-color:var(--danger);color:var(--danger)}
.status{padding:10px 14px;border-radius:10px;text-align:center;font-weight:600}
.status.ok{background:var(--ok-bg);color:var(--ok)}.status.due{background:var(--warn-bg);color:var(--warn)}.status.err{background:var(--danger-bg);color:var(--danger)}
.pick{max-height:300px;overflow:auto;display:flex;flex-direction:column;gap:6px}
.pick button{text-align:left;display:flex;justify-content:space-between;gap:8px;box-shadow:none}

/* ---- écran de réussite (après encaissement) */
.success{display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 0 6px;text-align:center}
.success .check{width:64px;height:64px;border-radius:50%;background:var(--ok);position:relative;box-shadow:0 6px 18px rgba(6,118,71,.35);animation:pop .3s ease-out}
.success .check::after{content:"";position:absolute;left:23px;top:13px;width:16px;height:30px;border:solid #fff;border-width:0 5px 5px 0;transform:rotate(42deg)}
.success .s-label{font-size:15px;font-weight:600;color:var(--muted);margin-top:8px}
.success .s-amount{font-size:56px;font-weight:700;letter-spacing:-.03em;line-height:1.05}
.success .s-change{margin-top:4px;padding:6px 16px;border-radius:999px;background:var(--warn-bg);color:var(--warn);font-weight:600}
.success .s-change b{font-size:1.15em}
.receipt-wrap{max-height:240px;overflow:auto;border-radius:10px}
dialog:has(.success){max-width:min(520px,94vw)}

/* ---- Écran d'identification */
#auth{position:fixed;inset:0;z-index:40;background:radial-gradient(1200px 600px at 50% -10%,var(--accent-bg),transparent 60%),var(--bg);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
#auth[hidden]{display:none}
body.locked>header,body.locked>main{visibility:hidden}
.auth-card{width:min(440px,100%);background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:var(--sh3);padding:28px;display:flex;flex-direction:column;gap:14px}
.auth-head h1{margin:0;font-size:22px;letter-spacing:-.01em}.auth-card h2{margin:0;font-size:16px}
.auth-err{min-height:20px;color:var(--danger);font-size:13px;text-align:center}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.tile-user{display:flex;flex-direction:column;align-items:flex-start;gap:2px;height:auto;padding:12px 14px;text-align:left;border-radius:12px}
.tile-user.sel{border-color:var(--accent);background:var(--accent-bg);color:var(--accent-text);box-shadow:var(--ring)}
.dots{display:flex;justify-content:center;gap:12px;min-height:22px}
.dots span{width:14px;height:14px;border-radius:50%;border:2px solid var(--border-strong);transition:background .1s}.dots span.on{background:var(--accent);border-color:var(--accent)}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.key{min-height:60px;font-size:22px;font-weight:600;padding:0;border-radius:14px}
.urow{display:grid;grid-template-columns:1fr 150px auto auto;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border)}
.urow.off{opacity:.55}.urow select{min-height:var(--ctl)}
.uadd{display:grid;grid-template-columns:1fr 150px 110px auto;gap:8px}
@media (max-width:640px){.urow,.uadd{grid-template-columns:1fr 1fr}}

/* ---- retours / listes dans les dialogues */
.rlist{display:flex;flex-direction:column;max-height:300px;overflow:auto;border:1px solid var(--border);border-radius:var(--radius)}
.rrow{display:grid;grid-template-columns:1fr auto auto 90px;gap:8px 12px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border)}
.rrow:last-child{border-bottom:0}.rrow.done{opacity:.55}
.rrow .rname{min-width:0}.rrow .small{font-size:12px}
.rrow .ramt{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:var(--danger)}
.defect{display:flex;align-items:center;gap:6px;font-size:13px;white-space:nowrap}
.defect input{min-height:0;width:18px;height:18px}
.dlg .row select{min-height:var(--ctl);padding:0 12px;border:1px solid var(--border-strong);background:var(--surface);border-radius:var(--radius)}
@media (max-width:640px){.rrow{grid-template-columns:1fr auto}.rrow .defect,.rrow .ramt{grid-column:1 / -1}}

/* =====================================================================================================
   Pages de gestion
   ===================================================================================================== */
body.adminpage{height:auto;min-height:100%}
.adminpage .top{gap:14px;padding:0 16px}
.adminpage .top .seg{background:none;padding:0;border-radius:0;gap:2px;overflow-x:auto}
.adminpage .top .seg button{border-radius:0;min-height:56px;padding:0 14px;border-bottom:3px solid transparent;color:var(--muted);font-weight:500;white-space:nowrap}
.adminpage .top .seg button:hover{background:none;color:var(--text)}
.adminpage .top .seg button[aria-pressed=true]{background:none;box-shadow:none;color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.adminpage .top strong{font-size:16px;font-weight:700}
.admin{padding:18px 20px;display:flex;flex-direction:column;gap:14px;max-width:1360px;width:100%;margin:0 auto}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.toolbar input[type=search]{min-height:calc(var(--ctl) + 4px)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.fchip{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 14px;border-radius:999px;font-size:13px;box-shadow:none}
.fchip[aria-pressed=true]{background:var(--accent-bg);color:var(--accent-text);border-color:var(--accent);font-weight:600}
.fchip .n{font-size:12px;background:var(--surface3);border-radius:999px;padding:0 8px;color:var(--muted)}
.fchip[aria-pressed=true] .n{background:var(--accent);color:#fff}
.tablewrap{overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--sh1)}
table.dtable{width:100%;border-collapse:collapse;font-size:13.5px}
table.dtable th{position:sticky;top:0;background:var(--surface2);text-align:left;font-weight:600;font-size:12px;color:var(--muted);letter-spacing:.03em;padding:11px 14px;border-bottom:1px solid var(--border);white-space:nowrap;z-index:1}
table.dtable td{padding:9px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
table.dtable tr:last-child td{border-bottom:0}
table.dtable tr:hover td{background:var(--surface2)}
table.dtable .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
table.dtable .nm{min-width:240px;max-width:380px}table.dtable .t1{font-weight:600;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
table.dtable .small{font-size:12px}table.dtable tr.off{opacity:.6}
table.dtable .empty{padding:32px;text-align:center}
table.dtable td input[type=checkbox]{min-height:0;width:18px;height:18px}
table.dtable tr.clickable{cursor:pointer}
.neg{color:var(--danger);font-weight:600}.low{color:var(--warn);font-weight:600}.ok{color:var(--ok);font-weight:600}
.pinp{width:110px;text-align:right;min-height:30px;font-variant-numeric:tabular-nums}
.pinp.missing{border-color:var(--warn);background:var(--warn-bg)}
.act{text-align:right}.act button{min-height:30px;padding:0 12px;box-shadow:none}
.foot{display:flex;gap:12px;align-items:center;justify-content:space-between}
.fgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}
.frow{display:flex;flex-direction:column;gap:5px;font-size:13px}.frow>span{color:var(--muted);font-weight:500}
.frow.full{grid-column:1 / -1}.frow.checks{flex-direction:row;gap:18px;align-items:center;padding-top:22px}.frow.checks input{min-height:0;width:18px;height:18px}
.codes{display:flex;flex-wrap:wrap;gap:6px}.code{display:inline-flex;align-items:center;gap:4px;background:var(--surface3);border-radius:999px;padding:2px 4px 2px 10px;font:12px ui-monospace,Consolas,monospace}
.code button{min-height:22px;width:22px;padding:0;border:0;background:none;color:var(--muted);box-shadow:none;border-radius:50%}
.inline{display:flex;gap:8px}.inline input{flex:1}
.stockbox{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}
.catlist{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--sh1);overflow:hidden}
.catrow{display:flex;gap:8px;align-items:center;padding:8px 14px;border-bottom:1px solid var(--border);flex-wrap:wrap}.catrow:last-child{border-bottom:0}
.catrow:hover{background:var(--surface2)}
.catrow .cname{flex:1;min-width:180px;display:flex;gap:8px;align-items:center;font-weight:600}
.catrow button{min-height:30px;padding:0 12px;font-size:13px;box-shadow:none}
.finder{position:relative}.finder input{width:100%}
.hits{position:absolute;left:0;right:0;top:100%;margin-top:4px;z-index:5;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh3);max-height:320px;overflow:auto}
.hits:empty{display:none}
.hit{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--border);border-radius:0;background:var(--surface);min-height:42px;padding:6px 14px;box-shadow:none}
.hit:last-child{border-bottom:0}.hit:hover{background:var(--accent-bg)}
.cell{width:100px;text-align:right;min-height:30px;font-variant-numeric:tabular-nums}.cell.qty{width:70px}
.totals{display:flex;flex-wrap:wrap;gap:6px 24px;align-items:baseline;justify-content:flex-end;padding:8px 4px}
.totals .grand{font-size:18px}.totals b{font-variant-numeric:tabular-nums}
.badge.lossb{background:var(--danger-bg);color:var(--danger)}
.card-b{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--sh1);padding:18px;margin-bottom:14px}
.banner-w{padding:12px 14px;border-radius:10px;background:var(--warn-bg);color:var(--warn);margin-bottom:14px;font-weight:500}.banner-w.bad{background:var(--danger-bg);color:var(--danger)}
#sync-chip{font-size:12px;background:var(--ok-bg);color:var(--ok);border-color:transparent}
#sync-chip.err{background:var(--warn-bg);color:var(--warn)}
.docframe{width:100%;height:62vh;border:1px solid var(--border);border-radius:var(--radius);background:#fff}
dialog:has(.docframe){max-width:min(900px,96vw)}
.kvgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 20px}
@media (max-width:640px){.fgrid{grid-template-columns:1fr}table.dtable .nm{min-width:180px}}
.kv{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border-bottom:1px solid var(--border)}

/* ---- notifications et ticket imprimé */
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;z-index:50}
#toast div{background:#101828;color:#fff;padding:10px 18px;border-radius:999px;max-width:90vw;box-shadow:var(--sh2);font-weight:500;animation:pop .16s ease-out}
#toast div.err{background:var(--danger);color:#fff}
.receipt{font:13px/1.35 ui-monospace,Consolas,monospace;padding:16px 20px;background:#fff;color:#000;border-radius:10px;border:1px dashed var(--border-strong)}
.receipt .c{text-align:center}.receipt hr{border:0;border-top:1px dashed #000;margin:6px 0}
.receipt .l{display:flex;justify-content:space-between;gap:8px}.receipt .b{font-weight:700;font-size:1.15em}
@media (max-width:820px){.grid{grid-template-columns:1fr}.top-mid{order:3;flex-basis:100%;justify-content:flex-start}}
@media print{
  body *{visibility:hidden}
  #receipt,#receipt *{visibility:visible}
  #receipt{position:absolute;left:0;top:0;width:76mm;border:0;padding:0}
  .receipt-wrap{max-height:none;overflow:visible}
}

/* ---- commandes web */
.worders{display:grid;gap:12px}
.wo-head,.wo-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.wo-head .grow,.wo-foot .grow{flex:1}
.wo-cust{margin:8px 0}
.wo-items{margin:10px 0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}
.wo-items .line{display:flex;justify-content:space-between;gap:12px;padding:2px 0;border-left:0;cursor:default}
.wo-items .line:hover{background:none}
.wo-nouvelle{border-color:var(--accent);box-shadow:var(--ring)}
.wo-annulee,.wo-retournee{opacity:.7}
.pill{display:inline-flex;align-items:center;padding:1px 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface3);color:var(--muted)}
.pill.st-nouvelle{background:var(--accent-bg);color:var(--accent-text)}
.pill.bad{background:var(--danger-bg);color:var(--danger)}
.seg button.alert,.tabs button.alert,#tab-weborders.alert{font-weight:600}
.webbox{margin:12px 0;padding:10px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}
.webbox summary{cursor:pointer;font-weight:600}

/* ---- bouton Gestion (manager / admin) */
#btn-gestion{font-weight:600;border-color:var(--accent);color:var(--accent-text);background:var(--accent-bg)}
#btn-gestion:hover{background:var(--accent);color:#fff}
#btn-gestion.alert{background:var(--accent);color:#fff}
#btn-gestion b{margin-left:4px;padding:0 8px;border-radius:999px;background:#fff;color:var(--accent);font-size:12px}
#btn-gestion[hidden],#gestion-badge[hidden]{display:none !important}

/* ---- pastilles de familles (au-dessus des articles) */
.cats{display:flex;gap:8px;padding:2px 14px 10px;overflow-x:auto;scrollbar-width:thin;flex:none}
.cats[hidden]{display:none}
.pill-btn{flex:none;display:inline-flex;align-items:center;gap:8px;min-height:calc(var(--ctl) - 2px);padding:0 14px;border-radius:999px;font-weight:600;white-space:nowrap;box-shadow:none;background:var(--surface)}
.pill-btn::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--cat,var(--border-strong))}
.pill-btn:first-child::before{display:none}
.pill-btn .n{font-size:11px;font-weight:600;color:var(--muted);background:var(--surface3);border-radius:999px;padding:0 7px}
.pill-btn.on{background:var(--accent);border-color:var(--accent);color:#fff}
.pill-btn.on:hover{background:var(--accent-hover)}
.pill-btn.on .n{background:rgba(255,255,255,.22);color:#fff}
.pill-btn.on::before{background:#fff}

/* ---- pavé numérique (mode tactile) */

/* ---- tableaux de bord (liste à gauche, widgets à droite) */
.dash{display:grid;grid-template-columns:232px minmax(0,1fr);gap:28px;align-items:start}
.dnav{position:sticky;top:76px;display:flex;flex-direction:column;gap:2px;padding:4px 0}
.dnav-s{margin:18px 0 6px 12px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.dnav-s:first-child{margin-top:0}
.dnav-i{text-align:left;border:0;box-shadow:none;background:transparent;border-radius:8px;min-height:38px;padding:0 12px;font-weight:500;color:var(--text)}
.dnav-i:hover{background:var(--surface3)}
.dnav-i[aria-current=true]{background:var(--accent-bg);color:var(--accent-text);font-weight:600}
.dhead{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:16px}
.dhead h2{margin:0 0 2px;font-size:24px;letter-spacing:-.02em}
.dtools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px;align-items:start}
.dbody>.kpis{grid-column:1 / -1}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.kpi{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh1);padding:14px 16px;display:flex;flex-direction:column;gap:4px;min-width:0}
.kpi-l{font-size:13px;color:var(--muted);font-weight:500}
.kpi-v{font-size:28px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.15;overflow-wrap:anywhere}
.kpi-f{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;min-height:20px;font-size:12px}
.kpi-h{color:var(--muted)}
.kpi.tone-warn .kpi-v{color:var(--warn)}.kpi.tone-bad .kpi-v{color:var(--danger)}.kpi.tone-ok .kpi-v{color:var(--ok)}
.delta{font-weight:700;font-size:12px;padding:1px 8px;border-radius:999px;white-space:nowrap}
.delta.up{background:var(--ok-bg);color:var(--ok)}.delta.down{background:var(--danger-bg);color:var(--danger)}.delta.flat{background:var(--surface3);color:var(--muted);font-weight:500}
.wcard{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh1);padding:16px 18px;min-width:0}
.wcard.span2{grid-column:span 2}
@media (max-width:1180px){.wcard.span2{grid-column:auto}}
.wcard h3{margin:0 0 12px;font-size:15px;font-weight:700}
.wempty{color:var(--muted);padding:18px 4px;text-align:center}
.tablewrap.flat{border:0;box-shadow:none;border-radius:0;margin:0 -8px;background:transparent}
.wcard .dtable th{position:static}
.small{font-size:12px}
.chart-wrap{position:relative}
.chart{width:100%;height:auto;display:block;overflow:visible}
.ch-grid{stroke:var(--border);stroke-width:1}
.ch-txt{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.ch-area{fill:var(--accent);opacity:.13}
.ch-area.solid{opacity:.55}
.ch-line{fill:none;stroke:var(--accent);stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
.ch-dot{fill:var(--surface);stroke:var(--accent);stroke-width:2.4}
.tip{position:absolute;pointer-events:none;background:#101828;color:#fff;border-radius:8px;padding:6px 10px;font-size:12px;box-shadow:var(--sh2);min-width:100px}
.tip .muted{color:#c9d0dc}
.tip[hidden]{display:none}
.tip .money .m-dec,.tip .money .m-cur{color:#c9d0dc}
.bars{display:flex;flex-direction:column;gap:10px}
.bar-row{display:grid;grid-template-columns:minmax(80px,34%) 1fr auto;gap:10px;align-items:center;font-size:13px}
.bar-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{height:10px;background:var(--surface3);border-radius:999px;overflow:hidden}
.bar-fill{height:100%;background:var(--accent);border-radius:999px}
.bar-v{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.money.neg{color:var(--danger)}
@media (max-width:900px){
  .dash{grid-template-columns:1fr}
  .dnav{position:static;flex-direction:row;overflow-x:auto;gap:6px;padding:0 0 8px}
  .dnav-s{display:none}
  .dnav-i{flex:none;border:1px solid var(--border);border-radius:999px;background:var(--surface)}
}

/* ---- défilements discrets et période sur petits écrans */
.adminpage .top .seg,.dnav,.cats,.dtools .seg{scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
.dtools .seg{max-width:100%;overflow-x:auto}
.dtools .seg button{white-space:nowrap}
/* =====================================================================================================
   Accueil : tableau de lancement des applications
   ===================================================================================================== */
body.homepage{height:auto;min-height:100%;background:radial-gradient(900px 420px at 50% -8%,var(--accent-bg),transparent 70%),var(--bg)}
.brand-link{display:inline-flex;text-decoration:none}
.home-search{flex:1;display:flex;justify-content:center}
.home-search input{width:min(520px,100%);min-height:calc(var(--ctl) + 4px)}
.home{max-width:1120px;width:100%;margin:0 auto;padding:30px 24px 72px}
.home-hello{margin:0 0 18px 8px}
.home-hello h1{margin:0;font-size:30px;letter-spacing:-.02em}
.home-hello p{margin:4px 0 0;text-transform:capitalize}
.todo-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 22px 8px}
.strip-chip{padding:5px 14px;border-radius:999px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--sh1);font-weight:600;font-size:13px;color:var(--text);text-decoration:none}
.strip-chip:hover{border-color:var(--accent);color:var(--accent-text);background:var(--accent-bg)}
.apps{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:18px 12px}
.app{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;padding:18px 8px 14px;min-height:0;border:1px solid transparent;background:transparent;box-shadow:none;border-radius:18px;text-decoration:none;color:var(--text);cursor:pointer;transition:background .15s,box-shadow .15s,transform .12s,border-color .15s}
.app:hover{background:var(--surface);border-color:var(--border);box-shadow:var(--sh2);transform:translateY(-2px)}
.app:focus-visible{box-shadow:var(--ring)}
.app-icon{width:76px;height:76px;border-radius:20px;background:linear-gradient(145deg,var(--g1),var(--g2));display:grid;place-items:center;color:#fff;flex:none;box-shadow:0 10px 20px -8px rgba(16,24,40,.4),inset 0 1px 0 rgba(255,255,255,.38)}
.app-icon svg{width:38px;height:38px}
.app-name{font-weight:600;font-size:14px;text-align:center;line-height:1.25}
.app-badge{position:absolute;top:10px;left:calc(50% + 20px);min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--danger);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center;border:2px solid var(--bg);box-shadow:var(--sh1)}
.app-badge.warn{background:#dd6b20}.app-badge.info{background:var(--accent)}
.app-new{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--accent-text);background:var(--accent-bg);padding:1px 9px;border-radius:999px;margin-top:-5px}
.app-new.soon{color:var(--muted);background:var(--surface3)}
.soon-title{margin:38px 0 6px 8px;font-size:12px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.soon-apps .app .app-icon{filter:grayscale(.9);opacity:.5}
.soon-apps .app .app-name{color:var(--muted)}
.soon-head{display:flex;gap:14px;align-items:center}
.soon-head h3{margin:0 0 4px}
.soon-head .app-icon{width:56px;height:56px;border-radius:15px}.soon-head .app-icon svg{width:28px;height:28px}
@media (max-width:640px){.apps{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}.app-icon{width:62px;height:62px;border-radius:17px}.app-icon svg{width:32px;height:32px}.app-badge{left:calc(50% + 12px)}.home{padding:20px 12px 56px}}

/* ---- tâches, abonnements, dépenses */
.todolist{display:flex;flex-direction:column;gap:8px}
.todo{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 16px;box-shadow:var(--sh1)}
.todo.late{border-left:4px solid var(--danger)}
.todo.done .todo-title{text-decoration:line-through;color:var(--muted)}
.todo-check{width:22px;height:22px;min-height:0;flex:none}
.todo-main{flex:1;min-width:0}
.todo-title{font-weight:600}
.due{font-size:12px;font-weight:600;color:var(--muted);background:var(--surface3);padding:2px 10px;border-radius:999px;white-space:nowrap}
.due.late{background:var(--danger-bg);color:var(--danger)}.due.today{background:var(--warn-bg);color:var(--warn)}
.prio{font-size:11px;font-weight:700;padding:1px 9px;border-radius:999px;white-space:nowrap}
.prio.p1{background:var(--warn-bg);color:var(--warn)}.prio.p2{background:var(--danger-bg);color:var(--danger)}
.todo-act{display:flex;gap:6px;opacity:0;transition:opacity .12s}
.todo:hover .todo-act,.todo:focus-within .todo-act{opacity:1}
@media (hover:none){.todo-act{opacity:1}}
.todo-act button{min-height:30px;padding:0 10px;box-shadow:none}
.pill.warn{background:var(--warn-bg);color:var(--warn)}.pill.ok{background:var(--ok-bg);color:var(--ok)}
.pill.bad{background:var(--danger-bg);color:var(--danger)}

/* ---- inventaire physique : champ de scan, dernier article, résumé */
.invhead{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.invtitle h2{margin:0;font-size:22px;letter-spacing:-.01em}
.scanbox{display:flex;flex-wrap:wrap;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--sh1);padding:14px 16px}
.scan-input{width:100%;min-height:56px;font-size:20px;border-radius:12px;border-width:2px;border-color:var(--accent);padding-left:16px}
.lastscan{display:flex;flex-direction:column;gap:2px;align-items:center;text-align:center;border-radius:14px;padding:16px 20px;border:2px solid var(--border);background:var(--surface);transition:background .25s,border-color .25s}
.lastscan.idle{border-style:dashed;padding:14px}
.lastscan.ok{background:var(--ok-bg);border-color:var(--ok)}
.lastscan.warn{background:var(--warn-bg);border-color:var(--warn)}
.lastscan.bad{background:var(--danger-bg);border-color:var(--danger)}
.ls-name{font-size:18px;font-weight:700}
.ls-qty{font-size:56px;font-weight:700;letter-spacing:-.03em;line-height:1.05;font-variant-numeric:tabular-nums}
.sumbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.cell.qty{width:90px}
.adminpage .top .seg{flex:1;min-width:0}
.adminpage .top #who{white-space:nowrap}

/* =====================================================================================================
   CAISSE — disposition « point de vente » (relevé : docs/odoo-pos-reference.md). Nos couleurs, nos icônes, notre code.
   Tout est limité à body.pos : les écrans de gestion gardent leur propre mise en page.
   ===================================================================================================== */
.ic{display:inline-block;width:20px;height:20px;flex:none;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat;vertical-align:middle}
.ic-plus{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
.ic-search{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")}
.ic-barcode{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 5h2v14H3zM7 5h1v14H7zM10 5h3v14h-3zM15 5h1v14h-1zM18 5h3v14h-3z'/%3E%3C/svg%3E")}
.ic-menu{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E")}
.ic-dots{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3C/svg%3E")}
.ic-user{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E")}
/* caisse enregistreuse : écran, touches, tiroir (dessin à nous) */
.ic-register{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='13' y='2.5' width='7' height='4' rx='1'/%3E%3Cpath d='M16.5 6.5V9'/%3E%3Cpath d='M5.5 9h13l2 6h-17z'/%3E%3Cpath d='M8 11.5h.01M11 11.5h.01M14 11.5h.01M17 11.5h.01'/%3E%3Crect x='3' y='15' width='18' height='6' rx='1.2'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E")}
#btn-drawer .ic{width:24px;height:24px}
.ic-cash{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6' width='19' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3C/svg%3E")}
.ic-card{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M2.5 10h19M6 15h4'/%3E%3C/svg%3E")}
.ic-cheque{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 10h6M7 14h10M16 9h2'/%3E%3C/svg%3E")}
.ic-lock{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")}
.ic-wrench{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0 5 5L21 12.6l-8.4 8.4a2.1 2.1 0 0 1-3-3L18 9.6Z' transform='scale(.95) translate(.6 -.5)'/%3E%3Cpath d='M15 4l-2 2 2 2 2-2z'/%3E%3C/svg%3E")}
.ic-return{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-3'/%3E%3C/svg%3E")}
.ic-clock{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")}
.ic-report{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M9 12h7M9 16h7M9 8h3'/%3E%3C/svg%3E")}
.ic-in{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12M7 11l5 5 5-5M5 20h14'/%3E%3C/svg%3E")}
.ic-out{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M5 20h14'/%3E%3C/svg%3E")}
.ic-users{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 5a3.5 3.5 0 0 1 0 7M18 14c2.2.6 3.5 2.6 3.5 6'/%3E%3C/svg%3E")}
.ic-refresh{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7'/%3E%3Cpath d='M20 4v5h-5'/%3E%3C/svg%3E")}
.ic-tag{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.3'/%3E%3C/svg%3E")}
.ic-percent{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E")}
.ic-trash{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E")}
.ic-print{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V3h10v6M7 17H4v-7h16v7h-3M7 14h10v7H7z'/%3E%3C/svg%3E")}
.ic-back{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/svg%3E")}
.ic-home{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11 12 4l8 7v9h-5v-6H9v6H4z'/%3E%3C/svg%3E")}
.ic-x{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E")}
.ic-power{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v8M6.3 6.7a8 8 0 1 0 11.4 0'/%3E%3C/svg%3E")}

body.pos{--pos-h:67px;--left-w:clamp(380px,33vw,450px);--tile-r:8px;height:100vh;overflow:hidden}
body.pos button{box-shadow:none}
/* barre du haut */
.pos-top{display:flex;align-items:center;justify-content:space-between;gap:12px;height:var(--pos-h);padding:8px;background:var(--surface);border-bottom:1px solid var(--border);flex:none;position:relative;z-index:5}
.pos-left,.pos-right{display:flex;align-items:center;gap:8px;min-width:0}
.pos-top button{min-height:49px;font-size:17.5px;font-weight:500;padding:0 14px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.pair{display:inline-flex}
.pair button{border-radius:0;border:1px solid var(--border-strong);background:var(--surface)}
.pair button:first-child{border-radius:6px 0 0 6px}.pair button:last-child{border-radius:0 6px 6px 0;margin-left:-1px}
.pair button.on,.pair button[aria-pressed=true]{background:var(--accent-bg);border-color:var(--accent);color:var(--text);position:relative;z-index:1}
.cnt{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--accent);color:#fff;font-size:12px;font-weight:700}
.pos-top .sq{width:49px;padding:0;background:var(--surface2)}
.ticket-tab{display:inline-flex;align-items:center;min-height:49px;padding:0 16px;border-radius:6px;border:1px solid var(--accent);background:var(--accent-bg);font-size:17.5px;font-weight:500;white-space:nowrap}
.searchbox{position:relative;display:flex;align-items:center;gap:8px;width:clamp(220px,22vw,330px);height:42px;padding:0 12px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--muted)}
.searchbox:focus-within{border-color:var(--accent);box-shadow:var(--ring)}
.searchbox input{flex:1;min-width:0;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;min-height:0;height:100%;font-size:16px;color:var(--text);border-radius:0!important}
.searchbox input[type=search]{background-image:none!important}
.pos-top .ghost{background:transparent;border-color:transparent;width:54px;padding:0}
.pos-top .ghost:hover{background:var(--surface3)}
.avatar-btn{width:44px;min-height:44px!important;padding:0!important;border-radius:50%!important;background:var(--accent)!important;border:0!important;color:#fff;font-weight:700;font-size:18px!important}
.pos-right .chip{font-size:12px;padding:2px 10px}
/* corps */
.pos-main{flex:1;min-height:0;display:flex}
.leftpane{width:var(--left-w);flex:none;display:flex;flex-direction:column;background:var(--surface);border-right:1px solid var(--border);padding:0 0 8px}
.leftpane .lines{flex:1;min-height:0;overflow:auto;padding:0}
.leftpane .lines .empty{padding-top:40px}
.ol{display:flex;align-items:flex-start;gap:8px;padding:7px 8px;min-height:36px;cursor:pointer;line-height:1.25;border-bottom:1px solid transparent}
.ol:hover{background:var(--surface2)}
.ol.sel{background:var(--accent-bg)}
.ol .q{font-weight:700;min-width:22px;text-align:left}
.ol .n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column}
.ol .n .meta{font-size:12px;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.ol .p{font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.order-summary{display:flex;flex-direction:column;gap:4px;padding:8px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.order-summary .r{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.order-summary .r.tot{font-size:16px;font-weight:700;color:var(--text)}
.order-summary .r.tot .money{font-size:1.05em}
.actionrow{display:flex;gap:8px;padding:8px}
.actionrow .grow{flex:1}
.btn2{min-height:40px;padding:0 12px;border-radius:6px;background:var(--surface2);border:1px solid var(--border-strong);font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:6px;max-width:55%}
.btn2 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn2.icon{width:44px;padding:0;justify-content:center}
.btn2.on{background:var(--accent-bg);border-color:var(--accent)}
.leftpane .numpad,.pay-screen .numpad{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin:0 8px;border-radius:6px;overflow:hidden;background:var(--border)}
.np-key{min-height:52px!important;height:52px;border:0!important;border-radius:0!important;background:var(--surface2);font-size:18px;font-weight:500;padding:0!important;display:grid;place-items:center}
.np-key:hover{background:var(--surface3)}
.np-key:active{transform:none;background:var(--border)}
.np-mode[aria-pressed=true]{background:var(--accent-bg)!important;box-shadow:inset 0 0 0 2px var(--accent)!important;color:var(--accent-text)}
.np-clear{background:#f7e08e!important;color:#4a3b00}
.np-comma{background:#f5d7cb!important;color:#5a2a10}
.np-back{background:#faa0a0!important;color:#5c1212}
.np-plus{background:#bbe8c1!important;color:#12461c}
@media (prefers-color-scheme:dark){.np-clear{background:#6d5a12!important;color:#fbeaa0}.np-comma{background:#5a3a2e!important;color:#f7d8c8}.np-back{background:#7a2c2c!important;color:#fcd0d0}.np-plus{background:#27522e!important;color:#c9f0cf}}
.leftpane .pay{margin:8px 8px 0;min-height:70px;font-size:17.5px;border-radius:6px}
/* volet droit : familles + produits */
.rightpane{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg);overflow:auto}
.category-list,.product-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;padding:8px}
.category-list{flex:none;align-content:start}
.product-list{flex:1;align-content:start;padding-top:8px}
.ct{--cat:#2457d6;min-height:64px;height:64px;padding:4px 8px;border:0;border-radius:var(--tile-r);background:color-mix(in srgb,var(--cat) 24%,var(--surface));color:color-mix(in srgb,var(--cat) 55%,var(--text));font-size:14px;font-weight:500;text-align:center;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1.2}
.ct:hover{background:color-mix(in srgb,var(--cat) 32%,var(--surface))}
.ct.on{box-shadow:inset 0 0 0 2px var(--cat);background:color-mix(in srgb,var(--cat) 36%,var(--surface))}
.ct .n{font-size:11px;opacity:.7}
.ct.home{--cat:#667085}
.pt{--cat:#d0d5dd;position:relative;min-height:103px;height:103px;padding:0;border:1px solid var(--border)!important;border-bottom:4px solid var(--cat)!important;border-radius:var(--tile-r)!important;background:var(--surface);display:flex;align-items:center;justify-content:center;text-align:center}
.pt:hover{background:var(--surface2)}
.pt.active{box-shadow:0 0 0 2px var(--accent)}
.pt .pn{padding:4px 10px;font-size:14px;font-weight:500;line-height:1.25;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.pt .qb{position:absolute;right:6px;bottom:6px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#000;color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}
.pt.out .pn{opacity:.55}
.rightpane .empty{grid-column:1/-1}
.rightpane .keys{margin:auto 0 0;padding:6px 12px;font-size:12px;color:var(--muted);text-align:center}
/* menu ☰ et actions : popup de tuiles */
dialog:has(.tiles-dlg){max-width:min(760px,96vw);border-radius:12px}
.tiles-dlg{padding:14px 16px 16px;display:flex;flex-direction:column;gap:12px}
.tiles-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tiles-head .who{display:inline-flex;align-items:center;gap:8px;padding:4px 12px;border:1px solid var(--accent);border-radius:6px;color:var(--accent-text);font-weight:600;font-size:13px}
.tiles-head h3{margin:0;font-size:16px}
.tiles-head .x{border:0;background:transparent;min-height:36px;width:36px;padding:0;display:grid;place-items:center}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.tile-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:92px;padding:12px 8px;border:0;border-radius:6px;background:var(--surface2);font-size:14px;font-weight:500;text-align:center;position:relative}
.tile-btn:hover{background:var(--surface3)}
.tile-btn .ic{width:22px;height:22px;color:var(--muted)}
.tile-btn.danger{background:#ef4444;color:#fff}
.tile-btn.danger .ic{color:#fff}.tile-btn.danger:hover{background:#dc2f2f}
.tile-btn .cnt{position:absolute;top:6px;right:6px}
.tile-wide{grid-column:1/-1;flex-direction:row;min-height:52px}
@media (max-width:640px){.tiles{grid-template-columns:repeat(2,1fr)}}
/* écran de paiement */
.pay-screen,.done-screen{position:fixed;inset:0;z-index:50;background:var(--bg);display:flex;flex-direction:column}
.pay-screen .pos-top{justify-content:space-between}
.pay-body{flex:1;min-height:0;display:flex}
.pay-left{width:var(--left-w);flex:none;display:flex;flex-direction:column;gap:8px;background:var(--surface);border-right:1px solid var(--border);padding:8px}
.methods{display:flex;flex-direction:column;gap:8px;flex:1;overflow:auto}
.method{min-height:64px;height:64px;padding:0 16px;border-radius:6px;background:var(--surface2);border:1px solid var(--border-strong);font-size:17.5px;font-weight:500;display:flex;align-items:center;gap:12px;justify-content:flex-start;text-align:left}
.method .ic{color:var(--muted)}
.method.on{background:var(--accent-bg);border-color:var(--accent)}
.pay-row{display:flex;gap:8px}
.pay-row .btn2{flex:1;min-height:44px;max-width:none;justify-content:flex-start}
.pay-left .numpad{margin:0}
.pay-actions{display:flex;gap:8px}
.pay-actions button{flex:1;min-height:69px;height:69px;font-size:17.5px;border-radius:6px}
.pay-actions .primary{font-weight:600}
.pay-right{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px}
.pay-total{font-size:clamp(64px,11vw,150px);font-weight:400;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.pay-total .m-dec,.pay-total .m-cur{color:var(--muted)}
.pay-total .m-cur{font-size:.5em;margin-left:.1em}
.paylines{width:min(600px,100%);display:flex;flex-direction:column;gap:8px}
.payline{display:flex;align-items:center;gap:12px;min-height:66px;padding:0 16px;border-radius:8px;background:var(--surface);border:1px solid var(--border);cursor:pointer;font-size:17.5px}
.payline.sel{background:var(--accent-bg);border-color:var(--accent)}
.payline .nm{flex:1;font-weight:500}
.payline .amt{font-size:21px;font-variant-numeric:tabular-nums}
.payline .rm{border:0;background:transparent;min-height:36px;width:36px;padding:0;color:var(--danger);display:grid;place-items:center}
.paystate{font-size:20px;font-weight:600;padding:8px 20px;border-radius:999px}
.paystate.due{background:var(--warn-bg);color:var(--warn)}.paystate.ok{background:var(--ok-bg);color:var(--ok)}.paystate.err{background:var(--danger-bg);color:var(--danger)}
/* reçu : « Montant payé » */
.done-screen{align-items:center;justify-content:center;gap:18px;text-align:center}
.done-check{width:64px;height:64px;border-radius:50%;background:var(--ok);position:relative;animation:pop .2s ease-out}
.done-check::after{content:"";position:absolute;left:23px;top:12px;width:16px;height:30px;border:solid #fff;border-width:0 5px 5px 0;transform:rotate(40deg)}
.done-title{font-size:32px;font-weight:700;margin:0}
.done-amount{font-size:clamp(90px,25vw,346px);font-weight:400;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.done-amount .m-dec,.done-amount .m-cur{color:var(--muted)}.done-amount .m-cur{font-size:.5em;margin-left:.1em}
.done-change{font-size:22px;font-weight:600;padding:6px 20px;border-radius:999px;background:var(--warn-bg);color:var(--warn)}
.done-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.done-actions button{min-height:48px;min-width:150px;font-size:16px;border-radius:6px;display:inline-flex;align-items:center;gap:8px;justify-content:center}
.done-screen .receipt-hidden{position:absolute;left:-9999px;top:0}
@media print{.pay-screen,.done-screen>*:not(.receipt-hidden){display:none!important}.done-screen .receipt-hidden{position:static}}
body.pos [hidden],.pay-screen [hidden],.done-screen [hidden]{display:none!important}

.leftpane .quick{margin:8px 8px 0;max-width:none;min-height:44px;justify-content:center;font-size:15px;font-weight:600;background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.leftpane .quick:hover{filter:brightness(.97)}

/* regroupement par famille, grandes barres de défilement, impressions (ticket cadeau, addition) */
.group-title{grid-column:1/-1;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:8px 2px 0}
body.bigscroll *{scrollbar-width:auto}
body.bigscroll ::-webkit-scrollbar{width:22px;height:22px}
body.bigscroll ::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:11px;border:5px solid transparent;background-clip:content-box}
body.bigscroll ::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:content-box}
.print-only{position:absolute;left:-9999px;top:0;width:76mm}
@media print{
  .print-only{left:0}
  #receipt-gift,#bill{position:absolute;left:0;top:0;width:76mm;border:0;padding:0}
  #receipt-gift,#receipt-gift *,#bill,#bill *{visibility:hidden}
  body[data-print=gift] #receipt-gift,body[data-print=gift] #receipt-gift *{visibility:visible}
  body[data-print=gift] #receipt,body[data-print=gift] #receipt *{visibility:hidden}
  body[data-print=bill] #bill,body[data-print=bill] #bill *{visibility:visible}
  body[data-print=bill] #receipt,body[data-print=bill] #receipt *{visibility:hidden}
}

/* =====================================================================================================
   Page Paramètres (disposition Odoo : liste à gauche, blocs à deux colonnes)
   ===================================================================================================== */
body.settingspage{height:auto;min-height:100%;background:var(--bg)}
.settingspage .top{gap:14px;padding:0 16px}
.settingspage .top strong{font-size:16px;font-weight:700}
.settingspage .top .seg{background:none;padding:0;border-radius:0;gap:2px}
.settingspage .top .seg button{border-radius:0;min-height:56px;padding:0 14px;border:0;border-bottom:3px solid transparent;background:none;box-shadow:none;color:var(--muted);font-weight:500;white-space:nowrap}
.settingspage .top .seg button:hover{background:none;color:var(--text)}
.settingspage .top .seg button[aria-pressed=true]{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.s-bar{display:flex;align-items:center;gap:10px;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border)}
.s-bar #s-search{width:min(520px,100%);min-height:calc(var(--ctl) + 2px)}
.s-dirty{font-size:12px;color:var(--warn)}
.s-layout{display:grid;grid-template-columns:240px 1fr;min-height:calc(100vh - 118px)}
.s-layout.noside{grid-template-columns:1fr}
.s-side{background:var(--surface);border-right:1px solid var(--border);padding:10px 8px;display:flex;flex-direction:column;gap:2px}
.s-item{display:flex;align-items:center;gap:12px;justify-content:flex-start;text-align:left;border:0;box-shadow:none;background:none;min-height:44px;padding:0 12px;border-radius:8px;font-weight:500}
.s-item:hover{background:var(--surface2)}
.s-item[aria-current=true]{background:var(--accent-bg);color:var(--accent-text);font-weight:600}
.s-dot{width:22px;height:22px;border-radius:6px;flex:none}
.s-main{padding:16px 20px 40px;display:flex;flex-direction:column;gap:16px;min-width:0;max-width:1240px}
.s-pane{display:flex;flex-direction:column;gap:16px}
.s-pane[hidden]{display:none}
.s-block{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}
.s-block[hidden]{display:none}
.s-head{margin:0;padding:10px 20px;font-size:14px;font-weight:700;background:var(--surface3)}
.s-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 36px;padding:20px}
.s-cell{border-left:2px solid var(--border);padding-left:14px;display:flex;flex-direction:column;gap:6px;min-width:0}
.s-cell[hidden]{display:none}
.s-title{font-weight:600}
.s-desc{color:var(--muted);font-size:13px;line-height:1.4}
.s-checkrow{display:flex;gap:10px;align-items:center;cursor:pointer}
.s-checkrow input{width:18px;height:18px;min-height:0;flex:none}
.s-checkrow.small{font-weight:500}
.s-list{display:grid;gap:6px;max-height:240px;overflow:auto;padding:4px 0}
.s-extra{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.s-extra[hidden]{display:none}
.s-inline{display:flex;gap:8px;align-items:center}
.s-cell textarea,.s-cell select{width:100%;max-width:340px}
.s-cell .frow input{max-width:340px}
button.link,a.link{align-self:flex-start;border:0;background:none;box-shadow:none;min-height:0;padding:2px 0;color:var(--accent);font-weight:600;text-decoration:none;cursor:pointer}
button.link:hover,a.link:hover{background:none;text-decoration:underline}
.s-users{padding:16px 20px;display:flex;flex-direction:column;gap:14px}
.s-useradd{display:flex;flex-direction:column;gap:8px}
.s-useradd .uadd{display:flex;flex-wrap:wrap;gap:8px}
.s-users tr.off td{opacity:.55}
@media (max-width:900px){.s-layout{grid-template-columns:1fr}.s-side{flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--border)}.s-grid{grid-template-columns:1fr}}
.s-side[hidden]{display:none}

.s-cell.soon{opacity:.6}
.s-badge{margin-left:8px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--surface3);color:var(--muted);vertical-align:middle}
.s-badge.ok{background:#dcfce7;color:#166534}

/* Notes sur les lignes du ticket */
.receipt .note { font-size: .85em; padding-left: 8px; }
.badge.note { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* Paramètres généraux : couleurs des documents, détails */
.s-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.s-swatch { cursor: pointer; display: inline-flex; }
.s-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.s-swatch span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line, #d0d0d0); display: block; }
.s-swatch input:checked + span { outline: 3px solid var(--accent, #2457d6); outline-offset: 2px; }
.s-swatch input:focus-visible + span { outline: 3px solid var(--accent, #2457d6); outline-offset: 2px; }
.s-details summary { cursor: pointer; margin: 6px 0; }


/* ============ Application Ventes (ventes.html) ============ */
.vtpage .vt-nav { gap: 6px; }
.vt-app { font-size: 16px; font-weight: 700; margin-right: 10px; }
.vt-menus { display: flex; gap: 2px; align-items: center; }
.vt-menu { position: relative; }
.vt-top { border: 0; box-shadow: none; background: none; min-height: 56px; padding: 0 14px; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; border-radius: 0; }
.vt-top:hover { background: none; color: var(--text); }
.vt-menu.on > .vt-top { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.vt-drop { position: absolute; top: 52px; left: 0; z-index: 50; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh2, 0 10px 30px rgba(0,0,0,.15)); padding: 6px; display: none; }
.vt-menu[data-open=true] > .vt-drop, .vt-drop.vt-filters:not([hidden]) { display: grid; }
.vt-drop button { text-align: left; border: 0; box-shadow: none; background: none; min-height: 38px; padding: 0 12px; border-radius: 8px; font-weight: 500; color: var(--text); }
.vt-drop button:hover { background: var(--surface3); }
.vt-main { padding: 0 0 32px; }
.vt-cp { padding: 14px 20px 6px; }
.vt-cp-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vt-cp-row h2 { margin: 0; font-size: 18px; font-weight: 600; }
.vt-search { position: relative; flex: 1; min-width: 240px; max-width: 560px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; background: var(--surface); padding: 0 6px 0 14px; min-height: 42px; }
.vt-search input { flex: 1; border: 0; outline: 0; background: none; min-height: 38px; box-shadow: none; padding: 0; min-width: 80px; }
.vt-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.vt-caret { border: 0; box-shadow: none; background: none; min-height: 32px; min-width: 32px; padding: 0; border-radius: 50%; }
.vt-facet { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-bg); color: var(--accent-text); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.vt-facet button { border: 0; box-shadow: none; background: none; min-height: 22px; min-width: 22px; padding: 0; color: inherit; border-radius: 50%; }
.vt-views { margin-left: auto; }
.vt-stats { display: flex; gap: 14px; padding: 8px 20px 12px; flex-wrap: wrap; align-items: stretch; }
.vt-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.vt-chip { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 108px; min-height: 76px; padding: 8px 14px; border-radius: 12px; border: 2px solid transparent; box-shadow: none; }
.vt-chip b { font-size: 22px; line-height: 1; }
.vt-chip span { font-size: 13px; font-weight: 600; }
.vt-chip small { font-size: 11px; opacity: .75; }
.vt-chip.t1 { background: #f3e8ff; color: #6b21a8; } .vt-chip.t2 { background: #ffedd5; color: #9a3412; } .vt-chip.t3 { background: #ccfbf1; color: #0f766e; }
.vt-chip[aria-pressed=true] { border-color: currentColor; }
.vt-period { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 16px; }
.vt-pk { display: grid; gap: 2px; }
.vt-pk span { font-size: 12px; color: var(--muted); font-weight: 600; }
.vt-pk b { font-size: 18px; }
.vt-delta { font-size: 12px; font-weight: 600; } .vt-delta.up { color: #15803d; } .vt-delta.down { color: #b91c1c; } .vt-delta.na { color: var(--muted); font-weight: 500; }
.vt-body { padding: 4px 20px 0; }
.vt-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface3); color: var(--muted); white-space: nowrap; }
.vt-pill.info { background: #dbeafe; color: #1d4ed8; } .vt-pill.ok { background: #dcfce7; color: #15803d; } .vt-pill.warn { background: #fef3c7; color: #b45309; } .vt-pill.bad { background: #fee2e2; color: #b91c1c; }
.vt-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.vt-empty { text-align: center; padding: 56px 16px; display: grid; gap: 10px; justify-items: center; }
.vt-empty-ic { font-size: 56px; opacity: .35; }
.vt-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.vt-col { background: var(--surface3); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.vt-col h4 { margin: 0 0 2px; display: flex; justify-content: space-between; font-size: 14px; }
.vt-count { font-weight: 600; color: var(--muted); }
.vt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; cursor: pointer; }
.vt-card:hover, .vt-card:focus-visible { border-color: var(--accent); outline: none; }
.vt-card-top { display: flex; justify-content: space-between; gap: 8px; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vt-prod { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.vt-prod b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-prod-price { font-size: 16px; }
.vt-prod.off { opacity: .55; }
.vt-embed { padding: 14px 20px; }
@media (max-width: 760px) { .vt-period { margin-left: 0; width: 100%; } .vt-views { margin-left: 0; } .vt-menus { overflow-x: auto; } }

/* Avertissement client dans les documents */
.vt-warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-weight: 600; }
.vt-warn[hidden] { display: none; }


/* Écran de paiement : monnaie à rendre / reste à payer en grand, comme dans le Point de Vente d'Odoo */
.paybig{display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 36px;border-radius:16px}
.paybig-l{font-size:20px;font-weight:600}
.paybig .money{font-size:clamp(48px,7vw,96px);font-weight:500;line-height:1;font-variant-numeric:tabular-nums}
.paybig .m-dec,.paybig .m-cur{opacity:.7}
.paybig .m-cur{font-size:.45em;margin-left:.1em}
.paybig.ok{background:var(--ok-bg);color:var(--ok)}.paybig.due{background:var(--warn-bg);color:var(--warn)}
#pay-invoice-note{display:none}
.pay-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pay-row .btn2.on{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text);font-weight:600}

.ic-send{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E")}

/* ============ Écran « Commandes » de la caisse (même organisation que celui du Point de Vente d'Odoo) ============ */
.ic-info{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-5M12 8h.01'/%3E%3C/svg%3E")}
.ord-screen .pos-left{display:flex;align-items:center;gap:8px}
.ord-tab{background:var(--surface2);border:1px solid var(--border);border-radius:6px}
.ord-tab.on{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text);font-weight:600}
.ord-body{flex:1;min-height:0;display:grid;grid-template-columns:1fr 400px;background:var(--surface)}
.ord-main{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--border)}
.ord-search{display:flex;align-items:center;gap:0;border-bottom:1px solid var(--border);padding:8px;gap:8px}
.ord-search input{flex:1;min-height:42px;font-size:17px}
.ord-search select{min-height:42px;font-weight:600}
.ord-list{flex:1;overflow:auto}
.ord-row{display:grid;grid-template-columns:130px 1fr 150px 130px 44px 44px;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--border);cursor:pointer}
.ord-row:hover,.ord-row:focus-visible{background:var(--surface3);outline:none}
.ord-row.sel{background:var(--accent-bg)}
.ord-date b,.ord-num b{display:block;color:var(--accent-text);font-weight:700}
.ord-date span,.ord-num span{display:block;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ord-total{text-align:right;font-weight:700;color:var(--accent-text);font-variant-numeric:tabular-nums}
.ord-pill{justify-self:center;padding:4px 12px;border-radius:6px;font-size:14px;font-weight:600;background:#4b5563;color:#fff;white-space:nowrap}
.ord-pill.ok{background:#15803d}.ord-pill.ret{background:#b45309}
.ord-ic{border:0;background:transparent;min-height:40px;width:40px;padding:0;display:grid;place-items:center;border-radius:50%}
button.ord-ic:hover{background:var(--surface3)}
.ord-empty{padding:40px;text-align:center;color:var(--muted)}
.ord-side{display:flex;flex-direction:column;min-height:0}
.ord-lines{flex:1;overflow:auto;padding:8px 14px}
.ord-line{display:grid;grid-template-columns:34px 1fr auto;gap:8px;padding:6px 0}
.ord-line em{font-style:normal;font-weight:700}
.ord-tot{padding:10px 14px;border-top:1px solid var(--border)}
.ord-tot-l,.ord-tot-g{display:flex;justify-content:space-between}
.ord-tot-l{color:var(--muted);font-weight:600}
.ord-tot-g{font-size:20px;font-weight:700;margin-top:4px}
.ord-go{margin:10px 14px 14px;min-height:70px;font-size:17.5px}
@media (max-width:900px){.ord-body{grid-template-columns:1fr}.ord-side{display:none}.ord-row{grid-template-columns:100px 1fr 110px 44px 44px}.ord-pill{display:none}}

/* Onglets des tickets ouverts (Ticket 1, Ticket 2…) */
.ticket-tabs{display:flex;align-items:center;gap:6px;overflow-x:auto;min-width:0;scrollbar-width:thin}
.ticket-tabs .ticket-tab{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:6px;background:var(--surface2);flex:none}
.ticket-tabs .ticket-tab.on{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-text);font-weight:600}
.ticket-tabs .tt-name{border:0;background:transparent;box-shadow:none;min-height:47px;padding:0 14px;font-size:17.5px;font-weight:inherit;color:inherit;border-radius:6px}
.ticket-tabs .tt-x{border:0;background:transparent;box-shadow:none;min-height:36px;width:30px;padding:0;margin-right:4px;font-size:20px;color:var(--muted);border-radius:50%}
.ticket-tabs .tt-x:hover{background:var(--surface3);color:var(--danger)}

/* « Envoyer le reçu » par WhatsApp : même fenêtre que dans Odoo (numéro + bouton d'envoi) */
.wa-dlg{width:min(620px,92vw)}
.wa-head{display:flex;justify-content:flex-end}
.wa-row{display:flex;gap:0;margin-top:8px}
.wa-row input{flex:1;min-height:54px;border-radius:8px 0 0 8px;font-size:16px}
.wa-send{min-width:128px;border-radius:0 8px 8px 0}
.ic-receipt{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2zM9 8h6M9 12h6'/%3E%3C/svg%3E")}
.print-choice{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.print-choice .tile-btn{min-height:112px;width:auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:17px;font-weight:600}
.print-choice .tile-btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}


/* ============ Écran d'accueil de la caisse (avant la connexion / après un verrouillage) ============ */
.ic-basket{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h18l-2 10H5zM8 10l4-6 4 6'/%3E%3Ccircle cx='12' cy='15' r='1.2' fill='black'/%3E%3C/svg%3E")}
.splash{position:fixed;inset:0;z-index:300;display:grid;grid-template-rows:auto 1fr auto;justify-items:center;padding:24px;overflow:hidden;
  background:linear-gradient(135deg,#d5d3e4 0%,#e3e1ee 45%,#ecebf2 100%)}
.splash::before,.splash::after{content:"";position:absolute;inset:-30%;background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.35) 40%,rgba(255,255,255,.35) 62%,transparent 62%);pointer-events:none}
.splash::after{background:linear-gradient(115deg,transparent 70%,rgba(255,255,255,.28) 70%,rgba(255,255,255,.28) 100%)}
.sp-top{position:relative;z-index:1;width:100%;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:16px}
.sp-clock{display:flex;align-items:flex-end;gap:10px}
.sp-time{font-size:clamp(28px,4vw,40px);font-weight:400;line-height:1;font-variant-numeric:tabular-nums;color:#1f2430}
.sp-date{display:flex;flex-direction:column;font-size:13px;line-height:1.2;color:#1f2430}
.sp-date span:first-child{text-transform:lowercase}
.sp-name{margin:0;font-size:clamp(22px,3vw,32px);font-weight:700;text-align:center;color:#1f2430}
.sp-logo{justify-self:end;max-height:72px;max-width:min(240px,34vw);object-fit:contain}
.sp-mark{display:flex;align-items:center;gap:10px;font-size:24px;color:var(--accent-text)}
.sp-tile{position:relative;z-index:1;align-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:270px;min-height:194px;border-radius:10px;border:1px solid rgba(31,36,48,.18);background:rgba(255,255,255,.35);backdrop-filter:blur(2px);color:#1f2430;font-size:17px;font-weight:600;box-shadow:none}
.sp-tile .ic{width:56px;height:56px}
.sp-tile:hover,.sp-tile:focus-visible{background:rgba(255,255,255,.6);outline:3px solid var(--accent);outline-offset:2px}
.sp-home{position:relative;z-index:1;align-self:end;min-height:44px;padding:0 20px;border-radius:6px;background:#2b2f3a;border-color:#2b2f3a;color:#fff;font-weight:600}
.sp-home:hover{background:#3a3f4d}
.r-logo{display:block;max-width:70%;max-height:20mm;margin:0 auto 4px;object-fit:contain}
.s-logo{display:block;max-width:240px;max-height:100px;margin-bottom:8px;border:1px dashed var(--border);padding:6px;border-radius:8px;background:#fff}
@media (max-width:640px){.sp-top{grid-template-columns:1fr 1fr}.sp-name{grid-column:1/-1;grid-row:2}}

/* Écran de paiement façon Odoo : total géant en haut (vert quand il est couvert), lignes, puis « Reste à payer / Monnaie » en bas */
.pay-right{justify-content:flex-start;padding:36px 24px 20px;gap:18px}
.pay-total{font-size:clamp(72px,12vw,168px);font-weight:500;color:#1f2430;transition:color .15s}
.pay-total.paid{color:var(--ok)}
.pay-total.paid .m-dec,.pay-total.paid .m-cur{color:var(--ok);opacity:.65}
.paylines{width:min(620px,100%)}
.payline .amt{font-size:30px;font-weight:600}
.payline .amt .m-dec{font-size:.65em;font-weight:500}
.pay-foot{margin-top:auto;width:min(620px,100%);display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid var(--border);padding-top:12px;font-size:24px;font-weight:600}
.pay-foot .money{font-size:40px;font-weight:700}
.pay-foot.ok{color:var(--ok)}.pay-foot.due{color:var(--danger)}.pay-foot.err{color:var(--danger);font-size:18px}
.pay-note{text-align:center}

/* ============ Écran « Commandes » façon Odoo : recherche à facettes, filtre, volet droit (détails, actions, pavé, remboursement) ============ */
.ic-edit{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E")}
.ord-body{grid-template-columns:1fr 430px}
.ord-search{position:relative}
.ord-facet-box{display:inline-flex}
.ord-fwrap{position:relative}
.ord-filter{min-height:42px;padding:0 14px;font-weight:700;border-radius:6px;display:inline-flex;gap:6px;align-items:center}
.ord-menu{position:absolute;right:0;top:46px;z-index:20;min-width:170px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;display:grid}
.ord-menu[hidden],.ord-suggest[hidden]{display:none!important}
.ord-menu button{text-align:left;border:0;box-shadow:none;background:none;min-height:40px;padding:0 12px;border-radius:8px}
.ord-menu button:hover,.ord-suggest button:hover{background:var(--surface3)}
.ord-suggest{position:absolute;left:8px;top:54px;right:8px;z-index:20;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;display:grid;max-width:640px}
.ord-suggest button{text-align:left;border:0;box-shadow:none;background:none;min-height:38px;padding:0 12px;border-radius:8px;font-weight:400}
.ord-suggest b{color:var(--accent-text)}
.ord-pill.inv{background:#0e7490}
.ord-hint{color:var(--danger);text-align:center;padding:10px 16px 0;font-size:14px}
.ord-hint.inv{color:#0e7490;font-weight:600}
.ord-line{cursor:pointer;border-radius:6px;padding:6px 8px;grid-template-columns:34px 1fr auto}
.ord-line.sel{background:var(--accent-bg)}
.ord-refund{grid-column:2/-1;color:var(--danger);font-size:13px;font-weight:600}
.ord-acts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:8px 10px 0}
.ord-act{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:76px;padding:6px;font-weight:600;font-size:15px;border-radius:6px;background:var(--surface2)}
.ord-act .ic{width:22px;height:22px}
.ord-pad{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin:8px 10px 0;background:var(--border);border-radius:6px;overflow:hidden}
.ord-pad .np-key{min-height:52px;border-radius:0;font-size:18px}
.ord-pad .np-key.mode{background:var(--surface3);color:var(--muted);font-weight:600}
.ord-pad .np-key.mode.on{background:var(--accent-bg);color:var(--accent-text);outline:1px solid var(--accent);outline-offset:-1px}
.ord-refund-btn{margin:10px 10px 14px;min-height:66px;font-size:17.5px;font-weight:600;border-radius:6px;background:var(--danger);color:#fff;border-color:var(--danger)}
.ord-refund-btn:disabled{background:var(--surface3);color:var(--muted);border-color:var(--border)}
/* Détails de la commande */
.od-dlg{width:min(640px,94vw);max-height:92vh;overflow:auto}
.od-head{display:flex;justify-content:space-between;align-items:center}.od-head h3{margin:0}
.od-card{background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:12px 14px;margin-top:12px;position:relative}
.od-card h4{margin:0 0 10px;text-align:center;font-size:18px;display:flex;gap:8px;justify-content:center;align-items:center}
.od-card .ord-pill{position:absolute;right:12px;top:12px}
.od-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px}
.od-kv span{display:block;color:var(--muted);font-size:13px}.od-kv b{display:block}
.od-total{text-align:center;color:var(--ok);font-size:28px;font-weight:700;margin-bottom:8px}
.ic-cloud{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19a4.5 4.5 0 0 0 0-9 6 6 0 0 0-11.7-1.5A4.5 4.5 0 0 0 6.5 19z'/%3E%3C/svg%3E")}

/* ============ Application Point de Vente (gestion : pdv.html) ============ */
.pdv-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px;padding-top:8px}
.pdv-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px 18px;display:grid;gap:12px;align-content:start}
.pdv-card h3{margin:0;font-size:18px}
.pdv-card-top{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.pdv-card-top .btn{min-height:48px;padding:0 18px;display:inline-flex;align-items:center;font-weight:600}
.pdv-kvs{display:grid;gap:4px;flex:1;min-width:150px}
.pdv-kv{display:flex;justify-content:space-between;gap:10px;font-size:13px}
.pdv-kv span{color:var(--muted)}
.pdv-kv.big{display:grid;gap:2px;font-size:14px}
.pdv-spark{width:100%;height:80px;color:var(--accent)}
.pdv-card-foot{display:flex;gap:16px;font-size:13px;border-top:1px solid var(--border);padding-top:8px}
.pdv-steps{margin-left:auto;display:flex;gap:4px}
.pdv-step{padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface3);color:var(--muted)}
.pdv-step.on{background:var(--accent);color:#fff}
.pdv-smart{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 14px}
.pdv-sb{display:grid;justify-items:center;gap:2px;min-width:120px;padding:10px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);text-decoration:none}
a.pdv-sb:hover{border-color:var(--accent)}
.pdv-sb b{font-size:20px}
.pdv-group td{background:var(--surface3);font-weight:700}
.od-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin:0 0 12px;display:grid;gap:8px}
.od-card h4{margin:0;font-size:15px}
.od-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 18px}
.od-kv{display:grid;gap:1px;font-size:13px}.od-kv span{color:var(--muted)}
.od-total{text-align:right;font-size:20px;font-weight:700}
.od-dlg{width:min(720px,94vw);max-height:90vh;overflow:auto}
.od-head{display:flex;justify-content:space-between;align-items:center}
.od-head h3{margin:0}
.ord-suggest{top:46px;left:8px;right:8px}
.pdvpage .dtable td.neg,.pdvpage .money.neg{color:#b91c1c}
.pdvpage .money{font-variant-numeric:tabular-nums}.pdvpage .m-dec,.pdvpage .m-cur{opacity:.65}.pdvpage .m-cur{margin-left:.25em;font-size:.85em}
.pdvpage iframe.docframe{width:100%;min-height:60vh;border:1px solid var(--border);border-radius:10px;background:#fff}
/* ============ Application Comptabilité (compta.html) ============ */
.cpt-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:8px 0 14px}
.cpt-kpi{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 16px;display:grid;gap:2px}
.cpt-kpi span{color:var(--muted);font-size:13px;font-weight:600}
.cpt-kpi b{font-size:22px;font-variant-numeric:tabular-nums}
.cptpage .vt-table tfoot tr.neg td{color:#b91c1c}
.cptpage .dtable input:not([type=checkbox]),.cptpage .dtable select{min-height:36px}
.cpt-trial th[colspan]{text-align:center}
@media print{.cptpage .vt-nav,.cptpage .vt-cp button,.cptpage .vt-cp input{display:none!important}}
/* Liens en forme de bouton (applications Point de Vente et Comptabilité) */
.vt-cp a.btn,.pdv-card a.btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);text-decoration:none;font-weight:600}
.vt-cp a.btn:hover,.pdv-card a.btn:hover{background:var(--surface3)}
.vt-cp a.btn.primary,.pdv-card a.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.vt-cp a.btn.primary:hover,.pdv-card a.btn.primary:hover{filter:brightness(1.08)}
/* Comptabilité : rapports (bilan, résultat, totaux) */
.cpt-total td{font-weight:700;background:var(--surface-2,#f4f6f8);border-top:1px solid var(--line,#d9dee3)}
.cpt-sub td{color:var(--muted,#667085);font-size:.92em}
.cpt-pl td.num{width:180px}
.cpt-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.cpt-side{border:1px solid var(--line,#d9dee3);border-radius:12px;padding:12px 14px;background:var(--surface,#fff)}
.cpt-side h3{margin:0 0 8px}
.cpt-sec{margin-bottom:10px}
.cpt-sec-h{display:flex;justify-content:space-between;font-weight:700;padding:6px 0;border-bottom:2px solid var(--line,#d9dee3)}
.cpt-grand{border-top:2px solid var(--line,#d9dee3);border-bottom:0;margin-top:6px}
.cpt-grp-h{display:flex;justify-content:space-between;padding:4px 0 2px;font-weight:600}
.cpt-acc{display:flex;justify-content:space-between;padding:1px 0 1px 16px;color:var(--muted,#667085);font-size:.92em}
.vt-sum{display:flex;justify-content:space-between;padding:10px 4px;font-size:1.05em}
@media (max-width:820px){.cpt-two{grid-template-columns:1fr}}
@media print{.vt-menu,.vt-top,.vt-cp-row button,.vt-cp-row input{display:none!important}.cpt-two{grid-template-columns:1fr 1fr}}
@media print{body.cpt-one .tablewrap:not(.cpt-only),body.cpt-one .vt-sum,body.cpt-one .vt-cp,body.cpt-one .muted.small{display:none!important}.cpt-noprint{display:none!important}}

/* Tableaux de bord : jauges et page « application » */
.gauges{grid-column:1 / -1;display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:14px}
.gauge-row{display:flex;gap:14px;align-items:center}
.gauge-box{position:relative;flex:0 0 190px}
.gauge{width:100%;height:auto;display:block}
.g-band{fill:none;stroke-width:16}
.g-bad{stroke:#f4a5ae}.g-mid{stroke:#fbd78b}.g-ok{stroke:#9ad9b0}
.g-needle{stroke:var(--text,#1f2937);stroke-width:3;stroke-linecap:round}
.g-hub{fill:var(--text,#1f2937)}
.gauge-v{text-align:center;font-weight:700;font-size:1.15rem;margin-top:-4px}
.gauge-note{margin:0;flex:1}
.dsp-wrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}
.dsp-wrap.collapsed{grid-template-columns:44px minmax(0,1fr)}
.dsp-wrap.collapsed .dnav-s,.dsp-wrap.collapsed .dnav-i{display:none}
.dsp-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.dsp-bar .grow{flex:1}
.dsp-period{position:relative}
.dsp-pop{position:absolute;z-index:30;top:calc(100% + 6px);left:0;min-width:270px;background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.14);padding:6px 0}
.dsp-pop[hidden]{display:none}
.dsp-pop button{display:flex;width:100%;justify-content:space-between;text-align:left;border:0;box-shadow:none;background:transparent;border-radius:0;min-height:34px;padding:0 16px}
.dsp-pop button:hover{background:var(--surface3,#eef1f4)}
.dsp-pop hr{border:0;border-top:1px solid var(--line,#d9dee3);margin:6px 0}
.dsp-pop .row{display:flex;gap:8px;align-items:center;padding:4px 16px}
.dsp-pop .row input,.dsp-pop .row select{min-height:32px}
.dsp-star{font-size:1.3rem;line-height:1;min-width:40px}
.dsp-star[aria-pressed=true]{color:#e7a600}
@media (max-width:820px){.dsp-wrap{grid-template-columns:1fr}.gauge-row{flex-direction:column}}
@media print{.dsp-bar,.dnav{display:none!important}.dsp-wrap{grid-template-columns:1fr}}
/* Application Dépenses (notes de frais) */
.dpn-body{margin-top:8px}
.dpn-facets{display:inline-flex;gap:6px;margin-right:6px}
.dpn-facet{min-height:28px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--accent-bg);color:var(--accent-text);border:1px solid transparent}
.dpn-facet[aria-pressed=false]{background:transparent;border-color:var(--line,#d9dee3);color:var(--muted)}
.dpn-views button[aria-pressed=true]{background:var(--accent-bg);color:var(--accent-text)}
.dpn-funnel{display:flex;align-items:center;justify-content:space-around;gap:6px;padding:14px 8px;margin:6px 0 14px;border-bottom:1px solid var(--line,#d9dee3);flex-wrap:wrap}
.dpn-fcell{display:flex;flex-direction:column;align-items:center;gap:2px;background:transparent;border:0;box-shadow:none;border-radius:10px;padding:8px 18px;min-height:0;cursor:pointer}
.dpn-fcell b{font-size:1.35rem}.dpn-fcell span{font-size:13px;font-weight:600}
.dpn-fcell[aria-pressed=true]{background:var(--accent-bg);color:var(--accent-text)}
.dpn-arrow{font-size:1.8rem;color:var(--muted)}
.dpn-av{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#7b2d3b;color:#fff;font-size:11px;font-weight:700;flex:none}
.dpn-emp{display:inline-flex;align-items:center;gap:8px}
.dpn-drop{width:min(520px,100%);border:2px dashed var(--line,#d9dee3);border-radius:14px;padding:34px 16px;display:grid;gap:10px;justify-items:center;cursor:pointer}
.dpn-drop:hover,.dpn-drop.over{border-color:var(--accent);background:var(--accent-bg)}
.dpn-drop-icon{font-size:2.4rem}
.dpn-split{display:grid;grid-template-columns:200px minmax(0,1fr);gap:22px;align-items:start}
.dpn-panel{display:flex;flex-direction:column;gap:6px}
.dpn-check{display:flex;align-items:center;gap:6px;cursor:pointer}
.dpn-kanban{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.dpn-card{display:grid;gap:8px;text-align:left;background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:12px;padding:12px;min-height:0;box-shadow:none}
.dpn-card:hover{border-color:var(--accent)}
.dpn-card-h,.dpn-card-f{display:flex;justify-content:space-between;gap:8px;align-items:center}
.dpn-formhead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:8px 0 12px}
.dpn-actions{display:flex;gap:8px;flex-wrap:wrap}
.dpn-status{display:inline-flex;border:1px solid var(--line,#d9dee3);border-radius:999px;overflow:hidden}
.dpn-status span{padding:6px 16px;font-size:13px;color:var(--muted);background:var(--surface,#fff)}
.dpn-status span+span{border-left:1px solid var(--line,#d9dee3)}
.dpn-status span.on{background:var(--accent-bg);color:var(--accent-text);font-weight:700}
.dpn-form{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.dpn-sheet{background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:14px;padding:20px 22px}
.dpn-lbl{font-weight:700;font-size:13px;display:block;margin-bottom:4px}
.dpn-desc{width:100%;font-size:1.5rem;border:0;border-bottom:1px solid var(--line,#d9dee3);border-radius:0;box-shadow:none;padding:6px 0;background:transparent}
.dpn-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 36px;margin-top:16px}
.dpn-field{display:grid;grid-template-columns:130px minmax(0,1fr);gap:8px;align-items:center;padding:5px 0}
.dpn-flbl{font-size:13px;font-weight:600}
.dpn-amount{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.dpn-radios{display:flex;gap:14px;flex-wrap:wrap}
.dpn-notes textarea{width:100%;margin-top:10px}
.dpn-receipt img{max-width:260px;max-height:200px;border-radius:10px;border:1px solid var(--line,#d9dee3);margin-top:10px;cursor:zoom-in;display:block}
.dpn-chatter{background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:14px;padding:14px}
.dpn-chat-h{font-weight:700;margin-bottom:8px}
.dpn-note-add{display:flex;gap:6px;margin-bottom:10px}.dpn-note-add input{flex:1}
.dpn-msg{display:flex;gap:10px;padding:8px 0;border-top:1px solid var(--line,#d9dee3)}
.dpn-savebar{display:inline-flex;gap:6px;margin-left:auto}
.dpn-bad{color:var(--bad,#b42318);font-weight:600}
.dpn-split-row{display:flex;gap:6px;margin:6px 0}.dpn-split-row input[type=text]:first-child{flex:1}
.dpn-settings{max-width:820px}
.dpn-settings h3{margin:20px 0 6px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.dpn-set{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border:1px solid var(--line,#d9dee3);border-radius:12px;margin:8px 0;background:var(--surface,#fff)}
.dpn-set p{margin:2px 0 0}.dpn-set.off{opacity:.55}
.dpn-chartbox{background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:14px;padding:14px}
.dpn-chart{width:100%;height:auto;display:block}
.dpn-legend{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;margin-top:6px;font-size:13px}
.dpn-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:-1px}
@media (max-width:900px){.dpn-form,.dpn-split{grid-template-columns:1fr}.dpn-grid{grid-template-columns:1fr}}
@media print{.dpn-formhead,.vt-menu{display:none!important}}.dpn-savebar[hidden]{display:none}
.dpn-form input[type=radio],.dpn-form input[type=checkbox],.dpn-set input[type=checkbox],.dpn-check input,.dpn-radios input{width:auto;min-height:0;margin:0;box-shadow:none}
.dpn-radios label,.dpn-field label{display:inline-flex;align-items:center;gap:6px}
.dpn-field>div{min-width:0}
.dpn-field select,.dpn-field input[type=text],.dpn-field input[type=date]{max-width:100%;min-width:0}
.dpn-field>div>select{width:100%}
.dpn-form>*{min-width:0}
.s-checks{display:flex;gap:14px;flex-wrap:wrap}

/* Comptabilité : tableau de bord façon Odoo (chiffres en haut, cartes par journal, histogrammes) */
.od-search{max-width:420px}
.od-facet{display:inline-flex;align-items:center;gap:6px;min-height:26px;padding:0 10px;border-radius:6px;background:var(--accent-bg);color:var(--accent-text);border:0;font-size:12px;font-weight:600;box-shadow:none;margin-right:6px}
.od-facet.off{background:transparent;color:var(--muted);border:1px dashed var(--line,#d9dee3)}
.od-funnel{font-size:9px}
.od-pager{margin-left:auto;font-weight:600;font-size:13px}
.od-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) minmax(240px,1.3fr);gap:14px;margin-bottom:14px}
.od-kpi{display:flex;flex-direction:column;gap:2px;padding:12px 16px;background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:10px;text-decoration:none;color:inherit}
.od-kpi span{font-size:1.05rem;color:var(--muted)}.od-kpi b{font-size:1.1rem}
.od-kpi:hover{border-color:var(--accent)}
.od-kpi.setup{flex-direction:row;align-items:center;justify-content:space-between;border:2px dashed var(--line,#c9ced6);background:transparent}
.od-kpi.setup b{font-size:1.1rem;font-weight:600;max-width:12em}
.od-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch}
.od-card{display:flex;flex-direction:column;gap:10px;background:var(--surface,#fff);border:1px solid var(--line,#d9dee3);border-radius:8px;padding:14px 16px;min-height:270px}
.od-card.accent{border-left:3px solid #8b6fc0}
.od-card h3{margin:0;font-size:1.1rem;color:#0f766e;font-weight:600}
.od-sub{margin:0;font-size:13px;color:var(--muted)}
.od-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.od-row.top{align-items:flex-start}
.od-btns{display:flex;gap:8px}
.od-btn{display:inline-flex;align-items:center;min-height:32px;padding:0 14px;border-radius:6px;border:1px solid var(--line,#c9ced6);background:var(--surface,#fff);color:var(--text);font-weight:600;font-size:13px;text-decoration:none;width:max-content}
.od-btn.primary{background:#714b67;border-color:#714b67;color:#fff}
.od-btn.danger{background:#e5484d;border-color:#e5484d;color:#fff}
.od-stat{display:inline-flex;gap:6px;align-items:baseline;font-size:13px;text-decoration:none;color:var(--text)}
.od-stat .od-n{color:#0f766e;font-weight:600}.od-amt{margin-left:18px}
.od-empty{display:flex;justify-content:center;align-items:center;gap:26px;margin-top:auto;margin-bottom:auto;padding-top:10px}
.od-ill-link{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;color:#0f766e;text-decoration:none;font-size:13px;max-width:190px}
.od-ill-link.off{color:var(--muted);cursor:default}
.od-et{color:var(--muted);font-size:12px}
.od-ill{width:64px;height:64px}
.od-hist{margin-top:auto}
.od-bars{display:flex;align-items:flex-end;gap:6px;height:170px;border-bottom:1px solid var(--line,#d9dee3);padding:0 4px}
.od-bar{flex:1;background:#d8c9dd;border-radius:3px 3px 0 0;min-height:0;display:block}
.od-bar.now{background:#e7dbea}
.od-bar:hover{background:#b99bc5}
.od-xl{display:flex;gap:6px;padding:4px 4px 0;font-size:11px;color:var(--muted)}.od-xl span{flex:1;text-align:center}
.od-stats{display:grid;gap:6px;margin-top:6px;font-size:13px}
.od-dates{display:grid;gap:4px;font-size:13px;min-width:0}
.od-dates>div{display:flex;justify-content:space-between;gap:14px}.od-dates a{color:#0f766e;text-decoration:none}
.od-red{color:#e5484d;font-weight:600}
.od-todo{display:grid;gap:8px;margin-top:6px}
.od-todo-i{display:flex;align-items:center;gap:8px;color:#0f766e;text-decoration:none;font-size:13px}
.od-todo-i i{width:16px;height:16px;border-radius:50%;background:var(--line,#d9dee3);display:inline-block}
.od-todo-i i.on{background:#2fb344}
@media (max-width:1100px){.od-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.od-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){.od-kpis,.od-grid{grid-template-columns:1fr}}
/* Départements : sélecteur de base de données (barre du haut, écran d'accueil et de connexion de la caisse) */
.dept-select{min-height:34px;padding:0 12px;border-radius:999px;font-weight:600;font-size:13px;max-width:240px;background:var(--surface);border:1px solid var(--border-strong);cursor:pointer}
header.top .dept-select{margin:0 8px}
.sp-dept{position:absolute;left:24px;bottom:24px;z-index:2;display:flex;align-items:center;gap:8px}
.auth-head .dept-select{margin:10px 0 0}
/* Utilisateurs : droits dans les autres départements */
.s-access{display:flex;flex-direction:column;gap:4px}
.s-access-row{display:flex;align-items:center;gap:8px;justify-content:space-between}
.s-access-row select{min-height:32px;font-size:13px}
/* Barre du haut façon Odoo (topbar.js) : assistant, discussion, activités, société, menu de l'utilisateur, Ctrl+K */
.top.has-tray #who,.top.has-tray #lock{display:none}
.tb-tray{display:flex;align-items:center;gap:4px;margin-left:auto}
.top.has-tray .tb-tray{margin-left:0}
.tb-ibtn{position:relative;display:inline-grid;place-items:center;width:38px;height:38px;min-height:0;padding:0;border:0;border-radius:10px;background:transparent;color:var(--text);cursor:pointer}
.tb-ibtn:hover,.tb-ibtn[aria-expanded=true]{background:var(--surface3)}
.tb-badge{position:absolute;top:2px;right:0;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;font-style:normal}
.tb-badge[hidden]{display:none}
.tb-company{display:inline-flex;align-items:center;padding:0 10px;height:32px;border-radius:8px;font-weight:700;font-size:13px;letter-spacing:.04em;color:var(--text);text-decoration:none}
a.tb-company:hover{background:var(--surface3)}
.tb-avatar-btn{position:relative;display:inline-grid;place-items:center;width:40px;height:40px;min-height:0;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer}
.tb-avatar{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;color:#fff;font-weight:700;font-size:15px}
.tb-avatar.big{width:64px;height:64px;font-size:30px;border-radius:12px}
.tb-presence{position:absolute;right:2px;bottom:2px;width:11px;height:11px;border-radius:50%;background:var(--presence,#2fa36b);border:2px solid var(--surface)}
.tb-pop{position:fixed;z-index:400;width:min(340px,calc(100vw - 16px));max-height:min(520px,80vh);overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh3);padding:6px 0}
.tb-pop.tb-user{width:min(290px,calc(100vw - 16px))}
.tb-pop-h{display:flex;justify-content:space-between;align-items:center;padding:8px 14px;font-weight:700}
.tb-pop-link{font-weight:500;font-size:13px;color:var(--accent);text-decoration:none}
.tb-pop-foot{display:block;text-align:center;padding:10px;color:var(--accent);font-weight:600;text-decoration:none;border-top:1px solid var(--border);margin-top:4px}
.tb-sub{padding:8px 14px 2px;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.tb-row{display:flex;align-items:center;gap:10px;padding:8px 14px;color:var(--text);text-decoration:none}
.tb-row:hover{background:var(--surface2)}
.tb-row-b{display:flex;flex-direction:column;min-width:0;flex:1}
.tb-row-b b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb-av{display:inline-grid;place-items:center;min-width:38px;height:32px;padding:0 6px;border-radius:8px;background:var(--accent-bg);color:var(--accent-text);font-weight:700;font-size:12px}
.tb-av.late{background:var(--danger-bg);color:var(--danger)}
.tb-dot{width:9px;height:9px;border-radius:50%;background:var(--accent)}
.tb-empty{padding:18px 14px;text-align:center;color:var(--muted)}
.tb-user-h{display:flex;gap:10px;align-items:center;padding:8px 14px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}
.tb-item{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;min-height:36px;padding:6px 14px;border:0;background:transparent;text-align:left;cursor:pointer;border-radius:0}
.tb-item:hover,.tb-sublist button:hover{background:var(--surface2)}
.tb-item kbd,.tb-keys kbd{font:600 11px/1 inherit;padding:3px 6px;border:1px solid var(--border-strong);border-bottom-width:2px;border-radius:5px;background:var(--surface2);color:var(--muted)}
.tb-sublist{padding:2px 0 4px 18px}
.tb-sublist button{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:4px 14px;border:0;background:transparent;text-align:left;cursor:pointer;border-radius:0}
.tb-sublist button.on{font-weight:700}
.tb-led{display:inline-block;width:10px;height:10px;border-radius:50%}
.tb-st{display:inline-flex;align-items:center;gap:8px}
.tb-hr{border:0;border-top:1px solid var(--border);margin:6px 0}
/* assistant */
.tb-ai{position:fixed;right:16px;bottom:16px;z-index:410;width:min(380px,calc(100vw - 32px));height:min(520px,calc(100vh - 90px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--sh3);overflow:hidden}
.tb-ai-head{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border)}
.tb-x{min-height:0;width:30px;height:30px;padding:0;border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;border-radius:8px}
.tb-x:hover{background:var(--surface3)}
.tb-ai-log{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
.tb-ai-msg{max-width:90%;padding:8px 12px;border-radius:12px;line-height:1.4;font-size:14px}
.tb-ai-msg.bot{background:var(--surface2);border:1px solid var(--border);align-self:flex-start}
.tb-ai-msg.me{background:var(--accent);color:#fff;align-self:flex-end}
.tb-ai-link{color:var(--accent);font-weight:600}
.tb-ai-sugg{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px}
.tb-ai-sugg button{min-height:30px;padding:0 10px;border-radius:999px;font-size:13px}
.tb-ai-in{padding:8px 12px 12px}.tb-ai-in input{width:100%}
/* fenêtres : préférences, aide, recherche */
dialog.tb-dlg{border:0;padding:0;border-radius:14px;background:var(--surface);color:var(--text);box-shadow:var(--sh3);width:min(640px,calc(100vw - 24px));max-height:calc(100vh - 40px)}
dialog.tb-dlg::backdrop{background:rgba(15,20,30,.45)}
.tb-dlg-in{display:flex;flex-direction:column;max-height:calc(100vh - 40px)}
.tb-dlg-in.narrow{width:100%}
.tb-dlg-h{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--border)}.tb-dlg-h h3{margin:0}
.tb-dlg-f{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--border)}
.tb-pref-head{display:flex;gap:16px;align-items:center;padding:16px 18px}
.tb-tabs{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid var(--border)}
.tb-tabs button{min-height:38px;padding:0 14px;border:0;border-bottom:2px solid transparent;background:transparent;border-radius:0;cursor:pointer;color:var(--muted);font-weight:600}
.tb-tabs button.on{color:var(--accent);border-bottom-color:var(--accent)}
.tb-pref-body{overflow:auto;padding:14px 18px}
.tb-form{display:flex;flex-direction:column;gap:12px}
.tb-form label,.tb-fld{display:grid;grid-template-columns:140px 1fr;gap:10px;align-items:center}
.tb-form label>span,.tb-fld>span{font-weight:600}
.tb-radios{display:flex;gap:14px;flex-wrap:wrap}.tb-radio{display:inline-flex!important;grid-template-columns:none!important;gap:6px!important;align-items:center}
.tb-acc{display:flex;flex-direction:column;gap:4px}
.tb-err{color:var(--danger);min-height:1.2em;font-size:13px}
.tb-help{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px}
.tb-keys{display:flex;align-items:center;gap:8px}
.tb-dlg-in.pal{padding:0}
.tb-pal-in{width:100%;min-height:52px;border:0;border-bottom:1px solid var(--border);border-radius:14px 14px 0 0;font-size:16px;padding:0 18px}
.tb-pal-list{max-height:min(380px,60vh);overflow:auto;padding:6px}
.tb-pal-list button{display:flex;justify-content:space-between;width:100%;min-height:40px;padding:0 12px;border:0;background:transparent;border-radius:8px;text-align:left;cursor:pointer}
.tb-pal-list button.on{background:var(--accent-bg);color:var(--accent-text)}
@media (max-width:560px){.tb-form label,.tb-fld{grid-template-columns:1fr}.top.has-tray .brand-link+strong{display:none}}.top.has-tray .dept-select{margin-left:auto}
.top.has-tray .tb-tray{margin-left:0}
/* Synthèse du patron (synthese.js) */
.gp-main{display:flex;flex-direction:column;gap:14px;padding-top:14px}
.gp-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:8px}
.gp-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.gp-kpi{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 14px;box-shadow:var(--sh1)}
.gp-kv{font-size:22px;font-weight:700;margin:2px 0}
.gp-table th.gp-n,.gp-table td.gp-n{text-align:right}
.gp-table td.bad{color:var(--danger)}
.gp-table .gp-total{background:var(--surface2)}
.gp-actions td{border-top:1px solid var(--border)}
/* Version web de test : bandeau fixe */
.env-banner{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:9999;padding:3px 16px;background:#b42318;color:#fff;font:700 12px/1.4 system-ui,sans-serif;letter-spacing:.04em;border-radius:8px 8px 0 0;pointer-events:none;opacity:.92}

/* Point de Vente : tous les départements, en direct (pdv.js) */
.pdv-all{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 16px;margin-bottom:14px;background:var(--accent-bg);color:var(--accent-text);border-radius:12px;font-size:15px}
.pdv-dept{margin-bottom:26px}
.pdv-dept>h2{margin:0 0 10px;font-size:20px}
.pdv-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:14px}
.pdv-kpi{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px 14px;box-shadow:var(--sh1)}
.pdv-kpi-v{font-size:20px;font-weight:700;margin:2px 0}
.pdv-lists{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:14px}
.pdv-list{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 14px}
.pdv-list h4{margin:0 0 8px;font-size:14px}
.pdv-list ol{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.pdv-list li{display:flex;align-items:baseline;gap:8px}
.pdv-li-n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdv-unsold{margin:0 0 8px}
/* Installer un poste (version web) */
.s-dl{display:flex;flex-direction:column;gap:8px}.s-dl-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.s-copy{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.s-copy code{padding:6px 10px;background:var(--surface2);border:1px solid var(--border);border-radius:8px;font-size:14px;word-break:break-all}
.s-gen{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.s-code-out{display:flex;flex-direction:column;gap:6px}.s-code{font:700 26px/1.2 ui-monospace,Consolas,monospace;letter-spacing:.08em;padding:8px 14px;background:var(--accent-bg);color:var(--accent-text);border-radius:10px}
/* Tickets imprimés : texte plus grand et plus gras (papier thermique 80 mm), lisible d'un coup d'œil */
@media print{
  #receipt,#receipt-gift,#bill{font-size:17px!important;line-height:1.32!important;font-weight:600!important;color:#000!important}
  #receipt .b,#receipt-gift .b,#bill .b{font-size:1.22em!important;font-weight:800!important}
  #receipt hr,#receipt-gift hr,#bill hr{border-top:2px dashed #000!important;margin:8px 0!important}
  #receipt .l,#receipt-gift .l,#bill .l{gap:10px}
  #receipt .note,#bill .note{font-size:.9em}
}
/* Gestion globale (tous les départements) */
.gl-title{grid-column:1/-1;margin:18px 0 4px;padding:8px 14px;border-radius:10px;background:var(--accent-bg);color:var(--accent-text);font-size:16px}
.gl-title.cur{box-shadow:inset 3px 0 0 var(--accent)}
.dsp-scope{min-height:34px;border-radius:999px;padding:0 12px;font-weight:600;margin-left:8px}
/* Achats : « + Nouvel article », lecture de facture par l'IA */
.finder{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}.finder input{flex:1;min-width:220px}.finder .hits{flex-basis:100%}
.scan-bar{height:6px;border-radius:3px;background:linear-gradient(90deg,var(--accent) 0 30%,var(--accent-bg) 30% 100%);background-size:200% 100%;animation:scanbar 1.2s linear infinite}
@keyframes scanbar{from{background-position:200% 0}to{background-position:-200% 0}}
.scan-new{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}.scan-new input{flex:1;min-width:160px}
.scan-pay input{min-height:var(--ctl)}
/* Connexion de l'ERP : sobre et professionnelle */
.auth-logo{display:block;max-height:64px;max-width:220px;margin:0 auto 8px;object-fit:contain}
/* Accueil de l'ERP : vue d'ensemble de tous les départements */
.gl-over{max-width:1180px;margin:0 auto 18px;padding:0 4px}
.gl-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:10px}.gl-head h2{margin:0}.gl-link{margin-left:auto;font-weight:600;color:var(--accent);text-decoration:none}
.gl-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.gl-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px 16px;box-shadow:var(--sh1);display:flex;flex-direction:column;gap:6px}.gl-card h3{margin:0;font-size:16px}
.gl-big{font-size:26px;font-weight:700}
.gl-postes{display:flex;flex-direction:column;gap:6px;margin-top:6px}.gl-poste{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 10px;background:var(--surface2);border-radius:10px;font-size:14px}
.gl-foot{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap}
.gl-wrap{grid-column:1/-1;min-width:0}

/* Remboursement façon Odoo (depuis Commandes) */
.rf-title{font-weight:600;padding:4px 2px 8px;color:var(--muted)}
.rf-lines{width:min(620px,100%);display:flex;flex-direction:column;gap:6px}
.rf-line{display:grid;grid-template-columns:56px 1fr auto;gap:10px;padding:10px 12px;background:var(--surface);border:1px solid var(--border,#ddd);border-radius:6px}
.rf-line em{font-style:normal;font-weight:600;color:var(--danger,#b42318)}
.pay-foot .primary{margin-left:8px}
.pay-right .pay-total{font-size:clamp(48px,8vw,110px);white-space:nowrap}

/* Notes façon Odoo */
.note-tags{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.note-tag{padding:2px 10px;min-height:0;font-size:12px;border-radius:4px;box-shadow:none;border:1px solid transparent}
.note-tag.red{background:#f8c9cc}.note-tag.orange{background:#f9d3b0}.note-tag.yellow{background:#fbe9a2}.note-tag.blue{background:#bcd6f5}
.note-ta{width:100%;resize:vertical;font:inherit;padding:8px;border:1px solid var(--border,#ccc);border-radius:6px;background:var(--surface)}

/* Choix du client façon Odoo */
.cl-dlg{width:min(900px,96vw);max-height:90vh;display:flex;flex-direction:column;gap:10px}
.cl-head{display:flex;align-items:center;gap:12px}.cl-head h3{margin:0;flex:1}.cl-head input{width:300px}
.cl-list{overflow:auto;flex:1;min-height:240px;border-top:1px solid var(--border,#ddd)}
.cl-row{position:relative;display:grid;grid-template-columns:1.4fr 1fr auto auto;gap:12px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border,#ddd);cursor:pointer}
.cl-row:hover,.cl-row.sel{background:var(--accent-bg)}.cl-row.sel b{color:var(--accent)}
.cl-desel{box-shadow:none;font-size:12px;min-height:34px;background:transparent}
.cl-dots{min-width:40px;min-height:34px}
.cl-menu{position:absolute;right:12px;top:calc(100% - 4px);z-index:5;background:var(--surface);border:1px solid var(--border,#ddd);border-radius:6px;box-shadow:0 6px 20px rgba(0,0,0,.18);display:flex;flex-direction:column;min-width:190px}
.cl-menu button{text-align:left;border:0;box-shadow:none;border-radius:0;background:transparent;min-height:36px}
.cl-ignore{width:100%;min-height:44px}
.cl-dlg{width:min(720px,calc(100vw - 80px));min-width:0;box-sizing:border-box;overflow-x:hidden}
.cl-head input{width:auto;flex:1;min-width:0}
.cl-row{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto}
.actionrow{flex-wrap:nowrap;gap:6px}
.actionrow .btn2{min-width:0;flex:0 1 auto}
.actionrow .btn2.icon{flex:none}
#client-label{display:inline-block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}

/* ---------- application Inventaire (stock.html) ---------- */
a.st-kpi{display:block;color:var(--text);text-decoration:none}
a.st-kpi:hover{border-color:var(--accent)}
.st-kpi.warn .pdv-kpi-v{color:#b45309}
.st-kpi.bad .pdv-kpi-v{color:#b91c1c}
.st-card{border-left:4px solid var(--accent)}
.st-card.st-receipts{border-left-color:#4f46e5}.st-card.st-receipts .st-spark{color:#4f46e5}
.st-card.st-deliveries{border-left-color:#0d9488}.st-card.st-deliveries .st-spark{color:#0d9488}
.st-card.st-pos{border-left-color:#e8590c}.st-card.st-pos .st-spark{color:#e8590c}
.st-card.st-returns{border-left-color:#b91c1c}.st-card.st-returns .st-spark{color:#b91c1c}
.st-card.st-counts{border-left-color:#d97706}.st-card.st-counts .st-spark{color:#d97706}
.st-card.st-adjust{border-left-color:#64748b}.st-card.st-adjust .st-spark{color:#64748b}
.st-card .pdv-card-top button{min-height:44px;padding:0 18px;font-weight:600}
.st-spark{height:56px}
.st-late b{color:#b91c1c}
.st-flowbox{margin-top:16px}
.st-legend{display:flex;gap:16px;font-size:12px;color:var(--muted);margin-bottom:6px}
.st-legend span::before{content:"";display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px}
.st-legend .in::before{background:#16a34a}.st-legend .out::before{background:#2563eb}
.st-flow{display:grid;grid-template-columns:repeat(14,1fr);gap:6px;align-items:stretch}
.st-flow-day{display:grid;grid-template-rows:70px 70px auto;justify-items:center;font-size:11px;color:var(--muted)}
.st-flow-up,.st-flow-down{width:70%;max-width:34px;display:flex}
.st-flow-up{align-items:flex-end;border-bottom:1px solid var(--border)}
.st-flow-up i{width:100%;background:#16a34a;border-radius:3px 3px 0 0;min-height:0}
.st-flow-down i{width:100%;background:#2563eb;border-radius:0 0 3px 3px}
.st-q.in{color:#15803d;font-weight:600}.st-q.out{color:#1d4ed8;font-weight:600}
.st-foot{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;padding:10px 4px;font-size:13px;color:var(--muted)}
.st-foot b{color:var(--text)}
.st-date{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.st-date input{min-height:36px}
.st-dlg .pdv-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
.st-dlg .pdv-kpi-v{font-size:17px}
.st-dlg-table{max-height:44vh;overflow:auto}
.stockpage .vt-cp .chips{margin-top:10px}.st-pick{display:grid;gap:4px;margin-top:8px;max-height:240px;overflow:auto}
.st-pick button{display:grid;justify-items:start;gap:1px;text-align:left;min-height:44px;padding:6px 12px;box-shadow:none}
.st-group{margin-bottom:22px}
.st-group-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:8px}
.st-group-head h3{margin:0;font-size:17px;display:flex;align-items:center;gap:8px}
.st-qin{width:84px;min-height:36px;text-align:right;font-variant-numeric:tabular-nums}.linklike{background:none;border:0;box-shadow:none;padding:0;min-height:0;color:var(--accent);text-decoration:underline;cursor:pointer;font:inherit}
.st-fromto{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.st-fromto label{display:grid;gap:4px;font-size:13px;color:var(--muted);flex:1;min-width:160px}
.st-fromto>span{font-size:20px;padding-bottom:8px;color:var(--muted)}
.st-card .pdv-card-foot button{min-height:38px}

/* ---------- CRM : tableau des demandes ---------- */
.crm-board{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:12px;margin-top:12px;align-items:start}
.crm-col{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:10px;display:flex;flex-direction:column;gap:8px;min-height:140px}
.crm-col h3{margin:0 0 2px;font-size:14px;display:flex;align-items:center;gap:8px}
.crm-card{display:flex;flex-direction:column;gap:4px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px;box-shadow:var(--sh1);cursor:pointer;height:auto;min-height:0}
.crm-card:hover{border-color:var(--accent);box-shadow:var(--sh2)}
.crm-req{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);font-weight:400}
.crm-meta{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;font-size:12.5px}
.crm-follow{padding:1px 8px;border-radius:999px;font-weight:600}
.crm-follow.later{background:var(--ok-bg);color:var(--ok)}
.crm-follow.today{background:var(--warn-bg);color:var(--warn)}
.crm-follow.late{background:var(--danger-bg);color:var(--danger)}
dialog:has(.crm-dlg){max-width:min(1000px,96vw)}
.crm-dlg{min-width:0}.crm-dlg textarea,.crm-dlg input{min-width:0}
.crm-dlg table.items{width:100%}
.crm-dlg table.items td,.crm-dlg table.items th{padding:6px 8px;vertical-align:middle}
@media (max-width:1100px){.crm-board{grid-template-columns:repeat(2,minmax(220px,1fr))}}
@media (max-width:600px){.crm-board{grid-template-columns:1fr}}
/* =====================================================================================================
   TÉLÉPHONE (écrans de 760 px et moins) : l'ERP complet dans l'application Android.
   Tableaux défilants (enveloppe posée par phone.js), menus en volet, boîtes de dialogue pleine largeur, caisse en deux volets Articles / Ticket.
   ===================================================================================================== */
.scrollx{max-width:100%}
.pos-bar{display:none}
@media (max-width:760px){
  html{-webkit-text-size-adjust:100%}
  button,select,input:not([type=checkbox]):not([type=radio]){min-height:42px}
  dialog{max-width:96vw}
  dialog:has(.dlg.wide),dialog:has(.crm-dlg){max-width:96vw}
  .dlg{padding:16px}
  .dlg .actions{flex-wrap:wrap}
  .dlg .actions>button{flex:1 1 auto}
  .toolbar>input[type=search],.toolbar>.searchbox{flex:1 1 100%;min-width:0}
  .vt-main,main.admin{padding-left:10px;padding-right:10px}
  /* tableaux : défilement horizontal au doigt, colonnes à largeur lisible */
  .scrollx{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--radius)}
  .scrollx>table{min-width:600px}
  .tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  /* barres de menus des applications : une ligne qui défile, menus déroulants en volet plein écran */
  .vt-nav{flex-wrap:wrap;gap:6px}
  .vt-menus{order:9;flex-basis:100%;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .vt-menus::-webkit-scrollbar{display:none}
  .vt-menu .vt-drop{position:fixed;left:8px;right:8px;top:118px;max-height:68dvh;overflow:auto;z-index:70;box-shadow:var(--sh3)}
  .vt-period,.vt-views{width:100%;margin-left:0}
  .fgrid,.od-grid,.cpt-two{grid-template-columns:1fr}

  /* ---------- Point de Vente (caisse) : deux volets, on bascule avec la barre du bas ---------- */
  body.pos{--left-w:100vw;display:flex;flex-direction:column;height:100dvh}
  .pos-top{height:auto;flex-direction:column;align-items:stretch;gap:6px;padding:6px 8px}
  .pos-top .pos-left,.pos-top .pos-right{width:100%;gap:6px}
  .pos-top .pos-left{overflow-x:auto;scrollbar-width:none}
  .pos-top .pos-left::-webkit-scrollbar{display:none}
  .pos-top button{min-height:44px;font-size:15px;padding:0 10px}
  .pos-top .sq{width:44px}
  .pos-top .ghost{width:44px}
  .pos-right .searchbox{flex:1;width:auto;min-width:0}
  .pos-top #poste,.pos-top #sync-chip,.pos-top .hint,.pos-top #btn-drawer{display:none}
  .ticket-tab{min-height:44px;padding:0 12px;font-size:15px}
  .pos-main{flex-direction:column}
  .leftpane,.rightpane{width:100%;flex:1;min-height:0;border-right:0}
  body.pos[data-pane="items"] .leftpane{display:none}
  body.pos[data-pane="ticket"] .rightpane{display:none}
  .rightpane .keys{display:none}
  .category-list,.product-list{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
  .pos-bar{display:grid;grid-template-columns:1fr 1.5fr;gap:8px;padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));flex:none;background:var(--surface);border-top:1px solid var(--border)}
  .pos-bar button{min-height:52px;font-size:16px;font-weight:600;border-radius:10px}
  .pos-bar button[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}
  .leftpane .numpad button{min-height:44px}
  /* écran de paiement et reçu */
  .pay-body{flex-direction:column;overflow:auto}
  .pay-left{width:100%;border-right:0;flex:none}
  .pay-right{padding:12px;justify-content:flex-start}
  .pay-total{font-size:clamp(46px,17vw,96px)}
  .method{min-height:54px;height:54px;font-size:16px}
  .pay-actions button{min-height:56px;height:56px}
  .payline{min-height:56px}
  .done-amount{font-size:clamp(60px,22vw,130px)}
  .done-title{font-size:24px}
  .done-actions button{min-width:130px}
  .tiles{grid-template-columns:repeat(2,1fr)}
}@media (max-width:760px){
  /* tableaux de bord : la liste des tableaux défile au doigt sans élargir la page (une piste de grille ne rétrécit pas sous son contenu sans minmax(0,…)) */
  .dsp-wrap,.dsp-wrap.collapsed{grid-template-columns:minmax(0,1fr)}
  .dnav{min-width:0;max-width:100%}
  .dmain,.dbody{min-width:0}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dsp-bar{gap:8px}
}@media (max-width:760px){
  .od-kpis,.od-grid{grid-template-columns:minmax(0,1fr)}
  .od-card{min-width:0;max-width:100%}
  .cptpage .vt-main,.cptpage main{min-width:0}
}@media (max-width:760px){
  .od-xl{min-width:0;max-width:100%}.od-xl span{min-width:0;overflow:hidden}
}@media (max-width:760px){
  /* paiement : le total et les lignes de paiement d'abord, puis les modes, le pavé et les boutons (collés en bas) */
  .pay-right{order:-1;padding:10px 12px 4px;gap:8px}
  .pay-actions{position:sticky;bottom:0;z-index:2;background:var(--surface);padding-top:8px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
  .pay-left .numpad button{min-height:44px}
}/* aides de l'écran des articles : cachées sur grand écran, montrées sur téléphone */
.pt .pm,.pt .pt-minus{display:none}
@media (max-width:760px){
  /* la page ne défile jamais de côté (sinon le clavier fait glisser les boîtes de dialogue hors de l'écran) */
  html,body{overflow-x:hidden;max-width:100%}
  dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);margin:auto}
  .dlg .row{grid-template-columns:minmax(0,96px) minmax(0,1fr)}
  /* familles : UNE rangée qui défile (194 familles en grille cachaient tous les articles), puis les articles en lignes */
  .category-list{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;grid-template-columns:none}
  .category-list::-webkit-scrollbar{display:none}
  .category-list .ct{flex:none;min-height:40px;height:40px;padding:0 12px;white-space:nowrap}
  .rightpane{overflow:hidden}
  .product-list{grid-template-columns:1fr;gap:6px;overflow:auto;-webkit-overflow-scrolling:touch}
  .pt{height:auto;min-height:62px;justify-content:flex-start;gap:8px;text-align:left;padding:6px 10px 6px 12px;border:1px solid var(--border)!important;border-left:5px solid var(--cat)!important}
  .pt .pn{flex:1;min-width:0;padding:0;font-size:15px;-webkit-line-clamp:2}
  .pt .pm{display:flex;flex-direction:column;align-items:flex-end;font-size:12.5px;color:var(--muted);white-space:nowrap}
  .pt .pm b{color:var(--text);font-size:14px}
  .pt .qb{position:static;flex:none;min-width:28px;height:28px;font-size:14px}
  .pt .pt-minus{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--surface3);color:var(--text);font-size:22px;font-weight:700}
}/* pavé numérique repliable et boutons − / + des lignes : seulement sur téléphone */
.ic-calc{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2.5' width='14' height='19' rx='2.2'/%3E%3Crect x='8' y='5.5' width='8' height='3.4' rx='.8'/%3E%3Cpath d='M8.5 13h.01M12 13h.01M15.5 13h.01M8.5 16.5h.01M12 16.5h.01M15.5 16.5h.01'/%3E%3C/svg%3E")}
#btn-numpad,.ol .ol-step{display:none}
@media (max-width:760px){
  #btn-numpad{display:inline-flex}
  #btn-numpad[aria-pressed=true]{background:var(--accent-bg);border-color:var(--accent)}
  /* le pavé prend le tiers de l'écran : caché tant qu'on ne le demande pas, pour laisser la place au ticket */
  body.pos:not(.np-open) .leftpane .numpad,body.pos:not(.np-open) .leftpane #btn-quick{display:none}
  .pay .hint,.pos-bar .hint{display:none}
  .ol{align-items:center;padding:8px}
  .ol .ol-step{display:flex;gap:6px;flex:none}
  .ol .ol-step button{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;font-size:20px;font-weight:700;background:var(--surface3);border:0}
  .leftpane .lines{min-height:120px}
}/* impression depuis un NAVIGATEUR (ou le téléphone) : la page n'est jamais coupée à la hauteur de l'écran, et le ticket n'est plus dans un conteneur fixe qui le tronque */
@media print{
  html,body,body.pos{height:auto!important;min-height:0!important;overflow:visible!important}
  .done-screen,.pay-screen{position:static!important;inset:auto!important;display:block!important;height:auto!important;overflow:visible!important}
  .done-screen .receipt-hidden{position:static!important;left:auto!important}
  body *{max-height:none}
  #receipt,#receipt-gift,#bill{position:absolute!important;left:0!important;top:0!important;width:76mm!important}
}/* boîtes « Imprimer » (reçu complet / simplifié) et « Numéro WhatsApp » : centrées, jamais plus larges que l'écran, plus de défilement de côté */
dialog:has(.wa-dlg){max-width:min(620px,94vw);overflow-x:hidden}
.wa-dlg{width:auto;max-width:100%;box-sizing:border-box;min-width:0}
.wa-row input{min-width:0}
.wa-row .wa-send{flex:none}
.print-choice{min-width:0}
.print-choice .tile-btn{max-width:100%;overflow:hidden}
dialog{overflow-x:hidden}
/* Solde du client (caisse : choix du client et écran de paiement) */
.cl-bal{margin-left:auto;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.cl-bal.due{background:#fde8e8;color:#b42318}.cl-bal.adv{background:#e3f4e8;color:#17703a}
.pay-account{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;margin:6px 0;padding:8px 12px;border:1px dashed var(--line,#cfd4dc);border-radius:8px;font-size:14px}
.pay-account .due{color:#b42318;font-weight:700}

.note-warn,.note-ok{border-radius:10px;padding:8px 12px;margin:0 0 10px;font-size:13px}.note-warn{background:#fef3c7;color:#92400e;border:1px solid #fcd34d}.note-ok{background:#dcfce7;color:#166534;border:1px solid #86efac}.note-warn a,.note-ok a{color:inherit;font-weight:600}

/* ---- application Paie (paie.html) ---- */
.paypage .pay-host{padding:0}
.pay-dash{display:flex;flex-direction:column;gap:14px;padding:0 16px 24px}
.pay-month{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:18px 22px}
.pay-month-n{font-size:26px;font-weight:700;text-transform:capitalize}
.pay-h{margin:10px 0 0;font-size:15px;color:var(--danger,#c0392b)}
.pay-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.pay-card{background:var(--surface);border:1px solid var(--border);border-left:5px solid #7c5cc4;border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.pay-card.pay-warning{border-left-color:#e0a030;background:#fff8e6}.pay-card.pay-info{border-left-color:#4a90d9}.pay-card.pay-danger{border-left-color:#d64545;background:#fdecec}
.pay-card-t{font-weight:700}
.pay-bars{display:flex;align-items:flex-end;gap:10px;height:170px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px}
.pay-bar{flex:1;max-width:60px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.pay-bar-fill{width:100%;background:#7c5cc4;border-radius:5px 5px 0 0}
.pay-bar-l{font-size:11px;color:var(--muted)}
.pay-na{padding:28px 20px}
.pay-sets{display:flex;flex-direction:column;gap:18px;padding:0 16px 24px}
.pay-set h3{margin:0 0 8px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--surface3);padding:6px 12px;border-radius:6px}
.pay-set-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 28px}
.pay-cell{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:6px 4px}
.pay-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#7c5cc4}.pay-dot.pay-warning{background:#e0a030}.pay-dot.pay-info{background:#4a90d9}.pay-dot.pay-danger{background:#d64545}
.pyr-total td{font-weight:700;border-top:2px solid var(--border)}
@media (max-width:760px){.pay-set-grid{grid-template-columns:minmax(0,1fr)}.pay-cell{flex-direction:column}}
/* ---- édition boutique : bandeau de démonstration + écran de choix du type de commerce ---- */
.demo-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 14px;padding:12px 16px;border:1px solid #f0c36d;background:#fff6dc;border-radius:10px;font-size:14px}
.demo-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 0}
.demo-type{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);cursor:pointer;font:inherit;color:inherit}
.demo-type[aria-pressed=true]{border-color:#2457d6;box-shadow:0 0 0 2px #2457d633;background:#f2f6ff}
.demo-type strong{font-size:14px}.demo-type span{font-size:12px;color:var(--muted)}
@media (max-width:560px){.demo-types{grid-template-columns:minmax(0,1fr)}}
/* ---- Facturation : tableau de bord ---- */
.bill-dash{display:flex;flex-direction:column;gap:14px;padding:0 16px 24px}
.bill-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.bill-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px}
.bill-card h3{margin:0 0 8px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.bill-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--border);font-size:14px}
.bill-row:last-child{border-bottom:0}
/* ---- Accueil de l'édition Boutique (POS.Offipro) : menu vert, cartes, barre d'état ---- */
body.shophome{background:#f3f7f4}
.sh{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh;color:#102a1f}
.sh-side{background:linear-gradient(180deg,#0e3b2b,#0b2c21);color:#e8f4ec;padding:22px 14px 18px;display:flex;flex-direction:column;gap:18px;position:sticky;top:0;height:100vh}
.sh-brand{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.sh-logo{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;font:800 30px/1 system-ui;color:#fff;background:linear-gradient(135deg,#46c46f,#1d8f4d);box-shadow:0 6px 18px #0006}
.sh-brand strong{font-size:22px;letter-spacing:-.01em;color:#fff}.sh-brand small{font-size:11px;color:#9fd6b3}
.sh-side nav{display:flex;flex-direction:column;gap:2px;overflow:auto;flex:1}
.sh-side nav a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:12px;color:#d7ece0;text-decoration:none;font-size:15px}
.sh-side nav a:hover{background:#ffffff14}.sh-side nav a.on{background:linear-gradient(90deg,#2fa65a,#1f8a4c);color:#fff;font-weight:700;box-shadow:0 4px 14px #0004}
.sh-n-ico .app-icon{width:28px;height:28px;border-radius:9px}.sh-n-ico .app-icon svg{width:16px;height:16px}
.sh-lock{border:1px solid #ffffff33;background:transparent;color:#d7ece0;border-radius:12px;padding:9px;font:inherit;cursor:pointer}.sh-lock:hover{background:#ffffff14}
.sh-main{display:flex;flex-direction:column;min-width:0;padding:0 28px 0}
.sh-top{display:flex;align-items:center;gap:14px;padding:18px 0 6px}
.sh-search{flex:1;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #d6e4db;border-radius:999px;padding:0 18px;height:50px;box-shadow:0 2px 8px #0a3b1f10}
.sh-search span{font-size:20px;color:#334}.sh-search input{flex:1;border:0;outline:0;background:transparent;font:inherit;font-size:15px;min-width:0}
.sh-pill{display:inline-flex;align-items:center;gap:8px;background:#e5f6ea;border:1px solid #bfe3cb;color:#17653a;border-radius:999px;padding:10px 16px;font-weight:700;font-size:14px;white-space:nowrap}
.sh-pill i{font-style:normal;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#2fa65a;color:#fff;font-size:13px}
.sh-pill.off{background:#e5f6ea}
.sh-bell{position:relative;width:46px;height:46px;border-radius:50%;background:#fff;display:grid;place-items:center;text-decoration:none;border:1px solid #d6e4db}
.sh-bell b{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;border-radius:10px;background:#e23d3d;color:#fff;font-size:11px;display:grid;place-items:center;padding:0 5px}
.sh-user{display:flex;align-items:center;gap:10px;padding-left:12px;border-left:1px solid #d6e4db}
.sh-av{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#2fa65a,#0e5a35);color:#fff;display:grid;place-items:center;font-weight:800}
.sh-user strong{display:block;font-size:14px}.sh-user small{color:#5a7466;font-size:12px}
.sh-demo{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:10px 0 0;padding:12px 16px;border:1px solid #f0c36d;background:#fff6dc;border-radius:12px;font-size:14px}
.sh-demo[hidden]{display:none}
.sh-btn{background:#1f8a4c;color:#fff;border:0;border-radius:10px;padding:9px 14px;font:inherit;font-weight:700;cursor:pointer}
.sh-hello{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;padding:20px 0 14px}
.sh-hello h1{margin:0;font-size:34px;letter-spacing:-.02em}.sh-hello h1 em{font-style:normal;color:#1f8a4c}
.sh-hello p{margin:4px 0 0;font-size:17px;color:#2d4a3a}
.sh-clock{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #d6e4db;border-radius:16px;padding:10px 18px;font-weight:700;box-shadow:0 2px 8px #0a3b1f10}
.sh-sep{width:1px;height:22px;background:#c9d9cf}
.sh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px;padding:6px 0 24px;flex:1;align-content:start}
.sh-card{position:relative;display:flex;flex-direction:column;gap:10px;min-height:170px;padding:16px 16px 14px;background:#fff;border:1px solid #dfeae3;border-left:4px solid #2fa65a;border-radius:18px;text-decoration:none;color:inherit;box-shadow:0 6px 18px #0a3b1f12;transition:transform .12s,box-shadow .12s}
.sh-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px #0a3b1f22}
.sh-ico{display:grid;place-items:center;flex:1}
.sh-ico .app-icon{width:84px;height:84px;border-radius:24px;box-shadow:0 10px 22px #0003}.sh-ico .app-icon svg{width:44px;height:44px}
.sh-card-t{display:flex;flex-direction:column;gap:2px;padding-right:44px}.sh-card-t strong{font-size:18px}.sh-card-t span{font-size:13px;color:#5a7466}
.sh-go{position:absolute;right:14px;bottom:14px;width:36px;height:36px;border-radius:50%;background:#e5f6ea;color:#1f8a4c;display:grid;place-items:center;font-weight:800}
.sh-foot{display:flex;align-items:center;gap:26px;flex-wrap:wrap;padding:14px 0 18px;border-top:1px solid #d6e4db;font-size:14px;color:#2d4a3a}
.sh-foot .ok{color:#1f8a4c}.sh-ver{margin-left:auto;color:#5a7466}
@media (max-width:900px){.sh{grid-template-columns:minmax(0,1fr)}.sh-side{display:none}.sh-main{padding:0 14px}.sh-hello h1{font-size:26px}.sh-top{flex-wrap:wrap}.sh-user div{display:none}}
/* ---- mode restaurant / bar : écran Tables, badges d'envoi, pourboire ---- */
.rs-screen{position:fixed;inset:0;z-index:60;background:var(--bg);display:flex;flex-direction:column}
.rs-head{display:flex;align-items:center;gap:12px;padding:14px 18px;background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap}
.rs-head h2{margin:0;font-size:22px}
.rs-grid{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;padding:18px;align-content:start}
.rs-table{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:112px;border:2px solid #cfe5d6;border-radius:16px;background:#f2fbf5;font:inherit;color:inherit;cursor:pointer;padding:10px}
.rs-table strong{font-size:22px}.rs-free{font-size:13px;color:#2a8a4f;font-weight:700}
.rs-table.busy{background:#fff1d9;border-color:#f0b24d}.rs-amt{font-weight:800;font-size:17px}.rs-meta{font-size:12px;color:#7a5a1a}
.rs-table.cur{outline:3px solid #2457d6;outline-offset:2px}
.rs-tips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:6px 0}.rs-tips button{min-height:46px;font-size:15px}
.badge.sent{background:#dcfce7;color:#15803d}.badge.tosend{background:#fef3c7;color:#b45309}
#btn-kitchen.on{background:#f59e0b;color:#fff;border-color:#f59e0b}
#btn-tables{font-weight:700}
/* ---- Thème vert POS.Offipro : toutes les pages de l'édition Boutique (classe ed-shop posée sur <html> par le serveur) ---- */
html.ed-shop{--accent:#1f8a4c;--accent-hover:#17703c;--accent-bg:#e5f6ea;--accent-text:#0e5a35;--ok:#1f8a4c;--ok-bg:#e5f6ea;--bg:#f3f7f4;--surface2:#f6faf7;--surface3:#e9f1ec;--border:#dbe7df;--border-strong:#c3d6ca;--ring:0 0 0 3px rgba(31,138,76,.26)}
html.ed-shop .logo{background:linear-gradient(145deg,#46c46f,#1d8f4d);box-shadow:0 2px 6px rgba(31,138,76,.35)}
html.ed-shop .primary{box-shadow:0 1px 2px rgba(31,138,76,.35)}
html.ed-shop header.top{border-bottom:2px solid #2fa65a33}
html.ed-shop .ct{--cat:#1f8a4c}
html.ed-shop .demo-type[aria-pressed=true]{border-color:#1f8a4c;box-shadow:0 0 0 2px #1f8a4c33;background:#f1faf4}
html.ed-shop .rs-table.cur{outline-color:#1f8a4c}
html.ed-shop .vt-pill.info{background:#e5f6ea;color:#17703c}
html.ed-shop a{color:#17703c}
html.ed-shop a.btn-chip,html.ed-shop a.chip,html.ed-shop a.app,html.ed-shop a.sh-card,html.ed-shop .sh-side a{color:inherit}
html.ed-shop .sh-side nav a{color:#d7ece0}html.ed-shop .sh-side nav a.on{color:#fff}
html.ed-shop[data-theme=dark]{--accent:#58d47f;--accent-hover:#7be39a;--accent-bg:#12301f;--accent-text:#c6f2d4;--ring:0 0 0 3px rgba(88,212,127,.35);--bg:#0b1511;--surface:#101c17;--surface2:#13211b;--surface3:#1a2b23;--border:#21352b;--border-strong:#2e4a3b}
@media (prefers-color-scheme: dark){html.ed-shop:not([data-theme=light]){--accent:#58d47f;--accent-hover:#7be39a;--accent-bg:#12301f;--accent-text:#c6f2d4;--ring:0 0 0 3px rgba(88,212,127,.35);--bg:#0b1511;--surface:#101c17;--surface2:#13211b;--surface3:#1a2b23;--border:#21352b;--border-strong:#2e4a3b}}
html.ed-shop .st-legend .out::before,html.ed-shop .st-flow-down i{background:#e0902a}

/* ---- vignettes des articles (photo ou illustration) ---- */
.pt.has-img{height:158px;min-height:158px;flex-direction:column;align-items:stretch;justify-content:flex-start;overflow:hidden;text-align:left;gap:0}
.pt .pimg{display:block;width:100%;height:98px;flex:none;position:relative;overflow:hidden;background:var(--surface3)}
.pt .pimg img,.pt .pimg svg{width:100%;height:100%;object-fit:cover;display:block}
.pt.out .pimg{filter:grayscale(.85);opacity:.7}
.pt.has-img .pn{padding:6px 10px 0;font-size:13.5px;line-height:1.2;-webkit-line-clamp:2;min-height:2.4em;font-weight:600}
.pt .ppx{padding:2px 10px 0;font-size:13px;font-weight:800;color:var(--accent-text)}
.pt.has-img .qb{top:6px;bottom:auto;right:6px}
@media (max-width:760px){
  .pt.has-img{height:auto;min-height:62px;flex-direction:row;align-items:center;gap:10px;padding:6px 10px 6px 6px}
  .pt .pimg{width:50px;height:50px;border-radius:10px;flex:none}
  .pt.has-img .pn{padding:0;min-height:0;font-size:15px}.pt .ppx{display:none}
}
.photo-row{display:flex;gap:14px;align-items:center}.photo-prev .pimg{display:block;width:92px;height:92px;border-radius:12px;overflow:hidden;border:1px solid var(--border)}.photo-prev img,.photo-prev svg{width:100%;height:100%;object-fit:cover;display:block}.photo-btns{display:flex;flex-direction:column;gap:6px;align-items:flex-start}

/* ---- variantes : badge sur la tuile et sélecteur ---- */
.pt .vbadge{position:absolute;left:6px;top:6px;padding:2px 8px;border-radius:999px;background:#000b;color:#fff;font-size:11px;font-weight:700}
.vr-dlg{max-width:560px}.vr-head{display:flex;gap:12px;align-items:center}.vr-head .pimg{display:block;width:64px;height:64px;border-radius:12px;overflow:hidden;flex:none}.vr-head img,.vr-head svg{width:100%;height:100%;object-fit:cover}
.vr-body{display:flex;flex-direction:column;gap:12px;margin:10px 0}.vr-label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.vr-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.vr-chip{min-width:52px;min-height:44px;border:2px solid var(--border-strong);border-radius:12px;background:var(--surface);font:inherit;font-weight:700;cursor:pointer}
.vr-chip.on{border-color:var(--accent);background:var(--accent-bg);color:var(--accent-text)}.vr-chip.out{text-decoration:line-through;opacity:.6}.vr-chip.none{opacity:.3}
.vr-matrix{border-collapse:collapse;width:100%}.vr-matrix th,.vr-matrix td{border:1px solid var(--border);padding:0;text-align:center}.vr-matrix th{padding:8px 10px;background:var(--surface2);font-size:13px}
.vr-matrix td button{width:100%;min-height:44px;border:0;background:transparent;font:inherit;font-weight:700;cursor:pointer}.vr-matrix td.ok button{color:var(--ok)}.vr-matrix td.out button{color:var(--danger)}.vr-matrix td.on{background:var(--accent-bg);outline:2px solid var(--accent)}.vr-matrix td.none{color:var(--muted)}
.vr-picked{display:flex;gap:8px}.vr-pill{padding:3px 10px;border-radius:999px;background:var(--surface3);font-size:12px}.vr-pill.set{background:var(--accent-bg);color:var(--accent-text);font-weight:700}
.vr-info{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 12px;background:var(--surface2);border-radius:10px;min-height:44px}.vr-price{font-weight:800}.vr-stock{color:var(--ok);font-size:13px}.vr-stock.out{color:var(--danger)}
.vr-foot{display:flex;gap:10px;align-items:center;margin-top:12px;flex-wrap:wrap}.vr-qtywrap{display:flex;align-items:center;gap:8px}.vr-qty{width:70px;text-align:center}