/* ═══════════════════════════════════════════════════════
   WEALTHARCH — LOGIN PAGE STYLES
   ═══════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body.login-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  overflow: hidden;
}

/* ── LEFT PANEL (Brand) ─────────────────────────────────── */
.login-brand {
  background: var(--ink);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
/* Decorative rings */
.login-brand::before,
.login-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(184,145,42,0.2);
}
.login-brand::before {
  width: 600px; height: 600px;
  bottom: -200px; left: -200px;
}
.login-brand::after {
  width: 400px; height: 400px;
  bottom: -100px; left: -100px;
  border-color: rgba(184,145,42,0.1);
}
.brand-top { position: relative; z-index: 1; }
.brand-logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--ff-serif);
  font-size: 1.6rem; font-weight: 700; color: var(--white);
  text-decoration: none; letter-spacing: -0.02em;
}
.brand-logo-mark {
  width: 26px; height: 26px; background: var(--gold);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  display: inline-block; flex-shrink: 0;
}
.brand-logo span { color: var(--gold); }

.brand-middle {
  position: relative; z-index: 1;
}
.brand-headline {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 300; color: var(--white);
  line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.brand-headline em { font-style: italic; color: var(--gold); }
.brand-sub {
  font-size: 0.95rem; color: rgba(255,255,255,0.82);
  line-height: 1.8; max-width: 340px;
}

.brand-bottom {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 1rem;
}
.brand-stat {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
}
.brand-stat-icon { color: var(--gold); font-size: 1rem; flex-shrink: 0; }
.brand-stat-text { font-size: 0.85rem; color: rgba(255,255,255,0.80); line-height: 1.5; }
.brand-stat-text strong { color: rgba(255,255,255,0.85); font-weight: 600; display: block; }

/* ── RIGHT PANEL (Form) ─────────────────────────────────── */
.login-form-panel {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem;
  background: var(--white);
  position: relative;
  overflow-y: auto;
}

.login-back {
  position: absolute; top: 2rem; left: 2rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 500; color: var(--ink-60);
  text-decoration: none;
  transition: color 0.2s;
}
.login-back:hover { color: var(--gold); }
.login-back svg { transition: transform 0.25s; }
.login-back:hover svg { transform: translateX(-3px); }

.login-box { width: 100%; max-width: 420px; }

.login-greeting {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.login-greeting::before { content: ''; width: 22px; height: 1px; background: var(--gold); }

.login-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300; color: var(--ink);
  letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 0.5rem;
}
.login-title em { font-style: italic; color: var(--gold); }
.login-subtitle { font-size: 0.9rem; color: var(--ink-60); margin-bottom: 2.5rem; }

/* Tabs */
.login-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--cream); border-radius: 4px;
  padding: 4px; margin-bottom: 2rem;
}
.login-tab {
  padding: 0.65rem 1rem;
  font-family: var(--ff-sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-60); background: none; border: none;
  border-radius: 2px; cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.login-tab.active {
  background: var(--white); color: var(--ink);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

/* Form */
.login-form-inner { display: flex; flex-direction: column; gap: 1.1rem; }

.lf-group { display: flex; flex-direction: column; gap: 0.4rem; }
.lf-label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-60);
}
.lf-input-wrap { position: relative; }
.lf-input {
  width: 100%; padding: 0.9rem 1rem 0.9rem 2.75rem;
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: 3px; font-family: var(--ff-sans);
  font-size: 0.9rem; color: var(--ink); outline: none;
  transition: border-color 0.25s, background 0.25s;
}
.lf-input:focus { border-color: var(--gold); background: var(--white); }
.lf-icon {
  position: absolute; left: 0.875rem; top: 50%;
  transform: translateY(-50%); color: var(--ink-30);
  pointer-events: none; font-size: 0.9rem;
  transition: color 0.25s;
}
.lf-input:focus ~ .lf-icon { color: var(--gold); }

/* Password toggle */
.lf-toggle {
  position: absolute; right: 0.875rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--ink-30); padding: 2px;
  transition: color 0.2s;
}
.lf-toggle:hover { color: var(--gold); }

/* Forgot password row */
.lf-row {
  display: flex; justify-content: flex-end;
  margin-top: -0.5rem;
}
.lf-forgot {
  font-size: 0.8rem; font-weight: 500; color: var(--gold);
  text-decoration: none; transition: opacity 0.2s;
}
.lf-forgot:hover { opacity: 0.7; }

/* Submit button */
.lf-submit {
  width: 100%; padding: 1rem;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 3px; cursor: pointer;
  font-family: var(--ff-sans); font-size: 0.85rem;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  transition: background 0.3s, gap 0.3s;
  margin-top: 0.5rem;
}
.lf-submit:hover { background: var(--gold); gap: 1rem; }
.lf-submit svg { transition: transform 0.3s; }
.lf-submit:hover svg { transform: translateX(3px); }

/* Divider */
.lf-divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--ink-30); font-size: 0.78rem;
  margin: 0.25rem 0;
}
.lf-divider::before,
.lf-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Help text */
.lf-help {
  text-align: center; font-size: 0.82rem;
  color: var(--ink-60); margin-top: 0.5rem;
}
.lf-help a { color: var(--gold); font-weight: 500; }

/* OTP panel (hidden by default) */
.otp-panel { display: none; }
.otp-panel.visible { display: block; }

/* Error/success states */
.lf-input.error { border-color: #e05050; background: #fff5f5; }
.lf-msg {
  font-size: 0.8rem; padding: 0.75rem 1rem;
  border-radius: 3px; display: none;
  align-items: center; gap: 0.5rem;
}
.lf-msg.error { background: #fff0f0; color: #c0392b; display: flex; border: 1px solid #fbd5d5; }
.lf-msg.success { background: #f0fdf4; color: #2d7a4f; display: flex; border: 1px solid #bbf7d0; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  body.login-page {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .login-brand {
    padding: 2.5rem 2rem 3rem;
    min-height: auto;
  }
  .brand-bottom { display: none; }
  .login-form-panel { padding: 2.5rem 1.5rem 3rem; min-height: auto; }
  .login-back { position: static; margin-bottom: 1.5rem; }
}
@media (max-width: 480px) {
  .login-box { max-width: 100%; }
}
