/* ==========================================================================
   Market Reader - Pro Financial Platform
   Faithful implementation of Pinterest reference design (CoinMarketCap / Robinhood Pro)
   With Line Chart, Pie Chart allocation, Statistics, $ vs % toggles,
   Universal Search (10,000+ stocks), Supabase Auth (RLS), and Stripe Subscriptions.
   ========================================================================== */

:root {
  /* Reference Design Theme (Crisp Pro Light with Obsidian Accents) */
  --bg-app: #f4f6f9;
  --frame-bg: #ffffff;
  --card-bg: #ffffff;
  --card-subtle: #f8fafc;
  --border-light: #eef2f6;
  --border-medium: #e2e8f0;
  
  --text-main: #0f172a;
  --text-dim: #64748b;
  --text-muted: #94a3b8;

  /* Reference Vibrant Emerald & Mint Accents */
  --emerald-green: #00d084;
  --emerald-green-dark: #00b875;
  --emerald-light-bg: #e6fbf4;
  --accent-red: #ef4444;
  --accent-red-bg: #fee2e2;

  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-frame: 42px;
  --radius-card: 20px;
  --radius-pill: 9999px;
  --shadow-frame: 0 30px 70px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
}

/* Dark Theme Support */
body.theme-dark {
  --bg-app: #06090d;
  --frame-bg: #0c1015;
  --card-bg: #131922;
  --card-subtle: #17202c;
  --border-light: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --text-main: #ffffff;
  --text-dim: #8b99a8;
  --text-muted: #5e6d7e;
  --shadow-frame: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

/* ==========================================================================
   Desktop Application Shell & Sticky Top Header
   ========================================================================== */
.desktop-app-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
}

/* ============================================================================
   Live Market Ticker Band (TradingView / Bloomberg Marquee Tape)
   ============================================================================ */
.live-ticker-band {
  width: 100%;
  height: 35px;
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 105;
  overflow: hidden;
  user-select: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  font-family: inherit;
}

body.theme-dark .live-ticker-band {
  background: #050811;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.ticker-live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 208, 132, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 14px;
  height: 100%;
  flex-shrink: 0;
  z-index: 5;
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00d084;
  box-shadow: 0 0 8px #00d084;
  animation: radarPulse 1.8s infinite ease-out;
}

@keyframes radarPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(0, 208, 132, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 208, 132, 0); }
}

.ticker-pill-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #00ea95;
  white-space: nowrap;
}

.ticker-marquee-viewport {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  height: 100%;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  will-change: transform;
  animation: tickerMarquee 48s linear infinite;
  padding-left: 12px;
}

.live-ticker-band:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes tickerMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
  text-decoration: none;
}

