/* Tessera dei soci (1.10): grafica del rendering "Tessera virtuale SCS" (magenta, Montserrat, striscia dorata del Gruppo di Cura). */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("font/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("font/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("font/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("font/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 800; font-display: swap; src: url("font/montserrat-latin-800-italic.woff2") format("woff2"); }

:root {
  --fondo: #EEEDF1; --carta: #FFFFFF; --ink: #17161A; --tenue: #5C5A63; --tenue2: #4A4851; --riga: #ECEAEF; --seg: #E2E0E7;
  --magenta: #C8154F; --magenta-ink: #B0124B; --magenta-chiaro: #FCE6EE; --spenta: #6B6873; --verde: #0B6A55; --verde-chiaro: #DFF1EB;
  --rosso: #B42318; --rosso-chiaro: #FBE4E1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--ink); }
body { font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
main { max-width: 440px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
a { color: var(--magenta-ink); }
h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 16px; font-weight: 800; }
p { margin: 0; }
.tenue { color: var(--tenue); }
.piccolo { font-size: 13px; }
.rete { position: sticky; top: 0; z-index: 5; background: #17161A; color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 8px 12px; }

/* testata e schede */
.testa { display: flex; justify-content: space-between; align-items: flex-end; }
.testa .ente { font-size: 13px; font-weight: 600; color: var(--tenue); }
.link { background: none; border: 0; padding: 12px 4px; font: inherit; font-size: 14px; font-weight: 600; color: var(--magenta-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.schede { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--seg); border-radius: 14px; padding: 4px; }
.schede button { min-height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.schede button[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 700; }
.schede.quattro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.schede.quattro button { font-size: 13px; }

/* la tessera */
.tessera { border-radius: 20px; overflow: hidden; box-shadow: 0 18px 36px -22px rgba(23, 22, 26, 0.55); }
.tessera.oro { box-shadow: 0 20px 38px -22px rgba(74, 52, 6, 0.65); }
.fronte { position: relative; min-height: 214px; background: var(--magenta); color: #fff; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.tessera.con-striscia .fronte { min-height: 196px; }
.tessera.spenta .fronte { background: var(--spenta); }
.tessera.cessata .fronte { background: #9A98A1; }
.fronte .su { display: flex; justify-content: space-between; align-items: flex-start; }
.fronte .logo { width: 92px; height: 76px; object-fit: contain; margin: -6px 0 0 -6px; }
.tessera.spenta .logo, .tessera.cessata .logo { filter: grayscale(1); }
.fronte .anno { display: flex; flex-direction: column; align-items: flex-end; }
.fronte .anno small { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.fronte .anno strong { font-size: 24px; font-weight: 800; font-style: italic; letter-spacing: -0.01em; }
.fronte .giu { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.fronte .chi { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fronte .nome { font-size: 22px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; overflow-wrap: anywhere; }
.fronte .numero { font-size: 13px; font-weight: 600; }
.pillola { flex: none; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--magenta-ink); border-radius: 999px; padding: 6px 12px 6px 9px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.tessera.cessata .pillola { color: var(--tenue2); }
/* 1.11.3: quota da rinnovare, bollino giallo che si nota sulla tessera grigia */
.tessera.spenta .pillola { background: #FFE27A; color: #5A4200; box-shadow: 0 0 0 2px rgba(255, 226, 122, 0.35); }
.pillola svg { width: 16px; height: 16px; }

.striscia { position: relative; height: 66px; display: flex; align-items: center; padding: 0 64px 0 76px; border-top: 1px solid #F6E3A0;
  background: linear-gradient(100deg, #E2C15A 0%, #C99E31 36%, #EED477 60%, #C29629 100%); color: #2C1F03; }
.striscia.argento { border-top-color: #FFFFFF; background: linear-gradient(100deg, #D9DCE2 0%, #AEB2BB 36%, #EEF0F3 60%, #A6AAB3 100%); color: #1F2228; }
.tessera.spenta .striscia { filter: grayscale(0.85); }
.striscia .spirale { position: absolute; left: 10px; top: 3px; width: 58px; height: 58px; }
.striscia .filo { position: absolute; left: 66px; right: 58px; top: 9px; height: 2px; border-radius: 1px; background: #6B4C09; box-shadow: 0 1px 0 #F8E9AE; }
.striscia .filo2 { position: absolute; left: 66px; right: 58px; bottom: 9px; height: 1px; background: #8A6A16; opacity: 0.6; }
.striscia.argento .filo { background: #4A4E58; box-shadow: 0 1px 0 #FFFFFF; }
.striscia.argento .filo2 { background: #6B707A; }
.fronte .nome.lungo { font-size: 17px; }
.striscia .carica.lunga { font-size: 13px; letter-spacing: 0.03em; }
.striscia .testo { display: flex; flex-direction: column; gap: 1px; padding-top: 4px; min-width: 0; }
.striscia .carica { font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.striscia .organo { font-size: 11px; font-weight: 700; opacity: 0.85; }
.striscia .tacche { position: absolute; right: 16px; top: 10px; bottom: 10px; display: flex; gap: 4px; }
.striscia .tacche i { display: block; width: 4px; border-radius: 2px; background: #8A6A16; box-shadow: 1px 0 0 #F8E9AE; }
.striscia.argento .tacche i { background: #6B707A; box-shadow: 1px 0 0 #FFFFFF; }

/* riquadri */
.riquadro { background: var(--carta); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.qr { display: flex; gap: 16px; align-items: center; flex-direction: row; }
.qr .codice { flex: none; width: 128px; height: 128px; }
.qr .codice svg { width: 100%; height: 100%; display: block; }
.qr .spiega { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qr strong { font-size: 16px; font-weight: 800; }
.qr p { font-size: 13px; line-height: 1.4; color: var(--tenue2); }
.offline-ok { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--verde); }
.offline-ok svg { width: 16px; height: 16px; }
.riquadro p { font-size: 13px; line-height: 1.45; color: var(--tenue2); }
.riquadro .titolo { font-size: 16px; font-weight: 800; color: var(--ink); }
.dati-banca { display: grid; gap: 8px; }
.dati-banca div { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #F6F5F8; border-radius: 12px; padding: 10px 12px; }
.dati-banca span { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--tenue); }
.dati-banca span b { font-size: 14px; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.copia { flex: none; min-height: 36px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; padding: 0 12px; cursor: pointer; }

/* pulsanti */
.bottone { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--ink); background: transparent;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; padding: 0 16px; }
.bottone.pieno { background: var(--magenta-ink); border-color: var(--magenta-ink); color: #fff; font-size: 15px; }
.bottone:disabled { opacity: 0.5; cursor: default; }
.bottone svg { width: 18px; height: 18px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #E7A500; outline-offset: 2px; }

/* elenchi */
.elenco { display: flex; flex-direction: column; }
.elenco .voce { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--riga); color: var(--ink); text-decoration: none; }
.elenco .voce:last-child { border-bottom: 0; }
.elenco .corpo, .precedente .corpo { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.elenco .corpo b, .precedente .corpo b { font-size: 15px; font-weight: 700; }
.elenco .corpo small, .precedente .corpo small { font-size: 12px; font-weight: 500; color: var(--tenue); }
.scarica { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--magenta-chiaro); color: var(--magenta-ink); border: 0; cursor: pointer; }
.scarica svg { width: 20px; height: 20px; }
.punto { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--magenta); margin-top: 5px; }
.punto.vuoto { background: transparent; border: 2px solid var(--magenta); }
.passo { display: flex; gap: 12px; align-items: flex-start; }
.etichetta { flex: none; border-radius: 999px; background: var(--verde-chiaro); color: var(--verde); font-size: 12px; font-weight: 700; padding: 4px 10px; }
.etichetta.grigia { background: #ECEAEF; color: var(--tenue2); }
.vuoto-testo { font-size: 13px; color: var(--tenue); padding: 6px 0; }
.precedente { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 12px 14px; }
.precedente .mini { flex: none; width: 46px; height: 30px; border-radius: 6px; background: #8E1A44; }

/* campi e messaggi */
label { display: block; font-size: 14px; font-weight: 700; margin: 4px 0 6px; }
input, textarea { width: 100%; font: inherit; font-size: 17px; color: inherit; background: #fff; border: 1.5px solid #D5D3DB; border-radius: 12px; padding: 12px; min-height: 50px; }
textarea { min-height: 110px; font-size: 15px; }
.avviso { border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.avviso.errore { background: var(--rosso-chiaro); color: var(--rosso); }
.avviso.ok { background: var(--verde-chiaro); color: var(--verde); }
.avviso.info { background: #E9E8EE; color: var(--ink); }
.dl { display: grid; gap: 10px; margin: 0; }
.dl div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.dl dt { font-size: 13px; color: var(--tenue); }
.dl dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.entra .logo-grande { width: 120px; height: 100px; object-fit: contain; margin-left: -8px; }
.scelta { display: grid; gap: 10px; }
.scelta button { text-align: left; background: #fff; border: 0; border-radius: 16px; padding: 14px 16px; font: inherit; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.scelta b { font-size: 16px; }
.scelta small { color: var(--tenue); font-weight: 600; }
@media (max-width: 360px) {
  .fronte .nome { font-size: 19px; }
  .qr { flex-direction: column; align-items: flex-start; }
  .striscia { padding-right: 46px; }
}
.elenco-prec { display: flex; flex-direction: column; gap: 10px; }
/* 1.11: scelta della lingua (Dati e pagina d'accesso) */
.lingue { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lingue button { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--seg); background: var(--carta); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lingue button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lingue.piccole { justify-content: center; margin-top: 4px; }
.lingue.piccole button { min-height: 36px; font-size: 13px; padding: 6px 14px; }
/* 1.11.3: più quote da pagare */
.sotto-titolo { margin: 16px 0 2px; font-size: 14px; font-weight: 800; }
.paga-anni { display: grid; gap: 8px; margin-top: 8px; }

/* 1.11.4: nota sotto la tessera grigia */
.nota-carta { margin: 8px 4px 16px; font-size: 12px; line-height: 1.4; text-align: center; color: var(--tenue); }

/* 1.12: scheda Ingressi degli operatori */
select { width: 100%; font: inherit; font-size: 15px; background: #fff; border: 1.5px solid #D5D3DB; border-radius: 12px; padding: 10px 12px; min-height: 46px; color: var(--ink); }
details.riquadro summary { font-size: 15px; font-weight: 700; cursor: pointer; }
.ing-numeri { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
.ing-numeri b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.ing-numeri span { font-size: 12px; color: var(--tenue); }
.ing-numeri .etichetta { font-size: 12px; }
.etichetta.rossa { background: var(--rosso-chiaro); color: var(--rosso); }
.ing-esito { border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; border: 2px solid transparent; }
.ing-esito.ok { background: var(--verde-chiaro); color: var(--verde); border-color: var(--verde); }
.ing-esito.errore { background: var(--rosso-chiaro); color: var(--rosso); border-color: var(--rosso); }
.ing-esito.attesa { background: #FFF4CC; color: #5A4200; border-color: #E7A500; }
.ing-esito.info { background: #E9E8EE; color: var(--ink); }
.ing-nome { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.ing-testo { font-size: 15px; font-weight: 700; }
.ing-esito .bottone { margin-top: 6px; background: #fff; }
.ing-cam { display: none; position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.ing-cam.accesa { display: block; }
.ing-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ing-cam .mirino { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
.mini-bottone { flex: none; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mini-bottone.pieno { background: var(--ink); color: #fff; }

/* 1.13: modulo della domanda di iscrizione (/iscrizione) */
.campo { display: flex; flex-direction: column; }
.campo label { margin-top: 0; }
.campo + .campo { margin-top: 6px; }
.campo.errato input { border-color: var(--rosso); background: var(--rosso-chiaro); }
.err-campo { color: var(--rosso); font-size: 13px; font-weight: 700; margin-top: 4px; }
label.spunta { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; line-height: 1.4; margin: 6px 0; cursor: pointer; }
label.spunta input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 1px 0 0; padding: 0; accent-color: var(--magenta-ink); }
.campo.errato label.spunta { color: var(--rosso); }
.griglia2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.riquadro a { color: var(--magenta-ink); }
.riquadro a.bottone { color: var(--ink); }
input[type="file"] { padding: 10px; font-size: 14px; }
.esca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#f { display: flex; flex-direction: column; gap: 18px; }
.griglia2 > .campo { margin-top: 0; }
.griglia2 + .campo, .campo + .griglia2 { margin-top: 6px; }
