/* ============================================================================
   KM39 Back Office — prototype layout & components (builds on app.css tokens)
   ============================================================================ */

html, body { height: 100%; }
#root { height: 100%; }

/* ===== BOOT SPLASH ========================================================= */
/* Sempre scuro in entrambi i temi: è la continuità col marchio, non una
   superficie dell'app. */
.boot {
  position: fixed; inset: 0; z-index: var(--z-boot); background: #1D1D1B;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-6);
  transition: opacity var(--dur-slow, 320ms) var(--ease-out, ease), visibility var(--dur-slow, 320ms);
  /* Rete di sicurezza se app.js non parte: lo splash non deve mai poter
     bloccare il BO in modo permanente. */
  animation: boot-failsafe 0s linear 8s forwards;
}
@keyframes boot-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__mark { width: 96px; height: 96px; object-fit: contain; }
.boot__bar { width: 132px; height: 3px; border-radius: 999px; background: oklch(1 0 0 / 0.14); overflow: hidden; }
.boot__bar span { display: block; width: 40%; height: 100%; border-radius: inherit; background: #D9B268; animation: boot-slide 1.1s var(--ease-in-out, ease-in-out) infinite; }
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }

/* Caricamenti successivi della stessa sessione (login, cambio lingua): il
   circuito va comunque atteso, ma basta una barra sottile in cima. */
.km-booted .boot { background: transparent; justify-content: flex-start; gap: 0; pointer-events: none; }
.km-booted .boot__mark { display: none; }
.km-booted .boot__bar { width: 100%; height: 2px; border-radius: 0; background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .boot__bar span { animation: none; width: 100%; }
  .boot { transition: none; }
}

/* ===== BRAND =============================================================== */
/* In chiaro: PNG quadrato su fondo scuro pieno, il tile usa lo stesso colore
   così gli angoli stondati non lasciano bordi chiari.
   In scuro: marchio su fondo trasparente, senza tile — un riquadro scuro su
   fondo scuro non si distinguerebbe. */
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.brand__mark {
  width: var(--brand-size, 34px); height: var(--brand-size, 34px);
  flex: none; object-fit: cover; background: #1D1D1B;
  border-radius: calc(var(--brand-size, 34px) * 0.28);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.16);
}
.brand__mark--dark { display: none; }
[data-theme="dark"] .brand__mark--light { display: none; }
[data-theme="dark"] .brand__mark--dark {
  display: inline-block;
  background: none; box-shadow: none; border-radius: 0; object-fit: contain;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-weight: var(--weight-bold); font-size: 1.05rem; letter-spacing: -0.2px; color: var(--ink); }
.brand__sub { font-size: var(--text-xs); color: var(--ink-soft); letter-spacing: 0.4px; text-transform: uppercase; }

/* ===== SHELL =============================================================== */
.shell { display: grid; grid-template-columns: var(--shell-sidebar) 1fr; height: 100dvh; overflow: hidden; }
.shell.is-collapsed { grid-template-columns: 72px 1fr; }

/* ===== SIDEBAR ============================================================= */
.sidebar { display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); padding: var(--sp-4) var(--sp-3); gap: var(--sp-2); overflow: hidden; }
.sidebar__brand { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2) var(--sp-4); min-height: 44px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.navitem { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--touch-min); padding: 0 var(--sp-3); border-radius: var(--r-control); color: var(--ink-soft); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; border: none; background: transparent; text-align: left; width: 100%; text-decoration: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.navitem:hover, .navitem:focus, .navitem.is-active { text-decoration: none; }
.navitem:hover { background: var(--surface-2); color: var(--ink); }
.navitem.is-active { background: var(--accent-wash); color: var(--accent-text); font-weight: var(--weight-semibold); }
.navitem.is-active .navitem__icon { color: var(--accent-text); }
.navitem__icon { color: var(--muted); flex: none; display: inline-flex; }
.navitem__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navitem__count { font-size: var(--text-xs); font-variant-numeric: tabular-nums; background: var(--st-pending-bg); color: var(--st-pending-fg); padding: 1px 7px; border-radius: var(--r-pill); font-weight: var(--weight-bold); }
.navitem.is-active .navitem__count { background: var(--accent); color: var(--accent-ink); }
.sidebar__foot { margin-top: auto; padding-top: var(--sp-3); }
/* Collassata: resta il solo tile del marchio, che fa già da monogramma. */
.is-collapsed .navitem__label, .is-collapsed .navitem__count, .is-collapsed .brand__text { display: none; }
.is-collapsed .sidebar__brand { justify-content: center; }
.is-collapsed .navitem { justify-content: center; padding: 0; }
.shellver { font-size: var(--text-xs); color: var(--muted); padding: 0 var(--sp-3); }
.is-collapsed .shellver { display: none; }

/* ===== TOPBAR + MAIN ====================================================== */
.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: var(--sp-3); height: var(--shell-topbar); flex: none; padding: 0 var(--sp-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar__title { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: -0.005em; }
.topbar__sub { font-size: var(--text-sm); color: var(--ink-soft); margin-left: var(--sp-3); padding-left: var(--sp-3); border-left: 1px solid var(--border); }
.topbar__spacer { flex: 1; }
.topbar__logo { flex: none; }
/* L'icona del toggle segue la preferenza salvata, non il tema risolto: con
   "auto" deve restare il monitor anche quando il sistema è scuro. */
.themetoggle [data-theme-icon] { display: none; }
html[data-theme-pref="auto"] .themetoggle [data-theme-icon="auto"],
html[data-theme-pref="light"] .themetoggle [data-theme-icon="light"],
html[data-theme-pref="dark"] .themetoggle [data-theme-icon="dark"] { display: inline-flex; }
.topbar__clock { font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); font-size: var(--text-base); color: var(--ink); display: inline-flex; align-items: center; gap: var(--sp-2); }
.topbar__clock .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--confirm); box-shadow: 0 0 0 0 var(--confirm); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--confirm) 40%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .topbar__clock .dot { animation: none; } }

