/* ============================================================
   Landing page — self-contained, premium fintech aesthetic.
   Independent of the dashboard theme (pre-auth surface).
   All classes are prefixed `lp-`.
   ============================================================ */

.lp-root {
  --lp-bg: #070b12;
  --lp-bg-2: #0b111c;
  --lp-panel: rgba(255, 255, 255, 0.035);
  --lp-panel-strong: rgba(255, 255, 255, 0.06);
  --lp-border: rgba(255, 255, 255, 0.09);
  --lp-border-strong: rgba(255, 255, 255, 0.16);
  --lp-text: #eaf1f8;
  --lp-muted: #9aa7ba;
  --lp-faint: #6b7888;
  --lp-accent: #34d399;
  --lp-accent-2: #22d3ee;
  --lp-pos: #34d399;
  --lp-neg: #f87171;
  --lp-grad: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --lp-radius: 18px;
  --lp-radius-sm: 12px;

  min-height: 100vh;
  margin: 0;
  color: var(--lp-text);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(900px 520px at 8% 0%, rgba(52, 211, 153, 0.16), transparent 55%),
    linear-gradient(180deg, var(--lp-bg-2), var(--lp-bg) 60%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.lp-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- nav ---------- */
.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 8px;
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--lp-text);
}
.lp-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 1.15rem;
  color: #05241b;
  background: var(--lp-grad);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.28);
}
.lp-brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }
.lp-brand-sub { display: block; font-size: 0.72rem; color: var(--lp-faint); font-weight: 600; letter-spacing: 0.02em; }

/* ---------- buttons ---------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.lp-btn-primary {
  color: #04231a;
  background: var(--lp-grad);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}
.lp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(34, 211, 238, 0.38); }
.lp-btn-ghost {
  color: var(--lp-text);
  background: var(--lp-panel-strong);
  border-color: var(--lp-border-strong);
}
.lp-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.lp-btn-block { width: 100%; }
.lp-btn.is-disabled { opacity: 0.5; pointer-events: none; }

/* ---------- hero ---------- */
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0 28px;
}
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--lp-border-strong);
  background: var(--lp-panel);
  color: var(--lp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lp-eyebrow b { color: var(--lp-accent); font-weight: 800; }
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lp-accent); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }

.lp-h1 {
  margin: 22px 0 0;
  font-size: clamp(2.3rem, 4.6vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.lp-h1 .lp-grad-text {
  background: var(--lp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-lede {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 1.12rem;
  line-height: 1.62;
  color: var(--lp-muted);
}
.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.lp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: var(--lp-faint);
  font-size: 0.86rem;
  font-weight: 600;
}
.lp-trust span { display: inline-flex; align-items: center; gap: 7px; }
.lp-check { color: var(--lp-accent); }

/* ---------- product mockup ---------- */
.lp-mock-wrap { position: relative; }
.lp-mock {
  position: relative;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 18px;
  backdrop-filter: blur(8px);
}
.lp-mock-bar { display: flex; gap: 7px; margin-bottom: 16px; }
.lp-mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.lp-mock-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.lp-mock-kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lp-faint); font-weight: 700; }
.lp-mock-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.lp-mock-sub { font-size: 0.8rem; color: var(--lp-muted); margin-top: 2px; }
.lp-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(52, 211, 153, 0.14);
  color: var(--lp-accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.lp-mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.lp-kpi { border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); padding: 11px 12px; background: var(--lp-panel); }
.lp-kpi-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lp-faint); font-weight: 700; }
.lp-kpi-val { font-size: 1.1rem; font-weight: 800; margin-top: 5px; }
.lp-kpi-val.pos { color: var(--lp-pos); }

.lp-mock-rows { border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); overflow: hidden; }
.lp-row {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.7fr 0.9fr;
  gap: 8px;
  align-items: center;
  padding: 11px 13px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--lp-border);
}
.lp-row:last-child { border-bottom: 0; }
.lp-row-head { color: var(--lp-faint); font-weight: 700; text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.07em; background: rgba(255, 255, 255, 0.02); }
.lp-tkr { font-weight: 800; }
.lp-tag { font-size: 0.64rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; margin-left: 7px; letter-spacing: 0.03em; }
.lp-tag.csp { background: rgba(34, 211, 238, 0.16); color: var(--lp-accent-2); }
.lp-tag.cc { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.lp-muted { color: var(--lp-muted); }
.lp-pos { color: var(--lp-pos); font-weight: 700; }

.lp-float {
  position: absolute;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(10, 16, 26, 0.85);
  border: 1px solid var(--lp-border-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(6px);
}
.lp-float .lp-check { font-size: 0.9rem; }
.lp-float-tr { top: -16px; right: -14px; }
.lp-float-bl { bottom: -18px; left: -16px; }

/* ---------- sections ---------- */
.lp-section { padding: 64px 0 8px; }
.lp-section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.lp-section-kicker { color: var(--lp-accent); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.lp-section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 0; }
.lp-section-sub { color: var(--lp-muted); font-size: 1.05rem; line-height: 1.6; margin: 14px 0 0; }

/* feature grid */
.lp-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lp-feature {
  position: relative;
  padding: 26px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-panel);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.lp-feature:hover { border-color: var(--lp-border-strong); transform: translateY(-2px); background: var(--lp-panel-strong); }
.lp-feat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: var(--lp-accent);
  margin-bottom: 16px;
}
.lp-feat-title { font-size: 1.16rem; font-weight: 800; letter-spacing: -0.02em; }
.lp-feat-copy { color: var(--lp-muted); line-height: 1.6; margin-top: 9px; font-size: 0.97rem; }

/* steps */
.lp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-step { padding: 22px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius); background: var(--lp-panel); }
.lp-step-num {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  font-weight: 800; color: #04231a; background: var(--lp-grad); margin-bottom: 14px;
}
.lp-step-title { font-weight: 800; font-size: 1.02rem; }
.lp-step-copy { color: var(--lp-muted); line-height: 1.55; margin-top: 7px; font-size: 0.9rem; }

/* ---------- auth panel ---------- */
.lp-auth-section { padding: 64px 0 40px; }
.lp-auth {
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--lp-border-strong);
  border-radius: var(--lp-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: 30px;
}
.lp-auth-kicker { color: var(--lp-accent); font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.lp-auth-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; margin: 8px 0 6px; }
.lp-auth-copy { color: var(--lp-muted); line-height: 1.55; font-size: 0.92rem; margin-bottom: 20px; }
.lp-form { display: grid; gap: 14px; }
.lp-field { display: grid; gap: 7px; }
.lp-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--lp-muted); font-weight: 800; }
.lp-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--lp-border-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--lp-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lp-input::placeholder { color: var(--lp-faint); }
.lp-input:focus { border-color: var(--lp-accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
.lp-input:-webkit-autofill,
.lp-input:-webkit-autofill:hover,
.lp-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0e1620 inset;
  -webkit-text-fill-color: var(--lp-text);
  caret-color: var(--lp-text);
}
.lp-submit { margin-top: 4px; }
.lp-divider {
  display: flex; align-items: center; justify-content: center;
  color: var(--lp-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  margin: 18px 0 14px;
}
.lp-divider::before, .lp-divider::after { content: ''; flex: 1; height: 1px; background: var(--lp-border); }
.lp-divider::before { margin-right: 12px; }
.lp-divider::after { margin-left: 12px; }
.lp-auth-note { color: var(--lp-faint); font-size: 0.82rem; line-height: 1.5; text-align: center; }
.lp-auth-error {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  font-size: 0.88rem;
}

/* ---------- footer ---------- */
.lp-footer {
  border-top: 1px solid var(--lp-border);
  margin-top: 40px;
  padding: 26px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--lp-faint);
  font-size: 0.85rem;
}
.lp-footer-dim { color: var(--lp-faint); }
.lp-disclaimer { max-width: 720px; margin: 0 auto; padding-top: 14px; color: var(--lp-faint); font-size: 0.76rem; line-height: 1.5; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .lp-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; }
  .lp-mock-wrap { order: 2; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lp-shell { padding: 0 16px; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-mock-kpis { grid-template-columns: 1fr 1fr; }
  .lp-row { grid-template-columns: 1.4fr 0.8fr 0.8fr; }
  .lp-row .lp-col-hide { display: none; }
  .lp-float-tr { right: 0; }
  .lp-float-bl { left: 0; }
}
/* ===== OPTIONS DASHBOARD - THEME SYSTEM ===== */
/* 3 themes: editorial-light, editorial-mid, editorial-dark */

.analytics-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-stack-panel {
  padding: 16px;
}

.analytics-label {
  color: var(--text-secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 6px;
}

.analytics-value {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.analytics-sub {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-top: 6px;
}

.analytics-stack-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  padding-bottom: 10px;
}

.analytics-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.analytics-mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.analytics-mini-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
}

.analytics-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-news-item {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.analytics-news-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, var(--border));
  background: color-mix(in srgb, var(--bg-hover) 72%, transparent);
}

.analytics-news-title {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.analytics-news-meta,
.analytics-news-summary {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.form-error {
  margin-top: 10px;
  color: var(--negative);
  font-family: var(--font-mono);
  font-size: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-page {
  min-height: 100vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent-blue) 18%, transparent), transparent 38%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-green) 14%, transparent), transparent 34%),
    var(--bg-main);
}