.ticker-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.ti-sym {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.ti-price {
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.ti-pct {
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
}

.ti-pct.positive {
  color: #00ea95;
  background: rgba(0, 234, 149, 0.14);
}

.ti-pct.negative {
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.16);
}

/* Price Tick Pulse Highlight Animations */
.ticker-item.price-tick-up {
  background: rgba(0, 234, 149, 0.25) !important;
  border-color: rgba(0, 234, 149, 0.6) !important;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.ticker-item.price-tick-up .ti-price {
  color: #00ea95 !important;
}

.ticker-item.price-tick-down {
  background: rgba(255, 77, 109, 0.25) !important;
  border-color: rgba(255, 77, 109, 0.6) !important;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.ticker-item.price-tick-down .ti-price {
  color: #ff4d6d !important;
}

.ticker-band-hint {
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
}

.ticker-hint-text {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .ticker-band-hint {
    display: none;
  }
}

.desktop-navbar {
  position: sticky;
  top: 35px;
  z-index: 100;
  width: 100%;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.hamburger-btn {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.18s ease;
}

.hamburger-btn:hover {
  background: var(--emerald-light-bg);
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
}

.burger-lines-icon {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
}

.burger-lines-icon span {
  display: block;
  width: 16px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

.burger-btn-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.desktop-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.brand-glow-dot {
  width: 9px;
  height: 9px;
  background-color: var(--emerald-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald-green);
}

.portfolio-select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  cursor: pointer;
  transition: all 0.18s ease;
}

.portfolio-select-trigger:hover {
  border-color: var(--emerald-green);
  background: var(--emerald-light-bg);
}

.portfolio-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Universal Search Bar */
.desktop-search-bar {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.desktop-search-bar:focus-within {
  background: var(--card-bg);
  border-color: var(--emerald-green);
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.15);
}

.desktop-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
}

.search-shortcut {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Header Right Actions */
.desktop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.desk-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.desk-btn:hover {
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
}

.desk-pricing-btn {
  background: var(--emerald-light-bg) !important;
  color: var(--emerald-green-dark) !important;
  border-color: rgba(0, 208, 132, 0.3) !important;
  font-weight: 700 !important;
}

.auth-header-container {
  display: inline-flex;
  align-items: center;
}

.auth-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-nav-btn {
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
}

.desk-btn.btn-neon-action {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 700;
}

.desk-btn.btn-neon-action:hover {
  background: var(--emerald-green);
  border-color: var(--emerald-green);
  color: #05140d;
  box-shadow: 0 0 14px rgba(0, 208, 132, 0.4);
}

body.theme-dark .desk-btn.btn-neon-action {
  background: var(--emerald-green);
  color: #05140d;
  border-color: var(--emerald-green);
}

body.theme-dark .desk-btn.btn-neon-action:hover {
  background: #00ea95;
  box-shadow: 0 0 16px rgba(0, 234, 149, 0.5);
}

.auth-user-btn {
  font-weight: 700;
  color: var(--emerald-green-dark);
  background: var(--emerald-light-bg);
  border-color: rgba(0, 208, 132, 0.35);
}

.icon-btn-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-medium);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
}

.icon-btn-round:hover {
  border-color: var(--emerald-green);
  transform: scale(1.05);
}

.plus-add-btn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.plus-add-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  transform: scale(1.05);
}

/* Finnhub Live Status Pill */
.finnhub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  background: var(--card-bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.finnhub-status-pill.connected {
  border-color: rgba(0, 208, 132, 0.3);
  color: var(--emerald-green-dark);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f59e0b;
}

.finnhub-status-pill.connected .status-dot-pulse {
  background-color: var(--emerald-green);
  box-shadow: 0 0 8px var(--emerald-green);
}

/* ==========================================================================
   Desktop Main Content & Layout Grid
   ========================================================================== */
.desktop-main-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 60px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Top Card: Desktop Hero & Interactive Chart */
.desktop-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
}

.desktop-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-controls-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* 2-Column Split: Assets Panel (65%) & Daily News Panel (35%) */
.desktop-main-split {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 24px;
  align-items: start;
}

.desktop-assets-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.desktop-news-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  min-width: 0;
}

.desktop-news-panel .market-news-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-bottom: 0;
}

/* ==========================================================================
   Hero Balance & Metrics Section
   ========================================================================== */
.hero-balance-section {
  padding-top: 4px;
  margin-bottom: 20px;
}

.balance-caption {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: -0.1px;
}

.balance-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hero-balance-text {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--emerald-green);
  line-height: 1.1;
  transition: color 0.2s ease;
}

.hero-balance-text.hidden-state {
  letter-spacing: 2px;
  color: var(--text-dim);
}

.pct-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--emerald-light-bg);
  color: var(--emerald-green-dark);
  font-size: 13.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.pct-badge-pill.negative {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

.gain-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--emerald-green-dark);
}

.gain-stats-row.negative {
  color: var(--accent-red);
}

/* ==========================================================================
   Chart Style Selector Dropdown (18 Professional Chart Types)
   ========================================================================== */
.chart-top-controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  position: relative;
  margin-bottom: 14px;
}

.chart-style-dropdown-wrap {
  position: relative;
  user-select: none;
}

.chart-style-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.chart-style-trigger-btn:hover {
  background: var(--card-bg);
  border-color: var(--emerald-green);
  box-shadow: 0 3px 10px rgba(0, 208, 132, 0.15);
  transform: translateY(-1px);
}

.chart-style-trigger-btn.open {
  border-color: var(--emerald-green);
  box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.2);
}

.chart-style-trigger-btn .cs-icon {
  font-size: 14px;
  line-height: 1;
}

.chart-style-trigger-btn .cs-label {
  letter-spacing: -0.1px;
}

.chart-style-trigger-btn .cs-chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.chart-style-trigger-btn.open .cs-chevron {
  transform: rotate(180deg);
}

.chart-style-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: csMenuFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .chart-style-menu {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.chart-style-menu.open {
  display: flex;
}

@keyframes csMenuFade {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cs-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  background: var(--card-subtle);
}

.cs-menu-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cs-menu-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--emerald-green);
  background: var(--emerald-light-bg);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

