/* ================================================================
   VALOR PERKS — css/auth.css  v4.0
   Faithful recreation of the dark-green Figma auth design.
   Bokeh vertical light bars, pill CTA, dark inputs with icons.
   All Firebase/JS hooks untouched — CSS only.
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:          #080d08;
  --bg-card:          #0e1610;
  --bg-input:         #0b1209;
  --border-input:     rgba(255,255,255,0.07);
  --border-subtle:    rgba(255,255,255,0.05);
  --accent:           #8bff00;
  --accent-hover:     #a8ff3e;
  --accent-dim:       rgba(139,255,0,0.12);
  --text-primary:     #ffffff;
  --text-secondary:   #9aab98;
  --text-muted:       #586a56;
  --text-placeholder: rgba(110,130,108,0.5);
  --radius-card:      24px;
  --radius-input:     13px;
  --radius-pill:      100px;
  --dur:              0.22s;
  --ease:             cubic-bezier(0.4,0,0.2,1);
  --font-ui:          'Plus Jakarta Sans', sans-serif;
  --font-mono:        'JetBrains Mono', monospace;
}

/* ── PAGE ───────────────────────────────────────────────────── */
.auth-page {
  min-height: 100svh;
  background: var(--bg-deep);
  font-family: var(--font-ui);
  position: relative;
  overflow-x: hidden;
}

/* Bokeh vertical light columns — exactly as in the Figma */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 36px 55% at 8%  45%, rgba(72,180,28,0.22)  0%, transparent 100%),
    radial-gradient(ellipse 24px 40% at 16% 70%, rgba(55,150,15,0.14)  0%, transparent 100%),
    radial-gradient(ellipse 44px 60% at 26% 30%, rgba(90,210,35,0.16)  0%, transparent 100%),
    radial-gradient(ellipse 28px 50% at 36% 80%, rgba(60,165,20,0.12)  0%, transparent 100%),
    radial-gradient(ellipse 38px 65% at 48% 20%, rgba(85,200,30,0.18)  0%, transparent 100%),
    radial-gradient(ellipse 22px 45% at 58% 60%, rgba(65,170,25,0.13)  0%, transparent 100%),
    radial-gradient(ellipse 42px 58% at 68% 40%, rgba(95,215,40,0.15)  0%, transparent 100%),
    radial-gradient(ellipse 30px 52% at 78% 75%, rgba(70,185,22,0.12)  0%, transparent 100%),
    radial-gradient(ellipse 48px 62% at 88% 25%, rgba(80,200,32,0.16)  0%, transparent 100%),
    radial-gradient(ellipse 26px 44% at 95% 55%, rgba(60,160,18,0.11)  0%, transparent 100%);
}

/* ── TWO-COLUMN LAYOUT ──────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
  position: relative;
  z-index: 1;
}

/* ── LEFT PANEL ─────────────────────────────────────────────── */
.auth-panel-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  border-right: 1px solid var(--border-subtle);
}

.auth-panel-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.5s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BACK LINK ──────────────────────────────────────────────── */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
  margin-bottom: 36px;
}
.auth-back-link:hover { color: var(--text-secondary); }

/* Circle arrow button like the Figma back arrow */
.auth-back-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur);
}
.auth-back-link:hover .auth-back-arrow { background: rgba(255,255,255,0.11); }

/* ── LOGO ───────────────────────────────────────────────────── */
.auth-logo {
  margin-bottom: 36px;
}
.auth-logo img { height: 34px; width: auto; }
.nav-logo-wordmark {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nav-logo-wordmark span { color: var(--accent); }

/* ── HEADER ─────────────────────────────────────────────────── */
.auth-header { margin-bottom: 28px; }

.auth-title {
  font-family: var(--font-ui);
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── ALERT MESSAGES ─────────────────────────────────────────── */
.form-error {
  display: none;
  background: rgba(239,68,68,0.09);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #fc8181;
  line-height: 1.5;
  margin-bottom: 14px;
}
.form-error.visible { display: block; }

.form-success {
  display: none;
  background: var(--accent-dim);
  border: 1px solid rgba(139,255,0,0.18);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.5;
  margin-bottom: 14px;
}
.form-success.visible { display: block; }

/* ── FORM ───────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.005em;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── INPUT FIELD WITH LEFT ICON ─────────────────────────────── */
/* This matches the Figma — dark pill-ish field, left icon, ghost placeholder */
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color var(--dur);
}
.input-icon-wrap:focus-within .input-icon {
  color: rgba(139,255,0,0.55);
}

.form-input {
  width: 100%;
  background: var(--bg-input) !important;
  border: 1px solid var(--border-input) !important;
  border-radius: var(--radius-input) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 14px 16px 14px 44px !important;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease) !important;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

/* Input without an icon (e.g. date, referral) */
.form-input.no-icon {
  padding: 14px 16px !important;
}

.form-input::placeholder {
  color: var(--text-placeholder) !important;
}

.form-input:focus {
  outline: none !important;
  border-color: rgba(139,255,0,0.32) !important;
  background: rgba(139,255,0,0.03) !important;
  box-shadow: 0 0 0 3px rgba(139,255,0,0.07) !important;
}

/* Date input */
input[type="date"].form-input { color-scheme: dark; }

/* Mono */
.form-input--mono {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.04em !important;
}

/* ── PASSWORD EYE TOGGLE ────────────────────────────────────── */
.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-right: 46px !important; }

.input-eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color var(--dur);
}
.input-eye-btn:hover { color: var(--text-secondary); }

