/* NowTrade WebApp — styles.css
   Tema desktop estratto da nowtrade_v2/ui/theme.py (build_base_css)
   + classi mobile-shell per i frammenti HTML dei builder.
   Nessuna dipendenza esterna eccetto il font Google (opzionale). */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  color-scheme: dark;
  --nt-primary:         #3B82F6;
  --nt-primary-dark:    #1D4ED8;
  --nt-primary-light:   #60A5FA;
  --nt-primary-glow:    rgba(59,130,246,0.22);
  --nt-cyan:            #38BDF8;
  --nt-cyan-glow:       rgba(56,189,248,0.20);
  --nt-violet:          #8B5CF6;
  --nt-accent:          #FACC15;
  --nt-bg-dark:         #050B14;
  --nt-bg-deep:         #03070E;
  --nt-bg-card:         #0B1626;
  --nt-bg-surface:      #0E1D33;
  --nt-bg-elevated:     #0F2542;
  --nt-bg-input:        #0B1A2D;
  /* token theme-aware per i builder inline (tokenizzazione 2026-06-17): valore DARK = letterale
     storico esatto → dark byte-identico; il valore LIGHT è nel blocco html[data-theme="light"]. */
  --nt-bg-track:        #0F172A;             /* track barre/progress (era #0F172A inline) */
  --nt-bg-glass:        rgba(17,24,39,0.75); /* shell card builder (era rgba(17,24,39,0.75)) */
  --nt-bg-glass-2:      rgba(30,41,59,0.5);  /* shell interna secondaria (era rgba(30,41,59,0.5)) */
  --nt-text-soft:       #A8C1CC;             /* testo corpo attenuato nelle card (era #A8C1CC) */
  --nt-border:          rgba(31,51,72,0.85);
  --nt-border-strong:   #1F3348;
  --nt-border-subtle:   rgba(31,51,72,0.45);
  --nt-border-focus:    rgba(59,130,246,0.55);
  --nt-text-primary:    #F8FAFC;
  --nt-text-secondary:  #94A3B8;
  --nt-text-muted:      #7E8CA0;   /* alzato per contrasto AA (~5:1 su navy); era #64748B (~3:1) */
  --nt-text-faint:      #64748B;   /* alzato (ex-muted); era #475569 (~1.9:1, sotto AA) */
  --nt-success:         #22C55E;
  --nt-success-bg:      rgba(34,197,94,0.12);
  --nt-danger:          #FF6B6B;
  --nt-danger-bg:       rgba(255,107,107,0.13);
  --nt-warning:         #FACC15;
  --nt-warning-bg:      rgba(250,204,21,0.13);
  /* Token semantici di mercato/dato (tokenizzazione builder 2026-06-16): centralizzano i
     colori prima hardcodati inline nei builder HTML (nowtrade_overview_widgets/fragments). */
  --nt-up:              #10B981;   /* esito/segnale positivo (verde smeraldo) */
  --nt-down:            #EF4444;   /* esito/segnale negativo (rosso) */
  --nt-info:            #3B82F6;   /* informativo (= primary) */
  --nt-goal:            #F59E0B;   /* gol / ambra */
  --nt-text-bright:     #E2E8F0;   /* testo quasi-bianco (tra primary e secondary) */
  --nt-radius-xs:       4px;
  --nt-radius-sm:       6px;
  --nt-radius-md:       10px;
  --nt-radius-lg:       14px;
  --nt-radius-xl:       22px;
  --nt-radius-pill:     999px;
  --nt-shadow-sm:       0 2px 6px rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.35);
  --nt-shadow-md:       0 8px 24px rgba(0,0,0,.55),0 2px 6px rgba(0,0,0,.40);
  --nt-shadow-lg:       0 16px 48px rgba(0,0,0,.65),0 4px 12px rgba(0,0,0,.45);
  --nt-font:            "Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  /* Font unificato su INTER anche per valori/quote (2026-06-17): era JetBrains Mono.
     tabular-nums (su body) mantiene allineate le cifre. */
  --nt-font-mono:       var(--nt-font);
  /* alias mobile (per compatibilità frammenti) */
  --bg:     #07111d;
  --bg-2:   #0b1626;
  --panel:  rgba(15,23,42,0.96);
  --line:   rgba(148,163,184,0.18);
  --text:   #e2e8f0;
  --muted:  #94a3b8;
  --accent: #2dd4bf;
  --accent-2: #f59e0b;
  --danger: #fb7185;
  --good:   #34d399;
  --shadow: 0 24px 70px rgba(0,0,0,0.35);
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: var(--nt-font);
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(59,130,246,0.06) 0%, rgba(59,130,246,0) 55%),
    radial-gradient(900px 540px at 88% 0%, rgba(56,189,248,0.045) 0%, rgba(56,189,248,0) 60%),
    var(--nt-bg-dark);
  color: var(--nt-text-primary);
  min-height: 100vh;
}
a { color: var(--nt-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
* { scrollbar-width: thin; scrollbar-color: #1F3348 var(--nt-bg-dark); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--nt-bg-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#243a55,#1f3348); border-radius: 6px; }
::selection { background: var(--nt-primary-glow); color: var(--nt-text-primary); }

/* =====================================================================
   APP SHELL — layout a due colonne: sidebar + main
   ===================================================================== */
#app {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  align-items: stretch;
}

/* Brand colors reuse — rebranding "Investing Football" (2026-07-30): il verde e' quello del
   logo (palla + grafico), il blu era di NowTrade. */
.nt-brand-now  { color: #F8FAFC; }
.nt-brand-trade {
  background: linear-gradient(135deg,#8BD44F,#4CAF2F,#63C534);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Seconda riga del wordmark in sidebar: la regola `> span:first-child` qui sotto vale solo per la
   prima, senza questa la parola "Football" resterebbe alla dimensione di default. */
.nt-brand-line2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1;
}

/* =====================================================================
   SIDEBAR (sinistra) — replica section[data-testid="stSidebar"] Streamlit
   ===================================================================== */
.nt-sidebar {
  width: 320px;
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(3,7,14,0.98), rgba(5,11,20,0.96));
  border-right: 1px solid var(--nt-border-strong);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;              /* lo scroll è ora sull'area interna .nt-sidebar-scroll */
  z-index: 100;
  scrollbar-width: thin;
}

/* Sidebar brand area */
.nt-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 14px;
  border-bottom: 1px solid var(--nt-border-subtle);
  flex-shrink: 0;
}
.nt-sidebar-logo {
  width: 48px; height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.nt-sidebar-logo-fallback {
  width: 48px; height: 48px;
  background: linear-gradient(135deg,#3B82F6,#1D4ED8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.nt-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nt-sidebar-brand-text > span:first-child {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1;
}
.nt-sidebar-brand-sub {
  font-size: 10px;
  color: #93C5FD;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Accesso widget (nt-sidebar-access dal tema desktop) */
.nt-sidebar-access {
  margin: 0 12px 6px;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--nt-text-secondary);
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
  flex-shrink: 0;
  line-height: 1.5;
}
.nt-sidebar-access strong { color: var(--nt-text-primary); font-weight: 800; }

/* Logout button — full-width, styled like Streamlit sidebar */
.nt-sidebar-logout-wrap {
  padding: 0 12px 8px;
  flex-shrink: 0;
}
.nt-sidebar-logout-btn {
  width: 100%;
  background: var(--nt-bg-surface);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
  color: var(--nt-text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-align: center;
}
.nt-sidebar-logout-btn:hover {
  background: var(--nt-bg-elevated);
  border-color: rgba(59,130,246,0.4);
  color: var(--nt-text-primary);
}

/* Section title "MODALITÀ OPERATIVA" with left accent bar */
.nt-sidebar-section-title {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--nt-text-primary);
  text-transform: uppercase;
  letter-spacing: .10em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.nt-sidebar-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--nt-primary);
  border-radius: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* "Fonte Dati" label above options */
.nt-sidebar-fonte-label {
  padding: 2px 16px 6px;
  font-size: 10.5px;
  color: var(--nt-text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

/* Sidebar nav — navigazione raggruppata (redesign 2026-06-30): gruppi distanziati,
   gli item sono pannelli NEUTRI; solo l'attivo è verde (vedi design "Dopo"). */
.nt-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
}

/* === Nav items: pannello neutro, icona + label + badge; attivo = verde === */
.nt-sidebar-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--nt-border-strong);
  background: var(--nt-bg-card);
  color: var(--nt-text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.nt-sidebar-nav-item:hover {
  background: var(--nt-bg-surface);
  border-color: var(--nt-border-focus);
  color: var(--nt-text-primary);
}
/* barra-accento sull'attiva */
.nt-sidebar-nav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  height: 60%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #10B981;
  transform: translateY(-50%) scaleY(0);
  transition: transform .16s ease;
}
.nt-sidebar-nav-item.active {
  background: linear-gradient(180deg, rgba(16,185,129,0.40), rgba(16,185,129,0.26));
  border-color: rgba(52,211,153,0.85);   /* attivo: verde acceso, ben staccato */
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 20px -3px rgba(16,185,129,0.65);
}
.nt-sidebar-nav-item.active::before {
  width: 4px;
  background: #34D399;
  box-shadow: 0 0 10px rgba(52,211,153,0.85);
  transform: translateY(-50%) scaleY(1);
}

/* emoji e dot rimossi: resta solo il bottone */
.nt-nav-emoji { display: none; }
.nt-radio-circle { display: none; }
.nt-nav-label { flex: 1; }

/* ============================================================
   SIDEBAR REDESIGN — import design "NowTrade Sidebar" (2026-06-30)
   Strip stato live · nav a icone+badge in 2 gruppi · footer account in fondo.
   Tutto su token --nt-* → theme-aware (override chiaro in coda al file).
   ============================================================ */

/* Strip stato live (sotto il brand) */
.nt-sidebar-status {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 12px 0; padding: 9px 12px;
  border-radius: 10px;
  background: var(--nt-bg-deep);
  border: 1px solid var(--nt-border-strong);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px; color: var(--nt-text-secondary);
  flex-shrink: 0;
}
.nt-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nt-up); animation: nt-pulse-green 1.8s infinite; flex-shrink: 0;
}
.nt-status-live { color: var(--nt-up); font-weight: 600; letter-spacing: .04em; }
.nt-status-sep { color: var(--nt-text-faint); }
.nt-status-time { margin-left: auto; color: var(--nt-text-muted); }
.nt-sidebar-status.is-offline .nt-status-dot { background: var(--nt-text-faint); animation: none; }
.nt-sidebar-status.is-offline .nt-status-live { color: var(--nt-text-faint); }

/* Area scrollabile (nav a gruppi + controlli per-modalità) */
.nt-sidebar-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px 12px 8px;
  display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: thin;
}

/* Gruppi nav (Fonte dati / Strumenti) */
.nt-nav-group { display: flex; flex-direction: column; gap: 7px; }
.nt-nav-group-title {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--nt-text-faint); margin: 0 0 2px 2px;
}

/* Icona della voce nav */
.nt-nav-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; color: var(--nt-text-muted); flex-shrink: 0;
}
.nt-nav-ico svg { width: 20px; height: 20px; display: block; }
.nt-sidebar-nav-item:hover .nt-nav-ico { color: var(--nt-text-secondary); }
.nt-sidebar-nav-item.active .nt-nav-ico { color: #6affc0; }

/* Badge conteggio a destra */
.nt-nav-badge {
  margin-left: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 600; line-height: 1.5;
  padding: 2px 8px; border-radius: var(--nt-radius-pill);
  background: rgba(148,163,184,0.12); color: var(--nt-text-secondary);
}
.nt-nav-badge[hidden] { display: none; }
.nt-nav-badge--live { background: rgba(34,197,94,0.20); color: #7dffc8; }
.nt-nav-badge--alert { display: inline-flex; align-items: center; gap: 6px; background: var(--nt-danger-bg); color: #ff8a8e; }
.nt-nav-badge--alert[hidden] { display: none; }
.nt-nav-badge--alert::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--nt-danger); animation: nt-pulse-red 1.6s infinite; flex-shrink: 0;
}

/* Footer account (in fondo, fuori dallo scroll) */
.nt-sidebar-account {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 12px 14px; padding: 9px 10px;
  border-radius: 12px;
  background: var(--nt-bg-card); border: 1px solid var(--nt-border-strong);
  flex-shrink: 0;
}
.nt-account-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(140deg, var(--nt-primary), var(--nt-violet));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0;
}
.nt-account-meta { min-width: 0; flex: 1; }
.nt-account-name {
  font-size: 13px; font-weight: 700; color: var(--nt-text-primary); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nt-account-role { font-size: 11px; color: var(--nt-text-muted); }
.nt-account-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Bottoni-icona compatti (tema + logout) nel footer */
.nt-icon-btn {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--nt-border-strong);
  background: transparent; color: var(--nt-text-secondary);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.nt-icon-btn:hover { background: var(--nt-bg-surface); color: var(--nt-text-primary); }
.nt-icon-btn svg { width: 18px; height: 18px; }
.nt-icon-btn .nt-theme-ico { font-size: 16px; line-height: 1; }
.nt-icon-btn .nt-theme-lab { display: none; }   /* footer: solo icona, etichetta nel tooltip */
.nt-icon-btn--danger:hover { background: var(--nt-danger-bg); color: #ff8a8e; border-color: rgba(255,107,107,0.4); }

@keyframes nt-pulse-green { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); } }
@keyframes nt-pulse-red   { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,107,.5); } 50% { box-shadow: 0 0 0 5px rgba(255,107,107,0); } }

