/* ============================================
   GET YOUR MONEY RIGHT — Main Stylesheet
   Aesthetic: Dark-anchored financial precision
   ============================================ */

/* ── Midnight Blue theme ── */
html[data-theme="midnight"] {
  --bg:           #0D0F14;
  --bg-panel:     #14171F;
  --bg-elevated:  #1C2030;
  --border:       #252A38;
  --border-light: #2E3448;
  --text-primary: #F0F2FA;
  --text-secondary:#9DA6C4;
  --text-muted:   #6A7290;
  --accent:       #4F9CF9;
  --accent-rgb:   79,156,249;
  --accent-glow:  rgba(79,156,249,0.15);
  --green:        #22D3A5;
  --green-rgb:    34,211,165;
  --green-bg:     rgba(34,211,165,0.1);
  --red:          #F55F7B;
  --red-rgb:      245,95,123;
  --red-bg:       rgba(245,95,123,0.1);
  --amber:        #F5A623;
  --amber-rgb:    245,166,35;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Emerald theme ── */
html[data-theme="emerald"] {
  --bg:           #080F0E;
  --bg-panel:     #0D1A18;
  --bg-elevated:  #142420;
  --border:       #1E3530;
  --border-light: #284840;
  --text-primary: #E8F5F2;
  --text-secondary:#82BFB0;
  --text-muted:   #4E7E74;
  --accent:       #10D9A0;
  --accent-rgb:   16,217,160;
  --accent-glow:  rgba(16,217,160,0.15);
  --green:        #10D9A0;
  --green-rgb:    16,217,160;
  --green-bg:     rgba(16,217,160,0.1);
  --red:          #FF6B8A;
  --red-rgb:      255,107,138;
  --red-bg:       rgba(255,107,138,0.1);
  --amber:        #F5C842;
  --amber-rgb:    245,200,66;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Rose Gold theme ── */
html[data-theme="rose"] {
  --bg:           #120D0F;
  --bg-panel:     #1C1215;
  --bg-elevated:  #261820;
  --border:       #35202A;
  --border-light: #452A38;
  --text-primary: #F5EEF0;
  --text-secondary:#B8909A;
  --text-muted:   #7A5E68;
  --accent:       #F07898;
  --accent-rgb:   240,120,152;
  --accent-glow:  rgba(240,120,152,0.15);
  --green:        #52D4A0;
  --green-rgb:    82,212,160;
  --green-bg:     rgba(82,212,160,0.1);
  --red:          #F07070;
  --red-rgb:      240,112,112;
  --red-bg:       rgba(240,112,112,0.1);
  --amber:        #F5B860;
  --amber-rgb:    245,184,96;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Storm (purple) theme ── */
html[data-theme="storm"] {
  --bg:           #0C0B12;
  --bg-panel:     #12111C;
  --bg-elevated:  #1A1828;
  --border:       #252236;
  --border-light: #302D48;
  --text-primary: #EEECFA;
  --text-secondary:#9E96C4;
  --text-muted:   #6A6088;
  --accent:       #9D7FEA;
  --accent-rgb:   157,127,234;
  --accent-glow:  rgba(157,127,234,0.15);
  --green:        #4DCEA8;
  --green-rgb:    77,206,168;
  --green-bg:     rgba(77,206,168,0.1);
  --red:          #F06080;
  --red-rgb:      240,96,128;
  --red-bg:       rgba(240,96,128,0.1);
  --amber:        #E8B84B;
  --amber-rgb:    232,184,75;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Slate (lighter dark) theme ── */
html[data-theme="slate"] {
  --bg:           #1A1D24;
  --bg-panel:     #22262F;
  --bg-elevated:  #2C3040;
  --border:       #363C50;
  --border-light: #424860;
  --text-primary: #F2F4FA;
  --text-secondary:#A4ACCC;
  --text-muted:   #787F9A;
  --accent:       #5B9CF6;
  --accent-rgb:   91,156,246;
  --accent-glow:  rgba(91,156,246,0.15);
  --green:        #2ED4A8;
  --green-rgb:    46,212,168;
  --green-bg:     rgba(46,212,168,0.1);
  --red:          #F0607A;
  --red-rgb:      240,96,122;
  --red-bg:       rgba(240,96,122,0.1);
  --amber:        #F0A840;
  --amber-rgb:    240,168,64;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Cloud (light) theme ── */
html[data-theme="cloud"] {
  --bg:           #EEF2F8;
  --bg-panel:     #FFFFFF;
  --bg-elevated:  #E4EAF4;
  --border:       #D0D8EC;
  --border-light: #B8C4DE;
  --text-primary: #141828;
  --text-secondary:#4A5472;
  --text-muted:   #8490B0;
  --accent:       #3B7DD8;
  --accent-rgb:   59,125,216;
  --accent-glow:  rgba(59,125,216,0.12);
  --green:        #18A87A;
  --green-rgb:    24,168,122;
  --green-bg:     rgba(24,168,122,0.1);
  --red:          #D94060;
  --red-rgb:      217,64,96;
  --red-bg:       rgba(217,64,96,0.1);
  --amber:        #C07808;
  --amber-rgb:    192,120,8;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

/* ── Linen (warm light) theme — default ── */
html[data-theme="linen"] {
  --bg:           #F5F0E8;
  --bg-panel:     #FDFBF7;
  --bg-elevated:  #EDE6DA;
  --border:       #D8D0C4;
  --border-light: #C8BEB0;
  --text-primary: #1C1810;
  --text-secondary:#5A5044;
  --text-muted:   #948880;
  --accent:       #B05830;
  --accent-rgb:   176,88,48;
  --accent-glow:  rgba(176,88,48,0.12);
  --green:        #2A8C68;
  --green-rgb:    42,140,104;
  --green-bg:     rgba(42,140,104,0.1);
  --red:          #C04040;
  --red-rgb:      192,64,64;
  --red-bg:       rgba(192,64,64,0.1);
  --amber:        #A06818;
  --amber-rgb:    160,104,24;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --sidebar-w:    240px;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-panel); /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--bg-panel) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-cta--nav {
  padding: 10px 22px; font-size: 0.88rem;
  box-shadow: none;
}
.btn-cta--nav:hover { box-shadow: none; transform: none; }

/* Smooth in-page anchor scrolling, offset for the sticky nav */
html { scroll-behavior: smooth; }
.features-section, .hiw-section, .pricing-section { scroll-margin-top: 84px; }

.nav-brand, .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 36px; height: 36px;
  background: #0D1B2A;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.btn-signin {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  white-space: nowrap;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  background: var(--bg-panel);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-signin:hover { background: var(--bg-elevated); border-color: var(--accent); color: var(--text-primary); }

/* Hero */
.hero-section {
  padding: 80px 48px 120px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
  border: 1px solid rgba(var(--accent-rgb),0.3);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.headline-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtext {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px;
  white-space: nowrap;
  background: var(--accent);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 0 40px rgba(var(--accent-rgb),0.3);
  transition: all 0.2s;
}
.btn-cta:hover { filter: brightness(0.88); transform: translateY(-2px); box-shadow: 0 0 60px var(--accent-glow); color: white; }

.cta-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Hero floating cards */
.hero-cards {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.stat-card {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  min-width: 160px;
  text-align: left;
  border: 1px solid var(--border);
}

.card-blue   { background: var(--accent-glow); border-color: var(--accent); }
.card-dark   { background: var(--bg-elevated); transform: scale(1.08); z-index: 2; }
.card-green  { background: var(--green-bg); border-color: var(--green); }

.stat-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.stat-trend { font-size: 0.8rem; margin-top: 8px; }
.stat-trend.up { color: var(--green); }
.stat-trend.neutral { color: var(--amber); }
.stat-bar { height: 4px; background: var(--border); border-radius: 4px; margin-top: 12px; }
.stat-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 4px; }
.stat-spark { display: block; width: 100%; height: 26px; margin-top: 10px; overflow: visible; }

/* Trust strip — hero-level differentiator */
.trust-strip {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
}
.trust-item i { color: var(--green); font-size: 0.95rem; }

/* Hero product preview — CSS dashboard mockup in a browser frame */
.hero-preview { margin-top: 56px; position: relative; }

.app-frame {
  max-width: 760px; margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  text-align: left;
}
.app-frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.af-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-light); }
.af-url {
  margin-left: 12px; flex: 1; max-width: 340px;
  font-size: 0.68rem; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 50px; padding: 3px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-frame-body { display: flex; min-height: 300px; }
.af-sidebar {
  width: 120px; flex-shrink: 0;
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.af-nav-item { height: 9px; border-radius: 5px; background: var(--bg-elevated); width: 85%; }
.af-nav-item.active { background: var(--accent-glow); border: 1px solid rgba(var(--accent-rgb),0.35); width: 100%; }
.af-main { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.af-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.af-kpi {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.af-kpi-label { font-size: 0.58rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.af-kpi-value { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--text-primary); }
.af-chart {
  flex: 1; min-height: 110px;
  display: flex; align-items: flex-end; gap: 6px;
  padding: 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.af-bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 8px; }
.af-bar.in  { background: rgba(var(--green-rgb),0.55); }
.af-bar.out { background: rgba(var(--accent-rgb),0.45); }
.af-rows { display: flex; flex-direction: column; gap: 8px; }
.af-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.af-row-bar { height: 8px; border-radius: 5px; background: var(--bg-elevated); }
.af-row-amt { width: 44px; height: 8px; border-radius: 5px; background: rgba(var(--green-rgb),0.3); flex-shrink: 0; }

/* Stat cards float over the bottom edge of the frame */
.hero-preview .hero-cards { margin-top: -42px; position: relative; z-index: 2; }
.hero-preview .stat-card { box-shadow: 0 12px 32px -12px rgba(0,0,0,0.22); background-color: var(--bg-panel); }
.hero-preview .card-blue  { background-image: linear-gradient(0deg, var(--accent-glow), var(--accent-glow)); }
.hero-preview .card-green { background-image: linear-gradient(0deg, var(--green-bg), var(--green-bg)); }
.hero-preview .card-dark  { background-color: var(--bg-elevated); }

@media (max-width: 640px) {
  .af-sidebar { display: none; }
  .af-kpis { grid-template-columns: repeat(2, 1fr); }
  .hero-preview .hero-cards { margin-top: 16px; }
}

/* Small CTA + footnotes (replaces inline styles) */
.btn-cta--sm { font-size: 0.95rem; padding: 14px 32px; }
.cta-footnote { margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); }
.pricing-secure-note { font-size: .8rem; color: var(--text-muted); }
.feat-soon { opacity: .5; font-size: .75rem; }
.btn-plan--disabled { pointer-events: none; opacity: .7; }
.pricing-billed-note { font-size: .74rem; color: var(--green); margin: -4px 0 0; }

/* Footer link row */
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer-links a {
  font-size: 0.82rem; color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* Features */
.features-section, .pricing-section {
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center; color: var(--text-secondary);
  font-size: .95rem; margin-bottom: 36px;
}

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

.feature-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s;
  position: relative;
}
.feature-item:hover { border-color: var(--border-light); }

.feature-icon { font-size: 1.8rem; color: var(--accent); margin-bottom: 14px; }
.feature-item h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-item p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

.feature-tag { position: absolute; top: 20px; right: 20px; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; letter-spacing: 0.05em; text-transform: uppercase; }
.feature-tag.free { background: var(--green-bg); color: var(--green); border: 1px solid rgba(var(--green-rgb),0.3); }
.feature-tag.pro  { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),0.3); }
.feature-tag.premium { background: rgba(var(--amber-rgb),0.12); color: var(--amber); border: 1px solid rgba(var(--amber-rgb),0.3); }

/* Pricing — shared by landing page and /pricing app page */

.btn-plan {
  display: block; width: 100%; text-align: center;
  padding: 13px; border-radius: var(--radius-md);
  font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.btn-plan.outline { border: 1px solid var(--border-light); color: var(--text-primary); }
.btn-plan.outline:hover { background: var(--bg-elevated); }
.btn-plan.solid { background: var(--accent); color: white; }
.btn-plan.solid:hover { filter: brightness(0.88); }

/* Footer */
.landing-footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-copy a.footer-cho-link { color: var(--text-muted); text-underline-offset: 3px; }
.footer-copy a.footer-cho-link:hover { color: var(--text-primary); }
.footer-product-of { font-size: 0.75rem; color: var(--text-muted); opacity: 0.7; margin-top: -4px; }

/* Logo images — theme-aware switching */
.sidebar-logo {
  display: block;
  height: auto;
}
.sidebar-logo-light { display: none; max-width: 190px; }
.sidebar-logo-dark  { display: block; max-width: 190px; }
/* Light themes: swap */
[data-theme="cloud"] .sidebar-logo-dark,
[data-theme="linen"] .sidebar-logo-dark  { display: none; }
[data-theme="cloud"] .sidebar-logo-light,
[data-theme="linen"] .sidebar-logo-light { display: block; }

/* Landing nav logos */
.landing-logo         { width: auto; display: none; }
.landing-logo-light   { display: none;  height: 52px; }
.landing-logo-dark    { display: block; height: 52px; }
[data-theme="cloud"] .landing-logo-dark,
[data-theme="linen"] .landing-logo-dark  { display: none; }
[data-theme="cloud"] .landing-logo-light,
[data-theme="linen"] .landing-logo-light { display: block; }

.mobile-brand-icon { height: 30px; width: auto; border-radius: 6px; }
.mobile-topbar-logo { height: 28px; width: auto; display: none; }
.mobile-topbar-logo-dark  { display: block; }
.mobile-topbar-logo-light { display: none; }
[data-theme="cloud"] .mobile-topbar-logo-dark,
[data-theme="linen"] .mobile-topbar-logo-dark  { display: none; }
[data-theme="cloud"] .mobile-topbar-logo-light,
[data-theme="linen"] .mobile-topbar-logo-light { display: block; }

/* ── Help Page ─────────────────────────────────────────────────────────── */
.help-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-base); }

.help-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: var(--bg-panel); position: sticky; top: 0; z-index: 10;
}
.help-nav-logo { height: 32px; }
.help-nav-logo-dark  { display: block; }
.help-nav-logo-light { display: none; }
[data-theme="cloud"] .help-nav-logo-dark,
[data-theme="linen"] .help-nav-logo-dark  { display: none; }
[data-theme="cloud"] .help-nav-logo-light,
[data-theme="linen"] .help-nav-logo-light { display: block; }
.help-nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: color 0.2s;
}
.help-nav-back:hover { color: var(--text-primary); }

.help-hero {
  text-align: center; padding: 56px 24px 48px;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border);
}
.help-title { font-size: 2.2rem; font-weight: 800; font-family: var(--font-display); margin: 0 0 8px; }
.help-subtitle { color: var(--text-muted); font-size: 1rem; margin: 0 0 28px; }
.help-search-wrap { position: relative; max-width: 480px; margin: 0 auto; }
.help-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.help-search {
  width: 100%; padding: 12px 16px 12px 40px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 50px; color: var(--text-primary); font-size: 0.9rem;
  font-family: var(--font-body); outline: none; transition: border-color 0.2s;
}
.help-search:focus { border-color: var(--accent); }

.help-content { max-width: 760px; margin: 0 auto; padding: 40px 24px 60px; width: 100%; flex: 1; }

.faq-no-results { text-align: center; padding: 48px 0; color: var(--text-muted); }
.faq-no-results i { font-size: 2rem; display: block; margin-bottom: 12px; }
.faq-no-results a { color: var(--accent); }

.faq-section { margin-bottom: 40px; }
.faq-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.faq-section-header i { font-size: 1.1rem; color: var(--accent); }
.faq-section-header h2 { font-size: 1rem; font-weight: 700; margin: 0; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.faq-list { display: flex; flex-direction: column; gap: 4px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item.open { border-color: var(--border-light); }

.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--bg-panel);
  border: none; cursor: pointer; text-align: left;
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
  font-family: var(--font-body); transition: background 0.15s;
}
.faq-q:hover { background: var(--bg-elevated); }
.faq-item.open .faq-q { background: var(--bg-elevated); color: var(--accent); }
.faq-chevron { font-size: 0.75rem; flex-shrink: 0; transition: transform 0.2s; color: var(--text-muted); }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }

