/* ForecastPro — auth pages (login, signup, forgot/reset password, verify email).
 * Split layout: brand panel (left) + focused form card (right). Stacks on small screens. */

.auth { background: var(--bg-deepest); }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(380px, 5fr) 7fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- Brand panel ------------------------------------------------------------ */
.auth-brand {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-8);
  padding: var(--space-7) clamp(var(--space-6), 4vw, var(--space-9));
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(88, 101, 242, 0.22) 0%, rgba(88, 101, 242, 0) 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(0, 168, 252, 0.08) 0%, rgba(0, 168, 252, 0) 60%),
    var(--bg-base);
  border-right: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}
.auth-brand::before {
  /* Faint chart-line motif echoing the logo mark — decorative only. */
  content: ""; position: absolute; inset: auto -10% 64px -10%; height: 110px; z-index: -1; opacity: 0.8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200' fill='none'%3E%3Cpolyline points='0,170 80,150 140,160 210,110 270,125 340,70 410,95 480,40 600,55' stroke='%235865f2' stroke-opacity='0.35' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpolyline points='0,185 90,175 160,180 230,145 300,150 370,115 440,128 520,90 600,100' stroke='%2300a8fc' stroke-opacity='0.14' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  pointer-events: none;
}

.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text-primary); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 14px var(--accent-glow); }
.brand-name { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }

.auth-hero { max-width: 460px; }
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-text); font-size: var(--text-sm); font-weight: 600;
  background: var(--accent-soft); border-radius: var(--radius-pill);
  padding: 4px 10px; margin-bottom: var(--space-4);
}
.auth-eyebrow .icon { width: 14px; height: 14px; }
.auth-promise {
  font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.auth-lede { color: var(--text-muted); font-size: var(--text-md); line-height: 1.55; margin-bottom: var(--space-7); }

.assurances { list-style: none; display: grid; gap: var(--space-4); }
.assurances li { display: flex; gap: var(--space-3); align-items: flex-start; }
.assurance-icon {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--accent-text);
}
.assurance-icon .icon { width: 18px; height: 18px; }
.assurances strong { display: block; color: var(--text-primary); font-size: var(--text-base); margin-bottom: 2px; }
.assurances span.copy { display: block; color: var(--text-muted); font-size: var(--text-base); line-height: 1.5; }

.auth-disclaimer { color: var(--text-subtle); font-size: var(--text-sm); max-width: 460px; line-height: 1.5; }

/* ---- Form side -------------------------------------------------------------- */
.auth-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-5);
}
.auth-main:focus { outline: none; }
.auth-mobile-brand { display: none; }

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px rgba(0, 0, 0, 0.35);
}
.auth-card-head { margin-bottom: var(--space-6); }
.auth-card-head .state-icon { margin-bottom: var(--space-4); }
.auth-card h1 { font-size: var(--text-xl); margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); font-size: var(--text-base); line-height: 1.5; }
.auth-price {
  display: flex; gap: var(--space-2); align-items: flex-start;
  margin-top: var(--space-4); padding: var(--space-3);
  border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
  color: var(--text-default); font-size: var(--text-sm); line-height: 1.5;
}
.auth-price[hidden] { display: none; }
.auth-price > .icon { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--accent-text); }
.auth-price strong { color: var(--text-primary); font-weight: 650; }

.auth-form { display: flex; flex-direction: column; }
.auth-form .field + .field { margin-top: var(--space-4); }
.auth-form .check { margin-top: var(--space-5); }
.auth-form .btn-block { margin-top: var(--space-6); }
.auth-form .strength { margin-top: 8px; }
.form-alert { margin-bottom: var(--space-5); }
.forgot-link { font-size: var(--text-sm); font-weight: 500; }

.turnstile-slot { margin-top: var(--space-5); min-height: 65px; }
.turnstile-slot:empty { display: none; }

.auth-switch {
  margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  text-align: center; color: var(--text-muted); font-size: var(--text-base);
}
.auth-switch a { font-weight: 600; }

.auth-footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-4);
  color: var(--text-subtle); font-size: var(--text-sm);
}
.auth-footer a { color: var(--text-subtle); }
.auth-footer a:hover { color: var(--text-primary); }

/* Result / state panels (forgot confirmation, reset success, verify states) */
.state { text-align: center; }
.state-icon {
  width: 56px; height: 56px; margin: 0 auto var(--space-5);
  border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.state-icon .icon { width: 26px; height: 26px; }
.state-icon.success { background: var(--success-soft); color: var(--success-text); }
.state-icon.danger  { background: var(--danger-soft);  color: var(--danger-text); }
.state-icon.warning { background: var(--warning-soft); color: var(--warning-text); }
.state h1 { margin-bottom: var(--space-2); }
.state p { color: var(--text-muted); line-height: 1.55; }
.state p + p { margin-top: var(--space-3); }
.state .btn { margin-top: var(--space-6); }
.state .state-secondary { margin-top: var(--space-4); font-size: var(--text-base); }
.state .spinner-lg { margin: 0 auto; color: var(--accent-text); }
.state-email { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }

.assurances-mobile { display: none; }

/* ---- Responsive ------------------------------------------------------------- */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { justify-content: flex-start; padding: var(--space-6) var(--space-4) var(--space-7); gap: var(--space-5); }
  .auth-mobile-brand {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3);
    width: 100%; max-width: 420px; padding-top: var(--space-2);
  }
  .auth-mobile-brand .tagline { color: var(--text-muted); font-size: var(--text-base); max-width: 340px; }
  .assurances-mobile {
    display: grid; gap: var(--space-3);
    width: 100%; max-width: 420px;
    list-style: none;
  }
  .assurances-mobile li {
    display: flex; gap: var(--space-3); align-items: flex-start;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-base); border: 1px solid var(--line); border-radius: var(--radius-card);
  }
  .assurances-mobile .icon { color: var(--accent-text); margin-top: 1px; }
  .assurances-mobile strong { display: block; font-size: var(--text-base); }
  .assurances-mobile span.copy { color: var(--text-muted); font-size: var(--text-sm); }
}
@media (max-width: 480px) {
  .auth-card { padding: var(--space-6) var(--space-5); border-radius: var(--radius-card); }
  .auth-card h1 { font-size: 20px; }
}
