/* Layout: a product shell (topbar) hosting a phone frame for guests and a tablet frame for the restaurant.
   Neutrals lean slightly green toward the trattoria's pine; the restaurant's own brand color is injected per tenant. */
/* ---------- fonts: served from this site, no third party ---------- */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/font-figtree.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/font-bricolage.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/font-jetbrains-mono.woff2) format('woff2'); }
@font-face { font-family: 'Gloock'; font-style: normal; font-weight: 400; font-display: swap; src: url(/font-gloock.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/font-fraunces.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/font-unbounded.woff2) format('woff2'); }

:root {
  --bg: #F2F3EF; --surface: #FFFFFF; --surface-2: #EAECE6; --line: #D8DBD2; --fg: #191D1A; --muted: #5C655D;
  --ok: #18724A; --warn: #8A560C; --bad: #A93226; --info: #2463A6; --violet: #6B48AD;
  --ok-bg: #E1F0E7; --warn-bg: #F7EBD5; --bad-bg: #F7E0DC; --info-bg: #DFE9F5; --violet-bg: #ECE5F6;
  --brand: #C24E17; --deep: #1E3A2C; --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --frame: #151816; --shadow: 0 1px 2px rgb(20 30 22 / .06), 0 10px 30px rgb(20 30 22 / .09);
  --tile-bg: color-mix(in srgb, var(--brand) 13%, var(--surface));
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #101311; --surface: #181C19; --surface-2: #212622; --line: #2E342F; --fg: #E8ECE7; --muted: #9AA39B;
  --ok: #5CC28A; --warn: #E2A64C; --bad: #F07B6D; --info: #70A9E8; --violet: #B89CEB;
  --ok-bg: #15301F; --warn-bg: #33270F; --bad-bg: #3A1B17; --info-bg: #142539; --violet-bg: #261E38;
  --frame: #050605; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #101311; --surface: #181C19; --surface-2: #212622; --line: #2E342F; --fg: #E8ECE7; --muted: #9AA39B;
  --ok: #5CC28A; --warn: #E2A64C; --bad: #F07B6D; --info: #70A9E8; --violet: #B89CEB;
  --ok-bg: #15301F; --warn-bg: #33270F; --bad-bg: #3A1B17; --info-bg: #142539; --violet-bg: #261E38;
  --frame: #050605; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; }

html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--body); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
* { box-sizing: border-box; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
input[type="color"] { width: 48px; height: 36px; padding: 2px; }
textarea { resize: vertical; }
select { width: auto; }
.money, .num, .mono, .kpi b { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 6px; }
.row.between, .between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gap { gap: 10px; } .gap-s { gap: 6px; } .wrap { flex-wrap: wrap; }
.w-s { width: 110px; flex: none; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); display: block; }
.eyebrow.light { color: rgb(255 255 255 / .75); }
.ic { flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- buttons, chips, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; padding: 9px 16px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
:root[data-theme="dark"] .btn-ok, :root[data-theme="dark"] .btn-danger { color: #0E120F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-ok, :root:not([data-theme="light"]) .btn-danger { color: #0E120F; } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 600; padding: 4px 0; display: inline-flex; align-items: center; gap: 4px; }
.file-btn { cursor: pointer; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip-sm { padding: 5px 11px; font-size: 13px; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; text-transform: none; }
.tone-ok { background: var(--ok-bg); color: var(--ok); } .tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); } .tone-info { background: var(--info-bg); color: var(--info); }
.tone-violet { background: var(--violet-bg); color: var(--violet); } .tone-muted { background: var(--surface-2); color: var(--muted); }
.tone-brand { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); color: color-mix(in srgb, var(--brand) 80%, var(--fg)); }
.tone-ok-fg { color: var(--ok); } .tone-warn-fg { color: var(--warn); } .tone-bad-fg { color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; flex: none; }
.dot-ok { background: #4ADE80; } .dot-bad { background: #F87171; } .dot-warn { background: #F5B94A; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.tgl { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl-track { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.tgl-dot { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.tgl input:checked + .tgl-track { background: var(--ok); }
.tgl input:checked + .tgl-track .tgl-dot { transform: translateX(16px); }
.tgl input:focus-visible + .tgl-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.tgl-label { font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); flex: none; }
.stepper button { border: 0; background: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; }
.stepper button:hover { background: var(--surface-2); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.check-row { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 12px; color: var(--muted); }
.empty strong { color: var(--fg); }
.empty p { font-size: 14px; max-width: 34ch; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 18px; padding-block: 10px; background: var(--bg); border-bottom: 1px solid var(--line); margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tb-brand { display: flex; align-items: center; gap: 8px; flex: none; }
.tb-brand b { font-family: 'Bricolage Grotesque', var(--body); font-size: 21px; letter-spacing: -.02em; }
.prod-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--fg); color: var(--bg); display: grid; place-items: center; font: 800 18px/1 'Bricolage Grotesque', var(--body); }
.tb-demo { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.tb-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tb-nav::-webkit-scrollbar { display: none; }
.tb-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tb-link:hover { color: var(--fg); background: var(--surface-2); }
.tb-link.on { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- presentation ---------- */
.present { display: grid; grid-template-columns: 392px minmax(0, 1fr); gap: 28px; padding-block: 18px 28px; align-items: start; }
.present-cap { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 13.5px; }
.present-cap span { color: var(--muted); max-width: 70ch; }
.present-switch { display: none; }
.phone { width: 100%; max-width: 392px; height: min(800px, calc(100dvh - 150px)); min-height: 560px; border-radius: 46px; background: var(--frame); padding: 11px; box-shadow: var(--shadow); position: relative; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 99px; background: var(--frame); z-index: 3; }
.phone-screen { height: 100%; border-radius: 36px; overflow: hidden; transform: translateZ(0); background: var(--bg); container-type: inline-size; }
.phone-screen > .guest { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.phone-screen .g-hero { padding-top: 46px; }
.tablet { height: min(800px, calc(100dvh - 150px)); min-height: 560px; border-radius: 26px; background: var(--frame); padding: 10px; box-shadow: var(--shadow); }
.tablet > .admin-host { height: 100%; border-radius: 17px; overflow: hidden; transform: translateZ(0); }
.admin-host { container-type: inline-size; }
.admin-host-compact > .admin { height: 100%; }
@media (max-width: 1020px) {
  .present { grid-template-columns: minmax(0, 1fr); }
  .present-switch { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 3px; justify-self: center; }
  .present-switch button { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
  .present-switch button.on { background: var(--surface); color: var(--fg); }
  .pane-ospite .present-admin, .pane-admin .present-phone { display: none; }
  .present-phone { justify-self: center; width: 100%; max-width: 392px; }
}
@media (max-width: 520px) {
  .phone { padding: 0; border-radius: 22px; background: transparent; box-shadow: none; height: calc(100dvh - 190px); }
  .phone-notch { display: none; }
  .phone-screen { border-radius: 18px; border: 1px solid var(--line); }
  .phone-screen .g-hero { padding-top: 20px; }
  .tablet { padding: 0; border-radius: 16px; background: transparent; height: calc(100dvh - 190px); box-shadow: none; }
  .tablet > .admin-host { border-radius: 16px; border: 1px solid var(--line); }
  .present-cap span { display: none; }
}
.solo-guest { max-width: 520px; margin: 0 auto; container-type: inline-size; min-height: calc(100dvh - 60px); background: var(--bg); }
.solo-emp { max-width: 560px; margin: 0 auto; padding-block: 16px 40px; }

/* ---------- guest ---------- */
.guest { background: var(--bg); position: relative; padding-bottom: 8px; }
.g-hero { background: var(--deep); color: #fff; padding: 22px 18px 18px; }
.g-hero-top { display: flex; align-items: center; gap: 12px; }
.g-hero-name { flex: 1; min-width: 0; }
.g-hero h1 { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.01em; }
.g-hero p { color: rgb(255 255 255 / .75); font-size: 13.5px; }
.g-myorders { border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .1); color: #fff; border-radius: 999px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.g-status { margin-top: 14px; display: flex; align-items: center; font-size: 13.5px; background: rgb(255 255 255 / .1); border-radius: 10px; padding: 8px 11px; }
.logo-mark { display: grid; place-items: center; border-radius: 30%; background: var(--brand); color: #fff; font-family: var(--display); font-weight: 800; flex: none; }
.logo-img { border-radius: 30%; object-fit: cover; flex: none; background: #fff; }
.g-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; padding: 12px 14px 4px; }
.g-mode { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.g-mode.on { border-color: var(--brand); color: var(--fg); box-shadow: inset 0 0 0 1px var(--brand); }
.g-mode.on .ic { color: var(--brand); }
.g-context { margin: 8px 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.g-context select { padding: 4px 8px; font-weight: 700; }
.g-context .small { flex-basis: 100%; }
.g-h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.g-specials { padding: 18px 14px 4px; }
.g-spec-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 10px; padding-bottom: 4px; scrollbar-width: none; }
.g-spec { flex: 0 0 86%; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.g-spec .tile { border-radius: 0; }
.g-spec-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.g-spec-body h3 { font-family: var(--display); font-size: 18px; }
.g-spec-body p { color: var(--muted); font-size: 13.5px; }
.g-spec-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.g-catbar { position: sticky; top: 0; z-index: 4; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); padding: 12px 0 8px; margin-top: 8px; border-bottom: 1px solid var(--line); }
.g-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
.g-chips::-webkit-scrollbar, .g-spec-row::-webkit-scrollbar { display: none; }
.g-filters { margin-top: 8px; }
.g-cat { padding: 20px 14px 4px; scroll-margin-top: 96px; }
.g-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.g-age { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--surface-2); padding: 8px 10px; border-radius: 10px; margin-bottom: 8px; }
.g-list { display: flex; flex-direction: column; }
.g-item { display: flex; gap: 12px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 0; align-items: flex-start; }
.g-item:last-child { border-bottom: 0; }
.g-item.off { opacity: .55; }
.g-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.g-item h3 { font-size: 16px; font-weight: 700; }
.g-item p { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.g-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 2px; }
.g-item-meta .money { font-weight: 700; }
.tile { border-radius: 12px; background: var(--tile-bg) center/cover no-repeat; color: var(--brand); flex: none; }
.tile-glyph { display: grid; place-items: center; }
.tile-sm { width: 52px; height: 52px; } .tile-md { width: 84px; height: 84px; } .tile-lg { width: 100%; aspect-ratio: 16 / 9; max-width: 100%; }
.tile-hero { width: 100%; aspect-ratio: 16 / 10; max-width: 100%; margin-bottom: 12px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-veg, .tag-vegan { background: var(--ok-bg); color: var(--ok); } .tag-piccante { background: var(--bad-bg); color: var(--bad); } .tag-nuovo { background: var(--warn-bg); color: var(--warn); }
.allg { display: flex; gap: 4px; flex-wrap: wrap; }
.allg-chip { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.allg-box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.g-foot { padding: 26px 14px 90px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.g-cartbar { position: sticky; bottom: 0; padding: 10px 14px 14px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.g-cartbtn { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; padding: 13px 18px; font-weight: 700; font-size: 15.5px; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.g-cartbtn span:nth-child(2) { flex: 1; text-align: left; }
.g-cartcount { background: rgb(255 255 255 / .22); border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 13.5px; }
.g-pad { padding: 18px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.g-reserve .g-h2 { margin-bottom: 4px; }
.slot-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lead { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.opt-group { border: 0; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.opt-group legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt span:first-of-type { flex: 1; }
.pairing { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--brand) 55%, var(--line)); margin: 14px 0; color: var(--brand); }
.pairing > div { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--fg); }
.pairing.on { border-style: solid; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.co-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.co-line { display: flex; align-items: center; gap: 10px; }
.co-amt { width: 64px; text-align: right; font-weight: 600; }
.pay-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pay { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.pay.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.twint { background: #000; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 2px 5px; border-radius: 4px; }
.age-ok { background: var(--warn-bg); padding: 10px 12px; border-radius: 12px; font-size: 13.5px; align-items: flex-start; margin-bottom: 12px; }
.co-tot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.co-tot b { font-size: 17px; }
.g-track { padding: 16px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.trk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.trk-no { font-family: var(--display); font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--brand); }
.trk-no.small-no { font-size: 24px; letter-spacing: -.01em; }
.trk-msg { font-size: 17px; font-weight: 600; display: flex; align-items: center; }
.trk-steps { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.trk-steps li { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--muted); position: relative; }
.trk-steps li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 30px; height: 16px; width: 2px; background: var(--line); }
.trk-steps li.done, .trk-steps li.now { color: var(--fg); }
.trk-steps li.now { font-weight: 700; }
.trk-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; background: var(--surface); }
.trk-steps li.done .trk-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.trk-steps li.now .trk-dot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brand) 8%, transparent); } }
.trk-lines { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.trk-total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }

/* ---------- sheets & toasts ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(10 14 11 / .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92%; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: rise .2s ease-out; box-shadow: 0 -10px 40px rgb(0 0 0 / .2); }
.sheet-wide { max-width: 920px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.sheet-head h3 { flex: 1; font-family: var(--display); font-size: 20px; }
.sheet-body { padding: 4px 18px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .grow.btn { flex: 1; }
@container (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; max-height: 88%; }
  .sheet-foot { border-radius: 0 0 20px 20px; }
}
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 32px)); }
.toast { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s ease-out; background: var(--fg); color: var(--bg); }
.toast.tone-warn { background: var(--warn); color: #fff; }
.toast.tone-bad { background: var(--bad); color: #fff; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 228px minmax(0, 1fr); background: var(--bg); min-height: calc(100dvh - 58px); }
.admin-compact { min-height: 0; grid-template-columns: 196px minmax(0, 1fr); }
.adm-nav { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; padding: 14px 10px; position: sticky; top: var(--tb-h); height: calc(100dvh - var(--tb-h)); overflow-y: auto; }
.admin-compact .adm-nav { position: static; height: 100%; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.adm-brand b { display: block; font-family: var(--display); font-size: 15px; line-height: 1.1; }
.adm-brand span { font-size: 12px; color: var(--muted); }
.adm-nav nav { display: flex; flex-direction: column; gap: 2px; }
.adm-link { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.adm-link span { flex: 1; }
.adm-link:hover { background: var(--surface-2); color: var(--fg); }
.adm-link.on { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--fg); }
.adm-link.on .ic { color: var(--brand); }
.badge { font-style: normal; background: var(--surface-2); color: var(--fg); border-radius: 999px; font-size: 12px; font-weight: 700; min-width: 20px; padding: 1px 6px; text-align: center; }
.badge-hot { background: var(--bad); color: #fff; }
.adm-online { margin-top: auto; padding: 10px 6px 2px; border-top: 1px solid var(--line); }
.adm-online .tgl-label { font-size: 13px; font-weight: 600; }
.adm-main { min-width: 0; padding: 22px 24px 40px; }
.admin-compact .adm-main { height: 100%; overflow-y: auto; padding: 18px 18px 30px; overscroll-behavior: contain; }
.page { display: flex; flex-direction: column; gap: 16px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.adm-head h1, .adm-head h2 { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.adm-head p { font-size: 14px; margin-top: 2px; max-width: 70ch; }
.adm-head-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.card-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi small { font-size: 12.5px; color: var(--muted); }
.kpi small.up { color: var(--ok); } .kpi small.down { color: var(--bad); }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid, .two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini-list li:last-child { border-bottom: 0; }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.todo li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@container (max-width: 760px) { .board { grid-template-columns: minmax(0, 1fr); } }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col h3 em { font-style: normal; background: var(--surface); border-radius: 999px; padding: 0 8px; font-size: 12.5px; }
.col-empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 18px 0; }
.ocard { background: var(--surface); border-radius: 12px; border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--line); }
.ocard.st-nuovo { border-left-color: var(--bad); animation: rise .25s ease-out; }
.ocard.st-preparazione { border-left-color: var(--warn); }
.ocard.st-pronto { border-left-color: var(--ok); }
.ocard header { display: flex; align-items: center; gap: 8px; }
.ono { font-family: var(--display); font-size: 19px; }
.age { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; }
.ocard-who { display: flex; flex-direction: column; gap: 1px; }
.pickup { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--info); }
.olines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.olines li { display: flex; gap: 8px; }
.olines li > span { display: flex; flex-direction: column; }
.olines em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.olines em.note, .kt-line em.note { color: var(--bad); font-weight: 600; }
.onote { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; background: var(--warn-bg); color: var(--warn); padding: 7px 9px; border-radius: 9px; font-weight: 600; }
.ocard-tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 8px; }
.ocard-tot .money { font-weight: 700; }
.ocard-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ocard-act.confirm { background: var(--bad-bg); padding: 8px; border-radius: 10px; }
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.kt { background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.kt header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; }
.kt-ok header { background: var(--deep); } .kt-warn header { background: #A86A12; } .kt-bad header { background: #B93A2E; }
.kt header b { font-family: var(--display); font-size: 20px; }
.kt-age { font-weight: 700; font-variant-numeric: tabular-nums; }
.kt-pick { padding: 6px 12px; font-size: 13px; font-weight: 700; background: var(--info-bg); color: var(--info); }
.kt-new { padding: 6px 12px; font-size: 13px; font-weight: 600; background: var(--bad-bg); color: var(--bad); }
.kt ul { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.kt-line { width: 100%; display: flex; gap: 10px; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-size: 15.5px; font-weight: 600; }
.kt-line:hover { background: var(--surface-2); }
.kt-line b { min-width: 22px; font-size: 18px; }
.kt-line > span { display: flex; flex-direction: column; }
.kt-line em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 500; }
.kt-line.done { opacity: .45; text-decoration: line-through; }
.kt .onote { margin: 0 10px; }
.kt-done { margin: 8px 10px 12px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-libero { background: var(--surface); border: 1px solid var(--line); } .lg-occupato { background: var(--warn-bg); border: 1px solid var(--warn); }
.lg-pronto { background: var(--ok-bg); border: 1px solid var(--ok); } .lg-prenotato { background: var(--info-bg); border: 1px solid var(--info); }
.zone { display: flex; flex-direction: column; gap: 8px; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tbl-card { aspect-ratio: 1; max-width: 100%; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; text-align: center; }
.tbl-card b { font-family: var(--display); font-size: 26px; }
.tbl-card.big { aspect-ratio: auto; }
.ts-occupato { background: var(--warn-bg); border-color: var(--warn); }
.ts-pronto { background: var(--ok-bg); border-color: var(--ok); }
.ts-prenotato { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.note-box { display: flex; gap: 8px; align-items: flex-start; background: var(--info-bg); color: var(--info); padding: 10px 12px; border-radius: 12px; font-size: 14px; margin-bottom: 10px; }
.tbl-order { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; background: var(--surface); }
.pad { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
@container (max-width: 640px) { .pad { grid-template-columns: minmax(0, 1fr); } }
.pad-menu { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pad-menu .g-chips { padding: 0; flex-wrap: wrap; }
.pad-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pad-item { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 66px; }
.pad-item:hover:not(:disabled) { border-color: var(--brand); }
.pad-item b { font-size: 14px; line-height: 1.2; }
.pad-cart { background: var(--surface-2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pad-line { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); padding: 8px; border-radius: 10px; }
.pad-note { margin-top: 4px; padding: 5px 8px; font-size: 13px; }
.receipt { font-family: var(--mono); font-size: 12.5px; background: #FFFEFA; color: #1A1A1A; width: 100%; max-width: 320px; margin: 0 auto 14px; padding: 18px 16px; box-shadow: 0 2px 10px rgb(0 0 0 / .12); border-radius: 4px; display: flex; flex-direction: column; gap: 3px; }
.rc-center { text-align: center; } .rc-big { font-weight: 700; font-size: 14px; } .rc-small { font-size: 11px; }
.rc-row { display: flex; justify-content: space-between; gap: 10px; }
.rc-sub { padding-left: 14px; font-size: 11.5px; }
.rc-rule { border-top: 1px dashed #999; margin: 6px 0; }
.day-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.day-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; align-items: center; min-width: 76px; font-size: 13px; }
.day-tab b { font-size: 18px; font-family: var(--display); }
.day-tab.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.res-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.res-row:last-child { border-bottom: 0; }
.res-row select { padding: 5px 8px; font-size: 13px; }
.res-time { display: flex; flex-direction: column; min-width: 56px; }
.menu-ed { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
@container (max-width: 760px) { .menu-ed { grid-template-columns: minmax(0, 1fr); } }
.cat-list { gap: 2px; padding: 8px; }
.cat-row { display: flex; align-items: center; gap: 0; border-radius: 10px; }
.cat-row.on { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.cat-row .icon-btn { width: 26px; height: 26px; }
.cat-name { border: 0; background: none; text-align: left; padding: 8px; display: flex; flex-direction: column; }
.cat-add { display: flex; gap: 6px; margin-top: 8px; }
.item-rows { display: flex; flex-direction: column; }
.item-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.item-row:last-child { border-bottom: 0; }
.item-row.off { opacity: .6; }
.item-row .money { font-weight: 700; min-width: 54px; text-align: right; }
.ed-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
@container (max-width: 640px) { .ed-grid { grid-template-columns: minmax(0, 1fr); } }
.ed-photo { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.opt-ed { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.chart-wrap { width: 100%; overflow-x: auto; }
.chart { width: 100%; min-width: 420px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--body); }
.chart .bar { fill: color-mix(in srgb, var(--brand) 55%, var(--surface)); }
.chart .bar-hi { fill: var(--brand); }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 1.2fr) minmax(60px, 2fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-t { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar-t i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.hbar b { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.wc-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; background: #2A1B1F; color: #F1E4D0; }
.wc-card { border-color: color-mix(in srgb, #7A2E3A 35%, var(--line)); }
.shop { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.shop li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shop li.done b { text-decoration: line-through; color: var(--muted); }
.search { width: 240px; max-width: 100%; }
.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 10px; font-size: 14px; font-weight: 600; min-width: 76px; }
.theme-sw.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.sw { width: 44px; height: 30px; border-radius: 8px; position: relative; overflow: hidden; }
.sw i { position: absolute; right: 0; bottom: 0; width: 50%; height: 50%; border-top-left-radius: 8px; }
.snip-prev { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px; background: var(--surface-2); border-radius: 12px; justify-content: center; }
.snip-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; color: #fff; font-weight: 700; }
.snip-ghost { background: transparent !important; border: 2px solid; }
.snip { font-size: 12px; }
.hours { display: flex; flex-direction: column; gap: 6px; }
.hour-row { display: grid; grid-template-columns: 82px auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.hour-row input { padding: 6px 8px; font-size: 13px; }

/* staff */
.roster-bar { font-size: 15px; }
.roster-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.roster { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 13px; }
.roster th, .roster td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; vertical-align: top; }
.roster thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; background: var(--surface-2); }
.roster tbody th { text-align: left; font-weight: 600; min-width: 150px; display: table-cell; }
.roster tbody th .muted { display: block; font-weight: 400; }
.roster .today { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.roster thead th.today { color: var(--brand); }
.roster td { min-width: 96px; }
.roster .num { text-align: right; white-space: nowrap; }
.who { display: inline-flex; align-items: center; gap: 7px; }
.who i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.shift { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; border-left: 3px solid var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 12%, var(--surface)); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; text-align: left; }
.shift-bad { box-shadow: inset 0 0 0 1.5px var(--bad); color: var(--bad); }
.demo-chip { display: inline-flex; width: auto; padding: 0 6px; margin: 0 4px 0 0; }
.shift-add { width: 100%; border: 1px dashed var(--line); background: transparent; border-radius: 6px; color: var(--muted); padding: 2px; display: grid; place-items: center; opacity: .5; }
.shift-add:hover { opacity: 1; border-color: var(--brand); color: var(--brand); }
.roster tfoot th, .roster tfoot td { background: var(--surface-2); text-align: left; }
.legend-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.kiosk { align-items: center; }
.pin-dots { display: flex; gap: 14px; margin: 10px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--fg); border-color: var(--fg); }
.pinpad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; }
.pinpad button { height: 62px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); font-size: 24px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.pinpad button:active { background: var(--line); }
.kiosk-msg { font-weight: 600; text-align: center; max-width: 34ch; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; width: 160px; max-width: 100%; }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter i.over { background: var(--warn); }
.punch-one { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.emp { display: flex; flex-direction: column; gap: 14px; }
.emp-head { background: var(--deep); color: #fff; border-radius: 20px; padding: 18px; display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.emp-head h1 { font-family: var(--display); font-size: 26px; }
.emp-head p { color: rgb(255 255 255 / .75); font-size: 14px; }
.emp-head .eyebrow { color: rgb(255 255 255 / .7); }
.emp-head select { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .3); }
.emp-head select option { color: #111; }
.emp-body { display: flex; flex-direction: column; gap: 14px; }
.emp-week { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.emp-week li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.emp-week li:last-child { border-bottom: 0; }
.emp-week li.today .emp-day { color: var(--brand); }
.emp-day { width: 64px; font-weight: 700; font-size: 14px; flex: none; }
.emp-shift { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 8px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); font-weight: 600; font-size: 14px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.emp-shift em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* admin on narrow containers */
@container (max-width: 760px) {
  .admin, .admin-compact { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: sticky; top: 0; height: auto; flex-direction: row; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 6; overflow: visible; }
  .adm-brand, .adm-online { display: none; }
  .adm-nav nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .adm-link { padding: 7px 10px; font-size: 13px; }
  .adm-main { padding: 16px 14px 30px; }
  .admin-compact { display: flex; flex-direction: column; }
  .admin-compact .adm-main { flex: 1; min-height: 0; }
  .admin-compact .adm-nav { height: auto; }
}

/* ---------- mock restaurant website ---------- */
.site-wrap { padding-block: 18px 40px; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.site-note { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.site { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #FBF8F3; color: #2A2622; font-family: Georgia, 'Times New Roman', serif; box-shadow: var(--shadow); }
.site-nav { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: #FBF8F3; }
.site-name { font-size: 20px; font-family: var(--display); }
.site-links { display: flex; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.site-links a { color: #2A2622; cursor: default; }
.site-hero { min-height: 340px; display: flex; align-items: flex-end; background: radial-gradient(ellipse at 75% 20%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 55%), linear-gradient(160deg, var(--deep), color-mix(in srgb, var(--deep) 60%, #000)); color: #fff; }
.site-hero-in { padding: 40px 28px; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.site-hero h1 { font-family: var(--display); font-size: clamp(30px, 5vw, 48px); letter-spacing: -.02em; }
.site-hero p { font-size: 17px; color: rgb(255 255 255 / .85); }
.site-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.site-btn { border: 0; background: var(--brand); color: #fff; padding: 14px 26px; border-radius: 999px; font: 700 16px var(--body); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.site-btn.ghost { background: transparent; border: 2px solid #fff; box-shadow: none; }
.site-btn.small { padding: 10px 18px; font-size: 14px; margin-top: 8px; }
.site-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding: 28px 24px 32px; }
.site-cols h3 { font-family: var(--display); font-size: 19px; margin-bottom: 8px; }
.site-cols p { font-size: 15px; color: #4B453F; }
.site-cols .between { padding: 3px 0; border-bottom: 1px dotted #D8CFC2; }

/* payments, stock, till connection */
.pay-box { display: flex; flex-direction: column; gap: 14px; }
.pay-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; }
.pay-head b.money { font-family: var(--display); font-size: 34px; letter-spacing: -.02em; }
.psp { font-size: 12.5px; color: var(--muted); }
.twint-pay { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr { width: 200px; max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 2px 12px rgb(0 0 0 / .12); }
.pay-steps { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; align-self: stretch; }
.pay-ok { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0; text-align: center; }
.pay-ok-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: rise .25s ease-out; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-note { text-align: center; }
.pos-sync { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ok); }
.sync-pill { gap: 5px; }
.pos-opts { display: flex; flex-direction: column; gap: 8px; }
.pos-opt { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.pos-opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pos-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sync-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sync-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fc { display: inline-flex; align-items: center; gap: 8px; }
.fc-t { width: 80px; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.fc-t i { display: block; height: 100%; background: var(--ok); }
.fc-t i.warn { background: var(--warn); } .fc-t i.bad { background: var(--bad); }
.fc b { font-size: 13px; font-variant-numeric: tabular-nums; }
.kpi b.kpi-txt { font-size: 20px; }
.w-xs { width: 80px; flex: none; padding: 6px 8px; }
.rec-row { margin-bottom: 8px; }

/* =====================================================================
   November 2026 pass: phones, tablets, touch, dialogs
   ===================================================================== */
:root { --tb-h: 58px; }
html { scrollbar-gutter: stable; }

/* ---------- top bar: reset button, short labels, phone layout ---------- */
.tb-nav { flex: 0 1 auto; }
.tb-short { display: none; }
.tb-reset { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tb-reset:hover { color: var(--fg); }
.tb-reset.sure { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (max-width: 1100px) {
  .tb-long { display: none; }
  .tb-short { display: inline; }
}
@media (max-width: 760px) {
  /* Row 1: brand and reset. Row 2: the five views, all visible. Only row 2 stays pinned while scrolling. */
  :root { --tb-h: 55px; }
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding-block: 8px 6px; top: calc(env(safe-area-inset-top, 0px) - 50px); }
  .tb-brand, .tb-reset { height: 34px; }
  .tb-nav { order: 3; flex: 1 0 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; overflow: visible; }
  .tb-link { flex-direction: column; justify-content: center; gap: 3px; min-height: 48px; padding: 5px 2px; border-radius: 12px; font-size: 12px; letter-spacing: -.01em; }
  .adm-nav { top: var(--tb-h); }
}
/* the category bar of the stand-alone order page must sit under the top bar, not behind it */
.solo-guest .g-catbar { top: var(--tb-h); }

/* ---------- orders board and portal on tablets ---------- */
.ocard { min-width: 0; }
.ocard header { flex-wrap: wrap; row-gap: 4px; }
.ocard-tot { flex-wrap: wrap; gap: 2px 10px; }
.ocard .btn { max-width: 100%; }
.olines li > span { min-width: 0; overflow-wrap: anywhere; }
/* between phone and laptop width the side menu shrinks to icons, so the three columns keep their room */
@container (min-width: 761px) and (max-width: 940px) {
  .admin:not(.admin-compact) { grid-template-columns: 64px minmax(0, 1fr); }
  .admin:not(.admin-compact) .adm-nav { padding: 12px 8px; }
  .admin:not(.admin-compact) .adm-brand { justify-content: center; padding: 2px 0 10px; }
  .admin:not(.admin-compact) .adm-brand > div { display: none; }
  .admin:not(.admin-compact) .adm-link { justify-content: center; position: relative; padding: 11px 0; }
  .admin:not(.admin-compact) .adm-link span, .admin:not(.admin-compact) .adm-online .tgl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; flex: none; }
  .admin:not(.admin-compact) .adm-link .badge { position: absolute; top: 1px; right: 2px; min-width: 18px; padding: 0 5px; }
  .admin:not(.admin-compact) .adm-online { padding: 10px 0 2px; display: flex; justify-content: center; }
  .admin:not(.admin-compact) .adm-main { padding: 18px 16px 32px; }
}
@container (min-width: 761px) and (max-width: 870px) {
  .admin-compact { grid-template-columns: 64px minmax(0, 1fr); }
  .admin-compact .adm-nav { padding: 12px 8px; }
  .admin-compact .adm-brand { justify-content: center; padding: 2px 0 10px; }
  .admin-compact .adm-brand > div { display: none; }
  .admin-compact .adm-link { justify-content: center; position: relative; padding: 11px 0; }
  .admin-compact .adm-link span, .admin-compact .adm-online .tgl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; flex: none; }
  .admin-compact .adm-link .badge { position: absolute; top: 1px; right: 2px; min-width: 18px; padding: 0 5px; }
  .admin-compact .adm-online { padding: 10px 0 2px; display: flex; justify-content: center; }
  .admin-compact .adm-main { padding: 18px 16px 32px; }
}

/* ---------- lists: long names shorten instead of running over the next column ---------- */
.mini-list li > * { flex: none; }
.mini-list li > .grow { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- touch: controls big enough for a finger ---------- */
@media (pointer: coarse) {
  .chip, .chip-sm { min-height: 40px; }
  .seg button { min-height: 40px; padding-inline: 14px; }
  .btn-sm { min-height: 40px; }
  .icon-btn, .stepper button { width: 40px; height: 40px; }
  .g-context select { min-height: 40px; padding-inline: 12px; }
  .adm-link { min-height: 44px; }
  .present-switch button { min-height: 40px; }
}

/* ---------- dialogs ---------- */
html.has-sheet, html.has-sheet body { overflow: hidden; }
.sheet:focus { outline: none; }

/* ---------- fallback screen ---------- */
.crash { max-width: 460px; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.crash h1 { font-family: var(--display); font-size: 26px; }
.crash p { color: var(--muted); }
.crash-act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* narrow tablets: the reset button shows its icon only, the label comes back when it asks to confirm */
@media (min-width: 761px) and (max-width: 900px) {
  .topbar { gap: 10px; }
  .tb-link { padding: 8px 9px; }
  .tb-reset { padding: 8px 10px; }
  .tb-reset:not(.sure) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* the logo letter in the portal menu was inheriting the grey of the caption next to it */
.adm-brand .logo-mark { color: #fff; }
/* on a phone the order row keeps status, number, name and amount; the channel is on the Orders page */
@container (max-width: 480px) { .mini-list li > .muted.small { display: none; } }

/* =====================================================================
   Visual refresh: the guest page and the presentation should look designed
   even before the restaurant has uploaded its photos
   ===================================================================== */

/* ---------- guest: header ---------- */
.g-hero { position: relative; padding: 26px 18px 22px; background:
    radial-gradient(120% 85% at 100% 0%, color-mix(in srgb, var(--brand) 62%, transparent) 0%, transparent 62%),
    radial-gradient(90% 70% at 0% 100%, rgb(0 0 0 / .28) 0%, transparent 70%),
    var(--deep); }
.g-hero:has(+ .g-modes) { padding-bottom: 38px; }
.g-hero h1 { font-size: 28px; letter-spacing: -.02em; }
.g-hero p { font-size: 14px; color: rgb(255 255 255 / .84); }
.g-hero .logo-mark, .g-hero .logo-img { box-shadow: 0 6px 18px rgb(0 0 0 / .28); }
.g-status { display: inline-flex; margin-top: 16px; border-radius: 999px; padding: 7px 14px 7px 12px; background: rgb(255 255 255 / .14); font-weight: 600; }
.g-status .dot-ok { box-shadow: 0 0 0 4px rgb(74 222 128 / .22); }

/* ---------- guest: how to order ---------- */
.g-hero + .g-modes { position: relative; margin-top: -18px; padding: 16px 14px 4px; background: var(--bg); border-radius: 22px 22px 0 0; gap: 8px; }
.g-mode { padding: 12px 4px 10px; border-radius: 16px; gap: 6px; font-size: 13px; transition: background .15s, color .15s, box-shadow .15s; }
.g-mode.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.g-mode.on .ic { color: #fff; }
.g-context { border-radius: 14px; }

/* ---------- tiles without a photo ---------- */
.tile-glyph { background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--brand) 30%, var(--surface))); }
.tile-lg.tile-glyph, .tile-hero.tile-glyph { background:
    radial-gradient(110% 130% at 88% 0%, color-mix(in srgb, var(--brand) 78%, var(--deep)) 0%, transparent 58%),
    linear-gradient(160deg, var(--deep), color-mix(in srgb, var(--deep) 62%, #000));
  color: rgb(255 255 255 / .94); }
.tile-lg.tile-glyph svg, .tile-hero.tile-glyph svg { width: 60px; height: 60px; }

/* ---------- guest: dishes of the day ---------- */
.g-spec { flex-basis: 82%; border-radius: 20px; border-color: transparent; box-shadow: var(--shadow); }
.g-spec .tile-lg { aspect-ratio: 16 / 8; }
.g-spec-row { gap: 12px; padding: 2px 2px 14px; margin-inline: -2px; }
.g-spec-body { padding: 14px 16px 16px; }
.g-spec-body h3 { font-size: 19px; }
.g-spec-body .eyebrow { color: var(--brand); }

/* ---------- guest: menu ---------- */
.g-cat { padding-top: 26px; }
.g-cat .g-h2 { font-size: 22px; display: flex; align-items: center; gap: 9px; }
.g-cat .g-h2::before { content: ""; width: 4px; height: .95em; border-radius: 2px; background: var(--brand); }
.g-list { gap: 8px; }
.g-item { position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 12px; transition: transform .1s, box-shadow .15s, border-color .15s; }
.g-item:last-child { border-bottom: 1px solid var(--line); }
.g-item:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 6px 18px rgb(20 30 22 / .08); }
.g-item:active:not(:disabled) { transform: scale(.99); }
.g-item h3 { font-size: 16.5px; }
.g-item-meta .money { font-size: 15.5px; }
/* a visible "add" sign: before, nothing told the guest that a dish can be tapped */
.g-item:not(.off)::after { content: "+"; position: absolute; right: 7px; bottom: 7px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font: 600 21px/29px var(--body); text-align: center; box-shadow: 0 0 0 3px var(--surface), 0 4px 10px color-mix(in srgb, var(--brand) 35%, transparent); }
.g-cartbtn { padding: 15px 20px; font-size: 16px; }

/* ---------- presentation ---------- */
.present { position: relative; isolation: isolate; counter-reset: step; padding-top: 24px; }
.present::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 460px; pointer-events: none; background:
    radial-gradient(38% 90% at 24% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(36% 80% at 66% 0%, color-mix(in srgb, var(--deep) 13%, transparent), transparent 70%); }
.present-cap { gap: 4px; margin-bottom: 14px; font-size: 14px; }
.present-cap b { font-family: var(--display); font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
@media (min-width: 1021px) {
  .present-cap b::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 13.5px/1 var(--body); flex: none; }
  .present-cap span { padding-left: 36px; }
}

/* ---------- portal ---------- */
.adm-head h1 { font-size: 30px; }
.card, .kpi { border-radius: 16px; box-shadow: 0 1px 2px rgb(20 30 22 / .04); }
.kpi { padding: 16px 18px; }
.kpi b { font-size: 30px; }
.kpis > .kpi:first-child { background: var(--deep); border-color: var(--deep); color: #fff; }
.kpis > .kpi:first-child > span, .kpis > .kpi:first-child small { color: rgb(255 255 255 / .78); }
.kpis > .kpi:first-child small.up { color: #7EE2A8; } .kpis > .kpi:first-child small.down { color: #FFB1A6; }
.adm-link { transition: background .12s, color .12s; }
.adm-link.on { box-shadow: inset 3px 0 0 var(--brand); }
@container (max-width: 760px) { .adm-link.on { box-shadow: none; } }
.ocard { border-radius: 14px; box-shadow: 0 1px 2px rgb(20 30 22 / .05); }

/* ---------- sedi, accessi, terminale, eventi ---------- */
.g-modes { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }
.adm-ctx { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: -6px 0 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ctx-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ctx-pick select { padding: 5px 8px; font-size: 13.5px; font-weight: 600; color: var(--fg); max-width: 260px; }
.row-on td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.role-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.role-row:last-child { border-bottom: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.perm-key { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
.check-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.sub-h { font-size: 15px; margin: 16px 0 6px; }

/* terminale di sede */
.term { max-width: 1100px; margin: 0 auto; padding: 18px 0 40px; display: flex; flex-direction: column; gap: 16px; }
.term-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.term-place { font-family: var(--display); font-size: 20px; }
.term-place b { color: var(--brand); }
.term-net { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.term-net.off { background: var(--bad-bg); color: var(--bad); }
.term-offline { display: flex; gap: 10px; align-items: center; background: var(--warn-bg); color: var(--warn); padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.term-idle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 18px; align-items: start; }
.term-left { display: flex; flex-direction: column; gap: 14px; }
.term-clock { font-family: var(--display); font-size: clamp(64px, 11vw, 112px); font-weight: 700; letter-spacing: -.04em; line-height: .95; font-variant-numeric: tabular-nums; }
.term-date { font-size: 18px; color: var(--muted); margin-top: -6px; }
.term-duty { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 15px; font-weight: 600; }
.term-pin { padding: 24px 18px; gap: 12px; }
.term-pin h2 { font-family: var(--display); font-size: 22px; }
.term-pin .pinpad { grid-template-columns: repeat(3, 84px); }
.term-pin .pinpad button { height: 70px; font-size: 26px; }
.term-demo { padding: 4px 2px; }
.term-me { display: flex; flex-direction: column; gap: 16px; }
.term-hello { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.term-hello h1 { font-family: var(--display); font-size: 32px; letter-spacing: -.02em; }
.term-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 24px var(--display); font-style: normal; flex: none; }
.term-msg { text-align: left; max-width: none; background: var(--ok-bg); color: var(--ok); padding: 12px 14px; border-radius: 12px; }
.term-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.term-actions .btn { min-height: 64px; padding-inline: 28px; font-size: 18px; border-radius: 16px; flex: 1 1 200px; justify-content: center; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.term-sold { grid-column: 1 / -1; }
.sold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sold { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.sold em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 600; }
.sold.off { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.sold.off span { text-decoration: line-through; }
.sold.off em { color: var(--bad); }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.board-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.board-list li:last-child { border-bottom: 0; }
.board-list li.pinned p::before { content: "\1F4CC  "; }
@media (max-width: 760px) {
  .term-idle { grid-template-columns: 1fr; }
  .term-pin { order: -1; }
}

/* eventi */
.ev-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ev-row:last-child { border-bottom: 0; }
.ev-main { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.ev-date { width: 52px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: color-mix(in srgb, var(--brand) 85%, var(--fg)); display: flex; flex-direction: column; align-items: center; padding: 6px 0 5px; line-height: 1; }
.ev-date b { font-family: var(--display); font-size: 22px; }
.ev-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-top: 3px; }
.glyph-pick { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.glyph-pick.on { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pk-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(160px, 2fr) auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pk-row:last-child { border-bottom: 0; }
.pk-num { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pk-num input { width: 72px; }
@media (max-width: 760px) { .pk-row { grid-template-columns: 1fr 1fr; } }
.rq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; margin-bottom: 12px; }
.rq-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ev-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ev-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.ev-card h3 { font-size: 16px; }
.ev-card .ic { color: var(--muted); }
.ev-detail { display: flex; flex-direction: column; gap: 10px; }
.ev-detail .field { margin-bottom: 4px; }
.ev-hero { position: relative; }
.ev-hero .tile { width: 100%; height: 150px; border-radius: 18px; }
.ev-hero .ev-date { position: absolute; left: 12px; bottom: 12px; background: var(--surface); box-shadow: var(--shadow); }
.pk-pick { display: flex; flex-direction: column; gap: 8px; }
.pk-pick .opt { justify-content: space-between; text-align: left; width: 100%; }
.site-events { padding: 28px 24px 4px; display: flex; flex-direction: column; gap: 12px; }
.site-events h3 { font-family: var(--display); font-size: 22px; }
.site-ev-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.site-ev { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #E5DCCF; border-radius: 14px; background: #fff; }
.site-ev p { color: #4B453F; }
.site-ev .site-btn.small { margin-top: 0; padding: 8px 14px; }
.site-events .link-btn { align-self: flex-start; color: #2A2622; text-decoration: underline; font-family: var(--body); }
.ev-detail .stepper, .g-reserve .stepper { align-self: flex-start; }
.reg-stack { display: flex; flex-direction: column-reverse; gap: 14px; }

/* ---------- benvenuto, accesso, le mie sedi ---------- */
.app-site { --brand: #C24E17; --deep: #1E3A2C; }
.wl { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; }
.wl-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 14px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.wl-links { display: flex; gap: 4px; margin-left: 18px; }
.wl-links button, .wl-home { border: 0; background: none; font-weight: 600; color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.wl-links button:hover { color: var(--fg); background: var(--surface-2); }
.wl-home { color: var(--fg); padding: 0; }
.wl-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding: 64px 0 56px; }
.wl-hero-txt { display: flex; flex-direction: column; gap: 18px; }
.wl-hero h1 { font-family: 'Bricolage Grotesque', var(--body); font-size: clamp(40px, 5.4vw, 66px); letter-spacing: -.035em; line-height: 1.02; }
.wl-hero p { font-size: 19px; color: var(--muted); max-width: 46ch; }
.wl-shot { border-radius: 22px; background: var(--deep); padding: 12px; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.wl-shot-top { display: flex; gap: 6px; padding: 2px 4px 10px; }
.wl-dot { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .25); }
.wl-shot-body { background: var(--bg); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wl-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wl-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.wl-kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wl-kpi b { font-family: 'Bricolage Grotesque', var(--body); font-size: 19px; }
.wl-order { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.wl-order .meter { width: 100%; }
.wl-chip { font-size: 12px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.wl-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.wl-sec { padding: 56px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.wl-sec h2 { font-family: 'Bricolage Grotesque', var(--body); font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.025em; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.wl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.wl-card h3 { font-size: 17px; }
.wl-card p { color: var(--muted); font-size: 15px; }
.wl-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 13%, var(--surface)); color: var(--brand); }
.wl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.wl-steps li { display: flex; gap: 14px; align-items: flex-start; }
.wl-steps h3 { font-size: 17px; margin-bottom: 4px; }
.wl-steps p { color: var(--muted); font-size: 15px; }
.wl-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-family: 'Bricolage Grotesque', var(--body); }
.wl-about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; }
.wl-about p { font-size: 18px; margin-bottom: 14px; max-width: 58ch; }
.wl-book { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.wl-book-txt p { color: var(--muted); font-size: 17px; margin-top: 10px; }
.wl-form { padding: 22px; }
.wl-form .pay-ok-ic { align-self: flex-start; }
.wl-foot { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.wl-login { min-height: 100dvh; }
.wl-login-card { width: min(420px, 100%); margin: 70px auto 0; padding: 28px; gap: 6px; }
.wl-login-card h1 { font-family: 'Bricolage Grotesque', var(--body); font-size: 30px; letter-spacing: -.02em; margin-bottom: 14px; }
.wl-login-card .btn-lg { justify-content: center; margin-top: 4px; }
.wl-login-card .link-btn { align-self: center; margin-top: 6px; }
.wl-err { color: var(--bad); background: var(--bad-bg); padding: 9px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }
@media (max-width: 860px) {
  .wl-hero, .wl-about, .wl-book { grid-template-columns: 1fr; }
  .wl-hero { padding: 36px 0; gap: 28px; }
  .wl-links { display: none; }
  .wl-shot { transform: none; }
}
@media (max-width: 520px) {
  .wl-nav .btn-ghost { display: none; }
  .wl-kpis { grid-template-columns: 1fr 1fr; }
  .wl-kpi:last-child { display: none; }
}
.tb-user span { white-space: nowrap; }
.home { max-width: 1160px; margin: 0 auto; padding: 26px 0 50px; display: flex; flex-direction: column; gap: 16px; }
.home-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home-head h1 { font-family: var(--display); font-size: 36px; letter-spacing: -.02em; }
.home-main { padding: 22px; gap: 16px; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.home-main-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.home-main-head h2 { font-family: var(--display); font-size: 30px; letter-spacing: -.02em; margin: 2px 0; }
.home-alert { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 600; font-size: 14px; }
.home-sub { margin-top: 8px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.home-sede { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color .12s, transform .12s; }
.home-sede:hover { border-color: var(--brand); transform: translateY(-1px); }
.home-sede .ic { color: var(--muted); }
.home-sede-nums { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 4px; }
.home-sede-nums b { color: var(--fg); font-size: 14px; }

/* =====================================================================
   Easier to understand: tidy top bar, guided tour, portal menu in groups
   ===================================================================== */

/* ---------- top bar ---------- */
.tb-user + .tb-reset { margin-left: 0; }
@media (max-width: 1360px) {
  .tb-long { display: none; }
  .tb-short { display: inline; }
}
@media (max-width: 760px) {
  /* row 1: brand, account, reset. Row 2: all the views in one line, whatever their number */
  .tb-demo { display: none; }
  .tb-nav { display: flex; gap: 2px; }
  .tb-link { flex: 1 1 0; min-width: 0; }
  .tb-restore { padding: 8px 10px; }
  .tb-restore:not(.sure) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- invitation on the first page after login ---------- */
.tour-invite { max-width: 1160px; margin: 18px auto 0; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); border-radius: 18px; padding: 14px 16px; }
.tour-invite > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-invite b { font-size: 16px; }
.tour-invite > div span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.tour-invite-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.tour-invite + .home { padding-top: 16px; }
@media (max-width: 760px) {
  .tour-invite { flex-wrap: wrap; }
  .tour-invite > div { flex-basis: calc(100% - 54px); }
  .tour-invite .btn { width: 100%; }
}

/* ---------- guided tour: takes the place of the view menu while it runs ---------- */
.tour { order: 2; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; background: var(--deep); color: #fff; border-radius: 16px; padding: 8px 8px 8px 14px; }
.tour-exit { order: 3; margin-left: 0; }
.tour-dots { display: flex; gap: 6px; list-style: none; padding: 0; flex: none; }
.tour-dots li { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: rgb(255 255 255 / .14); color: rgb(255 255 255 / .75); }
.tour-dots li.now { background: var(--brand); color: #fff; }
.tour-dots li.past { background: #4ADE80; color: #0B2A17; }
.tour-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.tour-txt b { font-size: 15px; display: flex; gap: 2px 9px; align-items: baseline; flex-wrap: wrap; }
.tour-count { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgb(255 255 255 / .72); }
.tour-txt > span { font-size: 14px; color: rgb(255 255 255 / .9); }
.tour.ok .tour-txt > span { color: #8EF0B4; font-weight: 600; }
.tour-act { display: flex; gap: 4px; flex: none; align-items: center; }
.tour-back { border: 0; background: transparent; color: rgb(255 255 255 / .82); font-weight: 600; padding: 9px 12px; border-radius: 999px; }
.tour-back:hover { background: rgb(255 255 255 / .12); color: #fff; }
.tour-next { border: 0; background: #fff; color: #14201A; font-weight: 700; padding: 10px 12px 10px 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.tour.ok .tour-next { background: var(--brand); color: #fff; animation: tour-pulse 1.5s ease-out infinite; }
@keyframes tour-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 70%, transparent); } 75%, 100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .tour.ok .tour-next { animation: none; } }
/* the device to use in this step gets a ring */
.app.tour-0 .phone, .app.tour-1 .tablet, .app.tour-2 .tablet { outline: 3px solid var(--brand); outline-offset: 5px; }
@media (max-width: 760px) {
  .tour { order: 3; flex: 1 0 100%; flex-wrap: wrap; gap: 8px 10px; padding: 10px 10px 10px 14px; border-radius: 14px; }
  .tour-dots { display: none; }
  .tour-txt { flex-basis: 100%; }
  .tour-act { margin-left: auto; }
  .tour-exit { order: 2; margin-left: auto; }
}

/* ---------- portal menu in groups ---------- */
.adm-group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 10px 4px; }
.adm-group:first-child { padding-top: 4px; }
@container (max-width: 760px) { .adm-group { display: none; } }
@container (min-width: 761px) and (max-width: 940px) {
  .admin:not(.admin-compact) .adm-group { font-size: 0; padding: 0; margin: 6px 10px; border-top: 1px solid var(--line); }
  .admin:not(.admin-compact) .adm-group:first-child { display: none; }
}
@container (min-width: 761px) and (max-width: 870px) {
  .admin-compact .adm-group { font-size: 0; padding: 0; margin: 6px 10px; border-top: 1px solid var(--line); }
  .admin-compact .adm-group:first-child { display: none; }
}

/* ==========================================================================
   Novembre 2026: aspetto a scelta del cliente, dashboard a blocchi,
   suggerimenti nell'ordine, conto dal telefono, console master.
   Su <html>: data-theme (light o dark), pal-<nome> e has-accent.
   La pagina del cliente finale tiene lo stile del ristorante.
   ========================================================================== */
:root { --accent: var(--brand); --glow1: transparent; --glow2: transparent; --glass: var(--surface); --glass-line: var(--line); }
:root.pal-notte { --accent: #7C5CF0; }
:root.pal-oceano { --accent: #1479BA; }
:root.pal-bosco { --accent: #2A8253; }
:root.pal-tramonto { --accent: #C94F27; }
:root.pal-grafite { --accent: #5B6170; }
:root.pal-grafite[data-theme="dark"] { --accent: #8D95A8; }

:root.pal-notte[data-theme="light"] { --bg: #F3F2FB; --surface: #FFFFFF; --surface-2: #E9E7F7; --line: #D9D6EE; --fg: #17163A; --muted: #5D5B80; --deep: #1B1A4B; --glow1: rgb(118 87 240 / .13); --glow2: rgb(70 120 255 / .10); }
:root.pal-notte[data-theme="dark"] { --bg: #0B0D26; --surface: #171A3F; --surface-2: #20244F; --line: #2C3163; --fg: #ECEBFA; --muted: #A3A4CC; --deep: #2A2470; --frame: #05061A; --glow1: rgb(118 87 240 / .38); --glow2: rgb(52 96 220 / .26); }
:root.pal-oceano[data-theme="light"] { --bg: #EFF4F8; --surface: #FFFFFF; --surface-2: #E2EAF1; --line: #CFDBE6; --fg: #10202E; --muted: #536678; --deep: #0F2B3E; --glow1: rgb(20 121 186 / .12); --glow2: rgb(34 184 207 / .10); }
:root.pal-oceano[data-theme="dark"] { --bg: #07141F; --surface: #0F2233; --surface-2: #172E43; --line: #223E57; --fg: #E6EEF5; --muted: #94A9BC; --deep: #0E3350; --frame: #030A10; --glow1: rgb(20 121 186 / .36); --glow2: rgb(34 184 207 / .20); }
:root.pal-bosco[data-theme="light"] { --bg: #F1F4EF; --surface: #FFFFFF; --surface-2: #E5EBE2; --line: #D3DCCF; --fg: #17201A; --muted: #55635A; --deep: #1D3522; --glow1: rgb(42 130 83 / .12); --glow2: rgb(160 190 80 / .10); }
:root.pal-bosco[data-theme="dark"] { --bg: #0B130E; --surface: #14201A; --surface-2: #1C2B23; --line: #2A3D32; --fg: #E7EEE8; --muted: #98A99E; --deep: #17402B; --frame: #040805; --glow1: rgb(42 130 83 / .34); --glow2: rgb(120 160 60 / .18); }
:root.pal-tramonto[data-theme="light"] { --bg: #F8F2EE; --surface: #FFFFFF; --surface-2: #F0E5DE; --line: #E3D4CA; --fg: #251712; --muted: #6C5A52; --deep: #4A1F12; --glow1: rgb(201 79 39 / .12); --glow2: rgb(230 150 60 / .10); }
:root.pal-tramonto[data-theme="dark"] { --bg: #150D0B; --surface: #231613; --surface-2: #2F1E1A; --line: #432B25; --fg: #F3E9E4; --muted: #B7A198; --deep: #5A2414; --frame: #080403; --glow1: rgb(201 79 39 / .34); --glow2: rgb(214 140 50 / .18); }
:root.pal-grafite[data-theme="light"] { --bg: #F2F2F3; --surface: #FFFFFF; --surface-2: #E8E8EA; --line: #D6D6DA; --fg: #17181B; --muted: #5B5D66; --deep: #23252B; --glow1: rgb(120 125 140 / .10); }
:root.pal-grafite[data-theme="dark"] { --bg: #0E0F12; --surface: #181A1F; --surface-2: #21242B; --line: #30343D; --fg: #EAEBEE; --muted: #9DA1AD; --deep: #2A2E38; --frame: #050506; --glow1: rgb(140 150 175 / .16); }
:root.pal-classico[data-theme="light"] { --glow1: rgb(194 78 23 / .08); }
:root.pal-classico[data-theme="dark"] { --glow1: rgb(194 78 23 / .22); --glow2: rgb(30 58 44 / .5); }
:root[data-theme="dark"][class*="pal-"] { --glass: color-mix(in srgb, var(--surface) 66%, transparent); --glass-line: rgb(255 255 255 / .11); }
:root[data-theme="light"][class*="pal-"] { --glass: color-mix(in srgb, var(--surface) 84%, transparent); --glass-line: var(--line); }

/* le parti per il ristorante usano il colore della palette */
:root.has-accent .topbar, :root.has-accent .admin-host, :root.has-accent .term, :root.has-accent .home, :root.has-accent .solo-emp, :root.has-accent .master, :root.has-accent .cm-as, :root.has-accent .pv-wrap, :root.has-accent .my-app { --brand: var(--accent); --tile-bg: color-mix(in srgb, var(--accent) 13%, var(--surface)); }

/* la pagina del cliente finale resta nello stile del ristorante e segue il telefono di chi guarda */
.solo-guest, .phone-screen, .site-wrap { --bg: #F2F3EF; --surface: #FFFFFF; --surface-2: #EAECE6; --line: #D8DBD2; --fg: #191D1A; --muted: #5C655D;
  --ok: #18724A; --warn: #8A560C; --bad: #A93226; --info: #2463A6; --violet: #6B48AD;
  --ok-bg: #E1F0E7; --warn-bg: #F7EBD5; --bad-bg: #F7E0DC; --info-bg: #DFE9F5; --violet-bg: #ECE5F6;
  --shadow: 0 1px 2px rgb(20 30 22 / .06), 0 10px 30px rgb(20 30 22 / .09);
  --tile-bg: color-mix(in srgb, var(--brand) 13%, var(--surface));
  color: var(--fg); color-scheme: light; }
.solo-guest .btn-ok, .solo-guest .btn-danger, .phone-screen .btn-ok, .phone-screen .btn-danger { color: #fff; }
@media (prefers-color-scheme: dark) {
  .solo-guest, .phone-screen, .site-wrap { --bg: #101311; --surface: #181C19; --surface-2: #212622; --line: #2E342F; --fg: #E8ECE7; --muted: #9AA39B;
    --ok: #5CC28A; --warn: #E2A64C; --bad: #F07B6D; --info: #70A9E8; --violet: #B89CEB;
    --ok-bg: #15301F; --warn-bg: #33270F; --bad-bg: #3A1B17; --info-bg: #142539; --violet-bg: #261E38;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; }
  .solo-guest .btn-ok, .solo-guest .btn-danger, .phone-screen .btn-ok, .phone-screen .btn-danger { color: #0E120F; }
}

/* ---------- sfondo con luce e card in vetro ---------- */
:root[class*="pal-"] body { background-image: radial-gradient(900px 520px at 88% -8%, var(--glow1), transparent 62%), radial-gradient(820px 560px at -6% 108%, var(--glow2), transparent 60%); background-attachment: fixed; }
:root[class*="pal-"] .admin { background: transparent; }
:root[class*="pal-"] .tablet > .admin-host { background: var(--bg); background-image: radial-gradient(520px 340px at 92% -6%, var(--glow1), transparent 64%), radial-gradient(480px 360px at -4% 106%, var(--glow2), transparent 60%); }
:root[class*="pal-"] .topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
:root[class*="pal-"] .admin .adm-nav { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-right-color: var(--glass-line); }
:root[class*="pal-"] :is(.admin, .home, .master) :is(.card, .kpi), :root[class*="pal-"] .home-sede { background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
:root[data-theme="dark"][class*="pal-"] :is(.admin, .home, .master) :is(.card, .kpi) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 14px 34px rgb(0 0 0 / .28); }
:root[class*="pal-"] :is(.admin, .master) :is(.card, .kpi) { border-radius: 20px; }
:root[class*="pal-"] .adm-link { padding: 10px 12px; border-radius: 12px; font-size: 14.5px; }
:root[class*="pal-"] .adm-link.on { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 68%, var(--deep))); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 32%, transparent); }
:root[class*="pal-"] .adm-link.on .ic { color: #fff; }
:root[class*="pal-"] .adm-link.on .badge { background: rgb(255 255 255 / .22); color: #fff; }
:root[class*="pal-"] .kpis > .kpi:first-child { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--deep))); border-color: transparent; }

/* ---------- tessere dei numeri ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tiles-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@container (max-width: 1040px) { .tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 560px) { .tiles-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); min-width: 0; }
:root[data-theme="dark"] .tile { box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 14px 34px rgb(0 0 0 / .28); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); min-height: 36px; }
.tile > b { font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.tile small { font-size: 12.5px; color: var(--muted); }
.tile small.up { color: var(--ok); } .tile small.down { color: var(--bad); }
.tile-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 12%, transparent); overflow: hidden; margin-top: auto; }
.tile-bar i { display: block; height: 100%; border-radius: 99px; transition: width .4s ease-out; }
.tc-1 .tile-ic, .tc-1 .tile-bar i { background: #E5488F; } .tc-2 .tile-ic, .tc-2 .tile-bar i { background: #7C5CF0; }
.tc-3 .tile-ic, .tc-3 .tile-bar i { background: #1AA7B8; } .tc-4 .tile-ic, .tc-4 .tile-bar i { background: #E8822B; }
.tc-5 .tile-ic, .tc-5 .tile-bar i { background: #2F6FE4; } .tc-6 .tile-ic, .tc-6 .tile-bar i { background: #2E9B63; }

/* ---------- dashboard a blocchi ---------- */
.dash-cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dash-cards > .wz-s { grid-column: span 4; } .dash-cards > .wz-m { grid-column: span 6; } .dash-cards > .wz-l { grid-column: span 8; } .dash-cards > .wz-f { grid-column: span 12; }
@container (max-width: 1040px) { .dash-cards > .wz-s, .dash-cards > .wz-m { grid-column: span 6; } .dash-cards > .wz-l { grid-column: span 12; } }
@container (max-width: 700px) { .dash-cards > * { grid-column: span 12 !important; } }
.wdg { position: relative; min-width: 0; }
.wdg > .card { height: 100%; }
.dash-edit .wdg { outline: 2px dashed color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 3px; border-radius: 22px; }
.wdg-tools { display: flex; gap: 2px; position: absolute; top: -12px; right: 10px; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.wdg-tools button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--fg); }
.wdg-tools button:hover:not(:disabled) { background: var(--surface-2); }
.wdg-tools button:disabled { opacity: .3; }
.wdg-tools .rm { color: var(--bad); }
.dash-tray { border: 1px dashed color-mix(in srgb, var(--brand) 55%, var(--line)); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--brand) 6%, transparent); }
.dash-tray-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-add { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px 7px 9px; font-weight: 600; font-size: 14px; }
.dash-add:hover { border-color: var(--brand); }
.dash-add .ic { color: var(--brand); }
.att { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--fg) 5%, transparent); font-size: 14px; }
.att-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.att-bad .att-ic { background: var(--bad-bg); color: var(--bad); } .att-warn .att-ic { background: var(--warn-bg); color: var(--warn); }
.att-ok .att-ic { background: var(--ok-bg); color: var(--ok); } .att-info .att-ic { background: var(--info-bg); color: var(--info); }
.att li > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.att li > div span { color: var(--muted); font-size: 13px; }
.card-att { border-color: color-mix(in srgb, var(--brand) 40%, var(--glass-line)) !important; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.wk-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; font-size: 12px; color: var(--muted); min-width: 0; }
.wk-col i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--brand) 45%, var(--surface)); min-height: 3px; }
.wk-col.now i { background: var(--brand); }
.wk-col b { font-size: 11.5px; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb { display: flex; flex-direction: column; gap: 9px; }
.hb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: 14px; }
.hb-row i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 12%, transparent); overflow: hidden; display: block; }
.hb-row i u { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

/* ---------- impostazioni: aspetto ---------- */
.pals { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pal-sw { display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px; font-size: 13.5px; font-weight: 600; text-align: left; }
.pal-sw.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pal-prev { height: 44px; border-radius: 9px; display: flex; align-items: flex-end; gap: 4px; padding: 6px; border: 1px solid rgb(127 127 127 / .25); }
.pal-prev i { height: 14px; flex: 1; border-radius: 4px; } .pal-prev i:first-child { height: 26px; flex: none; width: 26px; border-radius: 50%; }
.tb-mode { width: 36px; height: 36px; padding: 0 !important; justify-content: center; }
.tb-reset + .tb-reset { margin-left: 0; }

/* ---------- suggerimenti nell'ordine e conto dal telefono ---------- */
.upsell { margin: 0 0 16px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); display: flex; flex-direction: column; gap: 8px; }
.upsell > b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.up-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.up-item { flex: 0 0 158px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px; font-size: 13.5px; }
.up-item b { font-size: 14px; line-height: 1.2; } .up-item em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.up-add { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 700; }
.bill-lines { display: flex; flex-direction: column; margin-bottom: 14px; }
.bill-line { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.bill-line input { width: 20px; height: 20px; flex: none; }
.trk-pay { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* ---------- console master ---------- */
.master { max-width: 1240px; margin: 0 auto; padding: 26px 0 60px; container-type: inline-size; }
.master .tbl td { vertical-align: top; }
.master .tbl td > span { display: block; }
.master .tbl td > .ms-name { display: flex; }
@media (min-width: 1021px) and (max-width: 1560px) { .tb-nav .tb-link { padding: 8px 9px; font-size: 13.5px; gap: 5px; } .topbar { gap: 12px; } }
.ms-name { display: flex; flex-direction: column; gap: 2px; }
.ms-name b { font-size: 15px; }
.ms-use { width: 90px; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 12%, transparent); overflow: hidden; margin-top: 5px; }
.ms-use u { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.ms-use.low u { background: var(--bad); } .ms-use.mid u { background: var(--warn); }
.ms-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@container (max-width: 900px) { .ms-grid { grid-template-columns: minmax(0, 1fr); } }
.ms-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.ms-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ms-fact { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.ms-fact b { color: var(--fg); font-size: 15px; }
.ms-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cm-as { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--violet) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--violet) 45%, var(--line)); font-size: 14px; }
.cm-as .ic { color: var(--violet); }
.cm-block { max-width: 520px; margin: 60px auto; text-align: center; align-items: center; padding: 30px; }


/* ---------- prospettive: manager, iPad in sala, dipendente ---------- */
.pv-wrap { max-width: 1120px; margin: 0 auto; padding-block: 28px 56px; display: flex; flex-direction: column; gap: 22px; }
.pv-head { display: flex; flex-direction: column; gap: 8px; max-width: 64ch; }
.pv-head h1 { font-family: var(--display); font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.02em; }
.pv-head p { font-size: 16px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pv-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pv-card h2 { font-family: var(--display); font-size: 26px; letter-spacing: -.01em; }
.pv-card p { color: var(--muted); }
.pv-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; flex: 1; }
.pv-card .btn { align-self: stretch; margin-top: 6px; }
.pv-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); }
.pv-dev { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pv-pick { display: flex; flex-direction: column; gap: 4px; }
.pv-pick label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pv-pick select { width: 100%; }
.pv-cmp .tbl td:first-child { min-width: 200px; }
.pv-cell { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.pv-yes { background: var(--ok-bg); color: var(--ok); }
.pv-part { background: var(--info-bg); color: var(--info); }
.pv-no { background: var(--surface-2); color: var(--muted); }
.pv-chip b { font-weight: 700; }
.pv-pin { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

.team-today { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.team-today li { display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-today li:last-child { border-bottom: 0; }
.tt-av { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.tt-av.big { width: 64px; height: 64px; font-size: 22px; }
.tt-who { display: flex; flex-direction: column; min-width: 0; }
.tt-shift { font-variant-numeric: tabular-nums; font-size: 14px; }
@media (max-width: 560px) { .team-today li { grid-template-columns: 40px minmax(0, 1fr) auto; } .tt-shift { grid-column: 2 / 3; } }
.wk { min-width: 760px; }
.wk td, .wk th { vertical-align: top; }
.wk-today { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.wk-sh { display: block; font-size: 12.5px; font-weight: 600; padding: 3px 6px; border-radius: 6px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); margin-bottom: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-off { font-size: 12.5px; font-weight: 600; color: var(--info); }

.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.msg-item p { font-size: 14.5px; }
.msg-item.unread { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.msg-open { border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.msg-open b { display: inline-flex; align-items: center; gap: 4px; }
.msg-detail { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.msg-meter { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 2px; }
.msg-meter i { display: block; height: 100%; background: var(--ok); }
.doc-bulk { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.doc-list button { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child button { border-bottom: 0; }
.doc-list .grow { display: flex; flex-direction: column; }
.doc-img { width: 100%; border-radius: 10px; }
.doc-file { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 10px; color: var(--muted); }
.doc-file b { color: var(--fg); }

.payslip { position: relative; overflow: hidden; background: #FFFEFA; color: #1C1C1C; border-radius: 6px; box-shadow: 0 2px 12px rgb(0 0 0 / .12); padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.payslip .muted { color: #666; }
.ps-stamp { position: absolute; top: 18px; right: -34px; transform: rotate(35deg); background: #C24E17; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 40px; }
.ps-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-bottom: 2px solid #1C1C1C; padding-bottom: 10px; padding-right: 40px; }
.ps-head div { display: flex; flex-direction: column; }
.ps-right { text-align: right; }
.ps-head b { font-size: 15px; }
.ps-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.ps-who div { display: flex; flex-direction: column; }
.ps-who span { font-size: 12px; color: #666; }
.ps-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ps-tbl td { padding: 6px 4px; border-bottom: 1px solid #E4E0D8; }
.ps-tbl .num { text-align: right; white-space: nowrap; }
.ps-ded td:first-child { padding-left: 14px; }
.ps-net td { font-weight: 800; font-size: 16px; border-bottom: 0; border-top: 2px solid #1C1C1C; }

.my { max-width: 520px; margin: 0 auto; padding-block: 14px 96px; display: flex; flex-direction: column; gap: 14px; }
.my-hero { background: var(--deep); color: #fff; border-radius: 22px; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.my-hero h1 { font-family: var(--display); font-size: 28px; letter-spacing: -.01em; }
.my-hero p { color: rgb(255 255 255 / .78); font-size: 14px; }
.my-out { border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .1); color: #fff; border-radius: 999px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.my-body { display: flex; flex-direction: column; gap: 14px; }
.my-big { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.my-actions { display: flex; flex-direction: column; gap: 8px; }
.my-actions .btn { width: 100%; }
.my-alert { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-bg); color: var(--fg); border-radius: 14px; padding: 12px 14px; }
.my-alert > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.my-alert .ic:first-child { color: var(--warn); }
.my-shift { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); font-variant-numeric: tabular-nums; }
.my-note { display: flex; align-items: center; gap: 6px; justify-content: center; }
.my-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.my-people button { width: 100%; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; text-align: left; }
.my-people .tt-who { flex: 1; }
.my-login { align-items: center; text-align: center; }
.my-login .link-btn { align-self: flex-start; }
.my-tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(520px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 15; box-shadow: 0 -6px 20px rgb(0 0 0 / .06); }
.my-tabs button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.my-tabs button.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.my-tabs em { position: absolute; top: 2px; right: calc(50% - 22px); font-style: normal; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
.app:has(.my-tabs) .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.sync-live { background: #22A05B; box-shadow: 0 0 0 3px color-mix(in srgb, #22A05B 25%, transparent); }
.pv-locked { cursor: default; }
.team-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.team-days .chip.today:not(.on) { border-color: var(--brand); color: var(--brand); }
.team-today li.is-me { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border-radius: 10px; padding-inline: 8px; }
.my-body > .seg { align-self: center; }
.note-board { gap: 12px; }
.nb-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nb-form input { min-width: 220px; }
.nb-form select { max-width: 200px; }
.nb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nb-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.nb-list li.pinned { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.nb-list p { font-size: 14.5px; overflow-wrap: anywhere; }
.nb-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.nb-act { display: inline-flex; align-items: center; gap: 4px; }
.nb-pin { color: var(--brand); }
.wl-login-card > p.muted:not(.small){margin:-4px 0 6px}
/* In evidenza e offerte */
.promo-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.eyebrow .promo-tag { margin-left: 6px; text-transform: none; }
.promo-price s { color: var(--muted); font-weight: 400; margin-right: 2px; }
.promo-price b { color: var(--brand); }
.co-amt.promo-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.co-promo { font-size: 11px; color: var(--brand); font-weight: 600; max-width: 140px; text-align: right; }
.co-saved { color: var(--brand); }
.g-offers { padding: 18px 14px 2px; }
.g-offer-row { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.g-offer { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); color: inherit; font: inherit; cursor: pointer; }
.g-offer-badge { flex: 0 0 auto; min-width: 58px; height: 44px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 16px; }
.g-offer-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.g-offer-txt b { font-size: 15px; }
.g-offer-txt span { color: var(--muted); font-size: 13px; }
.g-offer-txt .g-offer-until { font-size: 12px; color: var(--brand); }
.g-feat .eyebrow { display: flex; align-items: center; }
.of-cols { margin-top: 14px; align-items: start; }
.of-feat, .of-pick { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.of-feat li, .of-pick li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.of-feat li:first-child, .of-pick li:first-child { border-top: 0; }
.of-pick { max-height: 460px; overflow-y: auto; }
.of-feat .pill { margin-left: 6px; }
.of-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.of-bar { margin: 14px 0 10px; gap: 12px; flex-wrap: wrap; }
.of-bar p { max-width: 560px; }
.of-list { display: flex; flex-direction: column; gap: 10px; }
.of-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.of-card.off { opacity: .6; }
.of-card .grow p { margin-top: 2px; }
.of-form { display: flex; flex-direction: column; gap: 4px; }
.of-ex { background: var(--bg-soft, rgba(0,0,0,.04)); padding: 10px 12px; border-radius: 10px; margin-top: 6px; }
@media (max-width: 640px) { .of-card { flex-wrap: wrap; } }
.of-card { flex-direction: row; text-align: left; }
.of-pick .tgl-label, .of-card .tgl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Timbratura con QR */
.term-qr { display: flex; flex-direction: row; align-items: center; gap: 16px; }
.term-qr-img { flex: 0 0 150px; width: 150px; height: 150px; background: #fff; border-radius: 12px; padding: 4px; }
.term-qr-img svg { width: 100%; height: 100%; display: block; }
.term-qr-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.term-qr-txt h3 { font-size: 16px; }
.term-qr-code { font-size: 26px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.term-qr-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.term-qr-bar i { display: block; height: 100%; background: var(--brand); transition: width 1s linear; }
.scan { display: flex; flex-direction: column; gap: 12px; }
.scan-cam { position: relative; aspect-ratio: 1 / 1; max-height: 52vh; border-radius: 16px; overflow: hidden; background: #111; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px; text-align: center; color: #eee; background: #1b1b1b; font-size: 14px; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
#scan-code { font-size: 22px; letter-spacing: .12em; text-align: center; }
.my-pin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.my-pin span { display: inline-flex; align-items: center; gap: 6px; }
.punch-ok { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 8px 0 4px; }
.punch-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok, #1E7F4F); color: #fff; margin-bottom: 6px; }
@media (max-width: 760px) { .term-qr-img { flex-basis: 120px; width: 120px; height: 120px; } }

/* ---------- console master: scheda, accessi, avvio ---------- */
.ms-contact { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.4fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 700px) { .ms-contact { grid-template-columns: 1fr 1fr; } }
.ms-steps { display: flex; flex-direction: column; gap: 6px; }
.ms-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; cursor: pointer; }
.ms-step input { width: 20px; height: 20px; flex: none; }
.ms-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; flex: none; }
.ms-step.done { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.ms-step.done .ms-step-n { background: var(--ok-bg); color: var(--ok); }