/* --- tema chiaro: nuovi elementi + nav neutri/attivo verde --- */
html[data-theme="light"] .nt-sidebar-status { background: #eef3fb; border-color: #d7e0ee; color: #475569; }
html[data-theme="light"] .nt-nav-group-title { color: #64748b; }
html[data-theme="light"] .nt-nav-ico { color: #64748b; }
/* (gli override .nt-sidebar-nav-item per il tema chiaro sono nel blocco light più in basso,
   che vince per posizione nel file: lì white-panel inattivo + attivo VERDE come nel design) */
html[data-theme="light"] .nt-nav-badge { background: rgba(15,23,42,0.07); color: #475569; }
html[data-theme="light"] .nt-nav-badge--live { background: rgba(16,185,129,0.16); color: #047857; }
html[data-theme="light"] .nt-sidebar-account { background: #f5f8fd; border-color: #d7e0ee; }
html[data-theme="light"] .nt-account-name { color: #0f172a; }
html[data-theme="light"] .nt-icon-btn { border-color: #d7e0ee; color: #475569; }
html[data-theme="light"] .nt-icon-btn:hover { background: #e7eef9; color: #1e293b; }

/* Sidebar per-modalità controls */
.nt-sidebar-controls {
  padding: 4px 14px 8px;
  flex-shrink: 0;
}
.nt-sidebar-control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.nt-sidebar-control-group label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nt-text-secondary);
  font-weight: 700;
}
.nt-sidebar-select {
  width: 100%;
  border-radius: var(--nt-radius-sm);
  border: 1px solid var(--nt-border-strong);
  background: var(--nt-bg-input);
  color: var(--nt-text-primary);
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
.nt-sidebar-select:focus {
  border-color: var(--nt-border-focus);
  box-shadow: 0 0 0 3px var(--nt-primary-glow);
}
.nt-range--wide {
  width: 100%;
}

/* Ricerca testuale match in sidebar (input + dropdown risultati in-flow) */
.nt-sidebar-search {
  width: 100%;
  border-radius: var(--nt-radius-sm);
  border: 1px solid var(--nt-border-strong);
  background: var(--nt-bg-input);
  color: var(--nt-text-primary);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.nt-sidebar-search::placeholder { color: var(--nt-text-muted); }
.nt-sidebar-search:focus {
  border-color: var(--nt-border-focus);
  box-shadow: 0 0 0 3px var(--nt-primary-glow);
}
.nt-search-results {
  display: none;
  margin-top: 6px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
  background: var(--nt-bg-card);
}
.nt-search-results.open { display: block; }
.nt-search-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  border-bottom: 1px solid var(--nt-border-subtle);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--nt-text-primary);
  font: inherit;
  transition: background .12s;
}
.nt-search-item:last-child { border-bottom: none; }
.nt-search-item:hover { background: rgba(59,130,246,0.08); }
.nt-search-teams { display: block; font-size: 12.5px; font-weight: 700; }
.nt-search-vs { color: var(--nt-text-muted); font-weight: 600; }
.nt-search-meta { display: block; font-size: 11px; color: var(--nt-text-secondary); margin-top: 2px; }
.nt-search-empty { padding: 10px; font-size: 12px; color: var(--nt-text-secondary); text-align: center; }

/* =====================================================================
   MAIN CONTENT AREA
   ===================================================================== */
.nt-main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 64px;
  overflow-y: auto;
  /* Cap di larghezza per monitor larghi/ultrawide: il contenuto resta leggibile
     (niente righe >120 caratteri, tabelle/prose AI non spalmate edge-to-edge)
     e si centra nello spazio residuo. Sotto i 1500px non cambia nulla. */
  max-width: 1500px;
  margin-inline: auto;
}

@media (max-width: 900px) {
  #app { flex-direction: column; }
  .nt-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--nt-border-strong);
  }
  .nt-main { padding: 16px 14px 40px; }
}

/* =====================================================================
   LOGIN SCREEN — split-screen identico a auth_ui.py Streamlit
   ===================================================================== */
#login-screen {
  display: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 18% -8%, rgba(59,130,246,0.10) 0%, rgba(59,130,246,0) 60%),
    radial-gradient(900px 540px at 88% 0%, rgba(56,189,248,0.06) 0%, rgba(56,189,248,0) 65%),
    radial-gradient(800px 480px at 50% 110%, rgba(139,92,246,0.05) 0%, rgba(139,92,246,0) 65%),
    linear-gradient(135deg, #050B14 0%, #060F1D 50%, #03070E 100%);
  z-index: 200;
  overflow-y: auto;
  align-items: flex-start;          /* top-align come .block-container Streamlit (no centratura verticale) */
  justify-content: center;
}
#login-screen.visible { display: flex; }

/* Two-column layout ~1.15 : 0.85 — colonne allineate in ALTO come st.columns Streamlit
   (Streamlit usa .block-container padding-top:4rem, colonne top-aligned, NON centrate). */
.nt-login-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 80px;
  padding: 4rem 2rem;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

/* ---- LEFT panel ---- */
.nt-login-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding: 12px 4px 12px 0;
  flex: 1.15;
  min-width: 0;
}
.nt-login-logo-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 380px;
  max-width: 100%;
  filter:
    drop-shadow(0 22px 36px rgba(0,0,0,0.62))
    drop-shadow(0 0 28px rgba(76,175,47,0.20));
}
.nt-login-logo-hero-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.nt-login-logo-fallback {
  width: 190px;
  height: 190px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  font-weight: 900;
  color: #F8FAFC;
  background:
    linear-gradient(145deg, rgba(59,130,246,0.10) 0%, rgba(56,189,248,0.02) 30%, rgba(255,255,255,0) 60%),
    linear-gradient(135deg, #0C1828 0%, #060F1D 46%, #03070F 100%);
  border: 1px solid #1F3348;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 18px 30px rgba(0,0,0,0.50),
    0 0 0 1px rgba(59,130,246,0.06);
}
.nt-login-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #93C5FD;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nt-login-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #38BDF8, transparent);
}
.nt-login-wordmark {
  margin: 0;
  font-family: "Inter","Segoe UI",system-ui,sans-serif;
  font-size: 74px;
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.02em;
}
.nt-login-wordmark-now {
  color: #F8FAFC;
  text-shadow: 0 2px 0 rgba(255,255,255,0.12), 0 18px 28px rgba(0,0,0,0.55);
}
.nt-login-wordmark-trade {
  background: linear-gradient(135deg, #8BD44F 0%, #4CAF2F 50%, #63C534 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(76,175,47,0.34));
}
.nt-login-copy {
  font-size: 16px;
  line-height: 1.6;
  color: #94A3B8;
  max-width: 560px;
  font-weight: 500;
}

/* ---- RIGHT card ---- */
.nt-login-card-wrap {
  flex: 0.85;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}
.nt-login-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(59,130,246,0.10) 0%, rgba(59,130,246,0) 70%),
    linear-gradient(115deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.008) 28%, rgba(255,255,255,0) 52%),
    linear-gradient(135deg, #0C1828 0%, #060F1D 46%, #03070F 100%);
  border: 1px solid #1F3348;
  border-radius: 22px;
  padding: 36px 38px 38px;
  width: 100%;
  max-width: 440px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 28px 64px rgba(0,0,0,0.55),
    0 0 0 1px rgba(59,130,246,0.05);
  backdrop-filter: blur(14px);
}
.nt-login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 21px;
  border: 1px solid rgba(59,130,246,0.10);
  pointer-events: none;
}
.nt-login-card::after {
  content: "";
  position: absolute;
  top: 0; left: 14%; right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #3B82F6 35%, #38BDF8 75%, transparent 100%);
  opacity: .55;
  pointer-events: none;
}
.nt-login-card-head {
  margin-bottom: 22px;
}
.nt-login-card-title {
  font-family: "Inter","Segoe UI",system-ui,sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: -.01em;
  margin: 0;
}
.nt-login-card-sub {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #38BDF8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nt-login-card-sub::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #38BDF8, transparent);
}
.nt-login-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31,51,72,0.85), transparent);
  margin-bottom: 24px;
}

/* Login form */
.nt-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nt-login-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nt-login-field-label {
  color: #94A3B8;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 4px;
}
.nt-login-pass-wrap {
  position: relative;
}
.nt-login-input {
  width: 100%;
  background: #0B1A2D;
  border: 1px solid #1F3348;
  border-radius: 10px;
  color: #F8FAFC;
  padding: 13px 15px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.30);
  box-sizing: border-box;
}
.nt-login-input::placeholder {
  color: #475569;
  font-weight: 500;
}
.nt-login-input:hover {
  border-color: rgba(59,130,246,0.40);
  background: #0D1F36;
}
.nt-login-input:focus {
  border-color: rgba(59,130,246,0.55);
  box-shadow:
    0 0 0 3px rgba(59,130,246,0.18),
    inset 0 1px 2px rgba(0,0,0,0.30);
  background: #0D1F36;
}
.nt-login-pass-wrap .nt-login-input {
  padding-right: 44px;
}
.nt-login-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.nt-login-eye-btn:hover { color: #F8FAFC; }
.nt-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 55%, #38BDF8 100%);
  border: 1px solid rgba(96,165,250,0.45);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 12px 28px rgba(59,130,246,0.32);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
  margin-top: 8px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
}
.nt-login-submit:hover {
  border-color: rgba(147,197,253,0.65);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 16px 36px rgba(59,130,246,0.40);
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.nt-login-submit:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.nt-login-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.nt-login-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(251,113,133,0.12);
  border: 1px solid rgba(251,113,133,0.28);
  color: #fecdd3;
  font-size: 13px;
  display: none;
  margin-bottom: 4px;
}
.nt-login-error.visible { display: block; }

/* Responsive login */
@media (max-width: 980px) {
  .nt-login-layout {
    flex-direction: column;
    gap: 40px;
    padding: 2.5rem 1.5rem;
  }
  .nt-login-brand-panel { align-items: center; padding: 0; }
  .nt-login-logo-hero { width: 240px; }
  .nt-login-wordmark { font-size: 48px; }
  .nt-login-copy { font-size: 15px; text-align: center; }
  .nt-login-kicker { align-self: center; }
  .nt-login-card-wrap { justify-content: center; width: 100%; }
  .nt-login-card { max-width: none; padding: 30px 24px 32px; }
}
@media (max-width: 640px) {
  .nt-login-logo-hero { width: 200px; }
  .nt-login-wordmark { font-size: 40px; }
}

/* =====================================================================
   SCREENS (tabs)
   ===================================================================== */
.nt-screen { display: none; }
.nt-screen.active { display: block; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.nt-btn {
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
  background: var(--nt-bg-surface);
  color: var(--nt-text-secondary);
  padding: 7px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nt-btn:hover {
  background: var(--nt-bg-elevated);
  border-color: rgba(59,130,246,0.4);
  color: var(--nt-text-primary);
}
/* Stato "in caricamento": etichetta nascosta + spinner centrato (riusa nt-spin). */
.nt-btn--busy {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: wait;
}
.nt-btn--busy::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid rgba(148,163,184,0.35);
  border-top-color: var(--nt-primary-light);
  animation: nt-spin 0.7s linear infinite;
}
.nt-btn-danger {
  background: var(--nt-danger-bg);
  border-color: rgba(255,107,107,0.32);
  color: var(--nt-danger);
}
.nt-btn-danger:hover {
  background: rgba(255,107,107,0.20);
  border-color: var(--nt-danger);
  color: var(--nt-text-primary);
}
/* Bottoni LIVE (Aggiorna Live / Torna alla griglia): stesso verde del nav "Live" attivo,
   ben visibili. */
.nt-btn-live {
  background: linear-gradient(180deg, rgba(16,185,129,0.40), rgba(16,185,129,0.26));
  border-color: rgba(52,211,153,0.85);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 14px -3px rgba(16,185,129,0.55);
}
.nt-btn-live:hover {
  background: linear-gradient(180deg, rgba(16,185,129,0.55), rgba(16,185,129,0.38));
  border-color: rgba(52,211,153,1);
  color: #fff;
}

/* =====================================================================
   ARCHIVIO — filtri a cascata
   ===================================================================== */
.nt-filters {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-md);
}
@media (max-width: 900px) {
  .nt-filters { grid-template-columns: repeat(2,1fr); }
}
.nt-filter-group {
  display: grid;
  gap: 6px;
}
.nt-filter-group label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nt-text-secondary);
  font-weight: 700;
}
.nt-filter-group select {
  width: 100%;
  border-radius: var(--nt-radius-sm);
  border: 1px solid var(--nt-border-strong);
  background: var(--nt-bg-input);
  color: var(--nt-text-primary);
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
.nt-filter-group select:focus {
  border-color: var(--nt-border-focus);
  box-shadow: 0 0 0 3px var(--nt-primary-glow);
}

/* =====================================================================
   PRE-MATCH — pannello "Filtri statistiche" (11 slider dual-range, stile
   "Goal Profits"). Collassabile via <details>/<summary> (CSP-safe, no JS
   richiesto per l'apri/chiudi). Logica in prematch_filters.js.
   ===================================================================== */
.nt-pmf-panel {
  margin-bottom: 20px;
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.20);
}
.nt-pmf-summary {
  background: linear-gradient(180deg, var(--nt-bg-elevated), var(--nt-bg-card));
  transition: background .15s ease;
}
.nt-pmf-summary:hover { background: linear-gradient(180deg, var(--nt-bg-input), var(--nt-bg-card)); }
.nt-pmf-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--nt-text-primary);
  list-style: none;
}
.nt-pmf-summary::-webkit-details-marker { display: none; }
/* Bottone "Espandi" esplicito (2026-07-21, richiesta utente: la freccina sola non faceva capire
   che il pannello si apre). Icona + che ruota in × ad aperto; label Espandi/Chiudi via CSS content
   (CSP-safe, zero JS). E' dentro <summary>: il click su tutta la riga continua a fare toggle. */
.nt-pmf-expand-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-pill, 999px);
  background: var(--nt-bg-input);
  color: var(--nt-text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .15s, color .15s;
}
.nt-pmf-summary:hover .nt-pmf-expand-btn {
  border-color: var(--nt-border-focus, var(--nt-primary));
  color: var(--nt-text-primary);
}
.nt-pmf-expand-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--nt-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: transform .15s;
}
.nt-pmf-panel[open] .nt-pmf-expand-plus { transform: rotate(45deg); }
.nt-pmf-expand-label::after { content: "Espandi"; }
.nt-pmf-panel[open] .nt-pmf-expand-label::after { content: "Chiudi"; }
.nt-pmf-body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--nt-border-strong);
}
.nt-pmf-note {
  font-size: 12px;
  color: var(--nt-text-secondary);
  padding: 10px 2px 4px;
}
.nt-pmf-grid {
  margin: 12px 0 4px;
  padding: 0;
  background: transparent;
  border: none;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 640px) {
  .nt-pmf-grid { grid-template-columns: 1fr; }
}
.nt-pmf-grid.is-disabled { opacity: .5; }
.nt-pmf-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.nt-pmf-badge {
  font-weight: 800;
  text-transform: none;
  letter-spacing: .2px;
  color: var(--nt-goal);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--nt-bg-input);
  border: 1px solid var(--nt-border-strong);
  border-radius: 999px;
  padding: 2px 9px;
}
.nt-pmf-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Pannello "Filtri Strategie" (2026-07-22): tabella 3 colonne (Evento|Win%|ROI%), una riga per
   evento del pill Strategie. Riusa gli stessi .nt-pmf-dualrange/track/fill/input dentro <td>. */
.nt-pmf-strat-table {
  width: 100%;
  border-collapse: collapse;
}
.nt-pmf-strat-table.is-disabled { opacity: .5; }
.nt-pmf-strat-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nt-text-secondary);
  padding: 4px 10px 8px;
}
.nt-pmf-strat-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--nt-border);
  vertical-align: middle;
}
.nt-pmf-strat-label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nt-pmf-strat-cell {
  min-width: 180px;
}
.nt-pmf-strat-cell .nt-pmf-badge { margin-bottom: 2px; display: inline-block; }
@media (max-width: 760px) {
  .nt-pmf-strat-table { display: block; overflow-x: auto; }
}

/* Slider dual-range: due <input type=range> sovrapposti sullo stesso track,
   pointer-events:none sull'input intero e riabilitato SOLO sul thumb, cosi'
   ognuno resta trascinabile indipendentemente (tecnica standard, no libreria). */
