/* Stock du bar — thème « verre de bouteille » : sombre par défaut, clair si le téléphone est en mode clair */
:root {
  color-scheme: dark light;
  --bg: #0e1517;
  --s1: #152022;
  --s2: #1c2a2d;
  --line: #263639;
  --tx: #e8f0ef;
  --mu: #8aa0a1;
  --ac: #6fd6c0;
  --ac-tx: #05211b;
  --red: #ff6b5e;
  --amb: #ffb13b;
  --grn: #5fd38d;
  --red-bg: rgba(255, 107, 94, .14);
  --amb-bg: rgba(255, 177, 59, .14);
  --grn-bg: rgba(95, 211, 141, .12);
  --shadow: 0 -12px 40px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f1f5f4;
    --s1: #ffffff;
    --s2: #e8efed;
    --line: #d5dedb;
    --tx: #12201f;
    --mu: #5b7170;
    --ac: #0f9a82;
    --ac-tx: #ffffff;
    --red: #d6372b;
    --amb: #a65f00;
    --grn: #13794a;
    --red-bg: rgba(214, 55, 43, .1);
    --amb-bg: rgba(166, 95, 0, .12);
    --grn-bg: rgba(19, 121, 74, .1);
    --shadow: 0 -12px 40px rgba(0, 0, 0, .18);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
body.noscroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ---------- structure ---------- */
#view { padding: calc(14px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 8px 2px 16px; }
.top h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.sub { color: var(--mu); font-size: 14px; }
.sec { font-size: 15px; font-weight: 700; margin: 26px 2px 10px; }
.muted { color: var(--mu); }
.pad { padding: 16px; }
.grow { flex: 1; min-width: 0; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--ac); font-weight: 600; padding: 6px 0; }

.banner { position: sticky; top: 0; z-index: 20; background: var(--amb-bg); color: var(--amb); padding: calc(8px + env(safe-area-inset-top)) 16px 8px; font-size: 14px; text-align: center; border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }

.card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; width: 100%; text-align: left; background: none; border: 0; }
.row + .row, .card > .row + form, .card > form + .row { border-top: 1px solid var(--line); }
button.row:active { background: var(--s2); }
.empty { padding: 28px 18px; text-align: center; }
.empty b { display: block; font-size: 18px; margin-bottom: 4px; }

/* ---------- accueil ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.tile { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tile b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--mu); font-size: 13px; }
.tile.warn { background: var(--amb-bg); border-color: transparent; }
.tile.warn b { color: var(--amb); }
.tile.bad { background: var(--red-bg); border-color: transparent; }
.tile.bad b { color: var(--red); }

.alert { position: relative; padding-left: 18px; }
.alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mu); }
.alert.expired::before { background: var(--red); }
.alert.soon::before { background: var(--amb); }
.alert.low::before { background: var(--ac); }
.alert .t { font-weight: 650; }
.alert .d { color: var(--mu); font-size: 14px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; background: var(--s2); color: var(--mu); }
.pill.expired { background: var(--red-bg); color: var(--red); }
.pill.soon { background: var(--amb-bg); color: var(--amb); }
.pill.low { background: var(--grn-bg); color: var(--grn); }
.pill.ok { background: var(--grn-bg); color: var(--grn); }

/* ---------- stock ---------- */
.searchbar { position: relative; margin-bottom: 10px; }
.searchbar svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--mu); }
.searchbar .inp { padding-left: 44px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--s1); font-size: 14.5px; font-weight: 600; }
.chip.on { background: var(--ac); color: var(--ac-tx); border-color: var(--ac); }
.prod .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod .meta { color: var(--mu); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod .qty { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.prod .qty.zero { color: var(--mu); opacity: .5; }
.prod .pills { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.fab { position: fixed; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--ac); color: var(--ac-tx); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); z-index: 10; }
.fab svg { width: 26px; height: 26px; }

/* ---------- navigation ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; background: var(--s1); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12px; font-weight: 600; color: var(--mu); position: relative; }
.nav button svg { width: 24px; height: 24px; }
.nav button.on { color: var(--ac); }
.nav .scanbtn { color: var(--ac-tx); }
.nav .scanbtn span.ico { width: 56px; height: 44px; border-radius: 16px; background: var(--ac); display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.nav .scanbtn.on span.ico { outline: 3px solid var(--bg); }
.nav .scanbtn em { font-style: normal; color: var(--mu); }
.nav .scanbtn.on em { color: var(--ac); }
.nav .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* ---------- formulaires ---------- */
.inp { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font-size: 16px; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mu) 50%), linear-gradient(135deg, var(--mu) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.lab { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 650; }
.lab em { font-weight: 400; font-style: normal; color: var(--mu); margin-left: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--ac); color: var(--ac-tx); font-weight: 700; font-size: 16px; }
.btn.block { display: block; width: 100%; margin-top: 20px; min-height: 52px; }
.btn.ghost { background: var(--s2); color: var(--tx); }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn:disabled { opacity: .55; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--s2); color: var(--tx); flex: none; }
.icon.danger { color: var(--red); }
.icon svg { width: 20px; height: 20px; }
.addrow { gap: 10px; }
.addrow .btn { flex: none; }

