/* ═══════════════════════════════════════════════════════════════════
   NEXUS BANK — Auth Pages  (login · register)
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── RESET & BASE ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── TOKENS: DARK (default) ─────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --auth-bg:          #07090F;
  --auth-panel:       #0D1117;
  --auth-card:        #141922;
  --auth-border:      rgba(255,255,255,0.072);
  --auth-border-gold: rgba(59,130,246,0.35);      /* was gold → blue */
  --auth-glass:       rgba(255,255,255,0.04);
  --auth-glass-h:     rgba(255,255,255,0.07);

  /* GOLD VARIABLES → BLUE EQUIVALENTS */
  --auth-gold:        #3B82F6;                   /* was #C8A03C → blue-500 */
  --auth-gold-lt:     #60A5FA;                   /* was #E4C060 → blue-400 */
  --auth-gold-dim:    rgba(59,130,246,0.14);     /* was gold dim → blue dim */
  
  --auth-electric:    #4F9EFF;
  --auth-elec-dim:    rgba(79,158,255,0.13);
  --auth-emerald:     #2DD4A4;
  --auth-em-dim:      rgba(45,212,164,0.12);
  --auth-rose:        #FF5F7E;

  --auth-txt:         #F4F6FB;
  --auth-txt-m:       #8A9BBD;
  --auth-txt-f:       #4E5D78;

  --auth-input-bg:    #1A2234;
  --auth-input-bdr:   rgba(255,255,255,0.08);

  --auth-shadow:      0 32px 80px rgba(0,0,0,0.65);
  --auth-shadow-sm:   0 4px 20px rgba(0,0,0,0.3);
}

/* ── TOKENS: LIGHT ───────────────────────────────────────────────── */
[data-theme="light"] {
  --auth-bg:          #EEF1F7;
  --auth-panel:       #E4E8F0;
  --auth-card:        #FFFFFF;
  --auth-border:      rgba(0,0,0,0.08);
  --auth-border-gold: rgba(37,99,235,0.4);       /* was gold → blue */
  --auth-glass:       rgba(0,0,0,0.03);
  --auth-glass-h:     rgba(0,0,0,0.05);

  /* GOLD VARIABLES → BLUE EQUIVALENTS */
  --auth-gold:        #2563EB;                   /* was #B8860B → blue-600 */
  --auth-gold-lt:     #3B82F6;                   /* was #C8A03C → blue-500 */
  --auth-gold-dim:    rgba(37,99,235,0.1);       /* was gold dim → blue dim */
  
  --auth-electric:    #2563EB;
  --auth-elec-dim:    rgba(37,99,235,0.1);
  --auth-emerald:     #059669;
  --auth-em-dim:      rgba(5,150,105,0.1);
  --auth-rose:        #DC2626;

  --auth-txt:         #0D1117;
  --auth-txt-m:       #4A5568;
  --auth-txt-f:       #9AA5B4;

  --auth-input-bg:    #F8F9FC;
  --auth-input-bdr:   rgba(0,0,0,0.12);

  --auth-shadow:      0 32px 80px rgba(0,0,0,0.12);
  --auth-shadow-sm:   0 4px 20px rgba(0,0,0,0.08);
}

/* ── SCROLLBAR ───────────────────────────────────────────────────── */
body::-webkit-scrollbar { width: 5px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: var(--auth-card); border-radius: 99px; }

/* ── PAGE SHELL ──────────────────────────────────────────────────── */
body {
  background: var(--auth-bg);
  color: var(--auth-txt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── DECORATIVE BACKGROUND GRID + GLOWS ─────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Large radial blue glow top-left (was gold) */
.auth-bg::before {
  content: '';
  position: absolute;
  top: -180px; left: -140px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 60%);
}

/* Electric blue glow bottom-right (unchanged, already blue) */
.auth-bg::after {
  content: '';
  position: absolute;
  bottom: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,158,255,0.07) 0%, transparent 60%);
}

[data-theme="light"] .auth-bg::before { background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 60%); }
[data-theme="light"] .auth-bg::after  { background: radial-gradient(circle, rgba(37,99,235,0.05)  0%, transparent 60%); }

/* Subtle grid lines */
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}
[data-theme="light"] .auth-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

