/* ══════════════════════════════════════════════════════════════════
   v2-auth-light.css — LIGHT variant of the auth page styles
   Login · Register · Forgot Password · Reset Password
   ──────────────────────────────────────────────────────────────────
   Mirrors every class in v2-auth.css but rendered on a light
   (#fafafa) canvas with white cards, dark ink, amber accent kept.
   Uses tokens from v2-base.css: --bg-light, --bg-light-2,
   --text-light, --muted-light, --line-light, --shadow-md, --accent.
   ══════════════════════════════════════════════════════════════════ */

/* Body: editorial off-white canvas, vertically stacked card */
body {
  background: var(--bg-light);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 16px;
}

/* ── Ambient glow (soft amber, high on the page) ── */
.auth-glow {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%, rgba(245,158,11,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 35% at 50% 110%, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Card wrapper ── */
.auth-card-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  z-index: 1;
  margin-top: 40px;
}

/* ── Card: white, 1px light border, flat (no shadow) ── */
.auth-card {
  background: var(--bg-light-2); /* #ffffff */
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: none;
}

/* ── Logo block ── */
.auth-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.auth-logo-ring {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; margin-bottom: 12px;
}
.auth-logo-ring::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(245,158,11,0.35);
  animation: authRingL 3s ease-out infinite;
}
.auth-logo-ring::after {
  content: '';
  position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(245,158,11,0.18);
  animation: authRingL 3s ease-out infinite 1.5s;
}
@keyframes authRingL {
  0%   { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.9);  opacity: 0; }
}
.auth-logo-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(245,158,11,0.14);
  filter: blur(16px);
  animation: authGlowBreathL 4s ease-in-out infinite;
}
@keyframes authGlowBreathL { 0%,100%{opacity:.5} 50%{opacity:1} }
.auth-logo {
  position: relative; z-index: 1;
  height: 80px; width: auto; object-fit: contain;
  animation: authLogoFloatL 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 14px rgba(245,158,11,0.28));
}
@keyframes authLogoFloatL { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.auth-logo-fallback {
  position: relative; z-index: 1;
  font-size: 28px; font-weight: 900; color: var(--accent);
  display: none;
}

/* ── Titles ── */
.auth-card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-light);
  text-align: center;
}
.auth-card-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted-light);
  text-align: center;
  margin-top: 4px;
}

/* ── Form rhythm ──
   Single source of truth for vertical spacing inside the form.
   gap between fields  = 18px
   gap label → input   = 6px
   gap heading → first = 14px (set on .auth-step-heading) */
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 0; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  display: inline-block;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--text-light);
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  color-scheme: light;
}
.auth-input::placeholder { color: rgba(91,97,112,0.55); }
.auth-input:hover  { border-color: #d4d6dc; }
.auth-input:focus  {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.18);
  background: #ffffff;
}

/* Autofill override — default yellow background looks off on white */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-light);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Password field with toggle */
.auth-password-wrap { position: relative; }
.auth-password-wrap .auth-input { padding-right: 44px; }
.auth-password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: transparent; border: none; cursor: pointer; padding: 0;
  color: #9ca3af;
  transition: color .15s;
  opacity: 1;
}
.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-password-toggle:hover { color: #6b7280; opacity: 1; }

.auth-field-hint {
  font-size: 12px;
  color: var(--muted-light);
  opacity: .85;
  margin-top: 2px;
}

/* ── Submit button ── */
.auth-submit {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: #0b0b0f;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow:
    0 1px 2px rgba(15,23,42,0.08),
    0 6px 20px rgba(245,158,11,0.28);
  margin-top: 4px;
}
.auth-submit:hover {
  background: var(--accent2);
  box-shadow:
    0 1px 2px rgba(15,23,42,0.08),
    0 10px 28px rgba(245,158,11,0.38);
  transform: translateY(-1px);
}
.auth-submit:active   { transform: translateY(0) scale(0.99); }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Back button (register step 2/3) — ghost on light */
.auth-submit.is-ghost,
.auth-back-btn {
  background: #ffffff;
  color: var(--muted-light);
  border: 1px solid var(--line-light);
  box-shadow: none;
}
.auth-submit.is-ghost:hover,
.auth-back-btn:hover {
  background: #f4f4f6;
  color: var(--text-light);
  border-color: #d4d6dc;
  box-shadow: none;
}

/* ── Error / success messages ── */
.auth-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.28);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #b91c1c;
  display: none;
}
.auth-success {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.28);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #15803d;
  display: none;
}

/* ── Footer links ── */
.auth-links {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 24px;
}
.auth-links p {
  font-size: 13px;
  color: var(--muted-light);
  text-align: center;
}
.auth-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}
.auth-links a:hover { color: var(--accent2); }
.auth-links .auth-link-small {
  font-size: 12px;
  color: var(--muted-light);
  opacity: 0.75;
  text-decoration: none;
  transition: color .15s, opacity .15s;
}
.auth-links .auth-link-small:hover { color: var(--accent); opacity: 1; }

/* ── Register multi-step progress ── */
.auth-steps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 22px;
}
.auth-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d4d6dc;
  transition: background .3s, transform .3s;
}
.auth-step-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.auth-step-dot.done { background: rgba(245,158,11,0.55); }

.auth-steps-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-light);
  text-align: center;
  margin: 0 0 8px;
}

/* Register: account type toggle */
.auth-account-type {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.auth-type-btn {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  background: #ffffff;
  color: var(--muted-light);
  font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.auth-type-btn:hover  { border-color: rgba(245,158,11,0.4); color: var(--text-light); }
.auth-type-btn.active {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.45);
  color: var(--accent);
}

/* Promo code toggle */
.auth-promo-toggle {
  font-size: 12px;
  color: var(--muted-light);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
}
.auth-promo-toggle:hover { color: var(--accent); }

/* Terms checkbox */
.auth-checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  color: var(--muted-light);
}
.auth-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.auth-checkbox-row a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-checkbox-row a:hover { color: var(--accent2); text-decoration: underline; }

/* Native select — dark chevron on white */
select.auth-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6170' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")
    no-repeat right 14px center / 14px 14px,
    #ffffff;
}
select.auth-input:focus {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")
    no-repeat right 14px center / 14px 14px,
    #ffffff;
}

/* ── Multi-step onboarding extras ── */
/* Step heading: behaves like a section eyebrow inside the form-gap rhythm.
   Setting `margin: 0` lets the form's `gap: 18px` handle the space below. */
.auth-step-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
}
/* Each step container is also a flex column so heading + fields share the same 14px rhythm. */
#step1, #step2, #step3, #step4 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-label-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-light);
  opacity: 0.7;
  margin-left: 4px;
  letter-spacing: 0;
  text-transform: none;
}

/* Two-column field row (e.g. First name / Last name).
   Gap matches the form's vertical gap so the row reads as a single field. */
.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-nav-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.auth-nav-row .auth-submit          { width: auto; flex: 1; }
.auth-nav-row #regBackBtn           { flex: 0 0 auto; min-width: 110px; }

/* Footer links */
.auth-links {
  margin-top: 20px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card      { padding: 28px 22px; }
  .auth-card-wrap { margin-top: 16px; }
  /* Stack the two-column row but keep the same 14px gap between fields. */
  .auth-field-row { grid-template-columns: 1fr; gap: 14px; }
}
