/* ═══════════════════════════════════════════════
   Curanda — auth.css
   Login premium dark-glass, coerente con la landing.
   ═══════════════════════════════════════════════ */
:root {
  --brand-night: #0b0f19;
  --brand-navy: #111827;
  --brand-teal: #0F7E8B;
  --brand-teal-light: #45C8D2;
  --brand-icu: #3B82F6;
  --brand-emerald: #10B981;
  --brand-warm-white: #F9FAFB;
  --text-muted: rgba(249, 250, 251, 0.7);
  --card-blur: 20px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body.auth-body {
  font-family: var(--font-sans);
  background-color: var(--brand-night);
  color: var(--brand-warm-white);
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Glow di sfondo (come la landing) ── */
.auth-bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.auth-glow-1, .auth-glow-2, .auth-glow-3 { position: absolute; border-radius: 50%; }
.auth-glow-1 {
  top: -15%; right: -8%; width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(15, 126, 139, 0.18) 0%, rgba(11, 15, 25, 0) 70%);
  filter: blur(120px);
  animation: auth-float-1 22s infinite alternate ease-in-out;
}
.auth-glow-2 {
  bottom: -15%; left: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(11, 15, 25, 0) 70%);
  filter: blur(140px);
  animation: auth-float-2 26s infinite alternate ease-in-out;
}
.auth-glow-3 {
  top: 40%; left: 45%; width: 35vw; height: 35vw;
  background: radial-gradient(circle, rgba(69, 200, 210, 0.08) 0%, rgba(11, 15, 25, 0) 70%);
  filter: blur(110px);
}
@keyframes auth-float-1 { to { transform: translate(-6%, 8%) scale(1.12); } }
@keyframes auth-float-2 { to { transform: translate(8%, -6%) scale(0.94); } }

/* Texture a punti */
body.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
          mask: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
}

/* ── Layout ── */
.auth-shell {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.auth-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
}
@media (max-width: 991.98px) {
  .auth-card { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

/* ── Pannello brand (sinistra, solo desktop) ── */
.auth-brand {
  position: relative;
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(69, 200, 210, 0.16), transparent 55%),
    linear-gradient(160deg, rgba(15, 126, 139, 0.22) 0%, rgba(59, 130, 246, 0.10) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
@media (max-width: 991.98px) {
  .auth-brand { display: none; }
}

.auth-brand-watermark {
  position: absolute;
  bottom: -60px;
  right: -50px;
  width: 240px;
  opacity: 0.06;
  pointer-events: none;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 2.25rem;
  position: relative;
  z-index: 1;
}
.auth-brand-logo svg { width: 38px; height: 38px; }
.auth-brand-logo span {
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  color: var(--brand-warm-white);
}

.auth-brand-tagline {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--brand-warm-white);
  position: relative;
  z-index: 1;
}
.auth-brand-tagline span {
  background: linear-gradient(120deg, #ffffff 10%, var(--brand-teal-light) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-brand-sub {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 2.25rem;
  position: relative;
  z-index: 1;
}

.auth-trust {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  position: relative;
  z-index: 1;
}
.auth-trust li { display: flex; align-items: center; gap: 0.85rem; }
.auth-trust li > i {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 1.15rem;
  color: var(--brand-teal-light);
  background: rgba(69, 200, 210, 0.10);
  border: 1px solid rgba(69, 200, 210, 0.20);
}
.auth-trust strong { display: block; font-size: 0.9rem; color: var(--brand-warm-white); font-weight: 700; }
.auth-trust span { font-size: 0.78rem; color: rgba(249, 250, 251, 0.55); }

/* ── Pannello form (destra) ── */
.auth-form-panel {
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
}
@media (max-width: 575.98px) {
  .auth-form-panel { padding: 2.25rem 1.5rem; }
}

.auth-form-logo {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.auth-form-logo svg { width: 34px; height: 34px; }
.auth-form-logo span { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.04em; color: var(--brand-warm-white); }
@media (max-width: 991.98px) {
  .auth-form-logo { display: inline-flex; }
  .auth-form-head { text-align: center; }
}

.auth-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-teal-light);
  margin-bottom: 0.6rem;
}
.auth-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  color: var(--brand-warm-white);
}
.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* Flash messages */
.auth-form-panel .alert {
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  padding: 0.7rem 0.95rem;
}
.auth-form-panel .alert-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.30); color: #fca5a5; }
.auth-form-panel .alert-warning { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.30); color: #fcd34d; }
.auth-form-panel .alert-success { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.30); color: #6ee7b7; }
.auth-form-panel .alert-info { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.30); color: #93c5fd; }