.faq-a {
  display: none; padding: 14px 16px;
  font-size: 0.875rem; line-height: 1.65; color: var(--text-secondary);
  background: var(--bg-elevated); border-top: 1px solid var(--border);
}
.faq-a a { color: var(--accent); }
.faq-item.open .faq-a { display: block; }

.help-contact {
  background: var(--bg-panel); border-top: 1px solid var(--border);
  padding: 56px 24px; text-align: center;
}
.help-contact-inner { max-width: 480px; margin: 0 auto; }
.help-contact-icon { font-size: 2.2rem; color: var(--accent); display: block; margin-bottom: 16px; }
.help-contact h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 6px; font-family: var(--font-display); }
.help-contact p { color: var(--text-muted); margin: 0 0 24px; }
.help-contact-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.help-contact-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
}
.help-contact-email { margin-top: 16px; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 600px) {
  .help-hero { padding: 36px 16px 32px; }
  .help-title { font-size: 1.6rem; }
  .help-content { padding: 24px 16px 40px; }
  .help-nav { padding: 14px 16px; }
}

/* Sidebar support link — Pro/Premium */
.sidebar-support-link {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(79, 156, 249, 0.08);
  border: 1px solid rgba(79, 156, 249, 0.2);
  color: var(--accent);
  font-size: 0.78rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
  flex-shrink: 0;
}
.sidebar-support-link:hover {
  background: rgba(79, 156, 249, 0.16);
  border-color: var(--accent);
  color: var(--accent);
}
.sidebar-support-link i { font-size: 0.9rem; }

/* Sidebar CHO brand link */
.sidebar-cho-link {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  text-decoration: none;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.sidebar-cho-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.sidebar-cho-icon { height: 18px; width: 18px; border-radius: 4px; flex-shrink: 0; opacity: 0.8; }
.sidebar-cho-link:hover .sidebar-cho-icon { opacity: 1; }

/* Nav CHO badge */
.nav-cho-badge {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 10px 3px 5px;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-cho-badge:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }
.nav-cho-icon { height: 20px; width: 20px; border-radius: 5px; flex-shrink: 0; }
[data-theme="cloud"] .nav-cho-badge,
[data-theme="linen"] .nav-cho-badge {
  background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }

.footer-favicon-icon { height: 24px; width: auto; border-radius: 5px; }

/* How It Works Section */
.hiw-section {
  padding: 80px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.hiw-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 48px 0 52px;
  flex-wrap: wrap;
}
.hiw-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  width: 200px;
  padding: 0 12px;
  position: relative;
}
.hiw-step-number {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) translateX(28px);
  font-size: 0.65rem; font-weight: 800;
  color: var(--green);
  letter-spacing: 0.06em;
  background: var(--bg);
  padding: 0 4px;
}
.hiw-step-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  transition: border-color 0.2s, background 0.2s;
}
.hiw-step:hover .hiw-step-icon {
  border-color: var(--green);
  background: rgba(var(--green-rgb),0.08);
  color: var(--green);
}
.hiw-step-title {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.hiw-step-desc {
  font-size: 0.82rem; line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.hiw-connector {
  display: flex; align-items: center; justify-content: center;
  padding-top: 32px;
  color: var(--border);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.hiw-cta { display: flex; flex-direction: column; align-items: center; }
@media (max-width: 768px) {
  .hiw-section { padding: 60px 20px; }
  .hiw-steps { flex-direction: column; align-items: center; gap: 32px; }
  .hiw-connector { padding-top: 0; transform: rotate(90deg); font-size: 1.4rem; }
  .hiw-step { width: 280px; }
  .hiw-step-number { transform: translateX(-50%) translateX(22px); }
}

/* Brand Connection Section */
.brand-connection-section { border-top: 1px solid var(--border); }
.bc-inner {
  display: flex; align-items: center; gap: 40px;
  padding: 40px 48px; flex-wrap: wrap;
}
.bc-cho-logo-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.bc-cho-img { height: 56px; width: auto; display: block; }
.bc-cho-location { font-size: 0.72rem; color: var(--text-muted); margin: 0; display: flex; align-items: center; gap: 4px; }
.bc-cho-location i { font-size: 0.7rem; color: var(--green); }
.bc-cho-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; font-size: 0.82rem; font-weight: 600;
  color: var(--green); text-decoration: none;
}
.bc-cho-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bc-divider { width: 1px; height: 60px; background: var(--border); flex-shrink: 0; }
.bc-description { flex: 1; min-width: 200px; font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary); }
.bc-description p { margin-bottom: 8px; }
.bc-description p:last-child { margin-bottom: 0; }
.bc-description strong { color: var(--text-primary); }
.bc-pillars { display: flex; gap: 28px; flex-shrink: 0; }
.bc-pillar {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
.bc-pillar i { font-size: 1.5rem; color: var(--green); }
.brand-values-bar {
  background: #0D1B2A;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px 16px; padding: 14px 32px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.8);
}
.bvb-dot { color: #22C55E; font-size: 0.9rem; } /* fixed — sits on the fixed-navy values bar, not a theme surface */
@media (max-width: 768px) {
  .bc-inner { padding: 28px 20px; gap: 24px; flex-direction: column; align-items: flex-start; }
  .bc-divider { display: none; }
  .bc-pillars { gap: 20px; }
  .bc-cho-img { height: 42px; }
  .nav-cho-badge span { display: none; }
  .nav-cho-badge { padding: 3px 6px; }
}

/* ── Legal pages (Privacy / Terms) ── */
.legal-page { min-height: 100vh; background: var(--bg); }
.legal-content {
  max-width: 760px; margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-content h1 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; margin-bottom: 6px;
}
.legal-effective { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 32px; }
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  margin: 32px 0 10px;
}
.legal-content p, .legal-content li {
  font-size: 0.92rem; line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.legal-content ul { padding-left: 22px; margin-bottom: 12px; }
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--text-primary); }
.legal-content a { color: var(--accent); text-underline-offset: 3px; }
.legal-callout {
  background: var(--green-bg);
  border: 1px solid rgba(var(--green-rgb),0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin: 18px 0;
}

/* ── Guides (SEO content section — extends .legal-content typography) ── */
.guides-hero {
  text-align: center;
  padding: 48px 24px 8px;
}
.guides-title {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800; margin: 0 0 8px;
}
.guides-subtitle {
  color: var(--text-muted); font-size: 1rem;
  max-width: 560px; margin: 0 auto;
}
.guides-grid-wrap { max-width: 980px; margin: 0 auto; padding: 32px 24px 64px; }
.guides-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.guide-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guide-card-icon {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); color: var(--accent); font-size: 1.1rem;
}
.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700; margin: 0;
  color: var(--text-primary); line-height: 1.35;
}
.guide-card-teaser { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin: 0; flex: 1; }
.guide-card-meta { font-size: 0.75rem; font-weight: 600; color: var(--accent); }