.landing-loading {
  align-items: center;
  justify-content: center;
}

.landing-loading-card {
  padding: 18px 22px;
  color: var(--text-primary);
  font-weight: 700;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding: 28px;
}

.landing-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-hero h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

.landing-lede,
.landing-trust p,
.landing-feature-card p,
.landing-footer p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.landing-cta-row,
.landing-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-auth-btn {
  min-width: 190px;
}

.landing-auth-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.landing-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.landing-mini-item {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  color: var(--text-secondary);
}

.landing-auth-google-block {
  margin-top: 12px;
}

.landing-hero-note {
  color: var(--text-secondary);
  margin-top: 14px;
}

.landing-auth-error {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--negative) 25%, var(--border));
  background: color-mix(in srgb, var(--negative) 8%, transparent);
  color: var(--negative);
  font-size: 0.88rem;
}

.landing-auth {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.landing-auth-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-auth-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-auth-copy {
  margin: 6px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.landing-auth-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.landing-auth-tab {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-hover) 55%, transparent);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.landing-auth-tab.is-active {
  border-color: color-mix(in srgb, var(--accent-blue) 30%, var(--border));
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.landing-auth-form {
  display: grid;
  gap: 12px;
}

.landing-auth-field {
  display: grid;
  gap: 6px;
}

.landing-auth-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.landing-auth-input {
  width: 100%;
  padding: 8px 10px;
  background-color: #fff4e4;
  border: 1px solid #d2b38d;
  border-radius: calc(var(--radius) * 0.9);
  color: #2f2216;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.landing-auth-input:focus {
  border-color: #b98f63;
  box-shadow: 0 0 0 3px rgba(185, 143, 99, 0.16);
}

.landing-auth-input:-webkit-autofill,
.landing-auth-input:-webkit-autofill:hover,
.landing-auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff4e4 inset;
  -webkit-text-fill-color: #2f2216;
  caret-color: #2f2216;
}

.landing-auth-submit {
  width: 100%;
}

.landing-auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-top: 2px;
}

.landing-auth-divider::before,
.landing-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.landing-auth-divider::before { margin-right: 10px; }
.landing-auth-divider::after { margin-left: 10px; }

.landing-auth-actions {
  gap: 8px;
}

