/* Gestionale — ASD M9 Sport Club APS.
   Palette del brand M9: monocromatica (nero #1a1919, grigio #8a8b8a, bianco) + accento oro.

   ⚠️ I NOMI delle variabili restano quelli del white label (--blu, --blu-scuro, --blu-chiaro):
   hanno 80 usi su 5 file, rinominarli allargherebbe il diff senza guadagno. Sono nomi bugiardi,
   quindi ecco la mappatura reale:
       --blu        nero M9      superfici (sidebar, login, planner), titoli, testo forte
       --blu-scuro  nero pieno   gradienti, stati premuti
       --blu-chiaro grigio caldo sfondi tenui, hover, badge
       --oro        accento      SOLO come sfondo/bordo, con testo NERO sopra
       --oro-testo  accento scuro  per il testo su bianco (link, etichette)

   ⚠️ Perché due ori (contrasti misurati, WCAG AA = 4.5 per il testo):
       oro #C79A3C su bianco ... 2.59  NO, illeggibile
       bianco su oro #C79A3C ... 2.59  NO  → mai testo bianco su bottone oro
       nero M9 su oro #C79A3C .. 6.78  OK  → bottone oro = scritta nera
       oro-testo #93712a su bianco 4.53 OK → questo, e solo questo, come testo */