.guide-article { max-width: 720px; }
.guide-breadcrumb { margin-bottom: 20px; }
.guide-breadcrumb a { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.guide-breadcrumb a:hover { color: var(--accent); }
.guide-byline { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 28px; }
.guide-byline span { font-weight: 600; color: var(--text-secondary); }

.guide-cta {
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 40px 0 8px;
}
.guide-cta-title { margin-top: 0 !important; }
.guide-cta p { max-width: 480px; margin: 8px auto 18px; }
/* .legal-content a (0,1,1) outranks .btn-primary (0,1,0) — restore button text */
.guide-cta .btn-primary { justify-content: center; color: #fff; }
.guide-cta-sub { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 10px; }

.guide-related { margin-top: 40px; }
.guide-related-title { margin-bottom: 14px; }
.guide-related .guide-card-title { font-size: 0.92rem; }

@media (max-width: 768px) {
  .guides-hero { padding: 36px 16px 4px; }
  .guides-title { font-size: 1.6rem; }
  .guides-grid { grid-template-columns: 1fr; }
  .guides-grid-wrap { padding: 24px 16px 48px; }
}

/* ── Skip to main content (ADA) ── */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.1s;
}
.skip-to-main:focus {
  top: 0;
}

/* ============================================
   APP LAYOUT (Dashboard, etc.)
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  padding: 24px 0;
  z-index: 50;
}

.app-sidebar .sidebar-brand {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.app-nav { flex: 1; padding: 0 12px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover, .nav-item.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.nav-item.active { color: var(--accent); }

.nav-divider { height: 1px; background: var(--border); margin: 12px 0; }

.nav-item.pro-lock { color: var(--text-muted); }
.nav-item.pro-lock:hover { color: var(--text-secondary); }

.pro-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 50px;
  border: 1px solid rgba(var(--accent-rgb),0.2);
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

.user-name { font-size: 0.85rem; font-weight: 600; }
.user-plan.free    { font-size: 0.7rem; color: var(--text-muted); }
.user-plan.pro     { font-size: 0.7rem; color: var(--accent); }
.user-plan.premium { font-size: 0.7rem; color: var(--amber); }

.btn-logout {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-decoration: none;
  padding: 10px;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.btn-logout:hover { color: var(--red); }

/* Main content area */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0; /* flex items default to min-width:auto — wide table content must not stretch the page */
  padding: 0 0 60px;
  min-height: 100vh;
}

.app-header {
  padding: 28px 36px 0;
  margin-bottom: 28px;
  display: flex; align-items: flex-start; justify-content: space-between;
}

.page-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.page-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; }

.welcome-banner {
  margin: 20px 36px 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(var(--green-rgb),0.1), rgba(var(--accent-rgb),0.1));
  border: 1px solid rgba(var(--green-rgb),0.3);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--green);
  display: flex; align-items: center; gap: 12px;
}
.banner-close { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }

.verify-banner {
  margin: 20px 36px 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(var(--amber-rgb),0.12), rgba(var(--amber-rgb),0.05));
  border: 1px solid rgba(var(--amber-rgb),0.35);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.verify-banner i.bi-envelope-exclamation { color: #f59e0b; font-size: 1.1rem; }
.btn-resend-verify {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-resend-verify:hover { border-color: var(--accent); color: var(--accent); }
.btn-resend-verify:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 768px) {
  .verify-banner { margin: 16px 16px 0; padding: 12px 16px; }
  .btn-resend-verify { margin-left: 0; width: 100%; }
}

/* KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 36px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.kpi-card.highlight {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.kpi-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.kpi-value.positive { color: var(--green); }
.kpi-value.negative { color: var(--red); }
.kpi-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0 36px;
}

.dash-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-header h2 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.panel-action { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.panel-action:hover { color: var(--accent); opacity: 0.8; }

/* Account rows */
.account-row, .bill-row, .income-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.account-row:last-child, .bill-row:last-child, .income-row:last-child { border-bottom: none; }

.acct-icon, .bill-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.acct-name, .bill-name, .inc-name { font-weight: 500; font-size: 0.9rem; }
.acct-type, .bill-meta, .inc-meta { font-size: 0.78rem; color: var(--text-muted); text-transform: capitalize; }
.acct-balance, .bill-amount, .inc-amount { margin-left: auto; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.acct-balance.positive, .inc-amount { color: var(--green); }
.acct-balance.negative, .bill-amount { color: var(--text-primary); }

.autopay-badge {
  font-size: 0.6rem; font-weight: 700; background: var(--green-bg); color: var(--green);
  padding: 2px 5px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
}

.inc-dot {
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--green);
  flex-shrink: 0;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 2rem; margin-bottom: 10px; display: block; }
.empty-state p { font-size: 0.9rem; margin-bottom: 16px; }

.btn-add-small {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-add-small:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Pro upsell */
.pro-upsell-panel {
  background: var(--bg-elevated) !important;
  border-color: var(--accent) !important;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px !important;
}

.pro-upsell-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.pro-upsell-panel h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.pro-upsell-panel p { font-size: 0.9rem; color: var(--text-secondary); max-width: 280px; line-height: 1.6; margin-bottom: 24px; }

.btn-upgrade {
  display: inline-block;
  padding: 13px 28px;
  background: var(--accent);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.btn-upgrade:hover { filter: brightness(0.88); transform: translateY(-1px); color: white; }

.upsell-note { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   ONBOARDING
   ============================================ */
.onboarding-page {
  display: flex;
  min-height: 100vh;
}

.onboarding-sidebar {
  width: 280px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex; flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
}

.onboarding-sidebar .sidebar-brand { padding-bottom: 32px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }

.onboarding-steps-nav { flex: 1; }

.step-nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.step-nav-item:last-child { border-bottom: none; }

.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
  color: var(--text-muted);
}

.step-nav-item.done .step-num { background: var(--green); border-color: var(--green); color: white; }
.step-nav-item.active .step-num { background: var(--accent); border-color: var(--accent); color: white; }
.step-nav-item.active { color: var(--text-primary); font-weight: 600; }
.step-nav-item.done { color: var(--text-secondary); }
.step-nav-item.pending { color: var(--text-muted); }

.sidebar-tagline {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.onboarding-main {
  margin-left: 280px;
  flex: 1;
  padding: 48px;
  max-width: 800px;
}

.onboarding-header { margin-bottom: 40px; }
.step-indicator { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.progress-bar-wrap { height: 4px; background: var(--border); border-radius: 4px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 4px; transition: width 0.4s ease; }

.step-hero { margin-bottom: 36px; }

.step-icon-wrap {
  width: 56px; height: 56px;
  background: var(--accent-glow);
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--accent);
  margin-bottom: 20px;
}

.step-hero h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.step-hero p { color: var(--text-secondary); font-size: 1rem; }

/* Form styles */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

.gymr-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s;
}
/* Prevent iOS Safari auto-zoom on input focus (requires min 16px) */
@media (max-width: 768px) {
  input, select, textarea,
  .gymr-input, .form-control, .form-select {
    font-size: 16px !important;
  }
}
.gymr-input:focus { outline: none; border-color: var(--accent); }
.gymr-input option { background: var(--bg-elevated); }

/* Dynamic list items */
.dynamic-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
}

.dynamic-item .item-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.dynamic-item .item-grid-wide { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; }
.dynamic-item .item-grid-bill { display: grid; grid-template-columns: 2fr 1fr 1fr 80px 60px; gap: 12px; align-items: end; }
.bill-fields-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.bill-account-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; }
.liability-extras { grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }

.btn-remove-item {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem; transition: color 0.2s;
}
.btn-remove-item:hover { color: var(--red); }

.btn-add-item {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary); cursor: pointer;
  padding: 12px 20px; font-size: 0.9rem;
  width: 100%; justify-content: center;
  transition: all 0.2s; margin-bottom: 28px;
  font-family: var(--font-body);
}
.btn-add-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.step-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }

.btn-next {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: white; border: none;
  border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
}
.btn-next:hover { filter: brightness(0.88); transform: translateY(-1px); }

.btn-skip {
  background: none; border: none;
  color: var(--text-muted); font-size: 0.88rem;
  cursor: pointer; padding: 8px;
  font-family: var(--font-body);
  text-decoration: underline;
}
.btn-skip:hover { color: var(--text-secondary); }

.step-error {
  margin-top: 16px; padding: 14px 18px;
  background: var(--red-bg); border: 1px solid rgba(245,95,123,0.3);
  border-radius: var(--radius-sm);
  color: var(--red); font-size: 0.88rem;
}

/* Checkbox styled */
.gymr-check-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--text-secondary);
  cursor: pointer;
}
.gymr-check-wrap input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Error page */
.error-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; text-align: center; padding: 40px;
}
.error-page h1 { font-family: var(--font-display); font-size: 3rem; margin-bottom: 12px; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }

/* Auth pages — login / signup */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 20px;
  background: var(--bg-base);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.auth-logo-link { display: flex; justify-content: center; margin-bottom: 24px; }
.auth-logo { width: auto; display: none; }
.auth-logo-light { display: none; height: 40px; }
.auth-logo-dark  { display: block; height: 40px; }
[data-theme="cloud"] .auth-logo-dark,
[data-theme="linen"] .auth-logo-dark  { display: none; }
[data-theme="cloud"] .auth-logo-light,
[data-theme="linen"] .auth-logo-light { display: block; }

.auth-title { font-family: var(--font-display); font-size: 1.6rem; text-align: center; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.88rem; text-align: center; margin-bottom: 24px; }
.auth-form .form-row { margin-bottom: 0; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-hint { font-size: 0.76rem; color: var(--text-muted); margin: -10px 0 16px; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-google-btn { width: 100%; justify-content: center; }
.auth-footer-link { text-align: center; font-size: 0.86rem; color: var(--text-muted); margin: 24px 0 0; }
.auth-footer-link a { color: var(--accent); font-weight: 600; }
.auth-legal-note { text-align: center; font-size: 0.74rem; color: var(--text-muted); margin: 14px 0 0; line-height: 1.5; }
.auth-legal-note a { color: var(--text-secondary); text-underline-offset: 3px; }
.auth-form .form-group label { display: flex; justify-content: space-between; align-items: center; }
.auth-forgot-link { text-transform: none; letter-spacing: normal; font-weight: 600; color: var(--accent); font-size: 0.78rem; }

/* Honeypot field — hidden from sighted users, still in the tab/DOM order for bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Sidebar becomes a slide-in drawer — handled by transform, not display:none */
  .app-sidebar { display: flex; transform: translateX(-100%); position: fixed; z-index: 300; top: 0; bottom: 0; left: 0; padding-top: 56px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .app-sidebar.open { transform: translateX(0); }
  .onboarding-sidebar { display: none; }
  .app-main { margin-left: 0; }
  .onboarding-main { margin-left: 0; padding: 24px; }
  .landing-nav { padding: 12px 14px; gap: 8px; }
  .nav-links { display: none; }
  .nav-actions { gap: 8px; }
  .nav-brand { gap: 6px; }
  .landing-logo-light, .landing-logo-dark { height: 38px; }
  .btn-signin { padding: 8px 14px; font-size: 0.82rem; }
  .btn-cta--nav { padding: 9px 16px; font-size: 0.82rem; }
  .hero-section { padding: 40px 20px 80px; }
  .features-section, .pricing-section { padding: 60px 20px; }
  .kpi-row { padding: 0 16px; }
  .dashboard-grid { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
  .dynamic-item .item-grid,
  .dynamic-item .item-grid-wide,
  .dynamic-item .item-grid-bill { grid-template-columns: 1fr; }
  .forecast-bottom-grid { grid-template-columns: 1fr !important; }
  .bill-fields-grid { grid-template-columns: 1fr 1fr; }
  .bill-account-grid { grid-template-columns: 1fr; }
  .liability-extras { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   MODALS
   ============================================ */
.gymr-modal {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
}
.gymr-modal.open { display: block; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
}

.modal-box {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: calc(100% - 40px); max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

.modal-box.modal-sm { max-width: 420px; width: calc(100% - 40px); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0;
  margin-bottom: 20px;
}
.modal-header h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

.modal-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1rem; padding: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 0 24px 20px; }
.modal-body p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

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

/* ============================================
   TABLES
   ============================================ */
.data-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gymr-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}

.gymr-table thead tr {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.gymr-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.gymr-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.gymr-table tbody tr:last-child td { border-bottom: none; }
.gymr-table tbody tr:hover { background: var(--bg-elevated); }

.text-right { text-align: right; }
.text-center { text-align: center; }

.table-name-cell {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500;
}

.acct-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}

.type-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-size: 0.72rem;
  text-transform: capitalize;
  color: var(--text-secondary);
  white-space: nowrap;
}
.type-badge.type-income   { background: var(--green-bg);  border-color: var(--green); color: var(--green); }
.type-badge.type-expense  { background: var(--red-bg);    border-color: var(--red);   color: var(--red); }
.type-badge.type-transfer { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

.cat-inline-select {
  font-size: 0.78rem;
  padding: 3px 24px 3px 8px;
  border-radius: 50px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  max-width: 160px;
}

.recurring-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.68rem; font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 50px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: capitalize;
}

.action-btns {
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.btn-icon {
  width: 30px; height: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--border); color: var(--text-primary); }
.btn-icon.danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--red);
  color: white; border: none;
  border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
}
.btn-danger:hover { filter: brightness(0.88); }

/* ============================================
   PAGE LAYOUT HELPERS
   ============================================ */
.page-content { padding: 0 36px 60px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--accent); color: white;
  border: none; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-primary:hover { filter: brightness(0.88); transform: translateY(-1px); color: white; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border); border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-secondary:hover { background: var(--bg-elevated); border-color: var(--text-muted); transform: translateY(-1px); color: var(--text-primary); }

.empty-page-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-page-state i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--border-light); }
.empty-page-state h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; }
.empty-page-state p { font-size: 0.9rem; margin-bottom: 24px; }

.color-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

@media (max-width: 768px) {
  .page-content { padding: 0 16px 40px; }
  .gymr-table { font-size: 0.8rem; }
  .gymr-table th, .gymr-table td { padding: 10px 10px; }
}

/* ============================================
   FORECAST PAGE
   ============================================ */

/* Next Payday panel */
.next-payday-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.npd-header {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.npd-left     { flex-shrink: 0; }
.npd-label    { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 2px; }
.npd-date     { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.npd-days     { font-size: 0.78rem; color: var(--text-muted); }

.npd-income-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.npd-source-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-light); border-radius: 50px;
  padding: 3px 10px;
}
.npd-amount-pair { display: flex; align-items: center; gap: 5px; font-size: 0.88rem; }

/* Split account cards grid */
.npd-splits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.npd-split-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.npd-split-card.warn   { border-left: 3px solid var(--amber); }
.npd-split-card.danger { border-left: 3px solid var(--red); }

.npd-split-header {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 8px;
}
.npd-split-name  { font-size: 0.83rem; font-weight: 600; line-height: 1.3; word-break: break-word; }
.npd-split-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

.npd-deposit-badge {
  font-size: 0.75rem; font-weight: 700;
  color: var(--green); background: var(--green-bg);
  border: 1px solid var(--green); border-radius: 50px;
  padding: 2px 9px;
}

/* Vertical stat list */
.npd-stat-list { display: flex; flex-direction: column; gap: 5px; }

.npd-stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem;
}
.npd-stat-key { color: var(--text-muted); font-size: 0.78rem; }
.npd-stat-val { font-weight: 600; font-family: var(--font-display); }

.npd-stat-sep {
  padding-top: 5px;
  border-top: 1px solid var(--border);
}
.npd-stat-total {
  padding-top: 5px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}
.npd-stat-total .npd-stat-key { color: var(--text-secondary); font-weight: 600; }
.npd-stat-total .npd-stat-val { font-size: 1rem; }

.npd-split-low {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--amber);
  display: flex; align-items: center; gap: 5px;
}

.npd-no-splits { padding: 4px 0; }

/* Account selector pills */
.forecast-pills {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.forecast-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  background: none;
  color: var(--text-secondary);
  font-size: 0.78rem; font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
  white-space: nowrap;
}
.forecast-pill:hover { border-color: var(--accent); color: var(--text-primary); }
.forecast-pill.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Breakdown table */
.forecast-breakdown-table th { font-size: 0.7rem; }
.forecast-breakdown-table td { font-size: 0.85rem; }

.forecast-acct-row { cursor: pointer; }
.forecast-acct-row:hover { background: var(--bg-elevated); }