.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: var(--touch-min); height: var(--touch-min); border-radius: var(--r-control); border: none; background: transparent; color: var(--ink-soft); cursor: pointer; position: relative; transition: background var(--dur-fast) var(--ease-out); }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn__dot { position: absolute; top: 9px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--danger); color: var(--danger-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--surface); }
/* Language switch — segmented, active option clearly highlighted */
.langswitch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--surface-2); }
.langswitch__opt { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--ink-soft); text-decoration: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.langswitch__opt:hover { color: var(--ink); }
.langswitch__opt.is-active { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); }
.user { display: flex; align-items: center; gap: var(--sp-2); padding-left: var(--sp-3); border-left: 1px solid var(--border); }
.avatar { width: 34px; height: 34px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--weight-bold); flex: none; }

.content { flex: 1; overflow-y: auto; padding: var(--sp-6); }
.content--flush { padding: 0; display: flex; flex-direction: column; min-height: 0; }
.content__head { display: flex; align-items: flex-end; gap: var(--sp-3); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.content__head .meta { color: var(--ink-soft); font-size: var(--text-sm); margin-top: 4px; }
.head__actions { margin-left: auto; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }

/* ===== MOBILE NAV ========================================================= */
.mobilebar { display: none; }
.mobnav { display: none; }
.sheet-scrim { position: fixed; inset: 0; background: oklch(0.25 0.02 260 / 0.38); z-index: var(--z-modal-backdrop); animation: fade var(--dur-base) var(--ease-out); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: var(--r-card) var(--r-card) 0 0; z-index: var(--z-modal); padding: var(--sp-4); padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom)); box-shadow: var(--shadow-2); animation: sheet-up var(--dur-slow) var(--ease-out); }
.sheet__grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto var(--sp-4); }
.sheet__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.sheet__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-control); border: none; background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: var(--text-xs); font-weight: var(--weight-medium); }
.sheet__item.is-active { background: var(--accent-wash); color: var(--accent-strong); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== SEGMENTED CONTROL =================================================== */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-control); padding: 3px; gap: 2px; }
.seg__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--sp-3); border: none; background: transparent; color: var(--ink-soft); font-size: var(--text-sm); font-weight: var(--weight-medium); border-radius: 4px; cursor: pointer; white-space: nowrap; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-active { background: var(--surface); color: var(--ink); font-weight: var(--weight-semibold); box-shadow: var(--shadow-1); }

/* ===== TABS =============================================================== */
.subtabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.subtab { min-height: 42px; padding: 0 var(--sp-3); border: none; background: transparent; color: var(--ink-soft); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur-fast) var(--ease-out); }
.subtab:hover { color: var(--ink); }
.subtab.is-active { color: var(--ink); font-weight: var(--weight-semibold); border-bottom-color: var(--accent); }
.subtab__count { font-variant-numeric: tabular-nums; opacity: 0.6; margin-left: 4px; }

/* ===== FILTER CHIPS / TABS (orders) ======================================= */
.tabs { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; min-height: 38px; padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--ink-soft); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.tab:hover { background: var(--surface-2); }
.tab.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tab__count { font-variant-numeric: tabular-nums; opacity: 0.7; }

/* ===== SEARCH ============================================================= */
.search { position: relative; display: inline-flex; align-items: center; min-width: 200px; }
.search .icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 40px; padding: 0 var(--sp-3) 0 34px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-control); color: var(--ink); }
.search input::placeholder { color: var(--ink-soft); opacity: 1; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.72 0.13 85 / 0.25); }

/* ===== CHIPS ============================================================== */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px var(--sp-2); border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: var(--weight-semibold); background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.chip--ghost { background: transparent; border: 1px solid var(--border); }
.chip--type { background: var(--surface-2); color: var(--ink); }
.chip--consegna { background: var(--st-confirmed-bg); color: var(--st-confirmed-fg); }
.chip--ritiro { background: var(--st-delivered-bg); color: var(--st-delivered-fg); }
.chip--allergen { background: var(--st-pending-bg); color: var(--st-pending-fg); font-weight: var(--weight-medium); }
.chip--warn { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }
/* semantic status chips (green ok = matches the service-dot green; red danger = cancelled tokens) */
.chip--ok { background: var(--st-ready-bg); color: var(--st-ready-fg); }
.chip--danger { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); }

/* ===== ORDERS: TOOLBAR ==================================================== */
.ordertoolbar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.ordertoolbar .tabs { flex: none; }
.ordertoolbar .tabs + .tabs { border-left: 1px solid var(--border); padding-left: var(--sp-3); }

/* ===== KANBAN BOARD ======================================================= */
.board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: var(--sp-4); padding: var(--sp-6); overflow-x: auto; align-items: start; }
.boardcol { display: flex; flex-direction: column; min-height: 0; max-height: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-card); }
.boardcol__head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.boardcol__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.boardcol__title { font-weight: var(--weight-semibold); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boardcol__count { margin-left: auto; font-size: var(--text-xs); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--border); color: var(--ink-soft); min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); padding: 0 6px; }
.boardcol__body { flex: 1; overflow-y: auto; padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
.boardcol__empty { color: var(--muted); font-size: var(--text-sm); text-align: center; padding: var(--sp-6) var(--sp-3); }

.ocard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-3); cursor: pointer; display: flex; flex-direction: column; gap: var(--sp-2); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.ocard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.ocard__top { display: flex; align-items: center; gap: var(--sp-2); }
.ocard__id { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.ocard__status { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--ink-soft); }
.ocard__slot { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--ink); }