/* Campi floating su tema scuro */
.auth-form .form-floating > .form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 12px;
  height: calc(3.4rem + 2px);
}
.auth-form .form-floating > .form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--brand-teal-light);
  box-shadow: 0 0 0 3px rgba(69, 200, 210, 0.18);
  color: #fff;
}
.auth-form .form-floating > label {
  color: rgba(249, 250, 251, 0.5);
  padding-left: 1rem;
}
.auth-form .form-floating > label i { margin-right: 0.35rem; }
/* Bootstrap mette un riquadro bianco dietro la label flottante: rendilo trasparente */
.auth-form .form-floating > label::after { background-color: transparent !important; }
.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: rgba(249, 250, 251, 0.65);
}
/* Autofill su tema scuro */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(28, 38, 56, 0.96) inset;
  caret-color: #fff;
  border-radius: 12px;
}

.auth-hint {
  font-size: 0.78rem;
  color: rgba(249, 250, 251, 0.5);
  margin: -0.35rem 0 1rem;
  padding-left: 0.2rem;
}
.auth-hint strong { color: rgba(249, 250, 251, 0.75); }

.auth-check { padding-left: 1.9rem; margin-bottom: 1.5rem; }
.auth-check .form-check-input {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  margin-left: -1.9rem;
}
.auth-check .form-check-input:checked {
  background-color: var(--brand-teal-light);
  border-color: var(--brand-teal-light);
}
.auth-check .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(69, 200, 210, 0.18);
  border-color: var(--brand-teal-light);
}
.auth-check .form-check-label { font-size: 0.82rem; color: rgba(249, 250, 251, 0.6); line-height: 1.45; }
.auth-check a { color: var(--brand-teal-light); text-decoration: underline; }

.auth-submit {
  width: 100%;
  background: var(--brand-teal-light);
  color: var(--brand-night);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(69, 200, 210, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}
.auth-submit:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.2);
}
.auth-submit:active { transform: translateY(0); }

/* Box passkey */
.auth-passkey {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: rgba(69, 200, 210, 0.06);
  border: 1px solid rgba(69, 200, 210, 0.16);
  border-radius: 12px;
}
.auth-passkey > i { color: var(--brand-teal-light); font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.auth-passkey div { font-size: 0.8rem; color: rgba(249, 250, 251, 0.6); line-height: 1.45; }
.auth-passkey strong { color: var(--brand-warm-white); font-weight: 700; }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(249, 250, 251, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-back:hover { color: var(--brand-teal-light); }

/* ── Footer legale ── */
.auth-footer {
  width: 100%;
  max-width: 1000px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(249, 250, 251, 0.4);
}
.auth-footer a {
  color: rgba(249, 250, 251, 0.55);
  text-decoration: underline;
  margin: 0 0.5rem;
  transition: color 0.2s ease;
}
.auth-footer a:hover { color: var(--brand-teal-light); }
.auth-footer-copy { margin-top: 0.6rem; opacity: 0.8; }

/* ── Rispetto del movimento ridotto ── */
@media (prefers-reduced-motion: reduce) {
  .auth-glow-1, .auth-glow-2 { animation: none !important; }
}
