/* Bikeroom Shipping · app prototype.
   Stile della dashboard «Controllo E-commerce» del CRM (restyling Apex, shadcn/ui): token da
   Bikeroom-crm/public/css/controllo-ecommerce.css. Geist, sfondo #f9fafb, card bianche bordo 1px
   raggio 14, sidebar quasi nera anche in chiaro, accento Emerald in oklch, colore solo semantico.
   Per tornare al rosa Bikeroom basta --primary: #ff3864 (e --sb-primary). */
:root {
  --preset-h: 160; --preset-c: .175; --preset-cd: .19;
  --bg: #f9fafb; --bg2: #ffffff; --bg3: #eef2f4; --border: #e2e6e8; --border-hi: #cdd3d6;
  --text: #060d11; --muted: #616b70; --dim: #8a949a;
  --primary: oklch(.48 var(--preset-c) var(--preset-h)); --primary-fg: #f9fafb;
  --primary-tint: color-mix(in oklab, var(--primary) 10%, transparent);
  --ring: color-mix(in oklab, var(--primary) 40%, transparent);
  --green: #007406; --green-bg: rgba(0,116,6,.10);
  --amber: #b97a00; --amber-bg: rgba(237,154,0,.14);
  --red: #e7000b; --red-bg: rgba(231,0,11,.08);
  --sb-bg: #090909; --sb-fg: #d1d5d7; --sb-accent: #161616; --sb-accent-fg: #ebeff1; --sb-border: #1b1b1b;
  --sb-primary: oklch(.6 var(--preset-c) var(--preset-h));
  --shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-lg: 0 18px 50px -12px rgb(0 0 0 / .28);
  --radius: 8px; --radius-lg: 14px;
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --spring: cubic-bezier(.32,.72,0,1);
  --side: 256px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #010101; --bg2: #141414; --bg3: #1e1e1e; --border: #292929; --border-hi: #3a3a3a;
  --text: #e2e6e8; --muted: #869197; --dim: #5f6a70;
  --primary: oklch(.65 var(--preset-cd) var(--preset-h)); --primary-fg: #010101;
  --primary-tint: color-mix(in oklab, var(--primary) 14%, transparent);
  --green: #2f9f3d; --green-bg: rgba(47,159,61,.15); --amber: #ed9a00; --amber-bg: rgba(237,154,0,.14);
  --red: #ff3a37; --red-bg: rgba(255,58,55,.14);
  --sb-bg: #040404; --sb-fg: #dbdfe1; --sb-border: #242424; --sb-primary: oklch(.65 var(--preset-cd) var(--preset-h));
  --shadow: 0 1px 2px 0 rgb(0 0 0 / .4); --shadow-lg: 0 18px 50px -12px rgb(0 0 0 / .7); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #010101; --bg2: #141414; --bg3: #1e1e1e; --border: #292929; --border-hi: #3a3a3a;
  --text: #e2e6e8; --muted: #869197; --dim: #5f6a70;
  --primary: oklch(.65 var(--preset-cd) var(--preset-h)); --primary-fg: #010101;
  --primary-tint: color-mix(in oklab, var(--primary) 14%, transparent);
  --green: #2f9f3d; --green-bg: rgba(47,159,61,.15); --amber: #ed9a00; --amber-bg: rgba(237,154,0,.14);
  --red: #ff3a37; --red-bg: rgba(255,58,55,.14);
  --sb-bg: #040404; --sb-fg: #dbdfe1; --sb-border: #242424; --sb-primary: oklch(.65 var(--preset-cd) var(--preset-h));
  --shadow: 0 1px 2px 0 rgb(0 0 0 / .4); --shadow-lg: 0 18px 50px -12px rgb(0 0 0 / .7); color-scheme: dark;
}
/* nomi usati dal markup dell'app, rimappati sui token Apex (valgono in chiaro e in scuro) */
:root {
  --ink: var(--text); --ink-2: var(--text); --muted-2: var(--dim); --line: var(--border); --line-2: var(--border);
  --bg-alt: var(--bg3); --bg-soft: var(--bg3); --black: var(--sb-bg);
  --accent: var(--primary); --accent-dark: var(--primary); --accent-soft: var(--primary-tint);
  --ok: var(--green); --ok-soft: var(--green-bg); --warn: var(--amber); --warn-soft: var(--amber-bg);
  --bad: var(--red); --bad-soft: var(--red-bg); --info: var(--primary); --info-soft: var(--primary-tint);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
svg { flex-shrink: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

/* ── Bottoni ───────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius); border: 1px solid transparent; background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow); font-size: 13px; font-weight: 500; padding: 7px 12px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s; }
.btn:hover { background: color-mix(in oklab, var(--primary) 90%, #000); }
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; }
.btn svg.go { transition: transform .2s var(--spring); }
.btn:hover svg.go { transform: translateX(2px); }
.btn--out { background: var(--bg2); color: var(--text); border-color: var(--border); }
.btn--out:hover { background: var(--bg3); }
.btn--dark { background: var(--text); color: var(--bg); }
.btn--dark:hover { background: color-mix(in oklab, var(--text) 85%, var(--bg)); }
.btn--ghost { background: transparent; color: var(--muted); box-shadow: none; padding-inline: 8px; }
.btn--ghost:hover { background: var(--bg3); color: var(--text); }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--lg { padding: 9px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { color: var(--primary); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.editlink { margin-left: 8px; font-size: 12.5px; }

/* ── Shell ─────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  --text: var(--sb-accent-fg); --muted: color-mix(in srgb, var(--sb-fg) 68%, transparent); --dim: color-mix(in srgb, var(--sb-fg) 42%, transparent);
  background: var(--sb-bg); border-right: 1px solid var(--sb-border); color: var(--text);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color-scheme: dark; z-index: 30;
}
.side__brand { padding: 18px 18px 16px; border-bottom: 1px solid var(--sb-border); display: flex; flex-direction: column; gap: 6px; }
.side__brand img { height: 18px; width: auto; align-self: flex-start; }
.side__brand span { font-size: 12px; color: var(--muted); }
.side__cta { padding: 14px 10px 4px; }
.side__cta .btn { background: var(--sb-primary); color: #040404; }
.side__cta .btn:hover { background: color-mix(in oklab, var(--sb-primary) 88%, #fff); }
.side__nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; position: relative; }
.side__label { text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; font-weight: 600; color: var(--dim); padding: 16px 12px 6px; }
.nav { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--muted); position: relative; z-index: 1; transition: color .15s; }
.nav svg { width: 16px; height: 16px; }
.nav:hover { color: var(--text); }
.nav:hover:not(.on) { background: color-mix(in srgb, var(--sb-accent) 70%, transparent); }
.nav.on { color: var(--sb-primary); }
.nav span:first-of-type { flex: 1; min-width: 0; }
.nav .count { background: color-mix(in oklab, var(--sb-primary) 15%, transparent); color: var(--sb-primary); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; }
.side__pill { position: absolute; left: 10px; right: 10px; border-radius: 10px; background: var(--sb-accent); z-index: 0; transition: top .32s var(--spring), height .32s var(--spring); pointer-events: none; }
.side__status { border-top: 1px solid var(--sb-border); padding: 12px 18px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.side__me { border-top: 1px solid var(--sb-border); padding: 8px 10px; position: relative; }
.me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; color: var(--text); }
.me:hover { background: var(--sb-accent); }
.me b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.me small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.me > div { flex: 1; min-width: 0; }
.me b, .me small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me svg { width: 16px; height: 16px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); font-weight: 600; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.side .avatar { background: #262626; color: var(--sb-fg); }
.avatar--accent, .side .avatar--accent { background: color-mix(in oklab, var(--sb-primary) 22%, transparent); color: var(--sb-primary); }
.avatar--dark { background: var(--text); color: var(--bg); }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar svg { width: 16px; height: 16px; }
.menu { position: absolute; left: 10px; right: 10px; bottom: calc(100% - 2px); background: #121212; color: var(--text); border: 1px solid var(--sb-border); border-radius: var(--radius-lg); box-shadow: 0 18px 50px -12px rgb(0 0 0 / .7); padding: 6px; display: none; z-index: 5; }
.menu.open { display: block; animation: pop .18s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.menu h5 { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 8px 10px 4px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text); }
.menu button:hover { background: var(--sb-accent); }
.menu button b { display: block; font-weight: 500; }
.menu button small { color: var(--muted); font-size: 12px; display: block; }
.menu button svg { width: 15px; height: 15px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--sb-border); margin: 5px 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in oklab, var(--bg) 80%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.top__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__crumb { color: var(--muted); font-weight: 500; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; height: 34px; width: 280px; color: var(--muted); box-shadow: var(--shadow); }
.search svg { width: 15px; height: 15px; }
.search input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.search input:focus-visible { box-shadow: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--ring); border-color: var(--primary); }
.iconbtn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); position: relative; }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { background: var(--bg3); color: var(--text); }
.iconbtn .dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: var(--red); }
.iconbtn.top__burger { display: none; }
.view { padding: 24px; max-width: 1360px; width: 100%; animation: rise .32s var(--spring); }
@keyframes rise { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-strip { display: flex; gap: 10px; align-items: center; padding: 7px 24px; font-size: 12.5px; color: var(--muted); background: var(--bg3); border-bottom: 1px solid var(--border); }
.demo-strip svg { width: 14px; height: 14px; }
.demo-strip b { color: var(--text); font-weight: 600; }
.demo-strip button { color: var(--primary); font-weight: 500; font-size: 12.5px; }
.demo-strip button:hover { text-decoration: underline; }

/* ── Intestazione pagina ───────────────────────────────────────────── */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.phead h1 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.phead p { color: var(--muted); margin-top: 4px; font-size: 14px; max-width: 72ch; }
.phead__act { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }

/* ── Card e griglie ────────────────────────────────────────────────── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.card__h h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card__h p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.card__b { padding: 0 20px 20px; }
.card > .card__b:first-child { padding-top: 20px; }
.card--dark { background: var(--sb-bg); border-color: var(--sb-border); color: #ebeff1; }
.card--dark .eyebrow { color: rgba(235,239,241,.55); }
.card--dark .sub2 { color: rgba(235,239,241,.62); }
.card--dark .btn { background: var(--sb-primary); color: #040404; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi small { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi span.up { color: var(--green); } .kpi span.dn { color: var(--red); }
.kpi--dark { background: var(--primary-tint); border-color: color-mix(in oklab, var(--primary) 25%, transparent); }
.kpi--dark b { color: var(--primary); }

/* ── Tabelle ───────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text); padding: 10px 12px; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); white-space: nowrap; background: var(--bg2); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in oklab, var(--bg3) 55%, transparent); }
.tbl tbody tr.click { cursor: pointer; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tbl b { font-weight: 600; }
.tbl td:first-child b { white-space: nowrap; }
.tbl input.inline { width: 72px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius); text-align: right; background: var(--bg2); font-size: 13px; }
.tbl input.inline:focus { outline: 0; box-shadow: 0 0 0 3px var(--ring); border-color: var(--primary); }

.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; font-size: 12px; font-weight: 500; padding: 2px 8px; white-space: nowrap; background: var(--bg3); color: var(--text); }
.chip--ok { background: var(--green-bg); color: var(--green); }
.chip--warn { background: var(--amber-bg); color: var(--amber); }
.chip--bad { background: var(--red-bg); color: var(--red); }
.chip--pri, .chip--info, .chip--accent { background: var(--primary-tint); color: var(--primary); }
.chip--dark { background: var(--text); color: var(--bg); }
.chip--plain { background: var(--bg3); color: var(--text); }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 500; border-radius: 5px; padding: 1px 6px; color: var(--text); background: var(--bg3); text-transform: uppercase; }

/* segmented (anche le tab di pagina) */
.tabs, .seg { display: inline-flex; background: var(--bg3); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs { margin-bottom: 16px; }
.card > .tabs { margin: 16px 20px 0; }
.tab, .seg button { border-radius: 8px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; border: 1px solid transparent; transition: color .15s; }
.tab:hover, .seg button:hover { color: var(--text); }
.tab.on, .seg button.on { color: var(--text); background: var(--bg2); border-color: var(--border); box-shadow: var(--shadow); }
.tab .n { font-size: 11.5px; color: var(--dim); margin-left: 5px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 20px; flex-wrap: wrap; }
.toolbar .search { width: 300px; }
.toolbar .select { width: auto; }

/* ── Form ──────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .lbl { font-size: 12px; font-weight: 500; color: var(--muted); }
.field > span em { font-style: normal; color: var(--dim); }
.input, .select, .textarea { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg2); font-size: 13.5px; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23869197' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.input[readonly] { color: var(--muted); background: var(--bg3); box-shadow: none; }
.input--unit { position: relative; display: block; }
.input--unit .input { padding-right: 42px; }
.input--unit i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--dim); font-size: 12px; pointer-events: none; }
.hint { font-size: 12px; color: var(--muted); }
.fgrid { display: grid; gap: 14px; }
.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--border-hi); border-radius: 20px; transition: background .2s var(--spring); cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--ring); }

/* card di scelta */
.opts { display: grid; gap: 10px; }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s, transform .2s var(--spring); cursor: pointer; }
.opt:hover { border-color: var(--border-hi); }
.opt:active { transform: scale(.99); }
.opt.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.opt b { font-size: 13.5px; font-weight: 600; }
.opt small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.opt .tick { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-hi); display: grid; place-items: center; color: transparent; }
.opt .tick svg { width: 11px; height: 11px; }
.opt.on .tick { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.opt--item { align-items: center; text-align: center; padding: 14px 8px 11px; gap: 6px; }
.opt--item > svg { color: var(--muted); }
.opt--item.on > svg { color: var(--primary); }
.opt--item b { font-size: 12.5px; font-weight: 500; }
.opt--item:not(.on) .tick { opacity: 0; }

/* banner */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg2); font-size: 13.5px; color: var(--text); line-height: 1.5; }
.banner svg { margin-top: 2px; width: 16px; height: 16px; color: var(--muted); }
.banner b { font-weight: 600; }
.banner--info { background: var(--primary-tint); border-color: color-mix(in oklab, var(--primary) 30%, transparent); } .banner--info svg { color: var(--primary); }
.banner--warn { background: var(--amber-bg); border-color: color-mix(in oklab, var(--amber) 35%, transparent); } .banner--warn svg { color: var(--amber); }
.banner--ok { background: var(--green-bg); border-color: color-mix(in oklab, var(--green) 30%, transparent); } .banner--ok svg { color: var(--green); }
.banner--accent { background: var(--primary-tint); border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.banner .grow { flex: 1; }

/* ── Prenotazione ──────────────────────────────────────────────────── */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.stepper { display: flex; gap: 6px; margin-bottom: 16px; }
.stepper button { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 0; text-align: left; min-width: 0; }
.stepper button::before { content: ""; display: block; height: 4px; width: 100%; border-radius: 4px; background: var(--bg3); transition: background .3s var(--spring); }
.stepper button.done::before { background: color-mix(in oklab, var(--primary) 45%, var(--bg3)); }
.stepper button.on::before { background: var(--primary); }
.stepper span { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stepper span i { font-style: normal; color: var(--dim); margin-right: 4px; font-variant-numeric: tabular-nums; }
.stepper button.on span, .stepper button.done span { color: var(--text); }
.wstep { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.wstep__h { padding: 20px 20px 0; }
.wstep__h h2 { font-size: 17px; font-weight: 600; }
.wstep__h p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.wstep__b { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 20px; }
.wstep__f { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: color-mix(in oklab, var(--bg3) 45%, var(--bg2)); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.sublbl { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sublbl a, .sublbl button { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--primary); font-weight: 500; }

.loc { display: flex; gap: 12px; align-items: flex-start; }
.loc .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--bg3); color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.loc .ic svg { width: 16px; height: 16px; }
.opt.on .loc .ic { background: var(--primary-tint); color: var(--primary); }
.loc .ic .avatar { background: transparent !important; color: inherit !important; }
.loc b { display: block; }
.loc small { display: block; }

.dates { display: flex; gap: 8px; flex-wrap: wrap; }
.date { border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; text-align: center; min-width: 74px; background: var(--bg2); box-shadow: var(--shadow); transition: border-color .15s; }
.date:hover { border-color: var(--border-hi); }
.date small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.date b { display: block; font-size: 14px; font-weight: 600; }
.date.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.date.on small { color: var(--primary); }

.boxrec { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 18px; align-items: center; background: color-mix(in oklab, var(--bg3) 45%, var(--bg2)); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.boxrec__art { display: grid; place-items: center; }
.boxrec h4 { font-size: 14.5px; font-weight: 600; }
.boxrec p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dimrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.kgcalc { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.kgcalc b { color: var(--text); font-weight: 600; }

.drop { width: 100%; border: 1.5px dashed var(--border-hi); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; background: transparent; font-size: 13px; text-align: left; transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--primary); background: var(--primary-tint); }
.drop .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg3); display: grid; place-items: center; color: var(--muted); }
.drop .ic svg { width: 16px; height: 16px; }
.drop.has { border-style: solid; border-color: color-mix(in oklab, var(--green) 40%, transparent); background: var(--green-bg); }
.drop.has .ic { color: var(--green); background: var(--bg2); }

.doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg2); font-size: 13px; }
.doc .ic { width: 30px; height: 36px; border-radius: 5px; background: var(--bg3); display: grid; place-items: center; font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--muted); }
.doc b { display: block; font-weight: 500; }
.doc .grow { flex: 1; min-width: 0; }