.landing-auth-helper {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.landing-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-preview,
.landing-trust,
.landing-feature-card,
.landing-footer {
  padding: 18px;
}

.landing-preview-kicker,
.landing-footer-title,
.landing-feature-card h2,
.landing-trust-title {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-preview-kicker,
.landing-footer-title {
  margin-bottom: 12px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.landing-preview-list {
  display: grid;
  gap: 10px;
}

.landing-preview-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-hover) 60%, transparent);
  color: var(--text-primary);
  font-weight: 600;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.landing-feature-card h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-footer p {
  margin: 0;
  max-width: 72ch;
}

.topbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.topbar-user-name {
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.topbar-user-email {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.topbar-signout {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .landing-hero,
  .landing-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .landing-page {
    padding: 16px;
  }

  .landing-hero,
  .landing-preview,
  .landing-trust,
  .landing-feature-card,
  .landing-footer {
    padding: 16px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-auth-btn {
    width: 100%;
    min-width: 0;
  }

  .landing-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-nav-cta {
    width: 100%;
  }

  .landing-nav-cta .landing-auth-btn {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-user {
    align-items: flex-start;
  }
}

.analytics-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(41,98,255,0.10), rgba(0,200,83,0.08));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.analytics-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-hero-kicker {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-hero-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.analytics-hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.93rem;
  max-width: 58ch;
}

.analytics-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.screener-card {
  margin-top: 16px;
}

.screener-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.screener-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.screener-filter-group {
  margin-bottom: 0;
}

.screener-select {
  min-height: 40px;
}

@media (max-width: 980px) {
  .screener-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .screener-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.analytics-badge-blue {
  background: rgba(41,98,255,0.10);
  border-color: rgba(41,98,255,0.22);
  color: var(--accent-blue);
}

.analytics-badge-warning {
  background: rgba(255,171,0,0.12);
  border-color: rgba(255,171,0,0.22);
  color: var(--warning);
}

.analytics-badge-positive {
  background: rgba(0,200,83,0.10);
  border-color: rgba(0,200,83,0.22);
  color: var(--positive);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.analytics-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.analytics-card,
.analytics-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.analytics-card {
  padding: 14px 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.analytics-card-blue { border-left: 4px solid var(--accent-blue); }
.analytics-card-warning { border-left: 4px solid var(--warning); }
.analytics-card-danger { border-left: 4px solid var(--negative); }
.analytics-card-positive { border-left: 4px solid var(--positive); }

.analytics-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.analytics-value {
  color: var(--text-primary);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}

.analytics-sub {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 6px;
}

.analytics-section {
  padding: 14px 16px;
}

.analytics-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.analytics-section-title {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analytics-section-blue { border-top: 3px solid var(--accent-blue); }
.analytics-section-positive { border-top: 3px solid var(--positive); }

.analytics-kpi-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(127,127,127,0.12);
}

.analytics-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.analytics-row span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.analytics-row strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 720px) {
  .analytics-hero {
    flex-direction: column;
  }

  .analytics-hero-badges {
    justify-content: flex-start;
  }

  .analytics-grid,
  .analytics-detail-grid {
    grid-template-columns: 1fr;
  }

  .analytics-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .analytics-row strong {
    text-align: left;
  }
}


/* ========== THEME SYSTEM (3 editorial variants) ========== */

/* Light — clean slate + emerald accent */
[data-theme="editorial-light"] {
  --bg-primary: #f6f8fb;
  --bg-solid-primary: #f6f8fb;
  --bg-secondary: #eef2f7;
  --bg-tertiary: #e3eaf2;
  --bg-card: #ffffff;
  --bg-hover: #eef3f9;
  --bg-input: #ffffff;
  --border: #dde3ec;
  --border-light: #c7d1de;
  --text-primary: #0f1b2d;
  --text-secondary: #47566b;
  --text-muted: #8493a6;
  --accent: #0d9488;
  --accent-blue: #2563eb;
  --accent-cyan: #0891b2;
  --positive: #15803d;
  --negative: #dc2626;
  --warning: #c2740a;
  --itm-bg: rgba(220,38,38,0.06);
  --itm-border: rgba(220,38,38,0.20);
  --otm-bg: rgba(21,128,61,0.06);
  --otm-border: rgba(21,128,61,0.18);
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15,27,45,0.06), 0 10px 28px rgba(15,27,45,0.06);
  --ticker-bg: #ffffff;
  --ticker-border: #e2e8f0;
  --ticker-text: #334155;
  --ticker-up: #15803d;
  --ticker-down: #dc2626;
  --scrollbar-track: #eef2f7;
  --scrollbar-thumb: #c2cbd9;
  --toast-bg-success: rgba(21,128,61,0.10);
  --toast-border-success: rgba(21,128,61,0.28);
  --toast-bg-error: rgba(220,38,38,0.10);
  --toast-border-error: rgba(220,38,38,0.28);
  --toast-bg-info: rgba(37,99,235,0.10);
  --toast-border-info: rgba(37,99,235,0.26);
  --discovery-hover: #0d9488;
  --theme-switcher-bg: rgba(15,27,45,0.04);
  --theme-switcher-border: rgba(15,27,45,0.10);
  --theme-dot-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Dim — slate blue, easy on the eyes */
[data-theme="editorial-mid"] {
  --bg-primary: #1f2633;
  --bg-solid-primary: #1f2633;
  --bg-secondary: #262f3f;
  --bg-tertiary: #2f3a4d;
  --bg-card: #28313f;
  --bg-hover: #313c4e;
  --bg-input: #1c2330;
  --border: #3a4659;
  --border-light: #4b5870;
  --text-primary: #eef2f8;
  --text-secondary: #b3bfd0;
  --text-muted: #7e8da3;
  --accent: #2dd4bf;
  --accent-blue: #60a5fa;
  --accent-cyan: #22d3ee;
  --positive: #4ade80;
  --negative: #f87171;
  --warning: #fbbf24;
  --itm-bg: rgba(248,113,113,0.10);
  --itm-border: rgba(248,113,113,0.26);
  --otm-bg: rgba(74,222,128,0.08);
  --otm-border: rgba(74,222,128,0.22);
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.28);
  --ticker-bg: #1a212c;
  --ticker-border: #313c4e;
  --ticker-text: #cdd7e5;
  --ticker-up: #4ade80;
  --ticker-down: #f87171;
  --scrollbar-track: #1f2633;
  --scrollbar-thumb: #43506a;
  --toast-bg-success: rgba(74,222,128,0.12);
  --toast-border-success: rgba(74,222,128,0.30);
  --toast-bg-error: rgba(248,113,113,0.12);
  --toast-border-error: rgba(248,113,113,0.30);
  --toast-bg-info: rgba(96,165,250,0.12);
  --toast-border-info: rgba(96,165,250,0.28);
  --discovery-hover: #2dd4bf;
  --theme-switcher-bg: rgba(255,255,255,0.05);
  --theme-switcher-border: rgba(255,255,255,0.12);
  --theme-dot-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Dark — deep navy fintech, matches the landing */
[data-theme="editorial-dark"] {
  --bg-primary: #070b12;
  --bg-solid-primary: #070b12;
  --bg-secondary: #0c121c;
  --bg-tertiary: #121b27;
  --bg-card: #0e1622;
  --bg-hover: #16202e;
  --bg-input: #0b1019;
  --border: #1d2836;
  --border-light: #2b3a4d;
  --text-primary: #eaf1f8;
  --text-secondary: #9aa7ba;
  --text-muted: #687585;
  --accent: #34d399;
  --accent-blue: #38bdf8;
  --accent-cyan: #22d3ee;
  --positive: #34d399;
  --negative: #f87171;
  --warning: #fbbf24;
  --itm-bg: rgba(248,113,113,0.10);
  --itm-border: rgba(248,113,113,0.24);
  --otm-bg: rgba(52,211,153,0.08);
  --otm-border: rgba(52,211,153,0.20);
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 20px rgba(0,0,0,0.45);
  --ticker-bg: #0a0f17;
  --ticker-border: #1b2533;
  --ticker-text: #c7d2de;
  --ticker-up: #34d399;
  --ticker-down: #f87171;
  --scrollbar-track: #0a0f17;
  --scrollbar-thumb: #243240;
  --toast-bg-success: rgba(52,211,153,0.12);
  --toast-border-success: rgba(52,211,153,0.30);
  --toast-bg-error: rgba(248,113,113,0.12);
  --toast-border-error: rgba(248,113,113,0.30);
  --toast-bg-info: rgba(56,189,248,0.12);
  --toast-border-info: rgba(56,189,248,0.28);
  --discovery-hover: #34d399;
  --theme-switcher-bg: rgba(255,255,255,0.05);
  --theme-switcher-border: rgba(255,255,255,0.12);
  --theme-dot-shadow: 0 2px 8px rgba(0,0,0,0.40);
}

/* ========== THEME: BLOOMBERG (legacy) ========== */
[data-theme="bloomberg"] {
  --bg-primary: #111118;
  --bg-secondary: #1a1a24;
  --bg-tertiary: #222230;
  --bg-card: #1e1e2a;
  --bg-hover: #2a2a3a;
  --bg-input: #222230;
  --border: #2a2a3a;
  --border-light: #333348;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #5a5a70;
  --accent: #f7931e;
  --accent-blue: #2962ff;
  --accent-cyan: #00b4d8;
  --positive: #00c853;
  --negative: #ff1744;
  --warning: #ffab00;
  --itm-bg: rgba(255,23,68,0.08);
  --itm-border: rgba(255,23,68,0.3);
  --otm-bg: rgba(0,200,83,0.05);
  --otm-border: rgba(0,200,83,0.2);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --ticker-bg: #0a1628;
  --ticker-border: #1a2a4a;
  --ticker-text: #c0c0d0;
  --ticker-up: #00c853;
  --ticker-down: #ff1744;
  --scrollbar-track: #111118;
  --scrollbar-thumb: #333348;
  --toast-bg-success: rgba(0,200,83,0.15);
  --toast-border-success: rgba(0,200,83,0.3);
  --toast-bg-error: rgba(255,23,68,0.15);
  --toast-border-error: rgba(255,23,68,0.3);
  --toast-bg-info: rgba(41,98,255,0.15);
  --toast-border-info: rgba(41,98,255,0.3);
  --discovery-hover: #2962ff;
  --theme-switcher-bg: rgba(255,255,255,0.06);
  --theme-switcher-border: rgba(255,255,255,0.12);
  --theme-dot-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ========== THEME: CLEAN WHITE ========== */
[data-theme="clean-white"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e5e5eb;
  --bg-card: #ffffff;
  --bg-hover: #ececf2;
  --bg-input: #ffffff;
  --border: #d7d7df;
  --border-light: #c6c6d0;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #a1a1a6;
  --accent: #0071e3;
  --accent-blue: #0071e3;
  --accent-cyan: #0c7a93;
  --positive: #28cd41;
  --negative: #ff3b30;
  --warning: #ff9f0a;
  --itm-bg: rgba(255,59,48,0.05);
  --itm-border: rgba(255,59,48,0.25);
  --otm-bg: rgba(40,205,65,0.05);
  --otm-border: rgba(40,205,65,0.2);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --ticker-bg: #eef2f7;
  --ticker-border: #ccd5e0;
  --ticker-text: #1d1d1f;
  --ticker-up: #28cd41;
  --ticker-down: #ff3b30;
  --scrollbar-track: #f5f5f7;
  --scrollbar-thumb: #d0d0d8;
  --toast-bg-success: rgba(40,205,65,0.12);
  --toast-border-success: rgba(40,205,65,0.3);
  --toast-bg-error: rgba(255,59,48,0.1);
  --toast-border-error: rgba(255,59,48,0.3);
  --toast-bg-info: rgba(0,113,227,0.1);
  --toast-border-info: rgba(0,113,227,0.3);
  --discovery-hover: #0071e3;
  --theme-switcher-bg: rgba(0,0,0,0.04);
  --theme-switcher-border: rgba(0,0,0,0.08);
  --theme-dot-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ========== THEME: SOFT GRADIENT ========== */
[data-theme="soft-gradient"] {
  --bg-primary: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ee9ca7 100%);
  --bg-solid-primary: #f8e8e0;
  --bg-secondary: rgba(255,255,255,0.78);
  --bg-tertiary: rgba(255,255,255,0.62);
  --bg-card: rgba(255,255,255,0.72);
  --bg-hover: rgba(255,255,255,0.9);
  --bg-input: rgba(255,255,255,0.88);
  --border: rgba(255,255,255,0.66);
  --border-light: rgba(255,255,255,0.82);
  --text-primary: #3a2a2a;
  --text-secondary: #7a5a5a;
  --text-muted: #a08080;
  --accent: #e06050;
  --accent-blue: #5070c0;
  --accent-cyan: #4a8a8a;
  --positive: #3aaf5a;
  --negative: #e04040;
  --warning: #e0a030;
  --itm-bg: rgba(224,64,64,0.08);
  --itm-border: rgba(224,64,64,0.25);
  --otm-bg: rgba(58,175,90,0.08);
  --otm-border: rgba(58,175,90,0.2);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --ticker-bg: rgba(255,255,255,0.82);
  --ticker-border: rgba(224,160,120,0.28);
  --ticker-text: #3a2a2a;
  --ticker-up: #3aaf5a;
  --ticker-down: #e04040;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(255,255,255,0.5);
  --toast-bg-success: rgba(58,175,90,0.15);
  --toast-border-success: rgba(58,175,90,0.35);
  --toast-bg-error: rgba(224,64,64,0.12);
  --toast-border-error: rgba(224,64,64,0.3);
  --toast-bg-info: rgba(80,112,192,0.12);
  --toast-border-info: rgba(80,112,192,0.3);
  --discovery-hover: #5070c0;
  --theme-switcher-bg: rgba(255,255,255,0.5);
  --theme-switcher-border: rgba(255,255,255,0.7);
  --theme-dot-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ========== THEME: GLASSMORPHISM ========== */
[data-theme="glassmorphism"] {
  --bg-primary: #1a1a2e;
  --bg-solid-primary: #1a1a2e;
  --bg-secondary: rgba(255,255,255,0.05);
  --bg-tertiary: rgba(255,255,255,0.08);
  --bg-card: rgba(255,255,255,0.07);
  --bg-hover: rgba(255,255,255,0.12);
  --bg-input: rgba(255,255,255,0.1);
  --border: rgba(255,255,255,0.1);
  --border-light: rgba(255,255,255,0.18);
  --text-primary: #e8e8f8;
  --text-secondary: #9898b8;
  --text-muted: #6868a0;
  --accent: #a78bfa;
  --accent-blue: #60a5fa;
  --accent-cyan: #67e8f9;
  --positive: #34d399;
  --negative: #fb7185;
  --warning: #fbbf24;
  --itm-bg: rgba(251,113,133,0.08);
  --itm-border: rgba(251,113,133,0.3);
  --otm-bg: rgba(52,211,153,0.05);
  --otm-border: rgba(52,211,153,0.2);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.2);
  --ticker-bg: #0a1628;
  --ticker-border: #1a2a4a;
  --ticker-text: #e0e0e0;
  --ticker-up: #34d399;
  --ticker-down: #fb7185;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(255,255,255,0.2);
  --toast-bg-success: rgba(52,211,153,0.12);
  --toast-border-success: rgba(52,211,153,0.3);
  --toast-bg-error: rgba(251,113,133,0.12);
  --toast-border-error: rgba(251,113,133,0.3);
  --toast-bg-info: rgba(96,165,250,0.12);
  --toast-border-info: rgba(96,165,250,0.3);
  --discovery-hover: #a78bfa;
  --theme-switcher-bg: rgba(255,255,255,0.06);
  --theme-switcher-border: rgba(255,255,255,0.12);
  --theme-dot-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ========== THEME: NOTION ========== */
[data-theme="notion"] {
  --bg-primary: #ffffff;
  --bg-solid-primary: #ffffff;
  --bg-secondary: #f7f6f3;
  --bg-tertiary: #eceae6;
  --bg-card: #ffffff;
  --bg-hover: #f3f1ec;
  --bg-input: #fbfaf8;
  --border: #e1ddd6;
  --border-light: #cfc9bf;
  --text-primary: #37352f;
  --text-secondary: #6b6b6b;
  --text-muted: #9b9a97;
  --accent: #0f7b6c;
  --accent-blue: #2383e2;
  --accent-cyan: #0f7b6c;
  --positive: #0f7b6c;
  --negative: #e03e3e;
  --warning: #dfab01;
  --itm-bg: rgba(224,62,62,0.05);
  --itm-border: rgba(224,62,62,0.2);
  --otm-bg: rgba(15,123,108,0.05);
  --otm-border: rgba(15,123,108,0.2);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
  --ticker-bg: #f4f1ea;
  --ticker-border: #d8d1c6;
  --ticker-text: #37352f;
  --ticker-up: #0f7b6c;
  --ticker-down: #e03e3e;
  --scrollbar-track: #ffffff;
  --scrollbar-thumb: #d3d1cb;
  --toast-bg-success: rgba(15,123,108,0.1);
  --toast-border-success: rgba(15,123,108,0.3);
  --toast-bg-error: rgba(224,62,62,0.08);
  --toast-border-error: rgba(224,62,62,0.3);
  --toast-bg-info: rgba(35,131,226,0.08);
  --toast-border-info: rgba(35,131,226,0.3);
  --discovery-hover: #2383e2;
  --theme-switcher-bg: rgba(55,53,47,0.04);
  --theme-switcher-border: rgba(55,53,47,0.08);
  --theme-dot-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== THEME: LINEAR ========== */
[data-theme="linear"] {
  --bg-primary: #0a0a0b;
  --bg-solid-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-card: #111113;
  --bg-hover: #1e1e22;
  --bg-input: #18181b;
  --border: #27272a;
  --border-light: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --accent: #5b5bd6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --positive: #22c55e;
  --negative: #ef4444;
  --warning: #eab308;
  --itm-bg: rgba(239,68,68,0.06);
  --itm-border: rgba(239,68,68,0.25);
  --otm-bg: rgba(34,197,94,0.04);
  --otm-border: rgba(34,197,94,0.18);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.25);
  --ticker-bg: #0a1628;
  --ticker-border: #1a2a4a;
  --ticker-text: #e0e0e0;
  --ticker-up: #22c55e;
  --ticker-down: #ef4444;
  --scrollbar-track: #0a0a0b;
  --scrollbar-thumb: #27272a;
  --toast-bg-success: rgba(34,197,94,0.1);
  --toast-border-success: rgba(34,197,94,0.3);
  --toast-bg-error: rgba(239,68,68,0.1);
  --toast-border-error: rgba(239,68,68,0.3);
  --toast-bg-info: rgba(59,130,246,0.1);
  --toast-border-info: rgba(59,130,246,0.3);
  --discovery-hover: #5b5bd6;
  --theme-switcher-bg: rgba(255,255,255,0.04);
  --theme-switcher-border: rgba(255,255,255,0.08);
  --theme-dot-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
[data-theme="midnight-emerald"] {
  --bg-primary: #07120f;
  --bg-solid-primary: #07120f;
  --bg-secondary: #0c1713;
  --bg-tertiary: #12221d;
  --bg-card: #0e1c18;
  --bg-hover: #152822;
  --bg-input: #12221d;
  --border: #20352f;
  --border-light: #2d4a42;
  --text-primary: #ecfff7;
  --text-secondary: #9fc0b3;
  --text-muted: #5f8377;
  --accent: #2dd4bf;
  --accent-blue: #38bdf8;
  --accent-cyan: #5eead4;
  --positive: #22c55e;
  --negative: #fb7185;
  --warning: #fbbf24;
  --itm-bg: rgba(251,113,133,0.08);
  --itm-border: rgba(251,113,133,0.24);
  --otm-bg: rgba(34,197,94,0.05);
  --otm-border: rgba(34,197,94,0.18);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,0.22);
  --ticker-bg: #071b18;
  --ticker-border: #12332d;
  --ticker-text: #d7fff5;
  --ticker-up: #2dd4bf;
  --ticker-down: #fb7185;
  --scrollbar-track: #07120f;
  --scrollbar-thumb: #24433a;
  --toast-bg-success: rgba(45,212,191,0.12);
  --toast-border-success: rgba(45,212,191,0.3);
  --toast-bg-error: rgba(251,113,133,0.12);
  --toast-border-error: rgba(251,113,133,0.3);
  --toast-bg-info: rgba(56,189,248,0.12);
  --toast-border-info: rgba(56,189,248,0.3);
  --discovery-hover: #2dd4bf;
  --theme-switcher-bg: rgba(255,255,255,0.04);
  --theme-switcher-border: rgba(255,255,255,0.08);
  --theme-dot-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

[data-theme="paper-trading"] {
  --bg-primary: #f1ede4;
  --bg-solid-primary: #f1ede4;
  --bg-secondary: #f8f4ec;
  --bg-tertiary: #e2d8c8;
  --bg-card: #fffaf1;
  --bg-hover: #f5efe3;
  --bg-input: #fffaf1;
  --border: #d6c7b2;
  --border-light: #c3b198;
  --text-primary: #2f2a24;
  --text-secondary: #6d6257;
  --text-muted: #9a8f84;
  --accent: #c07a2e;
  --accent-blue: #3a78b8;
  --accent-cyan: #2f8f8b;
  --positive: #2e8b57;
  --negative: #b84b4b;
  --warning: #bd7b00;
  --itm-bg: rgba(184,75,75,0.08);
  --itm-border: rgba(184,75,75,0.22);
  --otm-bg: rgba(46,139,87,0.06);
  --otm-border: rgba(46,139,87,0.16);
  --font-mono: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --font-sans: 'Optima', 'Palatino', 'Georgia', serif;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(64,45,28,0.08);
  --ticker-bg: #f7f0e4;
  --ticker-border: #ceb995;
  --ticker-text: #4d4133;
  --ticker-up: #2e8b57;
  --ticker-down: #b84b4b;
  --scrollbar-track: #f1ede4;
  --scrollbar-thumb: #cbb89c;
  --toast-bg-success: rgba(46,139,87,0.12);
  --toast-border-success: rgba(46,139,87,0.3);
  --toast-bg-error: rgba(184,75,75,0.12);
  --toast-border-error: rgba(184,75,75,0.3);
  --toast-bg-info: rgba(58,120,184,0.12);
  --toast-border-info: rgba(58,120,184,0.3);
  --discovery-hover: #3a78b8;
  --theme-switcher-bg: rgba(0,0,0,0.04);
  --theme-switcher-border: rgba(0,0,0,0.08);
  --theme-dot-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

[data-theme="glassmorphism"] .app-layout {
  background: var(--bg-primary);
  position: relative;
}
[data-theme="glassmorphism"] .app-layout::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="glassmorphism"] .app-layout::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, rgba(96,165,250,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="glassmorphism"] .topbar,
[data-theme="glassmorphism"] .tabs-bar,
[data-theme="glassmorphism"] .kpi-strip,
[data-theme="glassmorphism"] .main-content,
[data-theme="glassmorphism"] .ticker-tape {
  position: relative;
  z-index: 1;
}

/* ===== SOFT GRADIENT BACKGROUND ===== */
[data-theme="soft-gradient"] .app-layout {
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ===== BASE STYLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg-solid-primary, var(--bg-primary));
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(247,147,30,0.06), transparent 18%),
    var(--bg-primary);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 20px;
  background: transparent;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-form {
  margin-bottom: 20px;
}

.stack-form-row {
  margin-bottom: 20px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== TOP BAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 56px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-brand,
.topbar-right {
  min-width: 0;
}

.topbar-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-time {
  white-space: nowrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: calc(var(--radius) * 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.topbar-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.topbar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

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

.topbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.topbar-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--theme-switcher-bg);
  border: 1px solid var(--theme-switcher-border);
  border-radius: calc(var(--radius) * 0.75);
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  box-shadow: var(--theme-dot-shadow);
  position: relative;
}

.theme-dot:hover {
  transform: scale(1.15);
}

.theme-dot.active {
  border-color: var(--text-primary);
  transform: scale(1.1);
}

.theme-dot-bloomberg { background: linear-gradient(135deg, #f7931e, #111118); }
.theme-dot-clean-white { background: linear-gradient(135deg, #ffffff, #0071e3); }
.theme-dot-soft-gradient { background: linear-gradient(135deg, #ff9a9e, #fad0c4); }
.theme-dot-glassmorphism { background: linear-gradient(135deg, #a78bfa, #60a5fa); }
.theme-dot-notion { background: linear-gradient(135deg, #37352f, #0f7b6c); }
.theme-dot-linear { background: linear-gradient(135deg, #5b5bd6, #0a0a0b); }

/* ===== TABS ===== */
.tabs-bar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  min-height: 44px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  border-bottom: 1px solid var(--border);
  gap: 4px;
  flex-shrink: 0;
  overflow-x: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tab {
  white-space: nowrap;
  border-radius: 999px 999px 0 0;
  margin-top: 4px;
}

.tab.active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.tab {
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== KPI STRIP ===== */
.kpi-strip {
  display: flex;
  align-items: stretch;
  padding: 12px 20px;
  gap: 12px;
  background: color-mix(in srgb, var(--bg-secondary) 86%, transparent);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.kpi-card {
  flex: 1;
  min-width: 150px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.kpi-card {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.kpi-card-clickable {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.kpi-card-button {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  background: var(--bg-card);
}
.kpi-card-clickable:hover,
.kpi-card-clickable:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(247,147,30,0.15);
  transform: translateY(-1px);
}
.kpi-card-clickable:active {
  transform: translateY(0);
}

.kpi-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.kpi-value.positive { color: var(--positive); }
.kpi-value.negative { color: var(--negative); }
.kpi-value.accent { color: var(--accent); }

.kpi-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background: transparent;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 6px 14px;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-danger {
  background: rgba(255,23,68,0.1);
  color: var(--negative);
  border-color: rgba(255,23,68,0.3);
}
.btn-danger:hover { background: rgba(255,23,68,0.2); }

.btn-sm { padding: 4px 10px; font-size: 11px; }

.positions-filter-bank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.position-filter-btn {
  min-height: 31px;
}

.position-filter-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ===== POSITION CARDS ===== */
.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.15s;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.position-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.position-card.itm {
  border-color: var(--itm-border);
  background: var(--itm-bg);
}

.position-card.otm {
  border-color: var(--otm-border);
}

.pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pos-ticker {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.pos-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pos-badge.csp { background: rgba(41,98,255,0.12); color: var(--accent-blue); }
.pos-badge.cc { background: rgba(247,147,30,0.12); color: var(--accent); }
.pos-badge.itm { background: var(--itm-bg); color: var(--negative); }
.pos-badge.otm { background: var(--otm-bg); color: var(--positive); }

.pos-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.pos-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-detail-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pos-detail-value {
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.pos-detail-value.positive { color: var(--positive); }
.pos-detail-value.negative { color: var(--negative); }

.pos-pnl-bar {
  margin-top: 10px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.pos-pnl-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

.pos-pnl-fill.positive { background: var(--positive); }
.pos-pnl-fill.negative { background: var(--negative); }

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 8px 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

.data-table .ticker-cell {
  color: var(--accent-cyan);
  font-weight: 600;
}

.data-table .positive { color: var(--positive); }
.data-table .negative { color: var(--negative); }

.brokerage-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scrollbar-gutter: stable both-edges;
}

.ledger-table.brokerage-positions-table {
  min-width: 1820px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.brokerage-positions-table .col-position { width: 340px; }
.brokerage-positions-table .col-qty { width: 70px; }
.brokerage-positions-table .col-mark { width: 84px; }
.brokerage-positions-table .col-mark-change { width: 92px; }
.brokerage-positions-table .col-trade-price { width: 92px; }
.brokerage-positions-table .col-percent { width: 92px; }
.brokerage-positions-table .col-money { width: 112px; }
.brokerage-positions-table .col-greek { width: 72px; }
.brokerage-positions-table .col-date { width: 82px; }
.brokerage-positions-table .col-dte { width: 58px; }
.brokerage-positions-table .col-actions { width: 190px; }

.ledger-table.brokerage-positions-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-strong, var(--border));
}

.ledger-table.brokerage-positions-table th,
.ledger-table.brokerage-positions-table td {
  padding: 8px 12px;
  text-align: right;
  vertical-align: middle;
  line-height: 1.35;
}

.ledger-table.brokerage-positions-table th:first-child,
.ledger-table.brokerage-positions-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-secondary);
  z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}

.ledger-table.brokerage-positions-table thead th:first-child {
  z-index: 3;
}

.ledger-table.brokerage-positions-table td:first-child {
  font-family: var(--font-sans);
}

.ledger-table.brokerage-positions-table .brokerage-metric,
.ledger-table.brokerage-positions-table .brokerage-actions {
  font-family: var(--font-mono);
  font-size: 13px;
}

.brokerage-row td {
  background: var(--bg-card);
}

.brokerage-row td:first-child {
  background: var(--bg-card);
}

.brokerage-row:hover td,
.brokerage-row:hover td:first-child {
  background: var(--bg-hover);
}

.brokerage-row.parent-row td {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.025);
}

.brokerage-row.parent-row td:first-child {
  background: color-mix(in srgb, var(--bg-secondary) 88%, var(--bg-card));
}

.brokerage-row.total-row {
  display: table-row;
}

.brokerage-row.total-row td {
  font-weight: 700;
  border-top: 1px solid var(--border-strong, var(--border));
  background: color-mix(in srgb, var(--bg-secondary) 84%, var(--bg-card));
}

.brokerage-row.cash-row td {
  background: rgba(255, 255, 255, 0.015);
}

.brokerage-row.cash-row td:first-child {
  background: color-mix(in srgb, var(--bg-card) 96%, var(--bg-secondary));
}

.positions-brokerage-position {
  min-width: 340px;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.child-position {
  padding-left: 24px !important;
  font-size: 13px;
}

.parent-position {
  font-size: 14px;
}

.quote-summary {
  margin-left: 6px;
  color: var(--text-muted);
  font-weight: 500;
}

.expand-dot,
.stock-triangle,
.option-triangle {
  display: inline-block;
  width: 16px;
  color: var(--accent-cyan);
}

.stock-triangle { color: var(--positive); }
.option-triangle { color: var(--accent-yellow, var(--text-muted)); }

.compact-badge {
  margin-left: 8px;
  padding: 1px 5px;
  font-size: 10px;
}

.quote-unavailable {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 10px;
}

.brokerage-actions {
  min-width: 190px;
}

.brokerage-action-buttons {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.modal-body { padding: 18px; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

/* ===== FORM ===== */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.5);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state-text {
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ===== LOADING ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 12px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: slideIn 0.2s ease;
}

.toast-success {
  background: var(--toast-bg-success);
  border: 1px solid var(--toast-border-success);
  color: var(--positive);
}
.toast-error {
  background: var(--toast-bg-error);
  border: 1px solid var(--toast-border-error);
  color: var(--negative);
}
.toast-info {
  background: var(--toast-bg-info);
  border: 1px solid var(--toast-border-info);
  color: var(--accent-blue);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== DISCOVERY GRID ===== */
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.discovery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.discovery-card:hover {
  border-color: var(--discovery-hover);
}

.discovery-ticker {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.discovery-metric {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 11px;
  font-family: var(--font-mono);
}

.discovery-metric-label { color: var(--text-muted); }
.discovery-metric-value { color: var(--text-primary); }

/* ===== HISTORY TABLE ===== */
.history-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

/* ===== TICKER TAPE (BOTTOM) ===== */
.ticker-tape {
  display: flex;
  align-items: center;
  height: 42px;
  background: var(--ticker-bg);
  border-top: 1px solid var(--ticker-border);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.ticker-market-state {
  flex-shrink: 0;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  min-width: 52px;
  text-align: center;
}

.ticker-pre-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #4da6ff;
  background: rgba(77, 166, 255, 0.15);
  border: 1px solid rgba(77, 166, 255, 0.3);
  border-radius: 3px;
  padding: 1px 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ticker-tape::before,
.ticker-tape::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.ticker-tape::before {
  left: 0;
  background: linear-gradient(to right, var(--ticker-bg), transparent);
}

.ticker-tape::after {
  right: 0;
  background: linear-gradient(to left, var(--ticker-bg), transparent);
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 20px;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ticker-text);
  flex-shrink: 0;
}

.ticker-item-symbol {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 17px;
}

.ticker-item-price {
  font-weight: 600;
  color: var(--ticker-text);
  font-size: 16px;
}

.ticker-item-change {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.ticker-item-change.up {
  color: var(--ticker-up);
  background: color-mix(in srgb, var(--ticker-up) 14%, transparent);
}

.ticker-item-change.down {
  color: var(--ticker-down);
  background: color-mix(in srgb, var(--ticker-down) 14%, transparent);
}

.ticker-item-change.flat {
  color: var(--text-muted);
}

.ticker-item-source {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
}

.ticker-separator {
  color: #4da6ff;
  opacity: 1;
  font-size: 10px;
  line-height: 1;
}

.ticker-add-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  margin-left: 16px;
}

.ticker-add-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent);
  color: #fff;
}

/* ===== TICKER ADD MODAL ===== */
.ticker-add-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  backdrop-filter: blur(3px);
}

.ticker-add-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.ticker-add-modal h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.ticker-add-modal input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.5);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.ticker-add-modal input:focus {
  border-color: var(--accent);
}

.ticker-add-modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .kpi-strip { flex-wrap: nowrap; }
  .positions-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .theme-switcher { gap: 4px; padding: 3px 6px; }
  .theme-dot { width: 14px; height: 14px; }
  .watchlist-grid { grid-template-columns: 1fr; }
  .topbar {
    min-height: 64px;
    padding: 10px 14px;
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tabs-bar,
  .kpi-strip,
  .main-content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== WATCHLIST TAB ===== */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.watchlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.15s;
}

.watchlist-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.watchlist-symbol {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-right: 8px;
}

.watchlist-category {
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
}

.watchlist-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.watchlist-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.watchlist-change {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
}

.watchlist-change.up {
  color: var(--ticker-up);
  background: color-mix(in srgb, var(--ticker-up) 15%, transparent);
}

.watchlist-change.down {
  color: var(--ticker-down);
  background: color-mix(in srgb, var(--ticker-down) 15%, transparent);
}

.watchlist-change.flat {
  color: var(--text-muted);
}

.watchlist-source {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ===== OPTIONS CHAIN TAB ===== */
.options-chain-tab {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.options-controls {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.options-ticker-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.options-ticker-input {
  flex: 1;
  max-width: 200px;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
}

.options-ticker-input:focus {
  outline: none;
  border-color: var(--accent);
}

.options-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.options-expiry-select {
  padding: 5px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
}

.options-range-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 8px;
}

.options-spot-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.options-data-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.4;
  max-width: 900px;
}

.options-error {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.3);
  border-radius: var(--radius);
  color: var(--negative);
  font-size: 12px;
}

.options-chain-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.options-type-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 0 8px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.options-type-tab {
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.15s;
  position: relative;
  bottom: -1px;
  min-width: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.options-type-tab-label {
  line-height: 1;
}

.options-type-tab-count {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  line-height: 1;
}

.options-type-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.options-type-tab.active {
  color: var(--bg-primary);
  background: var(--accent);
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  box-shadow: 0 -1px 0 var(--accent), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.quote-quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.quote-quality-good {
  background: color-mix(in srgb, var(--positive) 14%, transparent);
  color: var(--positive);
  border-color: color-mix(in srgb, var(--positive) 28%, transparent);
}

.quote-quality-wide {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}

.quote-quality-stale {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 34%, transparent);
}

.quote-quality-crossed,
.quote-quality-bid_only,
.quote-quality-ask_only,
.quote-quality-no_quote,
.quote-quality-stale_trade,
.quote-quality-last_only {
  background: color-mix(in srgb, var(--negative) 12%, transparent);
  color: var(--negative);
  border-color: color-mix(in srgb, var(--negative) 28%, transparent);
}

.quote-quality-crossed {
  background: rgba(255, 89, 89, 0.14);
}

.options-table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

.options-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  table-layout: fixed;
}

.options-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.options-table th {
  padding: 8px 4px;
  text-align: right;
  background: var(--bg-tertiary);
  color: #c0c0d0;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.options-table th:first-child {
  text-align: left;
  padding-left: 8px;
  width: 60px;
}

.options-table th:last-child {
  padding-right: 8px;
  width: 40px;
}

.options-table td {
  padding: 6px 4px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
  overflow: hidden;
  text-overflow: ellipsis;
}

.options-table td:first-child {
  text-align: left;
  padding-left: 8px;
}

.options-table td:last-child {
  padding-right: 8px;
}

.options-row:hover td {
  background: var(--bg-hover);
}

.options-row.selected td {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-hover));
}

.options-row.itm td {
  background: color-mix(in srgb, var(--positive) 5%, transparent);
}

.options-row.itm:hover td {
  background: color-mix(in srgb, var(--positive) 10%, var(--bg-hover));
}

.strike-cell {
  font-weight: 600;
  color: var(--accent-cyan);
}

.options-table-contracts th:first-child {
  width: 240px;
}

.contract-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contract-cell strong {
  color: var(--text-primary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-cell span {
  color: #c0c0d0;
  font-size: 10px;
}

.options-add-btn {
  padding: 2px 8px;
  font-size: 10px;
}

.options-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ===== ADD POSITION FROM CHAIN MODAL ===== */
.options-add-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.options-add-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 480px;
  max-width: 90vw;
  box-shadow: var(--shadow);
}

.options-add-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.options-add-header h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.options-add-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input {
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-static-value {
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.form-hint {
  color: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-sans);
}

.options-add-totals {
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.options-add-totals .total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.options-add-totals .total-row strong {
  color: var(--text-primary);
}

/* ---- Ticker Memory Dropdown ---- */
.ticker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ticker-dropdown-label {
  padding: 6px 12px 4px;
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.ticker-dropdown-item {
  width: 100%;
  display: block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: 0;
  transition: background 0.1s;
}

.ticker-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.ticker-dropdown-meta {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.options-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---- Settings Tab ---- */
.settings-tab {
  max-width: 800px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-card-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: calc(var(--radius) * 0.75);
}

.settings-card-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-toggle-group {
  display: flex;
  gap: 10px;
}

.settings-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.settings-toggle-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.settings-toggle-btn.active {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.settings-toggle-btn .toggle-icon {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-toggle-btn.active .toggle-icon {
  color: var(--accent);
}

.toggle-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  appearance: auto;
  font-weight: 600;
}

.settings-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.settings-select optgroup {
  color: var(--text-primary);
  font-weight: 700;
}

.settings-select:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-current-tz {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.settings-about {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-about-row:last-child {
  border-bottom: none;
}

.settings-about-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

/* ---- Ledger Table ---- */
.view-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

/* ===== LEDGER ===== */
.ledger-networth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.ledger-networth-main {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.ledger-networth-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.ledger-networth-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ledger-networth-breakdown {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.ledger-networth-item {
  display: flex;
  flex-direction: column;
}

.ledger-networth-item-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ledger-networth-item-value {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.ledger-filters {
  display: flex;
  gap: 6px;
}

.ledger-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ledger-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.ledger-table thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
}

.ledger-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ledger-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-table tbody tr:hover {
  background: var(--bg-hover);
}

.ledger-table tbody tr:last-child td {
  border-bottom: none;
}

.ledger-col-date { width: 110px; }
.ledger-col-type { width: 100px; }
.ledger-col-desc { width: auto; }
.ledger-col-amount { width: 110px; text-align: right; }
.ledger-col-balance { width: 110px; text-align: right; }
.ledger-col-action { width: 50px; text-align: center; }

.ledger-table td.ledger-col-amount,
.ledger-table td.ledger-col-balance {
  text-align: right;
}

.ledger-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ledger-type-deposit {
  background: rgba(0,200,83,0.12);
  color: var(--positive);
}

.ledger-type-withdrawal {
  background: rgba(255,23,68,0.12);
  color: var(--negative);
}

.ledger-type-trade {
  background: rgba(41,98,255,0.12);
  color: var(--accent-blue);
}

.ledger-delete-btn {
  padding: 2px 6px;
  font-size: 11px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.ledger-delete-btn:hover {
  opacity: 1;
}

/* Theme-specific type badge overrides for non-bloomberg themes */
[data-theme="clean-white"] .ledger-type-deposit {
  background: rgba(40,205,65,0.1);
  color: #28cd41;
}
[data-theme="clean-white"] .ledger-type-withdrawal {
  background: rgba(255,59,48,0.1);
  color: #ff3b30;
}
[data-theme="clean-white"] .ledger-type-trade {
  background: rgba(0,113,227,0.1);
  color: #0071e3;
}

[data-theme="soft-gradient"] .ledger-type-deposit {
  background: rgba(58,175,90,0.12);
  color: #3aaf5a;
}
[data-theme="soft-gradient"] .ledger-type-withdrawal {
  background: rgba(224,64,64,0.12);
  color: #e04040;
}
[data-theme="soft-gradient"] .ledger-type-trade {
  background: rgba(80,112,192,0.12);
  color: #5070c0;
}

[data-theme="glassmorphism"] .ledger-type-deposit {
  background: rgba(52,211,153,0.12);
  color: #34d399;
}
[data-theme="glassmorphism"] .ledger-type-withdrawal {
  background: rgba(251,113,133,0.12);
  color: #fb7185;
}
[data-theme="glassmorphism"] .ledger-type-trade {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
}

[data-theme="notion"] .ledger-type-deposit {
  background: rgba(15,123,108,0.08);
  color: #0f7b6c;
}
[data-theme="notion"] .ledger-type-withdrawal {
  background: rgba(224,62,62,0.08);
  color: #e03e3e;
}
[data-theme="notion"] .ledger-type-trade {
  background: rgba(35,131,226,0.08);
  color: #2383e2;
}

[data-theme="linear"] .ledger-type-deposit {
  background: rgba(34,197,94,0.1);
  color: #22c55e;
}
[data-theme="linear"] .ledger-type-withdrawal {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}
[data-theme="linear"] .ledger-type-trade {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}

/* ===== LEDGER TYPE BUTTONS (modal) ===== */
.ledger-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ledger-type-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.ledger-type-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.ledger-type-btn.active {
  border-color: var(--accent);
  background: rgba(41,98,255,0.1);
  color: var(--accent);
}

/* ===== LEDGER STOCK FORM ===== */
.ledger-total-preview {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-align: right;
}

/* ===== LEDGER TYPE BADGES (new types) ===== */
.ledger-type-deposit-cash {
  background: rgba(0,200,83,0.12);
  color: var(--positive);
}
.ledger-type-withdraw-cash {
  background: rgba(255,23,68,0.12);
  color: var(--negative);
}
.ledger-type-stock-purchase {
  background: rgba(41,98,255,0.12);
  color: var(--accent-blue);
}
.ledger-type-stock-sell {
  background: rgba(255,152,0,0.12);
  color: #ff9800;
}

/* Theme overrides for new badge types */
[data-theme="clean-white"] .ledger-type-deposit-cash { background: rgba(40,205,65,0.1); color: #28cd41; }
[data-theme="clean-white"] .ledger-type-withdraw-cash { background: rgba(255,59,48,0.1); color: #ff3b30; }
[data-theme="clean-white"] .ledger-type-stock-purchase { background: rgba(0,113,227,0.1); color: #0071e3; }
[data-theme="clean-white"] .ledger-type-stock-sell { background: rgba(255,149,0,0.1); color: #ff9500; }

[data-theme="soft-gradient"] .ledger-type-deposit-cash { background: rgba(58,175,90,0.12); color: #3aaf5a; }
[data-theme="soft-gradient"] .ledger-type-withdraw-cash { background: rgba(224,64,64,0.12); color: #e04040; }
[data-theme="soft-gradient"] .ledger-type-stock-purchase { background: rgba(80,112,192,0.12); color: #5070c0; }
[data-theme="soft-gradient"] .ledger-type-stock-sell { background: rgba(224,128,32,0.12); color: #e08020; }

[data-theme="glassmorphism"] .ledger-type-deposit-cash { background: rgba(52,211,153,0.12); color: #34d399; }
[data-theme="glassmorphism"] .ledger-type-withdraw-cash { background: rgba(251,113,133,0.12); color: #fb7185; }
[data-theme="glassmorphism"] .ledger-type-stock-purchase { background: rgba(96,165,250,0.12); color: #60a5fa; }
[data-theme="glassmorphism"] .ledger-type-stock-sell { background: rgba(251,191,36,0.12); color: #fbbf24; }

[data-theme="notion"] .ledger-type-deposit-cash { background: rgba(15,123,108,0.08); color: #0f7b6c; }
[data-theme="notion"] .ledger-type-withdraw-cash { background: rgba(224,62,62,0.08); color: #e03e3e; }
[data-theme="notion"] .ledger-type-stock-purchase { background: rgba(35,131,226,0.08); color: #2383e2; }
[data-theme="notion"] .ledger-type-stock-sell { background: rgba(217,119,6,0.08); color: #d97706; }

[data-theme="linear"] .ledger-type-deposit-cash { background: rgba(34,197,94,0.1); color: #22c55e; }
[data-theme="linear"] .ledger-type-withdraw-cash { background: rgba(239,68,68,0.1); color: #ef4444; }
[data-theme="linear"] .ledger-type-stock-purchase { background: rgba(59,130,246,0.1); color: #3b82f6; }
[data-theme="linear"] .ledger-type-stock-sell { background: rgba(249,115,22,0.1); color: #f97316; }

/* ===== Editorial Glass landing page ===== */
.landing-page {
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 32%),
    radial-gradient(circle at 82% 10%, rgba(255, 216, 177, 0.45), transparent 28%),
    linear-gradient(180deg, #fbf7f0 0%, #f6f1e8 48%, #f4eee4 100%);
  color: #1f1b17;
}

.landing-page a {
  color: inherit;
}

.landing-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
}

.landing-nav {
  max-width: 1220px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.landing-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(76, 113, 255, 0.18), rgba(51, 192, 120, 0.14));
  border: 1px solid rgba(117, 92, 64, 0.12);
  box-shadow: 0 16px 34px rgba(77, 54, 33, 0.08);
  color: #1f1b17;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand strong {
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.landing-brand small {
  color: rgba(31, 27, 23, 0.6);
  margin-top: 2px;
  font-size: 0.78rem;
}

.landing-nav-links {
  display: inline-flex;
  gap: 16px;
  align-items: center;
}

.landing-nav-cta {
  display: inline-flex;
  align-items: center;
}

.landing-nav-links a {
  text-decoration: none;
  color: rgba(31, 27, 23, 0.72);
  font-size: 0.92rem;
  font-weight: 700;
}

.landing-nav-links a:hover {
  color: #1f1b17;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 22px;
  padding: 28px;
  border-color: rgba(110, 82, 52, 0.1);
  box-shadow: 0 24px 70px rgba(76, 56, 34, 0.08);
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(16px) saturate(160%);
}

.landing-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(117, 92, 64, 0.1);
  color: rgba(71, 46, 24, 0.84);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.landing-hero h1 {
  margin: 0;
  max-width: 10.2ch;
  color: #17120f;
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.landing-lede,
.landing-trust p,
.landing-final-band p,
.landing-auth-copy,
.landing-value-card p {
  margin: 0;
  color: rgba(31, 27, 23, 0.68);
  line-height: 1.7;
  font-size: 0.98rem;
}

.landing-cta-row,
.landing-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.landing-auth-btn {
  min-width: 160px;
  justify-content: center;
}

.landing-auth-btn--secondary {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(117, 92, 64, 0.14);
}

.landing-auth-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.landing-trust-row span,
.landing-trust-pills span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(117, 92, 64, 0.1);
  color: rgba(31, 27, 23, 0.68);
  font-size: 0.8rem;
  font-weight: 700;
}

.landing-hero-aside {
  display: flex;
  align-items: stretch;
}

.landing-glass-shell {
  position: relative;
  width: 100%;
  min-height: 100%;
}

.landing-glass-frame {
  position: relative;
  height: 100%;
  min-height: 520px;
  padding: 18px;
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(224, 208, 190, 0.16));
  border: 1px solid rgba(117, 92, 64, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 28px 60px rgba(77, 54, 33, 0.12);
  backdrop-filter: blur(18px) saturate(170%);
  overflow: hidden;
}

.landing-glass-frame::before {
  content: '';
  position: absolute;
  inset: 18% -10% auto auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 195, 152, 0.42), transparent 72%);
  filter: blur(12px);
}

.landing-glass-topline {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.landing-glass-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(31, 27, 23, 0.18);
}

.landing-glass-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.landing-glass-value {
  margin-top: 6px;
  color: #18130f;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.landing-glass-caption,
.landing-glass-meta {
  margin-top: 6px;
  color: rgba(31, 27, 23, 0.62);
  font-size: 0.84rem;
}

.landing-glass-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(117, 92, 64, 0.1);
  color: #5b3d22;
  font-size: 0.8rem;
  font-weight: 800;
}

.landing-glass-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-glass-card {
  position: relative;
  min-height: 124px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(117, 92, 64, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.landing-glass-card--wide {
  grid-column: span 2;
}

.landing-glass-card--soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(247, 238, 228, 0.5));
}

.landing-glass-card-label,
.landing-value-eyebrow {
  color: rgba(86, 62, 42, 0.72);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.landing-glass-card-value {
  margin-top: 10px;
  color: #15100d;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.landing-glass-bar-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 82px;
  margin-top: 12px;
}

.landing-glass-bar-row span {
  display: block;
  height: 100%;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, rgba(192, 142, 102, 0.9), rgba(144, 103, 73, 0.55));
}

.landing-glass-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: rgba(31, 27, 23, 0.76);
  font-size: 0.92rem;
}

.landing-glass-list span::before {
  content: '•';
  margin-right: 8px;
  color: rgba(122, 84, 52, 0.72);
}

.landing-glass-floater {
  position: absolute;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(117, 92, 64, 0.12);
  box-shadow: 0 18px 34px rgba(77, 54, 33, 0.1);
  color: rgba(31, 27, 23, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.landing-glass-floater--top {
  top: -14px;
  right: 18px;
}

.landing-glass-floater--bottom {
  left: 16px;
  bottom: -14px;
}

.landing-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-value-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(117, 92, 64, 0.1);
}

.landing-value-title {
  margin-top: 10px;
  color: #191410;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.landing-trust,
.landing-final-band,
.landing-auth-panel {
  padding: 20px;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(117, 92, 64, 0.1);
  box-shadow: 0 16px 42px rgba(77, 54, 33, 0.06);
}

.landing-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-trust-title,
.landing-final-band h2 {
  margin: 0;
  color: #17120f;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.landing-trust-copy {
  max-width: 680px;
}

.landing-trust-copy p,
.landing-final-band p {
  margin-top: 8px;
}

.landing-trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.landing-final-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-auth-panel {
  display: grid;
  gap: 14px;
}

.landing-auth-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.landing-auth-title {
  margin: 4px 0 0;
  color: #17120f;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.landing-auth-copy {
  max-width: 600px;
}

.landing-auth-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.landing-auth-tab {
  border: 1px solid rgba(117, 92, 64, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: rgba(31, 27, 23, 0.72);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.landing-auth-tab.is-active {
  border-color: rgba(103, 69, 36, 0.18);
  color: #17120f;
  background: rgba(247, 238, 228, 0.92);
}

.landing-auth-form {
  display: grid;
  gap: 12px;
}

.landing-auth-field {
  display: grid;
  gap: 6px;
}

.landing-auth-label {
  color: rgba(86, 62, 42, 0.72);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}


.landing-auth-submit {
  width: 100%;
}

.landing-auth-rail {
  display: grid;
  gap: 10px;
}

.landing-auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(86, 62, 42, 0.72);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.landing-auth-divider::before,
.landing-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(117, 92, 64, 0.14);
}

.landing-auth-divider::before { margin-right: 10px; }
.landing-auth-divider::after { margin-left: 10px; }

.landing-auth-google-note {
  padding: 10px 0 2px;
}

.landing-auth-error {
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(184, 72, 72, 0.16);
  background: rgba(255, 244, 244, 0.82);
  color: #9f2f2f;
  font-size: 0.9rem;
}

@media (max-width: 1040px) {
  .landing-hero,
  .landing-trust,
  .landing-final-band,
  .landing-auth-panel,
  .landing-nav {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .landing-values {
    grid-template-columns: 1fr;
  }

  .landing-auth-panel-top,
  .landing-trust,
  .landing-final-band,
  .landing-nav {
    align-items: flex-start;
  }

  .landing-nav-links,
  .landing-auth-tabs,
  .landing-trust-pills,
  .landing-final-actions,
  .landing-cta-row,
  .landing-trust-row {
    justify-content: flex-start;
  }

  .landing-hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 720px) {
  .landing-page {
    padding: 14px;
  }

  .landing-nav,
  .landing-hero,
  .landing-auth-panel,
  .landing-trust,
  .landing-final-band {
    padding: 18px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-glass-frame {
    min-height: 460px;
    padding: 14px;
  }

  .landing-glass-grid {
    grid-template-columns: 1fr;
  }

  .landing-glass-card--wide {
    grid-column: span 1;
  }

  .landing-brand small {
    display: none;
  }
}
