/* Stile condiviso delle pagine pubbliche di accesso (areasoci.html, areaStaff.html), coordinato con la
   vetrina index.html (stessi token colore, font e pulsanti). Non usa Bootstrap: le sue classi .btn/.form-control
   andrebbero in conflitto, quindi qui ci sono anche gli stili minimi per gli avvisi PNotify (styling 'bootstrap3'). */

:root {
    --blu: #0b4ea2;
    --blu-scuro: #0a2a5c;
    --notte: #071833;
    --cielo: #5fc3ec;
    --ghiaccio: #eaf6fd;
    --giallo: #ffe11a;
    --rosso: #e3262f;
    --verde: #3aa845;
    --arancio: #f39c12;
    --testo: #10213d;
    --testo-soft: #4a5a75;
    --bordo: #dce8f5;
    --bianco: #ffffff;
    --raggio: 22px;
    --ombra: 0 18px 50px -20px rgba(10, 42, 92, .35);
    --font-titoli: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --font-testo: 'Figtree', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-testo);
    font-size: 16px;
    line-height: 1.6;
    color: var(--testo);
    background: var(--ghiaccio);
}
img { max-width: 100%; display: block; }
a { color: var(--blu); }
h1, h2, h3 { font-family: var(--font-titoli); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.occhiello {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blu); margin-bottom: 12px;
}
.occhiello::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--rosso); }

/* ---------- Pulsanti ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-testo); font-weight: 700; font-size: 1rem; line-height: 1.2;
    padding: 14px 24px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--cielo); outline-offset: 2px; }
.btn-primario { background: var(--giallo); color: var(--notte); box-shadow: 0 10px 30px -10px rgba(255, 200, 0, .8); }
.btn-blu { background: var(--blu); color: var(--bianco); box-shadow: 0 10px 30px -12px rgba(11, 78, 162, .8); }
.btn-chiaro { background: var(--ghiaccio); color: var(--blu); }
.btn-vetro { background: rgba(255,255,255,.12); color: var(--bianco); border: 1.5px solid rgba(255,255,255,.4); }
.btn-vetro:hover { background: rgba(255,255,255,.22); }
.btn-piccolo { padding: 9px 18px; font-size: .92rem; }
.btn-blocco { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- Marchio ---------- */
.marchio { display: inline-flex; align-items: center; gap: 12px; color: var(--bianco); text-decoration: none; font-family: var(--font-titoli); font-weight: 800; font-size: 1.12rem; line-height: 1.05; }
.marchio img { width: 50px; height: 50px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.marchio small { display: block; font-family: var(--font-testo); font-weight: 500; font-size: .7rem; opacity: .75; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Layout di accesso (pannello + modulo) ---------- */
.accesso { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; }
.accesso-pannello {
    position: relative; overflow: hidden; color: var(--bianco);
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 36px clamp(28px, 5vw, 64px) 120px;
    background: var(--notte);
}
.accesso-pannello::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: url('./images/foto-gruppo-sci-tavernola.jpeg') center 35%/cover no-repeat;
}
.accesso-pannello::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background:
        radial-gradient(ellipse at 85% 10%, rgba(95,195,236,.35), transparent 55%),
        linear-gradient(160deg, rgba(7,24,51,.94) 0%, rgba(10,42,92,.86) 55%, rgba(10,42,92,.6) 100%);
}
.accesso-staff .accesso-pannello::after {
    background:
        radial-gradient(ellipse at 85% 10%, rgba(255,225,26,.18), transparent 55%),
        linear-gradient(160deg, rgba(7,24,51,.97) 0%, rgba(7,24,51,.92) 60%, rgba(10,42,92,.75) 100%);
}
.accesso-pannello > * { position: relative; z-index: 1; }
.accesso-pannello .occhiello { color: var(--giallo); }
.accesso-pannello h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; margin-bottom: 16px; }
.accesso-pannello h1 em { font-style: normal; color: var(--giallo); }
.accesso-pannello p { font-size: 1.08rem; opacity: .9; max-width: 460px; }
.punti { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; max-width: 460px; }
.punti li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.punti .ico { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--giallo); }
.punti .ico svg { width: 20px; height: 20px; }
.torna-sito { display: inline-flex; align-items: center; gap: 8px; color: var(--bianco); text-decoration: none; font-weight: 600; opacity: .85; }
.torna-sito:hover { opacity: 1; color: var(--giallo); }
.torna-sito svg { width: 18px; height: 18px; }
.montagne { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 110px; z-index: 1; }