/* Deposit badge shown under the "Before Payday" balance */
.fc-deposit-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(var(--green-rgb),0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.forecast-acct-row:hover .acct-dot { box-shadow: 0 0 0 3px var(--bg-elevated), 0 0 0 4px var(--border-light); }

.chart-legend {
  display: flex; align-items: center;
  font-size: 0.8rem; color: var(--text-secondary);
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}

.forecast-event {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.forecast-event:last-child { border-bottom: none; }

.fe-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.fe-icon.income  { background: var(--green-bg); color: var(--green); }
.fe-icon.expense { background: var(--red-bg);   color: var(--red); }

.fe-info { flex: 1; }
.fe-label { font-size: 0.88rem; font-weight: 500; }
.fe-date  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.fe-amount { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.warning-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: rgba(245,95,123,0.08);
  border: 1px solid rgba(245,95,123,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  color: var(--red);
  font-size: 0.85rem;
}
.warning-date { font-weight: 600; margin-bottom: 2px; }
.warning-msg  { color: var(--text-secondary); font-size: 0.8rem; }

.all-clear {
  text-align: center; padding: 32px 20px;
  color: var(--green);
}
.all-clear i { font-size: 2rem; margin-bottom: 10px; display: block; }
.all-clear p { font-size: 0.9rem; color: var(--text-secondary); }

.forecast-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.forecast-bottom-grid.forecast-full { grid-template-columns: 1fr; }

/* ============================================
   INVESTMENTS PAGE
   ============================================ */
.filter-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-tab {
  padding: 5px 12px;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  background: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: capitalize;
  transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: white; }

.inv-name-cell {
  display: flex; align-items: center; gap: 10px;
}
.inv-class-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}

/* Asset class colors */
.asset-stock          { background: #4F9CF9; }
.asset-etf            { background: #22D3A5; }
.asset-mutual_fund    { background: #A78BFA; }
.asset-bond           { background: #F5A623; }
.asset-crypto         { background: #F55F7B; }
.asset-real_estate    { background: #34D399; }
.asset-gold           { background: #FCD34D; }
.asset-silver         { background: #9CA3AF; }
.asset-commodity      { background: #FB923C; }
.asset-options        { background: #EC4899; }
.asset-private_equity { background: #8B5CF6; }
.asset-cash_equivalent{ background: #60A5FA; }
.asset-other          { background: #6B7280; }

.ticker-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.allocation-bars { display: flex; flex-direction: column; gap: 12px; }
.alloc-row { display: grid; grid-template-columns: 140px 1fr 100px; align-items: center; gap: 12px; }
.alloc-label { display: flex; justify-content: space-between; align-items: center; }
.alloc-name { font-size: 0.82rem; color: var(--text-secondary); text-transform: capitalize; }
.alloc-pct  { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }
.alloc-bar-wrap { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.alloc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 4px; transition: width 0.6s ease; }
.alloc-value { font-size: 0.82rem; font-weight: 600; text-align: right; color: var(--text-primary); }

/* ============================================
   GOALS PAGE
   ============================================ */

/* Suggestion cards */
.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.suggestion-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--sg-color, var(--accent));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}

.sg-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2px;
}
.sg-icon-wrap {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.sg-badge {
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 9px; border-radius: 50px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.sg-badge.positive { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.sg-badge.negative { background: var(--red-bg);   color: var(--red);   border-color: var(--red); }

.sg-title { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.sg-body  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.sg-hint  {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.sg-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.15s; width: 100%; justify-content: center;
}
.sg-cta:hover {
  background: var(--sg-color, var(--accent));
  color: white; border-color: transparent;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.goal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s;
}
.goal-card:hover { border-color: var(--border-light); }

.goal-card-header {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid;
}

.goal-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

.goal-title-wrap { flex: 1; }
.goal-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 4px; }

.goal-actions { display: flex; gap: 6px; }

.goal-amounts { display: flex; justify-content: space-between; align-items: flex-end; }

.goal-progress-wrap {
  display: flex; align-items: center; gap: 12px;
}
.goal-progress-bar {
  flex: 1; height: 8px;
  background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.goal-progress-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.6s ease;
}
.goal-pct { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); min-width: 40px; text-align: right; }

.goal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}
.goal-stat {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}
.goal-stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 3px; }
.goal-stat-value { font-size: 0.88rem; font-weight: 600; }

.goal-account {
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}

.btn-contribute {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  width: 100%;
}
.btn-contribute:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

.goal-complete-badge {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  background: var(--green-bg);
  border: 1px solid rgba(var(--green-rgb),0.3);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .goals-grid { grid-template-columns: 1fr; }
  .alloc-row  { grid-template-columns: 100px 1fr 80px; }
}

/* ============================================
   BILL TYPE TOGGLE + MODAL SECTION LABELS
   ============================================ */
.bill-type-toggle {
  display: flex; gap: 10px;
}

.bill-type-btn {
  flex: 1; padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.15s;
}
.bill-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.bill-type-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.modal-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 16px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ============================================
   TICKER LOOKUP
   ============================================ */
.ticker-input-wrap {
  display: flex; gap: 8px; align-items: stretch;
}
.ticker-input-wrap .gymr-input {
  flex: 1;
}
.btn-lookup {
  padding: 0 16px;
  background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  color: white; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  font-family: var(--font-body);
  transition: background 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-lookup:hover    { filter: brightness(0.88); }
.btn-lookup:disabled { background: var(--border); cursor: not-allowed; }

/* ============================================
   INVESTMENT ACCORDION + LIVE PRICES
   ============================================ */
.group-row { transition: background 0.15s; }
.group-row:hover { background: var(--bg-elevated) !important; }

.group-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.lot-row td {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px dashed var(--border) !important;
}
.lot-row:last-of-type td { border-bottom: 1px solid var(--border) !important; }

.price-change {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
}

.btn-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.2s;
}
.btn-refresh:hover  { border-color: var(--accent); color: var(--accent); }
.btn-refresh:disabled { opacity: 0.6; cursor: not-allowed; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ============================================
   ACCOUNT HIERARCHY SECTIONS
   ============================================ */
.account-section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.section-header:hover { background: var(--bg-elevated); }

.section-title-wrap {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
}

.section-title  { color: var(--text-primary); }
.section-total  { font-size: 0.95rem; font-weight: 600; }
.section-chevron { color: var(--text-muted); font-size: 0.85rem; transition: transform 0.2s; }

.section-body { border-top: 1px solid var(--border); }

.subgroup-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.subgroup-total {
  margin-left: auto;
  font-size: 0.85rem; font-weight: 600;
  text-transform: none; letter-spacing: 0;
  color: var(--text-primary);
}

/* Bill amortization breakdown in table */
.bill-amort-breakdown {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 3px;
}
.bab-row {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: var(--text-muted);
  gap: 8px;
}
.bab-row.extra span:last-child { color: var(--green); font-weight: 600; }

/* Loan payoff cards */
.loan-payoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}
.loan-payoff-card {
  background: var(--bg-panel);
  padding: 18px 20px;
}

.lpc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px;
}
.lpc-name    { font-weight: 700; font-size: 0.95rem; }
.lpc-sub     { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.lpc-balance { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

.lpc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.lpc-stat-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 3px; }
.lpc-stat-val   { font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; }
.lpc-stat-sub   { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }

.lpc-savings {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.78rem; color: var(--text-secondary);
  line-height: 1.5;
}
.lpc-savings i { color: var(--green); flex-shrink: 0; margin-top: 2px; }

/* Income split rows in modal + table */
.split-row-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .split-row-grid { grid-template-columns: 1fr 1fr; }
  .split-row-grid .split-label { grid-column: 1 / -1; }
}

/* Paycheck deduction rows in modal */
.deduction-row-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 2fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .deduction-row-grid { grid-template-columns: 1fr 1fr; }
  .deduction-row-grid .deduct-name    { grid-column: 1 / -1; }
  .deduction-row-grid .deduct-account { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .deduction-row-grid { grid-template-columns: 1fr; }
  .deduction-row-grid .deduct-name    { grid-column: unset; }
  .deduction-row-grid .deduct-account { grid-column: unset; }
}

/* Deduction type badges in expanded table */
.deduct-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.deduct-badge.pretax  { background: var(--accent-glow); color: var(--accent); }
.deduct-badge.tax     { background: rgba(245,95,123,0.12);  color: var(--red); }
.deduct-badge.posttax { background: rgba(245,166,35,0.15);  color: var(--amber); }

/* Expanded income detail row sections */
.income-splits-row td { padding: 0 !important; }
.income-split-table { background: var(--bg-elevated); }
.income-split-table thead tr { background: transparent; }
.inc-detail-section { border-bottom: 1px solid var(--border); }
.inc-detail-section:last-child { border-bottom: none; }
.inc-detail-header {
  padding: 10px 44px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.income-split-table th { font-size: 0.68rem; color: var(--text-muted); padding: 8px 16px; }
.income-split-table td { font-size: 0.82rem; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.income-split-table tbody tr:last-child td { border-bottom: none; }

/* Investment holdings drill-down */
.holdings-detail-row td { padding: 0 !important; }
.holdings-mini-table { background: var(--bg-elevated); }
.holdings-mini-table thead tr { background: transparent; }
.holdings-mini-table th { font-size: 0.68rem; color: var(--text-muted); padding: 8px 16px; }
.holdings-mini-table td { font-size: 0.82rem; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.holdings-mini-table tbody tr:last-child td { border-bottom: none; }

/* Institution group accordion */
.inst-group {
  margin: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.inst-group:last-child { margin-bottom: 16px; }

.inst-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px 11px 32px;
  cursor: pointer;
  background: var(--bg-panel);
  user-select: none;
  transition: background 0.15s;
}
.inst-header:hover { background: var(--bg-elevated); }

.inst-name  { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.inst-count { font-size: 0.75rem; color: var(--text-muted); }
.inst-total { margin-left: auto; font-size: 0.88rem; font-weight: 600; }
.inst-chevron { color: var(--text-muted); font-size: 0.78rem; transition: transform 0.2s; flex-shrink: 0; }

.inst-body { border-top: 1px solid var(--border); }

/* Stale valuation */
.stale-date  { color: var(--amber); }
.stale-badge {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700;
  background: rgba(245,166,35,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 2px 7px; border-radius: 50px;
  margin-left: 6px;
}

.context-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}
.context-banner i:first-child { font-size: 1rem; flex-shrink: 0; }
.context-banner span { flex: 1; min-width: 200px; line-height: 1.5; }
.context-banner span strong { letter-spacing: 0.04em; }
.context-banner-link {
  font-weight: 700; font-size: 0.8rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
.context-banner--household {
  background: var(--accent-glow, rgba(79,156,249,0.1));
  border: 1px solid rgba(var(--accent-rgb),0.3);
  color: var(--text-primary);
}
.context-banner--household i:first-child,
.context-banner--household .context-banner-link { color: var(--accent); }
.context-banner--workspace {
  background: rgba(var(--amber-rgb),0.08);
  border: 1px solid rgba(var(--amber-rgb),0.3);
  color: var(--text-primary);
}
.context-banner--workspace i:first-child,
.context-banner--workspace .context-banner-link { color: var(--amber); }

.stale-warning-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 18px;
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-md);
  font-size: 0.85rem; color: var(--amber);
}
.stale-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: rgba(245,166,35,0.12);
  border-radius: 50px; cursor: pointer;
  font-size: 0.78rem; font-weight: 500;
  transition: background 0.15s;
}
.stale-tag:hover { background: rgba(245,166,35,0.25); }

/* Variable bill badge */
.variable-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(245,166,35,0.12);
  color: var(--amber);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 1px 6px; border-radius: 4px;
  margin-left: 4px; vertical-align: middle;
}

/* ============================================
   DATATABLES DARK THEME OVERRIDES
   ============================================ */

/* Wrapper */
.dataTables_wrapper {
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* Top controls bar */
.dt-layout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.dt-layout-row:last-child {
  border-bottom: none;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}

/* Search box */
.dt-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-search label { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }

.dt-search input,
.dt-input {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  padding: 7px 12px !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  outline: none !important;
  min-width: 220px;
}

.dt-search input:focus { border-color: var(--accent) !important; }

/* Length select */
.dt-length select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  margin: 0 6px;
}
.dt-length label { color: var(--text-muted); font-size: 0.82rem; }

/* Info text */
.dt-info { color: var(--text-muted); font-size: 0.78rem; }

/* Pagination */
.dt-paging .pagination { margin: 0; gap: 4px; }

.dt-paging .page-item .page-link {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm) !important;
  padding: 5px 11px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.dt-paging .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.dt-paging .page-item:not(.active) .page-link:hover {
  background: var(--border);
  color: var(--text-primary);
}

.dt-paging .page-item.disabled .page-link {
  opacity: 0.4; cursor: not-allowed;
}

/* Column sort headers */
table.dataTable thead th {
  position: relative;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc {
  padding-right: 24px !important;
}

table.dataTable thead th .dt-column-order {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  font-size: 0.7rem;
}

table.dataTable thead th.dt-ordering-asc .dt-column-order,
table.dataTable thead th.dt-ordering-desc .dt-column-order {
  opacity: 1;
  color: var(--accent);
}

/* Column search inputs (under headers) */
table.dataTable thead tr.dt-columnFilter th {
  padding: 6px 8px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

table.dataTable thead tr.dt-columnFilter input,
table.dataTable thead tr.dt-columnFilter select {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.78rem;
  width: 100%;
  font-family: var(--font-body);
}

table.dataTable thead tr.dt-columnFilter input:focus,
table.dataTable thead tr.dt-columnFilter select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Export buttons */
.dt-buttons { display: flex; gap: 6px; }

.dt-button {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-secondary) !important;
  font-size: 0.78rem !important;
  font-family: var(--font-body) !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  box-shadow: none !important;
}

.dt-button:hover {
  background: var(--border) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

/* Remove DataTables default borders that conflict */
table.dataTable { border-collapse: collapse !important; }
table.dataTable tbody tr { background: transparent !important; }
table.dataTable tbody tr:hover td { background: var(--bg-elevated) !important; }
table.dataTable.no-footer { border-bottom: none !important; }

/* Column filter row placeholder color */
table.dataTable thead tr.dt-columnFilter input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Make sure action buttons don't sort */
th.no-sort { cursor: default !important; }
th.no-sort .dt-column-order { display: none !important; }

/* ============================================
   BILLS FUNDING SUMMARY STRIP
   ============================================ */
.funding-summary-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.funding-summary-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  flex: 1; min-width: 200px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.funding-summary-card:hover { border-color: var(--accent); }

.fsc-icon {
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1rem;
  flex-shrink: 0;
}

.fsc-info { flex: 1; min-width: 0; }
.fsc-name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsc-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.fsc-amount { text-align: right; flex-shrink: 0; }
.fsc-monthly { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--red); }
.fsc-period  { font-size: 0.7rem; color: var(--text-muted); }

/* Section badge */
.section-badge {
  font-size: 0.72rem; font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px; border-radius: 50px;
  margin-left: 4px;
}

/* ============================================
   ONBOARDING STEP 2 TABS
   ============================================ */
.onb-type-tabs {
  display: flex; gap: 12px; margin-bottom: 24px;
}

.onb-tab {
  flex: 1; padding: 14px 20px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  text-align: left;
  transition: all 0.15s;
}
.onb-tab:hover {
  border-color: var(--accent); color: var(--accent);
}
.onb-tab.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.onb-household-banner {
  display: flex; align-items: center; gap: 0.6rem;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elevated));
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.onb-household-banner i { color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }

/* ============================================
   MOBILE NAV — HAMBURGER + DRAWER
   ============================================ */

/* Mobile top bar — hidden on desktop */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 299;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}

.hamburger-btn {
  width: 44px; height: 44px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  font-size: 1.1rem; flex-shrink: 0;
}
.hamburger-btn:hover { color: var(--text-primary); }

/* Overlay behind drawer */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 298;
  backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* Sidebar drawer on mobile */
.app-sidebar {
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* Bottom nav bar for mobile — quick access */
.mobile-bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  z-index: 200;
  flex-direction: row;
  align-items: stretch;
}

.bottomnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 4px;
  transition: color 0.15s;
  border-top: 2px solid transparent;
}
.bottomnav-item i { font-size: 1.2rem; }
.bottomnav-item.active,
.bottomnav-item:hover {
  color: var(--accent);
  border-top-color: var(--accent);
}

/* Theme picker */
.theme-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.theme-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .theme-dot { width: 32px; height: 32px; }
}
.theme-dot:hover  { transform: scale(1.15); }
.theme-dot.active { box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 4px var(--text-secondary); }

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  /* Show mobile chrome */
  .mobile-topbar    { display: flex; }
  .mobile-bottomnav { display: flex; }

  /* Main content clears topbar + bottomnav */
  .app-main {
    margin-left: 0 !important;
    padding-top: 56px;
    padding-bottom: 80px;
  }

  /* Header adjustments */
  .app-header {
    padding: 20px 16px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  .app-header > button,
  .app-header > a { flex-shrink: 0; }
  .page-title { font-size: 1.4rem; }

  /* Page content padding */
  .page-content { padding: 0 16px 60px; }

  /* KPI rows stack */
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Tables scroll horizontally (overridden below 640px by card view) */
  .data-panel { overflow-x: auto; }
  .inst-body  { overflow-x: auto; } /* accounts tables live here, not in .data-panel */
  .gymr-table { min-width: 640px; }

  /* Modals: bottom sheet */
  .modal-box {
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100% !important;
    width: 100%;
    position: fixed;
    top: auto;         /* reset desktop top:50% */
    transform: none;   /* reset desktop translate(-50%,-50%) */
    bottom: 0; left: 0; right: 0;
    max-height: 92vh;
    overflow-y: auto;
  }
  .gymr-modal { align-items: flex-end; }

  /* Funding summary strip stacks */
  .funding-summary-strip { flex-direction: column; }
  .funding-summary-card  { min-width: unset; }

  /* Account / bill section headers */
  .section-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }

  /* DataTables controls: let rows wrap */
  .dt-layout-row { padding: 10px 12px; }
  .dt-search input { min-width: unset; width: 100%; }
  .dt-search { flex: 1 1 auto; min-width: 120px; }

  /* Filter tabs: horizontal scroll instead of wrap */
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }

  /* Form rows stack */
  .form-row { flex-direction: column; gap: 12px; }
  .item-grid-wide { grid-template-columns: 1fr 1fr !important; }

  /* Allocation / chart grid stacks */
  .inv-alloc-grid { grid-template-columns: 1fr; }
  .dash-inv-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .item-grid-wide { grid-template-columns: 1fr !important; }
  .bill-fields-grid { grid-template-columns: 1fr; }
  .liability-extras { grid-template-columns: 1fr; }
  .dt-buttons { display: none; }

  /* Tighter modal padding on small phones */
  .modal-header { padding: 16px 16px 0; margin-bottom: 14px; }
  .modal-body   { padding: 0 16px 16px; }
  .modal-footer { padding: 12px 16px; }
}

/* ── Card-view tables at phone widths ──
   Each <tr> becomes a card; <td data-label> supplies the left label.
   Must come AFTER the 768px block so it wins on specificity.          */
@media (max-width: 640px) {
  /* Remove forced horizontal scroll — cards don't need it */
  .data-panel { overflow-x: unset; }
  .gymr-table { min-width: unset !important; }

  /* Block layout for all table elements */
  .gymr-table,
  .gymr-table thead,
  .gymr-table tbody,
  .gymr-table tfoot,
  .gymr-table tr,
  .gymr-table th,
  .gymr-table td { display: block; }

  /* Hide column headers (filter row is also inside thead so hides too) */
  .gymr-table thead tr { display: none; }

  /* Each body row → card */
  .gymr-table tbody tr {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
  }

  /* Lot rows stay hidden (they're nested detail rows) */
  .gymr-table tbody tr.lot-row { display: none !important; }

  /* DataTables empty / processing rows */
  .gymr-table tbody tr.dataTables_empty { border: none; margin: 0; }
  .gymr-table tbody tr.dataTables_empty td { text-align: center; border: none; }

  /* Each cell: floated label on left, value in normal inline flow on the
     right. Block + float, NOT flex — flex turns mixed content like
     10<sup>th</sup> into separate items and scatters them. */
  .gymr-table td {
    display: block;
    overflow: hidden; /* BFC — keeps the floated label inside the cell */
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    vertical-align: unset;
  }
  .gymr-table td:last-child { border-bottom: none; }

  /* data-label becomes the left label via ::before */
  .gymr-table td[data-label]::before {
    content: attr(data-label);
    float: left;
    margin-right: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: left;
    padding-top: 2px;
  }

  /* Flex wrappers inside cells hug the right edge like plain text does */
  .gymr-table td .table-name-cell,
  .gymr-table td .bill-dest-sub { justify-content: flex-end; }

  /* Sub-lines wrap instead of widening the card */
  .gymr-table td .phys-sub { white-space: normal; }
  .gymr-table td .inv-balance-breakdown { flex-wrap: wrap; white-space: normal; }

  /* Amort breakdown: compact box on the right, not full card width */
  .gymr-table td .bill-amort-breakdown { display: inline-flex; min-width: 150px; }

  /* Actions cell: centred, no label */
  .gymr-table td[data-label="Actions"] {
    text-align: center;
    border-bottom: none;
  }
  .gymr-table td[data-label="Actions"]::before { display: none; }

  /* Cells with empty data-label (icon-only columns) */
  .gymr-table td[data-label=""] { display: none; }

  /* Bigger touch targets */
  .btn-icon { width: 38px; height: 38px; font-size: 0.9rem; }

  /* Balance edit row stays inline */
  .inline-balance-wrap { flex-direction: row; justify-content: flex-end; }

  /* Holdings panel header wraps */
  .holdings-panel-header { flex-wrap: wrap; gap: 10px; padding-bottom: 12px; }

  /* Income splits sub-table: keep as horizontal scroll, don't card-view it */
  .income-split-table { display: table; min-width: 300px; overflow-x: auto; }
  .income-split-table thead,
  .income-split-table tbody,
  .income-split-table tfoot,
  .income-split-table tr,
  .income-split-table th,
  .income-split-table td { display: revert; }
  .income-split-table thead tr { display: table-row; }
  .income-splits-row { overflow-x: auto; }
  .income-splits-row td { padding: 0 !important; border: none !important; display: block; }

  /* Onboarding bill grid: 2-col on phones so amount+remove stay on one row */
  .dynamic-item .item-grid-bill { grid-template-columns: 1fr 80px !important; }
}

/* ============================================
   DASHBOARD
   ============================================ */

/* ── Dashboard status line ── */
.dash-status-line {
  font-size: 0.92rem; color: var(--text-secondary);
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  line-height: 1.5;
}
.dash-status-line strong { color: var(--text-primary); }
.dash-status-line i { font-size: 0.95rem; margin-right: 6px; vertical-align: -1px; }

/* ── Spending by Category panel ── */
.panel-note { font-size: 0.78rem; color: var(--text-muted); }
.bill-dest-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.price-updated-note { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 768px) { .price-updated-note { display: none; } }
.inv-balance-breakdown {
  font-size: 0.7rem; color: var(--text-muted); margin-top: 2px;
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  white-space: nowrap;
}
.phys-sub {
  font-size: 0.7rem; font-weight: 600; margin-top: 2px;
  text-align: right; white-space: nowrap;
}
.phys-sub-muted { color: var(--text-muted); font-weight: 400; }

/* FHFA valuation suggestion in the Update Value modal */
.fhfa-suggestion {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--green-bg);
  border: 1px solid rgba(var(--green-rgb),0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 16px;
}
.fhfa-suggestion-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fhfa-suggestion-main > i { font-size: 1.2rem; color: var(--green); flex-shrink: 0; }
.fhfa-suggestion-value { font-size: 0.9rem; }
.fhfa-suggestion-value strong { color: var(--green); }
.fhfa-suggestion-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.fhfa-use-btn { padding: 7px 14px; font-size: 0.8rem; flex-shrink: 0; }
.spend-tabs {
  display: inline-flex; gap: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 100px; padding: 2px;
}
.spend-tab {
  padding: 4px 14px; border-radius: 100px; cursor: pointer;
  font-size: 0.76rem; font-weight: 600; color: var(--text-muted);
  background: none; border: 0; font-family: inherit;
  transition: all .15s; white-space: nowrap;
}
.spend-tab.active { background: var(--accent); color: #fff; }
.spend-chart-body {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 22px;
}
.spend-chart-canvas-wrap {
  position: relative; height: 220px;
  flex: 0 0 260px; max-width: 260px;
}
.spend-chart-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  text-align: center; pointer-events: none; white-space: nowrap;
}
.scc-total { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.scc-sub { font-size: 0.64rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.spend-legend {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.spend-legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem;
}
.sli-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sli-label { color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sli-amt { color: var(--text-primary); font-weight: 600; }
.sli-pct { color: var(--text-muted); width: 36px; text-align: right; }
@media (max-width: 640px) {
  .spend-chart-body { flex-direction: column; gap: 16px; }
  .spend-chart-canvas-wrap { flex: none; width: 100%; max-width: 240px; }
}

.hero-delta {
  font-size: 0.72rem; font-weight: 600;
  margin-top: 6px; letter-spacing: 0.01em;
}

/* Hero cards row */
.dash-hero-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.dash-hero-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s;
}

.hero-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-breakdown {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Progress bar */
.dash-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.dash-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  min-width: 2px;
}

/* 3-col grid for row 4 */
.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Account groups inside dashboard panel */
.dash-account-group { border-bottom: 1px solid var(--border); }
.dash-account-group:last-child { border-bottom: none; }
.dag-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 16px 6px;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
}

/* Responsive */
@media (max-width: 1100px) {
  .dash-hero-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .dash-hero-row { grid-template-columns: 1fr 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .hero-value { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .dash-hero-row { grid-template-columns: 1fr; }
}

/* ============================================
   INLINE BALANCE QUICK-EDIT
   ============================================ */
.inline-balance-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.bal-edit-btn {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s, color 0.15s;
  line-height: 1;
}
tr:hover .bal-edit-btn { opacity: 1; }
.bal-edit-btn:hover { color: var(--accent); }

.balance-auto-badge {
  display: inline-block;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.12);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.inline-balance-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.bal-input {
  width: 110px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.88rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-align: right;
  outline: none;
}

.bal-save-btn, .bal-cancel-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  transition: all 0.15s;
}
.bal-save-btn   { color: var(--green); border-color: rgba(var(--green-rgb),0.4); }
.bal-save-btn:hover { background: var(--green-bg); }
.bal-cancel-btn { color: var(--text-muted); }
.bal-cancel-btn:hover { color: var(--red); }

/* ============================================
   SKILL LEVEL PROMPT BANNER
   ============================================ */

.skill-prompt-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(var(--accent-rgb),0.06) 100%);
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: var(--radius-lg);
  padding: 20px 20px 20px 20px;
  margin: 0 36px 20px;
}

@media (max-width: 768px) {
  .skill-prompt-banner { margin: 0 16px 16px; padding: 16px; }
}

.spb-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow, rgba(79,156,249,0.12));
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: var(--radius-md);
  color: var(--accent); font-size: 1.2rem;
}

.spb-body { flex: 1; min-width: 0; }
.spb-title {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px;
}
.spb-sub {
  font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.5; margin-bottom: 14px;
}

.spb-options {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.spb-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; text-align: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  cursor: pointer; transition: all 0.18s;
  color: var(--text-primary);
  min-width: 130px;
}
.spb-option i { font-size: 1.2rem; color: var(--accent); }
.spb-option:hover {
  border-color: var(--accent);
  background: var(--accent-glow, rgba(79,156,249,0.08));
}
.spb-option.active {
  border-color: var(--accent);
  background: var(--accent-glow, rgba(79,156,249,0.12));
  opacity: 0.7; pointer-events: none;
}
.spb-opt-name { font-size: 0.82rem; font-weight: 600; }
.spb-opt-desc { font-size: 0.7rem; color: var(--text-muted); }

.spb-dismiss {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none;
  color: var(--text-muted); font-size: 0.78rem;
  cursor: pointer; padding: 4px 2px;
  white-space: nowrap; flex-shrink: 0;
  transition: color 0.15s;
  align-self: flex-start;
  margin-top: 2px;
}
.spb-dismiss:hover { color: var(--text-secondary); }

@media (max-width: 640px) {
  .skill-prompt-banner { flex-direction: column; }
  .spb-icon { display: none; }
  .spb-dismiss { align-self: flex-end; margin-top: -4px; }
  .spb-options { width: 100%; }
  .spb-option { flex: 1; min-width: unset; padding: 10px 8px; }
}

/* ============================================
   DASHBOARD CUSTOMIZE DRAWER
   ============================================ */

.dash-settings-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  backdrop-filter: blur(2px);
}
.dash-settings-overlay.open { display: block; }

.dash-settings-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 501;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}
.dash-settings-drawer.open { transform: translateX(0); }

.dsd-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dsd-body {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
}

.dsd-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.dsd-locked-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 20px;
}
.dsd-locked-note i { color: var(--accent); flex-shrink: 0; }

.dsd-group { margin-bottom: 24px; }

.dsd-group-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.dsd-toggle-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
}
.dsd-toggle-row:last-child { border-bottom: none; }

.dsd-toggle-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dsd-toggle-info { flex: 1; min-width: 0; }
.dsd-toggle-label { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.dsd-toggle-desc  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.dsd-toggle-nodata {
  font-size: 0.7rem; color: var(--text-muted); margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
  opacity: 0.7;
}

/* Toggle switch */
.gymr-toggle {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  cursor: pointer; position: relative;
  margin-top: 2px;
}
.gymr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.gymr-toggle-track {
  width: 38px; height: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.gymr-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.gymr-toggle input:checked + .gymr-toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.gymr-toggle input:checked + .gymr-toggle-track::after {
  transform: translateX(16px);
  background: white;
}
.gymr-toggle input:disabled + .gymr-toggle-track { opacity: 0.4; cursor: not-allowed; }

/* ── Mobile drawer becomes bottom sheet ── */
@media (max-width: 640px) {
  .dash-settings-drawer {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; max-height: 85vh;
    border-left: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
  }
  .dash-settings-drawer.open { transform: translateY(0); }
}

/* ============================================
   DASHBOARD SUGGESTIONS STRIP
   ============================================ */

.dash-suggestions {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dash-suggestions-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.dash-suggestions-header i { color: var(--accent); }
.dash-suggestions-sub {
  font-size: 0.75rem; font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
}

.dash-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dash-suggestion-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: none; border: none; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer; text-align: left;
  transition: background 0.15s;
  color: var(--text-primary);
}
.dash-suggestion-card:hover { background: var(--bg-elevated); }
.dash-suggestion-card:last-child { border-right: none; }

.dsc-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow, rgba(79,156,249,0.1));
  border-radius: var(--radius-sm);
  color: var(--accent); font-size: 1rem;
}
.dsc-body { flex: 1; min-width: 0; }
.dsc-label { font-size: 0.85rem; font-weight: 600; }
.dsc-desc  { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.dsc-add   { color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }

@media (max-width: 640px) {
  .dash-suggestions-grid { grid-template-columns: 1fr; }
  .dash-suggestion-card { border-right: none; }
}

/* ============================================
   ONBOARDING SKILL LEVEL PICKER
   ============================================ */

.skill-level-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.skill-option { cursor: pointer; }
.skill-option input { position: absolute; opacity: 0; width: 0; height: 0; }

.skill-card {
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  height: 100%;
}
.skill-card:hover { border-color: var(--border-light); }
.skill-option input:checked ~ .skill-card {
  border-color: var(--accent);
  background: var(--accent-glow, rgba(79,156,249,0.08));
}

.skill-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 8px; }
.skill-name { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.skill-desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

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

/* ============================================
   RESPONSIVE GRID UTILITIES
   ============================================ */

/* Investments page: allocation bars + donut chart */
.inv-alloc-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Dashboard: investment market value / gain-loss pair */
.dash-inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Holdings panel header: title + filter tabs */
.holdings-panel-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* ============================================
   NOTIFICATION BELL & ALERTS PANEL
   ============================================ */

/* Desktop sidebar bell — styled like a nav-item but as a <button> */
.notif-bell-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.notif-bell-nav:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.notif-bell-nav i { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }

/* Badge — count bubble on desktop bell */
.notif-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 9px;
  line-height: 18px;
  text-align: center;
  display: none;
  flex-shrink: 0;
}
.notif-badge.has-alerts { display: inline-block; }

/* Mobile bell — inherits hamburger-btn shape, adds a dot indicator */
.notif-bell-mobile { position: relative; }
.notif-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  display: none;
  pointer-events: none;
}
.notif-badge-dot.has-alerts { display: block; }

