/* Amburgheria — design system */
:root {
  --brand: #e07c01;
  --brand-600: #c56a00;
  --brand-50: #fff4e6;
  --ink: #1b1714;
  --ink-2: #4a423b;
  --muted: #8a7f75;
  --line: #ece5dc;
  --bg: #faf7f2;
  --card: #ffffff;
  --ok: #1f9d55;
  --ok-50: #e8f7ee;
  --warn: #c98a00;
  --warn-50: #fff7e0;
  --err: #d23b2a;
  --err-50: #fdecea;
  --info: #2d6cdf;
  --info-50: #eaf1fd;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 23, 20, .06), 0 8px 24px rgba(27, 23, 20, .06);
  --shadow-lg: 0 20px 60px rgba(27, 23, 20, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem } .mt-4 { margin-top: 2.5rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem } .mb-3 { margin-bottom: 1.5rem }
.gap-1 { gap: .5rem } .gap-2 { gap: 1rem }
.flex { display: flex; align-items: center; } .flex-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.stack > * + * { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 760px; }
.section { padding-top: 40px; padding-bottom: 40px; }

/* ---------- Bottoni ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; border: 1.5px solid transparent; background: var(--b); color: #fff; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.btn-brand { --b: var(--brand); box-shadow: 0 6px 18px rgba(224, 124, 1, .3); }
.btn-ok { --b: var(--ok); }
.btn-err { --b: var(--err); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; filter: none; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-600); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Form ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=file], select, textarea {
  width: 100%; padding: .72rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: 16px/1.4 var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(224, 124, 1, .15); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Scelte a "pillola" (servizio, pagamento, orari) */
.choices { display: grid; gap: .6rem; }
.choices.cols-2 { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(224, 124, 1, .12); }
.choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); font-size: 1.2rem; flex: none; }
.choice b { display: block; }
.choice small { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; padding: .5rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; margin: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Avvisi ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 500; }
.alert.flex { display: flex; gap: .6rem; }
.alert-ok { background: var(--ok-50); color: #12623a; }
.alert-errore { background: var(--err-50); color: #9b2215; }
.alert-info { background: var(--info-50); color: #1d4a9e; }
.alert-warn { background: var(--warn-50); color: #7a5300; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: .85rem 1.1rem; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 500; animation: toastIn .25s ease-out; display: flex; gap: .6rem; align-items: center; }
.toast.err { background: var(--err); }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Card ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-title h2, .card-title h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge-brand { background: var(--brand); color: #fff; }
.badge-ok { background: var(--ok-50); color: #12623a; }
.badge-err { background: var(--err-50); color: #9b2215; }
.badge-info { background: var(--info-50); color: #1d4a9e; }
.badge-warn { background: var(--warn-50); color: #7a5300; }
.badge-dark { background: var(--ink); color: #fff; }
.badge-blue { background: #0099ff; color: #fff; }
.badge-orange { background: #ff8400; color: #fff; }

/* Stati ordine */
.st { display: inline-flex; padding: .22rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.st-in_pagamento { background: #f1ede8; color: var(--muted); }
.st-nuovo { background: #fff0d9; color: #a05a00; }
.st-confermato { background: var(--info-50); color: #1d4a9e; }
.st-in_preparazione { background: #fde7d4; color: #b4500b; }
.st-pronto { background: #e3f6e9; color: #12623a; }
.st-in_consegna { background: #e7e4ff; color: #4532b8; }
.st-completato { background: #eef0ef; color: #3d4a44; }
.st-annullato { background: var(--err-50); color: #9b2215; text-decoration: line-through; }

/* ---------- Header pubblico ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(27, 23, 20, .96); backdrop-filter: saturate(1.5) blur(10px); color: #fff; }
.topbar .container { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand img { height: 40px; width: auto; }
.brand .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; font-size: 1.1rem; }
.nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: .5rem .8rem; border-radius: 999px; font-weight: 600; font-size: .93rem; color: #e9e2da; }
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: .45rem; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; padding: .55rem .95rem; border-radius: 999px; }
.cart-btn .count { background: #fff; color: var(--ink); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: .78rem; padding: 0 6px; }
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.15); } }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; padding: .3rem; }
@media (max-width: 860px) {
  .nav { position: fixed; inset: 64px 0 auto 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; gap: .2rem; transform: translateY(-120%); transition: transform .25s; z-index: -1; }
  .nav.open { transform: none; }
  .nav a { padding: .85rem 1rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .topbar .cart-btn { margin-left: .4rem; }
}
.notice-bar { background: var(--brand); color: #fff; text-align: center; padding: .55rem var(--gutter); font-weight: 600; font-size: .92rem; }
.closed-bar { background: #3a2a1c; color: #ffd9a8; text-align: center; padding: .6rem var(--gutter); font-weight: 600; font-size: .92rem; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink) center/cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20, 14, 9, .88) 15%, rgba(20, 14, 9, .45) 60%, rgba(20, 14, 9, .2)); }
.hero .container { position: relative; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); max-width: 14ch; margin-bottom: .3em; }
.hero p.lead { font-size: 1.15rem; color: #f3e6d8; max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero .pill { display: inline-flex; gap: .5rem; align-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); padding: .4rem .85rem; border-radius: 999px; font-weight: 600; font-size: .88rem; margin-bottom: 1rem; }
.pill .live { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .25); }
.pill .live.off { background: #ff6b5b; box-shadow: 0 0 0 4px rgba(255, 107, 91, .25); }
.hero-sm .container { padding-top: 44px; padding-bottom: 44px; }
.hero-sm h1 { max-width: none; font-size: clamp(1.9rem, 5vw, 3rem); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -36px; position: relative; z-index: 2; }
.quick a { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-decoration: none; display: flex; flex-direction: column; gap: .3rem; transition: transform .15s; }
.quick a:hover { transform: translateY(-3px); }
.quick .ico { font-size: 1.6rem; }
.quick b { font-family: var(--display); font-size: 1.05rem; }
.quick small { color: var(--muted); }
@media (max-width: 760px) { .quick { grid-template-columns: 1fr 1fr; } }

/* ---------- Menu ---------- */
.catnav { position: sticky; top: 64px; z-index: 40; background: rgba(250, 247, 242, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.catnav .container { display: flex; gap: .4rem; overflow-x: auto; padding-top: 7px; padding-bottom: 7px; scrollbar-width: none; }
.catnav .container::-webkit-scrollbar { display: none; }
.catnav a { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.catnav a img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.catnav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-section { padding-top: 28px; scroll-margin-top: 130px; }
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 14px; }
.cat-head p { margin: 0; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product .img { position: relative; aspect-ratio: 4/3; background: #f3ede6; overflow: hidden; }
.product .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product:hover .img img { transform: scale(1.04); }
.product .tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.product .body { padding: 14px 16px 6px; flex: 1; }
.product h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.product h3 a { text-decoration: none; }
.product .desc { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.product .foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 16px; }
.price { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(224, 124, 1, .35); transition: transform .1s; }
.add:active { transform: scale(.9); }
.add:disabled { background: #cfc6bc; box-shadow: none; cursor: not-allowed; }
.product.off { opacity: .55; }

/* Lista compatta (bibite) */
@media (max-width: 560px) {
  .products { grid-template-columns: 1fr; }
  .product { flex-direction: row; }
  .product .img { width: 116px; aspect-ratio: 1; flex: none; }
  .product .tags { top: 6px; left: 6px; }
  .product .tags .badge { font-size: .62rem; padding: .12rem .4rem; }
  .product .body { padding: 12px 12px 0; }
  .product .foot { padding: 6px 12px 12px; }
  .product-wrap { display: flex; flex-direction: column; flex: 1; min-width: 0; }
}

/* ---------- Modale configuratore ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; background: rgba(15, 11, 8, .55); }
.modal.open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: #fff; width: min(100%, 560px); max-height: 92vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .25s ease-out; overflow: hidden; }
@keyframes up { from { transform: translateY(40px); } }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-img { flex: none; height: min(220px, 26vh); background: #f3ede6; position: relative; overflow: hidden; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; }
.sheet-body { min-height: 0; }
.sheet-close { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .95); border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.sheet-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.sheet-body h3 { font-size: 1.4rem; }
.opt-group { margin-top: 18px; }
.opt-group h4 { font-family: var(--font); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.opt { display: flex; align-items: center; gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 500; margin: 0; }
.opt:last-child { border-bottom: 0; }
.opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.opt span { flex: 1; }
.opt em { font-style: normal; font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.opt em.neg { color: var(--ok); }
.sheet-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: .75rem; align-items: center; background: #fff; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; border-radius: 50%; }
.qty span, .qty input { min-width: 28px; text-align: center; font-weight: 700; border: 0; width: 34px; padding: 0; background: none; }

/* ---------- Carrello / checkout ---------- */
.layout-2 { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .layout-2 { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }
.line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #f3ede6; flex: none; }
.line .info { flex: 1; min-width: 0; }
.line .info b { display: block; }
.line .opts { font-size: .84rem; color: var(--muted); }
.line .opts .rm { color: var(--err); }
.line .opts .ad { color: var(--ok); }
.line .err { color: var(--err); font-size: .85rem; font-weight: 600; }
.totals { display: grid; gap: .45rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--display); font-weight: 800; font-size: 1.4rem; border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .3rem; }
.totals .disc { color: var(--ok); font-weight: 600; }
.step { display: flex; gap: .7rem; align-items: center; margin-bottom: 1rem; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.step h2 { margin: 0; font-size: 1.25rem; }
.addr-result { margin-top: .6rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .45rem; }
.slots .chip { justify-content: center; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .big { font-size: 3rem; }

/* ---------- Tracking ordine ---------- */
.track { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin: 24px 0 8px; }
.track::before { content: ""; position: absolute; top: 18px; left: 10%; right: 10%; height: 4px; background: var(--line); border-radius: 4px; }
.track .bar { position: absolute; top: 18px; left: 10%; height: 4px; background: var(--brand); border-radius: 4px; transition: width .6s; }
.track .s { position: relative; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); }
.track .s i { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; margin: 0 auto .4rem; font-style: normal; font-size: 1.1rem; transition: all .3s; }
.track .s.done { color: var(--ink); }
.track .s.done i { border-color: var(--brand); background: var(--brand); }
.track .s.now i { box-shadow: 0 0 0 6px rgba(224, 124, 1, .2); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(224, 124, 1, 0); } }
@media (max-width: 520px) { .track .s span { display: none; } }
.big-code { font-family: var(--display); font-size: 2.4rem; font-weight: 800; letter-spacing: .08em; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfc5ba; margin-top: 56px; padding: 44px 0 30px; font-size: .92rem; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer h4 { color: #fff; font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.footer a { color: #cfc5ba; text-decoration: none; display: block; padding: .15rem 0; }
.footer a:hover { color: #fff; }
.footer .legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr; } }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: #fcfaf7; }
table.t .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #f3ede6; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #d9d0c6; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .brand { color: #fff; padding: 4px 10px 18px; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: .93rem; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.active { background: var(--brand); color: #fff; }
.side nav .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #8a7f75; margin: 16px 10px 6px; }
.side .who { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.main { padding: 24px 28px 60px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 20px; }
.main-head h1 { margin: 0; font-size: 1.7rem; }
.admin-top { display: none; }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 90; transform: translateX(-105%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-top { display: flex; align-items: center; gap: .8rem; background: var(--ink); color: #fff; padding: 10px var(--gutter); position: sticky; top: 0; z-index: 80; }
  .admin-top button { background: none; border: 0; color: #fff; font-size: 1.4rem; }
  .main { padding: 18px var(--gutter) 60px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 800; margin-top: .2rem; }
.kpi span { font-size: .82rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; }
.filters input, .filters select { padding: .55rem .75rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: .7rem 1rem; text-decoration: none; font-weight: 600; color: var(--muted); border: 0; background: none; border-bottom: 2.5px solid transparent; cursor: pointer; font: 600 .95rem var(--font); white-space: nowrap; }
.tabs .active { color: var(--ink); border-bottom-color: var(--brand); }
.ord-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-left: 5px solid var(--line); }
.ord-card.s-nuovo { border-left-color: #f0a33a; }
.ord-card.s-confermato { border-left-color: var(--info); }
.ord-card.s-in_preparazione { border-left-color: #e8701a; }
.ord-card.s-pronto, .ord-card.s-in_consegna { border-left-color: var(--ok); }
.ord-card .h { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.ord-card .code { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.ord-card ul { margin: .5rem 0; padding-left: 1.1rem; font-size: .9rem; }
.ord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ord-card.flash { animation: flashIn 1.8s; }
@keyframes flashIn { 0%, 40% { box-shadow: 0 0 0 4px rgba(224, 124, 1, .55), var(--shadow); } }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d8d0c6; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div:hover { background: var(--brand-600); }
.bars div[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .3rem .5rem; border-radius: 6px; font-size: .75rem; white-space: nowrap; margin-bottom: 4px; z-index: 3; }
.inline-form { display: inline; }
details.box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
details.box > summary { padding: 14px 18px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
details.box > summary::after { content: "＋"; color: var(--muted); }
details.box[open] > summary::after { content: "－"; }
details.box > div { padding: 0 18px 18px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); background: radial-gradient(1200px 600px at 20% -10%, #ffe2bf, transparent), var(--bg); }
.login-card { width: min(100%, 400px); }
.dot-live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9a948e; margin-right: .35rem; }
.dot-live.on { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }

/* ---------- Staff (cucina / display / cassa / totem) ---------- */
body.staff { background: #120e0b; color: #f4ede6; }
body.staff.light { background: var(--bg); color: var(--ink); }
.kds-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: #1d1713; position: sticky; top: 0; z-index: 10; gap: 1rem; }
.kds-head h1 { margin: 0; font-size: 1.3rem; }
.kds-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px; align-items: start; }
@media (max-width: 1000px) { .kds-cols { grid-template-columns: 1fr; } }
.kds-col h2 { font-family: var(--font); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: .5rem; margin: 0 0 10px; color: #c8bdb2; }
.kds-col h2 .n { background: #2c241e; padding: .1rem .55rem; border-radius: 999px; }
.kds-card { background: #221b16; border: 1px solid #33291f; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; border-top: 5px solid #f0a33a; }
.kds-card.s-in_preparazione { border-top-color: #e8701a; }
.kds-card.s-pronto { border-top-color: #3ddc84; }
.kds-card.late { box-shadow: 0 0 0 2px #ff5b4a; }
.kds-card .h { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.kds-card .tag { font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.kds-card .meta { color: #b3a79b; font-size: .85rem; }
.kds-card ul { list-style: none; margin: .6rem 0; padding: 0; }
.kds-card li { padding: .35rem 0; border-bottom: 1px dashed #3a2f26; font-size: 1.02rem; }
.kds-card li:last-child { border-bottom: 0; }
.kds-card li b { color: #ffb45e; margin-right: .3rem; }
.kds-card .v { display: block; font-size: .86rem; color: #c8bdb2; padding-left: 1.5rem; }
.kds-card .v.rm { color: #ff8a7a; }
.kds-card .v.ad { color: #7ee3a6; }
.kds-card .nota { background: #3a2a10; color: #ffd38a; padding: .4rem .6rem; border-radius: 8px; font-size: .9rem; margin: .4rem 0; }
.kds-card .acts { display: flex; gap: .5rem; margin-top: .5rem; }
.kds-card .acts .btn { flex: 1; }
.disp { display: grid; grid-template-columns: 1fr 1fr 1.3fr; height: 100vh; gap: 0; }
.disp .col { padding: 3vh 2vw; overflow: hidden; }
.disp .col h2 { font-size: 3.2vh; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2vh; }
.disp .prep { background: #1d1713; }
.disp .ready { background: #0f2a1a; }
.disp .ready h2 { color: #3ddc84; }
.disp .nums { display: flex; flex-wrap: wrap; gap: 1.5vh; }
.disp .num { font-family: var(--display); font-weight: 800; font-size: 6vh; background: rgba(255, 255, 255, .06); border-radius: 2vh; padding: 1vh 2.2vh; min-width: 12vh; text-align: center; line-height: 1.1; }
.disp .num small { display: block; font-family: var(--font); font-size: 1.8vh; font-weight: 500; opacity: .8; }
.disp .ready .num { background: #3ddc84; color: #08210f; animation: pop .5s; }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } }
.disp .slide { position: relative; background: #000; }
.disp .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1s; }
.disp .slide img.on { opacity: 1; }
.disp .msg { position: absolute; left: 0; right: 0; bottom: 0; padding: 2vh; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); font-size: 2.4vh; text-align: center; font-weight: 600; z-index: 2; }
@media (orientation: portrait) { .disp { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .disp .slide { grid-column: span 2; } }

/* POS: cassa e totem */
.pos { display: grid; grid-template-columns: 1fr 380px; height: 100vh; }
.pos .left { overflow-y: auto; padding: 14px; }
.pos .right { background: #fff; color: var(--ink); display: flex; flex-direction: column; border-left: 1px solid var(--line); min-height: 0; }
.pos .cats { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 10px; position: sticky; top: -14px; background: inherit; z-index: 2; padding-top: 14px; margin-top: -14px; }
.pos .cats button { flex: none; padding: .7rem 1.1rem; border-radius: 12px; border: 0; background: #2a221c; color: #f4ede6; font: 700 1rem var(--font); cursor: pointer; }
.pos .cats button.active { background: var(--brand); }
.pos .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos .tile { background: #221b16; border: 1px solid #33291f; border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; color: inherit; padding: 0; font: inherit; display: flex; flex-direction: column; }
.pos .tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #33291f; }
.pos .tile div { padding: 8px 10px; }
.pos .tile b { display: block; font-size: .95rem; line-height: 1.2; }
.pos .tile span { color: #ffb45e; font-weight: 800; }
.pos .ticket { flex: 1; overflow-y: auto; padding: 10px 16px; }
.pos .tline { display: flex; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.pos .tline .q { font-weight: 800; color: var(--brand); min-width: 26px; }
.pos .tline .n { flex: 1; }
.pos .tline small { display: block; color: var(--muted); }
.pos .tline button { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.pos .pfoot { padding: 14px 16px; border-top: 1px solid var(--line); }
.pos .tot { display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.6rem; font-weight: 800; margin-bottom: .6rem; }
@media (max-width: 900px) { .pos { grid-template-columns: 1fr; height: auto; } .pos .right { position: sticky; bottom: 0; max-height: 55vh; } }
body.light .pos .cats button { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
body.light .pos .cats button.active { background: var(--ink); color: #fff; }
body.light .pos .tile { background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
body.light .pos .tile span { color: var(--brand-600); }

/* Stampa scontrino */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
/* Stampante termica POS 58 mm: area stampabile ~48 mm (32 caratteri) */
.receipt { width: 48mm; margin: 0 auto; padding: 0; font: 11.5px/1.3 "Courier New", monospace; color: #000; background: #fff; overflow-wrap: anywhere; }
.receipt h2 { font: 700 15px/1.2 "Courier New", monospace; text-align: center; margin: 0 0 3px; }
.receipt .row { display: flex; justify-content: space-between; gap: 4px; }
.receipt .row > :last-child { white-space: nowrap; text-align: right; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; }
.receipt .big { font-size: 20px; font-weight: 700; text-align: center; }
/* Tipo di servizio: riquadro con bordo spesso, leggibile anche senza stampa degli sfondi */
/* Comanda cucina: tutto maiuscolo e più grande, in Arial (più stretto e leggibile del Courier) */
.receipt.comanda { font: 700 14px/1.3 Arial, sans-serif; text-transform: uppercase; }
.receipt.comanda h2 { font: 800 18px/1.2 Arial, sans-serif; letter-spacing: .1em; }
.receipt.comanda .big { font: 800 26px/1.15 Arial, sans-serif; }
.receipt.comanda .cliente { font-size: 15px; }
.receipt.comanda .piatto { font: 800 19px/1.2 Arial, sans-serif; margin-top: 7px; }
.receipt.comanda .variante { font: 700 16px/1.25 Arial, sans-serif; padding-left: 10px; }
.receipt.comanda hr { border-top-width: 2px; }
.receipt .orario-comanda { border: 3px solid #000; border-radius: 4px; text-align: center; font: 800 30px/1.05 Arial, sans-serif; padding: 4px 2px 6px; margin: 5px 0; }
.receipt .orario-comanda small { display: block; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; }
.receipt .tipo-servizio { border: 3px solid #000; border-radius: 4px; text-align: center; font: 800 17px/1.2 Arial, sans-serif; letter-spacing: .04em; padding: 5px 2px; margin: 5px 0; }
.receipt .qr-corriere img, .receipt .qr-corriere canvas { width: 32mm !important; height: 32mm !important; }

/* Utility mobile */
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .card { padding: 16px; }
  .section { padding-top: 28px; padding-bottom: 28px; }
}
@media (min-width: 641px) { .only-sm { display: none !important; } }
.mobile-cta { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45; display: none; }
@media (max-width: 860px) { .mobile-cta.show { display: block; } body.has-cta { padding-bottom: 80px; } }

/* ---------- Area clienti ---------- */
.acc-hero { background: linear-gradient(160deg, #1b1714 0%, #3a2414 100%); color: #fff; padding: 28px 0 36px; }
.acc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.acc-top h1 { margin: 0; font-size: 1.7rem; }
.acc-top p { color: #d9cbbd; }
.acc-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font: 800 1.5rem var(--display); flex: none; }
.acc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 720px) { .acc-grid { grid-template-columns: 1fr; } }
.wallet { background: linear-gradient(135deg, var(--brand) 0%, #ff9e1f 60%, #ffb85c 100%); border-radius: 22px; padding: 22px; box-shadow: 0 18px 40px rgba(224, 124, 1, .35); position: relative; overflow: hidden; }
.wallet::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.wallet-lbl { font-weight: 700; }
.wallet-chip { font-size: .7rem; font-weight: 800; letter-spacing: .12em; background: rgba(0, 0, 0, .15); padding: .2rem .6rem; border-radius: 999px; }
.wallet-amount { font: 800 2.8rem/1.1 var(--display); margin: 14px 0 16px; letter-spacing: -.02em; position: relative; z-index: 1; }
.wallet .btn { position: relative; z-index: 1; }
.acc-stats { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.acc-stats div { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 12px; }
.acc-stats b { display: block; font: 800 1.5rem var(--display); }
.acc-stats span { color: #d9cbbd; font-size: .85rem; }
.acc-stats .btn { grid-column: 1 / -1; }
.live-order { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; text-decoration: none; border-left: 5px solid var(--brand); }
.live-order .pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); animation: pulse 1.6s infinite; flex: none; box-shadow: 0 0 0 4px rgba(224, 124, 1, .25); }
.order-row { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.order-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.mov { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mov:last-child { border-bottom: 0; }
.mov-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.mov-ico.in { background: var(--ok-50); color: var(--ok); }
.mov-ico.out { background: var(--err-50); color: var(--err); }

/* ---------- Home stile app fast food ---------- */
.h-hero { --hero: none; position: relative; color: #fff; text-align: center; background: var(--ink); overflow: hidden; }
.h-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero) center/cover no-repeat; filter: saturate(1.1); transform: scale(1.05); }
.h-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(27,23,20,.35), rgba(27,23,20,.85) 70%), linear-gradient(180deg, rgba(27,23,20,.2), var(--ink) 98%); }
.h-hero-in { position: relative; z-index: 1; padding: 34px var(--gutter) 70px; max-width: 720px; margin: 0 auto; }
.h-logo { width: clamp(140px, 34vw, 210px); height: clamp(140px, 34vw, 210px); object-fit: contain; border-radius: 50%; background: #fff; padding: 8px; margin: 0 auto 16px; box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 20px 50px rgba(0,0,0,.5); animation: logoIn .6s ease-out; }
.h-logo-fb { display: grid; place-items: center; font-size: 5rem; }
@keyframes logoIn { from { transform: scale(.8) rotate(-8deg); opacity: 0; } }
.h-hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); margin: 14px 0 6px; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.h-hero p { color: #f0e2d2; font-size: 1.08rem; margin: 0; }
.h-status { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: .88rem; }
.h-status span { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.3); }
.h-status.off span { background: #ff6b5b; box-shadow: 0 0 0 4px rgba(255,107,91,.3); }
.h-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: -44px; position: relative; z-index: 2; }
.h-mode { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; padding: 16px; text-decoration: none; box-shadow: 0 14px 34px rgba(27,23,20,.18); border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.h-mode:hover { transform: translateY(-3px); border-color: var(--brand); }
.h-mode-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.h-mode-alt .h-mode-ico { background: #ffc72c; }
.h-mode b { display: block; font: 800 1.15rem var(--display); }
.h-mode small { color: var(--muted); }
.h-arrow { margin-left: auto; font-size: 1.6rem; color: var(--brand); font-weight: 800; }
.h-cta { margin-top: 12px; font-size: 1.12rem; padding: 1rem; }
@media (max-width: 520px) { .h-mode { flex-direction: column; text-align: center; padding: 14px 10px; gap: 8px; } .h-arrow { display: none; } }
.h-sec { padding-top: 26px; }
.h-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.h-head h2 { margin: 0; font-size: 1.4rem; }
.h-head a { font-weight: 700; color: var(--brand-600); text-decoration: none; }
.h-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; border-radius: 20px; }
.h-carousel::-webkit-scrollbar { display: none; }
.h-slide { flex: 0 0 100%; scroll-snap-align: start; border-radius: 20px; overflow: hidden; background: #f3ede6; aspect-ratio: 16/9; box-shadow: var(--shadow); }
.h-slide img { width: 100%; height: 100%; object-fit: cover; }
.h-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.h-dots span { width: 8px; height: 8px; border-radius: 999px; background: #d9cfc4; cursor: pointer; transition: all .2s; }
.h-dots span.on { width: 22px; background: var(--brand); }
.h-cats { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.h-cats::-webkit-scrollbar { display: none; }
.h-cat { flex: none; width: 92px; text-align: center; text-decoration: none; font-weight: 700; font-size: .85rem; line-height: 1.2; }
.h-cat-img { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); overflow: hidden; font-size: 2rem; border: 3px solid #fff; transition: transform .15s, border-color .15s; }
.h-cat:hover .h-cat-img { transform: scale(1.06); border-color: var(--brand); }
.h-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.h-wallet { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 16px 18px; border-radius: 20px; color: #fff; text-decoration: none; background: linear-gradient(120deg, var(--brand), #ff9e1f); box-shadow: 0 12px 30px rgba(224,124,1,.3); }
.h-wallet-ico { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.h-wallet small { display: block; opacity: .9; }
.h-wallet b { font: 800 1.5rem var(--display); }
.h-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 10px; }
.h-row::-webkit-scrollbar { display: none; }
.mini { flex: 0 0 170px; scroll-snap-align: start; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.mini-img { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #f3ede6; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mini:hover .mini-img img { transform: scale(1.05); }
.mini-img .badge { position: absolute; top: 6px; left: 6px; font-size: .62rem; }
.mini-name { font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.h-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.h-tile { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px 8px; text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .88rem; }
.h-tile span { font-size: 1.7rem; }
@media (max-width: 560px) { .h-tiles { grid-template-columns: repeat(2, 1fr); } }
body.home-app .topbar .brand:not(.brand-wide) img { display: none; }
body.home-app .footer { margin-top: 30px; }

/* Barra di navigazione in basso (mobile) */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(27,23,20,.08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .tabbar a span { font-size: 1.3rem; position: relative; filter: grayscale(1); opacity: .7; }
  .tabbar a.on { color: var(--brand-600); }
  .tabbar a.on span { filter: none; opacity: 1; }
  .tabbar i { position: absolute; top: -4px; right: -12px; background: var(--brand); color: #fff; font-style: normal; font-size: .65rem; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
  body { padding-bottom: 70px; }
  .mobile-cta { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar .cart-btn { display: none; }
  .toast-wrap { bottom: 90px; }
}

/* ---------- Logo nella barra in alto ---------- */
.topbar { background: linear-gradient(180deg, #221a14, #1b1714); border-bottom: 3px solid var(--brand); }
.topbar .container { height: 74px; }
.brand-logo { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; padding: 3px;
  box-shadow: 0 0 0 3px var(--brand), 0 4px 12px rgba(0,0,0,.35); transition: transform .2s; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.brand:hover .brand-logo { transform: scale(1.05); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: #fff; letter-spacing: -.01em; line-height: 1.05; }
.catnav { top: 77px; }
.sticky { top: 96px; }
@media (max-width: 860px) {
  .topbar .container { justify-content: center; position: relative; }
  .topbar .brand { margin: 0 auto; }
  .nav-toggle { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); margin: 0; }
  .nav { inset: 77px 0 auto 0; }
  .brand-name { font-size: 1.05rem; }
  .brand-logo { width: 54px; height: 54px; }
}
@media (max-width: 340px) { .brand-name { display: none; } }
body.home-app .topbar .brand-logo, body.home-app .topbar .brand-name { display: none; }

/* Suggerimenti indirizzo */
.ac-wrap { position: relative; flex: 1; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 70; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); max-height: 280px; overflow-y: auto; }
.ac-list li { padding: .65rem .75rem; border-radius: 8px; cursor: pointer; font-size: .93rem; }
.ac-list li:hover, .ac-list li.on { background: var(--brand-50); }

/* ---------- Cassa / vetrina su telefono e tablet ---------- */
.pos-sum { display: none; }
@media (max-width: 900px) {
  .pos { display: block; height: auto; min-height: 100vh; }
  .pos .left { padding: 10px 12px 96px; overflow: visible; }
  .pos .left > .flex:first-child { margin-bottom: 4px; }
  .pos .cats { position: sticky; top: 0; z-index: 20; margin: 0 -12px 10px; padding: 10px 12px; background: inherit; }
  body.light .pos .cats { background: var(--bg); box-shadow: 0 6px 12px -8px rgba(27,23,20,.25); }
  body.staff:not(.light) .pos .cats { background: #120e0b; }
  .pos .cats button { padding: .55rem .9rem; font-size: .9rem; }
  .pos .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pos .tile b { font-size: .88rem; }
  .pos .right { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: none; height: auto; border-left: 0;
    border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; }
  .pos .right > :not(.pos-sum) { display: none; }
  .pos .right.open { height: 88vh; }
  .pos .right.open > :not(.pos-sum) { display: block; }
  .pos .right.open > .ticket { flex: 1; overflow-y: auto; }
  .pos-sum { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--brand); color: #fff;
    font: 700 1rem var(--font); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; cursor: pointer; text-align: left; }
  .pos .right.open .pos-sum { padding-bottom: 14px; }
  .pos-sum.vuoto { background: #8a7f75; }
  .pos-sum-n { background: #fff; color: var(--brand-600); min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; padding: 0 6px; }
  .pos-sum b { font-family: var(--display); font-size: 1.15rem; }
  .pos-sum-cta { font-size: .8rem; background: rgba(255,255,255,.2); padding: .3rem .6rem; border-radius: 999px; white-space: nowrap; }
  body.pos-lock { overflow: hidden; }
  .pos .pfoot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal .sheet { max-height: 90vh; }
  #entry .sheet .flex, #drink .sheet .flex { flex-direction: column; }
  #entry .sheet .btn, #drink .sheet .btn { width: 100%; }
}
@media (min-width: 560px) and (max-width: 900px) { .pos .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pos .right, .pos .right h3, .pos .tline .n { text-align: left; }

/* Stato prenotazione */
.pren { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin-bottom: 8px; background: var(--bg); border-left: 5px solid var(--line); }
.pren-ico { font-size: 1.6rem; line-height: 1; }
.pren.confermata { background: var(--ok-50); border-left-color: var(--ok); }
.pren.richiesta { background: var(--warn-50); border-left-color: var(--warn); }
.pren.rifiutata, .pren.annullata { background: var(--err-50); border-left-color: var(--err); }

/* Logo orizzontale nella barra della home */
.brand-wide img { height: 46px; width: auto; max-width: 340px; object-fit: contain; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
@media (max-width: 860px) { .brand-wide img { height: auto; max-height: 40px; max-width: calc(100vw - 110px); } }

/* Righe raggruppate sotto un menù */
.line-gruppo { font-weight: 800; color: var(--brand-600); padding: 12px 0 2px; border-top: 1px solid var(--line); }
.line.in-gruppo { padding-left: 16px; border-left: 3px solid var(--brand-50); margin-left: 4px; }
.kds-card .grp { display: block; font-size: .8rem; font-weight: 800; color: #ffb45e; text-transform: uppercase; letter-spacing: .05em; margin-top: .3rem; }

/* iPhone con tacca / Dynamic Island: app iOS e web app a schermo intero (nel browser vale 0) */
.topbar { padding-top: env(safe-area-inset-top); }
.catnav { top: calc(77px + env(safe-area-inset-top)); }
.sticky { top: calc(96px + env(safe-area-inset-top)); }

/* Banner "Scarica l'app Android" (solo browser Android) */
.h-app { position: relative; margin-top: 14px; }
.h-app-link { display: flex; align-items: center; gap: 14px; padding: 14px 44px 14px 16px; border-radius: 20px; text-decoration: none; color: #fff; background: #1b1714; box-shadow: 0 10px 26px rgba(27,23,20,.25); }
.h-app-ico { width: 48px; height: 48px; border-radius: 14px; background: rgba(61,220,132,.14); display: grid; place-items: center; flex: none; }
.h-app-ico img { width: 30px; height: 30px; }
.h-app-link b { display: block; font: 800 1.1rem var(--display); }
.h-app-link small { display: block; color: #cfc4b8; font-size: .82rem; line-height: 1.3; }
.h-app-x { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; background: none; color: #a99c90; font-size: 1.4rem; line-height: 1; cursor: pointer; }

/* Icone professionali in home (proposta B): icone bianche su fondo pieno */
.ico { width: 1em; height: 1em; display: block; }
.h-mode-ico { color: #fff; font-size: 28px; }
.h-mode-alt .h-mode-ico { background: #1b1714; color: #ffc72c; }
.h-tile .h-tile-ico { width: 46px; height: 46px; border-radius: 14px; background: #1b1714; color: #fff; display: grid; place-items: center; font-size: 24px; margin-bottom: 2px; transition: background .15s; }
.h-tile:hover .h-tile-ico { background: var(--brand); }
.h-tile-wa .h-tile-ico, .h-tile-wa:hover .h-tile-ico { background: #25d366; }
.h-tile { color: var(--ink); font-weight: 600; }

/* Banner consenso cookie */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90; max-width: 560px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(27,23,20,.28); border: 1px solid var(--line); }
.cookie-banner p { margin: 0 24px 12px 0; font-size: .9rem; line-height: 1.45; }
.cookie-banner p b { display: block; margin-bottom: 2px; }
.cookie-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.4rem; color: var(--muted); cursor: pointer; width: 32px; height: 32px; }
@media (max-width: 900px) { .cookie-banner { bottom: calc(76px + env(safe-area-inset-bottom)); } }
