:root { --canvas: #f4f4f3; --panel-soft: #f8f8f7; --line: #e5e5e3; --radius: 18px; }
.auth-page { min-height: 100vh; min-height: 100dvh; }
.subscription-page { grid-template-columns: minmax(340px, 43%) minmax(0, 1fr); }
.subscription-page .auth-brand { padding: clamp(30px, 4vw, 64px); min-height: 100vh; min-height: 100dvh; }
.subscription-page .auth-form-wrap { padding: clamp(28px, 4vw, 64px); }
.subscription-card { width: min(500px, 100%); }
.subscription-card h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; letter-spacing: -.045em; }
.subscription-card > .subscription-intro { margin: 10px 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.brand-overline { display: block; margin-bottom: 22px; font-size: 10px; font-weight: 750; letter-spacing: .19em; color: #aaa; }
.subscription-page .auth-promise h2 { font-size: clamp(42px, 5.4vw, 76px); line-height: 1.02; }
.subscription-page .auth-promise p { font-size: 15px; max-width: 330px; line-height: 1.7; }
.subscription-page .auth-features { font-size: 12px; }
.subscription-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; background: var(--panel-soft); margin-bottom: 22px; }
.subscription-status svg { width: 14px; height: 14px; flex-shrink: 0; }
.current-plan { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: linear-gradient(135deg, var(--panel), var(--panel-soft)); box-shadow: 0 5px 18px #00000003; }
.current-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.current-plan .eyebrow { font-size: 9px; margin-bottom: 6px; }
.current-plan h2 { font-size: 25px; margin: 0; letter-spacing: -.035em; }
.current-plan-price { text-align: right; font-family: var(--font-mono); font-size: 19px; font-weight: 800; white-space: nowrap; }
.current-plan-price small { display: block; margin-top: 2px; font: 11px var(--font-sans); color: var(--muted); }
.current-plan > p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 14px 0 18px; }
.current-plan-expiry { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 11px; }
.current-plan-expiry > span { color: var(--muted); }
.subscription-card > .subscription-explanation { font-size: 13px; line-height: 1.7; margin: 20px 0; }
.subscription-cta { display: grid; gap: 10px; }
.subscription-cta .button { min-height: 48px; padding: 12px 16px; border-radius: 11px; gap: 9px; font-size: 12px; }
.stripe-payment svg { width: 17px; flex-shrink: 0; }
.stripe-payment svg:last-child { margin-left: auto; }
.subscription-card > .payment-reassurance { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 13px 0 24px; text-align: center; }
.subscription-secondary { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.subscription-secondary .link-button, .subscription-secondary a { font-size: 11px; margin: 0; color: var(--muted); text-decoration: none; }
.subscription-secondary a:hover, .subscription-secondary .link-button:hover { color: var(--ink); text-decoration: underline; }
.app-main { padding: 28px; }
.sidebar { background: radial-gradient(100% 60% at 0 0, #ffffff09, transparent), #101010; }
.sidebar-logo { border-bottom-color: #ffffff12; }
.nav-button { border-radius: 12px; transition: background .15s ease, color .15s ease; }
.page-head { position: relative; padding: 22px 24px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 4px 18px #00000003; gap: 18px; }
.page-head h1 { font-size: clamp(23px, 2.3vw, 32px); letter-spacing: -.045em; line-height: 1.12; }
.page-head p { max-width: 650px; margin-top: 7px; line-height: 1.6; }
.panel, .ticket, .entity-card, .management-kpi, .stat { box-shadow: 0 4px 18px #00000003; }
.section-head, .management-section-hero { gap: 16px; }
.management-section-hero h2, .section-head h2, .panel > h2 { letter-spacing: -.035em; }
.management-tabs { padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); gap: 4px; }
.management-tabs button { border-radius: 9px; min-height: 37px; padding: 9px 15px; }
.management-tabs button.active { background: var(--strong); color: var(--strong-text); box-shadow: 0 2px 6px #00000012; }
.management-quick-card { min-height: 80px; border-radius: 13px; }
.management-quick-card:hover, .entity-card:hover { border-color: #bdbdb8; }
.table-wrap { border-radius: 12px; }
.data-table th { background: var(--panel-soft); padding-block: 14px; }
.data-table td { padding-block: 14px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.entity-card { padding: 19px; }
.modal { border: 1px solid var(--line); border-radius: 20px; }
.modal-head { padding: 23px 24px 18px; }
.modal-body { padding-inline: 24px; }
.modal-actions { padding-inline: 24px; }
.module-selector { border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: var(--panel-soft); }
.module-selector > label { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.module-selector input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #181818; }
.module-selector > label small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 450; }
[data-theme=dark] { --canvas: #111315; --panel-soft: #1c1f22; --line: #303438; }
@media (max-width: 1100px) { .subscription-page { grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); } .app-main { padding: 22px; } }
@media (max-width: 900px) { .app-main { padding: 20px 18px calc(92px + env(safe-area-inset-bottom)); } .page-head { padding: 19px; } }
@media (max-width: 760px) {
  .subscription-page { grid-template-columns: minmax(0, 1fr); }
  .subscription-page .auth-brand { display: none; }
  .subscription-page .auth-form-wrap { min-height: 100vh; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
  .subscription-page .auth-mobile-logo { display: block; margin-bottom: 28px; }
  .subscription-page .auth-mobile-logo img { width: 175px; max-width: 100%; }
  .subscription-card h1 { font-size: 31px; }
  .page-head { align-items: flex-start; }
}
@media (max-width: 430px) {
  .app-main { padding-inline: 12px; }
  .page-head { padding: 17px 15px; margin-bottom: 15px; }
  .page-head h1 { font-size: 25px; }
  .current-plan { padding: 18px; }
  .current-plan-price { font-size: 17px; }
  .subscription-card h1 { font-size: 29px; }
  .modal-head, .modal-body, .modal-actions { padding-inline: 17px; }
  .entity-card { padding: 14px; }
  .management-tabs button { padding-inline: 12px; }
}
@media (max-width: 374px) { .page-head h1 { font-size: 21px; } }
@media (max-width: 350px) { .subscription-page .auth-form-wrap { padding-inline: 16px; } .current-plan-head { align-items: flex-start; flex-direction: column; } .current-plan-price { text-align: left; } }
@media print { .subscription-page { display: none; } .app-main { padding: 0; } }

/* Identité du commerce (4.50.0) : le domaine d'activité en cartes avec un
   pictogramme, les fonctions rangées par thème avec un interrupteur chacune.
   L'accent reste l'encre : une carte choisie et une fonction active passent
   en encre pleine, rien d'autre ne se colore. */
.business-selector { display: grid; gap: 16px; margin: 3px 0 15px; }
.identity-section { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.identity-head { display: flex; align-items: flex-start; gap: 11px; }
.identity-head strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.identity-head p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.identity-step { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--strong); color: var(--strong-text); font-size: 11px; font-weight: 750; }
.business-family { display: grid; gap: 7px; }
.business-family-title, .function-group h4 { margin: 0; font-family: var(--font-serif, inherit); font-style: italic; font-weight: 400; font-size: 15px; color: var(--muted); }
.business-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.business-type { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.business-type:hover { border-color: var(--line-strong, var(--muted-2)); transform: translateY(-1px); }
.business-type input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.business-type:has(input:focus-visible) { box-shadow: var(--ps-ring, 0 0 0 3px rgba(0, 0, 0, .15)); }
.business-type-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--panel-sunk, var(--panel-soft)); color: var(--ink); transition: background .15s var(--ease), color .15s var(--ease); }
.business-type-icon .icon { width: 19px; height: 19px; }
.business-type-text { min-width: 0; padding-right: 16px; }
.business-type-text b { display: block; font-size: 13px; }
.business-type-text small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.38; }
.business-type-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--strong); color: var(--strong-text); opacity: 0; transform: scale(.6); transition: opacity .15s var(--ease), transform .15s var(--ease); }
.business-type-check .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.business-type.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.business-type.active .business-type-icon { background: var(--strong); color: var(--strong-text); }
.business-type.active .business-type-check { opacity: 1; transform: none; }

.function-groups { display: grid; gap: 14px; }
.function-group { display: grid; gap: 7px; }
.function-list { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.function-list > * + * { border-top: 1px solid var(--line-soft); }
.function-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; cursor: pointer; transition: background .12s var(--ease); }
.function-row:hover { background: var(--panel-soft); }
.function-icon { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-sunk, var(--panel-soft)); color: var(--ink); transition: background .15s var(--ease), color .15s var(--ease); }
.function-icon .icon { width: 17px; height: 17px; }
.function-text { flex: 1 1 auto; min-width: 0; }
.function-text b { display: block; font-size: 12.5px; }
.function-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.38; }
.function-switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; }
.function-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.function-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong, #d5d5d5); transition: background .18s var(--ease); pointer-events: none; }
.function-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.function-switch input:checked + i { background: var(--strong); }
.function-switch input:checked + i::after { transform: translateX(16px); background: var(--strong-text); }
.function-switch input:focus-visible + i { box-shadow: var(--ps-ring, 0 0 0 3px rgba(0, 0, 0, .15)); }
.function-row:has(.function-switch input:checked) .function-icon { background: var(--strong); color: var(--strong-text); }
.function-row.locked { cursor: default; }
.function-row.locked:hover { background: transparent; }
.function-lock { color: var(--muted); }
.function-lock .icon { width: 16px; height: 16px; }
.function-extra { display: grid; gap: 10px; margin: 0; padding: 12px 13px 14px 57px; background: var(--panel-soft); }
.function-extra .switch-label { align-items: flex-start; font-size: 12px; color: inherit; }
.function-extra .switch-label input { margin-top: 3px; }
.function-extra .switch-label b, .function-extra .switch-label small { display: block; }
.function-extra .switch-label small { margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.38; }
.function-extra textarea { min-height: 86px; }
.business-selector .hidden { display: none; }
/* Logiciel acheté : le mot au commerce dans sa fiche, la case dans la fiche Abonnement. */
.owned-note { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.owned-note > .icon { flex: 0 0 auto; margin-top: 1px; }
.owned-note b, .owned-note small { display: block; }
.owned-note small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.owned-switch.switch-label { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); font-size: 12px; color: inherit; }
.owned-switch input { margin-top: 3px; }
.owned-switch b, .owned-switch small { display: block; }
.owned-switch small { margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
@media (max-width: 560px) {
  .identity-section { padding: 12px; }
  .business-types { grid-template-columns: 1fr 1fr; }
  .business-type-text small { display: none; }
  .function-extra { padding-left: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .business-type, .business-type-check, .function-switch i, .function-switch i::after { transition: none; }
  .business-type:hover { transform: none; }
}
.business-toggles { display: grid; gap: 8px; }
.business-toggles .switch-label { align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 12px; color: inherit; }
.business-toggles .switch-label input { margin-top: 3px; }
.business-toggles b, .business-toggles small { display: block; }
.business-toggles small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }

/* Cuissons et consignes proposees en cases a cocher. */
.prep-options { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.prep-group { margin-bottom: 4px; }
.prep-group-title { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.prep-option { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 12px; cursor: pointer; }
.prep-option input { accent-color: var(--ink); }
.prep-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.prep-option-price { color: var(--muted); font-weight: 700; font-family: var(--font-mono); }
.rest-service-note { display: block; margin: -2px 0 8px; color: var(--muted); font-size: 11px; }

/* ---- Vente au poids : pesée en caisse, sachets, fiche article ---- */

.weigh-panel { display: grid; gap: 14px; }
.weigh-readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft, var(--panel)); }
.weigh-readout.danger { border-color: var(--danger, #c0392b); }
.weigh-readout > div { display: grid; gap: 4px; }
.weigh-readout span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.weigh-readout strong { font-size: 22px; font-weight: 800; font-family: var(--font-mono); }
.weigh-readout .weigh-amount { font-size: 26px; }
.weigh-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.weigh-key { height: 56px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 20px; font-weight: 800; font-family: var(--font-mono); cursor: pointer; }
.weigh-key:active { background: var(--ink); color: var(--panel); }
.weigh-packs { display: grid; gap: 8px; }
.weigh-packs > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.weigh-pack-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.weigh-pack { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; cursor: pointer; }
.weigh-pack strong { font-size: 13px; font-weight: 800; }
.weigh-pack small { color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.weigh-pack:active { border-color: var(--ink); }

.line-weight { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 11px; font-family: var(--font-mono); cursor: pointer; }
.line-weight strong { font-weight: 800; }

.pack-editor { display: grid; gap: 8px; }
.pack-editor > span { font-size: 12px; font-weight: 800; }
.pack-rows { display: grid; gap: 8px; }
.pack-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pack-row input { width: 100%; }
.button.icon-only { padding: 8px; min-width: 38px; display: grid; place-items: center; }

@media (max-width: 560px) {
  .weigh-readout { grid-template-columns: 1fr 1fr; }
  .weigh-readout .weigh-amount { font-size: 22px; }
  .pack-row { grid-template-columns: 1fr 1fr; }
  .pack-row input:first-child { grid-column: 1 / -1; }
}

/* ---- Tableau cuisine : cinquième colonne « Terminées » ---- */

.rest-board-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rest-column-done { background: var(--panel-soft, var(--panel)); opacity: .9; }
.rest-order.rest-done { border-color: #bfe3cf; }
.rest-order.rest-done h3 { opacity: .8; }

@media (max-width: 1500px) { .rest-board-five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .rest-board-five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px)  { .rest-board-five { grid-template-columns: 1fr; } }

/* ---- Ajouts signalés sur une commande complétée (4.41.0) ---- */

.rest-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--panel); font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.rest-added { background: var(--amber-soft); box-shadow: inset 4px 0 0 var(--amber); }
.rest-order li.rest-added, .rest-order li.rest-less, .rest-order li.rest-removed { padding: 6px 8px; border-radius: 8px; }
.rest-less, .rest-removed { color: var(--muted); }
.rest-removed strong { text-decoration: line-through; }
.rest-less .rest-tag, .rest-removed .rest-tag { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rest-note.rest-added { background: var(--amber-soft); }

/* ---- Écran cuisine simplifié (4.41.0) : une carte par table ---- */

.kds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.kds-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); overflow-wrap: anywhere; }
.kds-card.rest-late { border-top: 4px solid #b87723; }
.kds-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kds-head h2 { margin: 0; font-size: 26px; font-weight: 750; line-height: 1.1; }
.kds-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.kds-age { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kds-card.rest-late .kds-age { color: var(--amber); }
.kds-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.kds-flags .rest-paid { padding: 6px 10px; font-size: 13px; }
.kds-flags .rest-tag { margin-left: 0; padding: 6px 10px; border-radius: 5px; font-size: 12px; }
.rest-paid.part { background: var(--panel-sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.kds-order + .kds-order { padding-top: 12px; border-top: 1px solid var(--line); }
.kds-order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.kds-order ul { list-style: none; margin: 6px 0; padding: 0; }
.kds-order li { margin: 4px 0; padding: 8px 10px; border-radius: 10px; font-size: 18px; line-height: 1.3; }
.kds-order li small { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; }
.kds-order .rest-note { margin: 8px 0 0; font-size: 16px; }
.kds-done { width: 100%; min-height: 64px; border-radius: 14px; font-size: 20px; font-weight: 750; }
.kds-hint { margin-top: -4px; color: var(--muted); font-size: 12px; text-align: center; }
.kds-empty { grid-column: 1 / -1; padding: 60px 0; color: var(--muted); font-size: 18px; text-align: center; }

/* ---- Commandes en cours sous la caisse (4.47.0) ----
 * Sous la grille d'articles. Sur ordinateur, la grille défile et la bande
 * reste en bas du panneau ; les cartes défilent de gauche à droite. */

.orders-strip { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; min-width: 0; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.strip-head { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.strip-count { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.strip-head strong { font-size: 12px; font-weight: 700; line-height: 1.2; }
.strip-head .strip-error { color: var(--amber); font-size: 11px; font-weight: 700; line-height: 1.25; }
.strip-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; scroll-snap-type: x proximity; }
.strip-card { display: grid; grid-template-columns: minmax(0, 1fr) 78px; column-gap: 8px; row-gap: 2px; align-content: start; min-width: 0; padding: 7px 7px 7px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); scroll-snap-align: start; }
.strip-card > :not(.strip-done) { grid-column: 1; min-width: 0; }
.strip-card.rest-late { box-shadow: inset 4px 0 0 #b87723; }
.strip-card.rest-late .kds-age { color: var(--amber); }
.strip-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; }
.strip-card header strong { overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.strip-card .kds-age { font-size: 12px; }
.strip-card ul { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 17px; }
.strip-card li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-card li strong { font-weight: 650; }
.strip-card li small { color: var(--muted); font-size: 12px; font-weight: 600; }
.strip-more { color: var(--muted); font-size: 12px; }
.strip-note { overflow: hidden; margin: 0; padding: 1px 6px; border-radius: 4px; background: rgba(175, 135, 60, .12); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.strip-done { grid-column: 2; grid-row: 1 / span 6; align-self: stretch; min-height: 52px; padding: 0 6px; border-radius: 8px; font-size: 14px; font-weight: 750; }
.strip-empty { align-self: center; margin: 0; color: var(--muted); font-size: 13px; }
.strip-archive { justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; text-align: left; text-decoration: underline; cursor: pointer; }
.archive-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.archive-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.archive-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.archive-row strong small { color: var(--muted); font-size: 12px; font-weight: 600; }
.archive-row > div:first-child > small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.archive-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.archive-actions .button { min-height: 38px; }

/* Sur téléphone et tablette en portrait, la page défile : la bande reste
 * épinglée en bas de l'écran, au-dessus du menu et du ticket. Dès 901 px de
 * large, la caisse tient dans l'écran et la bande reste dans son volet, même sous 400 px de haut (clavier de la
 * tablette ouvert : épinglée, elle couvrait tout l'écran). */
@media (max-width: 900px) {
  .app-shell.has-orders-strip .orders-strip { position: fixed; z-index: 48; left: 236px; right: 0; bottom: 0; margin: 0; padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) 12px; background: var(--panel); box-shadow: 0 -10px 28px rgba(0, 0, 0, .08); }
  .app-shell.has-orders-strip.sidebar-collapsed .orders-strip { left: 72px; }
  .app-shell.has-orders-strip .app-main { padding-bottom: 150px; }
}
@media (max-width: 900px) {
  .app-shell.has-orders-strip .orders-strip, .app-shell.has-orders-strip.sidebar-collapsed .orders-strip { left: 0; bottom: calc(66px + env(safe-area-inset-bottom)); padding-bottom: 8px; padding-left: max(10px, env(safe-area-inset-left)); }
}
@media (max-width: 900px) {
  .app-shell.has-orders-strip .orders-strip, .app-shell.has-orders-strip.sidebar-collapsed .orders-strip { bottom: calc(146px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .archive-row { flex-direction: column; align-items: stretch; }
}

/* ---- Entrée de stock rapide et réception groupée ---- */

.stock-direction { display: flex; gap: 8px; }
.stock-direction .chip { flex: 1; justify-content: center; min-height: 40px; }
.icon-button.stock-plus { border-color: var(--line); }
.icon-button.stock-plus:hover { border-color: var(--ink); }

.receive-lines { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; margin: 12px 0 16px; }
.receive-line { display: grid; grid-template-columns: minmax(0, 1fr) 130px 120px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.receive-line > span:first-child { display: grid; gap: 2px; min-width: 0; }
.receive-line strong { font-size: 13px; font-weight: 700; }
.receive-line small { color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.receive-line input { width: 100%; min-height: 42px; }
.receive-result { color: var(--muted); font-size: 12px; font-weight: 700; font-family: var(--font-mono); text-align: right; }
.receive-result.is-set { color: var(--success, #175534); }

@media (max-width: 620px) {
  .receive-line { grid-template-columns: 1fr auto; }
  .receive-line > span:first-child { grid-column: 1 / -1; }
}

/* ---- Fournisseur sur une entrée de stock ---- */

.inline-field { display: grid; gap: 4px; min-width: 220px; }
.inline-field select { min-height: 40px; }
.inventory-diff-pill { white-space: nowrap; }

/* ---- Vue compacte de la caisse (4.42.0) ----
 * Tous les articles en petites tuiles nom + prix, colorées par catégorie
 * (variables --tile, --tile-bg et --tile-bg-dark posées par le JS). */
.filter-actions { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.view-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.view-toggle .icon { width: 15px; height: 15px; }
.view-toggle.active { border-color: var(--strong); background: var(--strong); color: var(--strong-text); }
/* L'aide du scanner reste en vue compacte et en mosaïque (4.91.0) : masquée, elle faisait remonter « Vue compacte »
 * d'une quarantaine de pixels après le 1er toucher, et le 2e toucher tombait sur un article de la grille. */
.compact-catalog .filter-row { margin: 8px 0; }
.chip-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--tile); vertical-align: 0; }
/* min-content : sans lui, une grille qui déborde ramène chaque rangée à la hauteur minimale
 * des tuiles et le prix sort sous la tuile. */
.product-grid.compact-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-auto-rows: min-content; gap: 6px; }
.compact-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--ink-2); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.compact-section:first-child { margin-top: 0; }
.compact-section i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; background: var(--tile); }
.compact-section small { color: var(--muted); font-weight: 700; }
.compact-tile { min-width: 0; min-height: 46px; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 5px 7px 5px 8px; border: 1px solid transparent; border-left: 5px solid var(--tile); border-radius: 9px; background: var(--tile-bg); color: var(--ink); text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .1s var(--ease), box-shadow .1s var(--ease); }
.compact-tile:hover { box-shadow: 0 6px 14px rgba(0, 0, 0, .1); }
.compact-tile:active { transform: scale(.97); }
.compact-tile:disabled, .compact-tile[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.compact-name { flex: 0 0 auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.compact-price { flex: 0 0 auto; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Tuile d'un pack (4.86.0) : « PACK ×6 » en pastille foncée à la place du stock, ou en gras dans le nom. */
.stock-tag.pack-tag { background: var(--strong); color: var(--strong-text); }
.compact-name b, .mosaic-name b { font-weight: 900; white-space: nowrap; }
:root[data-theme="dark"] .compact-tile { background: var(--tile-bg-dark); color: var(--ink); }
:root[data-theme="dark"] .view-toggle:not(.active) { background: var(--panel); border-color: var(--line); }
/* ---- Vue mosaïque de la caisse (4.74.0) ----
 * Petits carrés collés, photo pleine, nom en bandeau. Le carré tient par ::before plutôt que par aspect-ratio,
 * absent des vieilles tablettes. */
.product-grid.mosaic-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); grid-auto-rows: min-content; gap: 0; }
.mosaic-tile { position: relative; display: block; min-width: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: var(--tile-bg); color: var(--ink); cursor: pointer; touch-action: manipulation; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.mosaic-tile.has-photo { background: #1a1a1a; }
.mosaic-tile::before { content: ""; display: block; padding-top: 100%; }
.mosaic-tile img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mosaic-tile:active { filter: brightness(.8); }
.mosaic-tile:focus-visible { outline: 2px solid var(--strong); outline-offset: 0; box-shadow: 0 0 0 4px var(--strong-text); z-index: 1; }
.mosaic-tile:disabled, .mosaic-tile[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.mosaic-name { position: absolute; left: 0; right: 0; bottom: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: 2px 3px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; text-align: left; overflow-wrap: anywhere; }
.mosaic-name .compact-th { font-size: inherit; opacity: 1; line-height: inherit; }
.mosaic-tile:not(.has-photo) .mosaic-name { top: 50%; bottom: auto; transform: translateY(-50%); -webkit-line-clamp: 4; padding: 0 4px; background: none; color: var(--ink); font-size: 11px; text-align: center; }
.mosaic-count { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: #141414; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
:root[data-theme="dark"] .mosaic-tile:not(.has-photo) { background: var(--tile-bg-dark); }
@media (max-width: 560px) {
  .product-grid.compact-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; }
  .product-grid.mosaic-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
}

/* Couleur d'une catégorie (fenêtre Catégories) */
.category-dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--tile); }
.color-choices { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.color-choices legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 700; }
.color-choices > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.color-choice { position: relative; display: grid; justify-items: center; gap: 4px; padding: 7px 2px 6px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; line-height: 1.2; text-align: center; cursor: pointer; }
.color-choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.color-choice i { width: 26px; height: 26px; border-radius: 50%; background: var(--tile); }
.color-choice.auto i { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--muted); }
.color-choice input:checked + i { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--ink); }
.color-choice input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 5px; }
.color-choices .field-note { display: block; margin-top: 8px; }

/* ---- Menu de gauche repliable (4.42.1) ----
 * Le bouton du haut replie le menu en une bande d'icônes (pastilles gardées),
 * pour laisser la place aux articles et au ticket. Réglage propre à chaque
 * appareil. Sur téléphone, le menu reste la barre du bas : rien ne change. */
.sidebar-logo .logo-mark, .workspace-mark { display: none; }
.sidebar-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; margin: 0 0 12px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 650; cursor: pointer; touch-action: manipulation; }
.sidebar-toggle:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-toggle .icon { flex: 0 0 auto; width: 17px; height: 17px; }
@media (max-width: 900px) {
  .sidebar-toggle { display: none; }
}
@media (min-width: 901px) {
  .app-shell { transition: padding-left .18s ease; }
  .sidebar { transition: width .18s ease, padding .18s ease; }
  .app-shell.sidebar-collapsed { padding-left: 72px; }
  .sidebar-collapsed .sidebar { width: 72px; padding: 18px 10px; }
  .sidebar-collapsed .sidebar-logo.ps-brand { align-items: center; padding: 4px 0 16px; }
  .sidebar-collapsed .sidebar-logo.ps-brand .logo-full, .sidebar-collapsed .sidebar-logo.ps-brand small { display: none; }
  .sidebar-collapsed .sidebar-logo.ps-brand img.logo-mark { display: block; width: 34px; }
  .sidebar-collapsed .sidebar-toggle { justify-content: center; padding: 0; }
  .sidebar-collapsed .sidebar-toggle span, .sidebar-collapsed .nav-button > span:not(.count) { display: none; }
  .sidebar-collapsed .nav-button { justify-content: center; gap: 0; padding: 0; }
  .sidebar-collapsed .nav-button .count { position: absolute; top: 3px; right: 2px; min-width: 18px; margin: 0; padding: 1px 4px; font-size: 9px; }
  .sidebar-collapsed .workspace-card { display: grid; place-items: center; height: 46px; padding: 0; }
  .sidebar-collapsed .workspace-card > :not(.workspace-mark), .sidebar-collapsed .workspace-card.static { display: none; }
  .sidebar-collapsed .workspace-card .workspace-mark { display: block; line-height: 0; }
  .sidebar-collapsed .workspace-mark .icon { width: 18px; height: 18px; }
  .sidebar-collapsed .user-chip { grid-template-columns: 36px; justify-content: center; padding: 5px 0; }
  .sidebar-collapsed .user-chip > :not(.avatar) { display: none; }
}
/* La place gagnée va aux articles et au ticket. */
@media (min-width: 1181px) {
  .sidebar-collapsed .cashier-layout { grid-template-columns: minmax(0, 1fr) 420px; }
}
@media (min-width: 1051px) and (max-width: 1180px) {
  .sidebar-collapsed .cashier-layout { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .sidebar-collapsed .cashier-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .sidebar-collapsed .ticket-panel { position: sticky; }
}

/* Promotion (4.43.0) : prix habituel barré, étiquette de remise en rouge. */
.was-price { color: var(--muted-2); font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }
.sale-badge { display: inline-block; padding: 2px 6px; border-radius: 6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 850; line-height: 1.4; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.price-stack { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.was-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 3px; }
.was-line .was-price { font-size: 11px; }
.compact-price .was-price { margin-right: 4px; font-size: 10px; }
.variant-block-head .variant-price { margin-left: auto; color: var(--ink); font-size: 13px; font-weight: 800; }
.variant-block-head .sale-badge { color: #fff; font-size: 10px; }
.size-chip .chip-price { color: var(--ink); font-size: 10px; font-weight: 700; }
.size-chip .chip-price .was-price { display: block; }
td > .sale-badge, .inventory-mobile-stock .sale-badge, .product-detail-grid .sale-badge, .customer-choice .sale-badge { margin-left: 6px; }
.link-button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
/* Fiche article : prix de vente et prix barré côte à côte, sans étirer le premier. */
.field.field-top { align-content: start; }

/* Vente à crédit (4.44.0) : moyen du règlement choisi d'un toucher, carte
 * « Ventes à crédit à régler » cliquable dans le fichier clients. */
#accountPaymentForm .choice, #collaboratorForm .choice { position: relative; display: block; margin-top: 12px; }
#accountPaymentForm .choice input, #collaboratorForm .choice input { position: absolute; opacity: 0; pointer-events: none; }
/* Sans :has (navigateurs d'avant fin 2022) : une coche sur le moyen choisi. */
#accountPaymentForm .choice input:checked ~ strong::after, #collaboratorForm .choice input:checked ~ strong::after { content: " ✓"; }
#accountPaymentForm .choice:has(input:checked), #collaboratorForm .choice:has(input:checked) { border-color: var(--ink); background: var(--panel-soft); box-shadow: inset 0 0 0 1px var(--ink); }
button.management-kpi { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.management-kpi:hover { border-color: var(--ink); }
/* Logiciel acheté (4.58.1) : cadre doré dans Espaces clients et Gestion › Abonnements, pour les repérer d'un coup d'œil. */
:root .organization-card.owned, :root .subscription-row.owned { border-color: #C9A227; box-shadow: 0 0 0 2px #C9A227, 0 6px 18px rgba(201, 162, 39, .18); }
.subscription-row.owned { margin: 6px 0; padding: 10px 12px; border: 1px solid #C9A227; border-radius: 12px; }
.mini-badge.owned { background: #F6E7B0; color: #7A5C00; }
/* Une caisse par abonnement (5.15.0) : nom des anciens clients en bleu, des nouveaux en rouge (console du propriétaire). */
/* La légende : une phrase par ligne, chacune dans sa couleur. */
.client-legend { display: grid; gap: 2px; margin-top: 10px; }
.client-ancien { color: #1F5FBF; }
.client-nouveau { color: #C62828; }
:root[data-theme="dark"] .client-ancien { color: #8AB4F8; }
:root[data-theme="dark"] .client-nouveau { color: #FF8A80; }
/* Vente au tas (4.59.0) : − et + autour du nombre de tas, dans le cadran de la pesée. */
.heap-count { display: inline-flex; align-items: center; gap: 10px; }
.heap-count button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.heap-count button:disabled { opacity: .4; cursor: default; }
/* Charges (4.59.0, redessiné en 4.60.0) : marchandise reçue, une ligne par article, dans un encadré. */
.expense-items { display: grid; gap: 10px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft, var(--panel)); }
.expense-items-head strong { display: block; font-size: 14px; font-weight: 700; }
.expense-items-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.expense-item-list { display: grid; gap: 8px; }
.expense-item-list:empty { display: none; }
.expense-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px 112px 38px; gap: 8px; align-items: center; }
.expense-item-row .input { width: 100%; min-height: 44px; }
.expense-item-row select.input { padding-right: 32px; }
.expense-amount { position: relative; display: block; margin: 0; }
.expense-amount .input { padding-right: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.expense-amount span { position: absolute; top: 0; bottom: 0; right: 12px; display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 600; pointer-events: none; }
/* Le champ sans objet garde sa place : tas, kilos et poubelle restent alignés d’une ligne à l’autre. */
.expense-item-row .expense-amount.is-empty { visibility: hidden; }
.expense-items > .button { justify-self: start; }
@media (max-width: 640px) {
  .expense-item-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; }
  .expense-item-row select { grid-column: 1 / -1; }
}
.remember-field { margin: 4px 0 2px; }
/* Interface en thaï (4.60.0) : bouton FR / ไทย, nom thaï sous le nom français. */
.lang-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; margin: 0 0 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.sidebar .lang-toggle { width: 100%; background: transparent; color: inherit; border-color: rgba(255, 255, 255, .25); }
.mobile-header .lang-toggle { margin: 0 6px 0 0; height: 30px; }
.name-th { margin: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.compact-th { display: block; font-size: 11px; font-weight: 600; opacity: .8; line-height: 1.3; }
.lang-switch { margin-top: 10px; }
/* Scanner depuis n'importe quel écran (4.61.0) : icône dans l'en-tête du téléphone, ligne du menu ailleurs. */
.mobile-scan { display: grid; place-items: center; width: 39px; height: 39px; padding: 0; color: inherit; cursor: pointer; }
.mobile-scan span { display: none; }
.mobile-scan .icon { width: 20px; height: 20px; }
.sidebar-footer .scan-anywhere { width: 100%; }
/* Interrupteurs (4.60.0) : « Rester connecté » et « Payé avec les espèces de la caisse ». */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; text-align: left; }
.toggle-row strong { display: block; font-size: 14px; font-weight: 700; }
.toggle-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.toggle-row:has(input:disabled) { opacity: .55; cursor: default; }
.toggle-row:has(input:checked) { border-color: var(--strong); }
#expenseForm .toggle-row, #categoryForm .toggle-row { margin-top: 14px; }
.toggle-row .function-switch { flex: 0 0 auto; }
/* Tas (4.59.0, redessiné en 4.60.0) : − et + autour du nombre, comme un compteur. */
.heap-count { gap: 12px; }
.heap-count button { width: 36px; height: 36px; border-radius: 10px; border-color: var(--line-strong, var(--line)); }
.heap-count button svg { width: 16px; height: 16px; }
.receive-line:has([data-receive-grams]) { grid-template-columns: minmax(0, 1fr) 110px 110px 120px; }
/* Packs en réception (4.67.0) : une case par pack, à côté des unités. */
.receive-line[style*="--receive-inputs"] { grid-template-columns: minmax(0, 1fr) repeat(var(--receive-inputs), 104px) 110px; }
@media (max-width: 640px) { .receive-line[style*="--receive-inputs"] { grid-template-columns: repeat(var(--receive-inputs), minmax(0, 1fr)) auto; } }
.receive-scan { display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.receive-scan input { flex: 1; min-height: 46px; border: 0; background: none; outline: none; font: inherit; color: var(--ink); }
.receive-scan-status { min-height: 18px; margin: 6px 2px 0; }
.receive-scan-status.danger-text { color: var(--red); }
.stock-packs { margin-top: -4px; }
.weigh-readout small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; }
@media (max-width: 640px) { .receive-line:has([data-receive-grams]) { grid-template-columns: 1fr 1fr auto; } }
/* Pourboire (4.60.0) : un troisième bouton à côté de Client et Remise, et sa ligne sous le total. */
.ticket-options:has(> button:nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }
.ticket-options button.has-tip strong { color: var(--ok, #157a3d); }
.totals .tip-row small { color: var(--muted); font-weight: 400; }
.payment-total small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
/* 4.84.0 : le montant de l'en-tête ne se coupe jamais avant « F » (390 px avec « dont … de pourboire »). */
.payment-total { gap: 10px; }
.payment-total strong { white-space: nowrap; }
/* Laisser la monnaie en pourboire (4.84.0) : la ligne « Pourboire » avec « Rendre la monnaie », le bouton sous « Monnaie à rendre ».
 * Quand ils ne tiennent pas à côté de « Pourboire » (320 px), « Rendre la monnaie » et le montant passent dessous, à droite. */
.total-row.change-tip { flex-wrap: wrap; row-gap: 6px; align-items: center; margin-top: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.total-row.change-tip > :first-child { flex: 1 1 0; }
.total-row.change-tip small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.total-row.change-tip strong { font-size: 22px; letter-spacing: -.02em; }
.change-tip-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.change-tip-end > * { white-space: nowrap; }
.change-tip-button { margin-top: 14px; }

/* Rapport TVA (4.68.0) */
.vat-head { flex-wrap: wrap; gap: 12px; }
.vat-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vat-tools select { min-height: 40px; max-width: 100%; }
/* TVA par taux du Z : une ligne pleine largeur, le libellé ne se coupe pas. */
.z-grid > .z-tax { grid-column: 1 / -1; }
.z-grid > div > strong { white-space: nowrap; }
.vat-table { min-width: 0; }
.vat-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.vat-table th:not(:first-child), .vat-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.vat-totals { margin-top: 14px; }
.vat-totals .total-row.muted { opacity: .7; }
.vat-totals .vat-due { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--line); font-size: 17px; font-weight: 800; }
.vat-apart { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.vat-apart > b { display: block; margin-bottom: 6px; font-size: 12px; }
.vat-apart > small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

/* Recherche dans l'historique des ventes (4.70.0). */
.sales-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 16px 0 8px; }
.sales-search .field { margin: 0; flex: 0 1 170px; }
.sales-search .field:first-of-type { flex: 1 1 260px; }
/* Ventes et mouvements de stock (4.87.0) : les boutons de période sur leur propre ligne, au-dessus de la recherche. */
.sales-search .period-buttons { flex: 1 1 100%; }
.movement-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.movement-periods .field-note { margin: 0; }
/* ---- Lien du stock d'un collaborateur (4.88.0) ---- */
.stock-link-url { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; }
.stock-link-actions { flex-wrap: wrap; margin: 12px 0; }