/* ── Notification dropdown panel ── */
.notif-panel {
  position: fixed;
  width: 320px;
  max-height: 460px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  z-index: 500;
  overflow: hidden;
  animation: notif-in 0.14s ease;
}
.notif-panel.open { display: flex; }

@keyframes notif-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-panel-header h6 {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.notif-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 3px 5px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.notif-panel-close:hover { color: var(--text-primary); background: var(--bg-elevated); }

.notif-list { overflow-y: auto; flex: 1; }

/* Individual notification item */
.notif-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px 11px 13px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.03); }

.notif-item.severity-critical { border-left-color: var(--red); }
.notif-item.severity-warning  { border-left-color: var(--amber); }
.notif-item.severity-info     { border-left-color: var(--green); }

.notif-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.82rem;
}
.notif-item.severity-critical .notif-item-icon { background: var(--red-bg);              color: var(--red);   }
.notif-item.severity-warning  .notif-item-icon { background: rgba(245,166,35,0.12);      color: var(--amber); }
.notif-item.severity-info     .notif-item-icon { background: var(--green-bg);            color: var(--green); }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.notif-item-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Empty state */
.notif-empty {
  padding: 36px 16px;
  text-align: center;
}
.notif-empty i {
  font-size: 2.2rem;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}
.notif-empty p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Mobile: panel stretches full width below topbar */
@media (max-width: 768px) {
  .notif-panel {
    width: calc(100vw - 16px);
    max-height: 70vh;
  }
}

