/* Brottle · stile condiviso di sito, registrazione, accesso e area admin.
   Stessa identità della dashboard: nero profondo, argento, un accento rosso,
   pannelli liquid glass sopra la B ruotata di 45°. */

@font-face { font-family: "Saira"; src: url(../dashboard/fonts/saira-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira"; src: url(../dashboard/fonts/saira-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira"; src: url(../dashboard/fonts/saira-latin-800-italic.woff2) format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Saira"; src: url(../dashboard/fonts/saira-latin-900-italic.woff2) format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #040506;
  --ink: #F2F4F7;
  --ink-2: #AEB5BF;
  --ink-3: #737B87;
  --silver: #C9CED6;
  --red: #E3141B;
  --red-2: #FF3B3B;
  --ok: #3DD68C;
  --warn: #F2C14E;
  --bad: #FF5A5A;
  --line: rgba(255, 255, 255, 0.12);
  --r: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Saira", var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* Sfondo */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(70% 60% at 18% 0%, rgba(201, 206, 214, 0.16), transparent 60%),
    radial-gradient(50% 45% at 100% 100%, rgba(227, 20, 27, 0.22), transparent 65%),
    radial-gradient(40% 40% at 0% 100%, rgba(227, 20, 27, 0.10), transparent 70%),
    linear-gradient(180deg, #07080b 0%, #040506 100%); }
.bg svg { position: absolute; inset: -10%; width: 120%; height: 120%; }
.bg .b1 { position: absolute; width: min(118vw, 1700px); right: -40vw; top: 6vh; transform: rotate(45deg); opacity: 0.42; filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.6)); }
.bg .b2 { position: absolute; width: min(60vw, 820px); left: -26vw; bottom: -28vh; transform: rotate(45deg); opacity: 0.16; }
@media (max-width: 760px) { .bg .b1 { width: 170vw; right: -100vw; } }
.page { position: relative; z-index: 1; }

/* Liquid glass */
.glass {
  position: relative; isolation: isolate; border-radius: var(--r);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035) 38%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.07)),
    linear-gradient(rgba(10, 11, 14, var(--tint, 0.5)), rgba(10, 11, 14, var(--tint, 0.5)));
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.06), inset 1px 0 0 rgba(255, 255, 255, 0.1), 0 24px 60px -24px rgba(0, 0, 0, 0.65);
}
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.04) 60%, rgba(255, 255, 255, 0.26));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: radial-gradient(120% 60% at 12% -10%, rgba(255, 255, 255, 0.15), transparent 45%); }
@media (prefers-reduced-transparency: reduce) { .glass { background: rgba(22, 24, 28, 0.95); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Marchio */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.wordmark { font: 900 italic 24px/1 var(--display); color: #fff; letter-spacing: 0.005em; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn-red { background: linear-gradient(180deg, #ff2a31, #c80f16); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -10px rgba(227, 20, 27, 0.7); }
.btn-red:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn-block { width: 100%; }

/* Moduli */
.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; align-content: start; }
.field > label, .field .lab { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.inp, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35); color: var(--ink); font-size: 16px; }
.field textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--silver); outline-offset: 0; }
.field input[aria-invalid=true], .field select[aria-invalid=true] { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; padding: 6px 0; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--red); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05); font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg input:checked + span { background: rgba(255, 255, 255, 0.92); color: #0b0c0f; border-color: transparent; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--silver); outline-offset: 2px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 16px; }
.alert-err { background: rgba(255, 90, 90, 0.12); border: 1px solid rgba(255, 90, 90, 0.35); color: #ffd0d0; }
.alert-ok { background: rgba(61, 214, 140, 0.12); border: 1px solid rgba(61, 214, 140, 0.35); color: #c9f7e1; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }

/* Barra in alto */
.topbar { position: sticky; top: 12px; z-index: 20; margin: 12px auto 0; max-width: 1200px; padding: 0 16px; }
.topbar .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 18px; --tint: 0.45; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: var(--ink); }
.topbar .acts { display: flex; gap: 8px; }
@media (max-width: 860px) { .topbar nav { display: none; } }
@media (max-width: 420px) { .topbar .acts .btn-ghost { display: none; } }
