    :root {
      --bg-dark: #070B14;
      --bg-card: rgba(15, 23, 42, 0.82);
      --bg-card-hover: rgba(30, 41, 59, 0.92);
      --border-subtle: rgba(255, 255, 255, 0.08);
      --border-focus: rgba(56, 189, 248, 0.5);
      --text-main: #F8FAFC;
      --text-muted: #94A3B8;
      --text-dim: #64748B;
      --cyan: #38BDF8;
      --cyan-glow: rgba(56, 189, 248, 0.2);
      --emerald: #10B981;
      --emerald-glow: rgba(16, 185, 129, 0.2);
      --rose: #F43F5E;
      --rose-glow: rgba(244, 63, 94, 0.2);
      --amber: #F59E0B;
      --purple: #A855F7;
      --blue: #3B82F6;
      --bottom-nav-height: 64px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      background: var(--bg-dark);
      color: var(--text-main);
      line-height: 1.45;
      min-height: 100vh;
      min-height: -webkit-fill-available;
      display: flex;
      flex-direction: column;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
      padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 30px);
      user-select: none;
      transition: background 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.7s ease;
    }

    /* Ambient Market-Mood Backgrounds (Green on Up Days, Red on Down Days) */
    body.theme-market-up {
      background: radial-gradient(130% 75% at 50% -5%, rgba(16, 185, 129, 0.28) 0%, rgba(7, 11, 20, 1) 75%) fixed !important;
    }
    body.theme-market-up .app-header {
      border-bottom-color: rgba(16, 185, 129, 0.38);
      box-shadow: 0 4px 28px rgba(16, 185, 129, 0.16);
    }
    body.theme-market-up .hero-card {
      background: linear-gradient(145deg, rgba(14, 46, 38, 0.90), rgba(15, 23, 42, 0.96)) !important;
      border-color: rgba(16, 185, 129, 0.45) !important;
      box-shadow: 0 8px 34px rgba(16, 185, 129, 0.20) !important;
    }

    body.theme-market-down {
      background: radial-gradient(130% 75% at 50% -5%, rgba(244, 63, 94, 0.30) 0%, rgba(7, 11, 20, 1) 75%) fixed !important;
    }
    body.theme-market-down .app-header {
      border-bottom-color: rgba(244, 63, 94, 0.38);
      box-shadow: 0 4px 28px rgba(244, 63, 94, 0.16);
    }
    body.theme-market-down .hero-card {
      background: linear-gradient(145deg, rgba(54, 16, 30, 0.90), rgba(15, 23, 42, 0.96)) !important;
      border-color: rgba(244, 63, 94, 0.45) !important;
      box-shadow: 0 8px 34px rgba(244, 63, 94, 0.20) !important;
    }

    /* Safe Area & Header */
    .app-header {
      position: sticky;
      top: 0;
      z-index: 90;
      background: rgba(7, 11, 20, 0.92);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border-subtle);
      padding: calc(env(safe-area-inset-top) + 0.45rem) 1rem 0.45rem 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 54px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .brand-icon {
      width: 34px;
      height: 34px;
      background: linear-gradient(135deg, var(--cyan), #2563EB);
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 0.92rem;
      color: #FFF;
      box-shadow: 0 2px 8px var(--cyan-glow);
      flex-shrink: 0;
    }

    .brand-title {
      font-size: 1.02rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #FFF;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      line-height: 1.15;
    }

    .lab-pill {
      font-size: 0.58rem;
      font-weight: 700;
      background: rgba(16, 185, 129, 0.15);
      color: #10B981;
      border: 1px solid rgba(16, 185, 129, 0.35);
      padding: 1px 5px;
      border-radius: 4px;
      letter-spacing: 0.4px;
      line-height: 1;
      vertical-align: middle;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .icon-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border-subtle);
      border-radius: 9px;
      color: var(--text-muted);
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
      cursor: pointer;
      transition: all 0.15s ease;
      flex-shrink: 0;
    }

    .icon-btn:active {
      transform: scale(0.92);
      background: rgba(56, 189, 248, 0.15);
      color: var(--cyan);
    }

    .sync-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      color: var(--emerald);
      font-size: 0.63rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      margin-top: 1px;
      line-height: 1;
    }

    .sync-status-pill.syncing {
      color: var(--amber);
    }

    .sync-status-pill.offline {
      color: var(--text-muted);
    }

    .pulse-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: 0 0 6px currentColor;
    }

    /* Market Mood Toggle Button */
    .market-mood-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 700;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-main);
      transition: all 0.2s ease;
    }
    .market-mood-pill:hover, .market-mood-pill:active {
      transform: scale(1.03);
    }
    .market-mood-pill.up {
      background: rgba(16, 185, 129, 0.16);
      border-color: rgba(16, 185, 129, 0.45);
      color: #34D399;
      box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
    }
    .market-mood-pill.down {
      background: rgba(244, 63, 94, 0.16);
      border-color: rgba(244, 63, 94, 0.45);
      color: #FB7185;
      box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
    }
    .mood-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: 0 0 8px currentColor;
    }

    /* Account Performance Screen Styles */
    .perf-row-card {
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      padding: 0.85rem;
      transition: all 0.2s ease;
    }
    .perf-row-card:hover {
      background: rgba(30, 41, 59, 0.7);
      border-color: rgba(56, 189, 248, 0.35);
    }
    .perf-pill-group {
      display: flex;
      gap: 5px;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none;
    }
    .perf-pill-group::-webkit-scrollbar {
      display: none;
    }
    .perf-filter-btn {
      padding: 4px 10px;
      font-size: 0.68rem;
      font-weight: 700;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--text-dim);
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s;
    }
    .perf-filter-btn:hover {
      border-color: var(--cyan);
      color: #FFF;
    }
    .perf-filter-btn.active {
      background: rgba(56, 189, 248, 0.18);
      border-color: var(--cyan);
      color: var(--cyan);
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    }
    .perf-scorecard {
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      padding: 0.85rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .perf-role-badge {
      font-size: 0.62rem;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    /* Wall Street / NYSE Scrolling Ticker Tape Marquee */
    .nyse-ticker-wrap {
      position: relative;
      background: rgba(3, 7, 18, 0.88);
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      overflow: hidden;
      white-space: nowrap;
      padding: 0.45rem 0;
      display: flex;
      user-select: none;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      cursor: pointer;
    }
    .nyse-ticker-wrap::before, .nyse-ticker-wrap::after {
      content: '';
      position: absolute;
      top: 0; bottom: 0;
      width: 32px;
      z-index: 3;
      pointer-events: none;
    }
    .nyse-ticker-wrap::before {
      left: 0;
      background: linear-gradient(to right, #070B14, transparent);
    }
    .nyse-ticker-wrap::after {
      right: 0;
      background: linear-gradient(to left, #070B14, transparent);
    }
    .nyse-ticker-track {
      display: flex;
      gap: 1.4rem;
      width: max-content;
      animation: nyseMarquee 45s linear infinite;
    }
    .nyse-ticker-wrap:hover .nyse-ticker-track,
    .nyse-ticker-wrap:active .nyse-ticker-track {
      animation-play-state: paused;
    }
    @keyframes nyseMarquee {
      0% { transform: translateX(0); }
      100% { transform: translateX(-50%); }
    }
    .ticker-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.38rem;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--text-muted);
      padding: 3px 8px;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.05);
      flex-shrink: 0;
    }