/* Floating orbs */
.auth-orb {
  position: absolute; border-radius: 50%; filter: blur(60px); animation: authFloat 8s ease-in-out infinite;
}
.auth-orb-1 { width:280px;height:280px; top:10%; left:8%;  background:rgba(59,130,246,0.055);  animation-duration:9s; }   /* was gold */
.auth-orb-2 { width:220px;height:220px; bottom:15%;right:10%; background:rgba(79,158,255,0.06);  animation-duration:11s; animation-delay:-3s; }
.auth-orb-3 { width:160px;height:160px; top:55%; left:55%; background:rgba(45,212,164,0.045); animation-duration:7s;  animation-delay:-5s; }

[data-theme="light"] .auth-orb-1 { background: rgba(37,99,235,0.05); }
[data-theme="light"] .auth-orb-2 { background: rgba(37,99,235,0.05); }
[data-theme="light"] .auth-orb-3 { background: rgba(5,150,105,0.04); }

@keyframes authFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.04); }
}

/* ── THEME TOGGLE (floating) ─────────────────────────────────────── */
.auth-theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--auth-card); border: 1px solid var(--auth-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--auth-txt-m);
  box-shadow: var(--auth-shadow-sm); transition: all 0.22s ease;
}
.auth-theme-toggle:hover { background: var(--auth-glass-h); color: var(--auth-gold); border-color: var(--auth-border-gold); }
.auth-theme-toggle svg { width: 18px; height: 18px; transition: all 0.22s ease; }

/* ── AUTH WRAPPER ────────────────────────────────────────────────── */
.auth-wrapper {
  position: relative; z-index: 1;
  flex: 1; display: flex;
  align-items: flex-start; justify-content: center;
  padding: 28px 16px 40px;
  overflow-y: auto;
}

/* ── SPLIT LAYOUT (left panel + right form) ──────────────────────── */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 1000px;
  min-height: 580px;
  border-radius: 24px; overflow: hidden;
  box-shadow: var(--auth-shadow);
  border: 1px solid var(--auth-border);
}

/* Register is taller, allow it to be one column */
.auth-container.auth-register {
  grid-template-columns: 380px 1fr;
  max-width: 1060px;
}

@media (max-width: 760px) {
  .auth-container, .auth-container.auth-register { grid-template-columns: 1fr; }
}