/* asterisco supplementi */
.asterisk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: start; border: 1px solid color-mix(in oklab, var(--amber) 45%, transparent); background: var(--amber-bg); border-radius: var(--radius-lg); padding: 16px 18px 16px 14px; }
.asterisk__star { font-size: 84px; line-height: .72; font-weight: 700; color: var(--amber); padding-top: 14px; grid-row: span 2; }
.asterisk h4 { font-size: 15px; font-weight: 600; }
.asterisk p { font-size: 13px; color: var(--text); line-height: 1.5; margin-top: 2px; }
.asterisk ul { font-size: 13px; margin: 6px 0 0 18px; }
.asterisk .check { grid-column: 2; margin-top: 10px; font-weight: 600; }

.paycard { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg2); }
.cardline { display: flex; gap: 6px; align-items: center; }
.cardline img { height: 20px; }
.fakeinput { height: 36px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; background: var(--bg3); }
.fakeinput svg { width: 13px; height: 13px; }

/* riepilogo prezzo */
.sum { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.sum__card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.sum__head { padding: 18px 20px 16px; border-bottom: 1px solid var(--border); }
.sum__head small { font-size: 12px; font-weight: 500; color: var(--muted); }
.sum__price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.sum__price b { font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; color: var(--text); }
.sum__price span { font-size: 12.5px; color: var(--muted); }
.sum__route { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--bg3) 45%, var(--bg2)); }
.sum__route div { flex: 1; min-width: 0; }
.sum__route b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum__route small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum__route .arr { color: var(--dim); flex: 0 0 auto; }
.sum__route .arr svg { width: 16px; height: 16px; }
.sum__rows { padding: 6px 20px 12px; }
.sum__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.sum__row:last-child { border-bottom: 0; }
.sum__row small { display: block; font-size: 12px; color: var(--muted); }
.sum__row b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum__row--tot { font-size: 14px; }
.sum__row--tot b { font-size: 15px; font-weight: 700; }
.sum__meta { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.sum__meta div { padding: 12px 20px; font-size: 13px; }
.sum__meta div + div { border-left: 1px solid var(--border); }
.sum__meta small { display: block; color: var(--muted); font-size: 12px; }
.sum__meta b { font-size: 13.5px; font-weight: 600; }
.sum__ast { font-size: 12px; color: var(--muted); padding: 0 4px; line-height: 1.45; }
.sum__ast b { color: var(--amber); font-size: 14px; }

/* conferma */
.done { max-width: 720px; margin: 0 auto; text-align: center; padding: 16px 0 30px; }
.done__ic { width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin: 0 auto 16px; }
.done__ic svg { width: 26px; height: 26px; }
.done h1 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.done > p { color: var(--muted); margin-top: 6px; }
.done__ids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 22px 0 18px; text-align: left; box-shadow: var(--shadow); }
.done__ids div { background: var(--bg2); padding: 14px 16px; }
.done__ids small { display: block; color: var(--muted); font-size: 12px; }
.done__ids b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nextsteps { text-align: left; display: grid; gap: 8px; margin-top: 18px; }
.nextstep { display: flex; gap: 14px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; box-shadow: var(--shadow); }
.nextstep .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.nextstep b { display: block; font-weight: 600; }
.nextstep p { font-size: 13px; color: var(--muted); }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tracking ──────────────────────────────────────────────────────── */
.tl { list-style: none; position: relative; padding-left: 2px; }
.tl li { position: relative; padding: 0 0 16px 24px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 2px; background: var(--border); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--border-hi); }
.tl li.on::after { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.tl li.past::after { background: color-mix(in oklab, var(--primary) 45%, var(--bg3)); border-color: transparent; }
.tl b { display: block; font-size: 13.5px; font-weight: 600; }
.tl small { display: block; font-size: 12.5px; color: var(--muted); }

/* ── Pannello laterale e modale ────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(0,0,0,.18); z-index: 61; transform: translateX(24px); opacity: 0; pointer-events: none; transition: transform .25s var(--spring), opacity .2s; display: flex; flex-direction: column; }
.drawer.open { transform: none; opacity: 1; pointer-events: auto; }
.drawer__h { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; background: var(--bg2); }
.drawer__h > div { flex: 1; min-width: 0; }
.drawer__h h3 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer__b { flex: 1; overflow-y: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.drawer__f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--bg2); }
.modal { position: fixed; left: 50%; top: 50%; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); z-index: 61; transform: translate(-50%, -47%) scale(.98); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--spring); box-shadow: var(--shadow-lg); }
.modal.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.modal__h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal__h h3 { font-size: 16px; font-weight: 600; }
.modal__b { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal__f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: color-mix(in oklab, var(--bg3) 45%, var(--bg2)); }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); background: var(--bg2); color: var(--text); z-index: 80; opacity: 0; transition: opacity .2s, transform .3s var(--spring); display: flex; gap: 8px; align-items: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { color: var(--green); width: 16px; height: 16px; }

.empty { text-align: center; padding: 32px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 2px; }

/* righe elenco (rubrica, team) */
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow b { display: block; font-weight: 600; font-size: 13.5px; }
.lrow small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow:hover { background: color-mix(in oklab, var(--bg3) 40%, transparent); }
.lrow > svg { width: 16px; height: 16px; color: var(--dim); }

.plcard { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg2); text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .2s var(--spring); }
.plcard:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.plcard.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.plcard .mk { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plcard.on .mk { color: var(--primary); }
.plcard .mk small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plcard small.muted { font-size: 12.5px; }

.boxart { display: block; }

/* ── Accesso ───────────────────────────────────────────────────────── */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; background: var(--bg); }
.auth__form { display: flex; flex-direction: column; padding: 28px clamp(24px, 6vw, 80px); }
.auth__form .logo { height: 20px; width: auto; align-self: flex-start; }
:root[data-theme="dark"] .auth__form .logo { filter: invert(1) brightness(2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth__form .logo { filter: invert(1) brightness(2); } }
.auth__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 400px; width: 100%; margin: 0 auto; padding: 40px 0; }
.auth__inner h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.auth__inner > p { color: var(--muted); margin: 6px 0 24px; }
.auth__inner .opts { margin-bottom: 20px; }
.auth__media { position: relative; background: #111 url('../img/hero-box.jpg') center/cover no-repeat; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px; border-left: 1px solid var(--border); }
.auth__media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,4,4,0) 30%, rgba(4,4,4,.88) 100%); }
.auth__media > * { position: relative; }
.auth__media h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.025em; max-width: 20ch; }
.auth__media p { color: rgba(255,255,255,.72); margin-top: 10px; max-width: 44ch; }
.auth__feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.auth__feats span { font-size: 12px; font-weight: 500; border-radius: 6px; padding: 3px 9px; background: rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.demo-box { margin-top: 24px; border: 1px dashed var(--border-hi); border-radius: var(--radius-lg); padding: 14px; background: color-mix(in oklab, var(--bg3) 40%, transparent); }
.demo-box h5 { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.demo-box .personas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.persona { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); box-shadow: var(--shadow); transition: border-color .15s; }
.persona:hover { border-color: var(--primary); }
.persona b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.persona small { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .wiz { grid-template-columns: minmax(0, 1fr) 320px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 220px; }
}
@media (max-width: 980px) {
  .wiz { grid-template-columns: 1fr; }
  .sum { position: static; }
  .g-main, .g3 { grid-template-columns: 1fr; }
  .opts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .3s var(--spring); }
  .app.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .35); }
  .iconbtn.top__burger { display: grid; }
  .top .search { display: none; }
  .top { padding: 0 16px; }
  .view { padding: 16px 16px 40px; }
  .demo-strip { padding: 7px 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth__media { display: none; }
}
@media (max-width: 640px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 21px; }
  .g2, .f2, .f3, .f4 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .opts--3, .opts--2 { grid-template-columns: 1fr; }
  .opts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dimrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boxrec { grid-template-columns: 1fr; }
  .boxrec__art { display: none; }
  .stepper span { display: none; }
  .stepper button.on span { display: block; }
  .phead h1 { font-size: 21px; }
  .done__ids { grid-template-columns: 1fr; }
  .top__right .btn span { display: none; }
  .demo-box .personas { grid-template-columns: 1fr; }
  .wstep__h, .wstep__b, .wstep__f { padding-inline: 16px; }
  .kv { grid-template-columns: 104px minmax(0, 1fr); }
  .tbl-hide-sm { display: none; }
  .wstep .seg { display: flex; width: 100%; }
  .wstep .seg button { flex: 1; padding-inline: 6px; white-space: normal; }
  .toolbar .search { width: 100%; }
  .card > .tabs { margin-inline: 16px; }
}
