/* Nova 361. L'aspetto riprende il sito nova361.com, letto il 12/10/2026: stessi colori, stesso carattere di sistema,
   stesse forme. Come il sito, c'è solo la versione chiara. */

:root {
  --bg: #fff;                 /* background del sito */
  --tint: #fcfaf9;            /* le sezioni alternate del sito (secondary al 40%) */
  --text: #1a1a1a;            /* foreground */
  --muted: #666;              /* muted-foreground */
  --line: #e9e4e2;            /* border */
  --primary: #f96534;         /* l'arancio dei pulsanti e dei bordi */
  --primary-strong: #e8521a;  /* l'arancio della fascia «Beyond the circle» */
  --accent: #fef0eb;
  --accent-text: #94310a;
  --secondary: #f8f4f2;
  --soft: #f7f4f3;            /* muted */
  --dark: #1a1a1a;            /* la fascia scura in cima alle pagine */
  --bad: #b91c1c; --bad-soft: #fef2f2; --bad-line: #fca5a5;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tint); color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
h2 { font-size: 24px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
.muted { color: var(--muted); }
.block { display: block; }
.pre { white-space: pre-wrap; }
.grow { flex: 1; min-width: 0; }

/* le scritte piccole in maiuscolo: «ANNO FONDAZIONE», «25 OTTOBRE 2025» */
.label { font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Testata, fascia scura, barra in basso ---- */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  min-height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0;
  background: #fff; background: rgb(255 255 255 / .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 36px; width: auto; }

.hero { background: var(--dark) url(/mark-hero.png) no-repeat center / auto 150%; color: #fff; text-align: center; }
.hero-in { max-width: 620px; margin: 0 auto; padding: 44px 24px; }
.hero h1 { font-size: 30px; }
.hero p { margin-top: 10px; color: rgb(255 255 255 / .8); }

main, .page { display: flex; flex-direction: column; gap: 16px; }
main { max-width: 620px; margin: 0 auto; padding: 24px 16px calc(104px + env(safe-area-inset-bottom)); }
main.wide { max-width: 760px; }
main.login { padding-top: 32px; }

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 5; display: flex;
  background: #fff; background: rgb(255 255 255 / .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px;
  font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.tabs a .icon { width: 22px; height: 22px; }
.tabs a.on { color: var(--primary-strong); }

.foot { text-align: center; font-size: 14px; color: var(--muted); padding: 12px 0 0; }

/* ---- Titoli di sezione ---- */
.head { display: flex; align-items: flex-end; gap: 12px; margin-top: 20px; }
.head p { margin-top: 4px; }
.day-head { margin-top: 20px; }

/* ---- Schede ---- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}
.card.form { border-radius: 12px; padding: 24px; gap: 16px; }   /* come «Iscriviti all'evento» sul sito */
.card.form h2 { font-size: 22px; }
/* un testo lungo da leggere, come l'informativa sulla privacy */
.card.doc { padding: 24px; gap: 12px; }
.card.doc h2 { font-size: 20px; margin-top: 12px; }
.card.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.card.doc ul ul { margin-top: 6px; }
.card.doc mark { background: var(--accent); color: var(--accent-text); }   /* le parti ancora da completare */
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.actions { margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* una riga con l'icona davanti: il testo va a capo sotto se stesso, non sotto l'icona */
.meta { position: relative; padding-left: 22px; font-size: 14px; color: var(--muted); }
.meta > .icon:first-child { position: absolute; left: 0; top: 3px; }
a.out .icon { width: 14px; height: 14px; margin-left: 2px; vertical-align: -2px; }

/* i riquadri con il bordo arancio di «Chi siamo» */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px; text-align: center;
  background: #fff; border: 1px solid var(--primary); border-radius: 8px;
}
.stat:only-child { grid-column: 1 / -1; }
.stat strong { font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* le etichette a pillola, come «CONCLUSO» */
.pill, .tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--line); border-radius: 9999px;
  background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.tag { margin-left: 6px; }
.pill.on, .tag.c-in-scadenza, .tag.c-manca { border-color: var(--primary); background: var(--accent); color: var(--accent-text); }
.pill.solid { border-color: var(--primary); background: var(--primary); color: #fff; }
.tag.off, .tag.c-scaduto { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }

/* il riquadro della data, come sulle schede degli eventi */
.datebadge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: none; }
.datebadge b { font-size: 18px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.datebadge small { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); line-height: 1; }

/* le righe di «Eventi passati»: un blocco a sinistra, poi il testo */
.rowcard { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rowcard > .datebadge { width: 68px; background: var(--soft); }
.rowcard > .grow { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.rowcard.going > .datebadge { background: var(--primary); color: #fff; }
.rowcard.going > .datebadge small { color: rgb(255 255 255 / .85); }
.rowcard.race > .datebadge { background: var(--dark); color: #fff; }
.rowcard.race > .datebadge .icon { width: 20px; height: 20px; }

/* le schede di «Prossimi eventi»: fascia in alto con la data, sotto il testo */
.eventcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.eventcard .band {
  display: flex; align-items: flex-start; justify-content: space-between; height: 84px; padding: 8px;
  background: var(--dark) url(/mark-hero.png) no-repeat right 12% center / auto 210%;
}
.eventcard .band .datebadge { width: 44px; height: 44px; border-radius: 6px; background: rgb(255 255 255 / .95); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); }
.eventcard .body { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.eventcard.picked { border-color: var(--primary); }
/* con la foto della gara la fascia è più alta e la foto la riempie */
.eventcard .band.photo { height: 150px; background-color: var(--dark); background-position: center; background-size: cover; }
.eventcard.past .band { filter: grayscale(1); opacity: .7; }

/* ---- Il calendario del mese ----
   Una casella per giorno. Le fasce dentro la casella hanno il colore del tipo di uscita, con i colori del sito:
   arancio in piano, scuro il trail, grigio il resto; la gara ha il bordo arancio. */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.cal-head h2 { font-size: 20px; }
.cal-head .icon-btn { width: 44px; height: 44px; padding: 0; font-size: 28px; line-height: 1; color: var(--text); }
.cal-head .icon-btn:disabled { opacity: .25; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { padding-bottom: 2px; text-align: center; font-size: 11px; font-weight: 500; letter-spacing: .05em; color: var(--muted); }
.cal-day {
  display: flex; flex-direction: column; gap: 2px; min-height: 66px; padding: 3px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden;
}
.cal-day.out { border-color: transparent; background: none; }
.cal-day.past { background: none; color: var(--muted); }
.cal-day.past .cal-b { opacity: .55; }
.cal-day:disabled { cursor: default; }
.cal-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-n {
  display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 1px;
  font-size: 12px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}
.cal-day.today .cal-n { color: var(--primary-strong); }
.cal-me { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-strong); }
.cal-b {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 15px; padding: 0 1px; border-radius: 4px;
  font-size: 10px; font-weight: 600; font-style: normal; line-height: 1; white-space: nowrap; overflow: hidden;
}
.cal-b.piano { background: var(--primary-strong); color: #fff; }
.cal-b.trail { background: var(--dark); color: #fff; }
.cal-b.other { background: var(--line); color: var(--text); }
.cal-b.race { background: var(--accent); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-b.more { flex: none; background: none; color: var(--muted); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .cal-b { flex: none; width: 14px; height: 14px; min-height: 0; padding: 0; }
@media (min-width: 560px) {
  .cal { gap: 6px; }
  .cal-day { min-height: 84px; padding: 5px; }
  .cal-n { font-size: 13px; }
  .cal-b { font-size: 12px; }
}

/* la fascia arancione di «Beyond the circle» */
.cta {
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 -16px; padding: 40px 24px;
  background: var(--primary-strong); color: #fff; text-align: center;
}
.cta h2 { font-size: 26px; text-transform: uppercase; }
.cta p { color: rgb(255 255 255 / .9); margin-bottom: 6px; }
.cta .btn { width: min(280px, 100%); }
@media (min-width: 652px) { .cta { margin: 0; border-radius: 12px; } }

/* le proposte da cogliere (il blocco di base, l'app sulla schermata Home, chi chiede di entrare): una scheda con il
   bordo arancio, come i riquadri di «Chi siamo» */
.card.offer { border-color: var(--primary); }
/* gli avvisi della società: come gli avvisi arancio, con l'etichetta in alto */
.card.notice { border-color: var(--primary); background: var(--accent); color: var(--accent-text); box-shadow: none; }
.card.notice .label { color: var(--accent-text); }
/* il numero accanto a «Staff» e a «Tesserati»: quante persone chiedono di entrare */
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px;
  border-radius: 9999px; background: var(--primary-strong); color: #fff; font-size: 12px; font-weight: 600; line-height: 1;
}
.chip.on .count, .btn:not(.ghost) .count { background: #fff; color: var(--primary-strong); }
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.request { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
/* i totali delle maglie: scorrono di lato su un telefono stretto, senza allargare la pagina */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.totals { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.totals th, table.totals td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: center; }
table.totals th:first-child { text-align: left; font-weight: 500; }
table.totals thead th { font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
table.totals td:last-child { font-weight: 600; }

.banner { display: block; padding: 12px 16px; border: 1px solid; border-radius: 8px; font-weight: 500; text-decoration: none; }
.banner.warn { border-color: var(--primary); background: var(--accent); color: var(--accent-text); }
.banner.bad { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.banner.row { display: flex; }

/* ---- Pulsanti ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 6px; background: var(--primary); color: #fff;
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .15s;
}
.btn:hover { background: var(--primary-strong); }
.btn:disabled { opacity: .6; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.soft { background: var(--secondary); color: var(--text); }
.btn.soft:hover { background: var(--line); }
.btn.white { background: #fff; color: var(--primary-strong); }
.btn.white:hover { background: rgb(255 255 255 / .9); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.ghost.danger { background: #fff; color: var(--bad); }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 8px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.rpe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rpe .chip { justify-content: center; min-height: 44px; font-size: 16px; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Sedute ---- */
.workout { gap: 8px; }
.workout.done h3 { color: var(--muted); }
.wtext { white-space: pre-wrap; }
.pace { color: var(--primary-strong); font-weight: 600; white-space: nowrap; }
.vam { font-weight: 600; }
.preview { min-height: 24px; padding: 10px 12px; border-radius: 6px; background: var(--soft); }
.race-end { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.race-end .icon { color: var(--primary-strong); }

details > summary { cursor: pointer; font-weight: 500; }
details[open] > summary { margin-bottom: 12px; }
details.week { display: block; padding: 0 16px; }
details.week > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0; list-style: none; }
details.week > summary::-webkit-details-marker { display: none; }
details.week > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
details.week > summary strong { font-weight: 600; }
details.week[open] > summary { margin-bottom: 0; }
details.week.now { border-color: var(--primary); }
details.week .workout { display: flex; flex-direction: column; padding: 14px 0; border-top: 1px solid var(--line); }
details.week > p { padding: 12px 0; border-top: 1px solid var(--line); }

/* ---- Moduli, come quelli del sito ---- */
.field { display: flex; flex-direction: column; gap: 8px; }
.flabel { font-size: 14px; font-weight: 500; line-height: 1; }
.hint { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text); font: inherit; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { resize: vertical; }
input:disabled { color: var(--muted); background: var(--soft); }
input.code { font-size: 28px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
input.narrow { width: 76px; min-height: 36px; padding: 6px 10px; }
/* ore, minuti e secondi di una gara su una riga sola */
.row.time { flex-wrap: nowrap; }
.row.time input.narrow { width: 64px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.check span { display: flex; flex-direction: column; }
.check.inline { align-items: center; gap: 6px; min-height: 36px; padding-right: 8px; }
.check.inline span { display: inline; }   /* nome e «gara obiettivo» sulla stessa riga */

/* ---- Finestre e avvisi ---- */
dialog.sheet {
  width: min(560px, 100%); max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 12px 12px 0 0; background: #fff; color: var(--text); overflow: auto;
}
dialog.sheet::backdrop { background: rgb(0 0 0 / .5); }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px 20px 8px; background: #fff; }
.sheet-head h2 { font-size: 22px; }
.sheet-body { padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 12px; } }
.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2147483647;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 6px; background: var(--dark); color: #fff; font-size: 14px; font-weight: 500; text-align: center;
}
.toast.bad { background: var(--bad); }

/* ---- Staff ---- */
.hidden { display: none; }
.race-thumb { display: block; width: calc(100% + 40px); max-width: none; height: 120px; margin: -20px -20px 4px; object-fit: cover; border-radius: 8px 8px 0 0; }
.race-preview { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.list { padding: 4px 16px; gap: 0; }
.line {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: inherit; font: inherit; text-align: left;
}
button.line { cursor: pointer; }
.line:first-child { border-top: 0; }
.line strong { font-weight: 600; }
.card > .workout { padding: 14px 0 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; }

/* ---- Tesseramento e Segreteria (12/11/2026) ---- */
ol.tsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: t; }
ol.tsteps li { display: flex; align-items: center; gap: 10px; counter-increment: t; color: var(--muted); }
ol.tsteps li::before {
  content: counter(t); display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--muted);
}
ol.tsteps li.ok { color: var(--text); }
ol.tsteps li.ok::before { content: '✓'; border-color: var(--primary); background: var(--primary); color: #fff; }
.grid-prov { display: grid; grid-template-columns: 1fr 76px; gap: 12px; }
.field.has-error input { border-color: var(--bad); }
.hint.bad { color: var(--bad); font-weight: 500; }
.done-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.done-line .icon { color: var(--primary-strong); width: 18px; height: 18px; }
canvas.sigpad { display: block; width: 100%; height: 170px; border: 1px dashed var(--muted); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.status-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.status-tags .tag { margin-left: 0; }
.tag.c-ok { border-color: var(--primary); background: var(--primary); color: #fff; }
dl.data { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.data dt { color: var(--muted); }
dl.data dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Amministrazione (12/11/2026) ---- */
.narrow-select { width: auto; min-height: 36px; padding: 4px 34px 4px 10px; }
.status-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.status-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.status-card.warn { border-color: var(--bad-line); background: var(--bad-soft); }
.status-card.warn strong { color: var(--bad); }
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
dl.flow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-variant-numeric: tabular-nums; }
dl.flow dd { margin: 0; text-align: right; font-weight: 600; }
dl.flow dd.muted { font-weight: 400; }
svg.chart { display: block; width: 100%; height: auto; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { stroke: var(--muted); stroke-width: 1; }
svg.chart .bar-in { fill: var(--primary); }
svg.chart .bar-out { fill: var(--accent-text); }
svg.chart .tick { fill: var(--muted); font-size: 12px; }
svg.chart .hit { fill: transparent; cursor: pointer; }
svg.chart .hit:hover { fill: rgb(0 0 0 / .04); }
.readout { min-height: 22px; font-size: 14px; font-variant-numeric: tabular-nums; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.legend .sw.in { background: var(--primary); }
.legend .sw.out { background: var(--accent-text); }
ul.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.hbars li { display: grid; grid-template-columns: 1fr; gap: 4px; }
.hb-label { font-size: 14px; }
.hb-track { display: block; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-top: 4px; }
.hb-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent-text); }
.hb-fill.in { background: var(--primary); }
.hb-value { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Amministrazione larga, come un gestionale (12/11/2026: «più ampia, specifica, come Golee») ---- */
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.adm-grid > .adm-card, .adm-grid > .list { grid-column: 1 / -1; }
.adm-card { gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.kpi .label { font-size: 11px; }
.kpi strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .muted { font-size: 13px; line-height: 1.35; }
.kpi.in { box-shadow: inset 4px 0 0 var(--primary); }
.kpi.out { box-shadow: inset 4px 0 0 var(--accent-text); }
.kpi.warn { border-color: var(--bad-line); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data .num { text-align: right; white-space: nowrap; }
table.data tfoot td { border-bottom: 0; font-weight: 600; }
table.data .tag { margin-left: 6px; }
table.data.clickable tbody tr { cursor: pointer; }
table.data.clickable tbody tr:hover, table.data.clickable tbody tr:focus { background: var(--soft); outline: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters .grow input { min-height: 36px; padding: 6px 10px; }
@media (min-width: 1024px) {
  main.xl { max-width: 1440px; padding: 24px 32px calc(104px + env(safe-area-inset-bottom)); }
  .hero.compact .hero-in { padding: 18px 32px; max-width: 1440px; text-align: left; }
  .hero.compact h1 { font-size: 22px; }
  .hero.compact p { display: none; }
  .adm-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .adm-grid > .adm-card, .adm-grid > .list { grid-column: auto; }
  .adm-grid > .span-3 { grid-column: span 3; }
  .adm-grid > .span-4 { grid-column: span 4; }
  .adm-grid > .span-6 { grid-column: span 6; }
  .adm-grid > .span-8 { grid-column: span 8; }
  .adm-grid > .span-12 { grid-column: 1 / -1; }
  .kpi strong { font-size: 26px; }
  .adm-card h3 { font-size: 16px; }
}
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding-top: 4px; }
.mini-stats span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.mini-stats strong { font-size: 22px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- La Gestione: un solo menu laterale come quello di Golee (12/11/2026) ----
   Sul computer il menu sta a sinistra, fisso mentre la pagina scorre; sul telefono si apre dal pulsante «Menu». */
.gest, .gest-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.gest-head h1 { font-size: 26px; }
.gest-head p { margin-top: 4px; max-width: 760px; }
.gest-head .tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gest-menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.gest-menu-btn .icon { width: 20px; height: 20px; }
.gest-nav { display: flex; flex-direction: column; gap: 2px; }
.gest-group { margin: 16px 0 6px; padding: 0 12px; font-size: 11px; }
.gest-nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; text-decoration: none; }
.gest-nav a .icon { width: 18px; height: 18px; color: var(--muted); }
.gest-nav a:hover { background: var(--soft); }
.gest-nav a.on { background: var(--accent); color: var(--accent-text); }
.gest-nav a.on .icon { color: var(--accent-text); }
.gest-nav .chev .icon { width: 16px; height: 16px; transition: transform .15s; }
.gest-nav a.open .chev .icon { transform: rotate(90deg); }
.gest-nav .subs { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 21px; padding-left: 9px; border-left: 1px solid var(--line); }
.gest-nav a.sub { min-height: 34px; padding: 6px 12px; font-size: 14px; font-weight: 400; }
.gest-nav a.back { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); }
dialog .gest-nav a { min-height: 44px; }
.gest-club { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid var(--line); }
.gest-club img { width: 36px; height: 36px; border-radius: 8px; }
.gest-club strong { display: block; font-size: 14px; line-height: 1.3; }
.gest-club .muted { font-size: 13px; }
/* azioni rapide, servizi collegati, report: riquadri */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { gap: 8px; }
.tile > .row:last-child { margin-top: auto; padding-top: 4px; }
.tile.action { font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.tile.action:hover, .tile.action:focus-visible { border-color: var(--primary); }
/* la panoramica della dashboard, come «La tua panoramica» di Golee */
.counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.counter { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; }
.counter:hover { border-color: var(--primary); }
.counter span:first-child { font-weight: 600; }
.counter strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.counter .go { color: var(--primary-strong); font-size: 14px; font-weight: 500; }
a.status-card { color: inherit; text-decoration: none; }
a.status-card:hover { border-color: var(--primary); }
.big-num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.people { font-size: 14px; max-height: 280px; overflow-y: auto; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.qr { width: 150px; flex: none; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-row { align-items: flex-start; gap: 16px; }
pre.prompt { margin: 0; padding: 14px; max-height: 320px; overflow: auto; white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font: 13px/1.5 ui-monospace, monospace; }
code { padding: 1px 6px; border-radius: 4px; background: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
td.bar-cell { min-width: 140px; vertical-align: middle; }
@media (min-width: 640px) {
  .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
  .price-row { grid-template-columns: 2fr 1fr 2fr auto; }
}
@media (min-width: 1024px) {
  .gest { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
  .gest-side { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .gest-head h1 { font-size: 30px; }
  .counters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* nella Gestione sul computer la barra in basso dell'app non serve: si torna con «Torna all'app» */
  nav.tabs.in-staff { display: none; }
  main.xl.staff { padding-bottom: 48px; }
}