/* ── LEFT BRAND PANEL ────────────────────────────────────────────── */
.auth-brand {
  background: linear-gradient(160deg, #0C1220 0%, #0F1A2E 40%, #0A1218 80%, #060A10 100%);
  border-right: 1px solid var(--auth-border);
  padding: 52px 44px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}

[data-theme="light"] .auth-brand {
  background: linear-gradient(160deg, #1A2840 0%, #0F2040 40%, #142030 80%, #0D1825 100%);
}

/* Blue diagonal shimmer on brand panel (was gold) */
.auth-brand::before {
  content: '';
  position: absolute; top: -60px; right: 30%;
  width: 1px; height: 420px;
  background: linear-gradient(180deg, transparent, rgba(59,130,246,0.45) 50%, transparent);
  transform: rotate(18deg);
  pointer-events: none;
}
/* Electric glow bottom-left (already blue) */
.auth-brand::after {
  content: '';
  position: absolute; bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(79,158,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.auth-brand-top {}
.auth-brand-logo {
  display: flex; align-items: center; gap: 13px; margin-bottom: 52px;
}
.auth-brand-rectangle {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  max-width:220px;
}
.auth-brand-rectangle img {
  width:auto;
  max-width:100%;
  max-height:56px;
  object-fit:contain;
}
.auth-brand-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, #3B82F6, #1E3A8A); /* was gold gradient */
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(59,130,246,0.4); /* was gold shadow */
  flex-shrink: 0;
}
.auth-brand-icon svg { width: 24px; height: 24px; color: #fff; }
.auth-brand-wordmark {}
.auth-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 600; color: #F4F6FB; letter-spacing: 0.04em; line-height: 1.1;
}
.auth-brand-tag {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--auth-gold); margin-top: 2px;
}

.auth-brand-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.1rem; font-weight: 600; color: #F4F6FB;
  letter-spacing: 0.01em; line-height: 1.22; margin-bottom: 18px;
}
.auth-brand-headline em { color: var(--auth-gold-lt); font-style: normal; }

.auth-brand-sub {
  font-size: 0.875rem; color: rgba(244,246,251,0.55); line-height: 1.65; margin-bottom: 40px;
}

/* Feature list */
.auth-feature-list { display: flex; flex-direction: column; gap: 12px; }
.auth-feature {
  display: flex; align-items: center; gap: 11px;
  font-size: 0.82rem; color: rgba(244,246,251,0.65); font-weight: 500;
}
.auth-feature-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.auth-feature-icon svg { width: 15px; height: 15px; }
/* Converted gold feature to blue */
.af-gold  { background: rgba(59,130,246,0.15); color: var(--auth-gold); }
.af-blue  { background: rgba(79,158,255,0.12); color: #4F9EFF; }
.af-green { background: rgba(45,212,164,0.12); color: #2DD4A4; }
.af-rose  { background: rgba(255,95,126,0.12); color: #FF5F7E; }

/* Brand footer */
.auth-brand-footer {
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.auth-brand-footer p {
  font-size: 0.74rem; color: rgba(244,246,251,0.35); line-height: 1.5;
}
.auth-brand-footer strong { color: rgba(244,246,251,0.55); font-weight: 600; }

/* Decorative sparkline on brand panel */
.auth-brand-sparkline {
  margin-top: 28px; opacity: 0.2;
}

@media (max-width: 760px) { .auth-brand { display: none; } }

/* ── RIGHT FORM PANEL ────────────────────────────────────────────── */
.auth-form-panel {
  background: var(--auth-card);
  display: flex; flex-direction: column; justify-content: center;
  padding: 52px 48px;
  transition: background 0.3s ease;
}

.auth-form-panel-register {
  overflow-y: visible;
  max-height: none;
  padding-top: 40px;
  padding-bottom: 40px;
}

@media (max-width: 760px) { .auth-form-panel { padding: 40px 28px; border-radius: 24px; } }
@media (max-width: 480px) { .auth-form-panel { padding: 32px 20px; } }

.auth-form-head { margin-bottom: 32px; }
.auth-form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem; font-weight: 600; color: var(--auth-txt);
  letter-spacing: 0.01em; line-height: 1.15; margin-bottom: 8px;
}
.auth-form-sub { font-size: 0.875rem; color: var(--auth-txt-m); line-height: 1.5; }

/* Alert */
.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 22px;
  font-size: 0.875rem; font-weight: 500; line-height: 1.4;
  animation: authFadeIn 0.3s ease;
}
.auth-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-alert-error   { background: rgba(255,95,126,0.1);  border: 1px solid rgba(255,95,126,0.25);  color: #FF8FA5; }
.auth-alert-success { background: rgba(45,212,164,0.1);  border: 1px solid rgba(45,212,164,0.25);  color: #5EFAD7; }

[data-theme="light"] .auth-alert-error   { background: rgba(220,38,38,0.06);  border-color: rgba(220,38,38,0.2);  color: #B91C1C; }
[data-theme="light"] .auth-alert-success { background: rgba(5,150,105,0.06);  border-color: rgba(5,150,105,0.2);  color: #065F46; }

@keyframes authFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* ── FORM FIELDS ─────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 0.71rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--auth-txt-m);
}

.auth-input-wrap { position: relative; }
.auth-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--auth-txt-f); pointer-events: none; transition: color 0.2s;
}
.auth-input-icon svg { width: 16px; height: 16px; display: block; }

.auth-input {
  width: 100%; height: 46px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-bdr);
  border-radius: 10px;
  color: var(--auth-txt);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  padding: 0 14px 0 42px;
  transition: all 0.22s ease;
  outline: none;
  -webkit-appearance: none;
}
.auth-input::placeholder { color: var(--auth-txt-f); }
.auth-input:focus {
  border-color: var(--auth-border-gold);
  box-shadow: 0 0 0 3px var(--auth-gold-dim);
  background: var(--auth-input-bg);
}
.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon { color: var(--auth-gold); }

/* Password toggle */
.auth-pw-wrap { position: relative; }
.auth-pw-toggle {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--auth-txt-f); background: none; border: none;
  cursor: pointer; padding: 3px; display: flex; align-items: center;
  transition: color 0.2s;
}
.auth-pw-toggle:hover { color: var(--auth-txt-m); }
.auth-pw-toggle svg { width: 15px; height: 15px; display: block; }
.auth-pw-wrap .auth-input { padding-right: 42px; }

/* 2-col row */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .auth-row { grid-template-columns: 1fr; } }