/* Slot sub-sections inside a status column (time_sections view). */
.slotsec { display: flex; flex-direction: column; gap: var(--sp-2); }
.slotsec + .slotsec { margin-top: var(--sp-3); }
.slotsec__head { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; padding-bottom: 2px; border-bottom: 1px dashed var(--border); }
.ocard__cust { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.ocard__meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.ocard__items { font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.4; }
.ocard__foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: 2px; }
.ocard__total { font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; font-size: var(--text-base); }
.ocard__foot .btn { margin-left: auto; }
.noprint { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--st-cancelled-fg); }

/* ===== ORDERS: TABLE / LIST =============================================== */
.tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: auto; margin: var(--sp-6); }
.tablewrap .table { min-width: 720px; }
.tbl-clickable tbody tr { cursor: pointer; }
.rowacts { display: inline-flex; gap: var(--sp-2); justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.select--sm { min-height: 34px; height: 34px; padding: 0 var(--sp-2); font-size: var(--text-sm); }
.col-actions { text-align: right; }
/* touch-safe row actions on tablets (pizzeria use): keep tap targets ≥44px */
@media (pointer: coarse) {
  .col-actions .btn--sm, .col-actions .select, .col-actions .iconbtn { min-height: var(--touch-min); }
}

.orderlist { margin: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-2); }
.olistrow { display: flex; align-items: center; gap: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-3) var(--sp-4); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out); }
.olistrow:hover { border-color: var(--border-strong); background: var(--surface); }
.olistrow__slot { font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); font-size: var(--text-lg); width: 58px; flex: none; }
.olistrow__main { flex: 1; min-width: 0; }
.olistrow__cust { font-weight: var(--weight-semibold); }
.olistrow__sub { font-size: var(--text-sm); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olistrow__total { font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }

/* ===== DRAWER ============================================================= */
.drawer-scrim { position: fixed; inset: 0; background: oklch(0.25 0.02 260 / 0.38); z-index: var(--z-modal-backdrop); animation: fade var(--dur-base) var(--ease-out); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); z-index: var(--z-modal); box-shadow: var(--shadow-2); display: flex; flex-direction: column; animation: drawer-in var(--dur-slow) var(--ease-out); }
.drawer--wide { width: min(600px, 100vw); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer__head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-6) var(--sp-6) var(--sp-4); border-bottom: 1px solid var(--border); }
.drawer__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-6); }
.drawer__foot { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.drawer__foot .spacer { flex: 1; }

/* detail sections */
.dsec { display: flex; flex-direction: column; gap: var(--sp-2); }
.dsec__title { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.drow { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.drow:last-child { border-bottom: none; }
.drow .k { color: var(--ink-soft); }
.drow .v { font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; text-align: right; }

.lineitem { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.lineitem:last-child { border-bottom: none; }
.lineitem__qty { font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); color: var(--ink-soft); min-width: 28px; }
.lineitem__body { flex: 1; min-width: 0; }
.lineitem__name { font-weight: var(--weight-semibold); }
.lineitem__variants { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.varpill { font-size: var(--text-xs); padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-soft); }
.varpill--add { background: var(--st-ready-bg); color: var(--st-ready-fg); }
.varpill--remove { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); text-decoration: line-through; }
.lineitem__price { font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); }
.linenote { font-size: var(--text-xs); color: var(--muted); font-style: italic; margin-top: 4px; }

.totalrow { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--sp-3); margin-top: var(--sp-2); border-top: 2px solid var(--border-strong); }
.totalrow .lbl { font-weight: var(--weight-semibold); }
.totalrow .amt { font-size: var(--text-xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }

/* stepper for cancel flow */
.reasongrid { display: flex; flex-direction: column; gap: var(--sp-2); }
.reasonopt { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-control); cursor: pointer; font-size: var(--text-sm); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.reasonopt:hover { background: var(--surface-2); }
.reasonopt.is-sel { border-color: var(--danger); background: var(--danger-wash); font-weight: var(--weight-semibold); }
.reasonopt input { accent-color: var(--danger); width: 18px; height: 18px; }

/* ===== TIMELINE (order progress) ========================================== */
.timeline { display: flex; align-items: center; gap: 0; }
.tlstep { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; position: relative; }
.tlstep__dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); z-index: 1; }
.tlstep.done .tlstep__dot { background: var(--confirm); color: var(--confirm-ink); border-color: var(--confirm); }
.tlstep.current .tlstep__dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tlstep__lbl { font-size: 10px; color: var(--ink-soft); white-space: nowrap; }
.tlstep.current .tlstep__lbl { color: var(--ink); font-weight: var(--weight-semibold); }
.tlstep::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.tlstep:first-child::before { display: none; }
.tlstep.done::before, .tlstep.current::before { background: var(--confirm); }

