/* ============================================================
   MIRA — Auth pages (login / register / 2FA)
   Layout a FASCE full-bleed (edge-to-edge), immersive.
   Stesso linguaggio del sito pubblico.
   Nessuna dipendenza esterna oltre i Google Fonts già caricati.
   ============================================================ */

:root{
  --au-coral:#E8633A;
  --au-coral-700:#cf5430;
  --au-coral-text:#b04527;
  --au-coral-soft:rgba(232,99,58,.10);
  --au-ai:#6A5AE0;
  --au-ai-soft:rgba(106,90,224,.10);
  --au-green:#1F9D6B;
  --au-green-700:#147049;
  --au-green-soft:rgba(31,157,107,.10);
  --au-ink:#1F1B17;
  --au-paper:#FAF6F1;
  --au-surface:#F1EBE3;
  --au-line:#E0D8CD;
  --au-muted:#6E665C;
  --au-body:#6B645B;
  --au-font-display:'Space Grotesk',system-ui,sans-serif;
  --au-font-text:'Plus Jakarta Sans',system-ui,sans-serif;
  --au-reticle:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='16' cy='16' r='13.2'/%3E%3Cpath stroke-linecap='round' d='M16 1.4v4.4M16 26.2v4.4M1.4 16h4.4M26.2 16h4.4'/%3E%3Ccircle cx='16' cy='16' r='6.6' stroke-width='1.8'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='2.7' fill='black'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
.auth-body{
  margin:0;
  background:var(--au-paper);
  color:var(--au-ink);
  font-family:var(--au-font-text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.auth-shell{
  font-family:var(--au-font-text);
  color:var(--au-ink);
  background:var(--au-paper);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.auth-shell *{ box-sizing:border-box; }
.auth-shell ::selection{ background:var(--au-coral); color:#fff; }
.auth-shell a{ color:inherit; text-decoration:none; }
.auth-shell :focus-visible{ outline:3px solid var(--au-ai); outline-offset:2px; border-radius:6px; }

/* mirino mark (riuso del motivo del sito) */
.au-reticle{
  display:inline-block; flex:none;
  width:var(--au-reticle-size,26px); height:var(--au-reticle-size,26px);
  background:var(--au-coral);
  -webkit-mask:var(--au-reticle) center/contain no-repeat;
          mask:var(--au-reticle) center/contain no-repeat;
}

/* ============================================================
   FASCE full-bleed: bande orizzontali a tutta larghezza
   ============================================================ */
.au-bands{
  width:100%;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* banda generica: full-bleed, contenuto centrato in un container interno */
.au-band{
  width:100%;
  padding:clamp(2.5rem,5vw,5rem) clamp(1.25rem,5vw,4rem);
  display:flex;
  justify-content:center;
}
.au-band__inner{
  width:100%;
  max-width:1080px;
}

/* ---------- BANDA HERO (full-bleed scuro con filigrana mirino) ---------- */
.au-hero{
  position:relative;
  background:var(--au-ink);
  color:var(--au-paper);
  overflow:hidden;
  isolation:isolate;
  text-align:center;
  padding-top:clamp(3rem,6vw,5.5rem);
  padding-bottom:clamp(3rem,6vw,5.5rem);
}
/* filigrana reticolo ampia, centrata dietro al contenuto */
.au-hero__wm{
  position:absolute; z-index:0; pointer-events:none;
  width:min(1100px,135%); aspect-ratio:1;
  left:50%; top:50%; transform:translate(-50%,-50%);
  background:var(--au-paper);
  -webkit-mask:var(--au-reticle) center/contain no-repeat;
          mask:var(--au-reticle) center/contain no-repeat;
  opacity:.045;
  animation:auWmIn 1.1s cubic-bezier(.2,.6,.2,1) both;
}
@keyframes auWmIn{ from{ opacity:0; transform:translate(-50%,-50%) scale(.92) rotate(-6deg);} to{ opacity:.045; transform:translate(-50%,-50%);} }
.au-hero .au-band__inner{ position:relative; z-index:1; max-width:760px; }

.au-hero__logo{
  display:inline-flex; align-items:center; gap:11px;
  font-family:var(--au-font-display); font-weight:700; font-size:1.5rem;
  letter-spacing:-.03em; color:var(--au-paper); margin-bottom:1.8rem;
}
.au-hero__logo .au-reticle{ --au-reticle-size:26px; }

.au-eyebrow{ display:inline-flex; align-items:baseline; gap:12px; margin-bottom:1.4rem; justify-content:center; }
.au-eyebrow__num{ font-family:var(--au-font-display); font-weight:700; font-size:13px; letter-spacing:.12em; color:var(--au-coral); }
.au-eyebrow__label{ font-family:var(--au-font-display); font-weight:600; font-size:12px; letter-spacing:.2em; text-transform:uppercase; color:rgba(250,246,241,.6); }

.au-hero__claim{
  font-family:var(--au-font-display); font-weight:600;
  font-size:clamp(2rem,1.3rem + 3.4vw,3.6rem);
  line-height:1.05; letter-spacing:-.03em; color:var(--au-paper);
  margin:0 0 1.1rem;
}
.au-hero__claim .au-dot{ color:var(--au-coral); }
.au-hero__sub{
  font-size:clamp(1rem,.95rem + .3vw,1.15rem); line-height:1.6;
  color:rgba(250,246,241,.74); margin:0 auto; max-width:36rem;
}

/* ---------- BANDA FORM (full-bleed chiaro) ---------- */
.au-form-band{
  background:var(--au-paper);
}
.au-form-band .au-band__inner{ max-width:560px; }

.au-form-eyebrow{ margin-bottom:1rem; }
.au-form-eyebrow .au-eyebrow__label{ color:var(--au-muted); }

.au-h1{
  font-family:var(--au-font-display); font-weight:600;
  font-size:clamp(1.7rem,1.4rem + 1vw,2.3rem); line-height:1.1; letter-spacing:-.03em;
  text-align:center; color:var(--au-ink); margin:0 0 .5rem;
}
.au-sub{ font-size:1rem; color:var(--au-body); margin:0 0 2rem; line-height:1.5; text-align:center; }

/* messaggi flash */
.au-flash{
  border-radius:12px; padding:.85rem 1.05rem; font-size:.9rem;
  margin-bottom:1.1rem; line-height:1.45;
  display:flex; align-items:flex-start; gap:.55rem;
}
.au-flash [data-lucide]{ width:1.05rem; height:1.05rem; flex:none; margin-top:1px; }
.au-flash--error{ background:rgba(220,53,47,.08); color:#b3271d; border:1px solid rgba(220,53,47,.22); }
.au-flash--success{ background:var(--au-green-soft); color:var(--au-green-700); border:1px solid rgba(31,157,107,.28); }
.au-flash--info{ background:var(--au-coral-soft); color:var(--au-coral-text); border:1px solid rgba(232,99,58,.25); }

/* ---------- Form ---------- */
.au-form{ max-width:440px; margin:0 auto; }
.au-field{ margin-bottom:1.15rem; }
.au-row{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
.au-label{
  display:block; font-family:var(--au-font-display); font-weight:600;
  font-size:.86rem; letter-spacing:.01em; color:var(--au-ink);
  margin-bottom:.45rem;
}
.au-input{
  width:100%; padding:.95rem 1.05rem;
  font-family:var(--au-font-text); font-size:16px; color:var(--au-ink);
  background:#fff; border:1.5px solid var(--au-line); border-radius:13px;
  outline:none; transition:border-color .18s, box-shadow .18s;
}
.au-input::placeholder{ color:#b3aaa0; }
.au-input:focus{ border-color:var(--au-coral); box-shadow:0 0 0 3px rgba(232,99,58,.13); }

/* password con toggle */
.au-pw-wrap{ position:relative; }
.au-pw-wrap .au-input{ padding-right:2.9rem; }
.au-pw-toggle{
  position:absolute; right:.55rem; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; padding:.4rem; border-radius:8px;
  color:var(--au-muted); display:flex; align-items:center;
}
.au-pw-toggle:hover{ color:var(--au-coral); }
.au-pw-toggle [data-lucide]{ width:1.1rem; height:1.1rem; }

/* requisiti password live */
.au-pw-rules{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.6rem; }
.au-pw-rule{
  display:inline-flex; align-items:center; gap:.3rem;
  font-size:.72rem; font-weight:500; padding:.22rem .55rem .22rem .45rem;
  border-radius:999px; background:#fff; border:1px solid var(--au-line);
  color:var(--au-muted); transition:all .18s;
}
.au-pw-rule::before{
  content:""; width:13px; height:13px; border-radius:50%; flex:none;
  border:1.5px solid var(--au-line); background:transparent;
  transition:all .18s;
}
.au-pw-rule.valid{ background:var(--au-green-soft); border-color:rgba(31,157,107,.3); color:var(--au-green-700); }
.au-pw-rule.valid::before{
  border-color:var(--au-green); background:var(--au-green);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size:9px; background-position:center; background-repeat:no-repeat;
}

/* checkbox riga */
.au-check{
  display:flex; align-items:flex-start; gap:.6rem; cursor:pointer;
  font-size:.9rem; color:var(--au-body); line-height:1.45;
}
.au-check input[type=checkbox]{
  width:18px; height:18px; margin-top:1px; flex:none;
  accent-color:var(--au-coral); cursor:pointer;
}
.au-check a{ color:var(--au-coral-text); font-weight:600; text-decoration:underline; }
.au-check a:hover{ color:var(--au-coral); }

.au-field-between{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  margin-bottom:1.4rem; flex-wrap:wrap;
}
.au-link-quiet{ font-size:.88rem; font-weight:600; color:var(--au-coral-text); }
.au-link-quiet:hover{ color:var(--au-coral); }

/* CTA */
.au-btn{
  display:flex; align-items:center; justify-content:center; gap:.55rem; width:100%;
  font-family:var(--au-font-display); font-weight:600; font-size:1.05rem; line-height:1;
  padding:1.05rem 1.6rem; border-radius:999px; border:1.5px solid transparent;
  cursor:pointer; transition:transform .18s, background .18s, box-shadow .18s;
}
.au-btn--coral{ background:var(--au-coral); color:#fff; }
.au-btn--coral:hover{ background:var(--au-coral-700); transform:translateY(-2px); box-shadow:0 12px 28px rgba(232,99,58,.28); }
.au-btn--coral:active{ transform:translateY(0); }
.au-btn [data-lucide]{ width:1.05rem; height:1.05rem; transition:transform .18s; }
.au-btn--coral:hover [data-lucide]{ transform:translateX(3px); }

.au-btn--ghost{
  background:transparent; border-color:var(--au-line); color:var(--au-ink);
  font-size:.92rem; padding:.75rem 1.3rem;
}
.au-btn--ghost:hover{ border-color:var(--au-coral); color:var(--au-coral); }

.au-resend{ margin:1rem auto 0; max-width:440px; text-align:center; }
.au-resend .au-btn--ghost{ display:inline-flex; width:auto; }

/* ---------- BANDA TRUST / FOOTER (full-bleed) ---------- */
.au-trust{
  background:var(--au-ink);
  color:var(--au-paper);
  text-align:center;
  padding-top:clamp(2.5rem,4vw,3.5rem);
  padding-bottom:clamp(2.5rem,4vw,3.5rem);
}
.au-trust__row{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:center;
  gap:.7rem 1.4rem; margin-bottom:1.5rem;
}
.au-trust__item{
  display:inline-flex; align-items:center; gap:.5rem;
  font-size:.92rem; color:rgba(250,246,241,.82);
}
.au-trust__item [data-lucide]{ width:1.05rem; height:1.05rem; color:var(--au-coral); flex:none; }
.au-trust__item--ai [data-lucide]{ color:var(--au-ai); }
.au-trust__sep{ color:rgba(250,246,241,.25); }
.au-trust__link{
  font-size:.95rem; color:rgba(250,246,241,.78);
}
.au-trust__link a{ color:var(--au-paper); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.au-trust__link a:hover{ color:var(--au-coral); }

/* ============================================================
   2FA — fasce: HERO scuro + banda card chiara
   ============================================================ */
.au-card{
  position:relative; z-index:1;
  width:100%; max-width:480px; margin:0 auto; background:#fff;
  border:1px solid var(--au-line); border-radius:22px;
  padding:clamp(2rem,3vw,3rem) clamp(1.5rem,3vw,2.6rem); text-align:center;
  box-shadow:0 16px 50px rgba(31,27,23,.08);
}
.au-card__icon{
  width:64px; height:64px; margin:0 auto 1.3rem; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--au-coral-soft); border:2px solid rgba(232,99,58,.3);
}
.au-card__icon [data-lucide]{ width:1.7rem; height:1.7rem; color:var(--au-coral); }
.au-card__icon--ok{ background:var(--au-green-soft); border-color:rgba(31,157,107,.35); }
.au-card__icon--ok [data-lucide]{ color:var(--au-green); }

.au-card h1{
  font-family:var(--au-font-display); font-weight:600; font-size:clamp(1.4rem,1.2rem + .6vw,1.7rem);
  line-height:1.12; letter-spacing:-.025em; color:var(--au-ink); margin:0 0 .6rem;
}
.au-card__sub{ font-size:.95rem; color:var(--au-body); margin:0 0 1.6rem; line-height:1.55; }
.au-card__sub strong{ color:var(--au-ink); }

.au-qr{ display:flex; justify-content:center; margin:0 0 1.2rem; }
.au-qr img{ border-radius:14px; border:1px solid var(--au-line); padding:10px; background:#fff; }

.au-manual{ font-size:.8rem; color:var(--au-muted); margin:0 0 1.5rem; line-height:1.7; }
.au-secret{
  display:inline-block; font-family:'Space Grotesk',monospace; font-size:.94rem;
  letter-spacing:.08em; background:var(--au-paper); border:1px solid var(--au-line);
  border-radius:9px; padding:.45rem .75rem; margin-top:.35rem; color:var(--au-ink);
  word-break:break-all;
}
.au-acct{ display:block; margin-top:.45rem; color:#b3aaa0; }

.au-code-form{ display:flex; flex-direction:column; gap:1rem; }
.au-code-input{
  width:100%; padding:.9rem; font-family:'Space Grotesk',monospace;
  font-size:1.7rem; font-weight:700; text-align:center; letter-spacing:.4em;
  border-radius:14px; border:1.5px solid var(--au-line); background:#fff;
  color:var(--au-ink); outline:none; transition:border-color .18s, box-shadow .18s;
}
.au-code-input:focus{ border-color:var(--au-coral); box-shadow:0 0 0 3px rgba(232,99,58,.14); }
.au-code-input::placeholder{ color:#cfc7bd; letter-spacing:.3em; font-weight:400; }

.au-codes{ display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:0 0 1.4rem; }
.au-codes code{
  font-family:'Space Grotesk',monospace; font-size:.98rem; letter-spacing:.06em;
  background:var(--au-paper); border:1px solid var(--au-line); border-radius:9px;
  padding:.6rem .6rem; color:var(--au-ink); text-align:center;
}

.au-card__back{
  display:inline-flex; align-items:center; gap:.35rem; margin-top:1.4rem;
  font-size:.85rem; color:var(--au-muted);
}
.au-card__back:hover{ color:var(--au-coral); }
.au-card__back [data-lucide]{ width:.85rem; height:.85rem; }

/* ============================================================
   Popup registrazione (riuso)
   ============================================================ */
.au-pop-ov{
  position:fixed; inset:0; background:rgba(31,27,23,.55); backdrop-filter:blur(6px);
  z-index:9999; display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .3s;
}
.au-pop-ov.show{ opacity:1; pointer-events:auto; }
.au-pop{
  background:#fff; border:1px solid var(--au-line); border-radius:20px;
  max-width:430px; width:90%; padding:2.5rem 2rem 2rem; text-align:center;
  box-shadow:0 24px 80px rgba(31,27,23,.3);
  transform:translateY(28px) scale(.96); transition:transform .35s cubic-bezier(.34,1.56,.64,1);
}
.au-pop-ov.show .au-pop{ transform:none; }
.au-pop__icon{
  width:64px; height:64px; margin:0 auto 1.2rem; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--au-green-soft); border:2px solid rgba(31,157,107,.32);
}
.au-pop__icon [data-lucide]{ width:2rem; height:2rem; color:var(--au-green); }
.au-pop h2{
  font-family:var(--au-font-display); font-weight:600; font-size:1.35rem;
  letter-spacing:-.02em; color:var(--au-ink); margin:0 0 .6rem;
}
.au-pop p{ font-size:.92rem; color:var(--au-body); line-height:1.55; margin:0 0 1.2rem; }
.au-pop__note{
  display:flex; align-items:flex-start; gap:.6rem; text-align:left;
  background:var(--au-coral-soft); border:1px solid rgba(232,99,58,.25);
  border-radius:12px; padding:.85rem 1rem; margin-bottom:1.5rem;
}
.au-pop__note [data-lucide]{ width:1.2rem; height:1.2rem; color:var(--au-coral); flex:none; margin-top:1px; }
.au-pop__note span{ font-size:.85rem; color:var(--au-body); line-height:1.45; }
.au-pop .au-btn{ max-width:220px; margin:0 auto; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:560px){
  .au-band{ padding:2.5rem 1.25rem; }
  .au-row{ grid-template-columns:1fr; gap:0; }
  .au-codes{ grid-template-columns:1fr; }
  .au-trust__sep{ display:none; }
  .au-trust__row{ flex-direction:column; gap:.7rem; }
}

@media (prefers-reduced-motion:reduce){
  .auth-shell *, .au-hero__wm{ animation:none !important; transition:none !important; }
}