/* ============================================
   INVESTMENTS: ACCOUNT TAGS + SELL BUTTON
   ============================================ */
.inv-account-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.inv-account-tag i { font-size: 0.65rem; flex-shrink: 0; }

/* Sell button — amber accent so it's distinct from edit/delete */
.btn-icon.sell-btn { color: var(--amber); border-color: transparent; }
.btn-icon.sell-btn:hover {
  background: rgba(245,166,35,0.12);
  border-color: var(--amber);
  color: var(--amber);
}

/* Sell modal — holding info card */
.sell-info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.sell-info-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.sell-info-stats {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.sell-info-stats span::before { content: '·'; margin-right: 6px; opacity: 0.5; }
.sell-info-stats span:first-child::before { content: ''; margin: 0; }

/* ============================================
   INVESTMENTS: MARKET MOVERS PANEL
   ============================================ */
.movers-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.movers-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}
.mover-tabs { display: flex; gap: 4px; }
.mover-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.mover-tab:hover  { border-color: var(--accent); color: var(--accent); }
.mover-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.movers-body { padding: 14px 24px 18px; }

.movers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.mover-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  transition: border-color 0.15s ease;
  min-width: 0;
}
.mover-card:hover { border-color: var(--border-light); }
.mover-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 3px;
}
.mover-ticker {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.mover-change      { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.mover-change.positive { color: var(--green); }
.mover-change.negative { color: var(--red);   }
.mover-name {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mover-price {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.movers-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 0;
}

/* ============================================
   INVESTMENTS: HOLDINGS INTELLIGENCE PANEL
   ============================================ */
.intel-panel-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}
.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  padding: 16px 24px 24px;
}
.intel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.intel-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.intel-card-title  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intel-ticker      { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.intel-name        { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intel-signal-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.intel-analyst-count { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; }

/* 52-week range bar */
.week52-wrap { margin: 0; }
.week52-bar  {
  position: relative;
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 5px;
  overflow: visible;
}
.week52-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--amber) 50%, var(--green) 100%);
  border-radius: 4px;
}
.week52-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-glow);
  z-index: 1;
}
.week52-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.67rem;
  color: var(--text-muted);
}