/* ===== CARDS / PANELS layout ============================================== */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.panel__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--border); }
.panel__title { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.panel__body { padding: var(--sp-4) var(--sp-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-4); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.stack { display: flex; flex-direction: column; gap: var(--sp-6); }

/* ===== MENU =============================================================== */
.catsection { margin-bottom: var(--sp-6); }
.catsection__head { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.catsection__name { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.catsection__n { font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.menurow { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-control); margin-bottom: var(--sp-2); transition: border-color var(--dur-fast) var(--ease-out); }
.menurow:hover { border-color: var(--border-strong); }
.menurow.is-off { opacity: 0.6; }
.menurow__body { flex: 1; min-width: 0; }
.menurow__name { font-weight: var(--weight-semibold); display: flex; align-items: center; gap: var(--sp-2); }
.menurow__desc { font-size: var(--text-sm); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menurow__price { font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); text-align: right; white-space: nowrap; }
.menurow__price small { color: var(--muted); font-weight: var(--weight-regular); }

/* toggle */
.toggle { position: relative; width: 44px; height: 26px; flex: none; border-radius: var(--r-pill); border: none; background: var(--border-strong); cursor: pointer; transition: background var(--dur-base) var(--ease-out); }
.toggle.on { background: var(--confirm); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--dur-base) var(--ease-out); }
.toggle.on::after { transform: translateX(18px); }
.toggle--sm { width: 38px; height: 22px; }
.toggle--sm::after { width: 16px; height: 16px; }
.toggle--sm.on::after { transform: translateX(16px); }

/* featured star */
.starbtn { background: none; border: none; cursor: pointer; color: var(--border-strong); display: inline-flex; padding: 4px; border-radius: 4px; }
.starbtn.on { color: var(--accent); }
.starbtn:hover { background: var(--surface-2); }

/* variant group cards */
.vgroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-6); margin-bottom: var(--sp-4); }
.vgroup__head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.vgroup__name { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.voption { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.voption:last-child { border-bottom: none; }
.voption__name { font-weight: var(--weight-medium); flex: 1; }
.voption__mod { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: var(--text-sm); }

/* ===== SLOTS ============================================================== */
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.slotcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.slotcard.is-off { opacity: 0.55; }
.slotcard.is-full { border-color: var(--st-cancelled-fg); }
.slotcard__top { display: flex; align-items: center; gap: var(--sp-2); }
.slotcard__time { font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); font-size: var(--text-xl); }
.slotbar { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.slotbar__fill { height: 100%; border-radius: var(--r-pill); background: var(--confirm); transition: width var(--dur-base) var(--ease-out); }
.slotbar__fill.warn { background: var(--accent); }
.slotbar__fill.full { background: var(--st-cancelled-fg); }
.slotcard__ctl { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-1); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-control); overflow: hidden; }
.stepper button { width: 32px; height: 32px; border: none; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.stepper button:hover { background: var(--surface-2); }
.stepper button:disabled { color: var(--border-strong); cursor: not-allowed; }
.stepper__val { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 32px; display: inline-flex; align-items: center; justify-content: center; }

/* ===== DELIVERY =========================================================== */
.faretable { width: 100%; }
.faretable td .stepper { transform: scale(0.9); }

/* ===== PROMOTIONS ========================================================= */
.promorow { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); margin-bottom: var(--sp-2); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out); }
.promorow:hover { border-color: var(--border-strong); }
.promorow.is-off { opacity: 0.55; }
.promotype { width: 46px; height: 46px; border-radius: var(--r-control); display: flex; align-items: center; justify-content: center; flex: none; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.promotype--percent { background: var(--st-confirmed-bg); color: var(--st-confirmed-fg); }
.promotype--fixed { background: var(--st-ready-bg); color: var(--st-ready-fg); }
.promotype--gift { background: var(--accent-wash); color: var(--accent-strong); }
.promorow__body { flex: 1; min-width: 0; }
.promorow__name { font-weight: var(--weight-semibold); }
.promorow__sub { font-size: var(--text-sm); color: var(--ink-soft); }
.promorow__stat { text-align: right; font-size: var(--text-sm); }
.promorow__stat b { font-variant-numeric: tabular-nums; font-size: var(--text-base); }

.usagebar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; width: 120px; margin-top: 4px; }
.usagebar__fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); }

/* radio cards */
.radiorow { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.radiocard { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-control); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.radiocard:hover { background: var(--surface-2); }
.radiocard.is-sel { border-color: var(--accent); background: var(--accent-wash); }
.radiocard__t { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.radiocard__d { font-size: var(--text-xs); color: var(--ink-soft); }

/* ===== CLIENTI ============================================================ */
.points { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); color: var(--accent-strong); }
.bigpoints { font-size: var(--text-2xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; color: var(--accent-strong); letter-spacing: -0.01em; }

/* ===== NOTIFICHE ========================================================== */
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); }
.notipreview { background: var(--ink); color: var(--bg); border-radius: var(--r-card); padding: var(--sp-4); display: flex; gap: var(--sp-3); align-items: flex-start; }
.notipreview__icon { width: 38px; height: 38px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.notipreview__t { font-weight: var(--weight-semibold); }
.notipreview__b { font-size: var(--text-sm); opacity: 0.85; margin-top: 2px; }
.notirow { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.notirow:last-child { border-bottom: none; }
.notirow__body { flex: 1; min-width: 0; }
.notirow__t { font-weight: var(--weight-semibold); }
.notirow__b { font-size: var(--text-sm); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notirow__meta { text-align: right; font-size: var(--text-xs); color: var(--muted); white-space: nowrap; }

/* ===== STATS ============================================================== */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-6); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-6); }
.stat__label { font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: var(--sp-1); }
.stat__value { font-size: var(--text-2xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat__delta { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-left: var(--sp-2); }
.stat__delta.up { color: var(--st-ready-fg); }
.stat__delta.down { color: var(--st-cancelled-fg); }

.barv { display: flex; align-items: flex-end; gap: var(--sp-3); height: 180px; padding-top: var(--sp-4); }
.barv__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); height: 100%; justify-content: flex-end; }
.barv__bar { width: 100%; max-width: 42px; background: var(--accent); border-radius: 5px 5px 0 0; transition: height var(--dur-slow) var(--ease-out); min-height: 3px; }
.barv__bar.muted { background: var(--surface-3); }
.barv__lbl { font-size: var(--text-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.barv__val { font-size: var(--text-xs); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }

.barh { display: flex; flex-direction: column; gap: var(--sp-3); }
.barh__row { display: flex; align-items: center; gap: var(--sp-3); }
.barh__lbl { width: 110px; flex: none; font-size: var(--text-sm); }
.barh__track { flex: 1; height: 22px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.barh__fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width var(--dur-slow) var(--ease-out); }
.barh__n { width: 36px; text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); }

.donut { display: flex; align-items: center; gap: var(--sp-6); }
.donut__legend { display: flex; flex-direction: column; gap: var(--sp-2); }
.legenditem { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-sm); }
.legenditem .sw { width: 12px; height: 12px; border-radius: 3px; }
.legenditem b { font-variant-numeric: tabular-nums; }