.stepper { display: grid; grid-template-columns: 52px 1fr 52px auto; gap: 8px; align-items: stretch; }
.stepper.nofull { grid-template-columns: 52px 1fr 52px; }
.stepper button { border: 0; border-radius: 12px; background: var(--s2); display: grid; place-items: center; min-height: 52px; }
.stepper button.all { padding: 0 14px; font-weight: 650; font-size: 14.5px; }
.stepper svg { width: 22px; height: 22px; }
.stepper .inp { text-align: center; font-size: 24px; font-weight: 800; min-height: 52px; font-variant-numeric: tabular-nums; }

.switch { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 15px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); position: relative; transition: background .15s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mu); transition: transform .15s, background .15s; }
.switch input:checked + .sw { background: var(--ac); border-color: var(--ac); }
.switch input:checked + .sw::after { transform: translateX(20px); background: var(--ac-tx); }
.switch input:focus-visible + .sw { outline: 2px solid var(--ac); outline-offset: 2px; }
.hint { font-size: 13.5px; color: var(--mu); margin-top: 6px; }
details.card summary { padding: 14px; font-weight: 650; cursor: pointer; }
details.card form { padding: 0 14px 16px; }

/* ---------- scan ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--s2); border-radius: 14px; }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: none; font-size: 14px; font-weight: 650; color: var(--mu); padding: 0 4px; }
.seg button.on { background: var(--s1); color: var(--tx); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.scanbox { position: relative; margin-top: 14px; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 56vh; width: 100%; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reticle { position: absolute; left: 12%; right: 12%; top: 32%; bottom: 32%; border-radius: 14px; pointer-events: none; --c: rgba(255, 255, 255, .95); background:
  linear-gradient(var(--c), var(--c)) left top / 26px 3px no-repeat, linear-gradient(var(--c), var(--c)) left top / 3px 26px no-repeat,
  linear-gradient(var(--c), var(--c)) right top / 26px 3px no-repeat, linear-gradient(var(--c), var(--c)) right top / 3px 26px no-repeat,
  linear-gradient(var(--c), var(--c)) left bottom / 26px 3px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 3px 26px no-repeat,
  linear-gradient(var(--c), var(--c)) right bottom / 26px 3px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 3px 26px no-repeat; }
.scanmsg { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; text-align: center; }
.torch { position: absolute; right: 12px; top: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.torch.on { background: var(--amb); color: #000; }
.torch svg { width: 22px; height: 22px; }
.manual { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- fiches (bottom sheets) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .55); animation: fade .15s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--s1); border-radius: 22px 22px 0 0; box-shadow: var(--shadow); padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: rise .2s ease-out; max-width: 640px; margin: 0 auto; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.shead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shead h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--s2); display: grid; place-items: center; }
.x svg { width: 20px; height: 20px; }
.statrow { display: flex; align-items: center; gap: 14px; margin: 14px 0 14px; }
.statrow .big { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.statrow .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sbody { margin-top: 16px; }
.lgroup { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lhead { display: flex; justify-content: space-between; padding: 9px 14px; background: var(--s2); font-weight: 700; font-size: 14.5px; }
.lot { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.lot:first-of-type { border-top: 0; }
.lot .lq { font-weight: 800; min-width: 38px; font-variant-numeric: tabular-nums; }
.lot .lr { margin-left: auto; font-size: 13.5px; color: var(--mu); }
.lot .lr.expired { color: var(--red); font-weight: 650; }
.lot .lr.soon { color: var(--amb); font-weight: 650; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mu); opacity: .5; }
.dot.ok { background: var(--grn); opacity: 1; }
.dot.soon { background: var(--amb); opacity: 1; }
.dot.expired { background: var(--red); opacity: 1; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--s2); }
.pick:has(input:checked) { border-color: var(--ac); background: var(--s1); box-shadow: inset 0 0 0 1px var(--ac); }
.pick input { accent-color: var(--ac); width: 20px; height: 20px; flex: none; }
.pick .pq { font-weight: 800; }
.pick .ps { margin-left: auto; font-size: 13.5px; color: var(--mu); text-align: right; }
.pick .ps .expired { color: var(--red); font-weight: 650; }
.pick .ps .soon { color: var(--amb); font-weight: 650; }
.err { color: var(--red); font-size: 14.5px; min-height: 20px; margin-top: 10px; }
.hist .type { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--s2); }
.hist .type svg { width: 18px; height: 18px; }
.hist .type.add { background: var(--grn-bg); color: var(--grn); }
.hist .type.remove, .hist .type.delete { background: var(--red-bg); color: var(--red); }
.hist .type.move { background: var(--amb-bg); color: var(--amb); }
.hist .t { font-size: 15px; }
.hist .d { font-size: 13px; color: var(--mu); }
.labelbox { background: #fff; color: #000; border-radius: 12px; padding: 16px; text-align: center; }
.labelbox svg { width: 100%; height: auto; display: block; }
.labelbox .ln { font-weight: 800; font-size: 18px; margin-top: 6px; }
.labelbox .lc { font-family: ui-monospace, monospace; letter-spacing: .08em; }

/* ---------- verrouillage / connexion ---------- */
.gate { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.gatebox { width: 100%; max-width: 380px; }
.gatebox .logo { width: 68px; height: 68px; border-radius: 20px; background: var(--ac); color: var(--ac-tx); display: grid; place-items: center; margin-bottom: 18px; }
.gatebox .logo svg { width: 40px; height: 40px; }
.gatebox h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.or { text-align: center; color: var(--mu); margin: 14px 0 0; font-size: 14px; }

/* ---------- messages ---------- */
#toasts { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 12px; background: var(--tx); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); animation: rise .18s ease-out; }
.toast.err { background: var(--red); color: #fff; }
.toast.out { opacity: 0; transition: opacity .35s; }

/* ---------- outils (accueil) ---------- */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tool { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 12px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); text-align: left; touch-action: manipulation; }
.tool:active { background: var(--s2); }
.tool .ti { width: 36px; height: 36px; border-radius: 11px; background: var(--s2); color: var(--ac); display: grid; place-items: center; }
.tool .ti svg { width: 20px; height: 20px; }
.tool b { font-size: 14.5px; font-weight: 700; }
.tool em { position: absolute; top: 8px; right: 8px; min-width: 22px; padding: 0 7px; height: 22px; border-radius: 11px; background: var(--s2); color: var(--mu); font: 700 12.5px/22px var(--font); font-style: normal; text-align: center; }
.tool em.hot { background: var(--amb-bg); color: var(--amb); }

/* ---------- stock : lignes rapides ---------- */
.row.prod { padding: 0; gap: 0; content-visibility: auto; contain-intrinsic-size: auto 74px; }
.pmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: none; border: 0; text-align: left; touch-action: manipulation; }
.pmain:active { background: var(--s2); }
.qk { display: flex; gap: 6px; padding: 0 12px 0 0; flex: none; }
.qk button { width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--s2); display: grid; place-items: center; touch-action: manipulation; }
.qk button:active { background: var(--ac); color: var(--ac-tx); }
.qk svg { width: 22px; height: 22px; }
.row.more { color: var(--ac); font-weight: 650; justify-content: center; }
.undoslot:empty { display: none; }
.undoslot { margin-bottom: 10px; }
.chip.undo { display: inline-flex; align-items: center; gap: 6px; background: var(--s2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.undo svg { width: 18px; height: 18px; flex: none; }
.chips.recents { padding-bottom: 6px; }
.chip.rc { font-weight: 550; min-height: 34px; background: var(--s2); border-color: transparent; }
button, .chip, .seg button { touch-action: manipulation; }

/* ---------- annulation dans les messages ---------- */
.toast.withact { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding-right: 8px; }
.toast .tact { border: 0; border-radius: 9px; background: rgba(127, 127, 127, .25); color: inherit; font-weight: 800; padding: 8px 12px; min-height: 36px; }

/* ---------- quantités rapides ---------- */
.qchips { display: flex; gap: 8px; margin-top: 8px; }
.qc { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--s2); font-weight: 700; font-size: 15px; touch-action: manipulation; }
.qc:active { background: var(--ac); color: var(--ac-tx); }
details.more { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px 14px; }
details.more summary { padding: 13px 0 0; font-weight: 650; cursor: pointer; margin-bottom: 0; }
details.more[open] summary { padding-bottom: 0; }
details.more .lab:first-of-type { margin-top: 12px; }

/* ---------- inventaire, réassort, commande ---------- */
.invhead { margin-bottom: 12px; }
.invtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.invtop .btn { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.invtop .btn svg { width: 20px; height: 20px; }
.bar { height: 8px; border-radius: 4px; background: var(--s2); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ac); border-radius: 4px; transition: width .2s; }
.invrow, .rsrow, .sumrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%; }
.invrow + .invrow, .rsrow + .rsrow, .sumrow + .sumrow { border-top: 1px solid var(--line); }
.invrow .name, .rsrow .name, .sumrow .name { font-weight: 650; line-height: 1.25; }
.invrow .meta, .rsrow .meta, .sumrow .meta { color: var(--mu); font-size: 13.5px; }
.invrow.good { background: var(--grn-bg); }
.invrow.diff { background: var(--amb-bg); }
.invctl { display: flex; align-items: center; gap: 4px; flex: none; }
.invctl button { width: 40px; height: 44px; border: 0; border-radius: 10px; background: var(--s2); display: grid; place-items: center; touch-action: manipulation; }
.invctl button:active { background: var(--ac); color: var(--ac-tx); }
.invctl button svg { width: 20px; height: 20px; }
.invctl .okb { background: var(--ac); color: var(--ac-tx); margin-left: 2px; }
.invctl .inp { width: 58px; min-height: 44px; padding: 4px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.df { font-weight: 800; font-variant-numeric: tabular-nums; }
.df.p { color: var(--grn); }
.df.m { color: var(--red); }
.df.big { font-size: 20px; flex: none; }
.stickybar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 9; display: flex; gap: 10px; margin-top: 16px; padding: 10px 0 2px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.stickybar .btn { min-height: 52px; }
.stickybar .btn.grow { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.stickybar svg { width: 20px; height: 20px; }
.chiplab { flex: none; align-self: center; color: var(--mu); font-size: 14px; padding-right: 2px; }
.ck { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: none; color: transparent; display: grid; place-items: center; touch-action: manipulation; }
.ck.on { background: var(--ac); border-color: var(--ac); color: var(--ac-tx); }
.ck svg { width: 20px; height: 20px; }
.rsrow.off .name, .rsrow.off .meta { opacity: .45; }
.grouphead { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 8px; }
.grouphead b { font-size: 15px; }
textarea.txt { min-height: 180px; resize: vertical; font-family: ui-monospace, monospace; font-size: 14.5px; }
.scanbox.small { aspect-ratio: 4 / 3; max-height: 34vh; margin-top: 12px; }
#invlast .invctl button { width: 46px; }

/* ---------- impression d'étiquette ---------- */
#printarea { display: none; }
@media print {
  body > *:not(#printarea) { display: none !important; }
  #printarea { display: block !important; }
  #printarea .labelbox { width: 80mm; margin: 6mm; border: 1px dashed #999; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