/* Intel metrics list */
.intel-metrics { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.intel-metric  { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }
.im-label      { color: var(--text-secondary); }
.im-value      { font-weight: 600; color: var(--text-primary); }
.im-value.positive { color: var(--green); }
.im-value.negative { color: var(--red);   }

/* Signal badge */
.signal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.signal-buy   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green); }
.signal-sell  { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red);   }
.signal-hold  { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-light); }
.signal-watch { background: rgba(245,166,35,0.1); color: var(--amber); border: 1px solid var(--amber); }

/* Analyst recommendation badge */
.rec-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}
.rec-strongBuy  { background: var(--green-bg); color: var(--green); }
.rec-buy        { background: var(--green-bg); color: var(--green); opacity: 0.8; }
.rec-hold       { background: rgba(245,166,35,0.1); color: var(--amber); }
.rec-sell       { background: var(--red-bg);   color: var(--red); opacity: 0.8; }
.rec-strongSell { background: var(--red-bg);   color: var(--red); }

.intel-card-footer { display: flex; align-items: center; justify-content: flex-end; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .movers-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .movers-panel-header { padding: 14px 16px 12px; }
  .movers-body         { padding: 12px 16px 16px; }
  .movers-grid         { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .intel-grid          { grid-template-columns: 1fr; padding: 12px 16px 16px; }
  .intel-panel-header  { padding: 14px 16px 12px; }
}
@media (max-width: 480px) {
  .movers-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   PRICING PAGE
   ============================================ */
.billing-toggle {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 100px; padding: 3px;
}
.billing-opt {
  padding: 6px 20px; border-radius: 100px; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  transition: all .2s; white-space: nowrap;
  /* button reset — toggle is a <button> for keyboard access */
  background: none; border: 0; font-family: inherit; line-height: inherit;
}
.billing-opt.active { background: var(--accent); color: #fff; }
.billing-save {
  display: inline-block; background: var(--green); color: #fff;
  font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 100px;
  margin-left: 5px; vertical-align: middle;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.pricing-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .pricing-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

.pricing-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 24px;
  display: flex; flex-direction: column; gap: 0;
}
.pricing-card--pro {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px var(--accent-glow);
}
.pricing-card--current {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 1px var(--green), 0 4px 20px rgba(var(--green-rgb),.12) !important;
}
.pricing-card--soon {
  border-style: dashed;
  opacity: .82;
}

.pricing-recommended {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 14px; border-radius: 100px;
  white-space: nowrap;
}
.pricing-coming-soon-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--text-muted); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 14px; border-radius: 100px;
  white-space: nowrap;
}
.pricing-current-badge {
  position: absolute; top: 12px; right: 14px;
  background: var(--green); color: #fff;
  font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 100px;
}

.pricing-tier {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted); margin-bottom: 8px;
}
.pricing-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 8px; }
.pricing-amount {
  font-size: 2.6rem; font-weight: 800; font-family: var(--font-display);
  color: var(--text-primary); line-height: 1;
}
.pricing-period { font-size: .82rem; color: var(--text-muted); }
.pricing-tagline { font-size: .82rem; color: var(--text-muted); margin-bottom: 20px; }

.pricing-features {
  list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 9px; flex-grow: 1;
}
.pricing-features li { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; }
.feat-yes i { color: var(--green); font-size: .9rem; flex-shrink: 0; margin-top: 1px; }
.feat-no  { color: var(--text-muted) !important; }
.feat-no  i { color: var(--border); font-size: .9rem; flex-shrink: 0; margin-top: 1px; }

.user-plan { text-decoration: none !important; }
.user-plan:hover { opacity: .75; }

.pricing-annual-note {
  font-size: .74rem; color: var(--green); margin: -4px 0 12px;
}

.pricing-trial-note {
  font-size: .78rem; font-weight: 500; color: var(--accent);
  text-align: center; margin-bottom: 10px;
}

.billing-mgmt-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 20px; margin-bottom: 24px;
  gap: 16px; flex-wrap: wrap;
}
.billing-mgmt-info {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .85rem;
}
.billing-mgmt-plan-name {
  font-weight: 700; color: var(--text-primary);
}
.billing-mgmt-interval, .billing-mgmt-renews {
  color: var(--text-muted); font-size: .78rem;
}

/* ============================================
   HOUSEHOLD ONBOARDING PANEL
   ============================================ */
.household-onboarding {
  border: 1px solid var(--accent);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-panel);
}
.onboarding-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(var(--accent-rgb),.1);
  border-bottom: 1px solid var(--accent);
  font-size: .9rem;
}
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
@media (max-width: 900px) { .onboarding-steps { grid-template-columns: 1fr; } }

.onboarding-step {
  display: flex; gap: 14px;
  padding: 20px;
  border-right: 1px solid var(--border);
}
.onboarding-step:last-child { border-right: none; }
@media (max-width: 900px) {
  .onboarding-step { border-right: none; border-bottom: 1px solid var(--border); }
  .onboarding-step:last-child { border-bottom: none; }
}

.onboarding-step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.onboarding-step-body { flex: 1; }
.onboarding-step-title { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.onboarding-step-desc { font-size: .82rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

.onboarding-roles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.onboarding-role { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; color: var(--text-muted); }
.onboarding-role .badge { flex-shrink: 0; margin-top: 1px; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.nav-item--admin {
  color: var(--accent) !important;
  font-weight: 600;
}
.nav-item--admin:hover { opacity: .85; }

.admin-metric {
  display: flex; flex-direction: column; gap: 2px; min-width: 80px;
}
.admin-metric-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.admin-metric-value { font-size: 1.4rem; font-weight: 700; font-family: var(--font-display); }

.plan-pill {
  display: inline-block; padding: 2px 10px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.plan-pill--free    { background: rgba(255,255,255,.08); color: var(--text-muted); }
.plan-pill--pro     { background: rgba(var(--accent-rgb),.15); color: var(--accent); }
.plan-pill--premium { background: rgba(var(--amber-rgb),.15); color: var(--amber); }

.btn-xs { padding: 3px 7px; font-size: 0.72rem; border-radius: 6px; }

.table-row-inactive td { opacity: .5; }

.stat-card--accent { border-color: var(--accent) !important; }

/* Household switcher */
.household-switcher {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.hh-card {
  flex: 0 0 130px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1rem 0.75rem 0.75rem;
  text-align: center;
  transition: border-color 0.15s;
}
.hh-card--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
}
.hh-card-icon {
  font-size: 1.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  line-height: 1;
}
.hh-card--active .hh-card-icon { color: var(--accent); }
.hh-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.hh-card-role { min-height: 1.4rem; }
.hh-card-active-label {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── CSV Import Modal ─────────────────────────────────────────────────────── */
.import-modal-box {
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.import-modal-box .modal-body {
  overflow-y: auto;
  flex: 1;
}
.import-mapper-header {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.import-radio-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.import-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.import-radio input { cursor: pointer; }
.csv-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-family: monospace;
  font-size: 0.75rem;
  overflow: hidden;
}
.csv-preview-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.csv-preview-row {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
/* Summary pills */
.import-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.import-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.import-pill-new  { background: var(--green-bg); color: var(--green); }
.import-pill-skip { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
/* Quick import notice */
.import-quick-notice {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.import-quick-notice .btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-size: inherit;
}
/* Review table */
.import-table-wrap {
  overflow-y: auto;
  max-height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.import-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.import-review-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.import-review-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.import-row-skip td { opacity: 0.45; }
.import-review-table tbody tr:last-child td { border-bottom: none; }
.import-desc {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Status badges */
.import-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.import-badge-new  { background: var(--green-bg);  color: var(--green); }
.import-badge-skip { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
/* Import success step */
.import-success-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 24px;
  text-align: center;
}
.import-success-icon {
  font-size: 3rem;
  color: var(--green);
  margin-bottom: 16px;
  line-height: 1;
}
.import-success-msg {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.import-success-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Header-actions group (transactions page) */
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 768px) {
  .import-modal-box { max-height: 100dvh; border-radius: 0; }
  .import-table-wrap { max-height: 260px; }
}

/* ============================================
   Spacious page layout (Household, Workspace)
   ============================================ */
.spacious-page .page-header {
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.spacious-page .page-header > div:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.spacious-page .card { margin-bottom: 1.25rem; }
.spacious-page .card-header { padding: 16px 20px; }
.spacious-page .card-body { padding: 20px; }
.spacious-page .table > :not(caption) > * > * {
  padding: 14px 16px;
  vertical-align: middle;
}
.spacious-page .badge { padding: 0.4em 0.75em; }

@media (max-width: 768px) {
  .spacious-page .page-header { margin-bottom: 16px; }
  .spacious-page .card-header { padding: 14px 16px; }
  .spacious-page .card-body { padding: 16px; }
  .spacious-page .table > :not(caption) > * > * { padding: 12px 12px; }
}
