/* =====================================================================
   VAR MANAGER — DESIGN 14.181
   Lo stesso linguaggio della Replay Station, in chiaro: un solo carattere
   in due larghezze (Barlow per leggere, Barlow Condensed per titoli, nomi
   delle squadre e numeri grandi), superfici piatte con un bordo, raggi
   piccoli e uguali, ombre quasi assenti, il colore della federazione dove
   significa qualcosa (menu, pulsanti, voce attiva) e in nessun altro posto.
   Questo foglio viene DOPO styles.css e rs-admin.css e li corregge.

   I caratteri sono serviti da qui (public/fonts, licenza OFL): il gestionale
   non dipende piu' da Google Fonts e funziona anche senza internet. "Inter" e
   "Space Grotesk", citati in centinaia di regole storiche, vengono mappati su
   Barlow: non serve toccarle una per una.
   ===================================================================== */
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
/* I nomi storici puntano a Barlow */
@font-face { font-family: 'Inter'; font-weight: 400; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }

:root {
  --fd: 'Barlow Condensed', 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --fb: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 8px; --radius-ctl: 8px; --radius-card: 10px;
  --shadow-rest: 0 1px 2px rgba(16, 24, 40, .04);
  --ink: #141A22; --muted: #66707C; --line: #E3E7EC;
  --st-ink: #141A22; --st-muted: #66707C;
  --st-line: color-mix(in srgb, var(--fed-menu) 26%, #E6E9EE);
  --ok: #1E9E5A; --ko: #D7343B; --amber: #D99A12;
}
body { font-family: var(--fb); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--fb); letter-spacing: 0; }
button, input, select, textarea { font-family: var(--fb); }
body::before { height: 3px; }

/* ---- Barra laterale: il marchio in condensato, le voci piatte, la voce attiva
   con il filo del colore federale a sinistra. ---- */
.brand { gap: 12px; padding: 18px 16px 16px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; }
.brand-text h1 { font-family: var(--fd); font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.05; }
.sidebar .subtitle { font-family: var(--fd); font-size: 12px; font-weight: 600; letter-spacing: .14em; margin-top: 3px; }
.nav { padding: 12px 12px; gap: 1px; }
.nav .tab, .nav .nav-parent, .nav-liv2 .tab { font-family: var(--fb); font-size: 14.5px; font-weight: 500; border-radius: var(--radius); padding: 10px 12px; }
.nav .tab.is-active, .nav .nav-sub .tab.is-active { box-shadow: none; border: 1px solid var(--st-line); position: relative; font-weight: 600; }
.nav .tab.is-active::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.nav-sub { margin-left: 14px; padding-left: 8px; }
.nav .nav-caret { font-size: 12px; }
.collapse-btn { border-radius: var(--radius) !important; font-family: var(--fd); font-weight: 600; letter-spacing: .1em; font-size: 13px; }
.side-help { border-radius: var(--radius); font-weight: 600; }
.nav-back { font-family: var(--fd); font-size: 16px; letter-spacing: .02em; text-transform: uppercase; }

/* ---- Barra in alto e schede di pagina ---- */
.topbar { border-bottom: 1px solid var(--st-line); }
.ptab { border-radius: var(--radius) var(--radius) 0 0; font-size: 13.5px; font-weight: 500; }
.ptab.is-active { font-weight: 600; box-shadow: inset 0 3px 0 var(--accent); }
.usermenu-btn, .fed-switch-bar { border-radius: var(--radius); }

