/* BandApp – stile dell'area soci. Identità ripresa dal sito della banda: blu notte, oro, Merriweather + Lato. */

@font-face { font-family: "Lato"; src: url("../fonts/lato-400.e1b3b5908c9c.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-700.de69cf9e514d.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Merriweather"; src: url("../fonts/merriweather.5c271de154f2.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --navy-900: #0b1c33;
  --navy-800: #0f2540;
  --navy-700: #1a3a5c;
  --navy-500: #2e5a8a;
  --gold-500: #d4af37;
  --gold-400: #e2c35d;
  --gold-100: #f8f0d6;

  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --text: #17202e;
  --muted: #5f6b7a;
  --line: #e4dfd3;
  --line-strong: #cfc8b8;
  --brand: var(--navy-800);
  --brand-hover: var(--navy-700);
  --link: #1d4f86;
  --accent: var(--gold-500);
  --focus: #3b78c4;

  --ok-bg: #e7f5ec;  --ok-fg: #166b3a;  --ok-line: #b6dfc5;
  --warn-bg: #fdf3df; --warn-fg: #8a5300; --warn-line: #efd29b;
  --err-bg: #fdeceb; --err-fg: #a8241b; --err-line: #f1c0bb;
  --info-bg: #e9f0f9; --info-fg: #1d4f86; --info-line: #c4d6ee;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 37, 64, .06), 0 6px 20px rgba(15, 37, 64, .06);
  --shadow-lg: 0 18px 50px rgba(11, 28, 51, .18);
  --serif: "Merriweather", Georgia, serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1626;
    --surface: #102239;
    --surface-2: #0d1d31;
    --text: #e8edf4;
    --muted: #9aa8ba;
    --line: #1f3654;
    --line-strong: #2c4a70;
    --brand: #2a5a8f;
    --brand-hover: #336aa6;
    --link: #8fbaf0;
    --focus: #8fbaf0;
    --ok-bg: #0f2e22;  --ok-fg: #7fd6a3;  --ok-line: #1d5a3e;
    --warn-bg: #33270d; --warn-fg: #f0c766; --warn-line: #5c4615;
    --err-bg: #3a1513; --err-fg: #f4a29b; --err-line: #6b2620;
    --info-bg: #13294a; --info-fg: #9cc3f2; --info-line: #24467a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 14px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 28px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- Barra superiore ---------- */
.topbar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #fff; border-bottom: 3px solid var(--gold-500);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand-logo { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .01em; }
.brand-text small { color: var(--gold-400); font-size: .78rem; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav form { margin: 0; }
.nav a, .nav button {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 99px;
  color: rgba(255, 255, 255, .85); text-decoration: none; font: inherit; font-size: .95rem;
  background: none; border: 0; cursor: pointer; transition: background .15s, color .15s;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current="page"] { background: rgba(212, 175, 55, .16); color: var(--gold-400); }
.nav .nav-gestione { color: var(--gold-400); }
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 6px; padding-top: 10px; }
  .brand-text small { display: none; }
  .nav { width: calc(100% + 32px); margin: 0 -16px; padding: 4px 12px 8px; overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav button { flex-direction: column; gap: 2px; font-size: .72rem; padding: 6px 10px; border-radius: 10px; flex: 1; }
  .nav .i { width: 1.35em; height: 1.35em; }
}

/* ---------- Testata con foto ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy-900) url("../img/banda-1600.b6eda879b21a.jpg") center 35% / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11, 28, 51, .96) 0%, rgba(11, 28, 51, .86) 45%, rgba(11, 28, 51, .45) 100%);
}
.hero .wrap { position: relative; padding-top: 44px; padding-bottom: 44px; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, .82); max-width: 640px; }
.hero .eyebrow { color: var(--gold-400); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: .85rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.chip-gold { background: rgba(212, 175, 55, .18); border-color: rgba(212, 175, 55, .45); color: var(--gold-400); }
@media (max-width: 760px) { .hero { background-image: url("../img/banda-800.b4357e69d5ae.jpg"); } .hero .wrap { padding-top: 28px; padding-bottom: 28px; } }

/* ---------- Card e griglie ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.card-head h2 .i { color: var(--accent); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .grid-sidebar { grid-template-columns: 1fr; } }
.section { margin-top: 24px; }

/* Riquadri numerici */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-100); color: #8a6a12; flex: none; }
.stat-icon .i { width: 22px; height: 22px; }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.stat-value { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.stat.ok .stat-icon { background: var(--ok-bg); color: var(--ok-fg); }
.stat.warn .stat-icon { background: var(--warn-bg); color: var(--warn-fg); }
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .stat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stat-value { font-size: 1.05rem; }
}
@media (prefers-color-scheme: dark) { .stat-icon { background: rgba(212, 175, 55, .15); color: var(--gold-400); } }

/* ---------- Messaggi e avvisi ---------- */
.messaggi { display: grid; gap: 10px; margin-bottom: 20px; }
.msg, .callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--info-line); background: var(--info-bg); color: var(--info-fg); overflow-wrap: anywhere; }
.msg .i, .callout .i { margin-top: 3px; }
.msg-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-fg); }
.msg-warning, .callout-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }
.msg-error { background: var(--err-bg); border-color: var(--err-line); color: var(--err-fg); }
.callout { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout > div { display: flex; gap: 12px; align-items: center; }
.callout a { color: inherit; font-weight: 700; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; font-size: .82rem; font-weight: 700; border: 1px solid transparent; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge-gold { background: var(--gold-100); color: #7a5c0c; border-color: #ecd9a0; }
@media (prefers-color-scheme: dark) { .badge-gold { background: rgba(212, 175, 55, .15); color: var(--gold-400); border-color: rgba(212, 175, 55, .35); } }

/* ---------- Liste ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--link); flex: none; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.list-meta { color: var(--muted); font-size: .875rem; }
.list-actions { display: flex; gap: 6px; flex: none; }
.links a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 0 -12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.links a:hover { background: var(--surface-2); }
.links a .i:first-child { color: var(--accent); }
.links a .i:last-child { margin-left: auto; color: var(--muted); }

/* Storico */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .anno { font-family: var(--serif); font-weight: 700; color: var(--accent); }

/* Dati anagrafici */
dl.dati { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
dl.dati dt { color: var(--muted); font-size: .9rem; }
dl.dati dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--gold-400); background: linear-gradient(145deg, var(--navy-700), var(--navy-900)); border: 3px solid var(--gold-500); margin-bottom: 12px; }
.profile-head { text-align: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-head .avatar { margin: 0 auto 12px; }
.profile-head h2 { margin-bottom: 4px; }

/* Tabelle */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .85rem; }

/* ---------- Form ---------- */
.campo { margin-bottom: 16px; }
.campo fieldset legend { font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.campo-errore input, .campo-errore select, .campo-errore textarea { border-color: var(--err-fg); }
label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--navy-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
input[type=file] { width: 100%; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); font: inherit; color: var(--muted); cursor: pointer; }
input[type=file]:hover { border-color: var(--accent); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; cursor: pointer; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); vertical-align: middle; margin: 0 8px 0 0; flex: none; }
.checkbox-row { display: flex; align-items: flex-start; gap: 4px; }
.checkbox-row input { margin-top: 2px; }
.checkbox-row label { display: inline; font-weight: 400; margin: 0; }
.helptext { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; font-weight: 400; }
.errorlist { list-style: none; color: var(--err-fg); margin: 6px 0 0; padding: 0; font-size: .88rem; font-weight: 700; }
.errorlist.nonfield { background: var(--err-bg); border: 1px solid var(--err-line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cols { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cols-3 { grid-template-columns: 1fr 2fr 90px; }
@media (max-width: 600px) { .cols-3 { grid-template-columns: 1fr 1fr; } .cols-3 > :nth-child(2) { grid-column: span 2; order: -1; } }

/* Sezioni numerate del modulo di iscrizione */
.step { display: grid; grid-template-columns: 44px 1fr; gap: 0 16px; }
.step + .step { margin-top: 18px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--gold-400); font-family: var(--serif); font-weight: 700; }
.step-body > legend, .step-body > h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; padding: 0; margin: 6px 0 4px; }
.step-body > .muted { margin-bottom: 16px; }
@media (max-width: 600px) { .step { grid-template-columns: 1fr; } .step-num { margin-bottom: 8px; } }

/* Scelte a scheda */
.scelte { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.scelta { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; font-weight: 400; margin: 0; transition: border-color .15s, background .15s; }
.scelta:hover { border-color: var(--navy-500); }
.scelta input { position: absolute; top: 14px; right: 12px; margin: 0; }
.scelta .i { width: 28px; height: 28px; color: var(--accent); }
.scelta strong { font-size: 1rem; }
.scelta span { color: var(--muted); font-size: .88rem; }
.scelta:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { padding: 6px 10px; font-size: .85rem; }
.btn-icon { padding: 8px; }
.btn-danger { background: transparent; color: var(--err-fg); border-color: var(--err-line); }
.btn-danger:hover { background: var(--err-bg); }
.btn-block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ---------- Pagine di accesso ---------- */
.body-auth .topbar { position: static; }
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 71px - 57px); }
.auth-visual {
  position: relative; display: flex; align-items: flex-end; padding: 48px; color: #fff;
  background: var(--navy-900) url("../img/banda-1600.b6eda879b21a.jpg") 30% center / cover no-repeat;
}
.auth-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 28, 51, .95) 0%, rgba(11, 28, 51, .55) 55%, rgba(11, 28, 51, .2) 100%); }
.auth-visual > div { position: relative; max-width: 460px; }
.auth-visual h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2.1rem); color: #fff; margin-bottom: 10px; }
.auth-visual p { color: rgba(255, 255, 255, .82); margin: 0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { margin-bottom: 6px; }
.auth-box > .muted { margin-bottom: 24px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 26px 0 16px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual { min-height: 200px; padding: 24px 20px; background-image: url("../img/banda-800.b4357e69d5ae.jpg"); }
}
.center-box { max-width: 460px; margin: 20px auto; text-align: center; }
.center-box .big-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--ok-bg); color: var(--ok-fg); }
.center-box .big-icon .i { width: 30px; height: 30px; }
.center-box .big-icon.warn { background: var(--warn-bg); color: var(--warn-fg); }
.center-box form, .center-box .left { text-align: left; }

/* ---------- Testo lungo (privacy) ---------- */
.prosa { max-width: 760px; margin: 0 auto; }
.prosa h2 { margin-top: 32px; padding-top: 4px; }
.prosa li { margin-bottom: 6px; }
.prosa ul { padding-left: 20px; }

/* ---------- Piè di pagina ---------- */
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; background: var(--surface-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer a { color: inherit; }

/* Campo trappola anti-spam */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
