/* ═══════════════════════════════════════════════════════════
   PAGINA DI ACCESSO (AGGIUNTA 12/10/2026 — MODIFICA 19/11/2026: ridisegnata più essenziale)
   Sinistra: pannello rosso CRI con titolo, una frase e il link al modulo Google.
   Destra: modulo di accesso direttamente sul bianco (niente riquadro), poi la finestra di supporto.
   Versione precedente in Archivio/backup login 2026-11-19.
   ═══════════════════════════════════════════════════════════ */
:root {
  --rosso: #CC0000;
  --rosso-scuro: #8E0A14;
  --notte: #3A060C;
  --inchiostro: #1A1F2B;
  --testo: #4A5263;
  --tenue: #7D8595;
  --bordo: #DDE1E8;
  --campo: #F5F6F8;
  --carta: #FFFFFF;
  --errore: #B42318;
  --errore-sfondo: #FEF0EF;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--inchiostro); background: var(--carta);
  -webkit-font-smoothing: antialiased;
}
.lg-nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }

/* ── Pannello rosso ── */
.lg-side {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, #D0121D 0%, var(--rosso-scuro) 58%, var(--notte) 100%);
}
.lg-crosses {
  position: absolute; inset: -40px; opacity: .06; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M24 18h8v6h6v8h-6v6h-8v-6h-6v-8h6z' fill='white'/%3E%3C/svg%3E");
  background-size: 56px 56px; transform: rotate(-8deg);
}
.lg-side-in {
  position: relative; height: 100%; display: flex; flex-direction: column;
  padding: 64px clamp(32px, 6vw, 96px) 56px;
}
.lg-intro { margin: auto 0; max-width: 560px; }
.lg-claim {
  margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 700;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 1.04; letter-spacing: -.015em;
}
.lg-lead { margin: 26px 0 0; max-width: 42ch; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .82); }

.lg-modulo {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap;
  max-width: 560px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .22);
}
.lg-modulo h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.lg-modulo p { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .75); }
.lg-modulo-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 10px;
  background: #fff; color: #A3000E; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
.lg-modulo-btn:hover { background: #FFE9E7; }
.lg-modulo-btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 3px; }
.lg-modulo-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.lg-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; display: flex; }
.lg-stripe i { flex: 1; background: var(--c); }

/* ── Modulo di accesso ── */
.lg-main { display: flex; align-items: center; justify-content: center; padding: 56px 32px; }
.lg-box { width: 100%; max-width: 380px; }
.lg-logo { display: block; width: 76px; height: auto; margin: 0 0 28px; }
.lg-title {
  margin: 0 0 28px; font-family: "Fraunces", Georgia, serif; font-weight: 700;
  font-size: 32px; line-height: 1.15; letter-spacing: -.01em;
}

.lg-alert {
  display: flex; gap: 10px; align-items: flex-start; margin: -8px 0 20px; padding: 12px 14px;
  border-radius: 10px; background: var(--errore-sfondo); color: var(--errore); font-size: 14px; font-weight: 500;
}
.lg-alert svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }

