/* Ordini agenti — grafica v3 (prova "Ordini agenti v3" su claude.ai).
   Blu del gruppo (loghi Supercolor/Stadio/PPG) + giallo segnale per i valori "indicativi". Light/dark automatico. */
:root {
  color-scheme: light;
  --page: #e6edf2; --bg: #f4f7f9; --surface: #ffffff; --fg: #0f2433; --muted: #577082; --line: #d9e3ea;
  --brand: #006da3; --brand-fg: #ffffff; --brand-soft: #e0eef6; --brand-deep: #00507a;
  --signal: #b7791f; --signal-soft: #fdf3dc;
  --ok: #1d7a4a; --ok-soft: #dff3e8; --warn: #a15c07; --warn-soft: #fcefd9; --err: #b42318; --err-soft: #fde6e3;
  --shadow: 0 1px 2px rgba(21,32,46,.06), 0 8px 24px rgba(21,32,46,.08);
  --f-ui: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --f-code: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --page: #081118; --bg: #0d1820; --surface: #13222d; --fg: #e4eef4; --muted: #8ea6b6; --line: #213443;
  --brand: #3d9fd6; --brand-fg: #06131c; --brand-soft: #12304a; --brand-deep: #0b2a3d;
  --signal: #e2b24f; --signal-soft: #332914;
  --ok: #4cc38a; --ok-soft: #14301f; --warn: #e5a54a; --warn-soft: #33250f; --err: #f2766b; --err-soft: #3a1714;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
} }
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #081118; --bg: #0d1820; --surface: #13222d; --fg: #e4eef4; --muted: #8ea6b6; --line: #213443;
  --brand: #3d9fd6; --brand-fg: #06131c; --brand-soft: #12304a; --brand-deep: #0b2a3d;
  --signal: #e2b24f; --signal-soft: #332914;
  --ok: #4cc38a; --ok-soft: #14301f; --warn: #e5a54a; --warn-soft: #33250f; --err: #f2766b; --err-soft: #3a1714;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); color: var(--fg); font: 16px/1.4 var(--f-ui); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, a, input, select, textarea, .item, .line, .field { touch-action: manipulation; } /* niente zoom al doppio tap */
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.code { font-family: var(--f-code); font-size: 12.5px; letter-spacing: -.01em; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
mark { background: var(--signal-soft); color: inherit; border-radius: 3px; }
[hidden] { display: none !important; }

/* schermata a tutta pagina, centrata su desktop */
/* altezza: 100dvh segue la barra di Safari che appare/scompare; su iOS standalone riempie tutto lo schermo */
html, body { background: var(--bg); }
#app { position: fixed; top: 0; left: 0; right: 0; height: 100%; height: 100dvh; display: flex; justify-content: center; background: var(--bg); } /* l'altezza viene poi fissata da JS (fitHeight) */
html.standalone #app { position: absolute; } /* iOS app: fixed viene tagliato al viewport corto, vedi fitHeight */
/* --gut = margine laterale: 16px su telefono, poi quanto basta per tenere il contenuto entro la larghezza massima
   (le intestazioni restano a tutta larghezza). Il % si risolve sull'elemento che lo usa. */
.screen { --gut: max(16px, calc((100% - 640px) / 2)); width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pad { padding: 16px var(--gut); display: flex; flex-direction: column; gap: 16px; }

.bar { display: flex; align-items: center; gap: 8px; padding: 14px calc(var(--gut) - 4px) 10px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); background: var(--bg); }
.bar.brand { background: var(--brand); color: var(--brand-fg); }
.bar .title { flex: 1; min-width: 0; }
.bar .title b { display: block; font: 700 18px/1.15 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .title small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.brand .title small { color: inherit; opacity: .8; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--brand-soft); }
.bar.brand .icon-btn:hover { background: rgba(255,255,255,.15); }
.icon-btn svg, .btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar.brand { padding-bottom: 14px; }
/* mazzetta sotto l'intestazione: blu del gruppo + campioni RAL 3020 1023 6018 5015 2004 7035 9005 */
.mazzetta { display: flex; height: 6px; flex: none; }
.mazzetta i { flex: 1; } .mazzetta i:first-child { flex: 4; background: var(--brand); }
.bar.brand + .mazzetta i:first-child { background: var(--brand-deep); }
/* nome azienda nello stile dei loghi Supercolor/Stadio: maiuscolo in rettangolo arrotondato */
.marchio { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; max-width: 100%; }
.marchio .box { display: inline-block; background: var(--brand-fg); color: var(--brand); font: 800 21px/1 var(--f-head); letter-spacing: .02em; text-transform: uppercase; padding: 5px 9px 4px; border-radius: 7px; }
.marchio small { font: 600 10.5px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; margin-top: 5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pennellata { position: absolute; z-index: -1; right: -30px; top: -14px; width: 260px; height: 120px; color: #2a9bd8; pointer-events: none; }
.steps { display: flex; gap: 4px; padding: 0 var(--gut) 10px; background: var(--bg); }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--brand); }

h2.sec { font: 600 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -6px; }

.search { position: relative; margin: 0 var(--gut) 8px; }
.search input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 500 17px var(--f-ui); padding: 0 44px 0 46px; }
.search input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.search svg { position: absolute; left: 14px; top: 15px; width: 22px; height: 22px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search .clear { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 10px; color: var(--muted); font-size: 20px; }

.list { background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; width: 100%; text-align: left; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
button.item:hover { background: var(--brand-soft); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .s { font-size: 13.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.disabled { opacity: .55; cursor: not-allowed; }
/* avatar cliente = campione colore, tinta ricavata dal codice (solo identità visiva) */
.avatar { width: 40px; height: 40px; border-radius: 10px 10px 10px 3px; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 15px var(--f-head); flex: none; box-shadow: inset 0 -10px 0 rgba(0,0,0,.12); }
.avatar.lt { color: #1b1b1b; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.wait { background: var(--warn-soft); color: var(--warn); } .pill.err { background: var(--err-soft); color: var(--err); }
.pill.qty { background: var(--brand); color: var(--brand-fg); font-size: 13px; }
.pills { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pill.hint { background: var(--signal-soft); color: var(--signal); }.add { width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 26px; line-height: 1; display: grid; place-items: center; flex: none; }

.btn { height: 54px; border-radius: 16px; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; width: 100%; }
.btn.primary { background: var(--brand); color: var(--brand-fg); }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--err); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .sub { font-weight: 500; opacity: .85; }

.foot { padding: 10px var(--gut) 16px; padding-bottom: max(16px, calc(4px + env(safe-area-inset-bottom, 0px))); background: var(--bg); border-top: 1px solid var(--line); }
.cartbar { display: flex; align-items: center; justify-content: space-between; }
.cartbar .left { text-align: left; line-height: 1.15; }
.cartbar .left small { display: block; font-weight: 500; font-size: 13px; opacity: .85; }

.hero { background: var(--brand-deep); color: #fff; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; isolation: isolate; }
.hero h1 { margin: 0; font: 800 28px/1.05 var(--f-head); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.hero .btn { background: #fff; color: var(--brand-deep); }
.draft { display: flex; gap: 12px; align-items: center; background: var(--signal-soft); border-radius: 16px; padding: 12px 14px; text-align: left; width: 100%; }
.draft .grow { flex: 1; min-width: 0; }
.draft b { display: block; } .draft small { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px; }
.chip.on { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }

/* riepilogo */
.line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line.flag { background: var(--err-soft); }
.line .t { font-weight: 600; line-height: 1.2; }
.line .s { font-size: 13.5px; color: var(--muted); }
.line .tot { text-align: right; font-weight: 600; align-self: center; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.stepper button { width: 38px; height: 36px; font-size: 20px; color: var(--brand); }
.stepper span { min-width: 64px; text-align: center; font-weight: 600; font-size: 14.5px; }
.field { display: flex; align-items: center; gap: 12px; padding: 14px; border-top: 1px solid var(--line); width: 100%; text-align: left; min-height: 60px; }
.field:first-child { border-top: 0; }
.field .k { font-size: 13px; color: var(--muted); } .field .v { font-weight: 600; }
.field .grow { flex: 1; min-width: 0; }
.field .chev { color: var(--muted); font-size: 20px; }
.field.open { flex-direction: column; align-items: stretch; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opts.col { flex-direction: column; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; width: 100%; }
.radio.on { border-color: var(--brand); background: var(--brand-soft); }
.radio i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; margin-top: 2px; }
.radio.on i { border: 6px solid var(--brand); }
textarea, .inp, select.inp { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: 16px var(--f-ui); padding: 10px 12px; }
.note { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.note b { color: var(--signal); }
.totale { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-top: 1px solid var(--line); font-weight: 700; }
.totale small { font-weight: 500; color: var(--muted); }

/* slide per eliminare: trascinando a sinistra compare il cestino rosso */
.swipe { position: relative; overflow: hidden; border-radius: 16px; }
.swipe-bg { position: absolute; inset: 0; display: flex; justify-content: flex-end; background: var(--err); border-radius: inherit; }
.swipe-bg button { width: 88px; height: 100%; color: #fff; display: grid; place-items: center; }
.swipe-bg svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swipe-fg { position: relative; transition: transform .18s ease; touch-action: pan-y; will-change: transform; }
.swipe.dragging .swipe-fg { transition: none; }
.list .swipe { border-radius: 0; }
.list .swipe .item { background: var(--surface); }

/* sheet */
.backdrop { position: absolute; inset: 0; background: rgba(10,16,24,.45); display: flex; align-items: flex-end; z-index: 20; animation: fade .15s ease; }
.sheet { background: var(--surface); width: 100%; max-height: 92%; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 8px 16px 16px; padding-bottom: max(16px, calc(4px + env(safe-area-inset-bottom, 0px))); display: flex; flex-direction: column; gap: 14px; animation: up .2s ease; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 0; }
.sheet h3 { margin: 0; font: 700 20px/1.15 var(--f-head); text-wrap: balance; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); font-size: 30px; flex: none; }
.qty input { flex: 1; min-width: 0; height: 60px; text-align: center; font: 700 30px var(--f-head); border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--fg); }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; overflow-x: auto; }
.seg button { flex: 1; min-width: 72px; height: 42px; border-radius: 10px; font-weight: 600; font-size: 14.5px; line-height: 1.1; }
.seg button small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg.mini button { min-width: 0; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); color: var(--brand); }
.row2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sw { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw.on { background: var(--ok); } .sw.on::after { left: 21px; }
.linkbtn { color: var(--brand); font-weight: 600; font-size: 14.5px; padding: 6px 0; }
.pricebox { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pricebox .k { font-size: 12.5px; color: var(--muted); }
.pricebox .v { font: 700 22px/1.1 var(--f-head); }
.pricebox .d { font-size: 13px; color: var(--muted); }
.pricebox.signal { border-color: var(--signal); background: var(--signal-soft); }

/* invio */
.result { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 24px; width: 100%; max-width: 560px; margin: 0 auto; }
.track { display: flex; flex-direction: column; gap: 18px; }
.trk { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.trk .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.trk.done { color: var(--fg); } .trk.done .dot { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.trk.run { color: var(--fg); } .trk.run .dot { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.trk.fail { color: var(--fg); } .trk.fail .dot { background: var(--err); border-color: var(--err); color: var(--bg); }
.trk b { display: block; } .trk small { font-size: 13.5px; color: var(--muted); }
.bigno { font: 800 44px/1 var(--f-head); color: var(--ok); letter-spacing: .01em; }
.tratto { display: block; width: 180px; height: 22px; color: var(--ok); margin-top: 4px; }
.errbox { background: var(--err-soft); color: var(--fg); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.errbox b { color: var(--err); }
.errbox ul { margin: 6px 0 0; padding-left: 18px; }
/* sezione Clienti: ricerca sotto la mazzetta; scheda cliente: contatti cliccabili */
.s-clienti .search { margin-top: 12px; }
.field a { color: var(--brand); text-decoration: none; }

.toast { position: absolute; left: max(16px, calc((100% - 480px) / 2)); right: max(16px, calc((100% - 480px) / 2)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 30; font-size: 14.5px; animation: up .2s ease; }
.toast button { color: var(--signal); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 14.5px; }
.tabs { display: flex; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs button { flex: 1; height: 58px; font-weight: 600; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tabs button.on { color: var(--brand); }
.tabs svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* login */
.login-top { background: var(--brand); color: var(--brand-fg); padding: 36px max(24px, calc((100% - 440px) / 2)) 28px; padding-top: calc(36px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; isolation: isolate; flex: none; }
.login-top h1 { margin: 0; font: 800 34px/1 var(--f-head); text-transform: uppercase; }
.login-top .pennellata { right: -50px; top: auto; bottom: -38px; width: 300px; opacity: .7; }
.marchi { display: flex; flex-wrap: wrap; gap: 6px; }
.marchi span { font: 800 13px/1 var(--f-head); text-transform: uppercase; letter-spacing: .03em; background: var(--brand-fg); color: var(--brand); padding: 5px 7px 4px; border-radius: 5px; }
.login { flex: 1; display: flex; flex-direction: column; padding: 24px max(24px, calc((100% - 440px) / 2)); gap: 16px; overflow-y: auto; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.login input { height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 500 18px var(--f-ui); padding: 0 14px; }

/* ---------- tablet e desktop ----------
   Su telefono: elementi nascosti o trasparenti (le colonne della home non esistono, il pannello laterale non c'è). */
.side, .only-wide { display: none; }
.cols, .col { display: contents; }
@media (hover: hover) {
  button.field:hover, .chip:hover:not(.on), .radio:hover:not(.on) { background: var(--brand-soft); }
  .btn.primary:hover:not(:disabled) { background: var(--brand-deep); }
  .tabs button:hover:not(.on) { color: var(--fg); }
}

/* tablet (≥700px): contenuto centrato e più largo, pannelli come finestre al centro, risultati a schede su più colonne */
@media (min-width: 700px) {
  .screen { --gut: max(24px, calc((100% - 760px) / 2)); }
  .bar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
  .bar .title b { font-size: 21px; }
  .bar .title small { font-size: 14px; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 36px; }
  .hero .btn { max-width: 360px; }
  .list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; overflow: visible; }
  .list.grid > .item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .list.grid > .item:first-child { border-top: 1px solid var(--line); }
  .backdrop { align-items: center; justify-content: center; padding: 24px; }
  .sheet { max-width: 560px; max-height: 100%; border-radius: 22px; padding: 20px 22px 22px; box-shadow: var(--shadow); }
  .sheet .grab { display: none; }
  .tabs { justify-content: center; }
  .tabs button { flex: 0 1 180px; }
  /* riepilogo: quantità e totale sulla stessa riga dell'articolo */
  .s-riepilogo .line { grid-template-columns: minmax(0, 1fr) auto 110px; align-items: center; gap: 4px 16px; }
  .s-riepilogo .line > button { grid-column: auto !important; }
}

/* desktop e tablet orizzontale (≥1000px) */
@media (min-width: 1000px) {
  .s-home, .s-ordini, .s-cliente, .s-clienti { --gut: max(32px, calc((100% - 1080px) / 2)); }

  /* Ordini / Storico / Impostazioni: la barra delle schede diventa una colonna a sinistra */
  .s-home, .s-ordini, .s-impostazioni { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .s-home > :is(.bar, .mazzetta, .scroll), .s-ordini > :is(.bar, .mazzetta, .scroll), .s-impostazioni > :is(.bar, .mazzetta, .scroll) { grid-column: 2; }
  .s-clienti { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); }
  .s-clienti > :is(.bar, .mazzetta, .search, .scroll) { grid-column: 2; }
  .screen > .tabs { grid-column: 1; grid-row: 1 / -1; flex-direction: column; justify-content: flex-start; gap: 6px; border-top: 0; border-right: 1px solid var(--line); padding: calc(18px + env(safe-area-inset-top, 0px)) 10px 16px; }
  .screen > .tabs::before { content: ""; width: 52px; height: 52px; margin: 0 auto 14px; flex: none; background: url(icon.svg) center / contain no-repeat; border-radius: 12px; }
  .screen > .tabs button { flex: none; height: 74px; border-radius: 14px; gap: 4px; }
  .screen > .tabs button.on { background: var(--brand-soft); }

  /* Ordini: due colonne (bozza, nuovo ordine, clienti recenti | ultimi ordini) */
  .s-home .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .s-home .col { display: flex; flex-direction: column; gap: 16px; }
  .s-home .hero { min-height: 200px; justify-content: space-between; }

  /* Articoli: risultati a sinistra, righe dell'ordine sempre visibili a destra */
  .s-articoli { --gut: max(24px, calc((100% - 900px) / 2)); display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto auto minmax(0, 1fr); }
  .s-articoli > :is(.bar, .steps, .search, .scroll) { grid-column: 1; }
  .s-articoli > .foot, .s-articoli .nell-ordine { display: none; }
  .s-articoli .only-wide { display: block; }
  .s-articoli > .side { grid-column: 2; grid-row: 1 / -1; display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); background: var(--surface); border-left: 1px solid var(--line); }
  .side-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
  .side-list h2.sec { margin: 10px 0 0; }

  /* accesso: fascia blu a sinistra, mazzetta verticale, modulo a destra */
  .s-login { flex-direction: row; }
  .s-login .login-top { flex: 1; justify-content: flex-end; padding: 56px; padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
  .s-login .login-top h1 { font-size: 72px; }
  .s-login .login-top .pennellata { width: 560px; height: 260px; right: -60px; bottom: -70px; }
  .s-login > .mazzetta { flex-direction: column; height: auto; width: 8px; }
  .s-login .login { flex: none; width: 480px; justify-content: center; padding: 56px; }
}

@keyframes up { from { transform: translateY(16px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
