/* Gestionale Protezione Civile Sala Bolognese */
:root {
  --blu: #0b3d91; --blu-scuro: #072a66; --giallo: #f5c400; --arancio: #ef7d00; --rosso: #c62828;
  --verde: #2e7d32; --grigio: #6b7280; --bordo: #dde3ec; --sfondo: #f3f5f9; --testo: #1f2937;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 14px;
       color: var(--testo); background: var(--sfondo); }
a { color: var(--blu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.muted { color: var(--grigio); }
.small { font-size: 12px; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: var(--blu-scuro); color: #fff; flex-shrink: 0; position: sticky; top: 0;
           height: 100vh; overflow-y: auto; }
.brand { padding: 16px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand .logo { width: 38px; height: 38px; border-radius: 50%; background: var(--giallo); display: grid;
               place-items: center; flex-shrink: 0; }
.brand .logo svg { width: 24px; height: 24px; }
.brand b { font-size: 13px; line-height: 1.2; display: block; }
.brand span { font-size: 11px; opacity: .75; }
.nav { padding: 8px 0; }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; padding: 14px 18px 4px; }
.nav a { display: block; color: #e8eefc; padding: 8px 18px; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.on { background: rgba(255,255,255,.12); border-left-color: var(--giallo); color: #fff; font-weight: 600; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--bordo); padding: 10px 24px; display: flex;
          justify-content: space-between; align-items: center; }
.content { padding: 22px 24px 60px; max-width: 1400px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px;
        flex-wrap: wrap; }
.azioni { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* card */
.card { background: #fff; border: 1px solid var(--bordo); border-radius: var(--radius); padding: 16px 18px;
        margin-bottom: 16px; }
.card > h2:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px;
             flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
@media (max-width: 1000px) { .g2, .g3, .g4, .g6 { grid-template-columns: 1fr 1fr; } .sidebar { width: 190px; } }

.kpi { background: #fff; border: 1px solid var(--bordo); border-radius: var(--radius); padding: 14px 16px;
       border-top: 4px solid var(--blu); }
.kpi .v { font-size: 26px; font-weight: 700; }
.kpi .l { color: var(--grigio); font-size: 12px; }
.kpi.giallo { border-top-color: var(--giallo); } .kpi.rosso { border-top-color: var(--rosso); }
.kpi.verde { border-top-color: var(--verde); } .kpi.arancio { border-top-color: var(--arancio); }

/* tabelle */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--grigio); font-weight: 600; background: #f8fafc; white-space: nowrap; }
tr:hover td { background: #fafcff; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.empty { color: var(--grigio); padding: 14px 4px; font-style: italic; }

/* badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
         background: #e5e7eb; color: #374151; white-space: nowrap; }
.b-verde { background: #dcfce7; color: #166534; } .b-rosso { background: #fee2e2; color: #991b1b; }
.b-giallo { background: #fef9c3; color: #854d0e; } .b-arancio { background: #ffedd5; color: #9a3412; }
.b-blu { background: #dbeafe; color: #1e40af; } .b-grigio { background: #f3f4f6; color: #6b7280; }
.allerta-Verde { background: #16a34a; color: #fff; } .allerta-Gialla { background: #facc15; color: #422006; }
.allerta-Arancione { background: #f97316; color: #fff; } .allerta-Rossa { background: #dc2626; color: #fff; }
.scaduta { color: #b91c1c; font-weight: 700; } .urgente { color: #c2410c; font-weight: 600; }
.prossima { color: #a16207; } .ok { color: #166534; }
tr.r-scaduta td { background: #fff5f5; } tr.r-urgente td { background: #fffaf0; }

/* bottoni */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 6px; border: 1px solid
       var(--blu); background: var(--blu); color: #fff; font-size: 13px; cursor: pointer; font-family: inherit;
       white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--blu-scuro); text-decoration: none; }
.btn.sec { background: #fff; color: var(--blu); }
.btn.sec:hover { background: #eef3fc; }
.btn.danger { background: #fff; color: var(--rosso); border-color: #f1c4c4; }
.btn.danger:hover { background: #fdecec; }
.btn.warn { background: var(--arancio); border-color: var(--arancio); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* form */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 12px 14px; }
.fg { display: flex; flex-direction: column; gap: 4px; }
.fg label { font-size: 12px; font-weight: 600; color: #374151; }
.fg .help { font-size: 11px; color: var(--grigio); }
.fg.chk { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 18px; }
.fg.chk .help { flex-basis: 100%; }
.fsection { grid-column: span 12; font-weight: 700; color: var(--blu); border-bottom: 2px solid #e6ecf7;
            padding: 10px 0 4px; margin-top: 4px; font-size: 13.5px; }
.fsection:first-child { padding-top: 0; margin-top: 0; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #cfd6e1; border-radius: 6px;
                          background: #fff; width: 100%; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd0f5; border-color: var(--blu); }
input[type=checkbox] { width: auto; transform: scale(1.15); }
.w1{grid-column:span 1}.w2{grid-column:span 2}.w3{grid-column:span 3}.w4{grid-column:span 4}.w5{grid-column:span 5}
.w6{grid-column:span 6}.w7{grid-column:span 7}.w8{grid-column:span 8}.w9{grid-column:span 9}.w10{grid-column:span 10}
.w11{grid-column:span 11}.w12{grid-column:span 12}
@media (max-width: 900px) { .form-grid > * { grid-column: span 12 !important; } }
.form-actions { grid-column: span 12; display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid #eef1f6;
                margin-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input, .filters select { width: auto; min-width: 160px; }

/* messaggi */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* dettagli */
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--grigio); font-size: 12.5px; }
dl.kv dd { margin: 0; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--bordo); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--grigio); border-bottom: 3px solid transparent; margin-bottom: -2px;
          font-weight: 600; }
.tabs a:hover { color: var(--blu); text-decoration: none; }
.tabs a.on { color: var(--blu); border-bottom-color: var(--blu); }
.tabs .cnt { background: #eef2f8; border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.tab { display: none; } .tab.on { display: block; }

/* fasi */
.fasi { display: flex; gap: 0; margin: 10px 0 4px; flex-wrap: wrap; }
.fasi .f { flex: 1; min-width: 120px; text-align: center; padding: 9px 6px; background: #eef1f6; color: #6b7280;
           font-size: 12px; font-weight: 600; position: relative; border-right: 2px solid #fff; }
.fasi .f.done { background: #c7d7f2; color: var(--blu-scuro); }
.fasi .f.cur { background: var(--blu); color: #fff; }
.fasi .f.cur.f-Allarme, .fasi .f.cur.f-Emergenza { background: var(--rosso); }
.fasi .f.cur.f-Preallarme { background: var(--arancio); }
.fasi .f.cur.f-Attenzione { background: #d4a400; }
.fasi .f.cur.f-Chiusa { background: var(--verde); }
.timeline { border-left: 3px solid #d7e0ee; margin-left: 8px; padding-left: 16px; }
.timeline .ev { position: relative; padding-bottom: 12px; }
.timeline .ev::before { content: ''; position: absolute; left: -23px; top: 3px; width: 11px; height: 11px;
                        border-radius: 50%; background: var(--blu); border: 2px solid #fff; }
.diario-item { border-left: 4px solid #cbd5e1; padding: 8px 12px; margin-bottom: 8px; background: #fbfcfe;
               border-radius: 0 6px 6px 0; }
.diario-item.p-Urgente { border-left-color: var(--arancio); }
.diario-item.p-Flash { border-left-color: var(--rosso); background: #fff7f7; }
.diario-item .meta { font-size: 12px; color: var(--grigio); margin-bottom: 3px; }
.diario-item .msg { white-space: pre-wrap; }

.checklist { max-height: 300px; overflow-y: auto; border: 1px solid var(--bordo); border-radius: 6px; padding: 6px 10px;
             columns: 3 220px; }
.checklist label { display: block; padding: 3px 0; break-inside: avoid; }
details.box { border: 1px dashed #c7d2e3; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
              background: #fbfcff; }
details.box summary { cursor: pointer; font-weight: 600; color: var(--blu); }
details.box[open] summary { margin-bottom: 10px; }
.alert-box { padding: 10px 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px; margin-bottom: 12px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--blu-scuro), var(--blu)); }
.login-box { background: #fff; padding: 30px; border-radius: 12px; width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }

/* stampa */
@media print {
  .sidebar, .topbar, .no-print, .btn { display: none !important; }
  body { background: #fff; font-size: 11.5px; }
  .content { padding: 0; max-width: none; }
  .card { border: none; padding: 0; margin-bottom: 14px; page-break-inside: avoid; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}

/* ---- NUXUS multi-associazione ---- */
.brand-app { font-style: normal; color: #ffd84d; font-weight: 700; letter-spacing: .5px; }
.sidebar { display: flex; flex-direction: column; }
.sidebar-footer { margin-top: auto; padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; line-height: 1.5; color: rgba(255,255,255,.55); }
.utente-box { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.utente-box form { margin: 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #173a8a 0%, #0b1f4d 45%, #040b1e 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 12px; padding: 34px 36px; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card h1 { margin: 0; font-size: 34px; letter-spacing: .08em; text-align: center; color: #0b3d91; font-family: 'Palatino Linotype', Georgia, serif; }
.login-card .sub { text-align: center; color: #6b7280; margin-bottom: 22px; font-size: 13px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.login-card input[type=email], .login-card input[type=password], .login-card input[type=text] { width: 100%; }
.login-copy { text-align: center; color: rgba(255,255,255,.55); font-size: 11px; margin-top: 18px; line-height: 1.5; }
.validation-summary-errors ul, .field-validation-error { color: #b91c1c; font-size: 13px; }
.validation-summary-errors ul { margin: 0 0 12px; padding-left: 18px; }
.validation-summary-valid { display: none; }
.pw-box { font-family: Consolas, monospace; font-size: 18px; background: #fffbeb; border: 1px dashed #f59e0b; padding: 10px 14px; border-radius: 8px; display: inline-block; user-select: all; }
table.kv th { text-align: left; width: 220px; background: none; font-weight: 600; color: #475569; }
.log-diff td.prima { color: #b91c1c; text-decoration: line-through; } .log-diff td.dopo { color: #15803d; font-weight: 600; }

/* fase 2: elenchi e tabelle di sistema */
.b-ambra { background: #fef3c7; color: #92400e; }
.b-blu { background: #dbeafe; color: #1e40af; }
.testo-rosso { color: #b91c1c; } .testo-ambra { color: #92400e; }
.badge.sm, .btn.sm { font-size: 11px; padding: 2px 7px; }
.riga-azioni { display: inline-flex; gap: 4px; align-items: center; }
.riga-azioni input { width: auto; padding: 3px 6px; font-size: 12px; }
.filters .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.filters .chk input { width: auto; min-width: 0; }
.riga-gruppo { background: #f1f5fb; font-weight: 700; color: var(--blu); font-size: 12.5px;
               text-transform: uppercase; letter-spacing: .04em; }
.numeri { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.numero { flex: 1 1 140px; background: #f6f8fc; border: 1px solid #e6ecf7; border-radius: 8px; padding: 12px 14px; }
.numero b { display: block; font-size: 26px; color: var(--blu); line-height: 1.1; }
.numero span { font-size: 12px; color: var(--grigio); }

/* cruscotto */
.kpi .n { color: var(--grigio); font-size: 11.5px; margin-top: 3px; line-height: 1.35; }
.kpi.allarme { border-top-color: var(--rosso); }
.kpi.allarme .v { color: #b91c1c; }
.elenco-avvisi { margin: 6px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; color: #374151; }
.elenco-avvisi li { margin-bottom: 2px; }

/* tendina dei comuni */
.luogo { display: contents; }
.fg { position: relative; }
.suggerimenti { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff;
                border: 1px solid #cfd6e1; border-top: none; border-radius: 0 0 6px 6px;
                box-shadow: 0 8px 20px rgba(15,23,42,.12); max-height: 260px; overflow-y: auto; }
.suggerimento { display: block; width: 100%; text-align: left; padding: 6px 9px; border: none;
                background: none; font: inherit; cursor: pointer; }
.suggerimento:hover, .suggerimento.attivo { background: #eef4ff; }
.suggerimento span { color: var(--grigio); font-size: 12px; }
input[readonly] { color: #475569; }

/* scelta di più comuni: targhette sopra la casella di ricerca */
.comuni-multi .targhette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; min-height: 22px;
                           align-items: center; }
.targhetta { display: inline-flex; align-items: center; gap: 6px; background: #eef4ff; color: var(--blu);
             border: 1px solid #c7d7f5; border-radius: 999px; padding: 2px 6px 2px 10px; font-size: 12.5px; }
.targhetta button { border: none; background: none; color: var(--grigio); cursor: pointer; font-size: 15px;
                    line-height: 1; padding: 0 2px; }
.targhetta button:hover { color: var(--rosso); }

/* schede più leggibili */
.obbl { color: #b91c1c; font-weight: 700; }
.legenda { margin: -4px 0 10px; }
.riga-stato { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin-top: 4px; }
.fsection .sottotitolo { font-weight: 400; color: var(--grigio); font-size: 12px; margin-left: 8px;
                         text-transform: none; letter-spacing: 0; }
.alert-box.rosso { background: #fef2f2; border-color: #fca5a5; }

/* mappa del magazzino: un riquadro per ubicazione, con la barra di riempimento */
.mappa { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.posto { display: block; text-decoration: none; color: inherit; border: 1px solid var(--bordo);
         border-left: 5px solid var(--grigio); border-radius: var(--radius); padding: 10px 12px;
         background: #fff; }
.posto:hover { box-shadow: 0 4px 14px rgba(15,23,42,.10); }
.posto.libero { border-left-color: #16a34a; }
.posto.quasi { border-left-color: #d97706; }
.posto.pieno { border-left-color: #dc2626; }
.posto.vuoto { border-left-color: #cbd5e1; }
.posto.senza-capienza { border-left-color: #2563eb; }
.posto.spento { opacity: .55; }
.posto-testa { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.posto-desc { font-size: 12.5px; color: #374151; }
.posto .barra { height: 8px; border-radius: 4px; background: #eef2f7; margin: 8px 0 6px; overflow: hidden; }
.posto .barra span { display: block; height: 100%; background: #16a34a; }
.posto.quasi .barra span { background: #d97706; }
.posto.pieno .barra span { background: #dc2626; }
.posto.senza-capienza .barra { background: repeating-linear-gradient(90deg, #eef2f7 0 6px, #e2e8f0 6px 12px); }
.posto-numeri { display: flex; justify-content: space-between; font-size: 12.5px; }
.posto-segnali { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* =====================================================================
   Marchio, ente corrente e pagina di accesso
   ===================================================================== */

/* l'ente per cui si opera: oro per la Consulta, verde acqua per l'associazione */
:root { --ente: #60a5fa; --ente-scuro: #1d4ed8; --ente-chiaro: #eff6ff; --ente-testo: #1e3a8a; }
body.ente-consulta { --ente: #f5b301; --ente-scuro: #b45309; --ente-chiaro: #fff8e1; --ente-testo: #7c4a03; }
body.ente-odv      { --ente: #14b8a6; --ente-scuro: #0f766e; --ente-chiaro: #e7f8f5; --ente-testo: #115e59; }

.nx-logo { display: block; }
.brand .nx-logo { width: 36px; height: 36px; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand b { font-size: 15px; letter-spacing: .12em; font-family: 'Palatino Linotype', Georgia, serif; }

.sidebar { background: linear-gradient(180deg, #0a2457 0%, #071a42 100%); }
.nav a.on { border-left-color: var(--ente); }
.nav .grp { opacity: 1; color: rgba(255,255,255,.5); }
.nav .grp-consulta, .nav .grp-odv { display: flex; align-items: center; gap: 8px; color: #fff; opacity: .9; }
.nav .grp-consulta::before, .nav .grp-odv::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.nav .grp-consulta::before { background: #f5b301; box-shadow: 0 0 8px #f5b301; }
.nav .grp-odv::before { background: #14b8a6; box-shadow: 0 0 8px #14b8a6; }

.ente-card { display: flex; gap: 10px; align-items: center; margin: 12px 12px 4px; padding: 10px 11px;
             border-radius: 10px; color: #fff; text-decoration: none !important;
             background: linear-gradient(135deg, color-mix(in srgb, var(--ente) 34%, transparent), rgba(255,255,255,.04));
             border: 1px solid color-mix(in srgb, var(--ente) 60%, transparent);
             box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 18px rgba(0,0,0,.25); }
.ente-card:hover { border-color: var(--ente); }
.ente-sigillo { min-width: 38px; padding: 0 6px; height: 38px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
                font-weight: 800; font-size: 12px; letter-spacing: .03em; color: #0b1a46; background: var(--ente);
                box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.ente-testo { min-width: 0; display: flex; flex-direction: column; }
.ente-tipo { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ente); }
.ente-nome { font-size: 13px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 4;
             -webkit-box-orient: vertical; overflow: hidden; }
.ente-dett { font-size: 11px; opacity: .72; margin-top: 2px; }

.topbar { border-top: 4px solid var(--ente); background: linear-gradient(90deg, var(--ente-chiaro), #fff 60%); }
.topbar-ente { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ente-chip { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px;
             border-radius: 999px; background: var(--ente); color: #0b1a46; }
.topbar-nome { font-size: 16px; font-weight: 700; color: var(--ente-testo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------------------------------------------------------------- accesso */
body.accesso { min-height: 100vh; background: radial-gradient(ellipse at 20% 10%, #16357f 0%, #0a1c4a 45%, #030817 100%);
               color: #fff; overflow-x: hidden; }
#nx-rete { position: fixed; inset: 0; z-index: 0; }
.accesso-aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(70px); opacity: .55; }
.accesso-aurora i { position: absolute; border-radius: 50%; animation: nxDeriva 18s ease-in-out infinite alternate; }
.accesso-aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: #1d4ed8; }
.accesso-aurora i:nth-child(2) { width: 34vw; height: 34vw; right: -8vw; bottom: -10vw; background: #0ea5e9; animation-delay: -6s; }
.accesso-aurora i:nth-child(3) { width: 22vw; height: 22vw; right: 22vw; top: 8vh; background: #ca8a04; opacity: .55; animation-delay: -12s; }
@keyframes nxDeriva { to { transform: translate(6vw, 5vh) scale(1.15); } }

.accesso-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
                align-items: center; gap: 48px; max-width: 1180px; margin: 0 auto; padding: 40px 32px; }
.accesso-hero { animation: nxEntra .9s cubic-bezier(.2,.8,.2,1) both; }
.accesso-marchio .nx-logo { width: 116px; height: 116px; filter: drop-shadow(0 0 28px rgba(96,165,250,.55)); }
.accesso-marchio .nx-traccia { stroke-dasharray: 90; stroke-dashoffset: 90; animation: nxTraccia 1.6s .3s ease forwards; }
.accesso-marchio .nx-nodo { transform-origin: center; transform-box: fill-box; animation: nxNodo 2.8s 1.6s ease-in-out infinite; }
.accesso-marchio .nx-guida { animation-delay: 1.9s; }
@keyframes nxTraccia { to { stroke-dashoffset: 0; } }
@keyframes nxNodo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.accesso-nome { margin: 22px 0 6px; font-size: clamp(48px, 7vw, 84px); line-height: 1; letter-spacing: .16em;
                font-family: 'Palatino Linotype', Georgia, serif; font-weight: 700;
                background: linear-gradient(100deg, #e0f2fe 0%, #7dd3fc 35%, #ffffff 50%, #facc15 75%, #e0f2fe 100%);
                background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
                animation: nxLuce 7s linear infinite; }
@keyframes nxLuce { to { background-position: -220% 0; } }
.accesso-motto { margin: 0; font-size: 18px; color: #bae6fd; letter-spacing: .04em; }
.accesso-testo { margin: 18px 0 22px; max-width: 470px; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.6; }
/* la rete: frase, schema con la Consulta al centro e le associazioni intorno, flussi di dati */
.rete-blocco { margin: 30px 0 0; max-width: 600px; }
.rete-titolo { margin: 0; max-width: 30ch; font-size: clamp(21px, 2.1vw, 28px); line-height: 1.28; font-weight: 600;
               letter-spacing: -.012em; color: #f1f5ff; text-wrap: balance;
               font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; }
.rete-schema { position: relative; margin: 14px 0 4px; }
.rete-schema svg { display: block; width: 100%; height: auto; overflow: visible; }
.rete-radar circle { fill: none; stroke: rgba(125,211,252,.12); stroke-width: 1; stroke-dasharray: 2 5; }
.rete-radar circle:first-child { stroke: rgba(250,204,21,.22); stroke-dasharray: none; }
.rete-pari line { stroke: rgba(125,211,252,.14); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; animation: reteCompari .8s 1.1s ease forwards; }
.rete-linee path { fill: none; stroke: rgba(125,211,252,.5); stroke-width: 1.5;
                   animation: reteTraccia .9s calc(.25s + var(--r)) cubic-bezier(.6,0,.2,1) forwards; }
.rete-nodo { opacity: 0; animation: reteCompari .45s calc(.25s + var(--r)) ease forwards; }
.rete-nodo polygon { fill: #0c2a6b; stroke: #7dd3fc; stroke-width: 1.6; }
.rete-etichetta { fill: #facc15; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-anchor: middle; }
.rete-nodo circle { fill: #bae6fd; }
.rete-nodo.ricevuto polygon, .rete-centro.ricevuto .rete-anello { animation: reteRicevuto .7s ease-out; }
.rete-anello { fill: #0b1d4d; stroke: #facc15; stroke-width: 2; }
.rete-alone { animation: reteRespiro 3.6s ease-in-out infinite; transform-origin: 280px 125px; }
.rete-impulso { stroke: rgba(255,255,255,.85); stroke-width: 1.2; }
/* un colore per flusso: lo stesso nello schema e nella legenda */
.f-volontari, .rete-flussi [data-flusso=volontari] i { fill: #38bdf8; background: #38bdf8; color: #38bdf8; }
.f-mezzi, .rete-flussi [data-flusso=mezzi] i { fill: #facc15; background: #facc15; color: #facc15; }
.f-magazzino, .rete-flussi [data-flusso=magazzino] i { fill: #34d399; background: #34d399; color: #34d399; }
.f-emergenze, .rete-flussi [data-flusso=emergenze] i { fill: #fb7185; background: #fb7185; color: #fb7185; }
.rete-impulso { filter: drop-shadow(0 0 5px currentColor); }
.rete-flussi { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.rete-flussi li { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: rgba(226,236,255,.62);
                  transition: color .25s; }
.rete-flussi i { width: 9px; height: 9px; border-radius: 50%; opacity: .45; transition: opacity .25s, box-shadow .25s; }
.rete-flussi li.attivo { color: #fff; }
.rete-flussi li.attivo i { opacity: 1; box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 0 12px currentColor; }
.rete-stato { margin: 14px 0 0; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: #facc15; }
.rete-spia { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6);
             animation: reteSpia 2s ease-out infinite; }
@keyframes reteTraccia { to { stroke-dashoffset: 0; } }
@keyframes reteCompari { to { opacity: 1; } }
@keyframes reteRicevuto { 0% { stroke: #fff; stroke-width: 3.5; } 100% { } }
@keyframes reteRespiro { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes reteSpia { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 100% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } }

.accesso-pannello { animation: nxEntra .9s .15s cubic-bezier(.2,.8,.2,1) both; }
.accesso-card { position: relative; isolation: isolate; padding: 30px 32px 32px; border-radius: 20px; color: var(--testo);
                background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 40px rgba(59,130,246,.25); }
/* bordo luminoso che gira: è solo una cornice di 2px, il resto viene ritagliato */
.accesso-card::before { content: ""; position: absolute; inset: -2px; border-radius: 22px; padding: 2px; pointer-events: none;
                        background: conic-gradient(from var(--nx-giro, 0deg), #3b82f6, #7dd3fc, #facc15, #3b82f6);
                        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
                        -webkit-mask-composite: xor; mask-composite: exclude;
                        animation: nxGiro 6s linear infinite; }
@property --nx-giro { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes nxGiro { to { --nx-giro: 360deg; } }
.accesso-card-testa { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.accesso-mini .nx-logo { width: 44px; height: 44px; }
.accesso-titolo { font-size: 20px; font-weight: 700; color: #0b1a46; }
.accesso-sotto { font-size: 12px; color: var(--grigio); }
.accesso-modulo label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
                        color: #475569; margin: 14px 0 6px; }
.campo-icona { position: relative; }
.campo-icona svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #64748b; pointer-events: none; }
.accesso-modulo input[type=email], .accesso-modulo input[type=password], .accesso-modulo input[type=text] {
    width: 100%; padding: 12px 12px 12px 40px; font-size: 15px; border-radius: 10px; border: 1px solid #cbd5e1;
    background: #f8fafc; transition: border-color .2s, box-shadow .2s, background .2s; }
.accesso-modulo input:focus { outline: none; border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
.accesso-modulo input:focus + svg, .campo-icona:focus-within svg { color: #2563eb; }
.btn-accesso { position: relative; overflow: hidden; width: 100%; margin-top: 24px; padding: 13px; border: 0; border-radius: 10px;
               font-size: 15px; font-weight: 700; letter-spacing: .04em; color: #fff; cursor: pointer;
               background: linear-gradient(135deg, #1d4ed8, #0ea5e9); box-shadow: 0 10px 24px rgba(29,78,216,.35);
               transition: transform .15s, box-shadow .2s; }
.btn-accesso:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(29,78,216,.45); }
.btn-accesso::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
                      background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
                      transform: skewX(-20deg); animation: nxRiflesso 3.5s 1.5s ease-in-out infinite; }
@keyframes nxRiflesso { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.accesso-copy { text-align: center; color: rgba(255,255,255,.5); font-size: 11px; margin-top: 18px; line-height: 1.6; }
.accesso-card .alert-box { margin-bottom: 8px; }
@keyframes nxEntra { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .accesso-wrap { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; }
  .accesso-hero { text-align: center; }
  .accesso-marchio .nx-logo { width: 76px; height: 76px; margin: 0 auto; }
  .accesso-testo { display: none; }
  .rete-blocco { margin: 20px auto 0; }
  .rete-titolo { margin: 0 auto; font-size: 19px; }
  .rete-flussi { justify-content: center; gap: 4px 16px; }
  .rete-flussi li { font-size: 14px; }
  .accesso-mini { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .accesso-aurora i, .accesso-nome, .accesso-card::before, .btn-accesso::after,
  .accesso-marchio .nx-nodo, .accesso-hero, .accesso-pannello, .rete-alone, .rete-spia { animation: none !important; }
  .accesso-marchio .nx-traccia { animation: none; stroke-dashoffset: 0; }
  .rete-pari line, .rete-nodo { animation: none !important; opacity: 1; }
  .rete-linee path { animation: none !important; }
}

/* attivazione: riga dei km modificabile e avviso di emergenza acquisita */
.riga-km { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.riga-km input[type=number] { width: 100px; }
.riga-km .sel-autista { width: 190px; }
.riga-km input[name=note] { flex: 1; min-width: 140px; }
.km-percorsi { font-weight: 700; min-width: 70px; text-align: right; }
.avviso-acquisita { border-left: 4px solid #2563eb; background: #eff6ff; }
.badge.b-verdeacqua { background: #ccfbf1; color: #115e59; margin-top: 3px; display: inline-block; }
.scelta-colonna { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.scelta-colonna label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; white-space: nowrap;
                        border: 1px solid var(--bordo); border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.scelta-colonna input[type=radio] { width: auto; height: auto; margin: 0; padding: 0; box-shadow: none; accent-color: var(--blu); }
.scelta-colonna label:has(input:checked) { border-color: var(--blu); background: #eff6ff; color: var(--blu); }
.scelta-colonna .da-indicare { color: #b45309; border-color: #f59e0b; }

/* scelta dei volontari: impiego per chi non va sul campo */
.riga-volontario { border-bottom: 1px solid var(--bordo); padding: 6px 0; }
.riga-volontario > label { display: block; }
.riga-volontario .impiego { display: none; gap: 6px; margin: 6px 0 2px 24px; flex-wrap: wrap; }
.riga-volontario.scelto .impiego { display: flex; }
.riga-volontario .impiego select { width: auto; min-width: 220px; }
.riga-volontario .impiego input { flex: 1; min-width: 160px; }
.riga-volontario.solo-supporto.scelto { background: #fffbeb; }
.checklist[data-gruppo="altri"] { display: block; columns: auto; max-height: 480px; }
.checklist[data-gruppo="altri"] .riga-volontario { break-inside: avoid; }
.riga-volontario .impiego select { min-width: 260px; }
.scelta-patenti { display: flex; flex-wrap: wrap; gap: 6px; }
.scelta-patenti label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border: 1px solid var(--bordo);
                        border-radius: 999px; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.scelta-patenti input[type=checkbox] { width: auto; margin: 0; }
.scelta-patenti label:has(input:checked) { border-color: var(--blu); background: #eff6ff; color: var(--blu); }
.scelta-patenti .fuori-tabella { border-color: #f59e0b; color: #b45309; }
.mezzi-colonna { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.mezzi-colonna .badge { text-decoration: none; }
.riga-spenta { opacity: .55; }

/* amministrazione */
.bilancio-banda { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 14px; }
.bilancio-banda label { margin-right: 6px; }
.bilancio-stato .badge { font-size: 12.5px; }
table.schema { width: 100%; border-collapse: collapse; font-size: 13px; }
table.schema th, table.schema td { padding: 4px 8px; border-bottom: 1px solid #e5eaf2; vertical-align: top; }
table.schema td.num, table.schema th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.schema tr.sez th { background: #eef3fa; color: var(--blu); text-align: left; font-size: 12.5px; }
table.schema tr.tot td { font-weight: 700; border-top: 1px solid #c9d4e4; }
table.schema tr.av td { font-style: italic; color: #334155; }
table.schema tr.big td { font-size: 14px; background: #f6f8fc; }
table.schema td.prec { color: #94a3b8; }
.intest-bilancio { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.firme { display: flex; justify-content: space-around; margin-top: 40px; font-size: 13px; }
.firme div { border-top: 1px solid #94a3b8; padding-top: 4px; min-width: 180px; text-align: center; }
.importo-e { color: #15803d; } .importo-u { color: #b91c1c; }
.quadra-ok { color: #15803d; font-weight: 600; } .quadra-ko { color: #b91c1c; font-weight: 600; }
.tabs-gruppi { align-items: flex-end; row-gap: 4px; }
.tabs-gruppi .tab-grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; padding: 0 2px 10px 10px; align-self: flex-end; }
.tabs-gruppi .tab-grp:first-child { padding-left: 0; }
.tabs-gruppi a { padding: 9px 10px; }
.lettera { max-width: 820px; margin: 0 auto; padding: 34px 44px; font-size: 14.5px; line-height: 1.6; }
.lettera p { margin: 0 0 12px; text-align: justify; }
.lettera-intest { border-bottom: 2px solid #0b3d91; padding-bottom: 12px; margin-bottom: 22px; }
.lettera-dest { margin: 0 0 22px auto; width: 45%; min-width: 240px; }
.lettera-ogg { margin-bottom: 18px; }
.lettera-firma { display: flex; justify-content: space-between; align-items: flex-end; margin: 26px 0 10px; }
.lettera-ricevuta { margin-top: 26px; border: 1px solid #94a3b8; border-radius: 6px; padding: 14px 18px; font-size: 12.5px; line-height: 1.5; background: #f8fafc; }
.lettera-ricevuta p { margin: 8px 0; }
@media print { .lettera { box-shadow: none; border: none; padding: 0; max-width: none; } .lettera-ricevuta { background: #fff; break-inside: avoid; } }
table.schema tr.sez th.num { text-align: right; }
.scelte-multi { color: var(--blu); font-weight: 600; margin-top: 3px; min-height: 0; }
.nav a.sub { padding: 6px 18px 6px 34px; font-size: 13px; color: #c7d4f0; }
.nav a.sub::before { content: "↳ "; opacity: .55; }
.print-only { display: none; }
@media print { .print-only { display: table-cell; } .dotazioni-mezzo { break-inside: avoid; } }

/* archivio documentale */
.documenti .doc-carica { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--bordo); }
tr.doc-vecchio td { color: #94a3b8; }
.doc-compatti { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.doc-chip { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef4ff; border: 1px solid #c7d7f5; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.doc-mini { display: inline-flex; gap: 4px; align-items: center; }
.doc-mini select { width: auto; max-width: 120px; font-size: 11px; padding: 2px 4px; }
.doc-file { position: relative; overflow: hidden; cursor: pointer; }
.doc-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.barra-spazio { height: 8px; border-radius: 6px; background: #e6ecf7; overflow: hidden; }
.barra-spazio i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #eab308 70%, #ef4444); }

/* file del documento: si capisce subito che c'è e che si apre con un clic */
.doc-file-box { display: inline-flex; align-items: stretch; gap: 4px; margin-bottom: 3px; }
.doc-apri { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border: 1px solid #b7e4c7; background: #f0fbf4;
    border-radius: 8px; color: inherit; text-decoration: none; transition: background .15s, box-shadow .15s, transform .15s; }
.doc-apri:hover, .doc-apri:focus-visible { text-decoration: none; background: #dcf5e5; box-shadow: 0 2px 8px rgba(22,101,52,.18); transform: translateY(-1px); }
.doc-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 40px; border-radius: 4px 10px 4px 4px;
    font-size: 10px; font-weight: 800; color: #fff; letter-spacing: .5px; flex: none; }
.doc-ico.pdf { background: #dc2626; } .doc-ico.img { background: #2563eb; }
.doc-apri-testo { display: flex; flex-direction: column; line-height: 1.25; }
.doc-apri-testo b { color: var(--blu, #1d4ed8); font-size: 13px; }
.doc-apri:hover .doc-apri-testo b { text-decoration: underline; }
.doc-ok { color: #15803d; font-size: 11px; font-weight: 700; }
.doc-nome { color: #64748b; font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-giu { display: inline-flex; align-items: center; justify-content: center; width: 30px; border: 1px solid var(--bordo); border-radius: 8px;
    color: #475569; text-decoration: none; font-size: 14px; }
.doc-giu:hover { background: #f1f5f9; }
.doc-chip { color: #1d4ed8; text-decoration: none; }
.doc-chip:hover { background: #dbe7ff; text-decoration: underline; }
.doc-chip-ok { color: #15803d; font-weight: 700; }
tr.doc-vecchio .doc-apri { background: #f8fafc; border-color: var(--bordo); }
tr.doc-vecchio .doc-ok { color: #94a3b8; }
.ente-logo { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.doc-compressa { color: #0f766e; font-size: 11px; }

/* campi presenti ma non richiesti (es. idoneità sanitaria senza sorveglianza): visibili, sfocati, non modificabili */
.sfocato { position: relative; opacity: .55; filter: blur(1.4px) grayscale(.6); transition: filter .2s, opacity .2s; cursor: not-allowed; }
.sfocato:hover { filter: blur(.6px) grayscale(.6); opacity: .7; }
.sfocato select, .sfocato input { pointer-events: none; background: #f1f5f9; }
.sfocato-nota { color: #64748b; font-style: italic; }
.sorveglianza-box { background: #fff5f5; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; }
.chk-forte { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }

/* ===================================================================================
   Interfaccia interna (rev. 13/11): menu raggruppato con icone, barra in alto con utente,
   menu a scomparsa su telefono, quadro di prontezza nel cruscotto, moduli con pulsanti
   sempre a portata, stati vuoti che indicano cosa fare.
   =================================================================================== */
:root { --sfondo: #eef2f8; --bordo: #e1e7f0; --notte: #0b1d4d; --ardesia: #1e293b; --radius: 10px; }
body { color: var(--ardesia); }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.012em; }
.head { margin-bottom: 18px; }
.head > div > .muted { font-size: 13px; margin-top: 2px; }
:where(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* ---- menu laterale */
.sidebar { width: 248px; background: var(--notte); display: flex; flex-direction: column; overflow: hidden; }
.sidebar .brand { flex: none; }
.sidebar .ente-card { flex: none; }
.nav { flex: 1; overflow-y: auto; padding: 6px 0 14px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.nav .grp { font-size: 11.5px; text-transform: none; letter-spacing: 0; font-weight: 600; opacity: 1;
            color: rgba(214,226,255,.45); padding: 16px 22px 5px; }
.nav a, .nav summary { position: relative; display: flex; align-items: center; gap: 11px; margin: 1px 10px; padding: 7px 12px;
                       border-radius: 8px; border-left: 0; color: rgba(226,234,255,.84); font-size: 13.5px; line-height: 1.25; }
.nav a:hover, .nav summary:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav .ico { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav a.on { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.nav a.on .ico { opacity: 1; color: var(--ente, #facc15); }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ente, #facc15); }
.nav a.sub { padding: 5px 12px 5px 41px; font-size: 13px; color: rgba(214,226,255,.66); }
.nav a.sub::before { content: none; }
.nav a.sub.on { color: #fff; background: rgba(255,255,255,.08); }
.nav a.sub.on::before { content: ""; }
.nav-gruppo summary { list-style: none; cursor: pointer; }
.nav-gruppo summary::-webkit-details-marker { display: none; }
.nav-gruppo summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
                             transform: rotate(-45deg); opacity: .6; transition: transform .15s; }
.nav-gruppo[open] summary::after { transform: rotate(45deg); }
.sidebar-footer { flex: none; margin-top: 0; }

/* ---- barra in alto */
.topbar { min-height: 58px; padding: 8px 24px; gap: 14px; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--bordo); border-radius: 10px; background: #fff; cursor: pointer;
            align-items: center; justify-content: center; flex: none; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ardesia); stroke-width: 2; stroke-linecap: round; }
.utente-box { gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700;
          color: var(--ente-testo, #0b3d91); background: var(--ente-chiaro, #e0e7ff); box-shadow: inset 0 0 0 2px var(--ente, #0b3d91); }
.utente-dati { display: flex; flex-direction: column; line-height: 1.25; }
.utente-dati b { font-size: 13px; }
.utente-dati span { font-size: 12px; color: var(--grigio); }
.link-top { border: 0; background: none; padding: 6px 8px; border-radius: 6px; font: inherit; font-size: 13px; color: #475569; cursor: pointer; }
.link-top:hover { background: #f1f5f9; color: var(--ardesia); text-decoration: none; }
.link-top.esci { color: #b91c1c; }
.link-top.esci:hover { background: #fef2f2; }

/* ---- card e tabelle */
.card { border-radius: 12px; padding: 18px 20px; }
.card .card-head h2, .card > h2 { font-size: 16px; }
th, td { padding: 9px 10px; }
th { font-size: 12px; color: #64748b; }
.empty { font-style: normal; color: #64748b; padding: 22px 8px; text-align: center; }
.empty b { color: var(--ardesia); }
.vuoto-invito { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 12px; }
.vuoto-invito b { font-size: 16px; }
.vuoto-invito .btn { margin-top: 6px; }
.btn { border-radius: 8px; }

/* ---- filtri: la ricerca prende lo spazio, i pulsanti restano in fila */
.filters { gap: 10px; }
.filters > input[name=q] { flex: 1 1 280px; }
.filters select { flex: 0 1 auto; min-width: 150px; }
.filters .btn { flex: none; }

/* ---- moduli lunghi: i pulsanti di salvataggio restano visibili in fondo allo schermo */
.card .form-actions { position: sticky; bottom: 0; z-index: 4; background: #fff; padding: 12px 0 10px; margin-top: 8px;
                      box-shadow: 0 -1px 0 #e8edf5, 0 -10px 14px -12px rgba(15,23,42,.25); align-items: center; flex-wrap: wrap; }

/* ---- cruscotto: quadro di prontezza, una fascia sola con lo stato di ogni voce */
.prontezza { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; background: #fff;
             border: 1px solid var(--bordo); border-radius: 12px; overflow: hidden; }
.prontezza .kpi { position: relative; display: block; border: 0; border-radius: 0; border-left: 1px solid var(--bordo); padding: 18px 20px 16px 30px;
                  background: transparent; color: inherit; text-decoration: none; transition: background .15s; }
.prontezza .kpi:first-child { border-left: 0; }
.prontezza .kpi:hover { background: #f8fafc; text-decoration: none; }
.prontezza .kpi::before { content: ""; position: absolute; left: 14px; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: #cbd5e1; }
.prontezza .kpi.ok::before { background: #16a34a; }
.prontezza .kpi.attenzione::before { background: #f59e0b; }
.prontezza .kpi.allarme::before { background: #dc2626; }
.prontezza .kpi.allarme { background: #fff7f7; }
.prontezza .v { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ardesia); }
.prontezza .kpi.allarme .v { color: #b91c1c; }
.prontezza .l { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: #334155; }
.prontezza .n { margin-top: 2px; font-size: 12px; color: #64748b; }

/* ---- telefono e tablet: il menu diventa un pannello a scomparsa */
.menu-velo { position: fixed; inset: 0; z-index: 40; background: rgba(2,6,23,.45); }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: 280px; max-width: 86vw; transform: translateX(-102%);
             transition: transform .22s ease; box-shadow: 0 0 40px rgba(2,6,23,.35); }
  body.menu-aperto .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 8px 12px; position: sticky; top: 0; z-index: 30; }
  .topbar-nome { font-size: 14px; }
  .utente-dati, .link-top:not(.esci) { display: none; }
  .content { padding: 16px 12px 60px; }
  .prontezza { grid-template-columns: 1fr 1fr; }
  .prontezza .kpi:nth-child(3) { border-left: 0; }
  .prontezza .kpi:nth-child(n+3) { border-top: 1px solid var(--bordo); }
  .prontezza .v { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .prontezza .kpi { transition: none; } }
@media (max-width: 640px) { .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; } .head h1 { font-size: 21px; } }

/* scelta multipla con etichette e ricerca (province, regioni…) */
.sm { position: relative; }
.sm-campo { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 38px; padding: 4px 6px; border: 1px solid #cfd6e1;
            border-radius: 8px; background: #fff; cursor: text; }
.sm.aperto .sm-campo, .sm-campo:focus-within { border-color: var(--blu); box-shadow: 0 0 0 3px #dbe6fb; }
.sm-chip-box { display: contents; }
.sm-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 9px; border-radius: 999px; background: #e8efff;
           color: #1e3a8a; font-size: 12.5px; font-weight: 600; max-width: 100%; }
.sm-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-chip button { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; color: #1e3a8a; font-size: 15px; line-height: 1; }
.sm-chip button:hover { background: #c7d7fb; }
.sm-cerca { flex: 1 1 90px; min-width: 90px; border: 0 !important; outline: 0 !important; box-shadow: none !important; padding: 4px 2px !important; }
.sm-lista { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: #fff;
            border: 1px solid var(--bordo); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.16); padding: 4px; min-width: 240px; }
.sm-gruppo { position: sticky; top: -4px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px;
             padding: 7px 8px 5px; background: #f8fafc; font-size: 12px; font-weight: 700; color: #475569; border-radius: 6px; }
.sm-tutte { border: 0; background: none; color: var(--blu); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.sm-tutte:hover { background: #e8efff; }
.sm-voce { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.sm-voce i { width: 16px; height: 16px; flex: none; border: 1.5px solid #94a3b8; border-radius: 4px; display: grid; place-items: center; }
.sm-voce[aria-selected=true] i { background: var(--blu); border-color: var(--blu); }
.sm-voce[aria-selected=true] i::after { content: ""; width: 8px; height: 4.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.sm-voce:hover, .sm-voce.on { background: #f1f5ff; }
.sm-nulla { padding: 10px; color: var(--grigio); font-size: 13px; }

/* volontari richiesti: totale o turni, con la copertura */
.modalita { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.modalita-voce { flex: 1 1 260px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--bordo);
                 border-radius: 10px; cursor: pointer; background: #fff; }
.modalita-voce:has(input:checked) { border-color: var(--blu); background: #f3f7ff; }
.modalita-voce input { margin-top: 3px; width: auto; }
.modalita-voce > span { display: flex; flex-direction: column; gap: 2px; }
.modalita-totale { display: flex; flex-direction: column; gap: 4px; }
.modalita-totale label { font-size: 12px; font-weight: 600; color: #374151; }
.copertura { display: flex; flex-direction: column; gap: 6px; }
.copertura-numeri { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.barra { height: 9px; border-radius: 6px; background: #eef2f7; overflow: hidden; min-width: 80px; }
.barra i { display: block; height: 100%; background: #f59e0b; border-radius: 6px; transition: width .3s; }
.barra i.piena { background: #16a34a; }
table.turni td { vertical-align: middle; }
table.turni .barra { margin-bottom: 4px; }
tr.totale-riga td { background: #f8fafc; }
.nuovo-turno { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--bordo); }
.atto-info { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--bordo); min-height: 38px; }
.turni-odv .turno { display: grid; grid-template-columns: minmax(150px, 220px) 1fr minmax(120px, 160px); gap: 12px; align-items: center;
                    padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.turni-odv .turno:last-child { border-bottom: 0; }
@media (max-width: 760px) { .turni-odv .turno { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.atto-comune { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; }
.alert-box.ambra { background: #fffbeb; border-color: #fcd34d; margin: 10px 0 0; }
.riepilogo-attivita .v { font-size: 26px; }
/* un elemento nascosto resta nascosto anche se la sua classe gli dà un display */
[hidden] { display: none !important; }

/* ===================================================================================
   Leggibilità (rev. 14/11): corpo più grande, testi secondari più scuri, etichette e
   aiuti leggibili senza avvicinarsi allo schermo, tabelle meno fitte. Contrasto del
   testo secondario su bianco circa 6:1 (WCAG AA anche per il testo piccolo).
   =================================================================================== */
:root { --grigio: #556070; --ardesia: #1b2536; --leggero: #6a7486; }
body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.muted { color: var(--grigio); }
.small, small { font-size: 13px; }
h1 { font-size: 26px; line-height: 1.2; }
h2, .card .card-head h2, .card > h2 { font-size: 18px; line-height: 1.3; }
.head > div > .muted { font-size: 14px; }
.card { padding: 20px 22px; }
.card > p, .card .small.muted, p.small { max-width: 95ch; line-height: 1.55; }

/* moduli */
.form-grid { gap: 14px 16px; }
.fg { gap: 5px; }
.fg label, .modalita-totale label { font-size: 13.5px; font-weight: 600; color: #2b3546; }
.fg .help, .help { font-size: 12.5px; line-height: 1.45; color: var(--grigio); }
input, select, textarea { font-size: 15px; padding: 8px 11px; border-color: #c3ccd9; border-radius: 8px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select { min-height: 40px; }
input::placeholder, textarea::placeholder { color: #8a93a3; }
input[readonly], input:disabled, select:disabled { background: #f3f5f9; }
.fsection { font-size: 15.5px; padding: 18px 0 6px; margin-top: 6px; border-bottom-width: 1px; border-bottom-color: #dfe6f1; color: #0b3d91; }
.fsection .sottotitolo, .fsection span:not(.badge):not(.obbl) { font-size: 13px; font-weight: 400; color: var(--grigio); }
.fg.chk label { font-size: 14.5px; font-weight: 500; }
.legenda { font-size: 13px; }

/* bottoni */
.btn { font-size: 14px; padding: 8px 15px; font-weight: 500; }
.btn.sm { font-size: 13px; padding: 5px 11px; }

/* tabelle */
th, td { padding: 10px 12px; }
td { font-size: 14.5px; }
th { font-size: 12.5px; font-weight: 600; color: #46526a; white-space: normal; line-height: 1.3; vertical-align: bottom; }
td.small, td .small { font-size: 13px; }
td.num, th.num { font-variant-numeric: tabular-nums; }
tr:hover td { background: #f7f9fd; }
table.kv th { font-size: 13.5px; vertical-align: top; }

/* etichette di stato */
.badge { font-size: 12.5px; padding: 3px 9px; line-height: 1.35; }
.badge.sm { font-size: 12px; }
.doc-chip { font-size: 12.5px; padding: 3px 9px; }
.doc-nome, .doc-ok { font-size: 12px; }

/* riquadri numerici (anche quelli fuori dal cruscotto): una fascia leggibile, senza bordo colorato in alto */
.kpi { border-top: 1px solid var(--bordo); border-radius: 12px; padding: 16px 18px; }
.kpi .v { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13.5px; font-weight: 600; color: #334155; margin-top: 6px; }
.kpi .n { font-size: 12.5px; color: var(--grigio); }
.kpi.verde { box-shadow: inset 4px 0 0 #16a34a; } .kpi.rosso, .kpi.allarme { box-shadow: inset 4px 0 0 #dc2626; }
.kpi.giallo, .kpi.arancio { box-shadow: inset 4px 0 0 #f59e0b; }
.prontezza .kpi { box-shadow: none; }

/* menu e barra in alto */
.nav a, .nav summary { font-size: 14.5px; padding: 8px 12px; }
.nav a.sub { font-size: 13.5px; }
.nav .grp { font-size: 12.5px; color: rgba(214,226,255,.55); }
.utente-dati span, .link-top { font-size: 13px; }

/* avvisi */
.flash { font-size: 14.5px; }
.alert-box { font-size: 14.5px; line-height: 1.5; }
.empty { font-size: 14.5px; }

/* scelta multipla e copertura */
.sm-chip { font-size: 13.5px; }
.sm-voce { font-size: 14.5px; }
.copertura-numeri { font-size: 16px; }
.doc-mini select { font-size: 13px; min-height: 32px; padding: 4px 8px; max-width: 150px; }

/* ---- piano dei turni dell'associazione: volontari per riga, turni per colonna */
.piano { padding: 0; overflow: hidden; }
.piano-testa { padding: 20px 22px 6px; }
.piano-testa h2 { margin: 0 0 6px; }
.piano-testa p { margin: 0 0 8px; max-width: 80ch; }
.piano-passo { border: 0; margin: 0; padding: 16px 22px 18px; border-top: 1px solid var(--bordo); min-width: 0; }
.piano-passo legend, .piano-passo summary { float: left; width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
    font-size: 17px; font-weight: 700; color: var(--ardesia); padding: 0; }
.piano-passo legend + * { clear: both; }
.piano-passo summary { cursor: pointer; list-style: none; float: none; margin: 0; }
.piano-passo summary::-webkit-details-marker { display: none; }
.piano-passo details[open] summary { margin-bottom: 10px; }
.passo { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
         background: var(--ente, #0b3d91); color: #fff; font-size: 14px; font-weight: 700; }
.risposta-scelta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; clear: both; }
.piano-passo.spento { opacity: .4; pointer-events: none; filter: grayscale(.6); }
.piano-legenda { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--grigio); margin-bottom: 10px; clear: both; }
.piano-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.lg-si { background: var(--ente, #0b3d91); }
.lg-no { background: repeating-linear-gradient(135deg, #e2e8f0 0 3px, #f8fafc 3px 6px); border: 1px solid #cbd5e1; }

.piano-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--bordo); border-radius: 10px; background: #fff; }
.piano-scroll:focus-visible { outline: 3px solid #93c5fd; }
table.piano-tab { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.piano-tab th, .piano-tab td { border-bottom: 1px solid #edf1f7; padding: 0; background: #fff; }
.piano-tab thead th { position: sticky; z-index: 3; background: #f6f8fc; }
.piano-tab thead tr:first-child th { top: 0; height: 34px; }
.piano-tab thead tr:nth-child(2) th { top: 34px; }
.piano-giorno { text-align: center; font-size: 13px; text-transform: none; color: #334155; border-left: 2px solid #dfe6f1;
                padding: 7px 10px !important; white-space: nowrap; }
.piano-giorno::first-letter { text-transform: uppercase; }
.piano-col { width: 92px; min-width: 92px; text-align: center; vertical-align: top; padding: 7px 6px 8px !important; border-left: 1px solid #e6ebf3; }
.piano-col .ora { display: block; font-size: 13px; font-weight: 700; color: var(--ardesia); white-space: nowrap; font-variant-numeric: tabular-nums; }
.piano-col .luogo { display: block; font-size: 11.5px; font-weight: 500; color: var(--grigio); max-width: 86px; margin: 1px auto 0;
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piano-col .cop { display: inline-block; margin-top: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
                  background: #fef3c7; color: #92400e; font-variant-numeric: tabular-nums; }
.piano-col .cop.pieno { background: #dcfce7; color: #166534; }
.piano-nome { position: sticky; left: 0; z-index: 2; text-align: left; min-width: 250px; max-width: 300px; padding: 9px 14px !important;
              border-right: 1px solid #dfe6f1; vertical-align: middle; white-space: normal; font-weight: 400; }
.piano-tab thead .piano-nome { z-index: 4; vertical-align: bottom; font-size: 12.5px; font-weight: 600; color: #46526a; }
.piano-nome b { display: block; font-size: 14.5px; color: var(--ardesia); }
.piano-nome .small, .piano-nome .badge { display: inline-block; margin-top: 2px; }
.piano-tot { position: sticky; right: 0; z-index: 2; min-width: 96px; text-align: center; font-size: 13px; color: var(--grigio);
             border-left: 1px solid #dfe6f1; padding: 0 10px !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.piano-tab thead .piano-tot { z-index: 4; font-size: 12.5px; font-weight: 600; color: #46526a; vertical-align: bottom; padding-bottom: 8px !important; }
tr.in-turno .piano-tot { color: var(--ardesia); font-weight: 600; }
tr.in-turno .piano-nome { box-shadow: inset 3px 0 0 var(--ente, #0b3d91); }
.piano-gruppo th { position: sticky; left: 0; text-align: left; background: #f8fafc !important; font-size: 12.5px; font-weight: 600;
                   color: #46526a; padding: 8px 14px !important; }
.piano-cella-td { border-left: 1px solid #f0f3f8; text-align: center; vertical-align: middle; }
.cella { display: grid; place-items: center; width: 100%; height: 52px; cursor: pointer; position: relative; }
.cella input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cella .segno { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #cdd5e1; background: #fff;
                display: grid; place-items: center; transition: background .12s, border-color .12s, transform .12s; }
.cella:hover .segno { border-color: var(--ente, #0b3d91); }
.cella input:checked + .segno { background: var(--ente, #0b3d91); border-color: var(--ente, #0b3d91); }
.cella input:checked + .segno::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
                                      transform: translateY(-2px) rotate(-45deg); }
.cella input:focus-visible + .segno { outline: 3px solid #93c5fd; outline-offset: 2px; }
.conflitto { background: repeating-linear-gradient(135deg, #f1f5f9 0 4px, #fff 4px 8px) !important; }
.conflitto .cella { cursor: not-allowed; }
.conflitto .segno { border-style: dashed; background: transparent; }
.piano-azioni { padding: 14px 22px !important; margin: 0 !important; border-top: 1px solid var(--bordo); }
.piano-riepilogo { color: var(--grigio); font-size: 14px; }
body.ente-odv .passo, body.ente-odv .lg-si { background: #0f766e; }
body.ente-odv .cella input:checked + .segno { background: #0f766e; border-color: #0f766e; }
.piano-tot { vertical-align: middle; }
@media (max-width: 760px) {
  .piano-passo { padding: 14px 12px 16px; }
  .piano-testa { padding: 16px 14px 4px; }
  .piano-nome { min-width: 128px; max-width: 140px; padding: 8px 10px !important; }
  .piano-nome b { font-size: 13.5px; }
  .piano-nome .small { display: none !important; }
  .piano-tab .piano-tot { display: none; }
  .piano-col { width: 78px; min-width: 78px; }
  .piano-col .luogo { max-width: 72px; }
  .cella { height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .cella .segno { transition: none; } }

/* ---- schede a sezioni (socio, mezzo): una sezione alla volta, la barra resta in alto */
[data-fuori] { display: none !important; }
.schede-barra { position: sticky; top: 0; z-index: 20; margin: -4px 0 16px; padding: 6px 0 0; background: var(--sfondo); }
.schede-lista { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid #d5dce8; }
.scheda-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px 12px; border: 0;
              background: none; font: inherit; font-size: 14.5px; font-weight: 500; color: #4a5568; cursor: pointer; border-radius: 8px 8px 0 0;
              white-space: nowrap; }
.scheda-tab:hover { color: var(--ardesia); background: rgba(255,255,255,.7); }
.scheda-tab[aria-selected=true] { color: var(--ardesia); font-weight: 700; background: #fff; box-shadow: 0 1px 0 #fff, inset 0 0 0 1px #d5dce8; }
.scheda-tab[aria-selected=true]::after { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
                                         background: var(--ente, #0b3d91); }
.scheda-tab .conta { min-width: 22px; padding: 0 7px; border-radius: 999px; background: #e7ecf5; color: #46526a; font-size: 12px; font-weight: 700;
                     line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.scheda-tab .conta.allarme { background: #fee2e2; color: #b91c1c; }
.scheda-tab.con-errori .nome::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #dc2626;
                                     margin-left: 6px; vertical-align: 2px; }
/* la sezione del modulo comincia subito con i campi: il titolo della sezione resta come sottotitolo */
.con-schede [data-schede-form] .fsection { padding-top: 2px; margin-top: 0; }
.con-schede [data-schede-form] { border-top-left-radius: 0; }
@media (max-width: 900px) { .schede-barra { top: 58px; } .scheda-tab { padding: 10px 12px; font-size: 14px; } }
@media print { [data-fuori] { display: block !important; } }

/* ---- scadenzario per famiglie */
.periodo { display: flex; align-items: center; gap: 8px; }
.periodo select { width: auto; }
.famiglie { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.famiglia { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px 20px; border: 1px solid var(--bordo); border-radius: 12px;
            color: inherit; text-decoration: none; position: relative; background: #fff; transition: border-color .15s, background .15s; }
.famiglia::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: #16a34a; }
.famiglia.ambra::before { background: #f59e0b; } .famiglia.rosso::before { background: #dc2626; }
.famiglia:hover { border-color: #b8c4d8; background: #fafbfe; text-decoration: none; }
.famiglia-titolo { font-size: 17px; font-weight: 700; color: var(--ardesia); }
.famiglia-cosa { font-size: 13px; color: var(--grigio); }
.famiglia-numeri { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: #334155; margin-top: 4px; }
.famiglia-numeri b { font-size: 20px; font-variant-numeric: tabular-nums; margin-right: 3px; }
.n-rosso { color: #b91c1c; } .n-ambra { color: #92400e; } .n-verde { color: #166534; font-weight: 600; }
.famiglia-prossima { font-size: 13px; color: var(--grigio); border-top: 1px dashed var(--bordo); padding-top: 8px; margin-top: 4px; }
.gruppo-scad { font-size: 15px; margin: 18px 0 8px; padding-left: 10px; border-left: 3px solid #cbd5e1; }
.gruppo-scad.rosso { border-left-color: #dc2626; color: #991b1b; } .gruppo-scad.ambra { border-left-color: #f59e0b; color: #92400e; }

/* ---- cruscotto dell'associazione */
.cr-saluto { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.cr-saluto h2 { font-size: 22px; margin: 0; }
.cr-saluto .muted::first-letter { text-transform: uppercase; }
.cr-azioni { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-emergenze { display: grid; gap: 10px; margin-bottom: 18px; }
.cr-emergenza { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 16px 20px 16px 22px; border-radius: 12px;
                background: #fff; border: 1px solid var(--bordo); position: relative; overflow: hidden; }
.cr-emergenza::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #94a3b8; }
.cr-emergenza.allerta-giallo::before { background: #facc15; } .cr-emergenza.allerta-arancione::before { background: #f97316; }
.cr-emergenza.allerta-rosso::before { background: #dc2626; } .cr-emergenza.allerta-verde::before { background: #16a34a; }
.cr-emergenza.da-rispondere { border-color: #fca5a5; background: linear-gradient(90deg, #fff5f5, #fff 60%); box-shadow: 0 6px 18px -10px rgba(220,38,38,.45); }
.cr-em-sopra { font-size: 13px; color: var(--grigio); }
.cr-em-titolo { font-size: 19px; font-weight: 700; color: var(--ardesia); margin: 1px 0 6px; }
.cr-em-stato { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--grigio); }
.btn-urgente { background: #dc2626; border-color: #dc2626; font-weight: 600; padding: 10px 18px; font-size: 15px; }
.btn-urgente:hover { background: #b91c1c; border-color: #b91c1c; }
.cr-quiete, .cr-ok { display: flex; align-items: center; gap: 10px; color: var(--grigio); margin: 0 0 18px; font-size: 14.5px; }
.cr-ok { margin: 0; color: #166534; font-weight: 500; }
.cr-quiete .punto, .cr-ok .punto { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.cr-griglia { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cr-colonna { display: grid; gap: 16px; }
.cr-colonna .card { margin: 0; }
.cr-scadenze { margin: 0; }
.cr-famiglie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cr-famiglia { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 16px; border-radius: 10px; border: 1px solid var(--bordo);
               color: inherit; text-decoration: none; position: relative; }
.cr-famiglia::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #16a34a; }
.cr-famiglia.ambra::before { background: #f59e0b; } .cr-famiglia.rosso::before { background: #dc2626; }
.cr-famiglia:hover { background: #f8fafc; text-decoration: none; }
.cr-famiglia .nome { font-weight: 700; font-size: 14.5px; color: var(--ardesia); }
.cr-famiglia .conti { font-size: 13px; color: var(--grigio); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.cr-famiglia .conti b { font-size: 18px; margin-right: 2px; }
.cr-sotto { font-size: 14px; color: var(--grigio); font-weight: 600; margin: 18px 0 6px; }
.cr-lista { list-style: none; margin: 0; padding: 0; }
.cr-lista li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid #eef1f6; }
.cr-lista li:last-child { border-bottom: 0; }
.cr-lista .quando { font-size: 13px; font-weight: 600; color: var(--grigio); }
.cr-lista .quando.rosso { color: #b91c1c; } .cr-lista .quando.ambra { color: #92400e; }
.cr-dasistemare { margin: 0 0 8px; padding: 0; list-style: none; }
.cr-dasistemare li { position: relative; padding: 8px 0 8px 24px; border-bottom: 1px solid #eef1f6; font-size: 14.5px; line-height: 1.45; }
.cr-dasistemare li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 12px; border-radius: 3px; border: 2px solid #f59e0b; }
.cr-dasistemare a { color: var(--ardesia); }
.cr-dasistemare a:hover { color: var(--blu); }
.cr-agenda { list-style: none; margin: 0; padding: 0; }
.cr-agenda li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f6; }
.cr-agenda li:last-child { border-bottom: 0; }
.cr-agenda .giorno { width: 46px; flex: none; text-align: center; border-radius: 8px; background: #eef4ff; color: #1e3a8a; font-size: 11.5px;
                     text-transform: uppercase; padding: 4px 0; line-height: 1.1; }
.cr-agenda .giorno b { display: block; font-size: 19px; }
.cr-agenda span { display: flex; flex-direction: column; }
@media (max-width: 1100px) { .cr-griglia { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cr-emergenza { flex-direction: column; align-items: stretch; } .cr-lista li { grid-template-columns: 1fr; gap: 2px; } }

/* ---- Consulta: ricerca volontari e colonna mobile ---------------------------------------- */
.cerca-volontari { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.cv-campo { display: flex; flex-direction: column; gap: 4px; min-width: 200px; flex: 1 1 200px; }
.cv-campo > span { font-size: 12.5px; font-weight: 600; color: #475569; }
.cv-q { flex: 2 1 280px; }
.cv-op { margin-bottom: 9px; white-space: nowrap; }
.filtri-attivi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }
.filtro { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px;
          background: #eef3fb; border: 1px solid #d3def0; color: var(--blu-scuro); font-size: 13px; font-weight: 600; }
.filtro span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #64748b; font-size: 14px; }
.filtro:hover { text-decoration: none; border-color: var(--blu); } .filtro:hover span { background: var(--blu); color: #fff; }
.filtro.forte { background: var(--blu); border-color: var(--blu); color: #fff; }
.filtro.forte span { background: rgba(255,255,255,.2); color: #fff; }
.conta-volontari .kpi::before { background: #cbd5e1; }
.vista-barra { display: flex; justify-content: flex-end; margin: -4px 0 12px; }
.segmenti { display: inline-flex; background: #e9eef6; border-radius: 9px; padding: 3px; gap: 2px; }
.segmenti a { padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #475569; }
.segmenti a:hover { text-decoration: none; color: var(--blu); }
.segmenti a.on { background: #fff; color: var(--blu-scuro); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.gruppo-testa { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
                padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #e8edf5; }
.gruppo-testa h2 { margin: 0; font-size: 17px; }
.gruppo-conta { font-size: 13px; color: #64748b; } .gruppo-conta b { color: var(--testo); }
.volontari { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.volontario { border: 1px solid var(--bordo); border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 5px; background: #fff; }
.volontario:hover { border-color: #b8c7e0; }
.volontario.spento { background: #f8fafc; }
.volontario.spento .v-nome { color: #64748b; }
.v-nome { font-weight: 700; font-size: 14.5px; }
.v-ruolo { font-size: 12.5px; color: #64748b; min-height: 1em; }
.v-dati { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pat { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px;
       border: 1.5px solid #334155; color: #1e293b; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; margin-right: 3px; }
.v-abil { font-size: 12px; font-weight: 600; color: #166534; background: #dcfce7; border-radius: 999px; padding: 2px 9px; }
.v-abil.nessuna { color: #64748b; background: #f1f5f9; font-weight: 500; }
.v-pronto { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: #475569; padding-top: 6px; border-top: 1px dashed #e2e8f0; }
.disp { color: #92400e; } .disp.notte { color: #3730a3; }

.colonne-cm { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.colonna-cm { display: block; background: #fff; border: 1px solid var(--bordo); border-radius: 12px; padding: 16px 18px; color: inherit;
              transition: border-color .15s, box-shadow .15s; }
.colonna-cm:hover { text-decoration: none; border-color: #9fb4d8; }
.colonna-cm.scelta { border-color: var(--blu); box-shadow: 0 0 0 3px #dbe6f8; }
.colonna-cm.senza { background: #fffbeb; border-style: dashed; border-color: #f0c66b; }
.cc-testa { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cc-lettera { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--blu-scuro); color: #fff;
              font-size: 24px; font-weight: 800; }
.cc-nome { font-weight: 700; font-size: 15px; color: var(--testo); flex: 1; }
.cc-azione { font-size: 12px; color: var(--blu); font-weight: 600; }
.cc-numeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.cc-numeri div { min-width: 0; }
.cc-numeri dt { font-size: 12px; color: #64748b; }
.cc-numeri dd { margin: 2px 0 0; font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--testo); }
.cc-numeri small { font-size: 13px; font-weight: 600; color: #94a3b8; }
.cc-fermi { margin-top: 10px; font-size: 12.5px; color: #92400e; }
.tipi-cm { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.filtro-tipo { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--bordo); background: #fff; font-size: 13px; color: #334155; }
.filtro-tipo b { margin-left: 4px; color: #64748b; font-weight: 700; }
.filtro-tipo:hover { text-decoration: none; border-color: var(--blu); }
.filtro-tipo.on { background: var(--blu); border-color: var(--blu); color: #fff; } .filtro-tipo.on b { color: #dbe6f8; }
.mezzi-cm { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mezzo-cm { border: 1px solid var(--bordo); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.mezzo-cm.fermo { background: #fffdf5; }
.mc-riga { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-sigla { font-size: 16px; font-weight: 800; letter-spacing: .01em; }
.mc-tipo { font-size: 13px; color: var(--testo); }
.mc-odv { font-size: 12.5px; color: #64748b; }
.mc-dati { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.mc-dati dt { font-size: 11.5px; color: #64748b; } .mc-dati dd { margin: 0; font-weight: 700; font-size: 13.5px; }
.mc-dotazioni { font-size: 12px; color: #475569; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .cv-campo { min-width: 100%; }
  .cc-numeri dd { font-size: 22px; }
  .vista-barra { justify-content: stretch; } .segmenti { width: 100%; } .segmenti a { flex: 1; text-align: center; }
}

/* ---- cruscotto dell'associazione, seconda versione (dal canvas di design) ---------------- */
.cr-allarme { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 22px 26px; border-radius: 16px;
              background: #7f1d1d; color: #fff; }
.cr-allarme.attesa { background: #991b1b; box-shadow: 0 10px 28px -14px rgba(153,27,27,.8); }
.cr-allarme.spento { background: #fff; color: var(--testo); border: 1px solid var(--bordo); }
.cr-allarme-ico { flex: none; color: #fecaca; }
.cr-allarme.spento .cr-allarme-ico { color: #94a3b8; }
.cr-allarme-testo { flex: 1 1 320px; min-width: 0; }
.cr-allarme .sopra { font-size: 13px; font-weight: 600; color: #fecaca; }
.cr-allarme .titolo { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
.cr-allarme .sotto { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: #fee2e2; margin-top: 4px; }
.cr-allarme .allerta { font-weight: 700; }
.cr-allarme.spento .sopra, .cr-allarme.spento .sotto { color: var(--grigio); }
.cr-allarme-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 12px; background: #fff; color: #7f1d1d;
                  font-weight: 700; font-size: 15px; }
.cr-allarme-btn:hover { text-decoration: none; background: #fee2e2; color: #7f1d1d; }
.cr-allarme.spento .cr-allarme-btn { background: var(--blu); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .cr-allarme.attesa .cr-allarme-ico { animation: cr-pulsa 1.6s ease-in-out infinite; }
  @keyframes cr-pulsa { 50% { opacity: .45; } }
}
.cr-pronti h2 { font-size: 17px; margin: 0 0 14px; }
.cr-pronti-griglia { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cr-pronto { display: flex; flex-direction: column; padding: 4px 20px; border-left: 1px solid #e5eaf2; color: inherit; }
.cr-pronto:first-child { border-left: 0; padding-left: 0; }
.cr-pronto:hover { text-decoration: none; } .cr-pronto:hover .l { color: var(--blu); }
.cr-pronto .v { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.cr-pronto .v small { font-size: 17px; color: #64748b; font-weight: 600; letter-spacing: 0; }
.cr-pronto .l { font-size: 14px; font-weight: 600; margin-top: 8px; }
.cr-pronto .n { font-size: 13px; color: #475569; margin-top: 2px; }
.cr-pronto.attenzione .v { color: #b45309; } .cr-pronto.allarme .v { color: #b91c1c; }
.cr-arco { font-size: 13px; font-weight: 500; color: var(--grigio); margin-left: 6px; }
.cr-barre { display: flex; flex-direction: column; gap: 6px; }
.cr-barra { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 128px; gap: 16px; align-items: center; min-height: 44px; color: inherit; }
.cr-barra:hover { text-decoration: none; } .cr-barra:hover .nome { color: var(--blu); }
.cr-barra .nome { font-size: 14.5px; font-weight: 600; }
.cr-barra .traccia { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #edf1f7; }
.cr-barra .stato { font-size: 13px; font-weight: 600; text-align: right; }
.cr-barra .stato.rosso { color: #b91c1c; } .cr-barra .stato.ambra { color: #92400e; } .cr-barra .stato.blu { color: #1e40af; } .cr-barra .stato.verde { color: #166534; }
.cr-barra .s, .cr-legenda .s { background: #b91c1c; } .cr-barra .a, .cr-legenda .a { background: #f59e0b; } .cr-barra .p, .cr-legenda .p { background: #93c5fd; }
.cr-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: #475569; }
.cr-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.cr-legenda i { width: 10px; height: 10px; border-radius: 3px; }
.cr-colonna h2 { font-size: 17px; }
.cr-progresso { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; font-size: 13px; color: #475569; font-weight: 600; }
.cr-progresso .traccia { flex: 1; height: 8px; border-radius: 4px; background: #edf1f7; overflow: hidden; display: flex; }
.cr-progresso .traccia span { background: #14b8a6; }
.cr-dasistemare li { padding: 0; }
.cr-dasistemare li::before { display: none; }
.cr-dasistemare a, .cr-dasistemare .riga { display: flex; gap: 12px; align-items: center; padding: 10px 0; min-height: 44px; }
.cr-dasistemare .conta { flex: none; min-width: 34px; height: 26px; padding: 0 6px; box-sizing: border-box; border-radius: 13px; background: #fef3c7;
                         color: #92400e; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
@media (max-width: 900px) {
  .cr-pronti-griglia { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .cr-pronto:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .cr-barra { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .cr-barra .traccia { grid-column: 1 / -1; grid-row: 2; }
  .cr-allarme-btn { width: 100%; justify-content: center; }
}

/* ---- scadenzario: tessere per famiglia e tre corsie --------------------------------------- */
.fam-tessere { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fam-tessera { display: flex; flex-direction: column; gap: 6px; min-height: 76px; padding: 14px 16px; box-sizing: border-box; border-radius: 12px;
               background: #fff; border: 1px solid var(--bordo); color: var(--testo); }
.fam-tessera:hover { text-decoration: none; border-color: #9fb4d8; }
.fam-tessera[aria-selected=true] { border: 2px solid var(--blu); padding: 13px 15px; box-shadow: 0 2px 0 var(--blu); }
.fam-riga { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fam-nome { font-size: 15px; font-weight: 700; }
.fam-punto { width: 12px; height: 12px; border-radius: 50%; flex: none; background: #16a34a; }
.fam-punto.rosso { background: #dc2626; } .fam-punto.ambra { background: #f59e0b; } .fam-punto.blu { background: #60a5fa; }
.fam-riassunto { font-size: 13px; font-weight: 600; color: #166534; }
.fam-riassunto.rosso { color: #b91c1c; } .fam-riassunto.ambra { color: #92400e; } .fam-riassunto.blu { color: #1e40af; }
.fam-testa { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin-bottom: 16px; }
.fam-testa h2 { margin: 0; font-size: 20px; }
.corsie { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.corsia { background: #f6f8fb; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.corsia-testa { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 2px; font-size: 14px; font-weight: 700; }
.corsia-testa span { color: #475569; }
.corsia-testa.rosso { color: #b91c1c; } .corsia-testa.ambra { color: #92400e; } .corsia-testa.blu { color: #1e40af; }
.corsia-vuota { font-size: 13.5px; color: #475569; text-align: center; padding: 18px 8px; border: 1px dashed #cbd5e1; border-radius: 10px; }
.voce-scad { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--bordo); color: var(--testo); }
.voce-scad:hover { text-decoration: none; border-color: #9fb4d8; }
.vs-riga { display: flex; justify-content: space-between; gap: 8px; }
.vs-riga b { color: var(--blu); font-size: 14.5px; }
.vs-quando { font-size: 13px; font-weight: 700; white-space: nowrap; }
.vs-quando.rosso { color: #b91c1c; } .vs-quando.ambra { color: #92400e; } .vs-quando.blu { color: #1e40af; }
.vs-cosa { font-size: 13.5px; } .vs-data { font-size: 12.5px; color: #475569; }

/* ---- Consulta/Volontari: requisiti a sinistra, risultati a destra ------------------------- */
.vol-pagina { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.vol-requisiti { flex: 1 1 260px; max-width: 300px; display: flex; flex-direction: column; gap: 18px; margin: 0; position: sticky; top: 16px; }
.vol-risultati { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.vol-risultati > .card, .vol-risultati .gruppo-odv { margin: 0; }
.vr-campo { display: flex; flex-direction: column; gap: 6px; }
.vr-campo > span, .vr-gruppo legend { font-size: 13px; font-weight: 600; color: #334155; }
.vr-campo input, .vr-campo select { width: 100%; box-sizing: border-box; }
.vr-gruppo { border: 0; margin: 0; padding: 0; }
.vr-gruppo legend { padding: 0 0 8px; }
.vr-pulsanti { display: flex; flex-wrap: wrap; gap: 8px; }
.vr-pulsante { position: relative; cursor: pointer; }
.vr-pulsante input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vr-pulsante span { display: inline-grid; place-items: center; min-height: 44px; min-width: 52px; padding: 0 14px; box-sizing: border-box; border-radius: 10px;
                    border: 1px solid #c9d4e5; background: #fff; font-weight: 700; font-size: 14px; color: var(--testo); }
.vr-pulsante:hover span { border-color: var(--blu); }
.vr-pulsante input:checked + span { background: var(--blu); border-color: var(--blu); color: #fff; }
.vr-pulsante input:focus-visible + span { outline: 3px solid #93b4ef; outline-offset: 2px; }
.vr-op { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.vol-requisiti .btn { min-height: 44px; justify-content: center; }
.vol-riepilogo { background: var(--blu); color: #dbe6f8; border-radius: 14px; padding: 16px 22px; display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; font-size: 14px; }
.vr-totale { font-size: 28px; font-weight: 800; color: #fff; }
.vr-totale small { font-size: 16px; font-weight: 600; }
.vol-risultati .vista-barra { margin: 0; }
.volontari { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 900px) { .vol-requisiti { max-width: none; position: static; } }

/* ---- colonna mobile: tre colonne affiancate ---------------------------------------------- */
.cm-odv { display: flex; align-items: center; gap: 10px; }
.cm-odv select { min-height: 40px; max-width: 320px; }
.cm-corsie { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; margin-bottom: 16px; }
.cm-corsie.una { grid-template-columns: minmax(0, 1fr); }
.cm-corsie.una .cm-mezzi { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cm-corsia { background: #fff; border: 1px solid var(--bordo); border-radius: 16px; padding: 18px; }
.cm-corsia.senza { background: #fffbeb; border: 1.5px dashed #e9b949; }
.cm-testa { display: flex; align-items: center; gap: 12px; }
.cm-titoli { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cm-nome { font-size: 16px; font-weight: 700; }
.cm-stato { font-size: 13px; font-weight: 600; }
.cm-stato.verde { color: #166534; } .cm-stato.ambra { color: #92400e; }
.cm-solo { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cm-corsia .cc-numeri { margin: 16px 0 14px; padding: 12px 0; border-top: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7; }
.cm-corsia.senza .cc-numeri { border-color: #f3dfa6; }
.cm-mezzi { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm-mezzi .mezzo-cm { background: #fff; }
.cm-mezzi .mezzo-cm.fermo { background: #fffdf5; border-color: #f0dca0; }
.mc-dati2 { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 12.5px; color: #334155; }
.cm-vuota { font-size: 13.5px; color: #475569; text-align: center; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 10px; }

/* ---- piano dei turni, supporto in sede: una riga per volontario, la scelta sotto il nome */
.piano-passo .checklist { display: block; columns: auto; max-height: none; overflow: visible; padding: 4px 14px; }
.piano-passo .riga-volontario { break-inside: avoid; padding: 10px 0; }
.piano-passo .riga-volontario:last-child { border-bottom: 0; }
.piano-passo .riga-volontario.scelto { margin: 0 -14px; padding: 10px 14px; }
.piano-passo .riga-volontario .impiego { margin-left: 26px; }

/* ---- tabelle divise per sezione: indice a sinistra, lista scelta a destra ----------------- */
.tab-intro { max-width: 78ch; margin: -6px 0 16px; font-size: 14px; line-height: 1.55; }
.tab-pagina { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tab-pagina > .tab-lista, .tab-colonna { flex: 999 1 560px; min-width: 0; }
.tab-colonna > .card { margin-top: 0; }
.tab-pagina > .tab-lista { margin-top: 0; }
.indice-tab { flex: 1 1 260px; max-width: 300px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
              background: #fff; border: 1px solid var(--bordo); border-radius: 14px; padding: 8px 10px 12px; box-sizing: border-box; }
.indice-tab summary { display: none; }
.it-gruppo + .it-gruppo { border-top: 1px solid #eef1f6; margin-top: 6px; padding-top: 4px; }
.it-sezione { display: flex; align-items: center; gap: 8px; margin: 10px 8px 4px; font-size: 13.5px; font-weight: 700; color: var(--blu-scuro); }
.it-sezione .ico { width: 18px; height: 18px; flex: none; color: var(--blu); }
.indice-tab ul { list-style: none; margin: 0; padding: 0; }
.it-voce { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px 6px 34px; border-radius: 8px;
           color: var(--testo); font-size: 14px; line-height: 1.3; }
.it-voce:hover { background: #f3f6fb; text-decoration: none; }
.it-voce.on { background: #e6eefb; color: var(--blu-scuro); font-weight: 700; }
.it-titolo { flex: 1; min-width: 0; }
.it-nota { font-size: 12px; font-weight: 600; color: #475569; background: #eef1f6; border-radius: 10px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.it-voce.on .it-nota { background: #fff; color: var(--blu-scuro); }
.it-segno { font-size: 11.5px; font-weight: 600; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 1px 6px; }
.tab-testa { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #eef1f6; }
.tab-percorso { font-size: 13px; color: #475569; font-weight: 600; }
.tab-testa h2 { margin: 2px 0 4px; font-size: 22px; letter-spacing: -.01em; }
.tab-dove { font-size: 13.5px; color: #475569; }
.tab-dove b { color: var(--testo); font-weight: 600; }
@media (max-width: 900px) {
  .indice-tab { max-width: none; position: static; max-height: none; }
  .indice-tab summary { display: block; cursor: pointer; padding: 8px; font-weight: 700; color: var(--blu); min-height: 28px; }
}
.it-lucchetto { width: 15px; height: 15px; flex: none; color: #92400e; }
.it-legenda { display: flex; gap: 6px; align-items: center; margin: 12px 8px 2px; padding-top: 10px; border-top: 1px solid #eef1f6; font-size: 12.5px; color: #475569; }
.tab-lista .riga-azioni { flex-wrap: wrap; }
.tab-lista .riga-azioni input:not([type=number]) { width: 170px; min-width: 0; }
.tab-lista td form.inline { display: inline-block; margin-top: 4px; }
.rete-titolo abbr { text-decoration: none; cursor: help; }
/* la frase della rete sta su una riga: la misura segue la larghezza del blocco, non della finestra */
.rete-blocco { container-type: inline-size; }
.rete-titolo { max-width: none; white-space: nowrap; font-size: clamp(14px, 4.4cqi, 28px); }

/* ---- sicurezza */
.sic-stato { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sic-voce { background: #fff; border: 1px solid var(--bordo); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.sic-voce span { color: #475569; }
.sic-voce.ok b { color: #166534; } .sic-voce.no b { color: #b91c1c; } .sic-voce.attenzione b { color: #92400e; }
.sic-nuovo td { background: #fff7f7; }
.avviso-sic { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #b91c1c; color: #fff !important;
              font-size: 13px; font-weight: 700; }
.avviso-sic:hover { background: #991b1b; text-decoration: none; }
.nav-conta { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #dc2626; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
/* mezzi di un'attività: km modificabili riga per riga */
.riga-km .km-campo { display: inline-flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: #475569; }
.riga-km .km-campo input { width: 110px; }
tr.da-completare td { background: #fffbeb; }

/* ---- cruscotto dell'associazione, terza versione: da fare, agenda, corsi, scadenze --------- */
.cr-emergenze { gap: 8px; }
.cr-allarme { padding: 14px 20px; gap: 10px 18px; border-radius: 14px; }
.cr-allarme-ico { width: 30px; height: 30px; }
.cr-allarme .titolo { font-size: 20px; }
.cr-allarme .sotto { margin-top: 2px; font-size: 13.5px; }
.cr-allarme-btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.cr-due { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cr-due > .card { margin: 0; }
.cr-due h2 { font-size: 17px; margin: 0; }
.cr-quante { min-width: 26px; height: 26px; padding: 0 8px; box-sizing: border-box; border-radius: 13px; background: #fee2e2; color: #b91c1c;
             font-weight: 800; font-size: 13px; display: inline-grid; place-items: center; }
.cr-compiti { list-style: none; margin: 4px 0 6px; padding: 0; }
.cr-compiti li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0;
                 border-bottom: 1px solid #eef1f6; font-size: 14.5px; line-height: 1.4; }
.cr-compiti li:last-child { border-bottom: 0; }
.cr-segno { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; }
.cr-compiti li.urgente .cr-segno { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.14); }
.cr-compiti li.urgente .cr-testo { font-weight: 600; }
.cr-dafare .cr-sotto { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f6; }
.cr-giorni { list-style: none; margin: 0; padding: 0; }
.cr-giorno { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid #eef1f6; }
.cr-giorno:last-child { border-bottom: 0; }
.cr-data { text-align: center; border-radius: 10px; background: #eef4ff; color: #1e3a8a; padding: 6px 0; align-self: start; }
.cr-data b { display: block; font-size: 21px; line-height: 1.05; }
.cr-data span { font-size: 11.5px; }
.cr-giorno.oggi .cr-data { background: var(--blu); color: #fff; }
.cr-giorno ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cr-giorno a { display: flex; gap: 10px; align-items: baseline; color: var(--testo); }
.cr-giorno a:hover { text-decoration: none; } .cr-giorno a:hover b { color: var(--blu); }
.cr-tipo { flex: none; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; background: #eef1f6; color: #475569; }
.cr-tipo.t-turno { background: #fee2e2; color: #991b1b; }
.cr-tipo.t-corso { background: #dbeafe; color: #1e40af; }
.cr-tipo.t-attivita { background: #ccfbf1; color: #115e59; }
.cr-voce { display: flex; flex-direction: column; min-width: 0; }
.cr-voce b { font-size: 14.5px; }
.cr-voce span { font-size: 12.5px; color: #475569; }
.cr-lista-corsi { list-style: none; margin: 0; padding: 0; }
.cr-lista-corsi li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef1f6; }
.cr-lista-corsi li:last-child { border-bottom: 0; }
.cr-corso-data { text-align: center; border: 1px solid #c7d7f2; border-radius: 10px; padding: 5px 0; color: #1e3a8a; }
.cr-corso-data b { display: block; font-size: 19px; line-height: 1.05; }
.cr-corso-data span { font-size: 11.5px; text-transform: lowercase; }
.cr-corso-titolo { font-weight: 700; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cr-corso-stato { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: #475569; margin-top: 2px; }
.testo-ambra { color: #92400e; font-weight: 600; }
@media (max-width: 1100px) { .cr-due { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .cr-compiti li, .cr-lista-corsi li { grid-template-columns: auto minmax(0, 1fr); }
  .cr-compiti li .btn, .cr-lista-corsi li .btn { grid-column: 2; justify-self: start; }
}
.cr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cr-col > .card { margin: 0; }

/* ---- abilitazioni sospese */
tr.abil-sospesa td { background: #fff5f5; }
tr.abil-sospesa td:nth-child(2) { color: #7f1d1d; }
.abil-sosp-info { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.abil-sospendi { display: inline-block; margin-top: 4px; }
.abil-sospendi summary { list-style: none; display: inline-flex; cursor: pointer; }
.abil-sospendi summary::-webkit-details-marker { display: none; }
.abil-sospendi[open] summary { background: #eef3fb; }
.abil-sosp-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 8px; padding: 10px 12px; border: 1px solid #f1c4c4;
                  border-radius: 10px; background: #fffafa; font-size: 13px; }
.abil-sosp-form label { display: flex; flex-direction: column; gap: 3px; }
.abil-sosp-form label.chk { flex-direction: row; align-items: center; }
.abil-motivo { flex: 1 1 240px; }
.abil-motivo input { width: 100%; box-sizing: border-box; }
.maiuscolo { text-transform: uppercase; }

/* ---------------------------------------------------------------- anagrafe unica: importazione e storia */
.azioni-testa { display: flex; flex-wrap: wrap; gap: 8px; }
.alert-box.blu { background: var(--ente-chiaro); border-color: #bfdbfe; }
.import-invito { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.importa { display: grid; gap: 16px; max-width: 920px; }
.importa-cerca label { display: block; margin-bottom: 8px; }
.importa-riga { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.cf-grande { flex: 1 1 260px; font-size: 20px; letter-spacing: .12em; padding: 10px 14px; font-variant-numeric: tabular-nums;
             border: 1.5px solid var(--bordo); border-radius: 8px; min-height: 48px; }
.cf-grande:focus { border-color: var(--ente-scuro); outline: 3px solid var(--ente-chiaro); }
.importa-riga .btn { min-height: 48px; padding: 0 20px; font-size: 15px; }
.cf-testo { letter-spacing: .08em; }
.importa-esito h2 { margin: 2px 0 4px; font-size: 20px; }
.importa-esito.gia { border-left: 4px solid var(--verde); }
.importa-esito.vuoto { border-left: 4px solid var(--grigio); }
.importa-chi { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-end;
               padding-bottom: 14px; border-bottom: 1px solid var(--bordo); }
.percorso { list-style: none; margin: 0 0 16px; padding: 0 0 0 18px; border-left: 2px solid var(--bordo); display: grid; gap: 10px; }
.percorso li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px;
               padding: 10px 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--bordo); }
.percorso li::before { content: ""; position: absolute; left: -25px; top: 16px; width: 10px; height: 10px; border-radius: 50%;
                       background: #fff; border: 2px solid var(--grigio); }
.percorso li.stessa::before { border-color: #d97706; background: #fef3c7; }
.percorso-odv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.percorso-date { color: #334155; text-align: right; }
.percorso-badge { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.importa-verdetto { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 4px; }
.importa-verdetto p { margin: 2px 0 0; }
.importa-verdetto.si { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.importa-verdetto.no { background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; }
.importa-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.importa-form .fg { display: grid; gap: 4px; }
.importa-form input[type=date] { min-height: 40px; }
.importa-origine { border: 1px solid var(--bordo); border-radius: 8px; padding: 8px 12px; display: grid; gap: 4px; flex: 1 1 100%; }
.importa-cosa { margin-top: 14px; color: #475569; }
.importa-cosa summary { cursor: pointer; font-weight: 600; color: var(--blu); }
.storia-persona .percorso li.attiva { background: #fff; border-color: #a7f3d0; }
.storia-passaggi { width: 100%; font-size: 13px; }
.storia-avviso { margin-bottom: 12px; }
@media (max-width: 640px) { .percorso li { grid-template-columns: 1fr; } .percorso-date { text-align: left; } }

/* ================================================================ NEXA, l'assistente alla compilazione
   Segno: esagono di NUXUS con la scintilla dorata del nodo della Consulta. Il blu notte è quello del
   menu; il giallo segna solo ciò che NEXA ha toccato, così si vede subito cosa controllare. */
:root { --nexa-notte: #0b1f4d; --nexa-oro: #f5c400; --nexa-oro-chiaro: #fff6cc; --nexa-ombra: 0 18px 50px rgba(11,31,77,.28); }
.nexa-segno { display: inline-block; width: 18px; height: 18px; flex: none; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8 21 7v10l-9 5.2L3 17V7z' fill='none' stroke='%23f5c400' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M12 6.2c.5 3.2 2.6 5.3 5.8 5.8-3.2.5-5.3 2.6-5.8 5.8-.5-3.2-2.6-5.3-5.8-5.8 3.2-.5 5.3-2.6 5.8-5.8z' fill='%23f5c400'/%3E%3C/svg%3E"); }
.nexa-segno.grande { width: 30px; height: 30px; }

.nexa-lancia { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 0 18px 0 14px; border-radius: 24px; border: 1px solid rgba(245,196,0,.45);
  background: var(--nexa-notte); color: #fff; font: inherit; font-weight: 700; letter-spacing: .14em; cursor: pointer;
  box-shadow: 0 8px 24px rgba(11,31,77,.35); }
.nexa-lancia:hover { background: #12306f; }
.nexa-lancia:focus-visible, .nexa-pannello button:focus-visible, .nexa-invito button:focus-visible { outline: 3px solid var(--nexa-oro); outline-offset: 2px; }
.nexa-lancia[aria-expanded="true"] { display: none; }

.nexa-pannello { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 70; width: min(420px, calc(100vw - 24px));
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: var(--nexa-ombra); overflow: hidden;
  border: 1px solid #d9e0ec; }
.nexa-pannello[hidden] { display: none; }
.nexa-testa { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--nexa-notte); color: #fff; }
.nexa-titolo { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nexa-titolo b { font-size: 17px; letter-spacing: .16em; }
.nexa-sottotitolo { font-size: 13px; color: #c7d2e8; }
.nexa-chiudi { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.nexa-chiudi:hover { background: rgba(255,255,255,.12); }
.nexa-corpo { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.nexa-etichetta { font-weight: 600; font-size: 14px; line-height: 1.4; }
.nexa-testo { width: 100%; resize: vertical; min-height: 120px; font: inherit; font-size: 15px; line-height: 1.5; padding: 10px 12px;
  border: 1.5px solid #c9d4e5; border-radius: 10px; }
.nexa-testo:focus { border-color: var(--nexa-notte); outline: 3px solid var(--nexa-oro-chiaro); }
.nexa-testo::placeholder { color: #7a8597; font-size: 13.5px; }
.nexa-modulo { min-height: 40px; }
.nexa-azioni { display: flex; flex-wrap: wrap; gap: 8px; }
.nexa-azioni .btn { min-height: 42px; }
.nexa-stato { margin: 0; min-height: 1.2em; font-size: 13.5px; color: #475569; }
.nexa-pensa .nexa-testa .nexa-segno { animation: nexa-gira 2.4s linear infinite; }
@keyframes nexa-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nexa-pensa .nexa-testa .nexa-segno { animation: none; opacity: .6; } }

.nexa-risultati h3 { margin: 14px 0 8px; font-size: 14px; }
.nexa-risultati ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nexa-proposta { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e3e8f0; border-radius: 10px; cursor: pointer; }
.nexa-proposta:has(input:checked) { border-color: #e9c84a; background: #fffcef; }
.nexa-proposta input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.nexa-proposta-testi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nexa-proposta-riga { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nexa-campo { font-size: 12.5px; color: #475569; font-weight: 600; }
.nexa-valore { font-size: 15px; font-weight: 700; color: #1f2937; overflow-wrap: anywhere; }
.nexa-motivo { font-size: 12.5px; color: #556070; }
.nexa-fonte { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; flex: none; }
.nexa-fonte.regola { background: #e8eefb; color: #1e3a8a; }
.nexa-fonte.ai { background: var(--nexa-notte); color: var(--nexa-oro); }
.nexa-risultati > .btn { margin-top: 10px; min-height: 42px; width: 100%; justify-content: center; }
.nexa-avvisi li { padding: 8px 12px; border-left: 3px solid #d97706; background: #fffbeb; border-radius: 6px; font-size: 13.5px; }
.nexa-mancano li { padding: 8px 12px; border-left: 3px solid #94a3b8; background: #f8fafc; border-radius: 6px; font-size: 13.5px; }
.nexa-dopo { padding: 12px 14px; border-radius: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.nexa-dopo p { margin: 0 0 8px; }
.nexa-piede { padding: 10px 18px 14px; font-size: 12px; color: #64748b; border-top: 1px solid #eef1f6; }

/* campi compilati da NEXA: anello dorato che si attenua, poi resta un segno discreto */
.nexa-compilato input, .nexa-compilato select, .nexa-compilato textarea, input.nexa-compilato, .nexa-compilato .comuni-multi {
  box-shadow: 0 0 0 3px rgba(245,196,0,.55); border-color: #d4a800 !important; transition: box-shadow 1.2s ease; }
.nexa-compilato-fermo input, .nexa-compilato-fermo select, .nexa-compilato-fermo textarea, .nexa-compilato-fermo .comuni-multi { box-shadow: 0 0 0 2px rgba(245,196,0,.35); }
.fg.nexa-compilato > label::after { content: "NEXA"; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 10px; font-weight: 800;
  letter-spacing: .1em; background: var(--nexa-notte); color: var(--nexa-oro); vertical-align: 1px; }

.nexa-chip { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 5px 6px 5px 10px; border-radius: 18px;
  background: var(--nexa-notte); color: #fff; font-size: 12.5px; width: fit-content; max-width: 100%; }
.nexa-chip[hidden] { display: none; }
.nexa-chip.attenzione { background: #7c2d12; }
.nexa-chip button { border: 0; border-radius: 12px; padding: 3px 10px; background: var(--nexa-oro); color: var(--nexa-notte); font: inherit; font-weight: 700; cursor: pointer; }

.nexa-invito { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--nexa-notte); color: #e6ecf7; }
.nexa-invito-testo { flex: 1 1 260px; font-size: 14.5px; line-height: 1.45; }
.nexa-invito .btn { background: var(--nexa-oro); color: var(--nexa-notte); border-color: var(--nexa-oro); font-weight: 700; min-height: 42px; }
.nexa-invito .btn:hover { background: #ffd83d; }
@media (max-width: 640px) { .nexa-lancia { right: 14px; bottom: 14px; } .nexa-pannello { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 88vh; } }
@media print { .nexa-lancia, .nexa-pannello, .nexa-invito, .nexa-chip { display: none !important; } }
/* su schermi larghi il pannello di NEXA non copre il modulo: il contenuto gli fa spazio */
@media (min-width: 1280px) { body.nexa-aperta .main { padding-right: 452px; } }
.nexa-chip.attenzione { background: #fef3c7; color: #78350f; border: 1px solid #f3d27a; }
.nexa-chip.attenzione button { background: var(--nexa-notte); color: #fff; }
.nexa-esempio { border: 0; background: none; color: var(--blu); font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 0 4px; min-height: 42px; }
.nexa-esempio[hidden] { display: none; }
/* turni: in corso, chiusi prima del previsto, congelati */
table.turni tr.turno-in-corso td:first-child { box-shadow: inset 3px 0 0 var(--verde); }
table.turni tr.turno-chiuso td { color: #64748b; }
.turni-nota { margin: 8px 0 12px; }
.azioni-turno { white-space: nowrap; }
.azioni-turno form + form { margin-left: 6px; }
.turni-congelati { background: #f8fafc; border-style: dashed; }
.turni-acquisizione { border: 1px solid var(--bordo); border-radius: 8px; padding: 10px 14px; margin-top: 14px; display: grid; gap: 8px; }
.turni-acquisizione legend { font-weight: 700; padding: 0 6px; }
.turno-scelta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 8px 0; border-top: 1px solid #eef1f6; }
.turno-scelta-opzioni { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------------------------------------------------------------- percorso dell'emergenza del Comune
   Quattro passi in fila, legati da una linea: il colore dell'associazione segna dove si è e cosa è
   fatto, l'ambra cosa chiede attenzione. Collega la scheda dell'emergenza e la pagina dei volontari. */
.cammino { margin: 0 0 14px; }
.cammino ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff; border: 1px solid var(--bordo); border-radius: 12px; overflow: hidden; }
.cammino-passo { position: relative; min-width: 0; }
.cammino-passo + .cammino-passo { border-left: 1px solid #edf1f6; }
.cammino-passo > a, .cammino-passo > .cammino-voce { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 16px;
  color: var(--testo); text-decoration: none; height: 100%; box-sizing: border-box; }
.cammino-passo > a:hover { background: #f7fafc; text-decoration: none; }
.cammino-passo > a:focus-visible { outline: 3px solid var(--ente); outline-offset: -3px; }
.cammino-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  border: 2px solid #cbd5e1; color: #64748b; background: #fff; }
.cammino-ok { display: none; }
.cammino-testo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cammino-testo b { font-size: 14.5px; line-height: 1.3; }
.cammino-testo span { font-size: 12.5px; color: #64748b; line-height: 1.35; }
.cammino-passo.fatto .cammino-n { border-color: var(--ente); color: var(--ente-scuro); }
.cammino-passo.fatto .cammino-num { display: none; }
.cammino-passo.fatto .cammino-ok { display: inline; }
.cammino-passo.attenzione .cammino-testo span { color: #92400e; font-weight: 600; }
.cammino-passo.attenzione .cammino-n { border-color: #f59e0b; color: #92400e; }
.cammino-passo.corrente { background: var(--ente-chiaro); }
.cammino-passo.corrente::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ente); }
.cammino-passo.corrente .cammino-n { background: var(--ente-scuro); border-color: var(--ente-scuro); color: #fff; }
.cammino-passo.corrente .cammino-num { display: inline; }
.cammino-passo.corrente .cammino-ok { display: none; }
.cammino-passo.spento { opacity: .55; }
.cammino-nota { margin: -6px 0 14px; }
@media (max-width: 820px) {
  .cammino ol { grid-template-columns: 1fr 1fr; }
  .cammino-passo:nth-child(3) { border-left: 0; }
  .cammino-passo:nth-child(n+3) { border-top: 1px solid #edf1f6; }
}
@media (max-width: 460px) { .cammino ol { grid-template-columns: 1fr; } .cammino-passo + .cammino-passo { border-left: 0; border-top: 1px solid #edf1f6; } }

/* il passo successivo, dove serve: un invito unico e chiaro invece di un collegamento perso in fondo */
.prossimo-passo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 16px 0 4px; padding: 14px 16px;
  border-radius: 12px; background: var(--ente-chiaro); border: 1px solid color-mix(in srgb, var(--ente) 45%, white); }
.prossimo-passo.attenzione { background: #fffbeb; border-color: #fcd34d; margin: 0 0 14px; }
.prossimo-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--ente-scuro); color: #fff; }
.prossimo-passo.attenzione .prossimo-n { background: #b45309; }
.prossimo-testo { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.prossimo-testo b { font-size: 15px; }
.prossimo-testo span { font-size: 13px; color: #475569; }
.prossimo-passo .btn { min-height: 42px; }
.turni-guida { margin: 0 0 12px; color: #475569; max-width: 75ch; }
.piano-propria .piano-squadra .form-grid { margin-top: 4px; clear: both; }
/* il racconto a NEXA serve ai dati dell'emergenza: con un'altra sezione aperta si toglie */
.nexa-invito:has(+ form[data-fuori]) { display: none; }

/* ---------------------------------------------------------------- sede operativa dell'associazione */
.sede-operativa { display: contents; }
.sede-scelta label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.sede-scelta input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