/* ── PASSWORD STRENGTH ──────────────────────────────────────── */
.password-strength {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.pw-bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── PRIMARY CTA — bright green pill (exactly like Figma) ───── */
.btn-auth-primary,
.btn.btn-primary.btn-lg.btn-full {
  width: 100% !important;
  padding: 15px 24px !important;
  background: linear-gradient(135deg, #96ff10 0%, #72e000 100%) !important;
  border: none !important;
  border-radius: var(--radius-pill) !important;
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #060e00 !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease) !important;
  box-shadow: 0 4px 28px rgba(139,255,0,0.28) !important;
  margin-top: 4px !important;
  position: relative !important;
  overflow: hidden !important;
}
.btn-auth-primary:hover,
.btn.btn-primary.btn-lg.btn-full:hover {
  opacity: 0.92 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 36px rgba(139,255,0,0.38) !important;
}
.btn-auth-primary:active,
.btn.btn-primary.btn-lg.btn-full:active {
  transform: translateY(0) !important;
}
.btn-auth-primary:disabled,
.btn.btn-primary.btn-lg.btn-full:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Ghost button (reset link submit) */
.btn.btn-ghost.btn-lg.btn-full {
  width: 100% !important;
  padding: 14px 24px !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-pill) !important;
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  cursor: pointer !important;
  transition: background var(--dur), border-color var(--dur) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 4px !important;
}
.btn.btn-ghost.btn-lg.btn-full:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.16) !important;
  color: var(--text-primary) !important;
}

/* ── DIVIDER ────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0;
  letter-spacing: 0.03em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* ── SOCIAL BUTTONS — side by side pill buttons ─────────────── */
.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
  white-space: nowrap;
}
.btn-social:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

/* Full-width google button (existing ID hook) */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
  margin-top: 4px;
}
.btn-google:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

/* ── LINKS ──────────────────────────────────────────────────── */
.auth-link {
  font-size: 12.5px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  font-family: var(--font-ui);
  transition: color var(--dur);
}
.auth-link:hover { color: var(--text-secondary); }

.auth-link--accent { color: var(--accent); font-weight: 600; }
.auth-link--accent:hover { color: var(--accent-hover); }

/* ── BOTTOM SWITCH LINE ─────────────────────────────────────── */
.auth-switch {
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 22px;
  line-height: 1.5;
}

/* ── AGREE CHECKBOX ─────────────────────────────────────────── */
.form-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.form-agree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
}

/* ── FORGOT PASSWORD SECTION ────────────────────────────────── */
#forgot-form-wrap {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  margin-top: 8px;
}

/* ── RIGHT PANEL ────────────────────────────────────────────── */
.auth-panel-right {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  background: #0b140a;
  border-left: 1px solid var(--border-subtle);
}

.auth-panel-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 25% 25%, rgba(139,255,0,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 75% 75%, rgba(70,180,20,0.05) 0%, transparent 55%);
  z-index: 0;
  pointer-events: none;
}

.auth-panel-right-content {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Badge */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  background: rgba(139,255,0,0.09);
  border: 1px solid rgba(139,255,0,0.18);
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 28px;
}
.auth-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: dotPulse 2.2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.75); }
}

.auth-quote {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.62;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  padding-left: 18px;
  border-left: 2px solid rgba(139,255,0,0.35);
}

.auth-quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}

.t-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 32px;
}

.auth-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 11px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  transition: background var(--dur), border-color var(--dur);
}
.auth-perk:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.auth-perk svg { flex-shrink: 0; margin-top: 1px; }

.auth-panel-stats {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.auth-panel-stat {
  flex: 1;
  padding: 16px 18px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.auth-panel-stat:last-child { border-right: none; }

.auth-panel-stat-num {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 5px;
}
.auth-panel-stat .t-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.auth-panel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.04;
  z-index: 0;
}

/* ── SIGNUP SUCCESS BOX ─────────────────────────────────────── */
.form-success-box {
  background: rgba(139,255,0,0.06);
  border: 1px solid rgba(139,255,0,0.16);
  border-radius: 14px;
  padding: 18px 20px;
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.form-success-box.visible { display: flex; }

.form-success-box .success-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-success-box .success-body {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.form-success-box .spam-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 13px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 10px;
  font-size: 11.5px;
  color: #fbbf24;
  line-height: 1.55;
}
.spam-notice svg { flex-shrink: 0; margin-top: 1px; }

.redirect-timer {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ── FORM 2-COL ROW ─────────────────────────────────────────── */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── UTILITIES ──────────────────────────────────────────────── */
.hidden      { display: none !important; }
.mb-24       { margin-bottom: 24px; }
.mt-40       { margin-top: 40px; }
.c-muted     { color: var(--text-muted); }
.t-caption   { font-size: 12px; }

.spin { animation: spinAnim 0.8s linear infinite; }
@keyframes spinAnim { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */

/* Hide right panel on tablet */
@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-panel-right { display: none; }
  .auth-panel-left {
    padding: 40px 28px 52px;
    border-right: none;
    min-height: 100svh;
    align-items: flex-start;
  }
  .auth-panel-content { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 520px) {
  .auth-page { padding: 0; }
  .auth-panel-left { padding: 32px 20px 44px; }
  .auth-title { font-size: 28px; }
  .auth-header { margin-bottom: 22px; }
  .auth-form { gap: 12px; }
  .auth-back-link { margin-bottom: 28px; }
  .auth-logo { margin-bottom: 28px; }
}

@media (max-width: 440px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .auth-social-row { grid-template-columns: 1fr; }
  .auth-panel-left { padding: 24px 16px 40px; }
}