.nt-pmf-dualrange {
  position: relative;
  height: 30px;
  margin-top: 6px;
}
.nt-pmf-track {
  position: absolute;
  left: 8px; right: 8px; top: 50%;
  height: 7px;
  transform: translateY(-50%);
  /* Heat Range (2026-07-17c, scelta utente): scala a calore verde→ambra→rosso tenue come base. */
  background: linear-gradient(90deg, rgba(16,185,129,.22), rgba(245,158,11,.22) 55%, rgba(239,68,68,.22));
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.40);
}
.nt-pmf-fill {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  /* range selezionato: calore VIVIDO + glow ambra */
  background: linear-gradient(90deg, #34D399, var(--nt-goal) 60%, #FB923C);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(245,158,11,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.nt-pmf-input {
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%; height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
}
.nt-pmf-input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
  height: 28px;
}
.nt-pmf-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--nt-goal);
  box-shadow: 0 2px 6px rgba(0,0,0,.50);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.nt-pmf-input--min::-webkit-slider-thumb { border-color: var(--nt-up); }
.nt-pmf-input--max::-webkit-slider-thumb { border-color: var(--nt-down); }
.nt-pmf-input::-moz-range-track {
  background: transparent;
  height: 28px;
  border: none;
}
.nt-pmf-input::-moz-range-thumb {
  pointer-events: auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--nt-goal);
  box-shadow: 0 2px 6px rgba(0,0,0,.50);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.nt-pmf-input--min::-moz-range-thumb { border-color: var(--nt-up); }
.nt-pmf-input--max::-moz-range-thumb { border-color: var(--nt-down); }
.nt-pmf-input:disabled::-webkit-slider-thumb,
.nt-pmf-input:disabled::-moz-range-thumb { cursor: not-allowed; }
.nt-pmf-input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}
.nt-pmf-input:focus-visible::-moz-range-thumb {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}
/* Micro-interazione: la maniglia cresce e "s'illumina" (alone ambra) al passaggio/trascinamento. */
.nt-pmf-input:not(:disabled)::-webkit-slider-thumb:hover {
  transform: scale(1.22);
  box-shadow: 0 3px 10px rgba(0,0,0,.50), 0 0 0 6px rgba(245,158,11,.18);
}
.nt-pmf-input:not(:disabled):active::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 0 8px rgba(245,158,11,.22);
}
.nt-pmf-input:not(:disabled)::-moz-range-thumb:hover {
  transform: scale(1.22);
  box-shadow: 0 3px 10px rgba(0,0,0,.50), 0 0 0 6px rgba(245,158,11,.18);
}
.nt-pmf-input:not(:disabled):active::-moz-range-thumb {
  transform: scale(1.12);
  box-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 0 8px rgba(245,158,11,.22);
}
@media (prefers-reduced-motion: reduce) {
  .nt-pmf-input::-webkit-slider-thumb,
  .nt-pmf-input::-moz-range-thumb { transition: none; }
  .nt-pmf-input:not(:disabled)::-webkit-slider-thumb:hover,
  .nt-pmf-input:not(:disabled):active::-webkit-slider-thumb,
  .nt-pmf-input:not(:disabled)::-moz-range-thumb:hover,
  .nt-pmf-input:not(:disabled):active::-moz-range-thumb { transform: none; }
}

/* =====================================================================
   SECTION SUB-NAV (segmented control — G9)
   Raggruppa le pillole in un unico blocco contiguo come st.segmented_control
   ===================================================================== */
/* Redesign 2026-06-30 (import Claude Design "Match Dashboard", variante "Solid"):
   tab a BOTTONI pieni arrotondati — chip scuro inattivo, ATTIVO blu pieno (--nt-primary) con glow,
   icona + label, hover con lift, AI testo viola da inattivo. Vale per archivio/live/prematch. */
