@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --navy:        #0B1F3A;
  --navy-dark:   #071529;
  --navy-mid:    #132d52;
  --gold:        #C9A84C;
  --gold-light:  #E2C97E;
  --gold-dim:    rgba(201,168,76,0.18);
  --white:       #FFFFFF;
  --off-white:   #F7F8FA;
  --surface:     #FFFFFF;
  --border:      rgba(11,31,58,0.12);
  --text:        #0B1F3A;
  --text-muted:  #5A6A7E;
  --red:         #C0392B;
  --red-dim:     rgba(192,57,43,0.08);
  --green:       #1A6B4A;
  --green-dim:   rgba(26,107,74,0.08);
  --radius:      12px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 3px rgba(11,31,58,0.08), 0 4px 16px rgba(11,31,58,0.06);
  --shadow-md:   0 4px 24px rgba(11,31,58,0.12), 0 1px 4px rgba(11,31,58,0.08);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;
}

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

html, body {
  font-family: var(--font);
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AUTH SHELL (login / signup split layout) ── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
}

/* Left panel */
.auth-brand {
  background: linear-gradient(160deg, var(--navy-mid) 0%, var(--navy-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 52px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px; height: 40px;
  background: var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 340px;
  color: var(--white);
}

.brand-tagline span {
  color: var(--gold-light);
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.brand-feature-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.brand-foot {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

/* Right panel */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--white);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-mobile-logo .brand-icon { width: 32px; height: 32px; font-size: 16px; }
.auth-mobile-logo .brand-name { font-size: 20px; color: var(--navy); }

@media (max-width: 900px) {
  .auth-mobile-logo { display: flex; }
}

.auth-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.auth-subhead {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* ── FORM FIELDS ── */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field-input-wrap { position: relative; }

.field input {
  width: 100%;
  font-family: var(--font);
  font-size: 14.5px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--off-white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.field input::placeholder { color: #aab4c0; }

.field input:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.field input.is-invalid { border-color: var(--red); }
.field input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }

.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 5px;
  display: none;
}
.field-error.is-visible { display: block; }

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  letter-spacing: 0.03em;
  margin: 0;
}
.toggle-visibility:hover { color: var(--navy); }

/* ── STRENGTH METER ── */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar .seg {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}

.strength-bar[data-strength="1"] .seg:nth-child(1) { background: var(--red); }
.strength-bar[data-strength="2"] .seg:nth-child(-n+2) { background: #E67E22; }
.strength-bar[data-strength="3"] .seg:nth-child(-n+3) { background: var(--gold); }
.strength-bar[data-strength="4"] .seg:nth-child(-n+4) { background: var(--green); }

.strength-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── BUTTONS ── */
.btn {
  width: 100%;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  margin-top: 6px;
}
.btn-primary:hover  { background: var(--navy-mid); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex-shrink: 0;
}
.btn-primary.is-loading .btn-spinner { display: block; }
.btn-primary.is-loading .btn-label-idle { display: none; }
.btn-primary.is-loading .btn-label::after { content: attr(data-loading-text); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── STATUS BANNER ── */
.status-banner {
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 16px;
  border: 1px solid transparent;
}
.status-banner.is-visible  { display: block; }
.status-banner.is-success  { background: var(--green-dim); color: var(--green); border-color: rgba(26,107,74,0.2); }
.status-banner.is-error    { background: var(--red-dim);   color: var(--red);   border-color: rgba(192,57,43,0.2); }
.status-banner.is-info     { background: var(--gold-dim);  color: #7a5c1e;      border-color: rgba(201,168,76,0.3); }

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

/* ── FORM FOOTER ── */
.auth-foot {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot a { color: var(--navy); font-weight: 600; }
.auth-foot a:hover { color: var(--gold); text-decoration: none; }

/* ── SECURITY BADGE ── */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.security-badge svg { opacity: 0.5; }

/* ═══════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════ */
.dash-shell { min-height: 100vh; background: var(--off-white); display: flex; flex-direction: column; }

.dash-topbar {
  background: var(--navy);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(11,31,58,0.18);
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-logo .brand-icon { width: 30px; height: 30px; font-size: 15px; border-radius: 7px; }
.dash-logo .brand-name { font-size: 18px; color: var(--white); }

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 5px 14px 5px 8px;
}

.dash-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}

.dash-user-email {
  font-size: 12.5px;
  color: rgba(255,255,255,0.8);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-logout:hover { background: rgba(192,57,43,0.25); border-color: rgba(192,57,43,0.6); color: #fff; }

.dash-body {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.dash-greeting-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.dash-body h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
}

.dash-date {
  font-size: 13px;
  color: var(--text-muted);
}

/* Summary cards */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.summary-card-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-card-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.summary-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.summary-card.accent {
  background: var(--navy);
  border-color: var(--navy);
}
.summary-card.accent .summary-card-label { color: rgba(255,255,255,0.55); }
.summary-card.accent .summary-card-value { color: var(--gold-light); }
.summary-card.accent .summary-card-sub   { color: rgba(255,255,255,0.45); }

/* Activity section */
.dash-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.activity-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.activity-icon.green { background: var(--green-dim); }
.activity-icon.gold  { background: var(--gold-dim); }
.activity-icon.red   { background: var(--red-dim); }

.activity-info { flex: 1; }
.activity-title { font-size: 14px; font-weight: 500; color: var(--text); }
.activity-time  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.activity-amount { font-size: 14px; font-weight: 600; }
.activity-amount.positive { color: var(--green); }
.activity-amount.negative { color: var(--red); }

.dash-status-banner {
  margin-top: 16px;
}

/* ═══════════════════════════════════════════
   EMAIL VERIFIED PAGE
═══════════════════════════════════════════ */
.verify-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  padding: 32px;
}

.verify-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 44px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.verify-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.verify-icon-wrap.success { background: var(--green-dim); }
.verify-icon-wrap.error   { background: var(--red-dim); }

.verify-card h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.verify-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.verify-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.verify-logo .brand-icon { width: 34px; height: 34px; font-size: 17px; }
.verify-logo .brand-name { font-size: 20px; color: var(--navy); }

@media (max-width: 500px) {
  .verify-card { padding: 36px 24px; }
  .auth-card h1 { font-size: 24px; }
}
