/* Full Stack Food — stile Windows Fluent, pensato per il touch (tasti min 52-56 px). */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Roboto", sans-serif;
  --bg: #f3f3f3; --sup: #ffffff; --sup2: #f9f9f9; --linea: #e0e0e0; --linea2: #d1d1d1;
  --testo: #1b1b1b; --testo2: #5c5c5c; --testo3: #6e6e6e;
  --acc: #0f6cbd; --acc-h: #115ea3; --acc-p: #0c3b5e; --acc-l: #ebf3fc;
  --ok: #0e700e; --ok-l: #e9f5e9; --att: #9d5d00; --att-l: #fff4e0; --err: #b10e1c; --err-l: #fdecee;
  --r: 6px; --r2: 8px;
  --om1: 0 1px 2px rgba(0,0,0,.08), 0 0 1px rgba(0,0,0,.08);
  --om2: 0 4px 10px rgba(0,0,0,.10), 0 0 2px rgba(0,0,0,.10);
  --om3: 0 16px 36px rgba(0,0,0,.18), 0 0 3px rgba(0,0,0,.12);
  --tocco: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.4 var(--font); color: var(--testo); background: var(--bg); -webkit-tap-highlight-color: transparent; }
::selection { background: var(--acc); color: #fff; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #c4c4c4 transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.ico { flex: none; }
[hidden] { display: none !important; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--linea2);
  border-bottom-color: #c0c0c0; border-radius: var(--r); background: var(--sup); color: var(--testo); font-weight: 600; text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s; white-space: nowrap; }
.btn:hover { background: var(--sup2); }
.btn:active { transform: scale(.98); background: #f0f0f0; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primario { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-primario:hover { background: var(--acc-h); }
.btn-primario:active { background: var(--acc-p); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-err { color: var(--err); }
.btn-quieto { background: transparent; border-color: transparent; color: var(--testo2); }
.btn-quieto:hover { background: rgba(0,0,0,.05); }
.btn-g { min-height: var(--tocco); font-size: 16px; padding: 0 20px; }
.link { background: none; border: 0; color: var(--acc); padding: 10px; font-weight: 600; }
.errore { color: var(--err); font-weight: 600; margin: 8px 0; }

/* ---------- Accesso ---------- */
.accesso { min-height: 100dvh; display: grid; place-items: start center; background: linear-gradient(180deg, #eef3f8 0, var(--bg) 320px); }
.acc { width: min(720px, 100%); padding: max(24px, env(safe-area-inset-top)) 16px 24px; }
.acc-testa { display: flex; gap: 14px; align-items: center; margin: 12px 0 28px; }
.acc-testa h1 { font-size: 22px; }
.acc-testa p { margin: 2px 0 0; color: var(--testo2); }
.acc-form h2, .acc-gia p { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.acc-utenti { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.acc-u { display: flex; gap: 12px; align-items: center; min-height: 68px; padding: 10px 14px; text-align: left; background: var(--sup); border: 1px solid var(--linea);
  border-radius: var(--r2); box-shadow: var(--om1); transition: border-color .12s, transform .08s; }
.acc-u:hover { border-color: var(--acc); }
.acc-u:active { transform: scale(.98); }
.acc-u strong { display: block; }
.acc-u small { color: var(--testo2); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acc-l); color: var(--acc); font-weight: 700; flex: none; }
.acc-pin { max-width: 340px; margin: 0 auto; text-align: center; }
.pin-punti { display: flex; gap: 14px; justify-content: center; margin: 10px 0 18px; }
.pin-punti i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--testo3); transition: background .1s, border-color .1s; }
.pin-punti i.on { background: var(--acc); border-color: var(--acc); }
.tastierino { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tastierino button { height: 64px; border: 1px solid var(--linea); border-radius: var(--r2); background: var(--sup); font-size: 24px; font-weight: 600; box-shadow: var(--om1);
  display: grid; place-items: center; }
.tastierino button:active { background: var(--acc-l); transform: scale(.97); }
.tastierino .ok { background: var(--acc); color: #fff; border-color: var(--acc); }
.acc-vai { display: grid; gap: 8px; max-width: 360px; }
.acc-vai .btn { min-height: var(--tocco); justify-content: flex-start; }
.demo-nota { margin-top: 22px; padding: 10px 12px; border-radius: var(--r); background: var(--att-l); color: #6b3f00; font-size: 13px; }
.credit { margin-top: 28px; color: var(--testo3); font-size: 12px; text-align: center; }
.credit a { color: inherit; }

/* ---------- Guscio app ---------- */
.app { height: 100dvh; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.barra { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: env(safe-area-inset-top) 8px 0; background: rgba(243,243,243,.92);
  backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--linea); position: relative; z-index: 5; }
.barra .titolo { font-weight: 600; font-size: 16px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.barra .titolo small { display: block; font-weight: 400; color: var(--testo2); font-size: 12px; }
.ib { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: var(--r); background: transparent; color: var(--testo); gap: 6px;
  text-decoration: none; grid-auto-flow: column; font-weight: 600; }
.ib:hover { background: rgba(0,0,0,.05); }
.ib:active { background: rgba(0,0,0,.09); }
.ib .etich { font-size: 14px; }
.chip-utente { text-decoration: none; color: var(--testo); display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; height: 36px; border-radius: 18px; background: var(--sup); border: 1px solid var(--linea); font-weight: 600; font-size: 14px; }
.chip-utente .avatar { width: 28px; height: 28px; font-size: 13px; }
.vista { overflow: auto; min-height: 0; }

/* ---------- Mappa sala ---------- */
.sala { padding: 12px 12px 96px; max-width: 1400px; margin: 0 auto; }
.schede { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; }
.scheda { min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r); background: transparent; font-weight: 600; color: var(--testo2); position: relative; }
.scheda[aria-selected="true"] { color: var(--testo); background: var(--sup); box-shadow: var(--om1); }
.scheda[aria-selected="true"]::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 4px; height: 3px; border-radius: 2px; background: var(--acc); }
.tavoli { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tav { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--linea); border-radius: var(--r2); background: var(--sup); box-shadow: var(--om1); transition: transform .08s, box-shadow .12s; }
.tav:active { transform: scale(.97); }
.tav .n { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.tav .info { font-size: 13px; color: var(--testo2); display: flex; justify-content: space-between; gap: 6px; }
.tav .tot { font-weight: 700; color: var(--testo); white-space: nowrap; }
.tav[data-ord] .info { flex-direction: column-reverse; gap: 0; }
.tav[data-ord] .tot { font-size: 17px; }
.tav.occ { background: var(--acc-l); border-color: #b4d6fa; }
.tav.occ .n { color: var(--acc-p); }
.tav.pronte { background: #e9f5e9; border-color: #9fd89f; }
.tav.chiesto { background: var(--att-l); border-color: #f4c97a; }
.tav .stato { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.tav.pronte .stato { background: var(--ok); color: #fff; animation: pulsa 1.6s ease-out infinite; }
.tav.chiesto .stato { background: #9d5d00; color: #fff; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 rgba(14,112,14,.45); } 100% { box-shadow: 0 0 0 10px rgba(14,112,14,0); } }
.sez-titolo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 26px 0 10px; }
.sez-titolo h2 { font-size: 16px; }
.altri { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.altri .tav { min-height: 84px; }
.altri .tav .n { font-size: 17px; }
.vuoto { padding: 18px; border: 1px dashed var(--linea2); border-radius: var(--r2); color: var(--testo2); text-align: center; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; color: var(--testo2); font-size: 13px; }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; border: 1px solid var(--linea2); }

/* ---------- Ordine: menu + conto ---------- */
.ordine { display: grid; grid-template-columns: 1fr; height: 100%; min-height: 0; }
.menu { display: grid; grid-template-rows: auto auto 1fr; min-height: 0; }
.cerca { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 0 12px; height: 44px; background: var(--sup); border: 1px solid var(--linea2); border-bottom: 2px solid #8a8a8a; border-radius: var(--r); }
.cerca:focus-within { border-bottom-color: var(--acc); }
.cerca input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; font-size: 16px; }
.cat { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
.cat button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--linea2); background: var(--sup); font-weight: 600; font-size: 14px; }
.cat button[aria-pressed="true"] { background: var(--testo); border-color: var(--testo); color: #fff; }
.prodotti { overflow: auto; padding: 0 12px 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; align-content: start; }
.pr { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 84px; padding: 10px 12px; text-align: left; border: 1px solid var(--linea);
  border-radius: var(--r2); background: var(--sup); box-shadow: var(--om1); transition: transform .08s; overflow: hidden; }
.pr .rd { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--testo3); }
.pr .rd::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rep, var(--acc)); }
.pr:active { transform: scale(.97); background: var(--sup2); }
.pr .nome { font-weight: 600; line-height: 1.25; }
.pr .pz { display: flex; justify-content: space-between; align-items: center; color: var(--testo2); font-size: 14px; }
.pr .qn { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--acc); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.pr.esaurito { opacity: .5; }
.pr.esaurito .pz::after { content: "Esaurito"; color: var(--err); font-weight: 700; }
.pr .piu { font-size: 12px; color: var(--testo3); }

.conto { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: var(--sup); border-left: 1px solid var(--linea); }
.conto-testa { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--linea); }
.conto-testa h2 { font-size: 16px; }
.righe { overflow: auto; padding: 4px 0 12px; }
.gruppo { padding: 10px 14px 4px; font-size: 12px; font-weight: 700; color: var(--testo2); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; align-items: center; }
.riga { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: start; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #f0f0f0; background: none; text-align: left; }
.riga:active { background: var(--sup2); }
.riga .q { font-weight: 700; font-size: 16px; }
.riga .n { font-weight: 600; }
.riga .v { display: block; font-size: 13px; color: var(--testo2); font-weight: 400; }
.riga .nt { display: block; font-size: 13px; color: var(--att); font-weight: 600; }
.riga .p { font-weight: 600; }
.riga .st { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 700; background: #eee; color: var(--testo2); }
.st-inviata, .st-in_corso { background: var(--acc-l) !important; color: var(--acc-p) !important; }
.st-pronta { background: var(--ok) !important; color: #fff !important; }
.st-stornata { background: var(--err-l) !important; color: var(--err) !important; }
.riga.stornata .n, .riga.stornata .p { text-decoration: line-through; color: var(--testo3); }
.riga.nuova { background: #fffbea; }
.totali { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); background: var(--sup2); }
.tot-r { display: flex; justify-content: space-between; color: var(--testo2); font-size: 14px; padding: 1px 0; }
.tot-g { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 10px; font-size: 22px; font-weight: 700; }
.azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.azioni .largo { grid-column: 1 / -1; }

/* Barra in basso su telefono */
.barra-basso { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px); border-top: 1px solid var(--linea); display: flex; gap: 8px; }
.barra-basso .btn { flex: 1; min-height: var(--tocco); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--acc); font-size: 13px; font-weight: 700; }

@media (max-width: 899px) {
  .conto { position: fixed; inset: auto 0 0 0; height: 86dvh; z-index: 8; border-radius: 12px 12px 0 0; box-shadow: var(--om3); border-left: 0;
    transform: translateY(105%); transition: transform .28s cubic-bezier(.16,1,.3,1); }
  .conto.aperto { transform: none; }
  .velo { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 7; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .velo.on { opacity: 1; pointer-events: auto; }
  .solo-pc { display: none !important; }
}
@media (min-width: 900px) {
  .ordine { grid-template-columns: 1fr minmax(360px, 34%); }
  .barra-basso, .velo, .solo-tel { display: none !important; }
  .prodotti { padding-bottom: 24px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .pr { min-height: 92px; }
  .sala { padding-bottom: 24px; }
}

/* ---------- Finestre (dialog) ---------- */
dialog { border: 0; padding: 0; border-radius: var(--r2); box-shadow: var(--om3); width: min(520px, calc(100vw - 20px)); max-height: calc(100dvh - 30px); background: var(--sup); color: var(--testo); }
dialog::backdrop { background: rgba(0,0,0,.32); }
dialog[open] { animation: entra .22s cubic-bezier(.16,1,.3,1); }
@keyframes entra { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dl { display: grid; grid-template-rows: auto 1fr auto; max-height: calc(100dvh - 30px); }
.dl-testa { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px 8px; }
.dl-testa h2 { font-size: 19px; }
.dl-corpo { padding: 6px 18px 12px; overflow: auto; }
.dl-piede { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; background: var(--sup2); border-top: 1px solid var(--linea); }
.dl-piede .btn { min-height: 48px; }
@media (max-width: 600px) {
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 12px 12px 0 0; }
  dialog[open] { animation: sale .26s cubic-bezier(.16,1,.3,1); }
  .dl-piede { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .dl-piede .btn { flex: 1; }
}
@keyframes sale { from { transform: translateY(40%); opacity: .4; } }
.etichetta { display: block; font-size: 13px; font-weight: 600; color: var(--testo2); margin: 14px 0 6px; }
.campo { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--linea2); border-bottom: 2px solid #8a8a8a; border-radius: var(--r); background: var(--sup); font-size: 16px; }
.campo:focus { outline: 0; border-bottom-color: var(--acc); }
textarea.campo { min-height: 70px; resize: vertical; }
.qta { display: flex; align-items: center; gap: 10px; }
.qta button { width: 52px; height: 52px; border-radius: var(--r2); border: 1px solid var(--linea2); background: var(--sup); display: grid; place-items: center; }
.qta output { min-width: 48px; text-align: center; font-size: 26px; font-weight: 700; }
.opzioni { display: flex; flex-wrap: wrap; gap: 6px; }
.opz { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--linea2); background: var(--sup); font-weight: 600; font-size: 14px; }
.opz small { color: var(--testo2); font-weight: 400; margin-left: 4px; }
.opz[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.opz[aria-pressed="true"] small { color: #d6e9fb; }
.tasti-n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tasti-n button { height: 54px; border: 1px solid var(--linea); border-radius: var(--r); background: var(--sup); font-size: 20px; font-weight: 600; }
.tasti-n button[aria-pressed="true"] { background: var(--acc); color: #fff; border-color: var(--acc); }
.elenco-az { display: grid; gap: 6px; }
.elenco-az .btn { justify-content: flex-start; min-height: var(--tocco); }
.paga-tot { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.paga-tot strong { font-size: 30px; letter-spacing: -.02em; }
.metodi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.metodi .opz { border-radius: var(--r); min-height: 52px; }
.resto { margin-top: 10px; padding: 12px; border-radius: var(--r); background: var(--ok-l); color: var(--ok); font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; }
.scontrino { font: 13px/1.35 Consolas, "Cascadia Mono", monospace; white-space: pre; background: #fffef8; border: 1px solid var(--linea); border-radius: var(--r); padding: 12px; overflow: auto; max-height: 50vh; }

/* Avvisi */
.avviso { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 24px); padding: 12px 18px;
  border-radius: var(--r2); background: #2b2b2b; color: #fff; box-shadow: var(--om3); font-weight: 600; animation: entra .2s ease-out; }
.avviso.err { background: var(--err); }
.avviso.ok { background: var(--ok); }
@media (min-width: 900px) { .avviso { bottom: 24px; } }

/* ---------- Monitor reparto (KDS): scuro, si legge da lontano ---------- */
.kds { --bg: #141414; --sup: #222; --sup2: #2a2a2a; --linea: #333; --linea2: #444; --testo: #f5f5f5; --testo2: #c8c8c8; --testo3: #a0a0a0; background: var(--bg); color: var(--testo); }
.kds .barra { background: #1b1b1b; border-color: #333; }
.kds .ib { color: #f5f5f5; }
.kds .ib:hover { background: rgba(255,255,255,.08); }
.kds .chip-utente { background: #2a2a2a; border-color: #3a3a3a; }
.rep-schede { display: flex; gap: 4px; overflow-x: auto; }
.rep-schede button { min-height: 40px; padding: 0 14px; border-radius: var(--r); border: 0; background: transparent; color: #c8c8c8; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.rep-schede button[aria-pressed="true"] { background: var(--rep); color: #fff; }
.rep-schede .badge { background: rgba(255,255,255,.18); color: #fff; }
.ticket-griglia { padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.ticket { background: #fff; color: #1b1b1b; border-radius: var(--r2); overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.ticket .tt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: #e6e6e6; }
.ticket .tt strong { font-size: 20px; letter-spacing: -.01em; }
.ticket .tt small { display: block; font-size: 12px; color: #444; }
.ticket .tempo { font-size: 18px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fff; }
.ticket.giallo .tt { background: #ffe8a3; }
.ticket.rosso .tt { background: #f8c4c9; }
.ticket.rosso .tempo { background: var(--err); color: #fff; }
.ticket.nuovo { animation: arriva 1s ease-out 2; }
@keyframes arriva { 0%, 100% { box-shadow: 0 6px 16px rgba(0,0,0,.4); } 50% { box-shadow: 0 0 0 6px #4cc2ff; } }
.ticket.finito { opacity: .55; }
.ticket ul { list-style: none; margin: 0; padding: 0; }
.ticket li button { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; width: 100%; padding: 11px 12px; border: 0; border-top: 1px solid #ececec; background: #fff; text-align: left; font-size: 18px; color: #1b1b1b; }
.ticket li button:active { background: #f2f2f2; }
.ticket li .q { font-weight: 800; }
.ticket li .n { font-weight: 700; line-height: 1.2; }
.ticket li .v { display: block; font-size: 14px; font-weight: 500; color: #444; }
.ticket li .nt { display: block; font-size: 15px; font-weight: 800; color: var(--err); }
.ticket li.fatto button { color: #8a8a8a; }
.ticket li.fatto .n { text-decoration: line-through; }
.ticket li.attesa button { background: #f6f6f6; color: #666; }
.ticket li .us { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #666; align-self: center; }
.ticket li.via-ora .us { color: #fff; background: var(--ok); padding: 2px 6px; border-radius: 4px; }
.ticket .tp { padding: 8px; border-top: 1px solid #e3e3e3; }
.ticket .tp .btn { width: 100%; min-height: 52px; font-size: 16px; }
.kds .vuoto { margin: 40px auto; max-width: 420px; border-color: #3a3a3a; color: #a0a0a0; font-size: 18px; }
.esauriti { margin: 0 12px 12px; padding: 10px 12px; background: #2a2a2a; border-radius: var(--r); color: #ffd18a; font-weight: 600; }

/* ---------- Gestione ---------- */
.gest { display: grid; grid-template-columns: 1fr; min-height: 0; height: 100%; }
.nav-g { display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px; background: var(--bg); border-bottom: 1px solid var(--linea); }
.nav-g a { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--testo); text-decoration: none; font-weight: 600; white-space: nowrap; position: relative; }
.nav-g a:hover { background: rgba(0,0,0,.05); }
.nav-g a[aria-current="page"] { background: var(--sup); box-shadow: var(--om1); }
.nav-g a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--acc); }
.contenuto { overflow: auto; padding: 18px; }
.contenuto > * { max-width: 1100px; }
@media (min-width: 900px) {
  .gest { grid-template-columns: 236px 1fr; }
  .nav-g { flex-direction: column; overflow: auto; padding: 10px 8px; border-bottom: 0; }
  .contenuto { padding: 24px 28px; }
}
.pag-testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pag-testa h1 { font-size: 24px; }
.pag-testa p { margin: 4px 0 0; color: var(--testo2); }
.pannello { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r2); box-shadow: var(--om1); margin-bottom: 16px; }
.pannello > h2 { font-size: 15px; padding: 14px 16px; border-bottom: 1px solid var(--linea); }
.pannello .dentro { padding: 14px 16px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 600; color: var(--testo2); padding: 9px 12px; border-bottom: 1px solid var(--linea); font-size: 13px; white-space: nowrap; }
.t td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .dx { text-align: right; font-variant-numeric: tabular-nums; }
.t input.campo, .t select.campo { min-height: 38px; font-size: 14px; padding: 6px 8px; }
.scorri { overflow-x: auto; }
.form-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.form-g .pieno { grid-column: 1 / -1; }
.cifre { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: var(--linea); border-radius: var(--r2); overflow: hidden; border: 1px solid var(--linea); margin-bottom: 16px; }
.cifre div { background: var(--sup); padding: 14px 16px; }
.cifre span { display: block; color: var(--testo2); font-size: 13px; }
.cifre strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.flash { padding: 10px 14px; border-radius: var(--r); margin-bottom: 14px; font-weight: 600; background: var(--ok-l); color: var(--ok); }
.flash.err { background: var(--err-l); color: var(--err); }
.pallino { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.nota-legale { font-size: 13px; color: var(--testo2); background: var(--sup2); border: 1px solid var(--linea); border-radius: var(--r); padding: 10px 12px; }
.piede-g { margin-top: 24px; font-size: 12px; color: var(--testo3); }
.piede-g a { color: inherit; }
@media print { .barra, .nav-g, .btn { display: none !important; } .app { height: auto; display: block; } }