/* ===== EMPTY / MISC ======================================================= */
.empty { text-align: center; padding: var(--sp-12) var(--sp-6); color: var(--ink-soft); }
.empty__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--ink); margin-bottom: var(--sp-2); }
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon svg { stroke-width: 2; }

/* ===== TOAST ============================================================== */
.toaststack { position: fixed; bottom: var(--sp-6); left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--sp-3); background: var(--ink); color: var(--surface); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-control); box-shadow: var(--shadow-2); font-size: var(--text-sm); animation: toast-in var(--dur-base) var(--ease-out); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.toast__icon { color: oklch(0.85 0.13 150); }
/* New-order floating cart indicator: stays pinned at the top, pulses on add. */
.cartfab { position: fixed; top: var(--sp-4); right: var(--sp-4); z-index: var(--z-toast); display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: none; border-radius: 999px; background: var(--primary, var(--ink)); color: var(--surface); box-shadow: var(--shadow-2); cursor: pointer; font-weight: 700; }
.cartfab__ico { position: relative; display: inline-flex; }
.cartfab__badge { position: absolute; top: -8px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-xs); line-height: 18px; text-align: center; }
.cartfab__total { font-variant-numeric: tabular-nums; }
.cartfab.is-bump { animation: cartfab-bump 0.35s var(--ease-out); }
@keyframes cartfab-bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cartfab.is-bump { animation: none; } }
.cartfab--phone { display: none; } /* shown only on stacked phone layout (see ≤820px) */
.filt { display: flex; flex-direction: column; gap: 2px; }
.filt__lbl { font-size: var(--text-xs); color: var(--ink-soft); }
.toast--ok { background: oklch(0.42 0.13 150); }
.toast--warn { background: oklch(0.55 0.17 35); }

/* ===== LOGIN ============================================================== */
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-6); background: var(--bg); }
.loginbox { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-8); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--sp-4); }
.loginbox .brand { align-self: flex-start; margin-bottom: var(--sp-2); }
.loginbox h1 { font-size: var(--text-lg); }
.loginbox .sub { color: var(--ink-soft); font-size: var(--text-sm); margin-top: -8px; }

/* ===== RESPONSIVE ========================================================= */
@media (max-width: 1024px) {
  .shell { grid-template-columns: 72px 1fr; }
  .shell .navitem__label, .shell .navitem__count, .shell .brand__text, .shellver { display: none; }
  .shell .sidebar__brand { justify-content: center; }
  .shell .navitem { justify-content: center; padding: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 var(--sp-4); }
  .topbar__sub { display: none; }
  .content { padding: var(--sp-4); padding-bottom: 88px; }
  .content--flush { padding-bottom: 76px; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; padding: var(--sp-4); padding-bottom: 88px; overflow-x: hidden; }
  .boardcol { max-height: none; }
  .tablewrap, .orderlist { margin: var(--sp-4); margin-bottom: 88px; }
  .ordertoolbar { padding: var(--sp-3) var(--sp-4); }
  .drawer, .drawer--wide { width: 100vw; }
  .mobnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .mobnav__item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: var(--sp-2) 0; min-height: 56px; justify-content: center; border: none; background: transparent; color: var(--ink-soft); font-size: 10px; font-weight: var(--weight-medium); cursor: pointer; position: relative; }
  .mobnav__item.is-active { color: var(--accent-strong); }
  .mobnav__item .navitem__count { position: absolute; top: 4px; left: 50%; margin-left: 6px; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .head__actions { width: 100%; }
}

/* ===== ADAPT: horizontal-scroll table wrapper + touch hit areas ========== */
.tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tablescroll > .table { min-width: 640px; }

/* Coarse pointers (touch): expand small switch hit area to >=44px without changing the visual. */
@media (pointer: coarse) {
  .toggle { position: relative; }
  .toggle::before { content: ""; position: absolute; inset: -9px; }
  .toggle--sm::before { inset: -11px; }
  .starbtn { position: relative; }
  .starbtn::before { content: ""; position: absolute; inset: -8px; }
}