/* ---- Titoli di pagina: condensato, maiuscolo, nero. E' la firma. ---- */
main { padding: 26px 34px 40px; }
.section-head { margin-bottom: 18px; align-items: center; }
.section-head h2, .section-head h1 { font-family: var(--fd); font-size: 32px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; line-height: 1; color: var(--st-ink); }
.section-head h2 .help-btn, .section-head h1 .help-btn, .help-btn { font-family: var(--fb); text-transform: none; letter-spacing: 0; box-shadow: none; border-radius: 999px; font-size: 12.5px; vertical-align: middle; }
.home-hi { font-family: var(--fd); font-weight: 700; letter-spacing: .005em; text-transform: uppercase; font-size: clamp(36px, 4.6vw, 60px); line-height: .98; }
.home-name { color: var(--accent); }
.home-sub { font-size: 16px; margin-top: 10px; }
.home-head { margin-bottom: 26px; }
.home-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.home-card { border-radius: var(--radius-card) !important; padding: 18px 20px !important; border: 1px solid var(--st-line) !important; background: #fff !important; gap: 14px; }
.home-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--st-line)) !important; }
.home-ic { width: 44px; height: 44px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, #fff); }
.home-t { font-family: var(--fd); font-size: 21px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.home-count { font-family: var(--fd); font-size: 13px; letter-spacing: .04em; border-radius: 4px; padding: 1px 7px; vertical-align: 2px; }
.home-d { font-size: 14px; }
.home-go { top: 16px; right: 16px; }

/* ---- Riquadri e schede ---- */
.panel, .match, .mt-filters, .fvs-kpi, .bil-stat, .sd-card, .fs-card, .profile-card { border-radius: var(--radius-card); box-shadow: var(--shadow-rest); }
.panel { background: #fff; border-color: var(--st-line); padding: 20px 22px; }
.panel h3, .panel > h3 { font-family: var(--fd); font-size: 20px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--st-ink); }
.panel h3::before { display: none; }
.match { border-color: var(--st-line); }
.mt-season-band { font-family: var(--fd); font-size: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius); border-left-width: 3px; }
.mtc-badge { font-family: var(--fd); font-size: 13px; font-weight: 600; letter-spacing: .08em; border-radius: 4px; padding: 2px 8px; }
.mtc-md { font-family: var(--fd); font-size: 18px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.mtc-tm, .mtc-teamline, .mtc-teams b, .mtc-teams strong { font-family: var(--fd); font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.mtc-score { font-family: var(--fd); font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.mtc-vs { font-family: var(--fd); font-size: 12px; letter-spacing: .12em; }
.mtc-off-lab { font-family: var(--fd); font-size: 13px; letter-spacing: .1em; font-weight: 600; }
.mtc-btn { border-radius: 6px; font-family: var(--fb); }

/* ---- Pulsanti: piatti, un raggio solo, niente gradienti ne' ombre ---- */
.btn { background-image: none; box-shadow: none; border-radius: var(--radius-ctl); font-family: var(--fb); font-weight: 600; font-size: 14px; padding: 10px 18px; }
.btn:hover { filter: brightness(1.06); }
.btn-ghost, .btn.ghost { border-radius: var(--radius-ctl); font-family: var(--fb); font-weight: 600; background: #fff; border: 1px solid var(--st-line); }
.btn-ghost:hover, .btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--st-line)); background: #fff; }
/* .ts-tab e' la TABELLA di Statistiche › By team (table.ts-tab), non una pillola: con
   border-radius 999px + overflow hidden diventava un'ellisse bianca che copriva i dati (14.312). */
.sub-tab, .rk-tab, .mt-pill, button.ts-tab, .dep-tab-btn { font-family: var(--fb); font-weight: 600; border-radius: 999px; }
table.ts-tab { border-radius: 14px; }
.sub-tab, .rk-tab { background: #fff; border-color: var(--st-line); }
.pill, .qbadge, .appo-badge, .ref-badge, .ci-badge, .av-badge { font-family: var(--fd); font-weight: 600; letter-spacing: .06em; font-size: 12.5px; box-shadow: none; }

/* ---- Campi ---- */
input[type=text], input[type=search], input[type=number], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  border-radius: var(--radius-ctl); border: 1px solid var(--st-line); font-family: var(--fb); font-size: 14.5px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field label, .field > label, label.lb { font-size: 13px; font-weight: 500; color: var(--st-muted); }

/* ---- Tabelle: intestazione in condensato spaziato, numeri in condensato ---- */
.tbl th, .table th, .appo-table th, .dep-tab th, .rk-tbl th, .rk-dtbl th, .an-tbl th, .brf-tbl th, .fvs-stbl th, .appo-sum-table th {
  font-family: var(--fd); font-size: 13.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.tbl td, .table td { font-size: 14.5px; }
.bil-stat, .fvs-kpi { border-radius: var(--radius-card); }
.bil-stat b, .bil-stat strong, .bil-stat .n, .fvs-kpi b, .fvs-kpi strong, .fvs-kpi .n, .kpi-n, .stat-n, .num-n { font-family: var(--fd); font-weight: 700; letter-spacing: .01em; }

/* ---- Avvisi ---- */
.toast { border-radius: var(--radius); font-size: 14px; font-weight: 500; }
.toast.show { box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .45); }

/* ---- Modali e finestre ---- */
.vid-modal-box, .sec-box, .lg-panel { border-radius: 12px; }

/* Il menu a colore pieno (federazione con menu scuro): stessa voce attiva, in chiaro */
html.menu-scuro .nav .tab.is-active::before { background: #fff; }

/* =====================================================================
   14.183 — LE GARE COME TABELLONE, LA LAVAGNA, I TITOLI CON L'ICONA
   ===================================================================== */
/* Icona a tratto nel titolo di pagina (la stessa del menu) */
.section-head h2 .ttl-ic, .section-head h1 .ttl-ic { display: inline-flex; width: 30px; height: 30px; vertical-align: -5px; margin-right: 10px; color: var(--accent); }
.section-head h2 .ttl-ic svg, .section-head h1 .ttl-ic svg { width: 30px; height: 30px; stroke-width: 1.9; }

/* ---- La gara: una riga di tabellone. Ora e giorno a sinistra, le squadre
   con il punteggio in mezzo, la squadra arbitrale in etichette, i comandi
   a destra. ---- */
.mtc { display: grid !important; grid-template-columns: 112px minmax(240px, 1.1fr) minmax(280px, 1.5fr) 168px !important; gap: 12px 22px !important; align-items: center !important;
  padding: 14px 18px !important; border-radius: var(--radius-card); border-color: var(--st-line); box-shadow: var(--shadow-rest); }
.mtc:hover { box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .25); border-color: color-mix(in srgb, var(--accent) 40%, var(--st-line)); }
.mtc-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mtc-meta .mtc-time { order: -2; color: var(--st-ink); gap: 8px; }
.mtc-meta .mtc-hh { font-family: var(--fd); font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: .01em; }
.mtc-meta .mtc-date { order: -1; font-family: var(--fd); font-size: 13.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--st-muted); margin: 2px 0 6px; }
.mtc-meta .mtc-badge { order: 0; align-self: flex-start; }
.mtc-meta .mtc-md { order: 1; font-size: 14px; margin-top: 4px; color: var(--st-muted); }
.mtc-meta .mtc-fix { font-size: 11px; }
.mtc-meta .mtc-edit-h { font-size: 11px; padding: 2px 8px; }
/* squadre e punteggio sulla stessa riga: CASA  2 - 1  OSPITE */
.mtc-teams { display: flex !important; flex-direction: row !important; align-items: center !important; flex-wrap: nowrap !important; gap: 12px !important; min-width: 0; }
.mtc-teams .mtc-teamline { display: contents; }
.mtc-teams .mtc-vs { display: none; }
.mtc-teams .mtc-tm { flex: 1 1 0 !important; min-width: 0; width: auto !important; display: inline-flex; align-items: center; gap: 8px; }
.mtc-teams .mtc-tm:first-child, .mtc-teamline .mtc-tm:first-child { justify-content: flex-end; text-align: right; }
.mtc-teams .mtc-tm:first-child .tm-logo { order: 2; }
.mtc-teams .tm-nm, .mtc-teamline .tm-nm { font-family: var(--fd) !important; font-size: 20px !important; font-weight: 600 !important; letter-spacing: .01em; text-transform: uppercase; line-height: 1.05 !important; }
.mtc-teams .tm-logo { width: 26px !important; height: 26px !important; }
.mtc-teams .mtc-score { order: 0; flex: none; padding: 2px 10px !important; margin: 0 !important; font-family: var(--fd) !important; font-size: 26px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
  background: var(--st-ink); color: #fff; border-radius: 6px; min-width: 58px; text-align: center; }
.mtc-teams .mtc-score:empty { display: none; }
.mtc-teams .mtc-tm:first-child { order: -1; }
.mtc-teams .mtc-tm:last-child { order: 1; }
/* la squadra arbitrale: etichette sigla + nome, a capo quando serve */
.mtc-officials { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; align-content: center; }
.mtc-off { display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 9px 4px 8px; border: 1px solid var(--st-line); border-radius: 6px; background: #fff; font-size: 13px; max-width: 100%; }
.mtc-off-lab { width: auto; font-size: 12px; color: var(--accent); }
.mtc-off-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.mtc-off-grade { margin-left: 2px; font-family: var(--fd); font-size: 14px; }
/* i comandi, in colonna stretta */
.mtc-actions { display: flex !important; flex-direction: column !important; gap: 6px !important; }
.mtc-actions .mtc-btn, .mtc-actions .mtc-status, .mtc-actions .mtc-appt { width: 100%; text-align: center; font-size: 12.5px; padding: 7px 10px; border-radius: 6px; }
.mtc-appt { font-weight: 600; }
.mtc-status { font-weight: 600; }
.mtc-btn.blue { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); }
.mtc-btn.edit { background: #fff; color: var(--st-ink); border: 1px solid var(--st-line); }
@media (max-width: 1180px) {
  .mtc { grid-template-columns: 100px minmax(0, 1fr) !important; }
  .mtc-officials { grid-column: 1 / -1; }
  .mtc-actions { grid-column: 1 / -1; flex-direction: row !important; flex-wrap: wrap; }
  .mtc-actions .mtc-btn, .mtc-actions .mtc-status, .mtc-actions .mtc-appt { width: auto; flex: 1 1 140px; }
}
@media (max-width: 640px) {
  .mtc { grid-template-columns: 1fr !important; }
  .mtc-teams { flex-wrap: wrap !important; }
}

/* ---- La lavagna delle designazioni: una colonna per gara, la testa come un
   tabellone (ora, giornata, squadre), le righe dei ruoli compatte. ---- */
.sd-day-lb { font-family: var(--fd); font-size: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--st-ink); }
.sd-day-n { font-family: var(--fd); font-size: 13px; border-radius: 4px; padding: 1px 7px; }
.sd-card { border: 1px solid var(--st-line); border-radius: var(--radius-card); box-shadow: var(--shadow-rest); }
.sd-card.sd-locked { opacity: 1; }
.sd-head { background: var(--st-ink); color: #fff; font-family: var(--fd); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 7px 12px; text-align: left; border-bottom: 0; }
.sd-md { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--st-ink); font-family: var(--fd); font-size: 17px; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; padding: 8px 12px; justify-content: flex-start; text-align: left; border-bottom: 1px solid var(--st-line); }
.sd-md-g { background: var(--accent); color: #fff; border-radius: 4px; font-size: 12px; letter-spacing: .08em; padding: 1px 7px; }
.sd-row { grid-template-columns: 78px 1fr; padding: 4px 10px; border-top: 1px solid var(--st-line); }
.sd-lb { font-family: var(--fd); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.sd-row select, .sd-row .des-search { font-size: 13.5px; min-height: 31px; padding-top: 3px; padding-bottom: 3px; border-radius: 6px; border-color: var(--st-line); }
.sd-row .des-combo { gap: 4px; }
.sd-row select:focus, .sd-row .des-search:focus { border-color: var(--accent); }
.sd-card.sd-locked select, .sd-card.sd-locked .des-search { background: #F6F7F9; color: var(--st-muted); }
.sd-lockmsg { margin: 8px 10px 10px; font-size: 12px; font-weight: 500; background: #F3F4F6; color: var(--st-muted); border-radius: 6px; }
.sd-save { border-radius: 6px; font-size: 13px; }
.sd-print { border-radius: var(--radius-card); }
.sd-print-h { font-family: var(--fd); font-size: 14px; letter-spacing: .1em; font-weight: 600; }
.sd-dayrow { gap: 12px; }
.sd-dayrow .sd-card { flex: 1 1 290px; min-width: 270px; max-width: 420px; }

/* ---- Station: i risultati dentro la loro sezione (14.184) ---- */
.st-tabs { border-bottom: 1px solid var(--st-line); gap: 2px; }
.st-tab { font-family: var(--fd); font-size: 17px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 10px 16px; border-radius: 6px 6px 0 0; }
.st-tab.is-on { border-bottom-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--st-ink); }
.st-cfg { border-radius: var(--radius-card); border-color: var(--st-line); background: #fff; box-shadow: var(--shadow-rest); }
.st-cfg > b { display: block; font-family: var(--fd); font-size: 20px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.st-cfg.st-ris { max-width: none; margin-top: 22px; padding: 18px 20px; }
.st-cfg.st-ris > b::before { content: ''; display: inline-block; width: 4px; height: 18px; background: var(--accent); border-radius: 2px; margin-right: 10px; vertical-align: -2px; }
.st-voci th { font-family: var(--fd); font-size: 13px; font-weight: 600; letter-spacing: .08em; opacity: 1; color: var(--st-muted); padding: 8px 10px; border-bottom: 1px solid var(--st-line); white-space: nowrap; }
.st-voci td { padding: 8px 10px; border-bottom: 1px solid #F0F2F5; }
.fst-t td { font-size: 14px; }
.fst-t td span { font-family: var(--fb); }
.fst-t td .fs-quanti, .fs-quanti { font-family: var(--fb); font-size: 12.5px; opacity: 1; color: var(--st-muted); }
.simr-sum td:nth-child(2) { width: auto; }
.simr-sum td.num, .simr-sum td.num b, .simr-sum td.num span { font-family: var(--fd); font-size: 18px; font-weight: 600; white-space: nowrap; }
.simr-sum td.num .fs-quanti { font-size: 13px; font-weight: 500; font-family: var(--fb); }
.simr-nome { font-size: 15px; }
.pc { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.pc b { font-family: var(--fd); font-size: 20px; font-weight: 700; line-height: 1; }
.pc small { font-size: 12px; color: var(--st-muted); }
.pc-ok b { color: var(--ok); } .pc-mid b { color: var(--amber); } .pc-ko b { color: var(--ko); }
.simr-nota { display: block; margin-top: 2px; }
.simr-dec { display: inline-block; padding: 3px 9px; border-radius: 5px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.simr-dec.is-ok { background: #E6F6EC; color: #15803D; } .simr-dec.is-ko { background: #FDECEC; color: #B91C1C; }
.simr-mot { font-size: 12px; color: var(--st-muted); margin-top: 3px; max-width: 220px; }
.simr-uff { border-radius: var(--radius-card); border-color: var(--st-line); }
.simr-uff > summary { font-family: var(--fd); font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.simr-uff-n { font-family: var(--fb); font-size: 13px; }
.simr-filtri { border-radius: var(--radius-card); border-color: var(--st-line); background: #F7F8FA; }
.simr-filtri label { font-family: var(--fd); font-size: 13px; letter-spacing: .08em; font-weight: 600; }
.simr-tab-wrap { padding: 0; }
.simr-tab-wrap .st-voci td .ok { color: var(--ok); } .simr-tab-wrap .st-voci td .ko { color: var(--ko); }
.cru-dett > summary { font-family: var(--fd); font-size: 16px; letter-spacing: .06em; font-weight: 600; }
.simr-dett > summary { cursor: pointer; font-family: var(--fd); font-size: 18px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 6px 0; margin-top: 10px; list-style: none; }
.simr-dett > summary::before { content: '\25B8'; color: var(--st-muted); margin-right: 8px; }
.simr-dett[open] > summary::before { content: '\25BE'; }
.simr-tab-wrap td > span, .simr-tab-wrap td > div { white-space: nowrap; }
.simr-tab-wrap td .simr-mot { white-space: normal; }

/* ---- Simulatore, prova per prova (14.185): una scheda per prova con la
   linea del tempo della sessione, le misure e la procedura passo per passo. ---- */
.simr-runs { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.simr-run { border: 1px solid var(--st-line); border-radius: var(--radius-card); background: #fff; padding: 14px 16px 12px; }
.simr-run-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.simr-run-t b { font-family: var(--fd); font-size: 19px; font-weight: 600; letter-spacing: .01em; display: block; line-height: 1.1; }
.simr-run-d { font-size: 13px; color: var(--st-muted); }
.simr-run-dec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.simr-run-dec .simr-mot { margin: 0; max-width: none; font-size: 13px; }
.simr-att { font-size: 12.5px; color: var(--ko); background: #FDECEC; border-radius: 5px; padding: 3px 8px; }
.simr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.simr-tile { border: 1px solid var(--st-line); border-radius: 8px; padding: 8px 10px 7px; background: #FAFBFC; }
.simr-tile b { display: block; font-family: var(--fd); font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: .01em; }
.simr-tile span { display: block; font-size: 12px; color: var(--st-muted); margin-top: 4px; }
.simr-tile.is-ok b { color: var(--ok); } .simr-tile.is-ko b { color: var(--ko); }
/* la linea del tempo: dal via alla decisione; i check sopra, i passi sotto */
.simr-tl { position: relative; height: 112px; margin: 14px 8px 6px; }
.simr-tl-bar { position: absolute; left: 0; right: 0; top: 54px; height: 4px; background: #E3E7EC; border-radius: 2px; }
.simr-tl-rev { position: absolute; top: 0; height: 4px; background: color-mix(in srgb, var(--accent) 45%, #E3E7EC); border-radius: 2px; }
.simr-tl-m { position: absolute; top: 56px; width: 0; }
.simr-tl-m i { position: absolute; left: -1px; top: -8px; width: 2px; height: 12px; background: var(--st-ink); border-radius: 1px; }
.simr-tl-m.up i { top: -14px; height: 14px; } .simr-tl-m.down i { top: -2px; height: 14px; }
.simr-tl-m.is-check i { background: var(--ok); } .simr-tl-m.is-check.is-ko i { background: var(--amber); }
.simr-tl-m.is-extra i { background: var(--amber); } .simr-tl-m.is-step i { background: var(--accent); }
.simr-tl-m.is-dec i { background: var(--st-ink); width: 3px; height: 30px; top: -22px; left: -1px; } .simr-tl-m.is-dec.is-ko i { background: var(--ko); }
.simr-tl-lb { position: absolute; left: -2px; white-space: nowrap; line-height: 1.15; }
.simr-tl-m.up .simr-tl-lb { bottom: 16px; } .simr-tl-m.down .simr-tl-lb { top: 16px; }
.simr-tl-m.is-dec .simr-tl-lb { left: auto; right: -2px; text-align: right; }
.simr-tl-lb b { display: block; font-family: var(--fd); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.simr-tl-lb span { display: block; font-size: 11px; color: var(--st-muted); }
.simr-tl-m.is-check .simr-tl-lb b { color: var(--ok); } .simr-tl-m.is-check.is-ko .simr-tl-lb b, .simr-tl-m.is-extra .simr-tl-lb b { color: var(--amber); }
.simr-tl-m.is-step .simr-tl-lb b { color: var(--accent); }
/* i passi della procedura come spunte in fila */
.simr-proc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.simr-step { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 9px 4px 7px; border-radius: 5px; border: 1px solid var(--st-line); background: #fff; }
.simr-step i { font-style: normal; font-weight: 700; }
.simr-step.is-ok { border-color: #CDEBD8; background: #F2FAF5; } .simr-step.is-ok i { color: var(--ok); }
.simr-step.is-ko { border-color: #F5CFD1; background: #FDF3F3; } .simr-step.is-ko i { color: var(--ko); }
.simr-tl { height: 150px; }
.simr-tl-bar { top: 70px; } .simr-tl-m { top: 72px; }
.simr-tl-m.up.row2 .simr-tl-lb { bottom: 46px; } .simr-tl-m.up.row2 i { top: -44px; height: 44px; opacity: .55; }
.simr-tl-m.down.row2 .simr-tl-lb { top: 46px; } .simr-tl-m.down.row2 i { height: 44px; opacity: .55; }
/* ---- Coach del simulatore: il debrief nella scheda della prova, chiuso. ---- */
.simr-coach-w:empty { display: none; }
.simr-coach, .simr-coach-go { margin-top: 10px; border-top: 1px dashed var(--st-line); padding-top: 10px; }
.simr-coach > summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.simr-coach > summary::-webkit-details-marker { display: none; }
.simr-coach > summary::after { content: '\25BE'; margin-left: auto; color: var(--st-muted); transition: transform .15s; }
.simr-coach[open] > summary::after { transform: rotate(180deg); }
.simr-coach-k { font-family: var(--fd); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.simr-coach-s { flex: 1 1 260px; font-size: 14px; line-height: 1.4; color: var(--st-ink); }
.simr-coach-b { display: grid; gap: 10px; margin-top: 10px; }
.simr-coach-b h5 { margin: 0 0 4px; font-family: var(--fd); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.simr-coach-b ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.simr-coach-b ul li::marker { color: var(--ok); }
.simr-coach-b p { margin: 0; font-size: 13.5px; line-height: 1.45; }
.simr-coach-c { border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 9%, transparent); border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; font-size: 13.5px; line-height: 1.4; }
.simr-coach-c b { display: block; }
.simr-coach-c span { display: block; }
.simr-coach-c em { font-style: normal; font-weight: 600; color: var(--st-muted); }
.simr-coach-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--st-muted); }
.simr-coach-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.simr-coach-btn { padding: 6px 12px; font-size: 13px; }
.simr-coach-att { font-size: 13px; color: var(--st-muted); }
html.rs-admin .simr-coach-k { color: var(--rs-acc2); }
html.rs-admin .simr-coach-s { color: var(--rs-txt); }

/* =====================================================================
   REPLAY STATION ADMIN (html.rs-admin): tema scuro. Le superfici bianche
   del gestionale qui diventano le superfici scure del pannello, e i colori
   di testo/verdetto quelli della station. Senza questo blocco, 14.185
   mostrava testo chiaro su riquadri bianchi.
   ===================================================================== */
html.rs-admin { --st-ink: var(--rs-txt); --st-muted: var(--rs-txt2); --st-line: var(--rs-line); --ok: var(--rs-ok); --ko: var(--rs-ko); --amber: var(--rs-warn); --shadow-rest: none; }
html.rs-admin body, html.rs-admin button, html.rs-admin input, html.rs-admin select, html.rs-admin textarea { font-family: var(--fb); }
html.rs-admin .rs-bt { font-family: var(--fd); }
html.rs-admin .panel, html.rs-admin .st-cfg, html.rs-admin .simr-run, html.rs-admin .simr-uff, html.rs-admin .mtc-off, html.rs-admin .btn-ghost, html.rs-admin .btn.ghost,
html.rs-admin .sub-tab, html.rs-admin .rk-tab, html.rs-admin .sd-card, html.rs-admin .mtc-btn.edit, html.rs-admin .mtc, html.rs-admin .simr-step, html.rs-admin .sqbox { background: var(--rs-sur); border-color: var(--rs-line); color: var(--rs-txt); }
html.rs-admin .home-card { background: var(--rs-sur) !important; border-color: var(--rs-line) !important; }
html.rs-admin .simr-tile, html.rs-admin .simr-filtri, html.rs-admin .simr-uff[open] > summary, html.rs-admin .num-box { background: var(--rs-sur2); border-color: var(--rs-line); }
html.rs-admin .st-voci th { color: var(--rs-txt2); border-bottom-color: var(--rs-line); }
html.rs-admin .st-voci td { border-bottom-color: var(--rs-line); }
html.rs-admin .fst-t tr:nth-child(even) td { background: rgba(255,255,255,.025); }
html.rs-admin .simr-dec.is-ok { background: rgba(74,222,128,.16); color: var(--rs-ok); }
html.rs-admin .simr-dec.is-ko, html.rs-admin .simr-att { background: rgba(248,113,113,.16); color: var(--rs-ko); }
html.rs-admin .simr-step.is-ok { background: rgba(74,222,128,.10); border-color: rgba(74,222,128,.35); }
html.rs-admin .simr-step.is-ko { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.4); }
html.rs-admin .simr-tl-bar { background: var(--rs-line2); }
html.rs-admin .simr-tl-rev { background: color-mix(in srgb, var(--rs-acc) 60%, var(--rs-line2)); }
html.rs-admin .simr-tl-m i, html.rs-admin .simr-tl-m.is-dec i { background: var(--rs-txt); }
html.rs-admin .simr-tl-m.is-check i { background: var(--rs-ok); } html.rs-admin .simr-tl-m.is-step i { background: var(--rs-acc2); }
html.rs-admin .simr-tl-m.is-check.is-ko i, html.rs-admin .simr-tl-m.is-extra i { background: var(--rs-warn); } html.rs-admin .simr-tl-m.is-dec.is-ko i { background: var(--rs-ko); }
html.rs-admin .simr-tl-m.is-step .simr-tl-lb b { color: var(--rs-acc2); }
html.rs-admin .st-cfg.st-ris > b::before { background: var(--rs-acc); }
html.rs-admin .sd-head { background: #05070d; } html.rs-admin .sd-md { background: var(--rs-sur2); color: var(--rs-txt); border-bottom-color: var(--rs-line); }
html.rs-admin .sd-row { border-top-color: var(--rs-line); } html.rs-admin .sd-row select, html.rs-admin .sd-row .des-search { background: var(--rs-bg2); color: var(--rs-txt); border-color: var(--rs-line2); }
html.rs-admin .mtc-score { background: var(--rs-txt); color: var(--rs-bg); }
html.rs-admin .mtc-btn.blue { background: rgba(59,130,246,.18); color: var(--rs-acc2); }
html.rs-admin input[type=text], html.rs-admin input[type=search], html.rs-admin input[type=number], html.rs-admin input[type=email], html.rs-admin input[type=date], html.rs-admin select, html.rs-admin textarea { background: var(--rs-bg2); color: var(--rs-txt); border-color: var(--rs-line2); }
html.rs-admin .st-tab.is-on { color: var(--rs-txt); }
html.rs-admin .cru-dett > summary, html.rs-admin .simr-dett > summary { color: var(--rs-txt); }

/* ---- (14.548) Home su telefono e menu laterale ----
   1. Il menu laterale chiuso non deve mai vedersi sopra il contenuto: resta
      nascosto e compare solo con body.nav-open (apertura dal menu ☰).
   2. Sul telefono la home è una griglia a due colonne, con descrizioni di due
      righe al massimo: prima era una colonna lunga, con schede alte come una pagina. */
@media (max-width: 900px) {
  .sidebar { visibility: hidden; transition: transform .22s ease, visibility .22s; }
  body.nav-open .sidebar { visibility: visible; }
}
@media (max-width: 640px) {
  .home-head { margin-bottom: 18px; }
  .home-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-card { flex-direction: column; align-items: flex-start; padding: 14px !important; gap: 10px; }
  .home-body { min-width: 0; }
  .home-ic { width: 38px; height: 38px; }
  .home-t { font-size: 16px; line-height: 1.15; }
  .home-count { font-size: 11px; padding: 0 5px; }
  .home-d { font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-go { top: 12px; right: 12px; }
}

/* ---- (14.549) Pulsante «Come funziona VAR Manager» nella home ----
   Il pulsante sta nell'intestazione della home (sotto il sottotitolo), a tutta
   larghezza, e resta fuori dalla griglia delle card. Le regole generali .help-btn
   (design.css, sopra) lo rimpicciolivano: qui si ristabilisce la forma grande. */
.help-home-wrap {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  grid-column: 1 / -1;
}
.help-home-wrap .help-btn-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 13px 26px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 32%, transparent);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.help-home-wrap .help-btn-big:hover,
.help-home-wrap .help-btn-big:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 42%, transparent);
  outline: none;
}
.help-home-wrap .help-btn-big:active { transform: translateY(0); }
@media (max-width: 640px) {
  .help-home-wrap .help-btn-big { width: 100%; padding: 14px 18px; }
}