/* ── REMEMBER ME ─────────────────────────────────────────────────── */
.auth-remember-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-top: -4px;
}
.auth-check-label {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.84rem; color: var(--auth-txt-m); cursor: pointer; user-select: none;
}
.auth-check-label input[type="checkbox"] {
  width: 17px; height: 17px; margin: 0;
  accent-color: var(--auth-gold);
  border-radius: 4px; cursor: pointer; flex-shrink: 0;
}
.auth-check-label input[type="checkbox"]:focus { outline: 2px solid var(--auth-gold); outline-offset: 2px; }

.auth-forgot {
  font-size: 0.82rem; color: var(--auth-gold); font-weight: 500;
  text-decoration: none; transition: color 0.2s;
}
.auth-forgot:hover { color: var(--auth-gold-lt); text-decoration: underline; }

/* ── PASSWORD STRENGTH ───────────────────────────────────────────── */
.auth-pw-strength { margin-top: 6px; }
.auth-strength-bar {
  height: 3px; border-radius: 99px; background: var(--auth-input-bdr);
  overflow: hidden; margin-bottom: 5px;
}
.auth-strength-fill {
  height: 100%; border-radius: 99px; width: 0;
  transition: width 0.4s ease, background 0.4s ease;
}
.auth-strength-text { font-size: 0.72rem; font-weight: 600; }
.str-weak   { color: var(--auth-rose); }
.str-medium { color: #F59E0B; }
.str-strong { color: var(--auth-emerald); }

/* ── SUBMIT BUTTON ───────────────────────────────────────────────── */
.auth-submit {
  width: 100%; height: 48px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--auth-gold), #1E3A8A); /* was gold gradient, now uses blue var */
  color: #fff; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.03em;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 6px 24px rgba(59,130,246,0.32); /* was gold shadow */
  transition: all 0.22s ease; margin-top: 4px;
}
.auth-submit:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 32px rgba(59,130,246,0.4); }
.auth-submit:active { transform: translateY(0); }
.auth-submit::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
/* Loading state */
.auth-submit.is-loading { pointer-events: none; opacity: 0.85; }
.auth-submit.is-loading .auth-submit-text { visibility: hidden; }
.auth-submit.is-loading::before {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: authSpin 0.7s linear infinite;
}
@keyframes authSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── DIVIDER ─────────────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 2px 0;
  color: var(--auth-txt-f); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--auth-border);
}

/* ── FOOTER LINK ─────────────────────────────────────────────────── */
.auth-footer-link {
  text-align: center; font-size: 0.875rem; color: var(--auth-txt-m); margin-top: 6px;
}
.auth-footer-link a { color: var(--auth-gold); font-weight: 600; text-decoration: none; }
.auth-footer-link a:hover { color: var(--auth-gold-lt); text-decoration: underline; }

/* ── TERMS NOTE ──────────────────────────────────────────────────── */
.auth-terms {
  font-size: 0.74rem; color: var(--auth-txt-f); text-align: center;
  line-height: 1.55; margin-top: 4px;
}
.auth-terms a { color: var(--auth-txt-f); text-decoration: underline; }
.auth-terms a:hover { color: var(--auth-txt-m); }

/* ── TRUST BADGES (bottom of form panel) ────────────────────────── */
.auth-trust {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--auth-border);
  flex-wrap: wrap;
}
.auth-trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: var(--auth-txt-f); font-weight: 500;
}
.auth-trust-item svg { width: 14px; height: 14px; color: var(--auth-emerald); }

/* ── STEP INDICATOR (register) ───────────────────────────────────── */
.auth-step-pills {
  display: flex; align-items: center; gap: 6px; margin-bottom: 24px;
}
.auth-step-pill {
  height: 4px; border-radius: 99px; flex: 1;
  background: var(--auth-input-bdr); transition: background 0.3s;
}
.auth-step-pill.active { background: var(--auth-gold); }
.auth-step-pill.done   { background: var(--auth-emerald); }

/* ── SECTION DIVIDER inside form ─────────────────────────────────── */
.auth-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--auth-txt-f);
  padding: 6px 0 2px; border-top: 1px solid var(--auth-border);
  margin-top: 2px;
}

/* ── ENTRY ANIMATIONS ────────────────────────────────────────────── */
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-form-panel { animation: authSlideUp 0.45s cubic-bezier(0.4,0,0.2,1) both; }
.auth-brand      { animation: authSlideUp 0.45s cubic-bezier(0.4,0,0.2,1) 0.06s both; }