/* web/stile.css — tema del pannello, preso dal logo del bot.
   Colori campionati dall'immagine originale (249595.jpg):
   giallo #FCC803 → ruggine #B14842 → viola #68016E → indaco #190084,
   occhi rosa #CB418C e viola #562495. La volpe è bianca. */

:root {
  --giallo: #fcc803;
  --ruggine: #b14842;
  --magenta: #8b0a5e;
  --viola: #68016e;
  --indaco: #190084;
  --rosa: #cb418c;
  --lilla: #562495;
  --gradiente: linear-gradient(135deg, var(--giallo) 0%, var(--ruggine) 30%, var(--magenta) 52%, var(--viola) 72%, var(--indaco) 100%);
  --gradiente-occhi: linear-gradient(135deg, var(--rosa), var(--lilla));
  --fondo: #0b0616;
  --carta: rgba(255, 255, 255, 0.055);
  --bordo: rgba(255, 255, 255, 0.09);
  --testo: #f6f1ff;
  --tenue: #b7a9d1;
  --verde: #4ade80;
  --rosso: #fb7185;
  --raggio: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--testo);
  background: var(--fondo);
  background-image:
    radial-gradient(900px 600px at -10% -10%, rgba(252, 200, 3, 0.18), transparent 60%),
    radial-gradient(900px 700px at 110% 110%, rgba(25, 0, 132, 0.45), transparent 60%),
    radial-gradient(700px 500px at 60% 20%, rgba(104, 1, 110, 0.25), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }

/* ── intestazione ─────────────────────────────────────────────────────── */
.testata {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: rgba(11, 6, 22, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bordo);
}
.testata img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 18px rgba(203, 65, 140, 0.45); }
.testata .marchio { font-weight: 800; letter-spacing: 0.3px; flex: 1; }
.testata .marchio span { background: var(--gradiente); -webkit-background-clip: text; background-clip: text; color: transparent; }
.testata nav { display: flex; gap: 6px; }

.pagina { max-width: 980px; margin: 0 auto; padding: 22px 16px 120px; }

/* ── elementi comuni ──────────────────────────────────────────────────── */
.carta {
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  padding: 18px;
}
.carta + .carta { margin-top: 14px; }
.titolo { font-size: 1.6rem; font-weight: 800; margin: 4px 0 2px; }
.sottotitolo { color: var(--tenue); margin: 0 0 18px; }
.sezione { font-size: 0.8rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tenue); margin: 26px 0 10px; }
.tenue { color: var(--tenue); }
.piccolo { font-size: 0.85rem; }

.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; border: 1px solid var(--bordo);
  background: rgba(255, 255, 255, 0.07); color: var(--testo);
  font-weight: 650; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.bottone:active { transform: scale(0.98); }
.bottone.primario { background: var(--gradiente); border: 0; color: #fff; box-shadow: 0 8px 26px rgba(139, 10, 94, 0.45); }
.bottone.primario:hover { filter: brightness(1.08); }
.bottone.piccolo { padding: 8px 12px; font-size: 0.9rem; }
.bottone[disabled], .bottone.spento { opacity: 0.45; pointer-events: none; }
.bottone.largo { width: 100%; }

input[type="tel"], input[type="text"], input[type="number"], textarea {
  width: 100%; padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--bordo); background: rgba(0, 0, 0, 0.3); color: var(--testo);
  font-size: 1rem; outline: none;
}
input:focus, textarea:focus { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(203, 65, 140, 0.25); }
textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.chiave-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 3px; text-transform: uppercase; text-align: center; font-size: 1.3rem; }