.accesso-modulo { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--ghiaccio); }
.scheda-accesso {
    width: 100%; max-width: 440px; background: var(--bianco); border-radius: 28px;
    padding: clamp(28px, 4vw, 44px); box-shadow: var(--ombra); border: 1px solid var(--bordo);
    animation: entra .5s cubic-bezier(.2,.7,.2,1);
}
@keyframes entra { from { opacity: 0; transform: translateY(16px); } }
.scheda-accesso h2 { font-size: 1.9rem; font-weight: 800; }
.scheda-accesso .sottotitolo { color: var(--testo-soft); margin-bottom: 26px; }
.scheda-accesso .note { color: var(--testo-soft); font-size: .88rem; margin: 18px 0 0; }
.scheda-accesso .link-riga { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: .92rem; font-weight: 600; }
.scheda-accesso .link-riga a { text-decoration: none; }
.scheda-accesso .link-riga a:hover { text-decoration: underline; }
.scheda-accesso .divisore { display: flex; align-items: center; gap: 12px; color: var(--testo-soft); font-size: .85rem; margin: 24px 0 16px; }
.scheda-accesso .divisore::before, .scheda-accesso .divisore::after { content: ""; flex: 1; height: 1px; background: var(--bordo); }
.esito { display: flex; gap: 12px; align-items: flex-start; background: #e9f8ec; color: #1e6b2a; border-radius: 14px; padding: 14px 16px; margin-top: 18px; font-size: .94rem; }
.esito svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }

/* ---------- Campi ---------- */
.campo { margin-bottom: 18px; }
.campo label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.campo-input { position: relative; }
.campo-input > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--testo-soft); pointer-events: none; }
.campo input {
    width: 100%; font: inherit; color: var(--testo);
    padding: 14px 16px 14px 46px; border-radius: 14px; border: 1.5px solid var(--bordo); background: #f8fbff;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.campo input:focus { outline: none; border-color: var(--blu); background: var(--bianco); box-shadow: 0 0 0 4px rgba(11,78,162,.12); }
.mostra-password {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; padding: 8px; cursor: pointer; color: var(--testo-soft); border-radius: 10px;
}
.mostra-password:hover { color: var(--blu); background: var(--ghiaccio); }
.mostra-password svg { width: 20px; height: 20px; display: block; }
.campo input[type="password"], .campo input.con-occhio { padding-right: 50px; }

/* ---------- Area personale soci ---------- */
.barra {
    position: sticky; top: 0; z-index: 50; background: rgba(7,24,51,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 8px 30px -12px rgba(0,0,0,.4);
}
.barra .contenitore { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.barra-azioni { display: flex; align-items: center; gap: 10px; }
.contenitore { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.benvenuto {
    position: relative; overflow: hidden; color: var(--bianco);
    background: linear-gradient(120deg, var(--blu-scuro) 0%, var(--blu) 100%);
    padding: 48px 0 110px;
}
.benvenuto::after { content: "❄"; position: absolute; right: -40px; top: -70px; font-size: 18rem; line-height: 1; opacity: .07; }
.benvenuto .contenitore { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.benvenuto .occhiello { color: var(--giallo); }
.benvenuto h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; margin: 0 0 6px; }
.benvenuto p { margin: 0; opacity: .88; }

.cruscotto { margin-top: -70px; position: relative; z-index: 2; padding-bottom: 60px; }
.griglia-schede { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.riquadro { background: var(--bianco); border-radius: var(--raggio); padding: 26px; box-shadow: var(--ombra); border: 1px solid var(--bordo); }
.riquadro-testa { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.riquadro-testa .ico { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ghiaccio); color: var(--blu); }
.riquadro-testa .ico svg { width: 22px; height: 22px; }
.riquadro-testa h2 { font-size: 1.3rem; margin: 0; }
.riquadro-testa .conteggio { margin-left: auto; background: var(--ghiaccio); color: var(--blu); font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }

.dati { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0; }
.dati div { min-width: 0; }
.dati dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--testo-soft); font-weight: 700; }
.dati dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.dati .largo { grid-column: 1 / -1; }

.persona { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--bordo); }
.persona:last-child { border-bottom: 0; }
.avatar { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blu); color: var(--bianco); font-family: var(--font-titoli); font-weight: 800; }
.persona .avatar { color: var(--bianco); font-size: 1rem; }
.persona { cursor: pointer; border-radius: 12px; padding: 12px; transition: background .15s ease; }
.persona:hover { background: var(--ghiaccio); }
.persona.attiva { background: var(--ghiaccio); box-shadow: inset 0 0 0 2px var(--blu); border-bottom-color: transparent; }
.persona:nth-child(3n+2) .avatar { background: var(--rosso); }
.persona:nth-child(3n+3) .avatar { background: var(--verde); }
.persona strong { display: block; }
.persona span { color: var(--testo-soft); font-size: .9rem; }

.vuoto { text-align: center; color: var(--testo-soft); padding: 22px 10px; }
.vuoto .btn { margin-top: 12px; }

.prenotazioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.prenotazione { border: 1.5px solid var(--bordo); border-radius: 18px; padding: 20px; background: #fbfdff; }
.prenotazione-testa { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.prenotazione-testa strong { font-family: var(--font-titoli); font-size: 1.15rem; }
.prenotazione .dettaglio { color: var(--testo-soft); font-size: .92rem; margin-bottom: 16px; }
.stato { flex: 0 0 auto; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; }
.stato-saldato { background: #e3f6e6; color: #1e6b2a; }
.stato-parziale { background: #fff4d6; color: #8a5a00; }
.stato-dapagare { background: #fde4e5; color: #a3161d; }
.riepilogo-importi { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; padding: 14px 18px; margin-bottom: 18px; border-radius: 14px; background: var(--ghiaccio); font-size: .95rem; }
.riepilogo-importi b { font-family: var(--font-titoli); font-size: 1.1rem; }
.riepilogo-importi .da-pagare { color: var(--rosso); font-weight: 600; }
.riepilogo-importi.saldato .da-pagare { color: var(--verde); }
.acquisti { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.acquisto { padding: 3px 10px; border-radius: 999px; background: var(--ghiaccio); color: var(--blu); font-size: .8rem; font-weight: 600; }
.importi { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 8px; }
.importi b { font-family: var(--font-titoli); font-size: 1.05rem; }
.progresso { height: 8px; border-radius: 999px; background: var(--ghiaccio); overflow: hidden; }
.progresso span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cielo), var(--blu)); transition: width .8s ease; }
.prenotazione.saldata .progresso span { background: linear-gradient(90deg, #6fd27c, var(--verde)); }

.caricamento { display: grid; place-items: center; padding: 30px; }
.caricamento::after { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--bordo); border-top-color: var(--blu); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.piede { text-align: center; color: var(--testo-soft); font-size: .85rem; padding: 0 20px 30px; }
.piede a { color: var(--testo-soft); }

/* ---------- Prenotazione eventi (prenotazioneEvento.html) ---------- */
.btn-pericolo { background: #fde4e5; color: #a3161d; }
.avviso { background: #fff4d6; color: #8a5a00; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: .94rem; }
.nota-piccola { color: var(--testo-soft); font-size: .86rem; margin: 10px 0 0; }
.cruscotto .riquadro + .riquadro { margin-top: 22px; }
.prenotazione .data-evento { font-weight: 700; color: var(--blu); margin-bottom: 4px; }
.prenotazione > .btn { margin-top: 14px; }
.partecipante { border: 1.5px solid var(--bordo); border-radius: 18px; padding: 14px 18px; margin-bottom: 14px; background: #fbfdff; }
.partecipante.attivo { border-color: var(--blu); background: var(--bianco); }
.partecipante-testa { display: flex; align-items: center; gap: 12px; }
.partecipa { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; min-width: 0; }
.partecipa input[type="checkbox"], .opzione input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--blu); flex: 0 0 auto; }
.partecipa .avatar { flex: 0 0 38px; height: 38px; font-size: .9rem; }
.etichetta { flex: 0 0 auto; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--ghiaccio); color: var(--blu); }
.etichetta.corsista { background: #e3f6e6; color: #1e6b2a; }
.btn-rimuovi { border: 0; background: transparent; color: var(--rosso); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.partecipante-corpo { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--bordo); display: grid; gap: 14px; }
.campi-riga { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.campo-riga { display: block; }
.campo-riga > span { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.campo-riga input, .pasto select {
    width: 100%; font: inherit; padding: 10px 14px; border: 1.5px solid var(--bordo); border-radius: 12px; background: var(--bianco); color: var(--testo);
}
.campo-riga input:focus, .pasto select:focus { outline: none; border-color: var(--blu); box-shadow: 0 0 0 4px rgba(11,78,162,.12); }
.opzione { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.pasto { display: grid; gap: 10px; }
.pasto-titolo { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--testo-soft); }
.pasto .composizione { white-space: pre-line; color: var(--testo-soft); font-size: .9rem; background: var(--ghiaccio); border-radius: 12px; padding: 10px 14px; }
.riepilogo-prenotazione { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.riepilogo-prenotazione .totali { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.riepilogo-prenotazione .totali b { font-family: var(--font-titoli); font-size: 1.15rem; margin-left: 4px; }
.riepilogo-prenotazione .azioni { display: flex; flex-wrap: wrap; gap: 10px; }
.ordinato { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px dashed var(--bordo); }
.ordinato li { padding: 10px 0; border-bottom: 1px dashed var(--bordo); }
.ordinato-nome { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ordinato-voci { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-top: 2px; font-size: .9rem; color: var(--testo); }
.ordinato-voci .no { color: var(--testo-soft); }
.ordinato-voci b { margin-left: auto; font-family: var(--font-titoli); }
@media (max-width: 560px) {
    .riepilogo-prenotazione .azioni, .riepilogo-prenotazione .azioni .btn { width: 100%; }
}

/* ---------- Ritiro attrezzatura: scelta slot e articoli ---------- */
.slot-giorni { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.slot-giorno { border: 1.5px solid var(--bordo); background: var(--bianco); color: var(--testo); border-radius: 14px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-transform: capitalize; }
.slot-giorno.attivo { border-color: var(--blu); background: var(--blu); color: var(--bianco); }
.slot-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { border: 1.5px solid var(--bordo); background: var(--bianco); color: var(--blu); border-radius: 12px; padding: 10px 6px; font: inherit; font-weight: 800; cursor: pointer; line-height: 1.15; }
.slot small { display: block; font-weight: 500; font-size: .72rem; color: var(--testo-soft); }
.slot:hover:not(:disabled) { border-color: var(--blu); }
.slot.scelto { background: var(--blu); border-color: var(--blu); color: var(--bianco); }
.slot.scelto small { color: rgba(255,255,255,.85); }
.slot:disabled { opacity: .4; cursor: not-allowed; background: var(--ghiaccio); }
.articoli { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.articoli .opzione small { font-weight: 600; color: var(--testo-soft); }
.articoli .opzione small.incluso { color: #1e6b2a; }
.riga-ritiro { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }

/* ---------- PNotify senza Bootstrap ---------- */
.ui-pnotify .alert { font-family: var(--font-testo); border-radius: 16px; padding: 14px 18px; border: 0; box-shadow: var(--ombra); color: var(--bianco); background: var(--blu-scuro); }
.ui-pnotify .alert-danger, .ui-pnotify .alert-error { background: var(--rosso); }
.ui-pnotify .alert-success { background: var(--verde); }
.ui-pnotify .alert-warning { background: var(--arancio); }
.ui-pnotify .alert-info { background: var(--blu); }
.ui-pnotify .ui-pnotify-title { font-family: var(--font-titoli); font-size: 1.05rem; margin: 0 0 2px; }
.ui-pnotify .ui-pnotify-text { font-size: .94rem; }
.ui-pnotify .glyphicon { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .accesso { grid-template-columns: 1fr; }
    .accesso-pannello { padding: 22px 20px 90px; gap: 26px; }
    .accesso-pannello .punti, .accesso-pannello .torna-sito { display: none; }
    .accesso-pannello h1 { font-size: 2rem; margin-bottom: 8px; }
    .accesso-pannello p { font-size: 1rem; margin: 0; }
    .montagne { height: 70px; }
    .accesso-modulo { align-items: flex-start; padding: 0 16px 40px; background: var(--ghiaccio); }
    .scheda-accesso { margin-top: -50px; position: relative; z-index: 2; }
    .griglia-schede { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .contenitore { padding: 0 16px; }
    .marchio span { font-size: 1rem; }
    .marchio img { width: 42px; height: 42px; }
    .barra .marchio small { display: none; }
    .dati { grid-template-columns: 1fr; }
    .benvenuto .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Registrazione pubblica ---------- */
.campo label small { font-weight: 500; color: var(--testo-soft); }
.consenso { align-items: flex-start; font-weight: 500; font-size: .9rem; margin: 4px 0 18px; }
.consenso input { margin-top: 3px; }
.scelta-accesso { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.scelta-accesso .riquadro { margin-bottom: 0; }
