/* Identita' Padel Forese: colori sociali del logo (blu della racchetta e
   di "FORESE", verde di "PADEL", lime della scia) su un'impostazione da
   app scura. Pulsanti principali lime con testo blu (7,4:1), accenti verdi
   chiari sul blu (6,7:1). Il verde esatto del logo (#4E9A44) sul blu si
   ferma a 4,4:1: solo per elementi grandi o decorativi. */
@font-face {
  font-family: 'Saira';
  src: url('/static/fonts/saira-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --font-titoli: 'Saira', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #10143A;
  --surface: #1B2150;
  --surface-alt: #252C63;
  --surface-hi: #2F3775;
  --border: #2C336B;
  --border-forte: #3D4585;
  --brand: #8CC63F;
  --brand-hover: #9DD254;
  --su-brand: #1B2150;
  --brand-dark: #1B2150;
  --brand-wash: rgba(140, 198, 63, 0.16);
  --verde: #6CC04A;
  --verde-logo: #4E9A44;
  --blu: #B9C3FF;
  --blu-medio: #2A3270;
  --blu-wash: rgba(140, 155, 255, 0.18);
  --accento: #8CC63F;
  --accento-dark: #C9EE8F;
  --text-main: #F3F5FF;
  --text-muted: #A9B1D6;
  --danger: #FF7A6B;
  --danger-forte: #E5484D;
  --danger-wash: rgba(255, 122, 107, 0.16);
  --warning: #FFB547;
  --warning-wash: rgba(255, 181, 71, 0.16);
  --success: #8CC63F;
  --success-wash: rgba(140, 198, 63, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --ombra-1: 0 1px 2px rgba(5, 8, 30, 0.35);
  --ombra-2: 0 8px 22px rgba(5, 8, 30, 0.45);
  --ombra-3: 0 18px 50px rgba(5, 8, 30, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  font-size: 106.25%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, canvas, svg, video { max-width: 100%; }
a, button, .btn, .slot, .giorno, .riga-cliccabile { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }

/* ── Topbar e navigazione ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand-dark); color: #fff;
  padding: 10px calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left));
  padding-top: calc(10px + env(safe-area-inset-top));
  position: sticky; top: 0; z-index: 50; gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #fff; text-decoration: none; font-size: 1.08rem; letter-spacing: -0.01em; }
.topbar-brand img { height: 32px; width: 32px; border-radius: 50%; }
.topbar-nav { display: flex; gap: 4px; }
.topbar-nav a {
  display: flex; align-items: center; gap: 7px; text-decoration: none;
  color: rgba(255, 255, 255, 0.78); padding: 8px 13px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; transition: background .15s var(--ease), color .15s var(--ease);
}
.topbar-nav a.active, .topbar-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.topbar-nav a.active { box-shadow: inset 0 -3px 0 var(--accento); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 600; font-size: 0.92rem; }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accento); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; flex-shrink: 0;
}
.btn-esci { background: none; border: 0; color: rgba(255, 255, 255, 0.75); font: inherit; font-size: 0.9rem; cursor: pointer; padding: 6px; }
.btn-esci:hover { color: #fff; }
.bottom-nav { display: none; }

.container {
  max-width: 1080px; margin: 0 auto;
  padding: 18px calc(16px + env(safe-area-inset-right)) 28px calc(16px + env(safe-area-inset-left));
}
.container.stretto { max-width: 640px; }

/* ── Mattoni comuni ───────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px; box-shadow: var(--ombra-1);
}
.card h2 { font-size: 0.82rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-header h2 { margin: 0; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-header h1 { font-size: 1.5rem; margin: 0 0 2px; letter-spacing: -0.015em; }
.page-sub { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--ombra-1); display: flex; flex-direction: column; gap: 2px; }
.kpi-valore { font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-etichetta { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-nota { font-size: 0.82rem; color: var(--text-muted); }
.kpi-card.positivo .kpi-valore { color: var(--success); }
.kpi-card.attenzione { border-left: 4px solid var(--warning); }

.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-alt); color: var(--text-muted); border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.chip-brand { background: var(--brand-wash); color: var(--brand); }
.chip-success { background: var(--success-wash); color: var(--success); }
.chip-warning { background: var(--warning-wash); color: var(--warning); }
.chip-danger { background: var(--danger-wash); color: var(--danger); }

.empty-state { text-align: center; padding: 26px 16px; color: var(--text-muted); }
.empty-state .empty-titolo { font-weight: 700; color: var(--text-main); margin-bottom: 3px; }
.empty-state .empty-testo { font-size: 0.92rem; }

.muted { color: var(--text-muted); }
.piccolo { font-size: 0.86rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ── Form ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label, .label { display: block; font-size: 0.86rem; font-weight: 700; margin-bottom: 5px; color: var(--text-main); }
.form-group .aiuto { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border-forte); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; background: var(--surface-alt); color: var(--text-main);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; margin-bottom: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-forte);
  background: var(--surface); color: var(--text-main); font: inherit; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; text-decoration: none; transition: background .15s var(--ease), transform .08s var(--ease), border-color .15s;
  min-height: 44px;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--su-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-accento { background: var(--accento); border-color: var(--accento); color: var(--brand-dark); }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-wash); }
.btn-sm { padding: 6px 11px; font-size: 0.86rem; min-height: 36px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; text-decoration: underline; }
.azioni { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Pagine pubbliche (login/registrazione) ───────────────────────── */
.pubblica-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; background: radial-gradient(circle at 20% 0%, #232A63 0%, var(--bg) 62%); }
.pubblica-card { background: var(--surface); border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 420px; box-shadow: var(--ombra-3); }
.pubblica-card.larga { max-width: 560px; }
.pubblica-card .logo { display: block; width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; }
.pubblica-card h1 { text-align: center; font-size: 1.4rem; margin: 0 0 4px; letter-spacing: -0.015em; }
.pubblica-card .sottotitolo { text-align: center; color: var(--text-muted); margin: 0 0 20px; font-size: 0.93rem; }
.pubblica-piede { color: rgba(255, 255, 255, 0.8); font-size: 0.86rem; margin-top: 16px; text-align: center; }
.pubblica-piede a { color: #fff; }
.separatore { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: 18px 0 0; }
.login-hint { background: var(--brand-wash); color: var(--brand-dark); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 0.9rem; margin: 0 0 14px; }
.testo-legale { max-width: 760px; }
.testo-legale h2 { font-size: 1.05rem; margin-top: 22px; text-transform: none; letter-spacing: 0; color: var(--text-main); }

/* ── Prenota (giocatore) ──────────────────────────────────────────── */
.striscia-giorni { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.striscia-giorni::-webkit-scrollbar { height: 0; }
.giorno {
  flex: 0 0 auto; width: 62px; padding: 8px 0 9px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); text-align: center; cursor: pointer; scroll-snap-align: start; font: inherit; color: var(--text-main);
}
.giorno .g-sett { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.giorno .g-num { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.giorno .g-mese { font-size: 0.72rem; color: var(--text-muted); }
.giorno.attivo { background: var(--brand); border-color: var(--brand); color: var(--su-brand); }
.giorno.attivo .g-sett, .giorno.attivo .g-mese { color: var(--su-brand); }

.segmented { display: inline-flex; background: var(--surface-alt); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; font: inherit; font-weight: 700; font-size: 0.9rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--text-muted); min-height: 36px; }
.segmented button.attivo { background: var(--surface); color: var(--brand-dark); box-shadow: var(--ombra-1); }

.campo-blocco { margin-bottom: 18px; }
.campo-titolo { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.campo-titolo h3 { margin: 0; font-size: 1.05rem; }
.griglia-slot { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.slot {
  border: 1px solid var(--border-forte); background: var(--surface); border-radius: 10px; padding: 8px 4px 7px;
  font: inherit; text-align: center; cursor: pointer; color: var(--text-main);
}
.slot .s-ora { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.slot .s-prezzo { font-size: 0.75rem; color: var(--text-muted); }
.slot.libero:hover { border-color: var(--brand); background: var(--brand-wash); }
.slot.occupato, .slot.passato { background: var(--surface-alt); border-color: transparent; color: #9AA0B2; cursor: default; }
.slot.occupato .s-ora { text-decoration: line-through; }
.slot.occupato .s-prezzo, .slot.passato .s-prezzo { color: #9AA0B2; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; }
.legenda span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border-forte); background: var(--surface); }
.legenda .l-occ::before { background: var(--surface-alt); border-color: transparent; }

/* Card partita (prossime / le mie partite) */
.partita {
  display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border);
}
.partita:first-child { border-top: 0; padding-top: 0; }
.partita-data { flex: 0 0 56px; text-align: center; background: var(--brand-wash); border-radius: 12px; padding: 6px 0; color: var(--brand-dark); }
.partita-data .pd-sett { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.partita-data .pd-num { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.partita-data .pd-mese { font-size: 0.7rem; }
.partita-corpo { flex: 1; min-width: 0; }
.partita-titolo { font-weight: 800; }
.partita-dettagli { font-size: 0.88rem; color: var(--text-muted); }
.partita.annullata { opacity: 0.6; }
.partita.annullata .partita-data { background: var(--surface-alt); color: var(--text-muted); }

/* ── Planning (admin) ─────────────────────────────────────────────── */
.planning-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.planning-barra .data-titolo { font-size: 1.15rem; font-weight: 800; margin: 0 6px; min-width: 190px; text-transform: capitalize; }
.planning-barra input[type=date] { width: auto; }
.planning-wrap { overflow-x: auto; overflow-y: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--ombra-1); }
.planning { display: grid; position: relative; min-width: 560px; }
.pl-testata { position: sticky; top: 0; background: var(--surface-alt); font-weight: 800; padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); z-index: 2; font-size: 0.95rem; }
.pl-testata:first-child { border-left: 0; }
.pl-ore { position: relative; border-right: 1px solid var(--border); }
.pl-ora { position: absolute; left: 0; right: 0; font-size: 0.75rem; color: var(--text-muted); text-align: right; padding-right: 8px; transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.pl-colonna { position: relative; border-left: 1px solid var(--border); cursor: copy; }
.pl-colonna:first-of-type { border-left: 0; }
.pl-riga { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); pointer-events: none; }
.pl-riga.mezza { border-top-style: dashed; border-top-color: var(--surface-alt); }
.pl-adesso { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.pl-evento {
  position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 8px; overflow: hidden;
  font-size: 0.82rem; line-height: 1.3; cursor: pointer; z-index: 1; border-left: 4px solid var(--blu);
  background: var(--blu-wash); color: var(--blu); box-shadow: var(--ombra-1);
}
.pl-evento:hover { box-shadow: var(--ombra-2); }
.pl-evento .ev-nome { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-evento .ev-ora { font-variant-numeric: tabular-nums; }
.pl-evento.pagata { background: var(--success-wash); border-left-color: var(--success); color: var(--success); }
.pl-evento.assente { background: var(--danger-wash); border-left-color: var(--danger); color: var(--danger); }
.pl-evento.esterno { border-left-style: dashed; }
.pl-blocco {
  position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 8px; font-size: 0.8rem; cursor: pointer;
  background: repeating-linear-gradient(135deg, #1F2439, #1F2439 6px, #262C45 6px, #262C45 12px); color: var(--text-muted); font-weight: 700;
}
.legenda-planning { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; }
.legenda-planning i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Ricerca giocatore con suggerimenti */
.autocomplete { position: relative; }
.autocomplete-lista { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border-forte); border-radius: var(--radius-sm); box-shadow: var(--ombra-2); z-index: 20; max-height: 240px; overflow-y: auto; margin-top: 4px; }
.autocomplete-lista button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 9px 12px; cursor: pointer; border-top: 1px solid var(--border); }
.autocomplete-lista button:first-child { border-top: 0; }
.autocomplete-lista button:hover { background: var(--brand-wash); }
.scelta-giocatore { display: flex; justify-content: space-between; align-items: center; background: var(--brand-wash); border-radius: var(--radius-sm); padding: 9px 12px; font-weight: 700; }

/* ── Tabelle ──────────────────────────────────────────────────────── */
.tabella-wrap { overflow-x: auto; }
table.tabella { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.tabella th { text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabella td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabella tr:last-child td { border-bottom: 0; }
.tabella .destra { text-align: right; }
.riga-cliccabile { cursor: pointer; }
.riga-cliccabile:hover td { background: var(--surface-alt); }
.riga-disattiva td { color: var(--text-muted); }

/* Grafico a barre semplice (incassi per giorno / orari) */
.barre { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 8px; }
.barre .b { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.barre .b:hover { background: var(--brand-dark); }
.barre-etichette { display: flex; gap: 3px; font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }
.barre-etichette span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }

/* ── Modale ───────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(16, 20, 50, 0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; padding: 22px 20px 20px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; position: relative; box-shadow: var(--ombra-3); }
.modal h3 { margin: 0 0 4px; font-size: 1.2rem; padding-right: 30px; }
.modal .modal-sub { color: var(--text-muted); margin: 0 0 16px; font-size: 0.93rem; }
.modal-close-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-alt); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--text-muted); }
.riepilogo-prenotazione { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.riepilogo-prenotazione .rp-riga { display: flex; justify-content: space-between; gap: 10px; font-size: 0.95rem; padding: 2px 0; }
.riepilogo-prenotazione .rp-totale { font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--border-forte); margin-top: 6px; padding-top: 8px; }
.codice-reset { font-size: 2rem; font-weight: 800; letter-spacing: 0.25em; text-align: center; background: var(--brand-wash); color: var(--brand-dark); border-radius: var(--radius-sm); padding: 12px; margin: 10px 0; font-variant-numeric: tabular-nums; }

/* ── Toast e banner installazione ─────────────────────────────────── */
.toast-container { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.toast { background: var(--surface-hi); color: var(--text-main); border: 1px solid var(--border-forte); padding: 11px 16px; border-radius: 12px; box-shadow: var(--ombra-3); font-size: 0.93rem; font-weight: 600; animation: toastIn .2s var(--ease); }
.toast.err { background: var(--danger-forte); color: #fff; border-color: transparent; }
.toast.uscita { opacity: 0; transition: opacity .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.install-banner { display: flex; align-items: center; gap: 10px; background: var(--brand-wash); padding: 10px 16px; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.install-testo { flex: 1; }
.install-banner-chiudi { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--text-muted); }

/* ── Telefono ─────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .topbar-nav, .avatar-name, .btn-esci { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px calc(6px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left));
    box-shadow: 0 -4px 16px rgba(27, 33, 80, 0.06);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
    color: var(--text-muted); font-size: 0.7rem; font-weight: 700; padding: 5px 2px; border-radius: 10px;
  }
  .bottom-nav a.active { color: var(--brand); background: var(--brand-wash); }
  .bottom-nav .nav-icon { width: 23px; height: 23px; }
  body.con-nav .container { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.con-nav .toast-container { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .page-header h1 { font-size: 1.3rem; }
  .card { padding: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .planning-barra .data-titolo { min-width: 0; flex-basis: 100%; order: -1; margin: 0; }
  .tabella .nascondi-mobile { display: none; }
}

/* ── Accedi con Google ────────────────────────────────────────────────
   Aspetto secondo le linee guida di Google: fondo bianco, bordo grigio,
   logo "G" a colori a sinistra, testo "Continua con Google". */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 46px; padding: 10px 16px; border: 1px solid #747775; border-radius: var(--radius-sm);
  background: #fff; color: #1F1F1F; font: inherit; font-weight: 600; font-size: 0.97rem;
  text-decoration: none; cursor: pointer; transition: background .15s var(--ease);
}
.btn-google:hover { background: #F2F2F2; }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.divisore-o { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.85rem; margin: 18px 0; }
.divisore-o::before, .divisore-o::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-errore { background: var(--danger-wash); color: var(--danger); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 0.9rem; margin: 0 0 14px; }
input[readonly] { background: var(--surface-alt); color: var(--text-muted); }

/* ── Pagina d'ingresso (il link che si manda ai giocatori) ────────────
   Stessa struttura di ET Club: testata, "Scarica l'app" in cima, poi
   accesso e registrazione. */
.pubblica-wrap.ingresso { justify-content: flex-start; padding-top: calc(28px + env(safe-area-inset-top)); gap: 14px; }
.ingresso-testata { text-align: center; color: #fff; margin-bottom: 4px; }
/* Il logo e' blu e verde: su fondo blu non si leggerebbe, va su bianco */
.logo-esteso-box { background: #fff; border-radius: 20px; padding: 18px 22px; width: 100%; max-width: 420px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.logo-esteso-box img { display: block; width: 100%; height: auto; }
.ingresso-testata { width: 100%; max-width: 420px; }
.ingresso-testata p { margin: 12px 0 0; color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.card-titolo { font-size: 1.15rem; margin: 0 0 14px; }
.btn-grande { min-height: 52px; font-size: 1.05rem; }
.registrati-box { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; text-align: center; }
.registrati-box p { margin: 0 0 8px; color: var(--text-muted); font-size: 0.93rem; }
.vantaggi { list-style: none; padding: 0; margin: 4px 0 0; width: 100%; max-width: 420px; color: #fff; font-size: 0.93rem; }
.vantaggi li { display: flex; gap: 10px; align-items: center; padding: 6px 4px; }
.vantaggi li span { font-size: 1.15rem; }

/* Riquadro "Scarica l'app" (static/js/install.js) */
.install-iniziale {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; padding: 16px;
  font-size: 0.93rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); border-left: 5px solid var(--accento);
}
.install-iniziale .install-testo { margin-bottom: 10px; }
.install-iniziale .install-testo:last-child { margin-bottom: 0; }
.install-iniziale .btn { width: 100%; padding: 12px; font-size: 1rem; }
.install-passi { margin: 8px 0 0; padding-left: 20px; }
.install-passi li { margin-bottom: 4px; }

/* Proposta impronta / Face ID dopo l'accesso */
.biometria-proposta { text-align: center; }
.biometria-proposta h2 { font-size: 1.25rem; margin: 6px 0 4px; }
.biometria-proposta p { color: var(--text-muted); margin: 0 0 18px; }
.biometria-proposta .btn-link { display: block; margin: 10px auto 0; }
.biometria-icona { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--brand-wash); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.biometria-icona svg { width: 36px; height: 36px; }
.riga-dispositivo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.riga-dispositivo:first-child { border-top: 0; }
#biometriaDispositivi:not(:empty) { margin-bottom: 12px; }

/* ══ Stile app (giocatore) sul modello del video di riferimento ══════════
   Titoli grandi, schede arrotondate, orari a pulsante, cerchi giocatori,
   barra in basso flottante. */
.topbar { background: rgba(12, 15, 30, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.titolo-grande { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 16px; line-height: 1.15; }
.titolo-grande small { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; margin-top: 2px; }
.sezione-titolo { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; }
.sezione-titolo h2 { font-size: 1rem; margin: 0; display: flex; gap: 8px; align-items: center; }
.sezione-titolo a { font-size: 0.86rem; color: var(--text-muted); text-decoration: none; }
.etichetta-sezione { font-size: 0.86rem; color: var(--text-muted); font-weight: 600; margin: 18px 0 8px; }
.card h2 { color: var(--brand); text-transform: none; letter-spacing: 0; font-size: 0.98rem; display: flex; gap: 8px; align-items: center; }
.card h2 svg { width: 18px; height: 18px; }

/* Home: riquadro "Inizia a giocare" */
.cta-gioca {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--text-main);
  background: linear-gradient(135deg, #1D2350 0%, #161A2D 70%); border: 1px solid var(--border-forte);
  border-radius: 22px; padding: 22px 20px; box-shadow: var(--ombra-2); position: relative; overflow: hidden;
}
.cta-gioca h2 { margin: 0 0 4px; font-size: 1.3rem; color: var(--text-main); }
.cta-gioca p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.cta-gioca img { width: 96px; height: 96px; flex-shrink: 0; border-radius: 50%; }
.cta-gioca .freccia { position: absolute; right: 18px; bottom: 14px; color: var(--brand); font-weight: 800; }

/* Scheda partita (home, le mie partite, partite degli amici) */
.partita-card {
  display: block; text-decoration: none; color: var(--text-main); background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px; margin-bottom: 12px; position: relative; box-shadow: var(--ombra-1);
}
.partita-card:active { transform: scale(0.99); }
.partita-card .pc-alto { display: flex; gap: 12px; align-items: center; }
.pc-icona { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.pc-icona svg { width: 30px; height: 30px; }
.pc-titolo { font-weight: 800; font-size: 1.02rem; }
.pc-sotto { color: var(--text-muted); font-size: 0.88rem; margin-top: 1px; }
.pc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pc-badge { position: absolute; top: 14px; right: 14px; }
.pc-piede { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; font-size: 0.88rem; color: var(--text-muted); }
.chip-pieno { background: var(--brand); color: var(--su-brand); }
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 0.72rem; font-weight: 800; }
.badge-ok { background: var(--success); color: #062012; }
.badge-attesa { background: var(--warning); color: #2A1A00; }
.badge-ko { background: #F08A24; color: #2A1300; }
.badge-info { background: var(--blu-wash); color: var(--blu); }

/* Mini avatar a iniziali (in fila, sovrapposti) */
.avatars { display: flex; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-hi); color: var(--text-main); font-size: 0.72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); margin-left: -8px; text-transform: uppercase; }
.avatars .avatar:first-child { margin-left: 0; }
.avatar.libero { background: transparent; border: 2px dashed var(--border-forte); color: var(--text-muted); }

/* Prenota: durata + calendario mensile */
.scelta-durata { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.scelta-durata button {
  display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-main); font: inherit; font-weight: 700; cursor: pointer; min-height: 56px;
}
.scelta-durata button svg { width: 22px; height: 22px; flex-shrink: 0; }
.scelta-durata button.attivo { background: var(--brand); border-color: var(--brand); color: var(--su-brand); }
.calendario { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px 12px 12px; }
.cal-testata { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 12px; }
.cal-testata strong { font-size: 1.05rem; text-transform: capitalize; }
.cal-testata button { background: none; border: 0; color: var(--brand); font-size: 1.4rem; width: 40px; height: 36px; cursor: pointer; border-radius: 10px; }
.cal-testata button:disabled { color: var(--border-forte); cursor: default; }
.cal-griglia { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-griglia .cal-sett { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; padding-bottom: 6px; }
.cal-giorno { aspect-ratio: 1; max-height: 46px; border: 0; background: none; color: var(--text-main); font: inherit; font-weight: 700; font-size: 1rem;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; margin: 0 auto; width: 100%; max-width: 46px; }
.cal-giorno:disabled { color: #4A5170; cursor: default; }
.cal-giorno.oggi { box-shadow: inset 0 0 0 2px var(--border-forte); }
.cal-giorno.attivo { background: var(--brand); color: var(--su-brand); }
.btn-cerca { margin-top: 16px; min-height: 54px; font-size: 1.05rem; border-radius: 16px; }

/* Prenota: risultati per campo con orari a pulsante */
.passo-testata { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.btn-indietro { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); font-size: 1.3rem; cursor: pointer; flex-shrink: 0; }
.passo-testata .titolo-grande { margin: 0; flex: 1; text-align: right; }
.campo-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 16px; margin-bottom: 14px; }
.campo-card .cc-alto { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.campo-card .cc-alto img { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 3px; }
.campo-card .cc-nome { font-weight: 800; }
.campo-card .cc-sotto { color: var(--text-muted); font-size: 0.84rem; }
.campo-card .cc-info { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.84rem; margin-bottom: 12px; }
.orari { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.orario {
  border: 2px solid var(--brand); background: transparent; color: var(--text-main); border-radius: 14px; padding: 7px 4px 6px;
  font: inherit; cursor: pointer; text-align: center; line-height: 1.2;
}
.orario b { display: block; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.orario span { font-size: 0.72rem; color: var(--text-muted); }
.orario.selezionato { background: var(--brand); color: var(--su-brand); }
.orario.selezionato span { color: var(--su-brand); }
.orario.occupato { border-color: var(--border); color: #4F5675; cursor: not-allowed; }
.orario.occupato b { text-decoration: line-through; }
.orario.occupato span { color: #4F5675; }
.orario.tuo { border-style: dashed; }
.btn-seleziona { margin-top: 12px; width: 100%; }
.nessun-orario { color: var(--text-muted); font-size: 0.9rem; padding: 6px 2px; }

/* Riepilogo prenotazione / dettaglio partita */
.due-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.riga-icona { display: flex; gap: 9px; align-items: center; padding: 5px 0; font-size: 0.93rem; }
.riga-icona svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; }
.giocatori { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-top: 6px; }
.giocatore { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; min-width: 0; }
.giocatore .cerchio { width: 54px; height: 54px; border-radius: 50%; background: var(--surface-hi); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; text-transform: uppercase; color: var(--text-main); }
.giocatore .cerchio.libero { background: transparent; border: 2px dashed var(--brand); color: var(--brand); font-size: 1.5rem; cursor: pointer; }
.giocatore .cerchio.invitato { border: 2px dashed var(--warning); background: transparent; color: var(--warning); }
.giocatore .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.giocatore .stato { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.giocatore.vuoto .nome { color: var(--brand); }
.btn-outline { background: transparent; border: 1.5px solid var(--text-main); color: var(--text-main); }
.pagamento-scelta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pagamento-scelta div { border-radius: 14px; padding: 14px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.pagamento-scelta .si { background: var(--brand); color: var(--su-brand); }
.pagamento-scelta .no { background: var(--surface-alt); color: #4F5675; }
.timer-slot { display: flex; align-items: center; gap: 8px; background: var(--warning-wash); color: var(--warning); border-radius: 12px; padding: 9px 12px; font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; }
.btn-conferma { min-height: 56px; font-size: 1.05rem; border-radius: 16px; }
.btn-elimina { background: linear-gradient(180deg, #E5484D, #B8282E); border: 0; color: #fff; min-height: 52px; border-radius: 14px; }
.meta-piccolo { color: var(--text-muted); font-size: 0.8rem; }

/* Amici da invitare (selezione) */
.lista-amici-scelta { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 8px 0 14px; }
.amico-scelta { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-alt); cursor: pointer; border: 1.5px solid transparent; }
.amico-scelta input { width: 20px; height: 20px; accent-color: var(--brand); }
.amico-scelta.scelto { border-color: var(--brand); }
.amico-scelta .avatar { margin: 0; border: 0; width: 36px; height: 36px; }
.amico-scelta .nome { flex: 1; font-weight: 700; }

/* QR della partita */
.qr-box { background: #fff; border-radius: 18px; padding: 14px; width: 220px; margin: 6px auto 8px; }
.qr-box img { display: block; width: 100%; height: auto; }
.qr-registrata { text-align: center; color: var(--success); font-weight: 800; }

/* Risultato: set e squadre */
.risultato-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-alt); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.risultato-box .squadra { font-weight: 700; font-size: 0.9rem; }
.risultato-box .squadra.vince { color: var(--brand); }
.risultato-box .punteggio { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; white-space: nowrap; }
.set-input { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.set-input input { text-align: center; font-weight: 800; font-size: 1.1rem; padding: 10px 6px; }
.squadre-scelta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.squadra-col { background: var(--surface-alt); border-radius: 14px; padding: 10px; min-height: 90px; }
.squadra-col h4 { margin: 0 0 8px; font-size: 0.85rem; color: var(--text-muted); }
.chip-giocatore { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--surface-hi); border-radius: 10px; padding: 7px 9px; margin-bottom: 6px;
  font-size: 0.88rem; font-weight: 700; cursor: pointer; border: 0; color: var(--text-main); width: 100%; font-family: inherit; }
.chip-giocatore span { color: var(--text-muted); font-size: 0.8rem; }

/* Dashboard profilo */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.stat .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .e { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.stat.verde .v { color: var(--brand); }
.stat.rosso .v { color: var(--danger); }
.barra-vittorie { height: 10px; border-radius: 999px; background: var(--danger-wash); overflow: hidden; margin: 10px 0 4px; }
.barra-vittorie div { height: 100%; background: var(--brand); border-radius: 999px; }
.profilo-testa { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profilo-testa .cerchio { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: var(--su-brand); font-weight: 800; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; flex-shrink: 0; }
.profilo-testa h1 { margin: 0; font-size: 1.5rem; }
.esito { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; font-size: 0.85rem; }
.esito.v { background: var(--brand); color: var(--su-brand); }
.esito.s { background: var(--danger-wash); color: var(--danger); }
.riga-risultato { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.riga-risultato:first-child { border-top: 0; }
.riga-risultato .corpo { flex: 1; min-width: 0; }
.riga-risultato .corpo div:first-child { font-weight: 700; font-size: 0.93rem; }
.riga-amico { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); text-decoration: none; color: var(--text-main); }
.riga-amico:first-child { border-top: 0; }
.riga-amico .avatar { margin: 0; width: 42px; height: 42px; border: 0; font-size: 0.9rem; }
.riga-amico .corpo { flex: 1; min-width: 0; }
.riga-amico .corpo div:first-child { font-weight: 700; }
.link-invito { display: flex; gap: 8px; }
.link-invito input { flex: 1; font-size: 0.85rem; }

/* Barra in basso flottante (telefono), come nel video */
@media (max-width: 767px) {
  .bottom-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 26px; padding: 8px 6px;
    background: rgba(31, 36, 57, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-forte); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .bottom-nav a { color: var(--text-muted); font-size: 0.66rem; }
  .bottom-nav a.active { color: var(--brand); background: transparent; }
  .bottom-nav a.active .nav-icon { background: var(--brand); color: var(--su-brand); border-radius: 50%; padding: 4px; width: 32px; height: 32px; margin: -4px 0 -2px; }
  body.con-nav .container { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .topbar-brand span { display: none; }
  .titolo-grande { font-size: 1.6rem; }
}

/* ══ Identita' Padel Forese (sopra lo stile app) ═══════════════════════ */
body {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(78, 154, 68, 0.14), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(140, 198, 63, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, .titolo-grande, .cta-gioca h2, .pc-titolo, .stat .v, .kpi-valore, .cal-testata strong,
.profilo-testa h1, .card-titolo, .biometria-proposta h2 { font-family: var(--font-titoli); }
.titolo-grande { font-weight: 800; letter-spacing: -0.01em; }
.topbar { background: rgba(27, 33, 80, 0.94); border-bottom: 2px solid var(--brand); }
.topbar-brand span { font-family: var(--font-titoli); font-weight: 800; letter-spacing: 0.01em; }
.topbar-nav a.active, .topbar-nav a:hover { background: rgba(140, 198, 63, 0.14); color: #fff; box-shadow: none; }
.topbar-nav a.active { color: var(--brand); }

/* Titoli di sezione con la lineetta lime, come la scia della pallina */
.sezione-titolo h2::before { content: ''; width: 18px; height: 4px; border-radius: 4px; background: var(--brand); display: inline-block; }
.card h2 { color: var(--verde); }
.etichetta-sezione { color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.76rem; font-weight: 800; }

/* "Inizia a giocare": lime con le linee del campo da padel */
.cta-gioca {
  background-color: var(--brand); color: var(--su-brand); border: 0;
  background-image:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(27, 33, 80, 0.16) calc(50% - 1px), rgba(27, 33, 80, 0.16) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent 22%, rgba(27, 33, 80, 0.16) 22%, rgba(27, 33, 80, 0.16) calc(22% + 2px), transparent calc(22% + 2px), transparent calc(78% - 2px), rgba(27, 33, 80, 0.16) calc(78% - 2px), rgba(27, 33, 80, 0.16) 78%, transparent 78%);
  box-shadow: 0 12px 30px rgba(140, 198, 63, 0.25);
}
.cta-gioca h2 { color: var(--su-brand); font-size: 1.45rem; font-weight: 800; }
.cta-gioca p { color: rgba(27, 33, 80, 0.8); font-weight: 600; }
.cta-gioca img { box-shadow: 0 6px 16px rgba(27, 33, 80, 0.3); }
.cta-gioca .freccia { color: var(--su-brand); }

/* Scheda partita: data a "biglietto" invece dell'icona del campo */
.biglietto {
  width: 58px; flex-shrink: 0; border-radius: 14px; overflow: hidden; text-align: center; background: var(--surface-alt);
  border: 1px solid var(--border-forte); font-family: var(--font-titoli); line-height: 1.1;
}
.biglietto .b-sett { background: var(--brand); color: var(--su-brand); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; padding: 3px 0; letter-spacing: 0.05em; }
.biglietto .b-num { font-size: 1.5rem; font-weight: 800; padding-top: 4px; }
.biglietto .b-mese { font-size: 0.7rem; color: var(--text-muted); padding-bottom: 5px; text-transform: uppercase; font-weight: 700; }
.biglietto.oggi .b-sett { background: var(--warning); }
.partita-card { border-left: 4px solid var(--brand); }
.partita-card.invito { border-left-color: var(--warning); }
.partita-card.passata { border-left-color: var(--border-forte); }
.chip-pieno { background: rgba(140, 198, 63, 0.16); color: var(--brand); }
.badge-ok { background: var(--brand); color: var(--su-brand); }

/* Barra in basso: blu del logo, voce attiva lime */
@media (max-width: 767px) {
  .bottom-nav { background: rgba(27, 33, 80, 0.95); border-color: var(--border-forte); }
  .bottom-nav a.active { color: var(--brand); }
}

/* Scritta PADEL FORESE nella barra in alto, sulla riga del pallino
   dell'utente: carattere del logo, PADEL verde e FORESE bianco (il blu del
   logo sul fondo blu non si leggerebbe). Visibile anche da telefono. */
.topbar-brand .topbar-scritta {
  display: inline-flex; gap: 0.3em; font-family: var(--font-titoli); font-weight: 900; font-size: 1.32rem;
  letter-spacing: 0.02em; line-height: 1; white-space: nowrap;
}
.topbar-scritta .w-padel { color: var(--verde); }
.topbar-scritta .w-forese { color: #fff; }
@media (max-width: 767px) {
  .topbar-brand span.topbar-scritta { display: inline-flex; font-size: 1.22rem; }
  .topbar-brand .topbar-scritta span { display: inline; }
}