.distintivo { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; }
.distintivo.creatore { background: var(--gradiente); color: #fff; }
.distintivo.admin { background: var(--gradiente-occhi); color: #fff; }
.distintivo.membro { background: rgba(255, 255, 255, 0.1); color: var(--tenue); }
.pallino { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.pallino.on { background: var(--verde); box-shadow: 0 0 10px var(--verde); }
.pallino.off { background: var(--rosso); }

/* ── accesso ──────────────────────────────────────────────────────────── */
.accesso { max-width: 440px; margin: 0 auto; padding: 36px 16px 60px; text-align: center; }
.accesso .logo-grande { width: 132px; height: 132px; border-radius: 34px; box-shadow: 0 0 60px rgba(203, 65, 140, 0.5), 0 0 120px rgba(25, 0, 132, 0.5); }
.accesso .carta { text-align: left; margin-top: 18px; }
.passo { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.passo .numero-passo { flex: 0 0 30px; height: 30px; border-radius: 10px; background: var(--gradiente); display: grid; place-items: center; font-weight: 800; }
.riga { display: flex; gap: 8px; margin-top: 10px; }
.riga > * { flex: 1; }
.riga > .bottone { flex: 0 0 auto; }
.errore { color: var(--rosso); margin-top: 10px; font-weight: 600; }
.conto-alla-rovescia { margin-top: 8px; font-size: 0.9rem; color: var(--giallo); }

/* ── dashboard ────────────────────────────────────────────────────────── */
.numeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numero-carta { background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 14px; }
.numero-carta .etichetta { color: var(--tenue); font-size: 0.8rem; }
.numero-carta .valore { font-size: 1.55rem; font-weight: 800; margin-top: 4px; background: var(--gradiente); -webkit-background-clip: text; background-clip: text; color: transparent; }

.gruppo {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; margin-bottom: 10px; cursor: pointer;
  background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--raggio);
  transition: border-color 0.15s ease, transform 0.08s ease;
}
.gruppo:hover { border-color: rgba(203, 65, 140, 0.55); }
.gruppo:active { transform: scale(0.99); }
.avatar { flex: 0 0 48px; height: 48px; border-radius: 15px; background: var(--gradiente); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; color: #fff; }
.gruppo .info { flex: 1; min-width: 0; }
.gruppo .nome { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gruppo .meta { color: var(--tenue); font-size: 0.85rem; margin-top: 3px; }
.freccia { color: var(--tenue); font-size: 1.3rem; }

/* ── schede del gruppo ────────────────────────────────────────────────── */
.schede { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 16px 0 14px; scrollbar-width: none; }
.schede button { flex: 0 0 auto; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--bordo); background: transparent; color: var(--tenue); font-weight: 650; cursor: pointer; }
.schede button.attiva { background: var(--gradiente); color: #fff; border-color: transparent; }

.voce { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--bordo); }
.voce:last-child { border-bottom: 0; }
.voce .testo { flex: 1; min-width: 0; }
.voce .nome-voce { font-weight: 650; }
.voce .descrizione { color: var(--tenue); font-size: 0.85rem; margin-top: 3px; }
.voce input[type="number"] { width: 92px; text-align: center; }

.interruttore { flex: 0 0 52px; height: 30px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.15); position: relative; cursor: pointer; transition: background 0.2s ease; }
.interruttore::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.interruttore[aria-checked="true"] { background: var(--gradiente); }
.interruttore[aria-checked="true"]::after { transform: translateX(22px); }
.interruttore[disabled] { opacity: 0.4; cursor: not-allowed; }
.cambiato { box-shadow: 0 0 0 2px var(--giallo); }

.registro-voce { padding: 11px 0; border-bottom: 1px solid var(--bordo); font-size: 0.9rem; }
.registro-voce .quando { color: var(--tenue); font-size: 0.78rem; }
.registro-voce .tipo { font-weight: 700; }

/* ── barra di salvataggio e avvisi ────────────────────────────────────── */
.barra-salva {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 18px; border-radius: 18px;
  background: rgba(20, 10, 38, 0.95); border: 1px solid rgba(252, 200, 3, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); z-index: 20;
}
.barra-salva .conteggio { flex: 1; font-weight: 650; }
.avviso {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  width: min(520px, calc(100% - 24px)); z-index: 30;
  padding: 13px 16px; border-radius: 14px; font-weight: 600;
  background: rgba(20, 10, 38, 0.97); border: 1px solid var(--bordo);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.avviso.ok { border-color: rgba(74, 222, 128, 0.5); }
.avviso.ko { border-color: rgba(251, 113, 133, 0.6); }

.vuoto { text-align: center; padding: 34px 16px; color: var(--tenue); }
.caricamento { text-align: center; padding: 60px 0; color: var(--tenue); }

@media (max-width: 520px) {
  .numeri { gap: 8px; }
  .numero-carta { padding: 11px; }
  .numero-carta .valore { font-size: 1.25rem; }
  .titolo { font-size: 1.35rem; }
}

/* Spaziature come classi: la Content-Security-Policy del sito vieta gli
   stili scritti in linea (style="…"), quindi niente style: nel JavaScript. */
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.mt12 { margin-top: 12px; }
.mt14 { margin-top: 14px; }
.mt16 { margin-top: 16px; }
.mt18 { margin-top: 18px; }
.a-capo { white-space: pre-wrap; }
.fisso { cursor: default; }

/* ══ SITO PUBBLICO (home, accesso, legale, cookie) ══════════════════════ */
input[type="email"], input[type="password"] {
  width: 100%; padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--bordo); background: rgba(0, 0, 0, 0.3); color: var(--testo);
  font-size: 1rem; outline: none;
}
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--rosa); flex: 0 0 auto; margin-top: 2px; }

/* testata e barre di navigazione */
.blocco-testata { position: sticky; top: 0; z-index: 10; }
.blocco-testata .testata { position: static; }
.marchio-link { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 1; min-width: 0; }
.nav-principale { display: flex; gap: 4px; align-items: center; }
.navlink { padding: 8px 12px; border-radius: 11px; text-decoration: none; color: var(--tenue); font-weight: 650; font-size: 0.92rem; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.navlink:hover { color: var(--testo); background: rgba(255, 255, 255, 0.06); }
.navlink.attivo { color: #fff; background: rgba(203, 65, 140, 0.22); }
.nav-secondaria {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  padding: 7px 16px; font-size: 0.8rem;
  background: linear-gradient(90deg, rgba(252, 200, 3, 0.1), rgba(139, 10, 94, 0.18), rgba(25, 0, 132, 0.2));
  border-bottom: 1px solid var(--bordo); backdrop-filter: blur(14px);
}
.nav-secondaria a, .link-bottone { color: var(--tenue); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.nav-secondaria a:hover, .link-bottone:hover { color: var(--testo); }
.hamburger { display: none; }
@media (max-width: 760px) {
  .nav-secondaria { gap: 12px; font-size: 0.74rem; padding: 6px 10px; }
  .hamburger { display: inline-flex; }
  .testata { flex-wrap: wrap; }
  .testata .nav-principale { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 8px; }
  .testata .nav-principale.aperto { display: flex; }
  .nav-principale .bottone { width: 100%; }
}

/* home */
.landing { overflow-x: hidden; }
.eroe {
  position: relative; max-width: 1100px; margin: 0 auto; padding: 56px 20px 40px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: center; min-height: 72vh;
}
.particelle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.eroe-testo, .scena-3d { position: relative; z-index: 1; }
.etichetta-eroe { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--bordo); font-size: 0.85rem; color: var(--tenue); }
.titolo-eroe { font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.05; margin: 18px 0 14px; font-weight: 900; letter-spacing: -0.5px; }
.sfumato { background: linear-gradient(90deg, #fcc803, #ff5fae, #b18cff, #fcc803); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 200%; animation: scorri-sfumatura 6s ease infinite; }
.sottotitolo-eroe { color: var(--tenue); font-size: 1.1rem; max-width: 520px; line-height: 1.55; }
.azioni-eroe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
@keyframes scorri-sfumatura { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.scena-3d { height: 360px; display: grid; place-items: center; perspective: 1100px; }
.alone { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(203, 65, 140, 0.55), rgba(25, 0, 132, 0.15) 60%, transparent 70%); filter: blur(20px); animation: pulsa 5s ease-in-out infinite; }
.cubo { position: relative; width: 170px; height: 170px; transform-style: preserve-3d; animation: ruota 18s linear infinite; }
.faccia {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 26px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, rgba(252, 200, 3, 0.85), rgba(139, 10, 94, 0.88) 55%, rgba(25, 0, 132, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.15), 0 0 30px rgba(203, 65, 140, 0.35);
  backface-visibility: visible;
}
.faccia .icona { font-size: 3rem; }
.faccia.fronte { transform: translateZ(85px); }
.faccia.retro { transform: rotateY(180deg) translateZ(85px); }
.faccia.destra { transform: rotateY(90deg) translateZ(85px); }
.faccia.sinistra { transform: rotateY(-90deg) translateZ(85px); }
.faccia.sopra { transform: rotateX(90deg) translateZ(85px); }
.faccia.sotto { transform: rotateX(-90deg) translateZ(85px); }
.anello { position: absolute; border-radius: 50%; border: 2px solid rgba(252, 200, 3, 0.35); transform-style: preserve-3d; }
.anello.a1 { width: 330px; height: 330px; animation: orbita 9s linear infinite; }
.anello.a2 { width: 270px; height: 270px; border-color: rgba(203, 65, 140, 0.45); animation: orbita 12s linear infinite reverse; }
@keyframes ruota { from { transform: rotateX(-18deg) rotateY(0deg); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@keyframes orbita { from { transform: rotateX(72deg) rotateZ(0deg); } to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes pulsa { 0%, 100% { transform: scale(0.92); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }

.blocco { max-width: 1100px; margin: 0 auto; padding: 50px 20px; scroll-margin-top: 110px; }
.titolo-blocco { font-size: clamp(1.5rem, 3.5vw, 2.2rem); text-align: center; margin: 0 0 28px; }
.griglia-funzioni { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.funzione { transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease; will-change: transform; }
.funzione:hover { border-color: rgba(203, 65, 140, 0.6); box-shadow: 0 18px 40px rgba(25, 0, 132, 0.35); }
.funzione h3 { margin: 10px 0 6px; }
.funzione p { margin: 0; line-height: 1.5; }
.icona-funzione { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; background: var(--gradiente); box-shadow: 0 8px 22px rgba(139, 10, 94, 0.45); }
.entra { opacity: 0; translate: 0 26px; transition: opacity 0.6s ease, translate 0.6s ease, transform 0.15s ease, border-color 0.2s ease; }
.entra.vista { opacity: 1; translate: 0 0; }
.entra.r1 { transition-delay: 0.08s; } .entra.r2 { transition-delay: 0.16s; }
.passi-grandi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.passo-grande { display: flex; gap: 14px; }
.passo-grande .numero-passo { flex: 0 0 36px; height: 36px; border-radius: 12px; background: var(--gradiente); display: grid; place-items: center; font-weight: 800; }
.passo-grande p { margin: 6px 0 0; }
.carta + .carta.passo-grande, .griglia-funzioni .carta + .carta, .passi-grandi .carta + .carta { margin-top: 0; }
@media (max-width: 860px) {
  .eroe { grid-template-columns: 1fr; text-align: center; padding-top: 30px; }
  .sottotitolo-eroe { margin: 0 auto; }
  .azioni-eroe { justify-content: center; }
  .scena-3d { height: 290px; }
  .griglia-funzioni, .passi-grandi { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cubo, .anello, .alone, .sfumato { animation: none; }
  .entra { opacity: 1; translate: 0 0; }
}

/* accesso e registrazione */
.schede-accesso { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--bordo); margin-bottom: 22px; }
.scheda-accesso { flex: 1; padding: 9px 6px; border-radius: 11px; text-decoration: none; color: var(--tenue); font-weight: 650; font-size: 0.9rem; }
.scheda-accesso.attiva { background: var(--gradiente); color: #fff; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; text-align: left; }
.campo:first-child { margin-top: 0; }
.etichetta-campo { font-weight: 650; font-size: 0.92rem; }
.riga-campo { display: flex; gap: 8px; }
.riga-campo input { flex: 1; }
.consenso { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 0.9rem; line-height: 1.45; cursor: pointer; }
.consenso a { color: var(--giallo); }
form .bottone.largo:not(.primario) { margin-top: 12px; }

/* elimina account */
.zona-pericolo { border-color: rgba(251, 113, 133, 0.45); }
.zona-pericolo h3 { margin: 0 0 6px; color: var(--rosso); }
.bottone.pericolo { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.55); color: #ffd6dd; }

/* pagine legali */
.legale { max-width: 820px; }
.testo-legale { line-height: 1.65; }
.testo-legale h2 { font-size: 1.15rem; margin: 26px 0 8px; background: linear-gradient(90deg, #fcc803, #ff5fae, #b18cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.testo-legale h2:first-child { margin-top: 0; }
.testo-legale h3 { font-size: 1rem; margin: 16px 0 6px; }
.testo-legale ul { padding-left: 20px; }
.testo-legale li { margin: 5px 0; }
.tabella { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.9rem; display: block; overflow-x: auto; }
.tabella th, .tabella td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bordo); vertical-align: top; }
.tabella th { color: var(--tenue); font-weight: 700; }

/* banner cookie */
.banner-cookie {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(720px, calc(100% - 24px)); z-index: 40;
  display: flex; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 18px;
  background: rgba(20, 10, 38, 0.97); border: 1px solid rgba(203, 65, 140, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: sale 0.35s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.banner-cookie.via { opacity: 0; transform: translate(-50%, 20px); }
.banner-cookie p { margin: 4px 0 0; color: var(--tenue); font-size: 0.88rem; line-height: 1.45; }
.banner-cookie a { color: var(--giallo); }
.testo-banner { flex: 1; }
.azioni-banner { display: flex; gap: 8px; flex: 0 0 auto; }
@keyframes sale { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 620px) {
  .banner-cookie { flex-direction: column; align-items: stretch; }
  .azioni-banner .bottone { flex: 1; }
}

/* piè di pagina */
.piede { text-align: center; padding: 30px 16px 90px; color: var(--tenue); font-size: 0.85rem; border-top: 1px solid var(--bordo); margin-top: 30px; }
.piede-link a { color: var(--tenue); }
.piede-link a:hover { color: var(--testo); }