.nt-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
.nt-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid var(--nt-border-strong);
  border-radius: 12px;
  background: var(--nt-bg-card);
  color: var(--nt-text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.nt-section-pill::before {            /* icona (mask SVG, prende il colore del testo via currentColor) */
  content: "";
  width: 18px; height: 18px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
}
.nt-section-pill:hover {
  background: var(--nt-bg-elevated);
  border-color: var(--nt-border-focus);
  color: var(--nt-text-primary);
  transform: translateY(-1px);
}
.nt-section-pill.active {
  background: var(--nt-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px -8px rgba(59,130,246,0.80), inset 0 1px 0 rgba(255,255,255,0.28);
  transform: none;
}
.nt-section-pill.active:hover { background: var(--nt-primary); transform: none; }   /* l'attivo non si solleva */
/* AI = testo viola da INATTIVO (l'icona segue via currentColor); da ATTIVO resta blu pieno + bianco come gli altri */
.nt-section-pill[data-section="ai"], .nt-section-pill[data-live-section="ai"], .nt-section-pill[data-prematch-section="ai"] { color: #a78bfa; }
.nt-section-pill[data-section="ai"]:hover, .nt-section-pill[data-live-section="ai"]:hover, .nt-section-pill[data-prematch-section="ai"]:hover { color: #c4b5fd; }
.nt-section-pill[data-section="ai"].active, .nt-section-pill[data-live-section="ai"].active, .nt-section-pill[data-prematch-section="ai"].active { color: #fff; }
/* icone per sezione */
.nt-section-pill[data-section="dashboard"]::before, .nt-section-pill[data-live-section="dashboard"]::before, .nt-section-pill[data-prematch-section="dashboard"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><rect x='3' y='3' width='8' height='8' rx='1.6'/><rect x='13' y='3' width='8' height='8' rx='1.6'/><rect x='3' y='13' width='8' height='8' rx='1.6'/><rect x='13' y='13' width='8' height='8' rx='1.6'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><rect x='3' y='3' width='8' height='8' rx='1.6'/><rect x='13' y='3' width='8' height='8' rx='1.6'/><rect x='3' y='13' width='8' height='8' rx='1.6'/><rect x='13' y='13' width='8' height='8' rx='1.6'/></svg>"); }
.nt-section-pill[data-section="roi"]::before, .nt-section-pill[data-live-section="roi"]::before, .nt-section-pill[data-prematch-section="roi"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 15l5-5 4 4 7-7'/><path d='M17 6h4v4'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 15l5-5 4 4 7-7'/><path d='M17 6h4v4'/></svg>"); }
.nt-section-pill[data-section="stats"]::before, .nt-section-pill[data-live-section="stats"]::before, .nt-section-pill[data-prematch-section="stats"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><rect x='4' y='11' width='4' height='9' rx='1'/><rect x='10' y='5' width='4' height='15' rx='1'/><rect x='16' y='8' width='4' height='12' rx='1'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><rect x='4' y='11' width='4' height='9' rx='1'/><rect x='10' y='5' width='4' height='15' rx='1'/><rect x='16' y='8' width='4' height='12' rx='1'/></svg>"); }
.nt-section-pill[data-section="recent"]::before, .nt-section-pill[data-live-section="recent"]::before, .nt-section-pill[data-prematch-section="recent"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><polyline points='12 7.5 12 12 15.5 14'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><polyline points='12 7.5 12 12 15.5 14'/></svg>"); }
.nt-section-pill[data-section="ai"]::before, .nt-section-pill[data-live-section="ai"]::before, .nt-section-pill[data-prematch-section="ai"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M12 2.5l1.7 5 5 1.7-5 1.7-1.7 5-1.7-5-5-1.7 5-1.7z'/><circle cx='18.5' cy='17.5' r='1.7'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'><path d='M12 2.5l1.7 5 5 1.7-5 1.7-1.7 5-1.7-5-5-1.7 5-1.7z'/><circle cx='18.5' cy='17.5' r='1.7'/></svg>"); }
/* livestats: barre + linea momentum ascendente (stile grafico live). Mask monocroma -> segue currentColor come le altre. */
.nt-section-pill[data-section="livestats"]::before, .nt-section-pill[data-live-section="livestats"]::before, .nt-section-pill[data-prematch-section="livestats"]::before { -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='%23000'><rect x='3' y='13.5' width='3.3' height='7.5' rx='0.9'/><rect x='8.35' y='9.5' width='3.3' height='11.5' rx='0.9'/><rect x='13.7' y='15' width='3.3' height='6' rx='0.9'/><rect x='19.05' y='11' width='3.3' height='10' rx='0.9'/></g><polyline points='4.65 10.5 10 5.5 15.35 11.5 20.7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='%23000'><rect x='3' y='13.5' width='3.3' height='7.5' rx='0.9'/><rect x='8.35' y='9.5' width='3.3' height='11.5' rx='0.9'/><rect x='13.7' y='15' width='3.3' height='6' rx='0.9'/><rect x='19.05' y='11' width='3.3' height='10' rx='0.9'/></g><polyline points='4.65 10.5 10 5.5 15.35 11.5 20.7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }

/* =====================================================================
   SUBHEADER & CAPTION (G6) — replica st.subheader / st.caption
   ===================================================================== */
.nt-subheader {
  font-size: 20px;
  font-weight: 800;
  color: var(--nt-text-primary);
  margin: 18px 0 10px;
  letter-spacing: -.01em;
}
/* Sistema di titoli/etichette card (tokenizzazione 2026-06-16): scala coerente al posto
   degli <h4 style>/<span> inline scollegati nei builder. .nt-section-title = alias di subheader. */
.nt-section-title { font-size: 20px; font-weight: 800; color: var(--nt-text-primary); margin: 18px 0 10px; letter-spacing: -.01em; }
.nt-card-title { font-size: 15px; font-weight: 800; color: var(--nt-text-primary); margin: 0 0 8px; letter-spacing: -.01em; }
.nt-data-label { font-size: 11px; font-weight: 700; color: var(--nt-text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.nt-data-value { font-size: 15px; font-weight: 800; color: var(--nt-text-primary); }
.nt-caption {
  font-size: 12.5px;
  color: var(--nt-text-secondary);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* =====================================================================
   COLUMN GRIDS (G3) — replica st.columns([3,1]) / st.columns([2,1])
   ===================================================================== */
.nt-cols-3-1 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 16px;
  align-items: stretch;          /* colonne di pari altezza → anche i FONDI allineati */
  margin-bottom: 22px;           /* respiro dalla card sottostante (Analisi Mercati Goal) */
}
/* le due card riempiono l'altezza della riga (la più corta si estende) */
.nt-cols-3-1 > div { display: flex; min-width: 0; }
.nt-cols-3-1 > div > .edge-card,
.nt-cols-3-1 > div > .confidence-card { flex: 1 1 auto; }
.nt-cols-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .nt-cols-3-1, .nt-cols-2-1 { grid-template-columns: 1fr; }
}

/* =====================================================================
   MATCH HEADER AREA
   ===================================================================== */
.nt-match-header {
  margin-bottom: 16px;
}

/* =====================================================================
   SECTION CONTENT AREA
   ===================================================================== */
.nt-section-body {
  min-height: 200px;
}
.nt-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  color: var(--nt-text-secondary);
  font-size: 13px;
}
.nt-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(59,130,246,0.2);
  border-top-color: var(--nt-primary);
  border-radius: 50%;
  animation: nt-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes nt-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   LIVE GRID
   ===================================================================== */
.nt-live-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
/* Banner "nuovi segnali Telegram" della sezione Live Alert (2026-07-31, richiesta utente:
   "qualcosa che salta all'occhio quando arriva la notifica"). E' un <button>: cliccabile da
   tastiera, chiude il banner e porta al primo segnale nuovo. */
.nt-alert-newbanner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin: 0 0 12px; padding: 10px 14px;
  border: 1px solid var(--nt-success, #22c55e);
  border-radius: var(--nt-radius-sm, 8px);
  background: color-mix(in srgb, var(--nt-success, #22c55e) 12%, transparent);
  color: var(--nt-text-primary); font-size: 13px; font-weight: 700;
  text-align: left; cursor: pointer;
  animation: nt-alert-pop .35s ease-out;
}
.nt-alert-newbanner:hover { background: color-mix(in srgb, var(--nt-success, #22c55e) 20%, transparent); }
.nt-alert-newbanner .nt-alert-newdot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--nt-success, #22c55e);
  animation: nt-alert-pulse 1.6s ease-in-out infinite;
}
.nt-alert-newbanner .nt-alert-newhint { margin-left: auto; font-weight: 600; opacity: .75; }
/* Riga appena arrivata: resta evidenziata finche' la lista non si aggiorna di nuovo. */
.nt-live-alert-table tr.nt-alert-row--new > td {
  background: color-mix(in srgb, var(--nt-success, #22c55e) 14%, transparent);
  animation: nt-alert-flash 1.2s ease-out 2;
}
@keyframes nt-alert-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes nt-alert-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
/* Il flash anima SOLO lo sfondo. Con `filter: brightness()` sull'intera cella anche il badge del
   segnale veniva schiarito e per ~2s il testo era illeggibile (visto in uno screenshot E2E). */
@keyframes nt-alert-flash {
  0% { background-color: color-mix(in srgb, var(--nt-success, #22c55e) 40%, transparent); }
  100% { background-color: color-mix(in srgb, var(--nt-success, #22c55e) 14%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .nt-alert-newbanner, .nt-alert-newbanner .nt-alert-newdot,
  .nt-live-alert-table tr.nt-alert-row--new > td { animation: none; }
}

/* Voce di sidebar "Live Alert" con segnali non ancora visti (2026-07-31): PALLINO ROSSO di notifica
   sull'icona della campanella, come una notifica di sistema. Niente markup nuovo: solo ::after sulla
   voce gia' esistente, mostrato dalla classe .nt-nav-alerted e tolto quando apri la sezione. */
.nt-sidebar-nav-item.nt-nav-alerted .nt-nav-ico { position: relative; color: #ff8a8e; }
.nt-sidebar-nav-item.nt-nav-alerted .nt-nav-ico svg {
  transform-origin: 50% 15%;
  animation: nt-alert-bell-ring 1.8s ease-in-out infinite;
}

.nt-account-profile {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.nt-account-profile:hover .nt-account-name { color: var(--nt-primary); }
.nt-sidebar-nav-item.nt-nav-alerted .nt-nav-ico::after {
  content: "";
  position: absolute; top: -2px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--nt-danger, #ef4444);
  box-shadow: 0 0 0 2px rgba(4, 9, 17, 0.95);   /* anello = colore sidebar, stacca dall'icona */
}
@keyframes nt-alert-bell-ring {
  0%, 65%, 100% { transform: rotate(0); }
  72% { transform: rotate(12deg); }
  79% { transform: rotate(-10deg); }
  86% { transform: rotate(7deg); }
  93% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nt-sidebar-nav-item.nt-nav-alerted .nt-nav-ico svg { animation: none; }
}

/* Filtro per squadra della griglia Live (2026-07-31): riga propria sotto il pannello Filtri
   Predizioni, subito sopra la griglia che filtra. */
.nt-live-searchbar { margin: 0 0 12px; }
.nt-live-search { width: 260px; max-width: 100%; }
/* .nt-live-title rimosso — ereditato da /theme.css (22px, valori Streamlit) */
.nt-live-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--nt-danger);
  box-shadow: 0 0 0 4px rgba(255,107,107,0.18), 0 0 16px rgba(255,107,107,0.55);
  animation: nt-pulse-live 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes nt-pulse-live {
  0%,100% { opacity:1; }
  50%      { opacity:.6; }
}
/* Header sezioni Live/Pre-Match/Watchlist: niente pallino (override del ::before di /theme.css,
   styles.css carica dopo) + colore/animazione per scopo. */
.nt-title-live::before,
.nt-title-prematch::before,
.nt-title-watchlist::before { display: none; }
.nt-title-live      { color: var(--nt-danger); animation: nt-pulse-live 1.4s ease-in-out infinite; }  /* Live: rosso lampeggiante */
.nt-title-prematch  { color: #38bdf8; }                       /* Pre-Match: azzurro */
.nt-title-watchlist { color: #22c55e; }                       /* Watchlist: verde */
.nt-live-meta {
  font-size: 12px;
  color: var(--nt-text-secondary);
}
/* Live grid (shell/table/celle) RIMOSSO da qui — la griglia ora usa le classi
   Streamlit (nt-live-table-min/score/team/comp/action, nt-link-btn) definite in
   /theme.css, identiche allo Streamlit. Le vecchie classi custom (nt-score-cell,
   nt-team-cell, nt-comp-cell) e gli stili tabella locali non servono più. */
.nt-empty-live {
  padding: 40px 32px;
  text-align: center;
  color: var(--nt-text-secondary);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.nt-empty-live-title { font-size: 16px; font-weight: 800; color: var(--nt-text-primary); }

/* Sezione "Live Stats": le card (.nt-lvs-*) sono state sostituite da una TABELLA il 2026-07-25 su
   richiesta utente — riusa le classi .nt-live-table* della griglia Live, quindi qui non serve più
   CSS dedicato (blocco rimosso: era diventato orfano con il cambio di renderer). */
.nt-empty-live-text { max-width: 460px; line-height: 1.5; }
.nt-empty-live .nt-btn { margin-top: 4px; }

/* KPI-strip + auto-refresh + card-guida della schermata Live (riempie il vuoto a pochi match) */
.nt-live-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.nt-metric-value--text {
  font-size: 15px;
  font-weight: 700;
  color: var(--nt-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nt-live-autorefresh {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--nt-text-muted);
  margin: 0 2px 12px;
}
.nt-live-ar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nt-success);
  box-shadow: 0 0 0 3px var(--nt-success-bg);
  animation: nt-pulse-live 2s ease-in-out infinite;
  flex: none;
}
.nt-live-hint {
  margin-top: 16px;
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md);
  padding: 18px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.nt-live-hint-title { font-size: 14px; font-weight: 700; color: var(--nt-text-primary); }
.nt-live-hint-text { font-size: 13px; color: var(--nt-text-secondary); max-width: 480px; line-height: 1.5; }
.nt-live-hint .nt-btn { margin-top: 4px; }

/* Signal pills (sig-*) RIMOSSE — la griglia live usa ora nt-signal-lay/back/none di /theme.css */

/* =====================================================================
   ALERTS
   ===================================================================== */
.nt-alert-row {
  display: grid;
  grid-template-columns: 200px 1fr 80px 80px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31,51,72,0.4);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s;
}
.nt-alert-row:hover { background: rgba(59,130,246,0.04); }
.nt-alert-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nt-text-secondary);
  font-weight: 800;
  background: linear-gradient(180deg,rgba(14,29,51,0.95),rgba(11,22,38,0.85));
  border-bottom: 1px solid var(--nt-border-strong);
}
.nt-alert-shell {
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg,rgba(15,37,66,0.55),rgba(11,22,38,0.95));
}

/* =====================================================================
   PRODUCT HERO (estratto dal tema desktop)
   ===================================================================== */
/* PRODUCT HERO — stili ereditati interamente da /theme.css (build_app_css desktop),
   che definisce .product-hero / .product-logo-wrap / .product-title / .product-subtitle /
   .hero-visual-stats / .stat-bubble / .bubble-* con i valori AUTENTICI dello Streamlit
   (es. logo 126px, titolo 64px, padding 38px 44px). NON ridefinire qui: gli override
   precedenti rimpicciolivano l'hero e rompevano la parità. */

/* =====================================================================
   DASHBOARD CONTENT WRAPPERS (usati dai frammenti HTML del desktop)
   ===================================================================== */
.dashboard-table { width: 100%; margin-bottom: 14px; }
.table-shell {
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-md);
  overflow: hidden;
  box-shadow: var(--nt-shadow-sm);
}
.dashboard-stack { display: flex; flex-direction: column; gap: 14px; }
.section-gap-lg { height: 24px; }

/* =====================================================================
   ROI LEGEND
   ===================================================================== */
.roi-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
}
.roi-pos { color: var(--nt-success); }
.roi-neg { color: var(--nt-danger); }
.roi-neu { color: var(--nt-text-secondary); }

/* =====================================================================
   MOBILE SHELL CLASSES (compatibilità frammenti builder mobile)
   ===================================================================== */
.muted { color: var(--muted); font-size: 12px; line-height: 1.45; }
.card-sub { color: var(--muted); font-size: 12px; }
.summary-box {
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 8px;
  background: rgba(2,6,23,0.45);
  padding: 14px;
}
.summary-box h4 { margin: 0 0 10px; font-size: 14px; }
.m-stack { display: grid; gap: 12px; }
.m-card {
  border: 1px solid var(--line);
  background: rgba(2,6,23,0.42);
  border-radius: 10px;
  padding: 14px;
}
.m-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 10px;
}
.m-card-sub { font-size: 11px; color: var(--muted); font-weight: 600; }
.m-card-note { font-size: 11px; color: var(--muted); margin: -4px 0 8px; }
.m-empty {
  padding: 12px;
  border: 1px dashed rgba(148,163,184,0.2);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(2,6,23,0.3);
}
.m-metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 8px; }
.m-metric { display: grid; gap: 5px; min-width: 0; }
.m-metric-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.m-metric-label { font-size: 11px; color: var(--muted); }
.m-metric-val { font-size: 15px; font-weight: 800; color: #f8fafc; }
.m-bar { height: 5px; border-radius: 999px; background: rgba(148,163,184,0.14); overflow: hidden; }
.m-bar span { display: block; height: 100%; border-radius: 999px; }
.stat-group { margin-top: 12px; }
.stat-group:first-of-type { margin-top: 4px; }
.stat-group-title { font-size: 11px; font-weight: 800; color: #cbd5e1; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.roi-top-list { display: grid; gap: 8px; }
.roi-pick {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(15,23,42,0.55);
}
.roi-rank {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #04111e;
  background: linear-gradient(135deg,var(--accent),#38bdf8);
}
.roi-pick-body { min-width: 0; }
.roi-pick-strategy { font-size: 13px; font-weight: 800; color: #f8fafc; }
.roi-pick-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.roi-pick-figs { text-align: right; white-space: nowrap; }
.roi-pick-roi { font-size: 16px; font-weight: 900; line-height: 1.1; }
.roi-pick-roi.pos { color: #34d399; }
.roi-pick-exp { font-size: 10px; color: var(--muted); margin-top: 2px; }
.roi-matrix { display: grid; gap: 8px; }
.roi-matrix-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 8px; align-items: stretch; }
.roi-matrix-sel { font-size: 12px; font-weight: 700; color: #cbd5e1; align-self: center; }
.roi-chip { display: grid; gap: 2px; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; }
.roi-chip-label { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.roi-chip-roi { font-size: 13px; font-weight: 800; }
.roi-chip-win { font-size: 9px; color: var(--muted); }
.roi-chip.pos { background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.28); }
.roi-chip.pos .roi-chip-roi { color: #6ee7b7; }
.roi-chip.neg { background: rgba(251,113,133,0.10); border-color: rgba(251,113,133,0.26); }
.roi-chip.neg .roi-chip-roi { color: #fda4af; }
.roi-chip.na  { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.16); }
.roi-chip.na  .roi-chip-roi { color: var(--muted); }
.kv-list { display: grid; }
.kv-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(148,163,184,0.1); font-size: 13px; }
.kv-item:last-child { border-bottom: 0; }
.kv-k { color: var(--muted); }
.kv-v { color: #f1f5f9; font-weight: 700; text-align: right; }
.rec-table { display: grid; gap: 0; }
.rec-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 6px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(148,163,184,0.08); }
.rec-row:last-child { border-bottom: 0; }
.rec-head { border-bottom: 1px solid rgba(148,163,184,0.2); }
.rec-head .rec-cell { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.rec-metric { font-size: 11px; color: var(--muted); }
.rec-cell { font-size: 13px; font-weight: 700; color: #e2e8f0; text-align: center; }
.verdict-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--verdict-color,var(--accent));
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg,rgba(2,6,23,0.62),rgba(15,23,42,0.52));
  margin-bottom: 12px;
}
.verdict-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.verdict-strategy { font-size: 20px; font-weight: 900; color: #f8fafc; line-height: 1.15; margin-bottom: 6px; }
.verdict-band { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 10px; border-radius: 999px; margin-bottom: 6px; }
.verdict-metrics { font-size: 12px; color: #cbd5e1; margin-top: 6px; line-height: 1.5; }
/* Momentum / H2H / Minutaggio / Odds movement / Confidence / Edge / kpi-label:
   stili RIMOSSI da qui — ereditati interamente da /theme.css (build_app_css desktop),
   che li definisce con i valori AUTENTICI dello Streamlit (gradienti, ombre, glow,
   confidence-ring con alone, badge a pillola, heading 20px). Gli override "piatti"
   precedenti appiattivano la grafica e rompevano la parità con lo Streamlit. */
.tl-block { margin-top: 4px; }
.tl-team { font-size: 12px; font-weight: 800; color: #f1f5f9; margin: 10px 0 8px; }
.tl-side { font-size: 10px; color: var(--muted); font-weight: 600; }
.tl-row { padding: 7px 0; border-bottom: 1px solid rgba(148,163,184,0.08); }
.tl-row:last-child { border-bottom: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.tl-score { font-size: 11px; font-weight: 800; color: #04111e; padding: 2px 8px; border-radius: 6px; }
.tl-opp { font-size: 12px; color: #cbd5e1; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-date { font-size: 10px; color: var(--muted); white-space: nowrap; }
.tl-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg,rgba(15,23,42,0.9),rgba(30,41,59,0.9)); border: 1px solid rgba(148,163,184,0.12); }
.tl-dot { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%,-50%); border: 1.5px solid #0b1220; }
.note { color: #a8c1cc; }
/* .kpi-label e .edge-metric rimossi — ereditati da /theme.css (valori Streamlit) */
.live-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px; font-size: 11px; color: var(--muted); }
.live-legend span { display: inline-flex; align-items: center; gap: 6px; }
.live-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lg-steam { background: #34d399; }
.lg-drift { background: #fb7185; }
.lg-alert { background: var(--accent-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.pill.good { color: #bbf7d0; background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.28); }
.pill.warn { color: #fde68a; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.28); }
.pill.bad  { color: #fecdd3; background: rgba(251,113,133,0.12); border-color: rgba(251,113,133,0.28); }
.pill.hot  { color: #fed7aa; background: rgba(245,158,11,0.13); border-color: rgba(245,158,11,0.32); }
.live-dot  { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; animation: ntPulse 1.6s ease-in-out infinite; vertical-align: middle; }
@keyframes ntPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,113,133,0.55); } 50% { box-shadow: 0 0 0 5px rgba(251,113,133,0); } }

/* =====================================================================
   AI ADVISOR — controlli webapp (radio stile + bottone "Genera")
   (Le classi del CONTENUTO advisor-content/para/section-title arrivano da /theme.css)
   ===================================================================== */
.advisor-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}
.advisor-style-group { display: flex; gap: 16px; flex-wrap: wrap; }
.advisor-style-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nt-text-secondary);
  cursor: pointer;
}
.advisor-style-opt input[type=radio] { accent-color: var(--nt-primary); cursor: pointer; }
.advisor-info {
  margin: 12px 0 0;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--nt-text-secondary);
  line-height: 1.55;
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm);
}

/* =====================================================================
   TOAST NOTIFICATION
   ===================================================================== */
.nt-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--nt-bg-elevated);
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nt-text-primary);
  box-shadow: var(--nt-shadow-md);
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.nt-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================================
   FASE 2 — Controlli sidebar odds_mode / sample_min
   ===================================================================== */
.nt-filter-group--settings { align-items: flex-start; }
.nt-radio-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.nt-radio-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--nt-text-secondary);
  cursor: pointer;
}
.nt-radio-label input[type=radio] { accent-color: var(--nt-primary); cursor: pointer; }
.nt-range {
  -webkit-appearance: none;
  width: 120px; height: 4px;
  background: var(--nt-bg-elevated);
  border-radius: 2px;
  outline: none;
  margin-top: 6px;
}
.nt-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--nt-primary);
  cursor: pointer;
}
.nt-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--nt-primary); cursor: pointer; border: none;
}

/* Live controls row (kept for compatibility — controls now in sidebar) */
.nt-live-controls { display: none; }

/* =====================================================================
   FASE 2 — Alerts filters + admin
   ===================================================================== */
.nt-alerts-filters { margin-bottom: 10px; }
.nt-checkbox-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--nt-text-secondary);
  cursor: pointer; white-space: nowrap;
}
.nt-checkbox-label input[type=checkbox] { accent-color: var(--nt-primary); cursor: pointer; }

/* Alert table + signal pills + nt-badge: stili RIMOSSI da qui — la tabella alert
   (_render_alerts_table) e i suoi badge/pillole sono già definiti in /theme.css con i
   valori AUTENTICI dello Streamlit (table-layout fixed, colonne %, pillole nt-signal-*
   con gradienti, nt-badge a pillola uppercase). Gli override "piatti" rompevano la parità.
   Le sole varianti webapp-only (nt-badge--ok/--off per le card utenti admin) restano sotto. */

/* =====================================================================
   FASE 2 — Master Console
   ===================================================================== */
.nt-console-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--nt-border);
  margin-bottom: 18px;
}
.nt-console-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; padding: 8px 20px;
  font-size: 13px; font-weight: 700; color: var(--nt-text-secondary);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.nt-console-tab:hover { color: var(--nt-text-primary); }
.nt-console-tab.active { color: var(--nt-primary); border-bottom-color: var(--nt-primary); }

.nt-console-panel { display: none; }
.nt-console-panel.active { display: block; }

/* Divider */
.nt-divider { border: none; border-top: 1px solid var(--nt-border); margin: 18px 0; }

/* Input + select base */
.nt-input, .nt-select {
  background: var(--nt-bg-input); border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-sm); color: var(--nt-text-primary);
  font-size: 13px; padding: 6px 10px; outline: none;
  transition: border-color .15s;
}
.nt-input:focus, .nt-select:focus { border-color: var(--nt-border-focus); }

.nt-form-error { color: var(--nt-danger); font-size: 12px; font-weight: 700; margin: 6px 0; min-height: 18px; }

/* Bottoni varianti aggiuntive */
.nt-btn-primary { background: var(--nt-primary); color: #fff; }
.nt-btn-primary:hover { background: var(--nt-primary-dark); }
.nt-btn-success { background: rgba(34,197,94,0.18); color: #4ade80; border-color: rgba(34,197,94,0.35); }
.nt-btn-warning { background: rgba(250,204,21,0.12); color: var(--nt-accent); border-color: rgba(250,204,21,0.30); }
/* Bottone "ghost" neutro (redesign Match Detail 2026-06-30): riconcilia i due bottoni in alto del
   detail (Torna alla lista + Watchlist) a uno stile coerente; .is-watched = accento oro (in watchlist). */
.nt-btn-ghost { background: transparent; border: 1px solid var(--nt-border-strong); color: var(--nt-text-secondary); }
.nt-btn-ghost:hover { background: var(--nt-bg-surface); border-color: var(--nt-border-focus); color: var(--nt-text-primary); }
.nt-btn-ghost.is-watched { border-color: rgba(250,204,21,0.5); color: var(--nt-accent); }
.nt-btn-ghost.is-watched:hover { border-color: rgba(250,204,21,0.75); color: var(--nt-accent); }
/* Action-bar del detail: back a sinistra, Watchlist (★ oro) a destra (redesign Match Detail 2026-06-30) */
.nt-detail-actionbar { display: flex; align-items: center; gap: 12px; }
.nt-detail-actionbar-right { margin-left: auto; display: inline-flex; align-items: center; }
.nt-watch-star { color: var(--nt-accent); font-size: 15px; line-height: 1; }   /* stella oro sempre visibile */

/* Form rows */
.nt-form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.nt-form-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.nt-form-group label { font-size: 11px; font-weight: 700; color: var(--nt-text-secondary); text-transform: uppercase; letter-spacing: .04em; }

/* User cards */
.nt-user-card {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); margin-bottom: 8px; overflow: hidden;
}
.nt-user-card-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; transition: background .15s;
}
.nt-user-card-header:hover { background: var(--nt-bg-surface); }
.nt-user-card-name { font-weight: 800; font-size: 14px; flex: 1; }
.nt-user-card-role { font-size: 11px; color: var(--nt-text-secondary); background: var(--nt-bg-elevated); padding: 2px 7px; border-radius: 4px; }
.nt-user-card-meta { font-size: 11px; color: var(--nt-text-muted); margin-left: auto; }
.nt-user-card-expand { font-size: 11px; color: var(--nt-text-muted); }
.nt-user-card-body { padding: 12px 14px; border-top: 1px solid var(--nt-border); }
.nt-user-card-info { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; color: var(--nt-text-secondary); margin-bottom: 12px; }
.nt-user-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.nt-user-card-subform { margin-top: 8px; }

/* Badge stati */
.nt-badge--ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.nt-badge--off { background: rgba(100,116,139,0.20); color: var(--nt-text-muted); }

/* Subform inline */
.nt-subform { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px; background: var(--nt-bg-surface); border-radius: var(--nt-radius-sm); border: 1px solid var(--nt-border); }
.nt-subform label { font-size: 11px; font-weight: 700; color: var(--nt-text-secondary); }
.nt-subform--danger { border-color: rgba(239,68,68,0.4); }
.nt-subform p { width: 100%; margin: 0 0 6px; font-size: 12px; }

/* Admin table */
.nt-admin-table-wrap { overflow-x: auto; }
.nt-admin-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.nt-admin-table th {
  text-align: left; padding: 7px 10px;
  background: var(--nt-bg-elevated); color: var(--nt-text-secondary);
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--nt-border);
}
.nt-admin-table td {
  padding: 6px 10px; color: var(--nt-text-primary); border-bottom: 1px solid var(--nt-border-subtle);
  word-break: break-word; max-width: 260px;
}
.nt-admin-table tr:last-child td { border-bottom: none; }
.nt-admin-table tr:hover td { background: rgba(59,130,246,0.04); }

/* Metriche ops */
.nt-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 12px; }
.nt-metric-card {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 14px 20px; min-width: 120px;
}
.nt-metric-value { font-size: 26px; font-weight: 800; color: var(--nt-primary-light); line-height: 1; }
.nt-metric-label { font-size: 11px; color: var(--nt-text-secondary); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Create user form */
.nt-create-user-form { background: var(--nt-bg-card); border: 1px solid var(--nt-border); border-radius: var(--nt-radius-md); padding: 18px; }

/* =====================================================================
   ADVISOR SECTION — classi webapp per output del mock advisor
   (advisor-shell/header/chip/chip-row/disclaimer già in /theme.css)
   ===================================================================== */
.advisor-section-title {
  color: #F8FAFC;
  font-size: 14px;
  font-weight: 800;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.advisor-section-title:first-child { margin-top: 0; }
.advisor-list {
  margin: 0 0 10px 16px;
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.6;
}
.advisor-list li { margin-bottom: 4px; }
.advisor-para {
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 8px;
}

/* =====================================================================
   NTP2 EXTERNAL HEADING (profile visual table section headings)
   ===================================================================== */
.ntp2-external-heading {
  font-size: 13px;
  font-weight: 800;
  color: var(--nt-text-secondary);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 20px 0 8px;
}
.ntp2-external-heading:first-child { margin-top: 0; }

/* =====================================================================
   TEMA CHIARO "DAYLIGHT TERMINAL" — tema VERO progettato (2026-06-17).
   Sostituisce il vecchio trucco `filter: invert(1) hue-rotate(180deg)`, che dava un
   risultato slavato/piatto (inversione matematica del dark, niente bianco vero, ombre
   annullate, accenti desaturati). Ora il chiaro è un tema disegnato: superfici bianche
   crisp, ombre morbide REALI (profondità), accenti decisi, contrasti AA.

   COME FUNZIONA (additivo, dark intatto):
   - Le custom property --nt-* sono GLOBALI al documento: ridefinendole qui sotto
     html[data-theme="light"] (specificità 0,1,1 > :root 0,1,0) ribaltano TUTTE le regole
     tokenizzate, anche quelle servite da /theme.css (build_base_css). → ~70% gratis.
   - Per le superfici NON tokenizzate (hardcode locali di styles.css + i selettori di
     build_app_css che vincono la cascata) ci sono override espliciti qui sotto: il prefisso
     html[data-theme="light"] aggiunge (0,1,1) di specificità → batte sempre app_css/theme.py
     SENZA toccarli (dark byte-identico garantito).
   - Le isole inline residue dei builder (barre #0F172A ecc.) sono risolte alla fonte in
     Python (tokenizzazione) — vedi memoria webapp-theme-toggle.
   Senza l'attributo data-theme="light" NIENTE di tutto questo si applica → dark = default.
   ===================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  filter: none; -webkit-filter: none;
  /* --- superfici (chiaro stratificato, freddo) --- */
  --nt-bg-deep:         #E4E9F2;
  --nt-bg-dark:         #EAEEF6;
  --nt-bg-card:         #FFFFFF;
  --nt-bg-surface:      #F5F8FC;
  --nt-bg-elevated:     #FFFFFF;
  --nt-bg-input:        #FFFFFF;
  --nt-bg-sidebar:      #FFFFFF;
  /* --- bordi (hairline freddi) --- */
  --nt-border:          rgba(15,23,42,0.10);
  --nt-border-strong:   #D5DDEA;
  --nt-border-subtle:   rgba(15,23,42,0.06);
  --nt-border-focus:    rgba(37,99,235,0.45);
  /* --- testo (slate ink su bianco, AA/AAA) --- */
  --nt-text-primary:    #0F172A;
  --nt-text-bright:     #1E293B;
  --nt-text-secondary:  #475569;
  --nt-text-muted:      #64748B;
  --nt-text-faint:      #6B7280;
  --nt-text-soft:       #475569;
  --nt-bg-track:        #E2E8F0;
  --nt-bg-glass:        #FFFFFF;
  --nt-bg-glass-2:      #F5F8FC;
  /* --- accenti (tarati per contrasto su bianco) --- */
  --nt-primary:         #2563EB;
  --nt-primary-dark:    #1D4ED8;
  --nt-primary-light:   #3B82F6;
  --nt-primary-glow:    rgba(37,99,235,0.14);
  --nt-primary-glow-soft: rgba(37,99,235,0.06);
  --nt-cyan:            #0EA5E9;
  --nt-cyan-glow:       rgba(14,165,233,0.16);
  --nt-violet:          #7C3AED;
  --nt-accent:          #CA8A04;
  --nt-info:            #2563EB;
  /* --- semantici dato/mercato (vividi ma AA) --- */
  --nt-success:         #16A34A;
  --nt-success-bg:      rgba(22,163,74,0.10);
  --nt-success-glow:    rgba(22,163,74,0.18);
  --nt-danger:          #DC2626;
  --nt-danger-bg:       rgba(220,38,38,0.08);
  --nt-danger-glow:     rgba(220,38,38,0.18);
  --nt-warning:         #CA8A04;
  --nt-warning-bg:      rgba(202,138,4,0.13);
  --nt-up:              #059669;
  --nt-down:            #DC2626;
  --nt-goal:            #D97706;
  /* --- ombre morbide REALI (slate-tinted) --- */
  --nt-shadow-xs:       0 1px 2px rgba(15,23,42,.06);
  --nt-shadow-sm:       0 1px 3px rgba(15,23,42,.10),0 1px 2px rgba(15,23,42,.06);
  --nt-shadow-md:       0 6px 18px rgba(15,23,42,.10),0 2px 6px rgba(15,23,42,.06);
  --nt-shadow-lg:       0 18px 48px rgba(15,23,42,.14),0 6px 14px rgba(15,23,42,.08);
  --nt-shadow-glow:     0 0 0 1px rgba(37,99,235,0.18),0 12px 32px rgba(37,99,235,0.14);
  /* --- alias mobile-shell (frammenti builder) --- */
  --bg:     #EAEEF6;
  --bg-2:   #FFFFFF;
  --panel:  #FFFFFF;
  --line:   rgba(15,23,42,0.10);
  --text:   #1E293B;
  --muted:  #64748B;
  --accent: #0E9F8E;
  --accent-2: #D97706;
  --danger: #DC2626;
  --good:   #059669;
  --shadow: 0 18px 48px rgba(15,23,42,0.14);
}

/* ---- canvas / base ---- */
html[data-theme="light"] body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(37,99,235,0.06) 0%, rgba(37,99,235,0) 55%),
    radial-gradient(900px 540px at 88% 0%, rgba(14,165,233,0.05) 0%, rgba(14,165,233,0) 60%),
    var(--nt-bg-dark);
}
html[data-theme="light"] * { scrollbar-color: #C3CDDC var(--nt-bg-deep); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#CBD5E4,#AEBBCE); }
html[data-theme="light"] ::selection { background: rgba(37,99,235,0.18); color: var(--nt-text-primary); }
/* via TUTTI i text-shadow in chiaro: sono glow/ombre pensati per il dark (es. wordmark hero
   `0 18px 28px rgba(0,0,0,.55)`, `.kpi-value` `0 2px 4px rgba(0,0,0,.5)`, edge-metric…) che su
   bianco diventano un alone fangoso dietro il testo. Il tema chiaro vuole testo crisp/piatto.
   NB: tocca SOLO text-shadow, NON box-shadow → la profondità delle card resta. (richiesta utente) */
html[data-theme="light"] * { text-shadow: none !important; }

/* ---- brand wordmark (gradienti ri-tarati per il bianco) ---- */
html[data-theme="light"] .nt-brand-now,
html[data-theme="light"] .nt-login-wordmark-now { color: #0F172A; }
html[data-theme="light"] .nt-brand-trade,
html[data-theme="light"] .nt-login-wordmark-trade,
html[data-theme="light"] .product-title,
html[data-theme="light"] .product-title-trade {
  background: linear-gradient(135deg,#2F7D18,#3E9E22,#4CAF2F);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
html[data-theme="light"] .product-title-now { color: #0F172A; -webkit-text-fill-color: #0F172A; }
html[data-theme="light"] .nt-sidebar-brand-sub,
html[data-theme="light"] .nt-login-kicker,
html[data-theme="light"] .product-subtitle,
html[data-theme="light"] .kpi-sub { color: #2563EB; }

/* ---- sidebar ---- */
html[data-theme="light"] .nt-sidebar {
  background: #FFFFFF;
  border-right: 1px solid rgba(15,23,42,0.08);
  box-shadow: 1px 0 0 rgba(15,23,42,0.02), 10px 0 34px rgba(15,23,42,0.05);
}
/* nav redesign 2026-06-30: pannelli bianchi neutri + attivo VERDE (coerente col dark/design) */
html[data-theme="light"] .nt-sidebar-nav-item { color: #334155; background: #ffffff; border-color: #d7e0ee; }
html[data-theme="light"] .nt-sidebar-nav-item:hover { background: #eef3fb; border-color: #b9c8e0; color: #1e293b; }
html[data-theme="light"] .nt-sidebar-nav-item.active {
  background: linear-gradient(180deg, rgba(16,185,129,0.16), rgba(16,185,129,0.08));
  color: #065f46; border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.14);
}
html[data-theme="light"] .nt-sidebar-nav-item.active::before { background: #10B981; }
html[data-theme="light"] .nt-sidebar-nav-item.active .nt-nav-ico { color: #059669; }
html[data-theme="light"] .nt-sidebar-nav-item.active .nt-nav-label,
html[data-theme="light"] .nt-sidebar-nav-item .nt-nav-label { color: inherit; }

/* ---- login (prima schermata: dev'essere impeccabile) ---- */
html[data-theme="light"] #login-screen {
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(37,99,235,0.10) 0%, rgba(37,99,235,0) 55%),
    radial-gradient(900px 600px at 85% 110%, rgba(14,165,233,0.10) 0%, rgba(14,165,233,0) 60%),
    #EAEEF6;
}
html[data-theme="light"] .nt-login-card {
  background: #FFFFFF;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 24px 64px rgba(15,23,42,.14);
}
html[data-theme="light"] .nt-login-card-title { color: #0F172A; }
html[data-theme="light"] .nt-login-card-sub { color: #2563EB; }
html[data-theme="light"] .nt-login-copy,
html[data-theme="light"] .nt-login-label,
html[data-theme="light"] .nt-login-eye { color: #475569; }
html[data-theme="light"] .nt-login-input {
  background: #FFFFFF; border: 1px solid #D5DDEA; color: #0F172A;
}
html[data-theme="light"] .nt-login-input::placeholder { color: #94A3B8; }
html[data-theme="light"] .nt-login-input:hover { background: #FFFFFF; border-color: #B9C5D8; }
html[data-theme="light"] .nt-login-input:focus { background: #FFFFFF; border-color: var(--nt-primary); }
html[data-theme="light"] .nt-login-submit {
  background: linear-gradient(135deg,#1D4ED8,#2563EB,#0EA5E9); color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.30);
}
html[data-theme="light"] .nt-login-error { color: #B42318; background: rgba(220,38,38,0.08); }

/* ---- input / select generici ---- */
html[data-theme="light"] .nt-input,
html[data-theme="light"] .nt-select,
html[data-theme="light"] .nt-sidebar-select,
html[data-theme="light"] .nt-filter-group select {
  background: #FFFFFF; border-color: #D5DDEA; color: #0F172A;
}
html[data-theme="light"] .nt-input::placeholder { color: #94A3B8; }

/* ---- card app_css (vincono la cascata: le batto per specificità, app_css intatto) ---- */
html[data-theme="light"] .product-hero {
  background: linear-gradient(135deg,#FFFFFF 0%,#F2F7FF 55%,#FFFFFF 100%);
  border: 1px solid rgba(37,99,235,0.14);
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 16px 40px rgba(37,99,235,.10);
}
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .edge-card,
html[data-theme="light"] .confidence-card,
html[data-theme="light"] .h2h-panel,
html[data-theme="light"] .momentum-card,
html[data-theme="light"] .odds-move-card,
html[data-theme="light"] .minutaggio-chart,
html[data-theme="light"] .radar-shell,
html[data-theme="light"] .stat-bubble,
html[data-theme="light"] .match-switcher,
html[data-theme="light"] .nt-live-table-shell,
html[data-theme="light"] .advisor-output,
html[data-theme="light"] .advisor-shell,
html[data-theme="light"] .dashboard-table .table-shell {
  background: #FFFFFF;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 1px 3px rgba(15,23,42,.07), 0 10px 28px rgba(15,23,42,.06);
}
/* Header "Momentum" cliccabile griglia Live (2026-07-23, richiesta utente: ordina per rating
   più alto in cima). Affordance minima: hover + stato attivo (freccia già nel testo via JS). */
.nt-live-th-sortable:hover { text-decoration: underline; text-decoration-style: dotted; }
.nt-live-th-sort-active { color: var(--nt-primary, #2563eb) !important; }

/* Header griglia LIVE: in chiaro lo sfondo navy hardcoded (theme.py .nt-live-table thead th)
   restava scuro → barra illeggibile/orribile sul layout chiaro. Override: header chiaro + testo
   slate ben leggibile (coerente con le altre data-table chiare). Il tema scuro resta invariato.
   (2026-06-19, richiesta utente) */
html[data-theme="light"] .nt-live-table thead th {
  background: linear-gradient(180deg, #EEF2F8, #E2E8F0);
  color: #334155;
  border-bottom-color: #CBD5E1;
}
html[data-theme="light"] .nt-live-table tbody td { border-bottom-color: rgba(15,23,42,0.07); }
html[data-theme="light"] .nt-live-table tbody tr:hover { background: rgba(37,99,235,0.05); }
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .kpi-value--xl,
html[data-theme="light"] .bubble-value,
html[data-theme="light"] .odds-move-val,
html[data-theme="light"] .confidence-ring,
html[data-theme="light"] .h2h-result,
html[data-theme="light"] .bar-pct { color: #0F172A; }
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .bubble-label,
html[data-theme="light"] .section-caption,
html[data-theme="light"] .edge-metric,
html[data-theme="light"] .confidence-msg,
html[data-theme="light"] .bar-label,
html[data-theme="light"] .odds-move-label,
html[data-theme="light"] .radar-sample,
html[data-theme="light"] .advisor-subtitle,
html[data-theme="light"] .advisor-disclaimer { color: #64748B; }
html[data-theme="light"] .h2h-row,
html[data-theme="light"] .radar-row,
html[data-theme="light"] .advisor-para,
html[data-theme="light"] .advisor-list { color: #334155; }
html[data-theme="light"] .advisor-title,
html[data-theme="light"] .advisor-section-title { color: #1D4ED8; }
html[data-theme="light"] .advisor-chip { color: #334155; background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.10); }
html[data-theme="light"] .badge { background: rgba(37,99,235,0.10); color: #1D4ED8; }
html[data-theme="light"] .badge strong { color: #1D4ED8; }
html[data-theme="light"] .odds-move-bar { background: #E2E8F0; }
/* tabelle ROI/dati */
html[data-theme="light"] .dashboard-table th { background: #F1F5F9; color: #475569; }
html[data-theme="light"] .dashboard-table td { color: #1E293B; }
html[data-theme="light"] .dashboard-table td:first-child { background: #F8FAFC; }
html[data-theme="light"] .dashboard-table .note { color: #64748B; }
/* colonna STICKY delle tabelle (app_css): bg dark rgba(17,24,39,0.95) → la prima cella restava
   NERA in chiaro. Schiarisco + bordo definito. (Selettore .roi-table nth-child(2) rimosso
   2026-06-18: la tabella Strategies non usa più .roi-table — redesign .nt-strat-*.) */
html[data-theme="light"] .dashboard-table table td:first-child {
  background: #F8FAFC !important;
  border-right-color: rgba(15,23,42,0.08) !important;
}
/* titolo card edge ("TOP STRATEGY"): .edge-card h4 = #F3F4F6 (app_css) → invisibile su bianco */
html[data-theme="light"] .edge-card h4 { color: #0F172A; }

/* ---- tab di sezione (Dashboard/ROI/Stats/Recent/AI): renderli BOTTONI ben visibili in chiaro.
   Prima: i tab inattivi erano testo TRASPARENTE sul container bianco (sembravano semplice testo,
   non bottoni) + hover bianco-su-bianco invisibile. Ora: segmented control = track grigio +
   chip bianchi "rialzati" per gli inattivi (con bordo+ombra → leggibili come bottoni distinti);
   l'attivo resta il bottone BLU. `:not(.active)` per non toccare l'attivo. (richiesta utente) ---- */
/* tab redesign 2026-06-30: BOTTONI pieni anche in tema chiaro (chip bianchi, attivo blu pieno) */
html[data-theme="light"] .nt-section-nav { background: transparent; border: none; gap: 10px; padding: 0; }
html[data-theme="light"] .nt-section-pill {
  background: #ffffff; border: 1px solid #D5DDEA; color: #475569; box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
html[data-theme="light"] .nt-section-pill:hover { background: #eef3fb; border-color: #b9c8e0; color: #0F172A; }
html[data-theme="light"] .nt-section-pill.active {
  background: var(--nt-primary); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(37,99,235,0.5), inset 0 1px 0 rgba(255,255,255,0.30);
}
html[data-theme="light"] .nt-section-pill[data-section="ai"], html[data-theme="light"] .nt-section-pill[data-live-section="ai"], html[data-theme="light"] .nt-section-pill[data-prematch-section="ai"] { color: #7c3aed; }
html[data-theme="light"] .nt-section-pill[data-section="ai"]:hover, html[data-theme="light"] .nt-section-pill[data-live-section="ai"]:hover, html[data-theme="light"] .nt-section-pill[data-prematch-section="ai"]:hover { color: #6d28d9; }
html[data-theme="light"] .nt-section-pill[data-section="ai"].active, html[data-theme="light"] .nt-section-pill[data-live-section="ai"].active, html[data-theme="light"] .nt-section-pill[data-prematch-section="ai"].active { color: #fff; }

/* ---- mobile-shell (frammenti builder: summary/roi/verdict/timeline) ---- */
html[data-theme="light"] .summary-box,
html[data-theme="light"] .m-card,
html[data-theme="light"] .m-empty,
html[data-theme="light"] .verdict-card,
html[data-theme="light"] .tl-track {
  background: #FFFFFF;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 10px 26px rgba(15,23,42,.06);
}
html[data-theme="light"] .m-card-title,
html[data-theme="light"] .roi-pick-strategy,
html[data-theme="light"] .kv-v,
html[data-theme="light"] .verdict-strategy,
html[data-theme="light"] .tl-score { color: #0F172A; }
html[data-theme="light"] .kv-k,
html[data-theme="light"] .roi-pick-label,
html[data-theme="light"] .note { color: #64748B; }
html[data-theme="light"] .tl-dot { border-color: #FFFFFF; }

/* ---- tabelle stat dense .ntp2-* (theme.py, class-reachable) ----
   Track delle barre schiariti, ma i RIEMPIMENTI .ntp2-bar-fill restano verde/giallo/rosso
   (colore inline per soglia, come nel dark — richiesta utente). Anche le celle evidenziate
   verdi/gialle/rosse sono inline → invariate. */
html[data-theme="light"] .ntp2-tabs { background: linear-gradient(180deg,#F1F5F9,#F8FAFC); border-color: #D5DDEA; }
html[data-theme="light"] .ntp2-tab-label:hover,
html[data-theme="light"] .stats-subtab-btn:hover { background: linear-gradient(180deg,#E8F3FC,#F1F5F9); color: #0369A1; border-color: rgba(14,165,233,0.45); }
html[data-theme="light"] .ntp2-table { border-color: #D5DDEA; }
html[data-theme="light"] .ntp2-head { background: linear-gradient(180deg,#EEF2F8,#F1F5F9); border-bottom-color: #D5DDEA; }
html[data-theme="light"] .ntp2-head > div { color: #475569; border-left-color: rgba(15,23,42,0.06); }
html[data-theme="light"] .ntp2-row { background: #FFFFFF; border-top-color: rgba(15,23,42,0.06); }
html[data-theme="light"] .ntp2-row:nth-of-type(even) { background: #F8FAFC; }
html[data-theme="light"] .ntp2-row > div { border-left-color: rgba(15,23,42,0.06); }
html[data-theme="light"] .ntp2-col-count,
html[data-theme="light"] .ntp2-cell-val { color: #0F172A; }
html[data-theme="light"] .ntp2-pane-title,
html[data-theme="light"] .ntp2-active-name { color: #2563EB; }
html[data-theme="light"] .ntp2-bar { background: #E2E8F0; box-shadow: inset 0 1px 2px rgba(15,23,42,0.10); }
/* il fill ha `box-shadow:0 0 6px currentColor` (= colore TESTO): in dark è chiaro (alone tenue),
   in light sarebbe SCURO → alone fangoso attorno alla barra colorata su bianco. Lo tolgo →
   barre pulite/vivide come nel dark (la barra resta lo stesso colore inline verde/giallo/rosso). */
html[data-theme="light"] .ntp2-bar-fill { box-shadow: none; }
/* Badge scope (LEAGUE/SIMILAR/HOME/AWAY): il testo è una TINTA CHIARA inline (#93C5FD/#C4B5FD/
   #6EE7B7/#FCA5A5…) pensata per il chip scuro del dark → su chip pallido in chiaro è illeggibile.
   In light forzo testo near-black che risalta + bordo definito (lo SFONDO colorato resta a
   codificare lo scope). Dark invariato (override scopato a [data-theme=light]). */
html[data-theme="light"] .ntp2-badge,
html[data-theme="light"] .ntp-badge {
  color: #0F172A !important;
  border-color: rgba(15,23,42,0.22) !important;
}
html[data-theme="light"] .ntp2-state-chip { background: #F5F8FC; border-color: rgba(15,23,42,0.10); }
html[data-theme="light"] .ntp2-chip-label,
html[data-theme="light"] .ntp2-band b { color: #334155; }
html[data-theme="light"] .ntp2-best-signal { background: rgba(14,165,233,0.10); color: #0369A1; border-color: rgba(14,165,233,0.35); }
html[data-theme="light"] .ntp2-drawer { background: #F8FAFC; border-top-color: rgba(15,23,42,0.08); }
html[data-theme="light"] .ntp2-detail-group { background: #FFFFFF; }

/* =====================================================================
   LIVE STATS (TheStatsAPI) — classi .lvs-* SOLO token-based (dark/light
   automatici by construction, nessun override tema separato serve).
   ===================================================================== */
.nt-title-livestats::before { display: none; }
.nt-title-livestats { color: var(--nt-cyan); }

/* Griglia card responsive (auto-fill) */
.lvs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.lvs-card {
  background: var(--nt-bg-card);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md);
  padding: 14px 16px;
  min-width: 0;
}
.lvs-card--clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.lvs-card--clickable:hover { border-color: var(--nt-border-focus); background: var(--nt-bg-surface); }
.lvs-card-comp {
  font-size: 11px; color: var(--nt-text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  overflow-wrap: anywhere; margin-bottom: 8px;
}
.lvs-card-teams {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.lvs-card-team {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 700; color: var(--nt-text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lvs-card-teams .lvs-card-team:last-child { text-align: right; }
.lvs-card-score {
  flex: none; font-size: 14px; font-weight: 800; color: var(--nt-text-bright);
  padding: 0 4px;
}
.lvs-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lvs-card-timer { font-size: 12px; color: var(--nt-text-secondary); }
.lvs-card-extra-stats {
  margin-top: 4px; font-size: 11px; color: var(--nt-text-faint);
}
.lvs-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--nt-radius-pill); flex: none;
}
.lvs-badge--ok { background: var(--nt-success-bg); color: var(--nt-success); }
.lvs-badge--off { background: rgba(100,116,139,0.16); color: var(--nt-text-faint); }
.lvs-card-notice {
  margin-top: 10px; padding: 8px 10px;
  font-size: 12px; line-height: 1.35; color: var(--nt-text-secondary);
  background: rgba(100,116,139,0.10); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-sm);
}

/* Detail: header squadre/punteggio/badge stato */
.lvs-detail-header {
  display: flex; align-items: center; gap: 12px;
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 16px; margin-bottom: 16px;
}
.lvs-detail-team { flex: 1; min-width: 0; text-align: center; }
.lvs-team-name {
  display: block; font-size: 15px; font-weight: 800; color: var(--nt-text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lvs-detail-center { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lvs-detail-score { font-size: 24px; font-weight: 800; color: var(--nt-text-bright); line-height: 1; }
.lvs-badge-status {
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--nt-radius-pill);
}
.lvs-badge-status--final { background: rgba(100,116,139,0.18); color: var(--nt-text-secondary); }

/* xG: due numeri grandi + barra comparata */
.lvs-xg-block {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 14px 16px; margin-bottom: 16px;
}
.lvs-xg-numbers {
  display: flex; align-items: baseline; justify-content: center; gap: 14px;
  margin-bottom: 10px;
}
.lvs-xg-num { font-size: 28px; font-weight: 800; color: var(--nt-goal); line-height: 1; }
.lvs-xg-title {
  font-size: 11px; font-weight: 800; color: var(--nt-text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Barra comparata (riusata da xG e dalle statistiche) */
.lvs-bar-track {
  display: flex; width: 100%; height: 8px;
  border-radius: var(--nt-radius-pill); overflow: hidden;
  background: var(--nt-bg-track);
}
.lvs-bar-fill--home { background: var(--nt-primary); }
.lvs-bar-fill--away { background: var(--nt-down); }

.lvs-stats-block {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 14px 16px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.lvs-bar-row { min-width: 0; }
.lvs-bar-values {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 5px; font-size: 12px;
}
.lvs-bar-value { flex: none; font-weight: 800; color: var(--nt-text-primary); }
.lvs-bar-label {
  flex: 1; min-width: 0; text-align: center; color: var(--nt-text-secondary);
  overflow-wrap: anywhere;
}

.lvs-section-title {
  font-size: 12px; font-weight: 800; color: var(--nt-text-secondary);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 4px 0 10px;
}

/* Timeline verticale */
.lvs-timeline {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 16px;
}
.lvs-tl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--nt-border-subtle);
  font-size: 13px;
}
.lvs-tl-item:last-child { border-bottom: none; }
.lvs-tl-minute {
  flex: none; width: 34px; text-align: right;
  color: var(--nt-text-muted); font-weight: 700; font-variant-numeric: tabular-nums;
}
.lvs-tl-icon { flex: none; line-height: 1.3; }
.lvs-tl-text {
  flex: 1; min-width: 0; color: var(--nt-text-primary);
  overflow-wrap: anywhere; line-height: 1.4;
}

/* Shotmap SVG inline (solo match finiti) */
.lvs-shotmap-wrap {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 12px;
}
.lvs-shotmap-svg { width: 100%; height: auto; display: block; }

/* Formazione sotto il nome squadra nell'header (da lineups), visibile su tutte le pill */
.lvs-team-formation {
  display: block; font-size: 11px; color: var(--nt-text-muted); font-weight: 600;
  margin-top: 2px; overflow-wrap: anywhere;
}

/* Sub-navigazione a pill del detail (sticky sopra i pannelli) */
.lvs-subnav {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: var(--nt-bg-dark);
  padding: 10px 0 14px;
  margin-bottom: 4px;
  overflow-x: auto;
}
.lvs-subnav-btn {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-pill);
  background: var(--nt-bg-card);
  color: var(--nt-text-secondary);
  font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lvs-subnav-btn:hover { border-color: var(--nt-border-focus); color: var(--nt-text-primary); }
.lvs-subnav-btn--active { background: var(--nt-primary); color: #fff; border-color: transparent; }
.lvs-subnav-btn--active:hover { background: var(--nt-primary); }

.lvs-panel { min-width: 0; }

/* Riga arbitro (Panoramica) */
.lvs-referee-row {
  font-size: 12.5px; color: var(--nt-text-secondary);
  margin-bottom: 14px;
}

/* Toggle piccolo a pill (mezzo tempo Statistiche / filtro Timeline) */
.lvs-half-toggle {
  display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap;
}
.lvs-half-toggle-btn {
  padding: 5px 12px;
  border: 1px solid var(--nt-border-strong);
  border-radius: var(--nt-radius-pill);
  background: var(--nt-bg-card);
  color: var(--nt-text-secondary);
  font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lvs-half-toggle-btn:hover { border-color: var(--nt-border-focus); color: var(--nt-text-primary); }
.lvs-half-toggle-btn--active { background: var(--nt-primary); color: #fff; border-color: transparent; }

/* Strip derivate xG in testa alle Statistiche (2026-07-12): xG · xG/tiro · xG−gol per lato. */
.lvs-xg-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 9px 12px;
  border: 1px solid var(--nt-border-strong); border-radius: var(--nt-radius-md);
  background: var(--nt-bg-glass-2);
  font-size: 12px; color: var(--nt-text-secondary); flex-wrap: wrap;
}
.lvs-xg-cell strong { color: var(--nt-text-bright); font-size: 13px; }
.lvs-xg-sep { color: var(--nt-text-faint); font-weight: 700; }

/* Decomposizione numerica ultima finestra ~15' sotto l'oscillatore Momentum (2026-07-12). */
.lvs-recent15 {
  margin-top: 10px; padding: 8px 12px;
  border: 1px solid var(--nt-border-strong); border-radius: var(--nt-radius-md);
  background: var(--nt-bg-glass-2);
  font-size: 12px; font-weight: 700; color: var(--nt-text-secondary);
  font-family: var(--nt-font-mono);
}

/* Evidenzia i "momenti chiave" nella timeline (goal/cartellini/sostituzioni/VAR/inizio-fine) */
.lvs-tl-item--key { border-left: 2px solid var(--nt-cyan); padding-left: 8px; margin-left: -8px; }

/* Giocatori: due colonne, righe compatte con badge rating */
.lvs-players-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.lvs-players-col { min-width: 0; }
.lvs-player-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 4px; border-bottom: 1px solid var(--nt-border-subtle);
  font-size: 13px;
}
.lvs-player-row:last-child { border-bottom: none; }
.lvs-player-name { flex: 1; min-width: 0; color: var(--nt-text-primary); overflow-wrap: anywhere; }
.lvs-player-pos { color: var(--nt-text-muted); font-size: 11px; }
.lvs-player-min, .lvs-player-ga, .lvs-player-xg {
  flex: none; font-size: 12px; color: var(--nt-text-secondary); font-variant-numeric: tabular-nums;
  min-width: 30px; text-align: right;
}
.lvs-rating {
  flex: none; min-width: 34px; text-align: center;
  padding: 2px 7px; border-radius: var(--nt-radius-sm);
  font-size: 12px; font-weight: 800;
  background: rgba(100,116,139,0.14); color: var(--nt-text-secondary);
}
.lvs-rating--high { background: var(--nt-success-bg); color: var(--nt-success); }
.lvs-rating--mid  { background: var(--nt-warning-bg); color: var(--nt-warning); }
.lvs-rating--low  { background: rgba(100,116,139,0.14); color: var(--nt-text-secondary); }
.lvs-rating--na   { background: transparent; color: var(--nt-text-faint); }

/* Rating di squadra: due colonne di rendimento affrontate, tinta continua rosso->verde per rating,
   crescono e virano quando il rating live cambia. Valore CALCOLATO (tag "calcolato" in intestazione). */
.lvs-tr {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 18px 18px 16px; margin-bottom: 18px;
}
.lvs-tr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.lvs-tr-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--nt-text-secondary);
}
.lvs-tr-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 2px 7px; border-radius: var(--nt-radius-pill);
  background: rgba(100,116,139,0.16); color: var(--nt-text-faint); cursor: help;
}
.lvs-tr-chart {
  display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding-top: 44px;
}
.lvs-tr-yaxis {
  flex: none; align-self: flex-end; height: 150px; padding-right: 4px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  font-size: 10px; color: var(--nt-text-faint); font-variant-numeric: tabular-nums;
}
.lvs-tr-yaxis span { line-height: 1; transform: translateY(-50%); }
.lvs-tr-yaxis span:first-child { transform: none; }
.lvs-tr-yaxis span:last-child { transform: translateY(50%); }
.lvs-tr-cols { display: flex; align-items: flex-end; justify-content: center; }
.lvs-tr-axis { flex: none; width: 1px; height: 150px; align-self: flex-end; background: var(--nt-border); margin: 0 34px; opacity: .5; }
.lvs-tr-col { flex: 0 1 150px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.lvs-tr-plot {
  position: relative; width: 78px; height: 150px; border-radius: 10px 10px 0 0;
  border-bottom: 1px solid var(--nt-border);
  background: repeating-linear-gradient(to top, transparent, transparent 49px,
              var(--nt-border-subtle) 49px, var(--nt-border-subtle) 50px);
}
.lvs-tr-bar {
  position: absolute; bottom: 0; left: 0; width: 100%; min-height: 4px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 22px -10px currentColor;
  transition: height .9s cubic-bezier(.22,1,.36,1), background-color .9s ease;
}
.lvs-tr-bar--na { background: rgba(100,116,139,0.22); height: 4px; box-shadow: none; }
.lvs-tr-bar--live { animation: lvsTrPulse 2.6s ease-in-out infinite; }
@keyframes lvsTrPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
.lvs-tr-value {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 9px; white-space: nowrap; color: inherit;
  font-size: 29px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.lvs-tr-swing { font-size: 12px; font-weight: 800; }
.lvs-tr-swing--up { color: var(--nt-success); }
.lvs-tr-swing--down { color: var(--nt-danger); }
.lvs-tr-team {
  margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--nt-text-primary);
  text-align: center; overflow-wrap: anywhere; max-width: 150px;
}
.lvs-tr-sub { margin-top: 2px; font-size: 11px; color: var(--nt-text-faint); }
.lvs-tr-legend {
  margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 11.5px; color: var(--nt-text-faint);
}
.lvs-tr-legend-bar {
  flex: none; width: 64px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, hsl(0,72%,46%), hsl(64,72%,46%), hsl(128,72%,46%));
}
@media (prefers-reduced-motion: reduce) {
  .lvs-tr-bar { transition: none; }
  .lvs-tr-bar--live { animation: none; }
}

/* Pericolo gol: meter di MINACCIA 0-100 per squadra, ciano (calmo) -> rosso incandescente, glow che
   cresce col valore, pulse quando scotta. VALORE CALCOLATO (non una previsione del gol). */
.lvs-gt { background: var(--nt-bg-card); border: 1px solid var(--nt-border); border-radius: var(--nt-radius-md); padding: 14px 16px 16px; margin-bottom: 18px; }
.lvs-gt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.lvs-gt-rows { display: flex; flex-direction: column; gap: 14px; }
.lvs-gt-row { display: grid; grid-template-columns: 130px 1fr 46px 108px; align-items: center; gap: 12px; }
.lvs-gt-team { font-size: 13px; font-weight: 700; color: var(--nt-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvs-gt-meter { height: 14px; border-radius: 7px; background: rgba(100,116,139,0.16); overflow: hidden; }
.lvs-gt-fill { height: 100%; border-radius: 7px; min-width: 3px;
  transition: width .8s cubic-bezier(.22,1,.36,1), background-color .8s ease, box-shadow .8s ease; }
.lvs-gt-val { font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.lvs-gt-lvl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--nt-text-secondary); }
.lvs-gt-row--hot .lvs-gt-lvl { color: var(--nt-danger); }
.lvs-gt-row--hot .lvs-gt-fill { animation: lvsGtPulse 1.1s ease-in-out infinite; }
@keyframes lvsGtPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.4); } }
@media (prefers-reduced-motion: reduce) {
  .lvs-gt-fill { transition: none; }
  .lvs-gt-row--hot .lvs-gt-fill { animation: none; }
}

/* Momentum d'attacco: grafico oscillante per-minuto (su=casa, giù=trasferta), barra rossa sul
   pericolo gol. Selettore finestra 1'/5'/10' riusa lo stile .lvs-half-toggle. VALORE CALCOLATO. */
.lvs-mom { background: var(--nt-bg-card); border: 1px solid var(--nt-border); border-radius: var(--nt-radius-md); padding: 16px 18px 14px; }
.lvs-mom-frozen { font-size: 11.5px; font-weight: 700; color: #fbbf24; background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.30); border-radius: 8px; padding: 5px 9px; margin-bottom: 8px; }
.lvs-mom-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.lvs-mom-win { margin-left: auto; }
.lvs-mom-teams { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 800; margin: 4px 2px 6px; }
.lvs-mom-team { display: inline-flex; align-items: center; gap: 6px; color: var(--nt-text-primary); }
.lvs-mom-dir { font-weight: 600; font-size: 11px; color: var(--nt-text-faint); }
.lvs-mom-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lvs-mom-dot--home { background: #3b82f6; }
.lvs-mom-dot--away { background: #f59e0b; }
.lvs-mom-chart { position: relative; width: 100%; }
.lvs-mom-svg { display: block; width: 100%; height: 200px; }
.lvs-mom-zero { stroke: var(--nt-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lvs-mom-bar { transition: height .5s ease, y .5s ease; }
.lvs-mom-bar--danger { filter: drop-shadow(0 0 5px var(--nt-danger)); }
/* Overlay non deformato dallo stretch dell'SVG: etichette minuti (in basso) + marcatori gol (in alto) */
.lvs-mom-overlay { position: absolute; inset: 0; pointer-events: none; }
.lvs-mom-axis-lbl { position: absolute; bottom: -2px; transform: translateX(-50%); font-size: 11px; color: var(--nt-text-faint); font-variant-numeric: tabular-nums; }
.lvs-mom-goal { position: absolute; transform: translateX(-50%); font-size: 15px; line-height: 1; }
.lvs-mom-goal--home { top: 2px; }
.lvs-mom-goal--away { bottom: 16px; }
/* Azione da gol NON confermata contro il risultato reale (provider potrebbe averla annullata, es. VAR) */
.lvs-mom-goal--unconf { opacity: .45; filter: grayscale(.6); font-size: 12px; }
.lvs-mom-legend-swatch { display: inline-block; width: 22px; height: 8px; border-radius: 3px; vertical-align: middle; margin: 0 6px 0 4px; }
.lvs-mom-legend-swatch--danger { background: var(--nt-danger); }
@media (prefers-reduced-motion: reduce) { .lvs-mom-bar { transition: none; } }

/* Match graph: RACCONTO annotato del match, SOTTO il momentum. Orizzontale, barre verticali
   specchiate (casa sopra blu, trasferta sotto ambra), zone calde rosse col glow + chip evento in
   overlay HTML (%). Le P delle zone calde sono frequenze empiriche reali (prob_map). */
.lvs-mg { margin-top: 14px; background: var(--nt-bg-card); border: 1px solid var(--nt-border); border-radius: var(--nt-radius-md); padding: 16px 18px 12px; }
.lvs-mg-head-row { margin-bottom: 10px; }
.lvs-mg-tag2 { background: rgba(239,68,68,0.12); color: var(--nt-danger); border-color: rgba(239,68,68,0.35); }
.lvs-mg-chart { position: relative; width: 100%; margin: 20px 0 22px; }
.lvs-mg-svg { display: block; width: 100%; height: 250px; }
/* Bande di sfondo per le 4 fasce (0-25/25-50/50-75/75-100): gauge leggibile a colpo d'occhio */
.lvs-mg-band--calmo, .lvs-mg-band--crescita { fill: none; }
.lvs-mg-band--alto { fill: var(--nt-danger); fill-opacity: .09; }
.lvs-mg-band--incandescente { fill: var(--nt-danger); fill-opacity: .16; }
/* Soglia a 50 (fasce calde ⚡): riga tratteggiata + etichetta SEMPRE visibili, non solo quando la
   curva la supera — punto di riferimento fisso per un neofita (richiesta utente 2026-07-05) */
.lvs-mg-grid--danger { stroke: var(--nt-danger); stroke-width: 1.4; stroke-dasharray: 5 3; opacity: .55; }
.lvs-mg-threshold-lbl { position: absolute; right: 2px; transform: translateY(-100%); font-size: 9px; font-weight: 800; letter-spacing: .02em; color: var(--nt-danger); opacity: .85; background: var(--nt-bg-card); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
/* Cursore temporale condiviso (hover): riga verticale + badge minuto, sincronizzato tra Momentum e
   i 2 grafici Pericolo gol (mousemove delegato su #lvs-detail-body, vedi wireLivestatsDetailEvents) */
.lvs-playhead { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--nt-text-secondary); opacity: .75; pointer-events: none; z-index: 3; }
.lvs-playhead-lbl { position: absolute; top: -1px; left: 3px; font-size: 9.5px; font-weight: 800; color: var(--nt-text-secondary); background: var(--nt-bg-card); padding: 1px 4px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* DUE grafici (uno per squadra): più bassi, con caption e asse minuti solo sotto il secondo */
.lvs-mg-duo-item { margin-top: 4px; }
.lvs-mg-duo-cap { display: flex; align-items: center; gap: 7px; margin: 12px 0 2px; font-size: 12px; font-weight: 700; color: var(--nt-text-secondary); }
.lvs-mg-duo-name { color: var(--nt-text-primary); font-weight: 800; }
.lvs-mg-chart--duo { margin: 4px 0 2px; }
.lvs-mg-chart--xaxis { margin-bottom: 22px; }
.lvs-mg-svg--duo { height: 132px; }
/* Griglia orizzontale sottile; baseline un filo più marcata */
.lvs-mg-grid { stroke: var(--nt-border); stroke-width: 1; opacity: .45; }
.lvs-mg-grid--base { opacity: .85; }
/* Area tenue sotto la curva, colore della squadra, bassa opacità */
.lvs-mg-area { fill-opacity: .11; }
.lvs-mg-area--home { fill: #3b82f6; }
.lvs-mg-area--away { fill: #f59e0b; }
/* La curva prende il colore della squadra (blu casa / ambra trasferta) */
.lvs-mg-line { stroke-width: 2.4px; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.30)); }
.lvs-mg-line--home { stroke: #3b82f6; }
.lvs-mg-line--away { stroke: #f59e0b; }
.lvs-mg-overlay { position: absolute; inset: 0; pointer-events: none; }
.lvs-mg-overlay > span { pointer-events: auto; }
/* Etichette asse Y (indice 0-100) nel margine sinistro */
.lvs-mg-ylbl { position: absolute; left: 0; transform: translateY(-50%); font-size: 10px; color: var(--nt-text-faint); font-variant-numeric: tabular-nums; opacity: .85; }
.lvs-mg-axis-lbl { position: absolute; bottom: -18px; transform: translateX(-50%); font-size: 11px; color: var(--nt-text-faint); font-variant-numeric: tabular-nums; }
/* Punto gol ancorato SULLA curva, colore della squadra che ha segnato */
.lvs-mg-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%,-50%); border: 2px solid var(--nt-bg-card); box-shadow: 0 0 0 1px rgba(0,0,0,0.22); }
.lvs-mg-dot--home { background: #3b82f6; }
.lvs-mg-dot--away { background: #f59e0b; }
/* Azione da gol NON confermata (il conteggio col risultato reale la esclude, es. VAR): attenuata */
.lvs-mg-dot--unconf { opacity: .4; filter: grayscale(.6); width: 7px; height: 7px; }
/* Testa "adesso" in fondo alla curva: alone luminoso, pulsante se il match è live */
.lvs-mg-head { position: absolute; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%,-50%); border: 2px solid var(--nt-bg-card); }
.lvs-mg-head--home { background: #3b82f6; box-shadow: 0 0 10px 2px rgba(59,130,246,0.65); }
.lvs-mg-head--away { background: #f59e0b; box-shadow: 0 0 10px 2px rgba(245,158,11,0.65); }
.lvs-mg-head--live { animation: lvsMgPulse 1.6s ease-in-out infinite; }
@keyframes lvsMgPulse { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 50% { transform: translate(-50%,-50%) scale(1.4); opacity: .82; } }
/* Chip evento: gol (col punteggio) ed espulsione, ancorati al minuto in %. */
.lvs-mg-chip { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 999px; background: var(--nt-bg-card); border: 1.5px solid var(--nt-border); box-shadow: var(--nt-shadow-sm, 0 1px 3px rgba(0,0,0,0.35)); color: var(--nt-text-primary); font-variant-numeric: tabular-nums; }
.lvs-mg-chip b { font-weight: 900; }
.lvs-mg-chip--goal.lvs-mg-chip--home { border-color: #3b82f6; }
.lvs-mg-chip--goal.lvs-mg-chip--away { border-color: #f59e0b; }
.lvs-mg-chip--red { border-color: var(--nt-danger); color: var(--nt-danger); }
/* Azione da gol NON confermata: tratteggiata, attenuata, niente punteggio (sarebbe fittizio) */
.lvs-mg-chip--unconf { opacity: .55; border-style: dashed; color: var(--nt-text-faint); }
/* Etichetta zona calda: ancorata sul punto della curva, sollevata sopra (o sotto se il picco è alto) */
.lvs-mg-hotlbl { position: absolute; transform: translate(-50%, calc(-100% - 9px)); max-width: 150px; white-space: nowrap; font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; padding: 2px 7px; border-radius: 7px; background: rgba(239,68,68,0.14); border: 1px solid rgba(239,68,68,0.45); color: var(--nt-danger); }
.lvs-mg-hotlbl--below { transform: translate(-50%, 9px); }
/* Riga verticale tratteggiata INTERVALLO col badge INT in alto */
.lvs-mg-ht { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--nt-text-faint); opacity: .8; }
.lvs-mg-ht-lbl { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 900; letter-spacing: .08em; color: var(--nt-text-faint); background: var(--nt-bg-card); padding: 1px 4px; border-radius: 4px; }
.lvs-mg-legend { margin-top: 12px; }
.lvs-mg-legend-side { color: var(--nt-text-faint); font-weight: 600; font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .lvs-mg-head--live { animation: none; } }
@media (max-width: 640px) { .lvs-mg-hotlbl { max-width: 120px; } .lvs-mg-chip { font-size: 10.5px; padding: 2px 5px; } }

/* Quote: card 1X2, tabelle O/U e Handicap asiatico, chips mercati extra, disclaimer */
.lvs-odds-1x2 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.lvs-odds-1x2-cell {
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md); padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0;
}
.lvs-odds-1x2-label {
  font-size: 11px; font-weight: 700; color: var(--nt-text-muted);
  text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; text-align: center;
}
.lvs-odds-num { font-size: 18px; font-weight: 800; color: var(--nt-text-bright); }
.lvs-odds-na { font-size: 13px; color: var(--nt-text-faint); }
.lvs-odds-move { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; flex-wrap: wrap; justify-content: center; }
.lvs-odds-open { color: var(--nt-text-muted); }
.lvs-odds-arrow { color: var(--nt-text-faint); }
.lvs-odds-move .lvs-odds-num { font-size: 16px; }

.lvs-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.lvs-odds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lvs-odds-table th {
  padding: 7px 10px; text-align: center;
  background: var(--nt-bg-elevated); color: var(--nt-text-muted);
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--nt-border);
}
.lvs-odds-table td {
  padding: 7px 10px; text-align: center; color: var(--nt-text-secondary);
  border-bottom: 1px solid var(--nt-border-subtle); white-space: normal;
}
.lvs-odds-table tr:last-child td { border-bottom: none; }
.lvs-odds-table td:first-child { font-weight: 700; color: var(--nt-text-primary); }

.lvs-ah-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.lvs-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lvs-odds-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 10px; border-radius: var(--nt-radius-sm);
  background: var(--nt-bg-card); border: 1px solid var(--nt-border);
  min-width: 0;
}
.lvs-odds-chip-label { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--nt-text-muted); font-weight: 700; }
.lvs-odds-chip-val { font-size: 12px; color: var(--nt-text-primary); overflow-wrap: anywhere; }

.lvs-odds-disclaimer { font-size: 11px; color: var(--nt-text-faint); margin-top: 4px; }

/* Formazioni: due colonne, XI con badge numero tondo, panchina collassabile nativa (details/summary) */
.lvs-lineup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.lvs-lineup-col { min-width: 0; }
.lvs-lineup-xi { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.lvs-lineup-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px; border-bottom: 1px solid var(--nt-border-subtle);
  font-size: 13px;
}
.lvs-lineup-row:last-child { border-bottom: none; }
.lvs-lineup-number {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--nt-bg-elevated); border: 1px solid var(--nt-border-strong);
  font-size: 11px; font-weight: 800; color: var(--nt-text-primary);
}
.lvs-lineup-name { flex: 1; min-width: 0; color: var(--nt-text-primary); overflow-wrap: anywhere; }
.lvs-lineup-pos { flex: none; font-size: 11px; color: var(--nt-text-muted); }
.lvs-lineup-bench { font-size: 12.5px; color: var(--nt-text-secondary); }
.lvs-lineup-bench summary { cursor: pointer; font-weight: 700; color: var(--nt-text-secondary); padding: 6px 0; }
.lvs-lineup-bench-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }

html[data-theme="light"] .ntp2-detail-k { color: #475569; }
/* contenitore esterno della tabella stat: gradiente scuro (bg-image) → bianco con ombra reale */
html[data-theme="light"] .ntp2-wrap {
  background: #FFFFFF;
  border-color: rgba(15,23,42,0.08);
  box-shadow: 0 1px 3px rgba(15,23,42,.07), 0 10px 28px rgba(15,23,42,.06);
}
html[data-theme="light"] .ntp2-external-heading,
html[data-theme="light"] .ntp2-title { color: #0F172A; }
html[data-theme="light"] .ntp2-kicker { color: #475569; }

/* ---- data tables profile/recent/kv/market (theme.py) ---- */
/* (.roi-table rimossa dai selettori 2026-06-18: nessun emettitore vivo — redesign .nt-strat-*) */
html[data-theme="light"] .profile-table th,
html[data-theme="light"] .recent-table th, html[data-theme="light"] .kv-table th,
html[data-theme="light"] .market-table th { background: linear-gradient(180deg,#EEF2F8,#F1F5F9); color: #475569; border-bottom-color: #D5DDEA; }
html[data-theme="light"] .profile-table td,
html[data-theme="light"] .recent-table td, html[data-theme="light"] .kv-table td,
html[data-theme="light"] .market-table td { border-bottom-color: rgba(15,23,42,0.08); }
html[data-theme="light"] .profile-table tr:hover td,
html[data-theme="light"] .recent-table tr:hover td, html[data-theme="light"] .market-table tr:hover td { background: rgba(37,99,235,0.05); }
/* classi-testo ROI: verde/rosso MANTENUTI, scuriti q.b. per AA su bianco (sono testo) */
html[data-theme="light"] .pos-high { color: #15803D !important; }
html[data-theme="light"] .pos-med  { color: #16A34A !important; }
html[data-theme="light"] .pos-low  { color: #22C55E !important; }
html[data-theme="light"] .neg-high { color: #B91C1C !important; }
html[data-theme="light"] .neg-med  { color: #DC2626 !important; }
html[data-theme="light"] .neg-low  { color: #EF4444 !important; }
/* tabelle Nowtrade_Build con bg dark INLINE su <table> dentro .dashboard-table (timeline gol):
   batto l'inline dal selettore padre (la Fase 2 tokenizzerà alla fonte). Punteggi/dot colorati
   inline (verde/rosso) restano. */
html[data-theme="light"] .dashboard-table table { background: #FFFFFF !important; }
html[data-theme="light"] .minutaggio-bar-pct { color: #0F172A; }
html[data-theme="light"] .minutaggio-bar-label { color: #64748B; }
/* Bottone tema nella sidebar */
.nt-sidebar-theme-wrap { padding: 0 12px; margin-top: 6px; }
.nt-theme-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; border-radius: var(--nt-radius-md);
  background: var(--nt-bg-input); color: var(--nt-text-secondary);
  border: 1px solid var(--nt-border); font: 600 12px/1 var(--nt-font);
  cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.nt-theme-toggle:hover { color: var(--nt-text-primary); border-color: var(--nt-border-focus); }
.nt-theme-toggle .nt-theme-ico { font-size: 14px; line-height: 1; }
.nt-theme-toggle .nt-theme-lab { letter-spacing: .02em; }

.nt-profile-card {
  width: min(560px, 100%); margin: 0 auto; padding: 24px;
  border: 1px solid var(--nt-border); border-radius: var(--nt-radius-lg);
  background: var(--nt-bg-card);
}
.nt-profile-card h2 { margin: 0 0 6px; font-size: 22px; }
.nt-profile-card > p { margin: 0 0 20px; color: var(--nt-text-secondary); font-size: 13px; line-height: 1.5; }
.nt-profile-card form { display: flex; flex-direction: column; gap: 14px; }
.nt-password-field { display: flex; gap: 8px; align-items: center; }
.nt-password-field .nt-input { flex: 1; min-width: 0; }
.nt-password-toggle { flex: none; min-width: 86px; }
.nt-profile-card .nt-form-error { min-height: 20px; }

/* =====================================================================
   ACCESSIBILITÀ — anello di focus da tastiera (WCAG 2.4.7)
   Diversi controlli avevano `outline:none` nudo (select sidebar/filtri, input
   login, range, .nt-input/.nt-select) e i bottoni/pillole non avevano alcuno
   stato di focus: navigando con Tab non si vedeva mai la posizione.
   Si usa :focus-visible (non :focus) così il click col MOUSE non mostra l'anello
   ma la navigazione da TASTIERA sì. Il blocco è in fondo al file → vince per
   ordine sui precedenti `outline:none` a parità di specificità. ADDITIVO.
   ===================================================================== */
*:focus-visible {
  outline: 2px solid var(--nt-primary-light);
  outline-offset: 2px;
  border-radius: var(--nt-radius-xs);
}
/* Mouse-focus: nessun anello (mantiene gli stili :focus custom box-shadow). */
*:focus:not(:focus-visible) { outline: none; }
/* Rinforzo esplicito sui controlli interattivi chiave (offset adeguato). */
.nt-section-pill:focus-visible,
.nt-sidebar-nav-item:focus-visible,
.nt-console-tab:focus-visible,
.nt-btn:focus-visible,
.nt-btn-primary:focus-visible,
.nt-link-btn:focus-visible,
.nt-theme-toggle:focus-visible,
.nt-sidebar-select:focus-visible,
.nt-filter-group select:focus-visible,
.nt-login-input:focus-visible,
.nt-input:focus-visible,
.nt-select:focus-visible,
.nt-range:focus-visible {
  outline: 2px solid var(--nt-primary-light);
  outline-offset: 2px;
}



/* ===== Live Stats — dettaglio ricco provider primario (giocatori + timeline) ===== */
.lvs-af-rating { display:inline-block; min-width:34px; text-align:center; padding:2px 6px; border-radius:6px; font-size:11.5px; font-weight:800; color:#fff; font-variant-numeric:tabular-nums; }
.lvs-af-rating--na { background:var(--nt-bg-track,rgba(148,163,184,0.2)); color:var(--nt-text-faint); }
.lvs-af-players { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.lvs-af-pcol { display:flex; flex-direction:column; gap:2px; min-width:0; }
.lvs-af-pcol-head { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--nt-text-bright,#e2e8f0); padding:4px 0 6px; border-bottom:1px solid var(--nt-border-soft,rgba(148,163,184,0.16)); margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lvs-af-prow { display:grid; grid-template-columns:26px 1fr auto auto; align-items:center; gap:8px; padding:5px 2px; border-bottom:1px solid var(--nt-border-soft,rgba(148,163,184,0.08)); font-size:12.5px; }
.lvs-af-pos { font-size:10px; font-weight:800; color:var(--nt-text-faint); text-align:center; }
.lvs-af-pname { color:var(--nt-text-primary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lvs-af-pshots { font-size:11px; color:var(--nt-text-secondary); font-variant-numeric:tabular-nums; }
.lvs-af-timeline { display:flex; flex-direction:column; gap:2px; }
.lvs-af-tl { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:8px; font-size:12.5px; }
.lvs-af-tl--away { flex-direction:row-reverse; text-align:right; background:var(--nt-bg-track,rgba(148,163,184,0.05)); }
.lvs-af-tl-min { min-width:32px; font-weight:800; color:var(--nt-text-secondary); font-variant-numeric:tabular-nums; }
.lvs-af-tl-icon { font-size:14px; }
.lvs-af-tl-txt { color:var(--nt-text-primary); }
.lvs-af-tl-assist { color:var(--nt-text-faint); font-style:italic; }