:root {
  --blu: #1a1919;
  --blu-scuro: #000000;
  --blu-chiaro: #f4f2ee;
  --oro: #C79A3C;
  --oro-testo: #93712a;
  --oro-hover: #b38934;   /* stato premuto del bottone oro — nero sopra: 5.47 */
  --verde: #1e9e5a;
  --rosso: #cf2e2e;
  --testo: #333333;
  --grigio: #8a8b8a;   /* grigio del brand M9 */
  --bordo: #e4e2dd;
  --sfondo: #f5f4f2;
  --radius: 10px;
  --ombra: 0 2px 10px rgba(26, 25, 25, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Lato', sans-serif;
  color: var(--testo);
  background: var(--sfondo);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-title { font-family: 'Anton', 'Lato', sans-serif; font-weight: 400; letter-spacing: .5px; }
.boot { padding: 40px; text-align: center; color: var(--grigio); }
a { color: var(--oro-testo); }
button { font-family: inherit; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--blu) 0%, var(--blu-scuro) 100%);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 38px 34px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center;
}
.login-card img { max-width: 190px; margin-bottom: 6px; filter: none; }
.login-card .logo-blue { background: var(--blu); border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.login-card h1 { color: var(--blu); font-size: 26px; margin: 8px 0 2px; text-transform: uppercase; }
.login-card p.sub { color: var(--grigio); margin: 0 0 24px; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; }
.login-card input {
  width: 100%; padding: 13px 14px; margin-bottom: 12px; border: 1.5px solid var(--bordo);
  border-radius: 8px; font-size: 15px; font-family: inherit;
}
.login-card input:focus { outline: none; border-color: var(--oro); }
.login-card button {
  width: 100%; padding: 13px; background: var(--oro); color: var(--blu); border: none; border-radius: 8px;
  font-size: 15px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
}
.login-card button:hover { background: var(--oro-hover); }
.login-err { color: var(--rosso); font-size: 13.5px; min-height: 20px; margin-bottom: 8px; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: linear-gradient(180deg, var(--blu) 0%, var(--blu-scuro) 100%);
  color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  transition: transform .2s;
}
.sidebar .brand { padding: 20px 16px 14px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar .brand img { max-width: 150px; display: block; margin: 0 auto; }
.sidebar .brand .brand-title { font-size: 15px; margin-top: 8px; letter-spacing: 1.5px; color: #fff; text-transform: uppercase; }
.sidebar nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 18px; color: rgba(255,255,255,.82);
  text-decoration: none; font-size: 14.5px; font-weight: 700; border-left: 4px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.13); color: #fff; border-left-color: var(--oro); }
.sidebar nav a .ico { width: 21px; text-align: center; font-size: 16px; }
.sidebar .user-box { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.sidebar .user-box b { display: block; font-size: 14px; }
.sidebar .user-box .role { color: var(--oro); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.sidebar .user-box button {
  margin-top: 10px; background: rgba(255,255,255,.14); border: none; color: #fff; padding: 7px 12px;
  border-radius: 6px; cursor: pointer; font-size: 12.5px; width: 100%;
}
.sidebar .user-box button:hover { background: rgba(255,255,255,.25); }

.main { flex: 1; margin-left: 232px; padding: 26px 30px 60px; max-width: calc(100% - 232px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 27px; color: var(--blu); margin: 0; text-transform: uppercase; }
.topbar .season-pick { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--grigio); font-size: 13px; }
.topbar select { padding: 9px 12px; border: 1.5px solid var(--bordo); border-radius: 8px; font-size: 14px; background: #fff; font-weight: 700; color: var(--blu); }

.hamburger { display: none; position: fixed; top: 14px; left: 14px; z-index: 60; background: var(--blu); color: #fff; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; }

/* ---------- Cards / KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--ombra); border-top: 4px solid var(--blu); }
.kpi.green { border-top-color: var(--verde); }
.kpi.red { border-top-color: var(--rosso); }
.kpi.gold { border-top-color: var(--oro); }
.kpi .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--grigio); font-weight: 700; }
.kpi .val { font-size: 26px; font-weight: 900; margin-top: 5px; color: var(--testo); }
.kpi .sub { font-size: 12.5px; color: var(--grigio); margin-top: 3px; }
.kpi .val.pos { color: var(--verde); }
.kpi .val.neg { color: var(--rosso); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--ombra); margin-bottom: 16px; }
.card h3 { margin: 0 0 14px; color: var(--blu); font-size: 17px; text-transform: uppercase; }
.card h3 small { font-family: 'Lato'; color: var(--grigio); text-transform: none; font-weight: 400; letter-spacing: 0; }
.chart-box { position: relative; height: 280px; }

/* ---------- Alert ---------- */
.alert { padding: 12px 15px; border-radius: 8px; margin-bottom: 10px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: #fdf3e0; border: 1px solid #f0d9a8; color: #7a5b13; }
.alert.info { background: var(--blu-chiaro); border: 1px solid #e0ddd6; color: var(--blu-scuro); }
.alert.danger { background: #fdecec; border: 1px solid #f2c5c5; color: #8c1c1c; }
.alert b { font-weight: 900; }
.alert .act { margin-left: auto; white-space: nowrap; }

/* ---------- Tabelle ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 10px; color: var(--grigio); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; border-bottom: 2px solid var(--bordo); white-space: nowrap; }
td { padding: 10px 10px; border-bottom: 1px solid var(--bordo); vertical-align: middle; }
tr:hover td { background: #fafbfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .muted, .muted { color: var(--grigio); font-size: 12.5px; }
tfoot td { font-weight: 900; border-top: 2px solid var(--bordo); background: #f8fafd; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge.incasso { background: #e2f5ea; color: var(--verde); }
.badge.spesa { background: #fdecec; color: var(--rosso); }
.badge.fissa { background: #ece7f8; color: #5e3fa8; }
.badge.variabile { background: #fdf3e0; color: #9c6f0f; }
.badge.blu { background: var(--blu-chiaro); color: var(--blu); }
.badge.grey { background: #eef0f4; color: var(--grigio); }
.badge.gold { background: #faf0da; color: #8a6614; }
.badge.ok { background: #e2f5ea; color: var(--verde); }
.badge.warn { background: #fdf3e0; color: #9c6f0f; }
.badge.ko { background: #fdecec; color: var(--rosso); }

/* ---------- Form ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=email], select, textarea {
  padding: 9px 11px; border: 1.5px solid var(--bordo); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--testo);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--oro); }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--grigio); text-transform: uppercase; letter-spacing: .5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

.btn { background: var(--oro); color: var(--blu); border: none; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--oro-hover); }
.btn.green { background: var(--verde); }
.btn.green:hover { background: #17824a; }
.btn.ghost { background: #fff; color: var(--oro-testo); border: 1.5px solid var(--oro); }
.btn.ghost:hover { background: var(--blu-chiaro); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn.danger { background: #fff; color: var(--rosso); border: 1.5px solid #f2c5c5; }
.btn.danger:hover { background: #fdecec; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px 6px; color: var(--grigio); border-radius: 6px; }
.icon-btn:hover { background: var(--blu-chiaro); color: var(--blu); }

label.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; background: #fff; border: 1.5px solid var(--bordo); padding: 8px 12px; border-radius: 8px; }
label.chk:has(input:checked) { border-color: var(--oro); background: var(--blu-chiaro); }
label.chk input { accent-color: var(--oro); width: 16px; height: 16px; }
.flags-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--blu-chiaro); border: 1px solid #e0ddd6; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; color: var(--blu-scuro); }
table.recon { width: 100%; }
table.recon td { padding: 9px 6px; border-bottom: 1px solid var(--bordo); }
table.recon td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
table.recon tr.tot td { border-top: 2px solid var(--bordo); border-bottom: none; font-weight: 900; font-size: 16px; padding-top: 11px; }
table.bills th, table.bills td { white-space: nowrap; font-size: 13px; }
table.bills td.bill-missing { color: var(--rosso); font-weight: 800; background: #fdecec; text-align: center; border-radius: 4px; cursor: pointer; }
table.bills td.bill-missing:hover { background: #f8d4d4; text-decoration: underline; }
table.bills td.bill-future { color: #bdbab4; cursor: pointer; }
table.bills td.bill-future:hover { background: var(--blu-chiaro); color: var(--blu); }

.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12.5px; color: var(--grigio); }
.legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.planner-wrap { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--ombra); }
.plan-title { font-family: 'Anton', sans-serif; color: var(--blu); font-size: 17px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; text-align: center; }
table.planner { border-collapse: collapse; width: 100%; font-size: 11px; table-layout: fixed; }
table.planner th, table.planner td { border: 1px solid #dedbd5; padding: 0; height: 26px; text-align: center; overflow: hidden; }
table.planner thead th { background: var(--blu); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 0; }
table.planner th.rowh { background: #f4f6fa; color: var(--testo); font-size: 10px; font-weight: 700; width: 120px; text-align: left; padding-left: 6px; white-space: nowrap; }
table.planner tr.day-sep td { background: var(--blu-scuro); color: #fff; text-align: left; padding: 4px 8px; font-size: 12px; }
table.planner td.bk { color: #fff; font-weight: 700; font-size: 10px; cursor: pointer; position: relative; padding: 1px 3px; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
table.planner td.bk .bk-t { display: none; }
table.planner td.bk-empty { cursor: pointer; }
table.planner td.bk-empty:hover { background: var(--blu-chiaro); }
/* griglia più leggibile: linea marcata a ogni ora piena (su schermi poco contrastati) */
table.planner td.hstart { border-left: 2px solid #b5b2ac; }
table.planner thead th, table.planner tr.hour-row th { border-left: 2px solid #b5b2ac; }
table.planner td.bk-empty { background: #fbfcfe; }
table.planner tbody tr:hover td.bk-empty { background: #f4f2ee; }
/* menu tasto destro del planner */
.ctx-menu { position: fixed; z-index: 9999; min-width: 210px; background: #fff; border: 1px solid var(--bordo); border-radius: 10px; box-shadow: 0 10px 30px rgba(14,35,64,.22); padding: 5px; }
.ctx-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--testo); cursor: pointer; }
.ctx-menu button:hover { background: var(--blu-chiaro); color: var(--blu); }
.ctx-menu button[disabled] { opacity: .45; cursor: default; }
.ctx-menu button[disabled]:hover { background: none; color: var(--testo); }
.ctx-menu .ctx-sep { height: 1px; background: var(--bordo); margin: 4px 2px; }
.ctx-menu .ctx-tit { font-size: 11.5px; color: var(--grigio); padding: 4px 10px 2px; text-transform: uppercase; letter-spacing: .4px; }
/* planner: scorrendo i giorni restano visibili la riga degli orari e la colonna delle strutture */
.planner-wrap .tbl-wrap { max-height: calc(100vh - 250px); overflow: auto; }
table.planner thead th { position: sticky; top: 0; z-index: 5; box-shadow: inset 0 -1px 0 #e3e7ee; }
table.planner th.rowh { position: sticky; left: 0; z-index: 4; box-shadow: inset -1px 0 0 #e3e7ee; }
table.planner thead th.rowh { z-index: 7; box-shadow: inset -1px -1px 0 #e3e7ee; }
/* riga orari ripetuta per ogni giorno: serve nell'export e in stampa (a schermo c'è l'intestazione fissa) */
table.planner tr.hour-row { display: none; }
table.planner tr.hour-row th { background: var(--blu); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 0; }
table.planner tr.hour-row th.rowh { background: #f4f6fa; }
.planner-wrap.plan-export table.planner tr.hour-row, .planner-wrap.plan-export table.planner tr.hour-row th { display: table-cell; }
.planner-wrap.plan-export table.planner tr.hour-row { display: table-row; }
@media print { table.planner tr.hour-row { display: table-row; } }
/* orari: forma piena a schermo, compatta nell'export (ci sta anche ingrandita) */
table.planner .h-short { display: none; }
.planner-wrap.plan-export table.planner .h-full { display: none; }
.planner-wrap.plan-export table.planner .h-short { display: inline; }
.planner-wrap.plan-export table.planner { min-width: 1180px; }
/* export PNG: testi ingranditi e leggibili anche compressi da WhatsApp.
   L'intestazione in cima non serve: gli orari sono ripetuti sopra ogni giorno.
   Nota: con table-layout fixed le larghezze le detta la prima riga, quindi il thead
   non va rimosso dal flusso ma azzerato in altezza. */
.planner-wrap.plan-export table.planner thead th { height: 0; padding: 0; border: 0; font-size: 0; line-height: 0; overflow: hidden; }
.planner-wrap.plan-export table.planner th, .planner-wrap.plan-export table.planner td { height: 30px; }
.planner-wrap.plan-export table.planner th.rowh { font-size: 14px; font-weight: 800; }
.planner-wrap.plan-export table.planner tr.hour-row th { font-size: 15px; font-weight: 800; }
.planner-wrap.plan-export table.planner tr.day-sep td { font-size: 17px; padding: 7px 10px; }
.planner-wrap.plan-export table.planner td.bk { font-size: 13px; }
.planner-wrap.plan-export table.planner td.bk small { font-size: 11px; }
.planner-wrap.plan-export .plan-title { font-size: 23px; margin-bottom: 14px; }
/* orario evidenziato al passaggio del mouse sulla cella */
table.planner thead th.hl, table.planner tr.hour-row th.hl { background: var(--oro); color: var(--blu); }
.plan-hover { display: inline-block; min-width: 0; margin-left: 12px; padding: 1px 10px; border-radius: 6px; background: var(--oro); color: var(--blu); font-family: inherit; font-size: 15px; letter-spacing: 0; }
.plan-hover:empty { display: none; }
.planner-wrap.plan-export .plan-hover { display: none; }
/* export PNG e stampa: niente ritaglio, si vede tutta la settimana */
.planner-wrap.plan-export .tbl-wrap { max-height: none; overflow: visible; }
@media print { .planner-wrap .tbl-wrap { max-height: none; overflow: visible; } }

.seg { display: inline-flex; border: 1.5px solid var(--bordo); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: none; background: none; padding: 9px 16px; font-weight: 700; cursor: pointer; color: var(--grigio); font-size: 13.5px; }
.seg button.on.incasso { background: var(--verde); color: #fff; }
.seg button.on.spesa { background: var(--rosso); color: #fff; }
.seg button.on { background: var(--oro); color: var(--blu); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 20, 50, .5); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 30px 15px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 640px; box-shadow: 0 25px 70px rgba(0,0,0,.35); }
.modal h3 { margin: 0 0 16px; color: var(--blu); text-transform: uppercase; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal.wide { max-width: 900px; }

/* Anteprima ricevuta in modale (Incassi & Spese) */
.rcv-prev { background: #eef1f6; border: 1px solid var(--bordo); border-radius: 10px; padding: 10px; max-height: 72vh; overflow: auto; }
.rcv-prev-scale { position: relative; overflow: hidden; }
.rcv-prev-scale > .rcv-page { box-shadow: 0 4px 16px rgba(0, 45, 104, .12); }
.rcv-prev-frame { display: block; width: 100%; height: 68vh; min-height: 420px; border: 0; border-radius: 8px; background: #fff; }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--blu-scuro); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--ombra); animation: pop .18s ease; }
.toast.err { background: var(--rosso); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Bilancio ---------- */
.bilancio-table td:first-child { font-weight: 700; }
.bilancio-table .sezione td { background: var(--blu); color: #fff; font-weight: 900; text-transform: uppercase; font-size: 12.5px; letter-spacing: 1px; }
.bilancio-table .totale td { background: var(--blu-chiaro); font-weight: 900; }
.bilancio-table .risultato td { background: var(--blu-scuro); color: #fff; font-weight: 900; font-size: 15px; }
.scost.pos { color: var(--verde); font-weight: 700; }
.scost.neg { color: var(--rosso); font-weight: 700; }

.help-box { background: var(--blu-chiaro); border-radius: 8px; padding: 14px 16px; font-size: 13.5px; color: var(--blu-scuro); margin-bottom: 16px; line-height: 1.55; }

.progress { background: #eef0f4; border-radius: 20px; height: 8px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: var(--verde); border-radius: 20px; }
.progress > div.warn { background: var(--oro); }
.progress > div.over { background: var(--rosso); }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar .season-pick, .filters, .btn, .icon-btn, .hamburger, .no-print { display: none !important; }
  .main { margin: 0; max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .hamburger { display: block; }
  .main { margin-left: 0; max-width: 100%; padding: 70px 14px 60px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 21px; }
}

/* Ricevute: selezione anagrafica */
.pick-list { max-height: 210px; overflow-y: auto; }
.pick-item { padding: 8px 10px; border-bottom: 1px solid var(--bordo); cursor: pointer; border-radius: 6px; }
.pick-item:hover { background: var(--blu-chiaro, #f4f2ee); }
.pick-selected { background: var(--blu-chiaro, #f4f2ee); border: 1px solid var(--bordo); border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 13.5px; }
.badge.green { background: var(--verde); color: #fff; }

.row-warn td { background: #fff4e5; }
.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--oro, #C79A3C); }

/* Anagrafiche: card QR iscrizioni */
.qr-card { display:flex; gap:22px; align-items:center; flex-wrap:wrap; }
.qr-card .qr-info { flex:1; min-width:240px; }
.qr-card .qr-thumb { width:150px; height:auto; border:1px solid var(--bordo); border-radius:10px; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.10); }

/* Planner: conflitti e riepilogo ore */
.bk-conflict { outline: 3px solid #cf2e2e; outline-offset: -3px; }
.plan-summary { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:0 0 12px; padding:10px 14px; background:#fff; border:1px solid var(--bordo); border-radius:10px; font-size:13px; }
.plan-summary .lg { display:inline-flex; align-items:center; gap:6px; }

/* Vista fiscale: toggle */
.fiscal-tog { display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:700; color:var(--blu); cursor:pointer; margin-right:10px; }
.fiscal-tog input { width:16px; height:16px; }

/* Switch "Vista contabile" */
.switch { display:inline-flex; align-items:center; gap:8px; background:none; border:none; cursor:pointer; font-size:13px; font-weight:700; color:var(--blu); font-family:inherit; padding:4px 6px; margin-right:8px; }
.switch .sw-track { width:40px; height:22px; border-radius:22px; background:#cbc8c2; position:relative; transition:background .18s; flex:none; }
.switch .sw-knob { position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:left .18s; }
.switch.on .sw-track { background:var(--oro); }
.switch.on .sw-knob { left:20px; }

/* Planner: selezione a trascinamento */
.planner .bk-empty { cursor: cell; }
.planner .bk-empty.sel { background: rgba(0,65,149,.28); }
.planner { user-select: none; }

.bills .bill-set { cursor: pointer; }
.bills .bill-set:hover { background: var(--blu-chiaro, #f4f2ee); }

/* Tendina di cambio centro (solo installazioni multi-centro, vedi inc/config.php CENTRI) */
.centro-pick { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 10px; border-radius: 8px; border: 1.5px solid var(--bordo); font-weight: 700; font-size: 13px; }
.centro-pick select { font-weight: 700; border: 0; background: transparent; padding: 2px 4px; color: inherit; }
.centro-pick { border-color: var(--oro); color: var(--oro-testo); background: var(--blu-chiaro); }