body.theme-dark .cs-menu-badge {
  background: rgba(0, 208, 132, 0.18);
}

.cs-menu-scrollable {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
}

.cs-group-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 8px 10px 4px;
}

.cs-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  color: var(--text-main);
}

.cs-menu-item:hover {
  background: var(--card-subtle);
}

.cs-menu-item.active {
  background: var(--emerald-light-bg);
  color: var(--emerald-green-dark);
}

body.theme-dark .cs-menu-item.active {
  background: rgba(0, 208, 132, 0.15);
  color: #00e08f;
}

.cs-item-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.cs-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cs-item-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

.cs-item-desc {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-menu-item.active .cs-item-desc {
  color: var(--emerald-green-dark);
}

body.theme-dark .cs-menu-item.active .cs-item-desc {
  color: #00d084;
}

.cs-check {
  font-size: 13px;
  font-weight: 800;
  color: var(--emerald-green);
  opacity: 0;
  flex-shrink: 0;
}

.cs-menu-item.active .cs-check {
  opacity: 1;
}

/* ==========================================================================
   Mode Switcher Segment (Line Chart | Pie Chart | Statistics)
   ========================================================================== */
.chart-mode-segment {
  display: flex;
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 0;
}

.cms-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cms-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body.theme-dark .cms-btn.active {
  background: #1e293b;
  color: #ffffff;
}

/* ==========================================================================
   Chart Display Container & Y-Axis Reference Guide
   ========================================================================== */
.chart-interactive-stage {
  position: relative;
  width: 100%;
  height: 290px;
  margin-bottom: 12px;
}

.chart-y-axis-labels {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 26px;
  width: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.chart-canvas-wrap {
  position: absolute;
  left: 52px;
  right: 0;
  top: 0;
  bottom: 24px;
}

.chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-x-axis-labels {
  position: absolute;
  left: 56px;
  right: 10px;
  bottom: 2px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 600;
  color: var(--text-dim);
  pointer-events: none;
  z-index: 2;
}

body.theme-dark .chart-x-axis-labels {
  color: #64748b;
}

.chart-watermark-tag {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.8;
  pointer-events: none;
}

/* Tooltip */
.pro-chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 10;
  transition: opacity 0.15s ease;
}

/* Timeframe Bar (1D, 5D, 1M, 6M, YTD, 1Y, 5Y, ALL) */
.timeframe-bar-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 20px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.tf-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tf-pill-btn:hover {
  background: var(--card-subtle);
  color: var(--text-main);
}

.tf-pill-btn.active {
  background: var(--card-subtle);
  border-color: var(--border-medium);
  color: var(--emerald-green);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-dark .tf-pill-btn.active {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #00e08f;
}

/* Modal Timeframe Selector (1D, 5D, 1M, 6M, YTD, 1Y, 5Y) */
.modal-timeframe-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--card-subtle);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.m-tf-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 6px 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.m-tf-btn:hover {
  color: var(--text-main);
}

.m-tf-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.theme-dark .m-tf-btn.active {
  background: #1e293b;
  color: #ffffff;
}

/* Pie Chart View (Allocation Donut) */
.pie-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.donut-canvas-box {
  width: 170px;
  height: 170px;
  position: relative;
  margin-bottom: 16px;
}

.pie-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.legend-card-item {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Statistics View Container */
.stats-view-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-metric-card {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.stat-metric-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   "Your Assets" Section & $ vs % Toggle
   ========================================================================== */
.assets-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.your-assets-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.assets-right-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dollar-pct-switch {
  display: inline-flex;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 2px;
}

.dps-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dim);
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dps-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

body.theme-dark .dps-btn.active {
  background: #1e293b;
  color: #ffffff;
}

/* Sub-headers row (Asset, Price, Holdings ▼) */
.assets-table-columns {
  display: grid;
  grid-template-columns: 2.2fr 1.6fr 2fr;
  align-items: center;
  padding: 0 6px 8px 6px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.col-holdings-sort {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  cursor: pointer;
}

/* ==========================================================================
   Asset Rows (Exact Layout: Ethereum, Bitcoin, Cardano, Nvidia, etc.)
   ========================================================================== */
.asset-item-card {
  display: grid;
  grid-template-columns: 2.2fr 1.6fr 2fr;
  align-items: center;
  padding: 12px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.asset-item-card:hover {
  background: var(--card-subtle);
}

.asset-meta-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-coin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.asset-name-stack {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.an-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-symbol {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.asset-price-col {
  display: flex;
  flex-direction: column;
}

.ap-current {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.ap-change {
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald-green-dark);
  display: flex;
  align-items: center;
  gap: 2px;
}

.ap-change.negative {
  color: var(--accent-red);
}

.asset-holdings-col {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.ah-total {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.ah-units {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

/* ==========================================================================
   Bottom Navigation Dock (Home, Markets, Portfolio, Search, User)
   ========================================================================== */
.bottom-nav-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 50;
}

body.theme-dark .bottom-nav-dock {
  background: rgba(12, 16, 21, 0.94);
  border-top-color: var(--border-medium);
}

.dock-item {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.dock-item:hover, .dock-item.active {
  color: var(--text-main);
}

.dock-center-pie {
  color: #0f172a !important;
  transform: translateY(-4px);
}

body.theme-dark .dock-center-pie {
  color: #ffffff !important;
}

/* ==========================================================================
   Category Chips & Universal Search Elements
   ========================================================================== */
.category-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.category-chips-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.18s ease;
}

.cat-chip.active {
  background: var(--emerald-light-bg);
  border-color: rgba(0, 208, 132, 0.35);
  color: var(--emerald-green-dark);
}

/* Quick Search Trigger Bar */
.market-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-search-bar:hover {
  border-color: var(--emerald-green);
}

.msb-text {
  font-size: 13px;
  color: var(--text-dim);
  flex: 1;
}

.msb-kbd {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-medium);
}

body.theme-dark .msb-kbd {
  background: #17202c;
}

.btn-quick-add-row {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card-subtle);
  border: 1.5px dashed var(--border-medium);
  color: var(--emerald-green-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-quick-add-row:hover {
  background: var(--emerald-light-bg);
  border-color: var(--emerald-green);
  transform: translateY(-1px);
}

.portfolio-pick-card {
  transition: all 0.2s ease;
  width: 100%;
}
.portfolio-pick-card:hover {
  transform: translateY(-1px);
  border-color: var(--emerald-green) !important;
}
.portfolio-pick-card.active {
  border-color: var(--emerald-green) !important;
  background: var(--emerald-light-bg) !important;
}
body.theme-dark .portfolio-pick-card.active {
  background: rgba(0, 208, 132, 0.12) !important;
}

/* ==========================================================================
   Modals & Bottom Sheets (Search, Detail, Auth, Pro Gate)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 990;
}

/* ==========================================================================
   Pro Stock Detail Modal (Full-Featured Pro Charting Workstation)
   ========================================================================== */
.pro-stock-modal,
.dark-bottom-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 860px;
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 24px 28px 28px 28px;
  z-index: 1000;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 768px) {
  .pro-stock-modal,
  .dark-bottom-sheet {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    padding: 20px 16px 24px 16px;
    animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes slideUpSheet {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.modal-chart-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 60;
}

#modalChartStyleDropdownWrap {
  position: relative;
  z-index: 70;
}

#modalChartStyleDropdownWrap .chart-style-menu {
  left: 0;
  right: auto;
  width: 310px;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

#modalChartStyleDropdownWrap .cs-menu-scrollable {
  max-height: min(350px, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#modalChartTooltip {
  top: 12px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.modal-chart-stage-wrap {
  position: relative;
  width: 100%;
  height: 310px;
  margin-bottom: 16px;
  background: radial-gradient(circle at 50% 15%, rgba(0, 208, 132, 0.04), transparent 75%), var(--card-subtle);
  border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark .modal-chart-stage-wrap {
  background: radial-gradient(circle at 50% 12%, rgba(0, 208, 132, 0.06), transparent 75%), #0a0f19;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-y-labels {
  position: absolute;
  left: 10px;
  top: 14px;
  bottom: 28px;
  width: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 700;
  color: var(--text-dim);
  pointer-events: none;
  z-index: 2;
  text-align: right;
  padding-right: 8px;
  border-right: 1px dashed var(--border-light);
}

body.theme-dark .modal-y-labels {
  border-right-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.modal-canvas-wrap {
  position: absolute;
  left: 76px;
  right: 12px;
  top: 0;
  bottom: 24px;
}

.modal-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-x-labels {
  left: 78px;
  right: 14px;
  bottom: 4px;
}

.modal-canvas-wrap .chart-watermark-tag {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  opacity: 0.35;
  pointer-events: none;
  text-transform: uppercase;
}

.modal-tf-bar {
  margin-bottom: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .modal-chart-stage-wrap {
    height: 260px;
  }
  .modal-y-labels {
    width: 52px;
    font-size: 10px;
    padding-right: 4px;
  }
  .modal-canvas-wrap {
    left: 64px;
    right: 8px;
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 2px;
  margin: 0 auto 16px auto;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sheet-close-btn {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
}

.trending-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.trend-pill {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.trend-pill:hover {
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
}

.search-results-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

/* 3-Lines Left-Hand Side Drawer / Dropdown Menu */
.side-drawer-left {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 340px;
  max-width: 88vw;
  height: 100vh;
  background: var(--card-bg);
  border-right: 1px solid var(--border-medium);
  z-index: 1500;
  box-shadow: 15px 0 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  transform: translateX(0);
  visibility: visible;
}

.side-drawer-left.hidden {
  display: flex !important;
  transform: translateX(-100%) !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--card-bg);
}

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

.drawer-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin: 10px 0 6px 4px;
}

.drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
  width: 100%;
  text-align: left;
}

.drawer-nav-item:hover {
  background: var(--border-light);
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.dni-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.dni-text-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dni-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dni-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.dni-badge-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.dni-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

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

.drawer-mini-btn {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  color: var(--emerald-green-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.drawer-mini-btn:hover {
  background: var(--emerald-light-bg);
  border-color: var(--emerald-green);
}

.drawer-auth-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.drawer-mini-btn-primary {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

.drawer-mini-btn-primary:hover {
  background: var(--emerald-green) !important;
  border-color: var(--emerald-green) !important;
  color: #05140d !important;
}

body.theme-dark .drawer-mini-btn-primary {
  background: var(--emerald-green) !important;
  color: #05140d !important;
  border-color: var(--emerald-green) !important;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-top: 4px;
}

/* Auth / Pro Gate / Portfolio Add Modals */
.dark-form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  padding: 26px 22px;
  z-index: 1000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.dark-input {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.dark-input:focus {
  border-color: var(--emerald-green);
}

.btn-primary-neon {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  padding: 13px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary-neon:hover {
  background: #1e293b;
}

.btn-demo-auth {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--emerald-green);
  color: var(--emerald-green-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
  font-family: inherit;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Star Watchlist Button */
.star-watchlist-btn {
  background: transparent;
  border: none;
  font-size: 17px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: all 0.15s ease;
}

.star-watchlist-btn.starred {
  color: #f59e0b;
}

/* Utilities */
.text-neon-green { color: var(--emerald-green-dark) !important; }
.text-red { color: var(--accent-red) !important; }
.hidden,
.modal-overlay.hidden,
.pro-stock-modal.hidden,
.dark-form-modal.hidden,
.dark-bottom-sheet.hidden,
.side-drawer-left.hidden,
.qa-panel-dropdown.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Catalog Count Pill & Load More */
.catalog-count-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-green-dark);
  background: var(--emerald-light-bg);
  border: 1px solid rgba(0, 208, 132, 0.25);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-top: 3px;
}

.btn-load-more-catalog {
  width: 100%;
  padding: 12px;
  margin: 12px 0 6px;
  background: var(--card-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.btn-load-more-catalog:hover {
  background: var(--emerald-light-bg);
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
}

.badge-tag-sp500 {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  background: rgba(0, 208, 132, 0.15);
  color: var(--emerald-green-dark);
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.3px;
}

.badge-tag-exchange {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  background: var(--card-subtle);
  color: var(--text-dim);
  border-radius: 4px;
  margin-left: 4px;
}

/* Custom Portfolio Controls & Actions */
.portfolio-pick-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.portfolio-pick-card.active {
  background: var(--emerald-light-bg);
  border: 1.5px solid var(--emerald-green);
}

.btn-del-portfolio {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  margin-left: 8px;
  transition: all 0.15s ease;
}

.btn-del-portfolio:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.btn-del-stock {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-del-stock:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.empty-portfolio-box {
  text-align: center;
  padding: 36px 20px;
  background: var(--card-subtle);
  border: 1.5px dashed var(--border-medium);
  border-radius: 16px;
  margin: 12px 0;
}

.empty-port-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.empty-port-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-port-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto 16px;
}

.empty-port-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Google Finance Watchlist & Quick Actions
   ========================================================================== */
.watchlist-empty-box {
  text-align: center;
  padding: 30px 18px;
  background: var(--card-subtle);
  border: 1.5px dashed var(--border-medium);
  border-radius: 16px;
  margin: 10px 0 16px;
}

.watchlist-quick-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.btn-quick-follow {
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-quick-follow:hover {
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
  background: var(--emerald-light-bg);
  transform: translateY(-1px);
}

/* ==========================================================================
   Daily Market News Section (Google Finance Style)
   ========================================================================== */
.market-news-section {
  margin-top: 24px;
  margin-bottom: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

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

.news-section-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.news-live-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 208, 132, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 208, 132, 0); }
}

.news-refresh-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-green-dark);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.news-refresh-btn:hover {
  background: var(--emerald-light-bg);
  border-color: var(--emerald-green);
}

.news-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.news-chips-scroll::-webkit-scrollbar {
  display: none;
}

.news-cat-chip, .news-chip {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s ease;
}

.news-cat-chip.active, .news-chip.active {
  background: var(--emerald-light-bg);
  border-color: rgba(0, 208, 132, 0.4);
  color: var(--emerald-green-dark);
}

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

.news-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.news-card:hover {
  transform: translateY(-1px);
  border-color: var(--emerald-green);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.news-card-body {
  flex: 1;
  min-width: 0;
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.news-source-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--emerald-green-dark);
  background: var(--emerald-light-bg);
  padding: 1px 6px;
  border-radius: 4px;
}

.news-time-tag {
  font-size: 11px;
  color: var(--text-dim);
}

.news-tickers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.news-ticker-tag {
  font-size: 10px;
  font-weight: 800;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.news-ticker-tag:hover {
  background: rgba(59, 130, 246, 0.25);
}

.news-headline-link, .news-headline {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 4px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-headline-link:hover {
  color: var(--emerald-green-dark);
}

.news-summary-snippet, .news-summary {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.news-thumbnail, .news-thumb-box img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-subtle);
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  object-fit: cover;
}

/* Stock Sheet News Items */
.sheet-news-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.sheet-news-item:hover {
  border-color: var(--emerald-green);
}

/* ==========================================================================
   Ask AI Financial Analyst Assistant
   ========================================================================== */
.desk-ai-btn {
  background: linear-gradient(135deg, rgba(0, 208, 132, 0.15), rgba(59, 130, 246, 0.15)) !important;
  border: 1px solid rgba(0, 208, 132, 0.4) !important;
  color: var(--text-main) !important;
  font-weight: 800 !important;
}

.desk-ai-btn:hover {
  border-color: var(--emerald-green) !important;
  transform: translateY(-1px);
}

.ai-sparkle-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #00d084, #059669);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 208, 132, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.ai-sparkle-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 208, 132, 0.45);
}

.ai-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00d084, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 208, 132, 0.3);
}

.ai-live-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 208, 132, 0.18);
  color: var(--emerald-green-dark);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  letter-spacing: 0.3px;
}

.ai-quick-prompts-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}

.ai-quick-prompts-row::-webkit-scrollbar {
  display: none;
}

.ai-prompt-chip {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ai-prompt-chip:hover {
  border-color: var(--emerald-green);
  color: var(--emerald-green-dark);
  background: var(--emerald-light-bg);
}

.ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 8px 2px 14px;
}

.ai-msg-bubble {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.ai-msg-assistant {
  align-self: flex-start;
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.ai-msg-assistant h3, .ai-msg-assistant h4 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.ai-msg-assistant ul {
  padding-left: 18px;
  margin: 6px 0;
}

.ai-msg-assistant li {
  margin-bottom: 4px;
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--emerald-green);
  color: #052e16;
  font-weight: 600;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 208, 132, 0.25);
}

.ai-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 14px;
  margin-top: 10px;
}

.ai-input-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
}

.ai-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--emerald-green);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  background: var(--emerald-green-dark);
  transform: scale(1.05);
}

/* Responsive Desktop & Mobile Styles */
@media (max-width: 1080px) {
  .desktop-main-split {
    grid-template-columns: 1fr;
  }
  .desktop-news-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .desktop-navbar {
    padding: 10px 16px;
    gap: 10px;
  }
  .desktop-search-bar {
    display: none;
  }
  .desktop-main-content {
    padding: 16px 14px 40px 14px;
    gap: 16px;
  }
  .desktop-chart-card,
  .desktop-assets-panel,
  .desktop-news-panel {
    padding: 16px 14px;
    border-radius: 16px;
  }
  .chart-interactive-stage {
    height: 220px;
  }
}

/* ==========================================================================
   Subscription Gating, Indicators & Price Alerts Styles
   ========================================================================== */
.indicator-chip-btn {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.indicator-chip-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}
.indicator-chip-btn.active {
  background: rgba(0, 208, 132, 0.15);
  border-color: rgba(0, 208, 132, 0.5);
  color: var(--emerald-green-dark);
}
body.theme-dark .indicator-chip-btn.active {
  background: rgba(0, 224, 143, 0.18);
  border-color: rgba(0, 224, 143, 0.5);
  color: #00e08f;
}
.indicator-chip-btn .pro-lock-badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.alert-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
}
.alert-list-item:hover {
  border-color: var(--border-focus);
}
.alert-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-symbol-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  background: var(--card-subtle);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}
.alert-condition-text {
  font-size: 12px;
  color: var(--text-dim);
}
.alert-condition-text strong {
  color: var(--text-main);
}
.alert-channel-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  font-weight: 700;
  text-transform: uppercase;
}
.btn-delete-alert {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.btn-delete-alert:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   Data Freshness Badges (Real-Time vs. Delayed)
   ========================================================================== */
.freshness-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  user-select: none;
}
.freshness-badge-pill.freshness-realtime {
  background: rgba(0, 208, 132, 0.14);
  color: #00d084;
  border: 1px solid rgba(0, 208, 132, 0.4);
}
.freshness-badge-pill.freshness-realtime:hover {
  background: rgba(0, 208, 132, 0.22);
  transform: translateY(-1px);
}
.freshness-badge-pill.freshness-delayed {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.freshness-badge-pill.freshness-delayed:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
}

/* ==========================================================================
   Paywall & Upgrade Modal Enhancements
   ========================================================================== */
.billing-interval-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: 9999px;
  padding: 3px;
  margin: 12px 0 16px 0;
  justify-content: center;
  gap: 4px;
}
.billing-interval-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.billing-interval-btn.active {
  background: var(--card-main);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.billing-save-tag {
  background: #00d084;
  color: #0c1015;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}
.pro-tier-feature-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
}
.pro-tier-feature-matrix th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
  text-transform: uppercase;
}
.pro-tier-feature-matrix td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.pro-tier-feature-matrix tr:last-child td {
  border-bottom: none;
}
.pro-tier-feature-matrix .col-free {
  color: var(--text-dim);
  text-align: center;
}
.pro-tier-feature-matrix .col-pro {
  color: #00d084;
  font-weight: 700;
  text-align: center;
}

/* ==========================================================================
   Floating QA Debug Switch Widget
   ========================================================================== */
.qa-debug-fab {
  display: none !important;
  pointer-events: none !important;
}
.qa-debug-fab:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.25);
}
.qa-badge-tier {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}
.qa-badge-tier.qa-free {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}
.qa-badge-tier.qa-pro {
  background: rgba(0, 208, 132, 0.2);
  color: #00d084;
}
.qa-panel-dropdown {
  position: fixed;
  bottom: 64px;
  right: 20px;
  width: 290px;
  background: #111722;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qa-panel-dropdown.hidden {
  display: none;
}

/* ==========================================================================
   Company Profile, Financial Metrics, Ratios & Assessment Styling
   ========================================================================== */

/* Navbar Direct Ticker Search Input */
.desktop-search-bar {
  display: flex !important;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 4px 6px 4px 14px !important;
  cursor: text !important;
}
.navbar-ticker-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  min-width: 140px;
}
.navbar-ticker-input::placeholder {
  color: var(--text-dim);
}
.btn-navbar-search {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-navbar-search:hover {
  background: var(--emerald-green-dark);
  color: #0c1015;
  border-color: var(--emerald-green-dark);
}

/* Navbar Instant Autocomplete Dropdown */
.desktop-search-bar {
  position: relative !important;
}
.navbar-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-height: 380px;
  overflow-y: auto;
  z-index: 2500;
  padding: 6px;
  backdrop-filter: blur(14px);
}
.nsd-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nsd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}
.nsd-item:hover, .nsd-item.selected {
  background: var(--card-subtle);
}
.nsd-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.nsd-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.nsd-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.nsd-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nsd-sym {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.nsd-name {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nsd-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nsd-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  text-align: right;
}
.nsd-chg {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.nsd-btn-analyze {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 208, 132, 0.15);
  color: var(--emerald-green-dark);
  border: 1px solid rgba(0, 208, 132, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nsd-item:hover .nsd-btn-analyze {
  background: var(--emerald-green-dark);
  color: #0c1015;
}
.btn-row-analyze {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 208, 132, 0.15);
  color: var(--emerald-green-dark);
  border: 1px solid rgba(0, 208, 132, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-row-analyze:hover {
  background: var(--emerald-green-dark);
  color: #0c1015;
}

/* Modal Navigation Tabs */
.modal-nav-tabs-bar {
  display: flex;
  align-items: center;
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 16px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.modal-nav-tabs-bar::-webkit-scrollbar {
  display: none;
}
.modal-nav-tab {
  padding: 7px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-nav-tab:hover {
  color: var(--text-main);
}
.modal-nav-tab.active {
  background: var(--card-main);
  color: var(--emerald-green-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.modal-tab-content.hidden {
  display: none !important;
}

/* Company Information Card */
.company-profile-card {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.company-desc-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
  margin: 10px 0 16px 0;
}
.company-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
@media (max-width: 640px) {
  .company-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.company-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.company-detail-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.company-detail-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}
.company-detail-val a {
  color: #38bdf8;
  text-decoration: none;
}
.company-detail-val a:hover {
  text-decoration: underline;
}

/* Selected Financial Metrics Grid */
.metrics-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metrics-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .metrics-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metric-stat-card {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}
.metric-stat-card:hover {
  border-color: var(--border-medium);
}
.metric-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}
.metric-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}
.metric-stat-sub {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* 52-Week Range Bar Widget */
.range-bar-wrapper {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.range-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  position: relative;
  margin: 10px 0 6px 0;
}
.range-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #00d084);
  border-radius: 999px;
}
.range-bar-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #00d084;
  box-shadow: 0 0 8px rgba(0, 208, 132, 0.6);
}

/* Calculated Financial Ratios & Performance Indicators */
.ratios-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .ratios-grid-container {
    grid-template-columns: 1fr;
  }
}
.ratio-calc-card {
  background: var(--card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ratio-calc-card:hover {
  border-color: rgba(0, 208, 132, 0.4);
  transform: translateY(-1px);
}
.ratio-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.ratio-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}
.ratio-category-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  text-transform: uppercase;
}
.ratio-status-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 208, 132, 0.15);
  color: var(--emerald-green-dark);
}
.ratio-result-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0;
}
.ratio-result-num {
  font-size: 26px;
  font-weight: 900;
  color: var(--emerald-green-dark);
  letter-spacing: -0.5px;
}
.ratio-benchmark-tag {
  font-size: 11px;
  color: var(--text-dim);
}
.ratio-formula-strip {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11.5px;
  color: #94a3b8;
  margin: 6px 0 8px 0;
  word-break: break-all;
}
.ratio-calc-steps {
  font-size: 11.5px;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 6px;
}
.ratio-interp-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* Performance Assessment Card */
.assessment-card {
  background: linear-gradient(135deg, rgba(0, 208, 132, 0.06) 0%, rgba(56, 189, 248, 0.06) 100%);
  border: 1px solid rgba(0, 208, 132, 0.35);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.assessment-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.verdict-pill-badge {
  font-size: 13.5px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(0, 208, 132, 0.16);
  color: #00d084;
  border: 1px solid rgba(0, 208, 132, 0.4);
  letter-spacing: 0.3px;
}
.score-badge-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.score-badge-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-main);
}
.score-badge-max {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.assessment-summary-lead {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 16px;
}
.assessment-pillars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.assessment-pillar-box {
  background: var(--card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
}
.assessment-pillar-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--emerald-green-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.assessment-pillar-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
}
.strengths-risks-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 680px) {
  .strengths-risks-split {
    grid-template-columns: 1fr;
  }
}
.sr-card {
  background: var(--card-subtle);
  border-radius: 14px;
  padding: 14px 16px;
}
.sr-card.strengths {
  border: 1px solid rgba(0, 208, 132, 0.25);
}
.sr-card.risks {
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.sr-title {
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sr-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sr-list li {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}




