:root { --purple: #c084fc; --cyan: #22d3ee; --green: #4ade80; --red: #f87171; --orange: #fb923c; }
* { box-sizing: border-box; margin:0; padding:0; }
body { height: 100vh; background: #0f0f1a; color: #e0e0ff; font-family: 'Inter', sans-serif; overflow: hidden; overflow-x: hidden; display: flex; flex-direction: column; max-width: 100%; }

/* ── LOGIN ──────────────────────────────────────────────────── */
#login-screen { position: fixed; inset: 0; background: #0f0f1a; display: flex; flex-direction: column; z-index: 100; }
.ls-header { background: #1a1a24; border-bottom: 2px solid var(--purple); padding: 13px 24px; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ls-tagline { font-size: 12px; color: #555; }
.ls-main { flex: 1; display: flex; align-items: stretch; overflow: hidden; padding: 20px; gap: 16px; max-width: 1600px; width: 100%; margin: 0 auto; }
.ls-panel { flex: 1; background: #0a0a14; border: 1px solid #1e1e2e; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.ls-panel-title { font-size: 12px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid #1a1a2e; margin-bottom: 10px; flex-shrink: 0; }
.ls-panel-title.omni { border-top: 3px solid var(--purple); color: var(--purple); }
.ls-panel-title.nexus { border-top: 3px solid var(--cyan); color: var(--cyan); }
.ls-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.ls-messages::-webkit-scrollbar { display: none; }
.ls-bubble { padding: 10px 13px; border-radius: 4px 14px 14px 14px; font-size: 13px; line-height: 1.6; color: #d0d0f0; animation: fadeIn 0.4s ease; }
.ls-bubble.omni { background: #16162a; border-left: 3px solid var(--purple); color: #d0d0f0; }
.ls-bubble.nexus { background: #0a1e30; border-left: 3px solid var(--cyan); color: #d0f0ff; }
.ls-typing { display: flex; gap: 5px; padding: 10px 13px; align-items: center; }
.ls-center { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
.ls-center::-webkit-scrollbar { display: none; }
.login-box { background: #1a1a24; border: 1px solid #333; border-radius: 20px; padding: 18px 30px; width: 100%; text-align: center; margin: auto; box-shadow: 0 0 70px rgba(192,132,252,0.07), 0 0 120px rgba(34,211,238,0.045); }
.login-logo { font-size: 19px; font-weight: 800; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; filter: drop-shadow(0 0 11px rgba(192,132,252,0.98)) drop-shadow(0 0 28px rgba(34,211,238,0.70)) drop-shadow(0 0 50px rgba(192,132,252,0.56)); }
.login-subtitle { color: #555; font-size: 12px; margin-bottom: 8px; }
.auth-tabs { display: flex; background: #0f0f1a; border-radius: 10px; padding: 4px; margin-bottom: 10px; }
.auth-tab { flex: 1; padding: 9px; border-radius: 8px; border: none; background: none; color: #888; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.auth-tab.active { background: #1a1a2e; color: #e0e0ff; }
.login-box input { width: 100%; background: #0f0f1a; border: 1px solid #2a2a3e; padding: 10px 16px; border-radius: 12px; color: #e0e0ff; font-size: 14px; margin-bottom: 8px; font-family: 'Inter', sans-serif; text-align: center; }
.login-box input:focus { outline: 1px solid var(--purple); }
.login-box input::placeholder { color: #444; }
/* Beta-code field types a 6-char code at wide 6px spacing — but that made the
   "BETA ACCESS CODE" placeholder overflow/clip. Shrink the PLACEHOLDER only so
   the full label shows; the typed code keeps its spaced-out look. */
#auth-invite::placeholder { letter-spacing: 2px; font-size: 13px; }
.pw-wrap { position: relative; width: 100%; margin-bottom: 8px; }
.pw-wrap input { margin-bottom: 0 !important; padding-left: 44px; padding-right: 44px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #555; padding: 4px; display: flex; align-items: center; }
.pw-toggle:hover { color: var(--purple); }
.auth-btn { width: 100%; background: linear-gradient(90deg, #c084fc, #22d3ee); color: #000; border: none; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px; font-family: 'Inter', sans-serif; }
.auth-error { color: var(--red); font-size: 12px; margin-top: 6px; min-height: 0; }
.lang-toggle { display: flex; justify-content: center; gap: 8px; margin-top: 9px; }
.login-trust { text-align: center; font-size: 11px; color: #444; margin-top: 7px; }
.login-trust a { color: #555; text-decoration: none; }
.login-trust a:hover { color: var(--cyan); }
.lang-btn { background: none; border: 1px solid #2a2a3e; color: #555; font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.lang-btn.active { border-color: var(--purple); color: var(--purple); background: #1a0a2e; }
.lang-btn:hover:not(.active) { border-color: #444; color: #888; }
/* ── AGE GROUP CARDS ───────────────────────────────────────────────────────── */
.age-section { padding: 40px 24px 20px; width: 100%; max-width: 1100px; margin: 0 auto; flex-shrink: 0; }
.age-section-title { text-align: center; font-size: 15px; font-weight: 700; color: #888; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 20px; }
.age-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.age-card { background: #1a1a24; border: 1px solid #2a2a3e; border-radius: 16px; padding: 24px 20px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.2s; }
.age-card:hover { border-color: #3a3a5e; }
.age-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; border: 1px solid; width: fit-content; }
.age-card-headline { font-size: 17px; font-weight: 800; color: #e0e0ff; }
.age-card-body { font-size: 13px; color: #888; line-height: 1.7; flex: 1; }
.age-card-ais { font-size: 11px; color: #555; border-top: 1px solid #2a2a3e; padding-top: 10px; margin-top: 4px; }
.age-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.age-dot { width: 8px; height: 8px; border-radius: 50%; background: #2a2a3e; cursor: pointer; transition: background 0.2s; }
.age-dot.active { background: #c084fc; }
/* Mobile — horizontal swipe, compact height */
@media (max-width: 768px) {
  .age-section { padding: 14px 0 8px; flex-shrink: 0; }
  .age-section-title { padding: 0 20px; font-size: 11px; margin-bottom: 10px; }
  .age-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .age-cards::-webkit-scrollbar { display: none; }
  .age-card { min-width: 78vw; scroll-snap-align: start; flex-shrink: 0; padding: 14px 14px; gap: 6px; }
  .age-card-body { display: none; }
  .age-card-headline { font-size: 14px; }
  .age-badge { font-size: 10px; padding: 3px 8px; }
  .age-card-ais { font-size: 10px; padding-top: 8px; margin-top: 2px; }
  .age-dots { display: flex; margin-top: 8px; }
}
.ls-footer { text-align: center; padding: 10px; font-size: 11px; color: #888; border-top: 1px solid #1a1a24; flex-shrink: 0; }
.ls-footer a { color: #888; text-decoration: none; margin: 0 6px; }
.ls-footer a:hover { color: var(--cyan); }
.ls-mobile-hero { display: none; flex-direction: column; align-items: center; padding: 32px 20px 14px; gap: 5px; text-align: center; flex-shrink: 0; }
.ls-mobile-logo { font-size: 30px; font-weight: 800; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px; }
.ls-mobile-wealthos { font-size: 12px; font-weight: 600; background: linear-gradient(90deg, rgba(192,132,252,0.5), rgba(34,211,238,0.3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 3px; text-transform: uppercase; margin-top: -4px; }
.ls-mobile-tag { font-size: 11px; color: #888; line-height: 1.6; max-width: 280px; }
.ls-mobile-greet { display: none; }
.ls-mobile-char { background: #0a0a14; border: 1px solid #1e1e2e; border-radius: 14px; padding: 10px 10px; flex: 1; min-width: 0; }
.ls-mobile-char-title { font-size: 10px; font-weight: 700; padding-top: 6px; margin-bottom: 7px; }
.ls-mobile-char-title.omni { border-top: 2px solid var(--purple); color: var(--purple); }
.ls-mobile-char-title.nexus { border-top: 2px solid var(--cyan); color: var(--cyan); }
.ls-mobile-msgs { display: flex; flex-direction: column; gap: 6px; }
/* ── MOBILE AI FEATURE CARDS ─────────────────────────────────────────── */
.ls-mobile-cards { display: none; }
.ls-mobile-excel { display: none; }
/* ── MOBILE PORTRAIT SLIDES — hidden everywhere by default ── */
.ls-mob-slide { display: none; }
.ls-mob-bottom { display: none; }
.dash-mob-hint { display: none; }
.ls-mob-peek { display: none; }
.ls-mob-edge-left { display: none; }
.ls-mob-nexus-hint { display: none; }
.ls-mob-login-tag { display: none; }
.ls-mob-swipe-hint { display: none; }
@keyframes swipeHintAnim {
    0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    70%  { opacity: 1; }
    100% { opacity: 0.55; }
}
.ls-mc-card { background: #0f0f1a; border-radius: 14px; padding: 14px; flex: 1; min-width: 0; }
.ls-mc-card.omni { border-top: 2px solid var(--purple); }
.ls-mc-card.nexus { border-top: 2px solid var(--cyan); }
.ls-mc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ls-mc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ls-mc-name { font-size: 13px; font-weight: 800; color: #e0e0ff; line-height: 1; }
.ls-mc-role { font-size: 9px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }
.ls-mc-desc { font-size: 11px; color: #555; line-height: 1.45; margin-bottom: 10px; }
.ls-mc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ls-mc-tags span { font-size: 10px; color: #888; background: #1a1a2e; border-radius: 20px; padding: 3px 8px; white-space: nowrap; }
@media (max-width: 768px) {
    html { overflow-x: clip; }
    body { overflow: visible; }
    #login-screen { height: auto; overflow: visible; }
    .ls-panel { display: none; }
    .ls-header { display: none; }
    .ls-main { padding: 0; flex-direction: column; gap: 0; overflow: visible; }
    .ls-center { width: 100%; display: flex; flex-direction: column; }
    /* ── Hero ── */
    .ls-mobile-hero { display: flex; flex-shrink: 0; padding: 18px 20px 8px; }
    /* ── Chat cards — tall enough to show animated messages ── */
    .ls-mobile-greet { display: none !important; }
    .ls-mobile-cards { display: flex; gap: 10px; padding: 0 14px 0; flex-shrink: 0; }
    .ls-mc-card { height: 190px; display: flex; flex-direction: column; }
    .ls-mc-card .ls-mobile-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; scrollbar-width: none; }
    .ls-mc-card .ls-mobile-msgs::-webkit-scrollbar { display: none; }
    .ls-mc-card .ls-bubble { font-size: 10.5px; padding: 6px 8px; line-height: 1.45; border-radius: 4px 10px 10px 10px; }
    .ls-mc-card .ls-typing { padding: 6px 8px; }
    /* ── Budget download link hidden between cards — lives in footer instead ── */
    .ls-mobile-excel { display: none; }
    /* ── Footer shows download + copyright together ── */
    .ls-footer { display: block; padding: 10px; }
    .ls-footer #ls-footer-excel { display: inline; }
    /* ── Login box ── */
    .login-logo { display: none; }
    .login-subtitle { display: none; }
    .login-box { background: #111118; border: 1px solid #2a2a3e; border-radius: 16px; padding: 16px 14px 12px; margin: 0 14px; width: calc(100% - 28px); flex-shrink: 0; min-height: 400px; }
    .auth-tabs { margin-bottom: 14px; }
    .login-box input { font-size: 16px; padding: 11px 14px; margin-bottom: 8px; }
    .pw-wrap { margin-bottom: 8px; }
    .auth-btn { padding: 13px; font-size: 15px; margin-top: 2px; }
    .auth-error { min-height: 0; margin-top: 4px; }
    .lang-toggle { margin-top: 10px; }
    .login-trust { margin-top: 6px; }
}

/* ── MOBILE PORTRAIT: 3-slide layout ────────────────────────────────── */
@media (max-width: 768px) and (orientation: portrait) {
    html, body { overflow: hidden; height: 100%; }
    #login-screen { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
    .ls-header { display: none; }
    .ls-main { flex: 1; min-height: 0; overflow: hidden; padding: 0; gap: 0; flex-direction: column; }
    .ls-panel { display: none; }
    /* Portrait slides — fixed positioning so they never depend on flex chain */
    .ls-mob-slide { display: none; }
    .ls-mob-slide.active { display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 80px; flex-direction: column; padding: 28px 24px 16px; overflow-y: auto; overflow-x: hidden; background: #0f0f1a; z-index: 40; -webkit-overflow-scrolling: touch; }
    #ls-mob-slide-0.active { border-top: 3px solid var(--purple); }
    #ls-mob-slide-1.active { border-top: 3px solid var(--cyan); }
    .ls-mob-slide-top { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-shrink: 0; }
    .ls-mob-slide-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
    .ls-mob-slide-name { font-size: 34px; font-weight: 900; letter-spacing: -0.5px; line-height: 1; }
    .ls-mob-slide-name.omni { background: linear-gradient(90deg, #c084fc, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .ls-mob-slide-name.nexus { background: linear-gradient(90deg, #22d3ee, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .ls-mob-slide-role { font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
    .ls-mob-slide .ls-messages { flex: 1; min-height: 0; gap: 10px; }
    .ls-mob-slide .ls-bubble { font-size: 14px; line-height: 1.65; }
    .ls-mob-next-btn { flex-shrink: 0; border: none; border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 16px; font-family: 'Inter', sans-serif; }
    .ls-mob-next-btn.omni { background: linear-gradient(90deg, #7c3aed, #4f46e5); color: #fff; }
    .ls-mob-next-btn.nexus { background: linear-gradient(90deg, #0891b2, #4f46e5); color: #fff; }
    /* Slide 3: login — visible by default (CSS fallback if JS doesn't run).
       JS overrides display via inline style when navigating slides. */
    .ls-center { display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 80px; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 28px 22px 20px; background: #0f0f1a; z-index: 40; -webkit-overflow-scrolling: touch; }
    .ls-mobile-hero { display: none !important; }
    .ls-mobile-cards { display: none !important; }
    .ls-mobile-excel { display: none !important; }
    .login-logo { display: none; }
    .login-subtitle { display: none; }
    .login-box { min-height: 0; background: transparent; border: none; border-radius: 0; padding: 0; margin: 0; width: 100%; box-shadow: none; }
    .auth-tabs { margin-bottom: 16px; }
    .login-box input { font-size: 16px; padding: 13px 16px; margin-bottom: 10px; }
    .pw-wrap { margin-bottom: 10px; }
    .auth-btn { padding: 15px; font-size: 16px; margin-top: 4px; }
    .auth-error { min-height: 0; margin-top: 6px; }
    .lang-toggle { margin-top: 14px; }
    .login-trust { margin-top: 8px; }
    /* Bottom bar — fixed so it's always visible */
    .ls-mob-bottom { display: flex; flex-direction: column; align-items: center; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #0a0a14; border-top: 1px solid #1a1a2e; padding: 10px 16px 14px; }
    .ls-mob-dots { display: flex; gap: 10px; margin-bottom: 6px; }
    .ls-mob-swipe-label { font-size: 11px; font-weight: 800; letter-spacing: 0.8px; margin-bottom: 6px; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; text-shadow: 0 0 18px rgba(192,132,252,0.35); }
    .ls-mob-dot { width: 8px; height: 8px; border-radius: 50%; background: #2a2a3e; cursor: pointer; transition: background 0.25s, transform 0.25s; }
    .ls-mob-dot.active { transform: scale(1.4); }
    .ls-mob-dot-0.active { background: var(--purple); }
    .ls-mob-dot-1.active { background: linear-gradient(90deg, var(--purple), var(--cyan)); }
    .ls-mob-dot-2.active { background: var(--cyan); }
    .ls-mob-footer { font-size: 11px; color: #555; text-align: center; line-height: 1.7; }
    .ls-mob-footer a { color: #555; text-decoration: none; }
    .ls-mob-footer a:first-child { color: var(--purple); font-weight: 700; }
    .ls-footer { display: none; }
    /* Permanent edge glows */
    .ls-mob-edge-left { display: block; position: fixed; top: 0; left: 0; bottom: 80px; width: 64px; background: transparent; transform: translateX(-100%); box-shadow: 12px 0 40px rgba(192,132,252,0.15); z-index: 55; pointer-events: none; }
    /* Nexus peek strip */
    .ls-mob-peek { display: block; position: fixed; top: 0; right: 0; bottom: 80px; width: 64px; background: linear-gradient(to left, #0a1a24 0%, rgba(10,26,36,0.85) 55%, transparent 100%); border-left: 3px solid var(--cyan); z-index: 55; pointer-events: none; transform: translateX(100%); transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94); box-shadow: -12px 0 40px rgba(34,211,238,0.15); }
    .ls-mob-peek.visible { transform: translateX(0); }
    /* Swipe hint pill */
    /* Floating pill hint removed — footer label next to the dots is enough */
    .ls-mob-swipe-hint { display: none !important; }
    /* bottom: 80px on fixed slides already clears the nav bar — no extra padding needed */
    /* Logo + tagline on login slide */
    .login-logo { display: block !important; font-size: 32px !important; margin-bottom: 6px !important; letter-spacing: 1px !important; }
    .login-subtitle { display: none !important; }
    .ls-mob-login-tag { display: block; font-size: 13px; color: #666; text-align: center; margin-bottom: 20px; line-height: 1.5; }
    /* Nexus hint on login slide */
    .ls-mob-nexus-hint { display: block; margin-top: 14px; text-align: center; font-size: 12px; color: #555; cursor: pointer; }
    .ls-mob-nexus-hint span { color: var(--cyan); }
    .ls-mob-nexus-hint:hover { color: #888; }
}

/* ── LANDSCAPE PHONES: keep button visible without scrolling ── */
@media (max-height: 500px) {
    .ls-header    { padding: 7px 24px; }
    .ls-main      { padding: 6px 16px; }
    .login-box    { padding: 14px 24px; }
    .login-logo   { font-size: 20px; margin-bottom: 0; }
    .login-subtitle { display: none; }
    .login-box input { padding: 9px 12px; margin-bottom: 7px; }
    .pw-wrap { margin-bottom: 7px; }
    .auth-btn     { padding: 10px; margin-top: 2px; }
    .ls-footer    { display: none; }
}

/* ── DASHBOARD ──────────────────────────────────────────────── */
#dashboard { display: none; flex-direction: column; height: 100vh; }
.header { background: #1a1a24; padding: 12px 14px 12px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--purple); flex-shrink: 0; }
/* v122 — "Soft Aura" logo glow (Keith + his 8-year-old picked it, 1.4x strength).
   Layered drop-shadows give a soft purple<->cyan halo hugging the wordmark. Using filter
   (not a ::before radial) because background-clip:text + a negative-z pseudo renders
   inconsistently across browsers — drop-shadow follows the gradient glyphs reliably and is
   never clipped by overflow. Tune the three blur radii / alphas to dial glow strength. */
.logo { font-size: 20px; font-weight: 800; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 11px rgba(192,132,252,0.98)) drop-shadow(0 0 28px rgba(34,211,238,0.70)) drop-shadow(0 0 50px rgba(192,132,252,0.56)); }
.header-logo { height: 52px; width: auto; object-fit: contain; }
.ws-logo-img { height: 90px; width: auto; object-fit: contain; margin-bottom: 20px; }
.login-logo-img { height: 70px; width: auto; object-fit: contain; margin-bottom: 4px; }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.acct-dropdown { position: relative; }
.acct-trigger { background: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(34,211,238,0.12)); border: 1px solid rgba(192,132,252,0.35); cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9999px; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s; font-family: 'Inter', sans-serif; box-shadow: 0 0 0 0 rgba(192,132,252,0); }
.acct-trigger:hover { background: linear-gradient(135deg, rgba(192,132,252,0.22), rgba(34,211,238,0.22)); border-color: rgba(192,132,252,0.6); box-shadow: 0 0 14px rgba(192,132,252,0.25); }
.acct-trigger:active { transform: scale(0.97); }
.acct-name { font-size: 14px; font-weight: 700; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.acct-gear { font-size: 13px; line-height: 1; }
.acct-label { font-size: 13px; font-weight: 700; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.acct-whoami { padding: 4px 10px 9px; }
.acct-whoami-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 2px; }
.acct-whoami-name { font-size: 13px; font-weight: 700; color: #e0e0ff; }
.acct-whoami-email { font-size: 11px; color: #777; word-break: break-all; margin-top: 1px; }
.acct-chevron { color: #c084fc; font-size: 11px; font-weight: 800; transition: transform 0.25s; margin-top: 1px; }
.acct-dropdown.open .acct-trigger { background: linear-gradient(135deg, rgba(192,132,252,0.28), rgba(34,211,238,0.28)); border-color: #c084fc; box-shadow: 0 0 16px rgba(192,132,252,0.35); }
.acct-dropdown.open .acct-chevron { transform: rotate(180deg); }
.acct-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #1a1a24; border: 1px solid #2a2a3e; border-radius: 14px; padding: 8px; min-width: 190px; z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.acct-dropdown.open .acct-menu { display: block; }
.acct-lang-row { display: flex; gap: 6px; margin-bottom: 4px; }
.acct-lang-btn { flex: 1; background: none; border: 1px solid #2a2a3e; color: #555; font-size: 11px; font-weight: 600; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.acct-lang-btn.active { border-color: var(--purple); color: var(--purple); background: #1a0a2e; }
.acct-lang-btn:hover:not(.active) { border-color: #444; color: #888; }
.acct-divider { height: 1px; background: #2a2a3e; margin: 6px 0; }
.acct-menu-item { width: 100%; background: none; border: none; color: #aaa; font-size: 13px; font-weight: 500; padding: 9px 12px; border-radius: 8px; cursor: pointer; text-align: left; font-family: 'Inter', sans-serif; transition: background 0.2s; display: block; }
.acct-menu-item:hover { background: #222230; color: #e0e0ff; }
.acct-danger { color: #f87171 !important; }
.acct-danger:hover { background: #2a1a1a !important; }
/* Nexus paper-trades disclaimer — inside message bubble when trade tag fires */
.nexus-disclaimer-inline {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px dashed rgba(34, 211, 238, 0.25);
    font-size: 11px; font-style: italic; font-weight: 500;
    color: rgba(34, 211, 238, 0.75); letter-spacing: 0.3px;
}
/* Persistent ribbon at the bottom of the Nexus chat panel */
.nexus-disclaimer-ribbon {
    padding: 6px 12px; margin: 0 0 4px;
    text-align: center;
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.5px; color: rgba(34, 211, 238, 0.7);
    background: rgba(10, 30, 48, 0.6);
    border-top: 1px solid rgba(34, 211, 238, 0.18);
    border-bottom: 1px solid rgba(34, 211, 238, 0.18);
    user-select: none;
}
/* Email-pref toggle rows in account dropdown */
.acct-pref-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; font-size: 13px; color: #aaa; }
.acct-pref-row:hover { background: #222230; border-radius: 8px; color: #e0e0ff; }
.acct-pref-label { cursor: pointer; flex: 1; user-select: none; }
.acct-toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.acct-toggle input { opacity: 0; width: 0; height: 0; }
.acct-toggle-slider { position: absolute; inset: 0; background: #2a2a3e; border-radius: 20px; transition: background 0.2s; }
.acct-toggle-slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px; background: #777; border-radius: 50%; transition: 0.2s; }
.acct-toggle input:checked + .acct-toggle-slider { background: linear-gradient(90deg, #c084fc, #22d3ee); }
.acct-toggle input:checked + .acct-toggle-slider::before { transform: translateX(16px); background: #fff; }
.acct-legal { text-align: center; padding: 8px 6px 4px; font-size: 10px; color: #444; line-height: 1.5; }
.acct-legal a { color: #777; text-decoration: none; }
.acct-legal a:hover { color: var(--purple); }
.main { flex: 1; display: flex; overflow: hidden; max-width: 1800px; width: 100%; margin: 0 auto; }

/* ── TICKER BAR ─────────────────────────────────────────────── */
.ticker-bar { background: #0a0a12; border-bottom: 1px solid #1a1a2e; height: 28px; overflow: hidden; display: flex; align-items: center; flex-shrink: 0; position: relative; }
.ticker-bar::before, .ticker-bar::after { content:''; position:absolute; top:0; bottom:0; width:40px; z-index:2; pointer-events:none; }
.ticker-bar::before { left:0; background: linear-gradient(90deg, #0a0a12, transparent); }
.ticker-bar::after  { right:0; background: linear-gradient(270deg, #0a0a12, transparent); }
.ticker-track { display: flex; align-items: center; white-space: nowrap; animation: tickerScroll 40s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 5px; padding: 0 18px; font-size: 11px; font-weight: 700; border-right: 1px solid #1a1a2e; color: #888; cursor: default; }
.ticker-symbol { color: #e0e0ff; }
.ticker-price { color: #888; }
.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red); }
.ticker-change.flat { color: #888; }
.ticker-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.ticker-dot.up { background: var(--green); }
.ticker-dot.down { background: var(--red); }
.ticker-dot.flat { background: #888; }

/* ── PANELS ─────────────────────────────────────────────────── */
.panel { padding: 14px; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid #1a1a2e; width: 28%; background: #0a0a14; transition: box-shadow 0.3s ease; }
.panel.glow-omni { animation: glowOmni 1s ease-out forwards; }
.panel.glow-nexus { animation: glowNexus 1s ease-out forwards; }
@keyframes glowOmni { 0%{box-shadow:0 0 0 2px var(--purple)} 100%{box-shadow:none} }
@keyframes glowNexus { 0%{box-shadow:0 0 0 2px var(--cyan)} 100%{box-shadow:none} }
@keyframes omniPulse { 0%,100%{box-shadow:0 0 8px 2px var(--purple);} 50%{box-shadow:0 0 24px 6px var(--purple);} }
.panel.omni-pulse { animation: omniPulse 2s ease-in-out infinite; }
/* 2026-05-26 Task #132 — overlay must BLOCK events, not pass them through.
   The old pointer-events:none let clicks/keystrokes target the chat input
   underneath, so users could talk to Nexus before unlocking — defeating the
   whole gate. pointer-events:auto + cursor:not-allowed makes the overlay
   actually catch every interaction in its area until the lock is removed. */
.nexus-lock-overlay { position:absolute; inset:0; background:rgba(10,10,20,0.88); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; z-index:10; pointer-events:auto; cursor:not-allowed; }
.nexus-lock-icon { font-size:30px; }
.nexus-lock-text { font-size:12px; color:#555; text-align:center; line-height:1.7; }
.panel-title { font-size: 13px; font-weight: 700; padding: 6px 0 10px; border-bottom: 1px solid #1a1a2e; margin-bottom: 8px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: none; }
.unread-dot.omni { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.unread-dot.nexus { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.unread-dot.visible { display: inline-block; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 0; scrollbar-width: none; }
.messages::-webkit-scrollbar { display: none; }
.message { max-width: 90%; padding: 9px 13px; border-radius: 16px; line-height: 1.55; font-size: 13px; }
.user { background: #22d3ee; color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.omni-msg { background: #16162a; border-left: 3px solid var(--purple); }
.nexus-msg { background: #16162a; border-left: 3px solid var(--cyan); }
.user-omni  { background: #c084fc; color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.user-nexus { background: #22d3ee; color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.error-msg { background: #1a0a0a; border-left: 3px solid var(--red); color: var(--red); font-size: 11px; }
.typing { opacity: 0.4; font-style: italic; }
.input-row { display: flex; gap: 6px; margin-top: 8px; flex-shrink: 0; }
.chat-input { flex: 1; background: #1a1a2e; border: 1px solid #2a2a3e; padding: 9px 14px; border-radius: 9999px; color: #e0e0ff; font-size: 16px; min-width: 0; }
.chat-input:focus { outline: 1px solid var(--purple); }
.send-btn { background: #22d3ee; color: #000; border: none; padding: 9px 16px; border-radius: 9999px; font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.import-btn { background: none; border: 1px solid #2a2a3a; color: #666; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; title: "Import budget spreadsheet"; }
.import-btn:hover { border-color: var(--purple); color: var(--purple); }
#omni-file-input { display: none; }
.db-status { font-size: 10px; color: #333; margin-top: 3px; text-align: center; flex-shrink: 0; }
.db-status.connected { color: var(--green); }

/* ── MIDDLE ─────────────────────────────────────────────────── */
.middle { flex: 1; background: #0f0f1a; padding: 16px; overflow-y: auto; scrollbar-width: none; position: relative; }
.middle::-webkit-scrollbar { display: none; }
.tabs { display: flex; background: #1a1a24; border-radius: 12px; overflow: hidden; margin-bottom: 16px; position: sticky; top: 0; z-index: 20; box-shadow: 0 6px 16px rgba(0,0,0,0.55); }
.tab { flex: 1; padding: 11px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600; color: #666; }
.tab.active { background: var(--purple); color: #000; }

/* ── CHECKLIST ──────────────────────────────────────────────── */
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.section-sub { color: #666; font-size: 12px; margin-bottom: 18px; }
.progress-label { font-size: 11px; color: #555; margin-bottom: 5px; }
.progress-bar-wrap { background: #1a1a24; border-radius: 9999px; height: 5px; margin-bottom: 16px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--purple), var(--green)); border-radius: 9999px; transition: width 0.5s ease; width: 0%; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: center; gap: 12px; background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 12px; padding: 13px 14px; transition: all 0.4s ease; }
.checklist-item.done { border-color: var(--green); background: #0a160a; }
.check-circle { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #333; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; color: transparent; transition: all 0.4s ease; }
.checklist-item.done .check-circle { background: var(--green); border-color: var(--green); color: #000; }
.check-label { font-size: 13px; font-weight: 600; }
.check-sub { font-size: 11px; color: #555; margin-top: 1px; }
.checklist-item.done .check-label { color: var(--green); }
.check-text { flex: 1; min-width: 0; }
.check-value { font-size: 13px; font-weight: 700; color: var(--green); flex-shrink: 0; opacity: 0; transition: opacity 0.5s ease; }
.checklist-item.done .check-value { opacity: 1; }

/* ── LIVE BUDGET ─────────────────────────────────────────────── */
#live-budget { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.lb-section { background: #111118; border: 1px solid #1e1e2e; border-radius: 12px; overflow: hidden; transition: border-color 0.3s ease; }
.lb-section.lb-has-data { border-color: rgba(138,43,226,0.35); }
.lb-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.lb-title { font-size: 10px; font-weight: 700; color: #555; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-section.lb-has-data .lb-title { color: #aaa; }
.lb-total { font-size: 12px; font-weight: 700; color: var(--green); }
.lb-rows { display: flex; flex-direction: column; padding: 0 14px 8px; }
.lb-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #161622; }
.lb-row:last-child { border-bottom: none; }
.lb-row-name { font-size: 12px; color: #888; }
.lb-row-val { font-size: 12px; font-weight: 600; color: #d0d0ee; text-align: right; }
.lb-row-val.grn { color: var(--green); }
.lb-row-val.red { color: #f87171; }
.lb-row-val.amb { color: var(--amber); }
/* Cash flow summary bar */
.lb-cashflow { background: #0d0d1a; border: 1px solid #2a2a3e; border-radius: 12px; padding: 12px 16px; margin-top: 2px; }
.lb-cf-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.lb-cf-label { font-size: 12px; color: #777; }
.lb-cf-val { font-size: 13px; font-weight: 700; color: #d0d0ee; }
.lb-cf-divider { border-top: 1px solid #2a2a3e; margin: 6px 0; }
.lb-cf-bottom .lb-cf-label { font-size: 13px; font-weight: 700; color: #c0c0e0; }
.lb-cf-bottom .lb-cf-val { font-size: 15px; }

/* ── BUDGET PROFILE ─────────────────────────────────────────── */
#budget-profile { display: block; } /* 2026-05-25 Keith merge: sole Budget UI, visible always (was display:none until budget complete) */
.bp-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.bp-card-title { font-size: 13px; font-weight: 700; color: #e0e0ff; margin-bottom: 12px; }
.bp-header { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 14px; }
.bp-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #1a1a2e; font-size: 13px; }
.bp-row:last-child { border-bottom: none; }
.bp-label { color: #888; }
.bp-val { font-weight: 700; color: #e0e0ff; }
.bp-row.highlight .bp-val { color: var(--green); font-size: 15px; }
.edit-budget-btn { width: 100%; margin-top: 14px; background: none; border: 1px solid #2a2a3a; color: #666; padding: 11px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.edit-budget-btn:hover { border-color: var(--purple); color: var(--purple); }

/* ── BUDGET SUMMARY (legacy — keeping for compat) ───────────── */
.summary-title { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 12px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summary-card { background: #0f0f1a; border-radius: 10px; padding: 11px 13px; }
.summary-card-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.summary-card-value { font-size: 17px; font-weight: 700; color: #e0e0ff; margin-top: 2px; }
.summary-card.highlight .summary-card-value { color: var(--green); }
.nexus-alert { background: linear-gradient(135deg, #1a0a2e, #0a1a2e); border: 1px solid var(--cyan); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 12px; color: var(--cyan); }

/* ── AGGRESSION DIAL ────────────────────────────────────────── */
.aggression-wrap { margin-bottom: 16px; }
.aggression-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 7px; }
.aggression-btns { display: flex; gap: 7px; }
.agg-btn { flex: 1; padding: 8px 4px; border-radius: 10px; border: 1px solid #2a2a3a; background: #1a1a24; color: #555; font-size: 11px; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.2s; }
.agg-btn.active-conservative { border-color: var(--green); background: #0a160a; color: var(--green); }
.agg-btn.active-moderate { border-color: var(--orange); background: #1a0f0a; color: var(--orange); }
.agg-btn.active-aggressive { border-color: var(--red); background: #1a0a0a; color: var(--red); }

/* ── PORTFOLIO ──────────────────────────────────────────────── */
#portfolio-content { display: none; }
.portfolio-empty { text-align: center; padding: 40px 20px; color: #9a9ab5; }
.portfolio-empty .emoji { font-size: 44px; margin-bottom: 10px; }
.profile-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.profile-card-title { font-size: 12px; font-weight: 700; color: var(--cyan); margin-bottom: 10px; }
.profile-chips { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.chip { background: #0f0f1a; border: 1px solid #2a2a3a; border-radius: 9999px; padding: 4px 11px; font-size: 11px; color: #888; transition: color 0.25s, border-color 0.25s, box-shadow 0.25s; }
.chip.active { border-color: var(--cyan); color: var(--cyan); border-style: solid; opacity: 1; box-shadow: 0 0 8px rgba(34,211,238,0.18); }
.chip-empty { color: #555; border-style: dashed; border-color: #33334a; opacity: 0.75; }
/* Investor profile strip — top of Portfolio tab, right-aligned, fills live */
.investor-profile-card { padding: 12px 16px 2px; text-align: right; }
.ip-title { font-size: 11px; font-weight: 700; color: var(--cyan); margin-bottom: 8px; }
.ip-progress { font-size: 10px; font-weight: 700; color: #666; margin-left: 4px; }
@keyframes chipPop { 0% { transform: scale(0.82); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
.chip-pop { animation: chipPop 0.42s ease; }
.portfolio-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.port-stat { background: #1a1a24; border-radius: 10px; padding: 12px; text-align: center; }
.port-stat-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.port-stat-value { font-size: 18px; font-weight: 800; }
.port-stat-value.pos { color: var(--green); }
.port-stat-value.neg { color: var(--red); }
.holdings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.holdings-table th { text-align: left; color: #444; font-weight: 600; padding: 7px 9px; border-bottom: 1px solid #1a1a24; font-size: 10px; text-transform: uppercase; }
.holdings-table td { padding: 10px 9px; border-bottom: 1px solid #1a1a24; vertical-align: middle; }
.ticker-badge { background: #0f0f1a; border: 1px solid #2a2a3a; border-radius: 6px; padding: 2px 7px; font-weight: 700; font-size: 11px; color: var(--cyan); display: inline-block; }
.gain { color: var(--green); }
.loss { color: var(--red); }
.alloc-bar-wrap { background: #1a1a24; border-radius: 9999px; height: 4px; width: 50px; display: inline-block; vertical-align: middle; margin-left: 5px; }
.alloc-bar { height: 100%; background: var(--cyan); border-radius: 9999px; }
.prices-note { font-size: 10px; color: #444; text-align: center; margin-top: 10px; }
.paper-disclaimer { display: flex; align-items: center; gap: 10px; background: #1a1408; border: 1px solid #78350f; border-radius: 10px; padding: 8px 14px; margin: 0 0 12px 0; flex-wrap: wrap; }
.paper-disclaimer-badge { font-size: 9px; font-weight: 800; letter-spacing: 0.8px; color: #fbbf24; background: #292000; border: 1px solid #78350f; border-radius: 9999px; padding: 3px 9px; white-space: nowrap; }
.paper-disclaimer-text { font-size: 11px; color: #92400e; color: #d97706; line-height: 1.4; }
.paper-disclaimer-text a { color: #fbbf24; text-decoration: underline; }

/* ── PORTFOLIO NEWS ────────────────────────────────────────── */
.news-panel { background: #0f0f1a; border: 1px solid #2a2a3e; border-radius: 14px; padding: 14px; margin-top: 14px; }
.news-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.news-panel-title { font-size: 12px; font-weight: 700; color: #e0e0ff; }
.news-sync-time { font-size: 10px; color: #444; }
.news-item { display: block; padding: 10px 0; border-bottom: 1px solid #1a1a24; text-decoration: none; color: inherit; transition: opacity 0.15s; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:hover { opacity: 0.75; }
.news-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.news-source { font-size: 10px; font-weight: 600; color: var(--cyan); text-transform: uppercase; }
.news-time { font-size: 10px; color: #444; }
.news-tickers { font-size: 10px; color: #555; background: #1a1a24; border-radius: 4px; padding: 1px 5px; }
.news-title { font-size: 12px; color: #ccc; line-height: 1.5; }

/* ── ALPACA LIVE PANEL ─────────────────────────────────────── */
.alpaca-panel { background: #0f0f1a; border: 1px solid #22d3ee33; border-radius: 14px; padding: 16px; margin-top: 16px; }
.alpaca-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.alpaca-panel-title { font-size: 13px; font-weight: 700; color: var(--cyan); }
.alpaca-sync-row { display: flex; align-items: center; gap: 8px; }
.alpaca-sync-time { font-size: 10px; color: #444; }
.alpaca-sync-btn { background: transparent; border: 1px solid #2a2a3e; border-radius: 6px; color: #666; font-size: 11px; padding: 3px 8px; cursor: pointer; transition: all 0.2s; }
.alpaca-sync-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.alpaca-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.alpaca-stat { background: #1a1a24; border-radius: 10px; padding: 10px 12px; }
.alpaca-stat-label { font-size: 9px; color: #555; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.alpaca-stat-value { font-size: 15px; font-weight: 700; color: #e0e0ff; }

/* ── POSITIONS TABLE (Fidelity-style) ─────────────────────── */
.alpaca-pos-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.alpaca-pos-table th { text-align: left; color: #555; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid #1a1a2e; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.alpaca-pos-table th:nth-child(3), .alpaca-pos-table th:nth-child(4) { text-align: right; }
.alpaca-pos-table td { padding: 12px 12px; border-bottom: 1px solid #111126; vertical-align: middle; }
.alpaca-pos-table td:nth-child(3), .alpaca-pos-table td:nth-child(4) { text-align: right; }
.alpaca-pos-table tr:last-child td { border-bottom: none; }
.alpaca-pos-table tr:hover td { background: rgba(34,211,238,0.04); }
.alpaca-pos-table .gain { color: #22c55e; font-weight: 700; font-size: 13px; }
.alpaca-pos-table .loss { color: #ef4444; font-weight: 700; font-size: 13px; }
.pos-qty { color: #888; font-size: 12px; }
.pos-pct { font-size: 10px; opacity: 0.7; margin-top: 2px; font-weight: 500; }
.hld-price { color: #888; font-size: 12px; }

/* ── HOLDINGS TABLE (Polygon prices, Fidelity-style) ────────── */
.holdings-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.holdings-table th { text-align: left; color: #555; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid #1a1a2e; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.holdings-table th:nth-child(4), .holdings-table th:nth-child(5) { text-align: right; }
.holdings-table td { padding: 12px 12px; border-bottom: 1px solid #111126; vertical-align: middle; }
.holdings-table td:nth-child(4), .holdings-table td:nth-child(5) { text-align: right; }
.holdings-table tr:last-child td { border-bottom: none; }
.holdings-table tr:hover td { background: rgba(34,211,238,0.04); }
.holdings-table .gain { color: #22c55e; font-weight: 700; }
.holdings-table .loss { color: #ef4444; font-weight: 700; }

.alpaca-loading { font-size: 12px; color: #444; text-align: center; padding: 16px; }
.alpaca-empty { font-size: 12px; color: #444; text-align: center; padding: 16px; }
.alpaca-chart-wrap { margin-bottom: 16px; }
.alpaca-chart-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.alpaca-chart-label { font-size: 11px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.alpaca-period-btns { display: flex; gap: 4px; }
.alpaca-period { background: transparent; border: 1px solid #2a2a3e; border-radius: 6px; color: #555; font-size: 10px; font-weight: 600; padding: 3px 8px; cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.alpaca-period:hover { border-color: var(--cyan); color: var(--cyan); }
.alpaca-period.active { background: #22d3ee22; border-color: var(--cyan); color: var(--cyan); }
@media (max-width: 600px) { .alpaca-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── SUGGESTION MODAL ──────────────────────────────────────── */
.suggestion-backdrop { position: absolute; inset: 0; background: rgba(5,5,15,0.92); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 20px; padding-top: 32px; backdrop-filter: blur(4px); animation: fadeIn 0.25s ease; overflow-y: auto; }
.suggestion-modal { background: #111118; border: 1px solid var(--cyan); border-radius: 20px; width: 100%; padding: 24px; position: relative; }
.suggestion-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.suggestion-modal-title { font-size: 15px; font-weight: 800; color: var(--cyan); }
.suggestion-modal-sub { font-size: 12px; color: #555; margin-bottom: 20px; }
.suggestion-close { background: none; border: 1px solid #2a2a3a; color: #666; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.suggestion-close:hover { border-color: var(--red); color: var(--red); }
.suggestion-cards { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 340px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--cyan) #1a1a24; }
.suggestion-cards::-webkit-scrollbar { width: 4px; }
.suggestion-cards::-webkit-scrollbar-track { background: #1a1a24; border-radius: 9999px; }
.suggestion-cards::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 9999px; }
/* Compact suggestion cards (2026-06-18) — half-height so the whole basket is visible */
.sug-card { background: #0a0a18; border: 1px solid #2a2a3a; border-radius: 14px; padding: 12px 14px; width: 100%; display: flex; flex-direction: column; gap: 5px; transition: border-color 0.2s; box-sizing: border-box; }
.sug-card:hover { border-color: var(--cyan); }
.sug-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sug-type { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 9999px; display: inline-block; }
.sug-type.etf-growth  { background: #0a1a10; color: var(--green); border: 1px solid var(--green); }
.sug-type.etf-dividend{ background: #1a1a0a; color: var(--orange); border: 1px solid var(--orange); }
.sug-type.stock       { background: #0a1a2e; color: var(--cyan);  border: 1px solid var(--cyan); }
.sug-ticker-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sug-ticker { font-size: 20px; font-weight: 800; color: #e0e0ff; line-height: 1; }
.sug-price  { font-size: 11px; color: #666; }
.sug-alloc  { font-size: 16px; font-weight: 800; color: var(--green); line-height: 1; }
.sug-desc   { font-size: 11px; color: #888; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sug-ask-btn { align-self: flex-start; background: none; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 8px; padding: 5px 10px; font-size: 10px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; margin-top: 1px; }
.sug-ask-btn:hover { background: var(--cyan); color: #000; }
.suggestion-footer { margin-top: 18px; text-align: center; font-size: 12px; color: #555; }
.sug-confirm-btn { background: linear-gradient(90deg,#c084fc,#22d3ee); color: #000; border: none; border-radius: 10px; padding: 11px 22px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.sug-confirm-btn:hover { opacity: 0.85; }
.sug-decline-btn { background: none; border: 1px solid #333; color: #666; border-radius: 10px; padding: 11px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; transition: border-color 0.2s; }

/* ── SUBSCRIPTION PANEL ──────────────────────────────────── */
.sub-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sub-panel-title { font-size: 14px; font-weight: 700; color: #e0e0ff; }
.sub-panel-total { font-size: 12px; color: #f87171; font-weight: 600; }
.sub-row { display: flex; align-items: center; gap: 10px; background: #1a1a24; border: 1px solid #2a2a3e; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.sub-row-name { flex: 1; font-size: 13px; color: #e0e0ff; font-weight: 600; }
.sub-row-amount { font-size: 12px; color: #888; white-space: nowrap; }
.sub-cancel-btn { background: none; border: 1px solid #f87171; color: #f87171; border-radius: 8px; padding: 5px 12px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.sub-cancel-btn:hover { background: #f87171; color: #000; }

/* ── BILL KILLER MODAL (Omni theme) ─────────────── */
.sub-backdrop { position: absolute; inset: 0; background: rgba(5,5,15,0.92); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 20px; padding-top: 32px; backdrop-filter: blur(4px); animation: fadeIn 0.25s ease; overflow-y: auto; }
.sub-modal { background: #111118; border: 1px solid var(--purple); border-radius: 20px; width: 100%; padding: 24px; position: relative; }
.sub-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.sub-modal-title { font-size: 15px; font-weight: 800; color: var(--purple); }
.sub-modal-sub { font-size: 12px; color: #555; margin-bottom: 16px; }
.sub-modal-close { background: none; border: 1px solid #2a2a3a; color: #666; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.sub-modal-close:hover { border-color: var(--purple); color: var(--purple); }
.sub-card { background: #16162a; border: 1px solid #3a2a4e; border-radius: 14px; padding: 16px; width: 100%; display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; margin-bottom: 16px; }
.sub-type-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 9999px; display: inline-block; align-self: flex-start; background: #1a0a2e; color: var(--purple); border: 1px solid var(--purple); }
.sub-card-name { font-size: 22px; font-weight: 800; color: #e0d0ff; letter-spacing: -0.5px; }
.sub-card-amount { font-size: 14px; font-weight: 700; color: var(--red); }
.sub-card-voice { font-size: 12px; color: var(--purple); font-weight: 600; padding-top: 10px; border-top: 1px solid #2a1a3e; }
.sub-step-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sub-step { display: flex; align-items: flex-start; gap: 12px; }
.sub-step-num { background: linear-gradient(135deg, #c084fc, #a855f7); color: #000; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.sub-step-text { font-size: 13px; color: #aaa; line-height: 1.6; }
.sub-step-loading { font-size: 13px; color: var(--purple); font-weight: 700; padding: 12px 0; display: flex; align-items: center; gap: 8px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.kill-it-btn { background: none; border: 1px solid #f87171; color: #f87171; border-radius: 8px; padding: 5px 12px; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif; transition: all 0.2s; letter-spacing: 0.3px; }
.kill-it-btn:hover { background: #f87171; color: #000; transform: scale(1.04); }
.sub-modal-footer { display: flex; gap: 10px; }
.sub-confirm-btn { flex: 1; background: linear-gradient(90deg, #c084fc, #a855f7); color: #000; border: none; border-radius: 10px; padding: 12px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.sub-confirm-btn:hover { opacity: 0.85; }
.sub-decline-btn { background: none; border: 1px solid #3a2a4e; color: #555; border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.sub-decline-btn:hover { border-color: var(--purple); color: var(--purple); }
.sug-decline-btn:hover { border-color: #666; color: #aaa; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 768px) { .suggestion-modal { padding: 18px; } .sug-card { min-width: 150px; max-width: 150px; } }

/* ── NEXUS RECOMMENDATION CARD ─────────────────────────────── */
.nexus-rec-card { background: #0a1a2e; border: 1px solid var(--cyan); border-radius: 12px; padding: 14px 16px; margin: 4px 0; max-width: 92%; }
.nexus-rec-header { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.nexus-rec-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #0f2a3a; }
.nexus-rec-row:last-child { border-bottom: none; }
.nexus-rec-ticker { font-weight: 800; color: var(--cyan); font-size: 14px; width: 60px; }
.nexus-rec-alloc { color: var(--green); font-weight: 700; width: 45px; text-align: center; }
.nexus-rec-price { color: #888; font-size: 12px; }

/* ── CREDIT TAB ─────────────────────────────────────────────── */
.credit-score-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 16px; padding: 22px 20px; text-align: center; margin-bottom: 18px; }
.credit-score-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.credit-score-number { font-size: 52px; font-weight: 800; color: #e0e0ff; margin-bottom: 14px; line-height: 1; }
.credit-bar-wrap { background: linear-gradient(90deg, #f87171, #fb923c, #facc15, #4ade80, #22d3ee); border-radius: 9999px; height: 8px; margin-bottom: 6px; position: relative; }
.credit-bar-fill { position: absolute; right: 0; top: 0; bottom: 0; background: #1a1a24; border-radius: 0 9999px 9999px 0; transition: width 1s ease; }
.credit-bar-labels { display: flex; justify-content: space-between; font-size: 9px; color: #555; margin-bottom: 12px; }
.credit-tier { font-size: 13px; font-weight: 700; color: var(--green); }
.credit-plan-btn { width: 100%; background: linear-gradient(90deg, var(--purple), var(--cyan)); color: #000; border: none; padding: 13px; border-radius: 12px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif; margin-bottom: 14px; }
.credit-plan-area { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 12px; padding: 16px; font-size: 13px; color: #aaa; line-height: 1.8; display: none; }
.credit-plan-area.visible { display: block; }
/* ── CREDIT CARD PORTFOLIO ─────────────────────────────────────── */
.cc-portfolio { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 14px; padding: 18px 20px; margin-top: 14px; }
.cc-portfolio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cc-portfolio-title { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
.cc-portfolio-count { font-size: 11px; color: #555; }
.cc-card-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #22223a; }
.cc-card-row:last-child { border-bottom: none; }
.cc-card-left { display: flex; align-items: center; gap: 10px; }
.cc-card-icon { width: 34px; height: 22px; background: linear-gradient(135deg, var(--purple), var(--cyan)); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.cc-card-name { font-size: 14px; font-weight: 700; color: #e0e0ff; }
.cc-card-right { text-align: right; }
.cc-card-balance { font-size: 15px; font-weight: 800; color: #f87171; }
.cc-card-min { font-size: 11px; color: #555; margin-top: 2px; }
.cc-portfolio-total { border-top: 1px solid #2a2a3a; margin-top: 12px; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.cc-total-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.6px; }
.cc-total-right { text-align: right; }
.cc-total-balance { font-size: 18px; font-weight: 800; color: #f87171; }
.cc-total-min { font-size: 11px; color: #555; margin-top: 2px; }
.cc-empty { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 16px; padding: 30px 22px; text-align: center; margin-top: 14px; }
.cc-empty-icon { font-size: 30px; margin-bottom: 10px; opacity: 0.55; }
.cc-empty-text { font-size: 14px; font-weight: 700; color: #c9d2e0; margin-bottom: 5px; }
.cc-empty-sub { font-size: 12px; color: #8a8aa0; line-height: 1.6; }
.credit-action { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #1a1a2e; }
.credit-action:last-child { border-bottom: none; }
.credit-action-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.credit-action-text { font-size: 13px; color: #ccc; line-height: 1.6; }

/* ── BANK TAB ───────────────────────────────────────────────── */
.bank-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 600px) { .bank-cards { grid-template-columns: 1fr; } }
/* In-flight T+2 strip on the Bank tab — only renders when pending transfers exist */
.bank-inflight { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.bank-inflight-hdr { font-size: 11px; font-weight: 700; color: #f59e0b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.bank-inflight-line { font-size: 13px; color: #d0c8b8; padding: 4px 0; line-height: 1.5; }
/* T+2 pending block inside the Portfolio Alpaca panel */
.alp-pending { background: rgba(245,158,11,0.06); border-top: 1px dashed rgba(245,158,11,0.3); padding: 12px 18px; }
.alp-pending-hdr { font-size: 11px; font-weight: 700; color: #f59e0b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.alp-pending-line { font-size: 13px; color: #d0c8b8; padding: 3px 0; line-height: 1.5; }
.bank-card-pending { font-size: 11px; color: #f59e0b; line-height: 1.4; padding-top: 6px; border-top: 1px dashed rgba(245,158,11,0.2); margin-top: 6px; }
.bank-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 14px; padding: 20px 16px; text-align: center; }
.bank-card.brokerage { border-color: var(--cyan); grid-column: span 2; background: #0a1a24; }
.bank-card-icon { font-size: 26px; margin-bottom: 6px; }
.bank-card-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.bank-card-balance { font-size: 26px; font-weight: 800; color: #e0e0ff; }
.bank-card.brokerage .bank-card-balance { color: var(--cyan); }
.bank-transfer-hint { font-size: 12px; color: #444; text-align: center; padding: 12px 14px; border: 1px dashed #2a2a3a; border-radius: 10px; line-height: 1.7; }
/* Accounts tab v144 — "Move Money" helper card (replaces the old floating dashed hint) */
.move-money-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 14px; padding: 14px 16px; margin-top: 16px; }
.move-money-title { font-size: 13px; font-weight: 700; color: #e0e0ff; letter-spacing: 0.03em; margin-bottom: 10px; }
.move-money-row { font-size: 12px; color: #9a9ab5; line-height: 1.5; margin-bottom: 7px; }
.move-money-row:last-child { margin-bottom: 0; }
.mm-who { font-weight: 700; }
.mm-who.nexus { color: var(--cyan); }
.mm-who.omni { color: var(--purple); }
.move-money-row .mm-eg { color: #6a6a85; }
.transfer-log { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.transfer-row { background: #1a1a24; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #888; display: flex; justify-content: space-between; align-items: center; }
.transfer-row .t-amount { color: var(--green); font-weight: 700; }

/* ── BUDGET STYLE PICKER ────────────────────────────────────── */
.style-pick-btn { background: #1a1a2e; border: 1px solid #c084fc44; color: #c084fc; font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 10px; cursor: pointer; text-align: left; font-family: 'Inter', sans-serif; transition: background 0.2s, border-color 0.2s; width: 100%; }
.style-pick-btn:hover, .style-pick-btn:active { background: #2a1a3e; border-color: #c084fc; }

/* ── MOBILE NAV ─────────────────────────────────────────────── */
.mobile-nav { display: none; }

@media (max-width: 768px) {
    body { overflow: auto; }
    #dashboard { height: 100dvh; }
    .main { flex-direction: column; flex: 1; overflow: hidden; position: relative; }
    .panel { width: 100%; height: calc(100% - 68px); border-right: none; display: none; flex-direction: column; }
    .panel.mob-active { display: flex; }
    .middle { display: none; flex: none; height: 100%; overflow-y: auto; padding-bottom: 80px; }
    .middle.mob-active { display: block; }
    .mobile-nav { display: flex; flex-direction: column; align-items: center; position: fixed; bottom: 0; left: 0; right: 0; background: #0a0a14; border-top: 1px solid #1a1a2e; z-index: 50; padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
    .dash-mob-dots { display: flex; gap: 14px; margin-bottom: 6px; }
    .dash-mob-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a3e; cursor: pointer; transition: background 0.25s, transform 0.25s; position: relative; flex-shrink: 0; }
    .dash-dot-0.active { background: var(--purple); box-shadow: 0 0 8px var(--purple); transform: scale(1.35); }
    .dash-dot-1.active { background: linear-gradient(90deg, var(--purple), var(--cyan)); transform: scale(1.35); }
    .dash-dot-2.active { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform: scale(1.35); }
    .dash-mob-swipe-label { font-size: 11px; font-weight: 800; letter-spacing: 0.8px; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; text-shadow: 0 0 18px rgba(192,132,252,0.35); }
    .mob-unread { position: absolute; top: -6px; right: -6px; min-width: 14px; height: 14px; border-radius: 9999px; display: none; font-size: 9px; font-weight: 800; color: #fff; align-items: center; justify-content: center; padding: 0 3px; border: 1.5px solid #0a0a14; }
    .mob-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg,#c084fc,#22d3ee); color: #000; font-weight: 700; font-size: 13px; padding: 10px 20px; border-radius: 24px; z-index: 999; white-space: nowrap; box-shadow: 0 4px 20px rgba(192,132,252,0.5); transition: opacity 0.4s; pointer-events: none; }
    .mob-unread.omni { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
    .mob-unread.nexus { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); color: #000; }
    .mob-unread.visible { display: flex; }
    .ticker-bar { display: none; }
    /* Floating pill hint removed — footer label next to the dots is enough */
    .dash-mob-hint { display: none !important; }
    .header { padding: 10px 10px 10px 16px; }
    /* Mobile header is tight (overflow:hidden for the ellipsis); a slightly lighter glow.
       drop-shadow outsets past the box and is NOT clipped by the element's own overflow. */
    .logo { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; filter: drop-shadow(0 0 8px rgba(192,132,252,0.84)) drop-shadow(0 0 20px rgba(34,211,238,0.56)); }
    .logo-suffix { display: none; }
    .acct-name { font-size: 12px; }
    .acct-label { display: none; }   /* mobile: gear-only settings button to save header room */
    .acct-gear { font-size: 15px; }
    .acct-trigger { padding: 6px 10px; gap: 6px; }
    .acct-chevron { font-size: 10px; }
    .messages { padding-bottom: 4px; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    /* Hide the bulky footer on mobile — legal lives in the account dropdown */
    .dash-footer { display: none; }
    /* Tighter chat input row on mobile to give back vertical space */
    .panel { padding: 10px 12px; }
    .chat-input { padding: 7px 12px; font-size: 15px; }
    .chat-input-wrap { padding-top: 6px; padding-bottom: 6px; }
    /* Force header layout — flex with logo expanding to fill, pushing right group to the corner */
    .header { display: flex !important; align-items: center !important; justify-content: space-between !important; flex-wrap: nowrap !important; gap: 10px !important; }
    .logo { flex: 1 1 0 !important; min-width: 0 !important; }
    .header-right { flex: 0 0 auto !important; position: static !important; transform: none !important; margin: 0 !important; display: flex !important; align-items: center !important; gap: 8px !important; }
}

/* ── WELCOME OVERLAY ────────────────────────────────────────── */
#welcome-overlay { position: fixed; inset: 0; background: rgba(10,10,20,0.97); z-index: 999; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.ws-slide { display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; max-width: 420px; padding: 40px 32px; animation: fadeIn 0.4s ease; }
.ws-slide.active { display: flex; }
.ws-logo { font-size: 17px; font-weight: 800; background: linear-gradient(90deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 32px; letter-spacing: 2px; filter: drop-shadow(0 0 11px rgba(192,132,252,0.98)) drop-shadow(0 0 28px rgba(34,211,238,0.70)) drop-shadow(0 0 50px rgba(192,132,252,0.56)); }
.ws-big { font-size: 52px; font-weight: 800; color: #e0e0ff; margin-bottom: 12px; }
.ws-char { font-size: 52px; margin-bottom: 12px; }
.ws-charname { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.ws-sub { font-size: 15px; color: #888; line-height: 1.7; margin-bottom: 36px; }
.ws-btn { background: linear-gradient(90deg, #c084fc, #22d3ee); color: #000; border: none; padding: 14px 36px; border-radius: 9999px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.ws-btn:hover { opacity: 0.85; }
.ws-btn-off { opacity: 0.35; cursor: not-allowed; }
.ws-terms-label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; color: #888; font-size: 13px; line-height: 1.6; max-width: 320px; margin: 0 auto 28px; text-align: left; }
.ws-terms-label input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--purple); cursor: pointer; }
.ws-dots { display: flex; gap: 8px; margin-top: 32px; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: #333; transition: background 0.3s; }
.ws-dot.active { background: var(--purple); }
/* Welcome overlay — mobile (v117 review fix): the denser 2-slide flow must
   never clip its CTA on a phone. Top-align + scroll as a safety net, and
   shrink the 52px headline so 'Let's start →' stays on-screen at ~380px wide. */
@media (max-width: 768px) {
    #welcome-overlay { align-items: flex-start; justify-content: flex-start; overflow-y: auto; padding: 32px 0 24px; }
    .ws-slide { max-width: 100%; padding: 24px 22px; justify-content: flex-start; }
    .ws-big { font-size: 34px; }
    .ws-char { font-size: 44px; }
    .ws-sub { font-size: 14px; margin-bottom: 26px; }
}

/* ── DEBT PAYOFF PLAN ───────────────────────────────────────── */
.debt-plan-btn { width: 100%; margin-top: 10px; background: linear-gradient(90deg, #f87171, #fb923c); color: #000; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; padding: 13px; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.2s; }
.debt-plan-btn:hover { opacity: 0.88; }
.debt-plan-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.debt-plan-card { background: var(--card); border: 1px solid var(--border); border-left: 3px solid #f87171; border-radius: 12px; padding: 20px; margin-top: 14px; }
.debt-plan-header { font-size: 14px; font-weight: 800; color: #f87171; margin-bottom: 14px; }
.debt-plan-body { font-size: 13px; color: #aaa; line-height: 1.7; }
.debt-plan-body strong { color: #e0e0ff; }

/* ── NET WORTH TAB ──────────────────────────────────────────── */
.nw-hero { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; text-align: center; margin-bottom: 18px; position: relative; overflow: hidden; }
.nw-hero::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 0%, rgba(74,222,128,0.05) 0%, transparent 70%); pointer-events:none; }
.nw-label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; }
.nw-amount { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px; }
.nw-change { font-size: 12px; margin-bottom: 18px; min-height: 18px; }
.nw-bar-row { display: flex; border-radius: 6px; overflow: hidden; height: 7px; max-width: 420px; margin: 0 auto 8px; }
.nw-bar-assets { background: var(--green); transition: width 0.5s; }
.nw-bar-debts  { background: var(--red);   transition: width 0.5s; }
.nw-bar-labels { display: flex; justify-content: space-between; max-width: 420px; margin: 0 auto; font-size: 11px; }
.nw-bar-labels span:first-child { color: var(--green); font-weight: 600; }
.nw-bar-labels span:last-child  { color: var(--red);   font-weight: 600; }
.nw-history { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.nw-history-label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 12px; }
.nw-sparkline { display: flex; align-items: flex-end; gap: 5px; height: 52px; }
.nw-spark-bar { flex: 1; border-radius: 3px 3px 0 0; transition: opacity 0.2s; cursor: default; }
.nw-spark-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: #444; }
.nw-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nw-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.nw-section-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.nw-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.nw-section-title.green { color: var(--green); }
.nw-section-title.red   { color: var(--red);   }
.nw-section-total { font-size: 20px; font-weight: 800; }
.nw-section-total.green { color: var(--green); }
.nw-section-total.red   { color: var(--red);   }
.nw-add-btn { background: #0f0f1a; border: 1px solid var(--border); color: #888; border-radius: 7px; padding: 5px 10px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; flex-shrink: 0; }
.nw-add-btn:hover { border-color: var(--purple); color: var(--purple); }
.nw-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(42,42,62,0.4); }
.nw-item:last-child { border-bottom: none; }
.nw-item-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.nw-item-name { font-size: 12px; font-weight: 600; color: #e0e0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-auto-badge { font-size: 9px; background: rgba(42,42,62,0.8); color: #555; border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }
.nw-item-val { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.nw-del-btn { background: none; border: none; color: #444; font-size: 12px; cursor: pointer; padding: 2px 4px; flex-shrink: 0; }
.nw-del-btn:hover { color: var(--red); }
.nw-add-form { background: #0f0f1a; border: 1px dashed var(--border); border-radius: 8px; padding: 12px; margin-top: 10px; }
.nw-input { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 7px; color: #e0e0ff; font-family: 'Inter', sans-serif; font-size: 12px; padding: 7px 10px; outline: none; margin-bottom: 6px; }
.nw-input:focus { border-color: var(--purple); }
.nw-input::placeholder { color: #444; }
.nw-input-sm { width: 100%; }
.nw-save-btn { background: linear-gradient(90deg, var(--purple), var(--cyan)); color: #000; border: none; border-radius: 7px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; }
.nw-cancel-btn { background: #0f0f1a; border: 1px solid var(--border); color: #666; border-radius: 7px; padding: 7px 12px; font-size: 12px; cursor: pointer; font-family: 'Inter', sans-serif; }
@media (max-width: 520px) { .nw-columns { grid-template-columns: 1fr; } .nw-amount { font-size: 32px; } }

/* ── TYPING DOTS (shared) ───────────────────────────────────── */
.dot { width: 7px; height: 7px; background: var(--purple); border-radius: 50%; animation: bounce 1.2s infinite; opacity: 0.6; display: inline-block; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

/* ── BUDGET TAB REORDER — calendar to top after intake (Task #131, 2026-05-26) ──
   Default order: section title → Profile → debt-plan → Calendar (intake phase).
   When `.budget-complete` class is on #budget-content (set by showBudgetProfile
   when budgetComplete === true), Calendar lifts above Profile so the daily
   action surface (paydays, bills due) is what the user sees first post-intake.
   Pure CSS reorder via flex `order` — zero DOM rearrangement, zero risk. */
#budget-content { display: flex; flex-direction: column; }
#budget-content > .section-title       { order: 0; }
#budget-content > #budget-profile      { order: 1; }
#budget-content > .debt-plan-area      { order: 2; }
#budget-content > #budget-cal-card     { order: 3; }
#budget-content.budget-complete > #budget-cal-card { order: 1; }
#budget-content.budget-complete > #budget-profile  { order: 2; }
#budget-content.budget-complete > .debt-plan-area  { order: 3; }
/* Re-apply top spacing now that calendar may be the first card-sized element
   under the section title — without this, the lifted calendar would lose its
   visual separation from the Profile that used to precede it. */
#budget-content.budget-complete > #budget-cal-card { margin-top: 0; }
#budget-content.budget-complete > #budget-profile  { margin-top: 14px; }

/* ── BUDGET LINE ITEMS ───────────────────────────────────── */
.bp-line-items { padding: 2px 0 6px 12px; border-left: 2px solid rgba(138,43,226,0.2); margin: -4px 0 4px 8px; }
.bp-line-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; gap: 8px; }
.bp-line-name { font-size: 11px; color: #666; flex: 1; }
.bp-line-amt { font-size: 11px; color: #888; font-weight: 600; }
.bp-line-kill { background: transparent; border: none; color: #555; font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 4px; opacity: 0.5; transition: all 0.15s; line-height: 1; }
.bp-line-kill:hover { opacity: 1; background: rgba(248, 113, 113, 0.15); color: #f87171; transform: scale(1.15); }

/* ── HEADER DATE ─────────────────────────────────────────── */
.header-date { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.35s ease; }
.hd-greeting { font-size: 15px; font-weight: 700; color: #e6ebf2; letter-spacing: 0.01em; }
.hd-date { font-size: 15px; font-weight: 600; color: #9a9ab5; }
.hd-nextup { font-size: 15px; font-weight: 600; color: var(--cyan); }
.hd-weather { font-size: 15px; font-weight: 600; color: #b0b0c5; }
.hd-enc { font-size: 15px; font-weight: 600; color: #c0b3e6; }
.hd-dot { color: #44445a; margin: 0 4px; font-size: 12px; }
/* Date · weather pinned on the right of the header (desktop) */
.header-dw { display: flex; align-items: center; white-space: nowrap; }
.header-dw .hd-date, .header-dw .hd-weather { font-size: 13px; }
@media (max-width: 768px) { .header-date { display: none; } .header-dw { display: none; } }

/* ── CALENDAR ─────────────────────────────────────────────── */
.cal-trigger-btn { background: none; border: 1px solid var(--border); border-radius: 8px; color: #888; font-size: 16px; cursor: pointer; padding: 5px 9px; transition: border-color 0.2s, color 0.2s; line-height: 1; }
.cal-trigger-btn:hover, .cal-trigger-btn.active { border-color: var(--purple); color: var(--purple); }
.cal-badge { position: absolute; top: -4px; right: -4px; width: 8px; height: 8px; background: var(--purple); border-radius: 50%; pointer-events: none; }
.cal-wrapper { position: relative; }
.cal-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; background: #0f0f1a; border: 1px solid var(--border); border-radius: 14px; padding: 16px; z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,0.7); }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month-label { font-size: 13px; font-weight: 700; color: #e0e0ff; }
.cal-nav-btn { background: none; border: 1px solid var(--border); border-radius: 6px; color: #888; font-size: 11px; cursor: pointer; padding: 3px 8px; }
.cal-nav-btn:hover { border-color: var(--purple); color: var(--purple); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 12px; }
.cal-day-label { font-size: 9px; font-weight: 600; color: #555; text-align: center; padding: 2px 0 4px; }
.cal-cell { min-height: 26px; border-radius: 5px; display: flex; flex-direction: column; align-items: center; padding: 2px 0; }
.cal-cell.today { background: rgba(138,43,226,0.18); }
.cal-cell.has-event { cursor: pointer; }
.cal-cell.has-event:hover { background: rgba(138,43,226,0.12); }
.cal-day-num { font-size: 10px; color: #666; line-height: 1.3; }
.cal-cell.today .cal-day-num { color: var(--purple); font-weight: 700; }
.cal-dot-row { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; margin-top: 1px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
/* 2026-05-26 Keith color spec: upcoming payday = green, past = gray, bills = red, manual = purple */
.cal-dot.payday          { background: #22c55e; }   /* legacy alias = upcoming */
.cal-dot.payday-upcoming { background: #22c55e; }
.cal-dot.payday-past     { background: #6b7280; }
.cal-dot.bill            { background: #ef4444; }
.cal-dot.manual          { background: var(--purple); }
.cal-dot.review          { background: #3b82f6; }
.cal-dot.investment      { background: var(--purple); }
.cal-dot.general         { background: #888; }

/* ── BUDGET CALENDAR (2026-05-26 Task #121) ───────────────── */
#budget-cal-card { padding: 14px; }
.cal-desktop-wrap { display: block; }
.cal-mobile-summary { display: none; font-size: 13px; color: #aaa; padding: 4px 0; line-height: 1.6; }
.cal-mobile-summary .next-payday { color: #22c55e; font-weight: 700; }
.cal-mobile-summary .last-payday { color: #6b7280; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: #888; padding: 8px 0 10px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 8px; }
.cal-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend-item .cal-dot { width: 8px; height: 8px; }

/* Mobile: hide grid, show single-line summary */
@media (max-width: 767px) {
    .cal-desktop-wrap { display: none; }
    .cal-mobile-summary { display: block; }
}
.cal-upcoming { border-top: 1px solid var(--border); padding-top: 10px; max-height: 160px; overflow-y: auto; }
.cal-upcoming-title { font-size: 9px; font-weight: 700; color: #555; letter-spacing: 0.06em; margin-bottom: 6px; }
.cal-event { display: flex; align-items: flex-start; gap: 7px; padding: 5px 0; border-bottom: 1px solid rgba(42,42,62,0.5); }
.cal-event:last-child { border-bottom: none; }
.cal-event-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.cal-event-body { flex: 1; min-width: 0; }
.cal-event-date { font-size: 9px; color: #555; }
.cal-event-title { font-size: 11px; font-weight: 600; color: #e0e0ff; line-height: 1.3; }
.cal-event-note { font-size: 10px; color: #888; }
.cal-event-del { background: none; border: none; color: #444; font-size: 10px; cursor: pointer; padding: 2px 4px; flex-shrink: 0; }
.cal-event-del:hover { color: #ef4444; }
.cal-empty { font-size: 11px; color: #555; text-align: center; padding: 12px 0; }
.cal-add-row { display: flex; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cal-add-date { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: #e0e0ff; font-family: 'Inter', sans-serif; font-size: 10px; padding: 5px 6px; outline: none; min-width: 0; }
.cal-add-title-inp { flex: 2; background: var(--card); border: 1px solid var(--border); border-radius: 6px; color: #e0e0ff; font-family: 'Inter', sans-serif; font-size: 10px; padding: 5px 7px; outline: none; min-width: 0; }
.cal-add-btn { background: linear-gradient(90deg, var(--purple), var(--cyan)); color: #000; border: none; border-radius: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px; cursor: pointer; font-family: 'Inter', sans-serif; flex-shrink: 0; }
.cal-add-date:focus, .cal-add-title-inp:focus { border-color: var(--purple); }
@media (max-width: 768px) and (orientation: portrait) { .cal-dropdown { position: fixed; top: 60px; right: 10px; left: auto; width: calc(100vw - 20px); max-width: 360px; } }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

/* ── BILL TRAY + DAY PICKER (2026-06-19: tap a bill → set its day) ─── */
.cal-bill-tray-wrap { margin: 2px 0 14px; }
.cal-bill-tray-hint { font-size: 11px; color: #777; margin-bottom: 8px; }
.cal-bill-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-bill-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #14141c; border: 1px solid #2a2a3a; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-family: 'Inter', sans-serif; text-align: left; transition: border-color 0.15s, background 0.15s; }
.cal-bill-chip:hover { border-color: var(--purple); background: rgba(138,43,226,0.10); }
.cal-bill-chip:active { transform: scale(0.97); }
.cal-bill-chip-name { font-size: 13px; font-weight: 700; color: #e0e0ff; }
.cal-bill-chip-meta { font-size: 11px; color: #8a8aa0; }
.cal-bill-chip-empty { font-size: 12px; color: #8a8aa0; padding: 4px 0; }
.billday-card { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 18px; padding: 24px 22px; width: 340px; max-width: 92vw; position: relative; }
.billday-title { font-size: 16px; font-weight: 800; color: #e0e0ff; margin-bottom: 6px; padding-right: 22px; line-height: 1.3; }
.billday-sub { font-size: 12px; color: #8a8aa0; margin-bottom: 16px; line-height: 1.5; }
.billday-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.billday-day { min-height: 40px; background: #0f0f1a; border: 1px solid #2a2a3e; border-radius: 10px; color: #c9d2e0; font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; display: flex; align-items: center; justify-content: center; transition: border-color 0.12s, color 0.12s, background 0.12s; }
.billday-day:hover { border-color: var(--purple); color: #fff; }
.billday-day.selected { background: linear-gradient(135deg, var(--purple), var(--cyan)); color: #000; border-color: transparent; font-weight: 800; }
.billday-note { font-size: 11px; color: #666; margin-top: 14px; text-align: center; }

/* ── PORTFOLIO REDESIGN (Fidelity-style, OmniNexus theme) ─────── */
.port-overview-header { background: linear-gradient(135deg, #0d0d2b 0%, #12123a 100%); border-bottom: 1px solid #22d3ee22; padding: 18px 20px; display: flex; align-items: center; gap: 0; }
.port-overview-left, .port-overview-right { flex: 1; }
.port-overview-right { text-align: right; }
.port-overview-divider { width: 1px; background: #22d3ee22; height: 40px; margin: 0 20px; flex-shrink: 0; }
.port-overview-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 4px; }
.port-overview-total { font-size: 28px; font-weight: 800; color: #ffffff; letter-spacing: -0.5px; }
.port-overview-gain { font-size: 16px; font-weight: 700; color: #888; }
.port-overview-gain.pos { color: #22c55e; }
.port-overview-gain.neg { color: #ef4444; }

.port-indices-row { display: flex; align-items: stretch; background: #080818; border-bottom: 1px solid #1a1a2e; padding: 10px 14px; gap: 8px; }
.port-index-card { flex: 1; background: #0d0d20; border: 1px solid #1e1e30; border-top: 2px solid #2a2a40; border-radius: 10px; padding: 9px 10px; text-align: center; transition: border-top-color 0.5s ease, box-shadow 0.5s ease; }
.port-index-card.up { border-top-color: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.08); }
.port-index-card.down { border-top-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.08); }
.port-index-name { font-size: 9px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.port-live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #333; flex-shrink: 0; transition: background 0.5s ease; animation: livePulse 2.5s ease-in-out infinite; }
.port-index-card.up .port-live-dot { background: #22c55e; }
.port-index-card.down .port-live-dot { background: #ef4444; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

/* ── MARKET CLOCK (2026-06-19) — live open/closed status above the index cards ── */
.market-clock-bar { background: #080818; border-bottom: 1px solid #1a1a2e; padding: 10px 14px; }
.mkt-clock-main { display: flex; align-items: center; gap: 8px; }
.mkt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #555; }
.mkt-dot.open { background: var(--green); box-shadow: 0 0 8px var(--green); animation: livePulse 2.5s ease-in-out infinite; }
.mkt-dot.closed { background: var(--red); box-shadow: 0 0 6px rgba(248,113,113,0.45); }
.mkt-status { font-size: 13px; font-weight: 800; color: #e0e0ff; }
.mkt-status.open { color: var(--green); }
.mkt-status.closed { color: #f8a8a8; }
.mkt-et { margin-left: auto; font-size: 12px; font-weight: 600; color: #8a8aa0; font-variant-numeric: tabular-nums; }
.mkt-sub { font-size: 11.5px; color: #9a9ab5; margin-top: 4px; }
.mkt-next-holiday { font-size: 11px; color: #6f6f88; margin-top: 3px; }
.port-index-val { font-size: 15px; font-weight: 800; color: #e0e0ff; letter-spacing: -0.3px; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.port-index-chg { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,0.04); color: #555; }
.port-index-chg.pos { color: #22c55e; background: rgba(34,197,94,0.1); }
.port-index-chg.neg { color: #ef4444; background: rgba(239,68,68,0.1); }

.acct-card { background: #0f0f1f; border: 1px solid #2a2a4a; border-left: 3px solid var(--cyan); border-radius: 14px; margin-top: 14px; overflow: hidden; }
.acct-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #1a1a2e; }
.acct-card-name { font-size: 13px; font-weight: 700; color: var(--cyan); }
.acct-card-sync { display: flex; align-items: center; gap: 8px; }
.acct-sync-btn { background: transparent; border: 1px solid #2a2a3e; border-radius: 6px; color: #666; font-size: 11px; padding: 3px 10px; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.acct-sync-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.acct-sync-btn:disabled { opacity: 0.55; cursor: wait; }
/* v120 holdings header — user-facing refresh + "updated X:XX" timestamp */
.holdings-header { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.holdings-title { font-size: 13px; font-weight: 700; color: #e0e0ff; letter-spacing: 0.3px; }
.holdings-sync { display: flex; align-items: center; gap: 8px; }
.holdings-sync-time { font-size: 10px; color: #444; }
@keyframes holdings-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.holdings-refreshing .acct-sync-btn { color: var(--cyan); border-color: var(--cyan); }
.holdings-refreshing .acct-sync-btn::first-letter { display: inline-block; animation: holdings-spin 0.8s linear infinite; }
.acct-card-stats { display: grid; grid-template-columns: repeat(2, 1fr); }
.acct-card-stat { padding: 14px 16px; border-bottom: 1px solid #1a1a2e; border-right: 1px solid #1a1a2e; }
.acct-card-stat:nth-child(2n) { border-right: none; }
.acct-card-stat-label { font-size: 9px; color: #555; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 5px; }
.acct-card-stat-value { font-size: 17px; font-weight: 700; color: #e0e0ff; }
.acct-card-stat-value.pos { color: #22c55e; }
.acct-card-stat-value.neg { color: #ef4444; }
@media (max-width: 600px) { .acct-card-stats { grid-template-columns: repeat(2, 1fr); } .port-overview-total { font-size: 22px; } }

/* ── MOBILE FIXES ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Save toast — sit above the bottom nav bar */
    #save-toast, #save-toast-err { bottom: 84px !important; font-size: 13px; }

    /* Suggestion modal — full width, scrollable, top-aligned */
    .suggestion-backdrop { padding: 12px; padding-top: 16px; align-items: flex-start; }
    .suggestion-modal { max-height: calc(100dvh - 90px); display: flex; flex-direction: column; }
    .suggestion-cards { max-height: none; flex: 1; }
    .sug-card { min-width: unset; max-width: unset; width: 100%; }

    /* Portfolio indices — tighter on small screens */
    .port-indices-row { padding: 8px 10px; gap: 6px; }
    .port-index-card { padding: 7px 6px; border-radius: 8px; }
    .port-index-val { font-size: 12px; }
    .port-index-name { font-size: 8px; }
    .port-index-chg { font-size: 9px; padding: 1px 6px; }
    .port-overview-total { font-size: 22px; }
    .port-overview-gain { font-size: 13px; }

    /* Holdings table — allow horizontal scroll on very small screens */
    .alpaca-pos-table, .holdings-table { font-size: 11px; }
    .alpaca-pos-table th, .alpaca-pos-table td { padding: 8px 6px; }

    /* Net worth columns stack on phone */
    .nw-columns { grid-template-columns: 1fr; }

    /* Inline buttons (Just mine / Household) wrap nicely */
    .inline-btns-wrap { flex-wrap: wrap; }

    /* Prevent horizontal overflow on budget summary */
    .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .summary-card { padding: 12px; }
    .summary-val { font-size: 18px; }

    /* Account dropdown fits screen */
    .acct-dropdown { right: 0; left: auto; min-width: 180px; }

    /* Goals list — full width on mobile */
    .nw-goals-section { margin-top: 16px; }
    .nw-chart-section { margin-top: 16px; }
}

/* ── SAVINGS GOALS ──────────────────────────────────────────────────────── */
.nw-goals-section {
    background: #0a0a14;
    border: 1px solid #1e1e2e;
    border-radius: 16px;
    padding: 16px 18px;
    margin-top: 16px;
}
.nw-goals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.nw-goals-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 0.03em;
}
.nw-goals-empty {
    color: #555;
    font-size: 12px;
    padding: 8px 0 4px;
}
/* Scrollable goal list — max 3 goals visible before scroll */
#nw-goals-list {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2a2a3e transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#nw-goals-list::-webkit-scrollbar { width: 4px; }
#nw-goals-list::-webkit-scrollbar-track { background: transparent; }
#nw-goals-list::-webkit-scrollbar-thumb { background: #2a2a3e; border-radius: 4px; }
.nw-goal-item {
    background: #111122;
    border: 1px solid #1e1e2e;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nw-goal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nw-goal-name {
    font-size: 13px;
    font-weight: 700;
    color: #d0d0f0;
}
.nw-goal-linked-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.3);
    border-radius: 999px;
    padding: 1px 7px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}
.nw-goal-amounts {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.nw-goal-current {
    font-size: 16px;
    font-weight: 800;
    color: #e0e0ff;
}
.nw-goal-target {
    font-size: 13px;
    color: #555;
}
.nw-goal-pct {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
}
.nw-goal-bar-track {
    height: 6px;
    background: #1e1e2e;
    border-radius: 999px;
    overflow: hidden;
}
.nw-goal-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}
.nw-goal-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

/* ── NET WORTH TREND CHART ──────────────────────────────────────────────── */
.nw-chart-section {
    background: #0a0a14;
    border: 1px solid #1e1e2e;
    border-radius: 16px;
    padding: 16px 18px 12px;
    margin-top: 16px;
}
.nw-chart-header { margin-bottom: 12px; }
.nw-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.03em;
}
.nw-chart-wrap { display: flex; flex-direction: column; gap: 0; }
.nw-chart-labels {
    display: flex;
    justify-content: space-between;
    padding: 4px 24px 0;
}
.nw-chart-labels span {
    font-size: 10px;
    color: #444;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── GOAL ACCOUNTS (Bank Tab) ──────────────────────────────── */
.bank-section-title { font-size: 13px; font-weight: 700; color: #e0e0ff; margin-bottom: 4px; }
.bank-section-sub   { font-size: 11px; color: #555; margin-bottom: 12px; }
.goal-acct-list     { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.goal-acct-card     { display: flex; align-items: center; gap: 12px; background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 12px; padding: 12px 14px; }
.goal-acct-icon     { font-size: 22px; flex-shrink: 0; }
.goal-acct-info     { flex: 1; min-width: 0; }
.goal-acct-name     { font-size: 13px; font-weight: 700; color: #e0e0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-acct-alloc    { font-size: 10px; color: #555; margin-top: 2px; }
.goal-acct-bar-track { height: 3px; background: #2a2a3a; border-radius: 2px; margin-top: 6px; }
.goal-acct-bar-fill  { height: 3px; border-radius: 2px; transition: width 0.3s; }
.goal-acct-balance  { text-align: right; flex-shrink: 0; }
.goal-acct-current  { font-size: 16px; font-weight: 800; color: var(--purple); }
.goal-acct-target   { font-size: 10px; color: #555; }
.goal-empty-state   { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 4px 0 8px; }
.goal-empty-text    { font-size: 12px; color: #555; line-height: 1.6; }
.goal-ask-btn       { background: none; border: 1px solid var(--purple); color: var(--purple); border-radius: 10px; padding: 9px 16px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.goal-ask-btn:hover { background: #1a0a2e; }

/* ── PAYDAY STATEMENT MODAL ───────────────────────────────── */
.payday-stmt-card   { background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 18px; padding: 24px 22px; width: 320px; max-width: 92vw; position: relative; }
.pday-close-btn     { position: absolute; top: 14px; right: 14px; background: none; border: none; color: #555; font-size: 16px; cursor: pointer; }
.pday-close-btn:hover { color: #ef4444; }
.pday-stmt-date     { font-size: 15px; font-weight: 800; color: #e0e0ff; margin-bottom: 16px; }
.pday-stmt-label    { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.7px; margin: 12px 0 6px; }
.pday-stmt-row      { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #1e1e2e; font-size: 13px; color: #aaa; }
.pday-stmt-row:last-of-type { border-bottom: none; }
.pday-stmt-green    { color: var(--green); font-weight: 700; }
.pday-stmt-purple   { color: var(--purple); font-weight: 700; }
.pday-stmt-cyan     { color: var(--cyan); font-weight: 700; }
.pday-stmt-note     { font-size: 11px; color: #555; margin-top: 12px; text-align: center; line-height: 1.5; }