.lg-form { display: grid; gap: 20px; }
.lg-field { display: grid; gap: 7px; }
.lg-field > span:first-child, .lg-field > label { font-size: 14px; font-weight: 600; color: var(--inchiostro); }
.lg-field input {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--inchiostro);
  padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--bordo); background: var(--campo);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-field input::placeholder { color: #A9B0BD; }
.lg-field input:focus { outline: none; border-color: var(--rosso); background: #fff; box-shadow: 0 0 0 4px rgba(204, 0, 0, .12); }
/* il menu "Tipologia di richiesta" (finestra di supporto) ha lo stesso aspetto dei campi di testo */
.lg-field select {
  font: inherit; font-size: 15px; color: var(--inchiostro); background: var(--campo); border: 1.5px solid var(--bordo);
  border-radius: 10px; padding: 12px 40px 12px 14px; width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.lg-field select:focus { outline: none; border-color: var(--rosso); background-color: #fff; box-shadow: 0 0 0 4px rgba(204, 0, 0, .12); }
.lg-field[hidden] { display: none; }
.lg-pass { position: relative; display: block; }
.lg-pass input { padding-right: 50px; }
.lg-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--tenue); cursor: pointer;
  display: grid; place-items: center;
}
.lg-eye:hover, .lg-eye.is-on { color: var(--rosso); background: rgba(204, 0, 0, .06); }
.lg-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-hint { font-size: 13px; line-height: 1.45; color: var(--testo); }
.lg-hint b { color: var(--errore); font-weight: 700; }
.lg-eye:focus-visible, .lg-link:focus-visible, .lg-btn:focus-visible, .lg-x:focus-visible { outline: 3px solid rgba(204, 0, 0, .35); outline-offset: 2px; }

.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 4px;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  padding: 14px 18px; border: 0; border-radius: 10px; background: var(--rosso);
  transition: background .15s;
}
.lg-btn:hover { background: #B00000; }
.lg-btn:disabled { opacity: .7; cursor: wait; }
.lg-btn--ghost { background: #fff; color: var(--inchiostro); border: 1.5px solid var(--bordo); }
.lg-btn--ghost:hover { background: #fff; border-color: var(--inchiostro); }

.lg-help { margin: 24px 0 0; font-size: 14px; line-height: 1.6; color: var(--testo); }
.lg-help-dom { display: block; }
.lg-link {
  font: inherit; font-weight: 700; color: var(--rosso); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(204, 0, 0, .3); text-underline-offset: 3px;
}
.lg-link:hover { text-decoration-color: currentColor; }
.lg-foot {
  margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--bordo);
  font-size: 12.5px; line-height: 1.5; color: var(--tenue);
}

/* ── Finestra di supporto ── */
.lg-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(27, 11, 16, .45); color: var(--inchiostro);
}
.lg-dialog::backdrop { background: rgba(27, 11, 16, .55); backdrop-filter: blur(3px); }
.lg-dform { position: relative; padding: 30px 30px 26px; }
.lg-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; font-size: 26px; line-height: 1; color: var(--tenue); cursor: pointer;
}
.lg-x:hover { background: var(--campo); color: var(--inchiostro); }
.lg-dhead { text-align: center; margin-bottom: 20px; }
.lg-dicon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 12px;
  background: rgba(204, 0, 0, .08); color: var(--rosso);
}
.lg-dicon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.lg-dhead h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 23px; }
.lg-dhead p { margin: 6px 0 0; font-size: 14px; color: var(--testo); }
.lg-dbody { display: grid; gap: 15px; }
.lg-derr { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--errore-sfondo); color: var(--errore); font-size: 13.5px; }
.lg-derr a { color: inherit; font-weight: 700; }
.lg-ok { text-align: center; display: grid; gap: 8px; justify-items: center; }
.lg-ok[hidden], .lg-dbody[hidden], .lg-derr[hidden] { display: none; }
.lg-ok-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #DCFAE6; color: #067647; }
.lg-ok-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lg-ok h3 { margin: 6px 0 0; font-family: "Fraunces", Georgia, serif; font-size: 22px; }
.lg-ok p { margin: 0 0 12px; font-size: 14.5px; color: var(--testo); }

/* ── Tablet e telefono: il pannello rosso diventa una fascia in alto, compatta ── */
@media (max-width: 900px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .lg-side-in { padding: 30px 20px 34px; }
  .lg-intro { margin: 0 0 22px; }
  .lg-claim { font-size: 30px; }
  .lg-lead { display: none; }
  .lg-modulo { padding-top: 18px; gap: 12px; }
  .lg-modulo p { display: none; }
  .lg-main { padding: 32px 20px 28px; align-items: flex-start; }
  .lg-logo { width: 64px; margin-bottom: 20px; }
  .lg-title { font-size: 27px; margin-bottom: 22px; }
}
@media (max-width: 420px) {
  .lg-modulo-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-btn, .lg-field input, .lg-modulo-btn { transition: none; }
}