/* ===== SLOT & ORARI (KM39 design: weekly schedule, closures, day view) ===== */
.dayhead { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.dayhead__nav { display: flex; align-items: center; gap: var(--sp-2); }
.dayhead__date { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.weeklist { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.weekrow { display: flex; align-items: center; gap: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-3) var(--sp-4); }
.weekrow.is-off { opacity: 0.6; }
.weekrow__day { width: 150px; flex: none; }
.weekrow__name { font-weight: var(--weight-semibold); font-size: var(--text-base); display: block; }
.weekrow__cap { font-size: var(--text-xs); color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.weekrow__windows { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.winpill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font-size: var(--text-sm); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.weekrow__n { font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; margin-left: var(--sp-1); }
.weekrow__ctl { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.winedit { display: flex; align-items: center; gap: var(--sp-3); }
.closrow { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.closrow__icon { width: 34px; height: 34px; border-radius: var(--r-control); display: grid; place-items: center; flex: none; }
.closrow__icon--rec { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.closrow__icon--one { background: var(--st-pending-bg); color: var(--st-pending-fg); }
.closrow__body { flex: 1; min-width: 0; }
.closrow__title { font-weight: var(--weight-medium); }
.closrow__sub { font-size: var(--text-sm); color: var(--ink-soft); }
.closrow:last-child { border-bottom: none; }
.radiocard__d { display: block; font-size: var(--text-xs); color: var(--ink-soft); margin-top: 2px; }

/* ===== MONTH CALENDAR (open / closed / holiday / vacation) ===== */
.calwrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4); }
.calhead { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.calhead__title { font-weight: var(--weight-semibold); font-size: var(--text-base); text-transform: capitalize; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.caldow { text-align: center; font-size: var(--text-xs); color: var(--muted); font-weight: var(--weight-medium); padding: 4px 0; }
.calcell { aspect-ratio: 1; border-radius: var(--r-control); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-variant-numeric: tabular-nums; position: relative; }
.calcell--pad { border: none; background: transparent; }
.calcell--open { background: var(--surface); }
.calcell--closed { background: var(--surface-2); color: var(--muted); }
.calcell--holiday { background: var(--accent-wash); color: var(--accent-strong); border-color: color-mix(in oklab, var(--accent) 30%, transparent); }
.calcell--vacation { background: var(--st-cancelled-bg); color: var(--st-cancelled-fg); border-color: var(--st-cancelled-fg); }
.calcell--today { box-shadow: 0 0 0 2px var(--accent) inset; }
.calcell__num { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.calcell__dot { width: 5px; height: 5px; border-radius: 50%; }
.callegend { display: flex; gap: var(--sp-4); margin-top: var(--sp-3); flex-wrap: wrap; font-size: var(--text-xs); color: var(--ink-soft); }
.callegend span { display: inline-flex; align-items: center; gap: 5px; }
.callegend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.calsw-open { background: var(--surface); border: 1px solid var(--border-strong); }
.calsw-closed { background: var(--surface-2); }
.calsw-holiday { background: var(--accent-wash); border: 1px solid var(--accent); }
.calsw-vacation { background: var(--st-cancelled-bg); border: 1px solid var(--st-cancelled-fg); }

/* calendar occupancy dashboard extras */
.calcell { cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out); padding: 4px; }
.calcell:hover:not(.calcell--pad) { border-color: var(--border-strong); }
.calcell__occ { font-size: 10px; color: var(--ink-soft); font-variant-numeric: tabular-nums; line-height: 1; }
.calcell__tag { font-size: 9px; color: var(--st-pending-fg); background: var(--st-pending-bg); border-radius: var(--r-pill); padding: 1px 5px; line-height: 1.4; }
.calcell__bar { width: 80%; height: 3px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.calcell__barfill { display: block; height: 100%; background: var(--confirm); border-radius: var(--r-pill); }
.calcell__barfill.warn { background: var(--accent); }
.calcell__barfill.full { background: var(--st-cancelled-fg); }

/* ── Settings page ──────────────────────────────────────── */
.content__head-actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.settings { display: flex; flex-direction: column; gap: var(--sp-4); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.card__head { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.card__body { padding: var(--sp-5); }
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--text-sm); color: var(--ink-soft); }
.field > span { font-weight: var(--weight-medium); color: var(--ink); }
.field--toggle { flex-direction: row; align-items: center; gap: var(--sp-2); }
.field--toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.input { width: 100%; height: 38px; padding: 0 var(--sp-3); border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn { display: inline-flex; align-items: center; gap: var(--sp-2); height: 38px; padding: 0 var(--sp-4); border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-weight: var(--weight-medium); cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-strong); }
/* confirm/danger/ghost: bo.css loads after app.css and overrides bare .btn, so the
   variants must be redefined here to win the cascade (otherwise they fall back to white). */
.btn--confirm { background: var(--confirm); border-color: var(--confirm); color: var(--confirm-ink); }
.btn--confirm:hover { background: var(--confirm-strong); border-color: var(--confirm-strong); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.btn--danger:hover { background: var(--danger-strong); border-color: var(--danger-strong); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); }
.alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-control); margin-bottom: var(--sp-4); font-size: var(--text-sm); }
.alert--ok { background: var(--st-confirmed-bg, #e7f6ee); color: var(--st-confirmed-fg, #1f7a3f); border: 1px solid var(--st-confirmed-fg, #1f7a3f); }
.alert--err { background: var(--st-cancelled-bg, #fde6e6); color: var(--st-cancelled-fg, #b32424); border: 1px solid var(--st-cancelled-fg, #b32424); }

/* New-order: format quick-pick row scrolls horizontally when it overflows */
.fmt-scroll { display: flex; gap: var(--sp-2, 6px); overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.fmt-scroll > .btn { flex: 0 0 auto; }

/* ============================================================================
   NEW ORDER — two-pane builder (catalog + cart), redesigned per Claude Design.
   ============================================================================ */
.no-screen { flex: 1; display: flex; flex-direction: row; min-height: 0; min-width: 0; }

/* ── Catalog (left) ── */
.no-cat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.no-cat__bar { flex: none; padding: var(--sp-4) var(--sp-6) var(--sp-3); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--sp-3); }
.no-cat__row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.no-cat__scroll { flex: 1; overflow-y: auto; padding: var(--sp-4) var(--sp-6) var(--sp-12); }
.no-search { position: relative; flex: 1; max-width: 420px; }
.no-search > .input { padding-left: 34px; }
.no-search__ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: inline-flex; }
.no-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip-btn { padding: 7px 14px; border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: var(--weight-semibold); min-height: 36px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.chip-btn:hover { background: var(--surface-2); }
.chip-btn.is-active { background: var(--accent-wash); color: var(--accent-text); border-color: transparent; }

/* product grid */
.no-grid { display: grid; gap: var(--sp-3); }
.no-grid--foto { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.no-grid--compatta { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.no-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.no-card.is-out { opacity: 0.62; }
.no-card__img { width: 100%; object-fit: cover; display: block; background: var(--surface-2); }
.no-card__imgph { width: 100%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.no-card__body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.no-card__name { font-size: var(--text-base); font-weight: var(--weight-bold); line-height: 1.2; }
.no-card__desc { font-size: var(--text-xs); color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.no-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: 6px; }
.no-card__price { font-size: var(--text-sm); font-weight: var(--weight-bold); }
.no-badge { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-1); }

/* product list view */
.no-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.no-row { display: flex; align-items: center; gap: 13px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.no-row.is-out { opacity: 0.62; }
.no-row__img { width: 54px; height: 54px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.no-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* ── Cart (right) ── */
.no-cart { width: 404px; flex: none; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.no-det { flex: none; border-bottom: 1px solid var(--border); }
.no-det__toggle { display: flex; align-items: center; gap: 11px; width: 100%; padding: 15px 20px; text-align: left; background: none; border: none; cursor: pointer; }
.no-det__ico { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); }
.no-det__body { max-height: 44vh; overflow-y: auto; padding: 2px 20px 18px; display: flex; flex-direction: column; gap: 13px; }
.no-cart__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
.no-cart__list { flex: 1; overflow-y: auto; padding: 4px 20px 8px; min-height: 0; }
.no-cart__foot { flex: none; padding: 14px 20px 18px; border-top: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 11px; }
.no-line { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.no-line__main { flex: 1; min-width: 0; }
.no-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex: none; }
.no-line__pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.no-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-soft); }
.no-pill--add { background: var(--confirm-wash); color: var(--confirm-strong); }
.no-pill--rem { background: var(--danger-wash); color: var(--danger-strong); text-decoration: line-through; }
.no-tot { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--ink-soft); }
.no-tot--grand { align-items: baseline; padding-top: 7px; border-top: 1px solid var(--border); }
.no-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 180px; gap: 10px; color: var(--ink-soft); }
.no-empty__ico { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }

/* qty stepper (shared by cart line + modal) */
.qty { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.qty__btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; color: var(--ink-soft); font-size: 18px; font-weight: 600; background: none; border: none; cursor: pointer; }
.qty__btn:hover { background: var(--surface); }
.qty__n { min-width: 30px; text-align: center; font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Centered customization modal ── */
.modal-scrim { position: fixed; inset: 0; z-index: var(--z-modal-backdrop); background: oklch(0.25 0.02 260 / 0.38); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade var(--dur-base) var(--ease-out); }
.modal { width: 580px; max-width: 100%; max-height: 90vh; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-2); display: flex; flex-direction: column; overflow: hidden; animation: km-pop var(--dur-slow) var(--ease-out); }
@keyframes km-pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
.modal__head { display: flex; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.modal__body { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 20px; }
.modal__foot { flex: none; display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--border); }

/* option tiles / pills inside the modal */
.optgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px; border-radius: 8px; border: 1.5px solid var(--border-strong); background: var(--surface); text-align: left; cursor: pointer; }
.tile.is-active { border-color: var(--accent); background: var(--accent-wash); }
.optpills { display: flex; flex-wrap: wrap; gap: 9px; }
.optpill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 8px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.optpill.is-active { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-text); }
.optpill--add.is-active { border-color: var(--confirm); background: var(--confirm-wash); color: var(--confirm-strong); }
.optpill--rem.is-active { border-color: var(--danger); background: var(--danger-wash); color: var(--danger-strong); text-decoration: line-through; }

/* dense icon button (fine pointer) — bumped to 44px on touch below */
.iconbtn--sm { width: 30px; height: 30px; }
/* prominent stepper inside the customization modal */
.qty--lg .qty__btn { width: 38px; height: 38px; font-size: 20px; }
.qty--lg .qty__n { min-width: 36px; font-size: var(--text-base); }

/* ── Touch input (tablet in pizzeria): enforce ≥44px targets. Mouse/trackpad
   (pointer: fine) keeps the denser desktop sizing untouched. ── */
@media (pointer: coarse) {
  .btn, .btn--sm { min-height: var(--touch-min); height: auto; }
  .input, select.input { height: var(--touch-min); }
  textarea.input { height: auto; min-height: var(--touch-min); }
  .seg__btn, .chip-btn { min-height: var(--touch-min); }
  .qty__btn, .qty--lg .qty__btn { width: var(--touch-min); height: var(--touch-min); }
  .qty__n { min-width: 40px; }
  .iconbtn--sm { width: var(--touch-min); height: var(--touch-min); }
  .optpill, .tile { min-height: var(--touch-min); }
}

@media (max-width: 1040px) { .no-cart { width: 340px; } }

/* Stacked (phone / narrow tablet portrait): one document scroll, not two
   nested scroll panes. The whole builder scrolls; catalog then cart flow. */
@media (max-width: 820px) {
  .no-screen { flex-direction: column; overflow-y: auto; }
  .no-cat { flex: none; }
  .no-cat__scroll { overflow: visible; padding: var(--sp-4) var(--sp-4) var(--sp-6); }
  .no-cart { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .no-cart__list { flex: none; overflow: visible; min-height: 0; }
  .no-det__body { max-height: none; }
  .cartfab--phone { display: inline-flex; }
}

/* ── Courier delivery page (standalone, mobile-first) ─────────────────── */
.courier { max-width: 720px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) var(--sp-8); }
.courier__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0 var(--sp-4); position: sticky; top: 0; background: var(--surface); z-index: 5; }
.courier__logo { flex: none; }
.courier__headmain { flex: 1; min-width: 0; }
.courier__title { font-weight: 700; font-size: 1.15rem; }
.courier__sub { color: var(--ink-soft); font-size: var(--text-sm); text-transform: capitalize; }
.courier__list { display: flex; flex-direction: column; gap: var(--sp-3); }
.courier__skel { display: flex; flex-direction: column; gap: var(--sp-3); }
.courier__empty { text-align: center; color: var(--ink-soft); padding: var(--sp-8) var(--sp-4); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.courier__emptytitle { font-weight: 600; color: var(--ink); }

.dcard { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); box-shadow: var(--shadow-1); }
.dcard__top { display: flex; align-items: center; gap: var(--sp-2); }
.dcard__slot { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.dcard__cust { font-weight: 600; font-size: 1.05rem; }
.dcard__addr { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink); text-decoration: none; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dcard__addr:hover { color: var(--accent-strong); }
.dcard__foot { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-1); }
.dcard__total { font-weight: 700; font-size: 1.1rem; }
.dcard__deliver { margin-left: auto; min-height: 48px; padding-inline: var(--sp-5); font-size: 1rem; }
.dcard__assign { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); }
.dcard__assign .input { flex: 1; }
/* One order inside a delivery run (giro) card. */
.dcard__order { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.dcard__order:last-of-type { border-bottom: none; }

/* ── Orders "Simple" layout (printed / deliver, touch-friendly) ──────── */
.simplelist { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); }
.simplerow { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.simplerow.is-unprinted { border-left: 4px solid var(--st-pending-fg, #c80); }
.simplerow__main { flex: 1; min-width: 0; cursor: pointer; }
.simplerow__cust { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; flex-wrap: wrap; }
.simplerow__slot { font-variant-numeric: tabular-nums; font-weight: 700; }
.simplerow__items { font-size: var(--text-sm); margin-top: 2px; }
.simplerow__actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.simplebtn { min-height: 48px; padding-inline: var(--sp-4); font-size: 1rem; }
.simpletag { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding-inline: var(--sp-3); color: var(--ink-soft); font-size: var(--text-sm); }
.simpletag--ok { color: var(--st-ready-fg, #2a8); }
@media (max-width: 640px) {
  .simplerow { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .simplerow__actions { justify-content: space-between; }
  .simplebtn { flex: 1; }
}

/* ---- Board summary strip (active counts + next slot, above every layout) ---- */
.boardsummary { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-2) var(--sp-6); border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--text-sm); color: var(--ink-soft); }
.bsum { display: inline-flex; align-items: center; gap: 5px; }
.bsum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bsum--warn b { color: var(--st-pending-fg); }
.bsum--next b { color: var(--accent); }

/* ---- Dense mode: one-line cards/rows, item summaries live in the drawer ---- */
.is-dense .ocard { padding: var(--sp-2); gap: 3px; }
.is-dense .ocard__items, .is-dense .olistrow__sub, .is-dense .simplerow__items { display: none; }
.is-dense .ocard__cust, .is-dense .ocard__total { font-size: var(--text-sm); }
.is-dense .olistrow { padding: var(--sp-2) var(--sp-3); }
.orderlist.is-dense, .simplelist.is-dense { gap: 4px; }
.simplelist.is-dense .simplerow { padding: var(--sp-2) var(--sp-3); }
.simplelist.is-dense .simpletag { min-height: 36px; }

/* ---- Closed orders (show-completed toggle) ---- */
.ocard--closed, .olistrow.is-closed, .simplerow.is-closed, tr.is-closed td { opacity: .55; }
.boardcol--closedcol .boardcol__head { color: var(--ink-soft); }

/* ---- Collapsible slot groups ---- */
.boardcol__head--click, .slotsec__head--click, .slotgroup__head { cursor: pointer; user-select: none; }
.boardcol__head--click .chev, .slotsec__head--click .chev { margin-left: auto; color: var(--ink-soft); }
.slotsec__head--click { display: flex; align-items: center; }
.slotsec__count { margin-left: 4px; font-variant-numeric: tabular-nums; }
.slotgroup__head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-1); font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px dashed var(--border); margin-top: var(--sp-2); }
.slotgroup__head:first-child { margin-top: 0; }
.slotgroup__title { color: var(--ink); }
.slotgroup__meta { margin-left: auto; font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }

/* --- SLOT LOAD VIEW (Home, layout "Carico") — una riga orizzontale per
   fascia oraria, barra impilata cliccabile. Palette validata CVD (adjacent
   ΔE ≥ 12) su superficie chiara: completate teal / asporto blu / domicilio
   viola / disponibili verde. Gap 2px tra segmenti; identità mai solo colore
   (legenda sempre presente + tooltip per riga). */
.loadview { padding: var(--sp-3) var(--sp-4); }
.slotchart__head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.slotchart__title { font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--ink); }
.slotchart__legend { margin-left: auto; display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--ink-soft); }
.lg__dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg__dot--done     { background: var(--chart-done); }
.lg__dot--takeaway { background: var(--chart-takeaway); }
.lg__dot--delivery { background: var(--chart-delivery); }
.lg__dot--free     { background: var(--chart-free); }
.loadrow { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: 6px var(--sp-2);
  background: none; border: none; cursor: pointer; border-radius: var(--r-control); text-align: left; }
.loadrow:hover { background: var(--surface-2); }
.loadrow:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.loadrow__time { flex: 0 0 56px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--ink); font-variant-numeric: tabular-nums; }
.loadrow__track { flex: 1; min-width: 0; }
.loadrow__bar { display: flex; gap: 2px; height: 18px; border-radius: 0 4px 4px 0; overflow: hidden; min-width: 4px; }
.seg { display: block; height: 100%; min-width: 3px; }
.seg--free     { background: var(--chart-free); }
.seg--delivery { background: var(--chart-delivery); }
.seg--takeaway { background: var(--chart-takeaway); }
.seg--done     { background: var(--chart-done); }
.loadrow__nums { flex: 0 0 auto; font-size: var(--text-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Header di pagina che resta ancorato in alto durante lo scroll (Funzioni).
   .content è lo scroll container col suo padding: il margine/padding negativo
   porta l'header a filo del bordo e il background copre ciò che scorre sotto. */
.content__head--sticky { position: sticky; top: calc(var(--sp-6) * -1); z-index: 20;
  background: var(--bg); margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) var(--sp-6);
  padding: var(--sp-6) var(--sp-6) var(--sp-3); border-bottom: 1px solid var(--border); }
