/* ==========================================================================
   AURA SENTINEL — SKEUOMORPHIC DESIGN SYSTEM
   Machined Titanium, Recessed Instrument Plates, Tactile Controls & Analog Meters
   ========================================================================== */

:root {
  /* Dark Theme Default Tokens (Titanium Obsidian) */
  --chassis-bg: #121417;
  --panel-plate: #1a1d22;
  --bezel-dark: #0f1114;
  --metal-surface: linear-gradient(180deg, #2a2e36 0%, #1c1f24 100%);
  --metal-rim: linear-gradient(135deg, #49505c 0%, #20242b 50%, #15181d 100%);
  --metal-brass: linear-gradient(180deg, #dfb76c 0%, #9a7837 100%);
  --metal-brass-glow: rgba(223, 183, 108, 0.35);

  /* Recessed Display & CRT Phosphor Colors */
  --display-recess: #0a0c0e;
  --display-screen: #06080a;
  --oscilloscope-bg: #040808;
  --oscilloscope-grid: rgba(0, 255, 136, 0.08);
  --oscilloscope-cross: rgba(0, 255, 136, 0.18);
  --oscilloscope-trace: #00ff88;
  --oscilloscope-trace-glow: rgba(0, 255, 136, 0.28);
  --phosphor-green: #00ff88;
  --phosphor-green-glow: rgba(0, 255, 136, 0.4);
  --phosphor-amber: #ffaa00;
  --phosphor-amber-glow: rgba(255, 170, 0, 0.35);
  --phosphor-cyan: #00e5ff;
  --phosphor-cyan-glow: rgba(0, 229, 255, 0.35);
  --phosphor-red: #ff3344;
  --phosphor-red-glow: rgba(255, 51, 68, 0.4);

  /* Typography & Neutral Shades */
  --text-main: #e2e8f0;
  --text-heading: #f8fafc;
  --text-muted: #8e99a8;
  --text-dim: #5a6473;
  --text-engraved: #080a0d;

  /* Tactile Shadows */
  --shadow-bevel-out: 0 4px 10px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  --shadow-bevel-in: inset 0 3px 6px rgba(0, 0, 0, 0.85), inset 0 -1px 1px rgba(255, 255, 255, 0.05);
  --shadow-button-up: 0 5px 0 #0d0f12, 0 8px 15px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  --shadow-button-down: 0 1px 0 #0d0f12, 0 2px 4px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(0, 0, 0, 0.6);
  --border-chassis: #23272f;

  /* Fonts */
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Chakra Petch', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

/* ==========================================================================
   BRIGHT / LIGHT THEME (Brushed Platinum, Steel & High-Contrast Daylight)
   ========================================================================== */
body.theme-bright {
  --chassis-bg: #e2e8f0;
  --panel-plate: #f1f5f9;
  --bezel-dark: #cbd5e1;
  --metal-surface: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  --metal-rim: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  --metal-brass: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  --metal-brass-glow: rgba(245, 158, 11, 0.25);

  --display-recess: #e2e8f0;
  --display-screen: #ffffff;
  --oscilloscope-bg: #0f172a;
  --oscilloscope-grid: rgba(16, 185, 129, 0.15);
  --oscilloscope-cross: rgba(16, 185, 129, 0.3);
  --oscilloscope-trace: #10b981;
  --oscilloscope-trace-glow: rgba(16, 185, 129, 0.35);
  --phosphor-green: #059669;
  --phosphor-green-glow: rgba(5, 150, 105, 0.25);
  --phosphor-amber: #d97706;
  --phosphor-amber-glow: rgba(217, 119, 6, 0.25);
  --phosphor-cyan: #0284c7;
  --phosphor-cyan-glow: rgba(2, 132, 199, 0.25);
  --phosphor-red: #dc2626;
  --phosphor-red-glow: rgba(220, 38, 38, 0.25);

  --text-main: #1e293b;
  --text-heading: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-engraved: #e2e8f0;

  --shadow-bevel-out: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 1px 1px #ffffff;
  --shadow-bevel-in: inset 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.8);
  --shadow-button-up: 0 4px 0 #94a3b8, 0 6px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px #ffffff;
  --shadow-button-down: 0 1px 0 #94a3b8, 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.12);
  --border-chassis: #cbd5e1;

  background-color: #cbd5e1;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  color: var(--text-main);
}

body.theme-bright .terminal-shell {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.06);
}

body.theme-bright .master-bezel {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom-color: #cbd5e1;
}

body.theme-bright .recessed-badge {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

body.theme-bright .badge-text {
  color: #0f172a;
  text-shadow: none;
}

body.theme-bright .version-tag {
  color: #0284c7;
}

/* Region Deck */
body.theme-bright .market-region-deck {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .region-deck-title {
  color: #64748b;
}
body.theme-bright .region-rocker-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .region-rocker-btn.active {
  background: #dcfce7;
  color: #047857;
  border-color: #10b981;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Macro Mood Gauge in Header */
body.theme-bright .macro-gauge-module {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .gauge-label {
  color: #64748b;
}
body.theme-bright .meter-face {
  background: radial-gradient(ellipse at 50% 100%, #ffffff 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
}
body.theme-bright .scale-mark.mark-mid {
  color: #64748b;
}
body.theme-bright .lcd-digital-score {
  color: #047857;
  text-shadow: none;
}

/* Flip Clock & Refresh Deck */
body.theme-bright .refresh-deck {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
}
body.theme-bright .deck-title {
  color: #64748b;
}
body.theme-bright .flip-clock-display {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .unit-val {
  color: #b45309;
  text-shadow: none;
}
body.theme-bright .unit-lbl {
  color: #64748b;
}
body.theme-bright .clock-separator {
  color: #b45309;
}
body.theme-bright .next-refresh-timestamp {
  color: #64748b;
}
body.theme-bright .skeuo-push-button {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #cbd5e1;
  box-shadow: 0 3px 0 #94a3b8, 0 4px 8px rgba(0,0,0,0.12);
}
body.theme-bright .skeuo-push-button .btn-cap {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-top: 1px solid #ffffff;
  color: #0f172a;
  text-shadow: none;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.9), 0 1px 2px rgba(0,0,0,0.06);
}
body.theme-bright .skeuo-push-button:hover .btn-cap {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0284c7;
}
body.theme-bright .skeuo-push-button .btn-label {
  color: #0f172a;
}
body.theme-bright .skeuo-push-button:hover .btn-label {
  color: #0284c7;
}
body.theme-bright .skeuo-push-button .icon-refresh {
  stroke: #0f172a;
}
body.theme-bright .skeuo-push-button:hover .icon-refresh {
  stroke: #0284c7;
}
body.theme-bright .skeuo-push-button:active .btn-cap,
body.theme-bright .skeuo-push-button.depressed .btn-cap {
  background: #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
body.theme-bright .status-led-item span {
  color: #64748b;
}

/* User Account Tray */
body.theme-bright .user-account-tray {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .user-name-display {
  color: #0f172a;
}
body.theme-bright .user-role-badge {
  color: #0284c7;
}
body.theme-bright .btn-settings-gear,
body.theme-bright .btn-header-logout {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

/* Search Box & Quick Chips */
body.theme-bright .search-box-recessed {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .search-icon {
  stroke: #64748b;
}
body.theme-bright .search-box-recessed input {
  color: #0f172a;
}
body.theme-bright .search-box-recessed input::placeholder {
  color: #94a3b8;
}
body.theme-bright .btn-search-clear {
  color: #64748b;
}
body.theme-bright .btn-search-submit {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #0284c7;
  color: #ffffff;
}
body.theme-bright .quick-chips-bay {
  border-left-color: #cbd5e1;
}
body.theme-bright .tag-title {
  color: #64748b;
}
body.theme-bright .quick-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
body.theme-bright .quick-chip:hover {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0284c7;
}
body.theme-bright .autocomplete-dropdown {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
body.theme-bright .autocomplete-item {
  border-bottom-color: #f1f5f9;
}
body.theme-bright .autocomplete-item:hover {
  background: #f8fafc;
}
body.theme-bright .item-ticker {
  color: #047857;
}
body.theme-bright .item-name {
  color: #334155;
}
body.theme-bright .item-exchange {
  color: #64748b;
}

/* Section Banners & Stat Pills */
body.theme-bright .section-heading {
  color: #0f172a;
}
body.theme-bright .section-subtext {
  color: #475569;
}
body.theme-bright .stat-pill {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .pill-label {
  color: #64748b;
}
body.theme-bright .pill-val {
  color: #0f172a;
}
body.theme-bright .pill-val.highlight {
  color: #047857;
}

/* Cards (Sector, Stock, Deep Dive, News) */
body.theme-bright .sector-instrument-card,
body.theme-bright .stock-opportunity-card,
body.theme-bright .matrix-card,
body.theme-bright .targeted-news-panel,
body.theme-bright .deepdive-header-bezel,
body.theme-bright .oscilloscope-instrument,
body.theme-bright .sentiment-meter-instrument,
body.theme-bright .wire-incident-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-bevel-out);
}

body.theme-bright .sector-name,
body.theme-bright .ticker-symbol,
body.theme-bright .ticker-name-display,
body.theme-bright .stock-price,
body.theme-bright .price-val,
body.theme-bright .vol-val,
body.theme-bright .matrix-header h4,
body.theme-bright .news-panel-header h4,
body.theme-bright .wire-title-link,
body.theme-bright .source-name {
  color: #0f172a;
}

body.theme-bright .sector-desc,
body.theme-bright .company-name,
body.theme-bright .matrix-body,
body.theme-bright .wire-desc {
  color: #334155;
}

/* Subsector & Theme Badges on Cards */
body.theme-bright .subsector-badge {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}
body.theme-bright .subsector-tag,
body.theme-bright .sector-tag {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0284c7;
}

/* Sector Track Bar & Catalysts */
body.theme-bright .score-track-labels {
  color: #64748b;
}
body.theme-bright .score-track-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .sector-catalysts {
  background: #f8fafc;
  border-color: #e2e8f0;
}
body.theme-bright .catalysts-title {
  color: #64748b;
}
body.theme-bright .catalyst-link {
  color: #1e293b;
}
body.theme-bright .catalyst-link:hover {
  color: #0284c7;
}
body.theme-bright .catalyst-source {
  color: #64748b;
}
body.theme-bright .footer-ticker-lbl {
  color: #64748b;
}
body.theme-bright .ticker-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

/* Stock Opportunities Filters & Cards */
body.theme-bright .filter-label {
  color: #64748b;
}
body.theme-bright .filter-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.theme-bright .filter-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}
body.theme-bright .catalyst-meter-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}
body.theme-bright .catalyst-score-badge {
  color: #047857;
  text-shadow: none;
}
body.theme-bright .catalyst-label-tag {
  color: #475569;
}
body.theme-bright .catalyst-news-counter {
  color: #0284c7;
}
body.theme-bright .card-thesis-box,
body.theme-bright .card-risk-box {
  background: #f8fafc;
}
body.theme-bright .box-title {
  color: #64748b;
}
body.theme-bright .box-text {
  color: #1e293b;
}
body.theme-bright .btn-card-deepdive {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  color: #ffffff;
}
body.theme-bright .btn-pin-toggle {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .btn-pin-toggle:hover,
body.theme-bright .btn-pin-toggle.pinned {
  background: #fef9c3;
  border-color: #ca8a04;
  color: #a16207;
}

/* STOCK ANALYZER (TAB 3) EMPTY STATE & IN-TAB SEARCH */
body.theme-bright .deepdive-search-prompt {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
}
body.theme-bright .prompt-housing h3 {
  color: #0f172a;
}
body.theme-bright .prompt-housing p {
  color: #475569;
}
body.theme-bright .tab-search-bar-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .tab-search-input {
  color: #0f172a;
}
body.theme-bright .tab-search-input::placeholder {
  color: #94a3b8;
}
body.theme-bright .btn-tab-clear {
  color: #64748b;
}
body.theme-bright .btn-tab-analyze {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #7c3aed;
  color: #ffffff;
}
body.theme-bright .quick-suggest-divider {
  color: #64748b;
}
body.theme-bright .btn-sample-pick {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
body.theme-bright .btn-sample-pick:hover {
  background: #f1f5f9;
  border-color: #7c3aed;
  color: #7c3aed;
}
body.theme-bright .tab-autocomplete-dropdown {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Active Deep Dive Panel in Bright Mode */
body.theme-bright .active-panel-search-bar {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
body.theme-bright .btn-reset-deepdive {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.theme-bright .btn-reset-deepdive:hover {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0369a1;
}
body.theme-bright .search-bar-lbl {
  color: #7c3aed;
}
body.theme-bright .active-search-input-wrap input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.theme-bright .btn-active-analyze {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #7c3aed;
  color: #ffffff;
}
body.theme-bright .ticker-symbol-display {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.theme-bright .timeframe-selector-bay {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .tf-label {
  color: #64748b;
}
body.theme-bright .tf-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .tf-btn.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
body.theme-bright .instrument-title {
  color: #0f172a;
}
body.theme-bright .grid-mode-tag {
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 4px;
}
body.theme-bright .oscilloscope-screen {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.theme-bright .crt-scanlines,
body.theme-bright .crt-glass-reflection {
  display: none !important;
}
body.theme-bright .oscilloscope-controls {
  color: #64748b;
}
body.theme-bright .ctrl-label {
  color: #64748b;
  font-weight: 600;
}
body.theme-bright .ctrl-status {
  color: #047857;
  font-weight: 700;
}

/* Deep Dive Sentiment Meter in Bright Mode */
body.theme-bright .rect-gauge-housing {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .rect-gauge-readout-row {
  border-bottom-color: #f1f5f9;
}
body.theme-bright .rect-gauge-readout-row .readout-label {
  color: #0f172a;
}
body.theme-bright .rect-scale-labels .scale-lbl.bear {
  color: #dc2626;
  text-shadow: none;
}
body.theme-bright .rect-scale-labels .scale-lbl.mid {
  color: #64748b;
}
body.theme-bright .rect-scale-labels .scale-lbl.bull {
  color: #059669;
  text-shadow: none;
}
body.theme-bright .rect-spectrum-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .rect-spectrum-center-mark {
  background: #0f172a;
}
body.theme-bright .indicator-arrow {
  border-top-color: #0f172a;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}
body.theme-bright .indicator-line {
  background: #0f172a;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
}
body.theme-bright .readout-score {
  color: #047857;
  text-shadow: none;
}
body.theme-bright .readout-label {
  color: #475569;
}
body.theme-bright .catalyst-volume-meter {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .vol-lbl {
  color: #64748b;
}
body.theme-bright .targeted-news-header h4 {
  color: #0f172a;
}
body.theme-bright .targeted-news-item {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.theme-bright .targeted-news-link {
  color: #0f172a;
}
body.theme-bright .targeted-news-source {
  color: #64748b;
}

/* Incident Wire in Bright Mode */
body.theme-bright .wire-search-bar input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.theme-bright .wire-theme-tag {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}
body.theme-bright .wire-source-tag {
  color: #64748b;
}

/* Watchlist in Bright Mode */
body.theme-bright .btn-action-small,
body.theme-bright #btn-clear-watchlist,
body.theme-bright .btn-clear-vault {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #dc2626;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.theme-bright .btn-action-small:hover,
body.theme-bright #btn-clear-watchlist:hover,
body.theme-bright .btn-clear-vault:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.2);
}
body.theme-bright .empty-vault-card {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}

/* Modals & Dialogs in Bright Mode */
body.theme-bright .vault-door-chassis {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .vault-header {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
body.theme-bright .vault-title {
  color: #0f172a;
}
body.theme-bright .vault-subtitle {
  color: #64748b;
}
body.theme-bright .auth-tabs-row {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.theme-bright .auth-tab-btn {
  color: #64748b;
}
body.theme-bright .auth-tab-btn.active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #047857;
}
body.theme-bright .auth-label {
  color: #475569;
}
body.theme-bright .auth-input-recess {
  background: #f8fafc;
  border-color: #cbd5e1;
}
body.theme-bright .auth-input {
  color: #0f172a;
}
body.theme-bright .auth-btn-submit {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #0284c7;
  color: #ffffff;
}
body.theme-bright .auth-demo-shortcut {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
body.theme-bright .demo-title {
  color: #0284c7;
}
body.theme-bright .demo-sub {
  color: #64748b;
}
/* Admin Console in Bright Mode */
body.theme-bright .admin-table-chassis,
body.theme-bright .admin-kpi-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-bright .admin-table-title,
body.theme-bright .user-display-name,
body.theme-bright .admin-kpi-card .kpi-val {
  color: #0f172a;
}
body.theme-bright .admin-user-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom-color: #cbd5e1;
}
body.theme-bright .admin-user-table td {
  border-bottom-color: #f1f5f9;
  color: #334155;
}
body.theme-bright .admin-search-wrap input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.theme-bright .btn-role-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .admin-select-input option {
  background: #ffffff;
  color: #0f172a;
}

/* Settings Modal & Profile in Bright Mode */
body.theme-bright .modal-bezel-frame,
body.theme-bright .dialog-window {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
body.theme-bright .modal-bezel-header,
body.theme-bright .dialog-header {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom-color: #cbd5e1;
}
body.theme-bright .modal-bezel-title,
body.theme-bright .dialog-title {
  color: #0f172a;
}
body.theme-bright .modal-bezel-sub,
body.theme-bright .dialog-sub {
  color: #475569;
}
body.theme-bright .modal-close-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}
body.theme-bright .modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #f87171;
}
body.theme-bright .audit-sec-header h4 {
  color: #0284c7;
}
body.theme-bright .theme-card-option {
  background: #f8fafc;
  border-color: #cbd5e1;
}
body.theme-bright .theme-card-option:hover {
  border-color: #94a3b8;
  background: #ffffff;
}
body.theme-bright .theme-card-option.active {
  border-color: #059669;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.2);
}
body.theme-bright .theme-name {
  color: #0f172a;
}
body.theme-bright .theme-card-info div {
  color: #475569;
}
body.theme-bright .theme-radio-dot {
  border-color: #94a3b8;
}
body.theme-bright .theme-card-option.active .theme-radio-dot {
  border-color: #059669;
}
body.theme-bright .audit-card {
  background: #f8fafc;
  border-color: #cbd5e1;
}
body.theme-bright .profile-field-row {
  border-bottom-color: #e2e8f0;
}
body.theme-bright .profile-field-lbl {
  color: #475569;
  font-weight: 700;
}
body.theme-bright .profile-field-val {
  color: #0f172a;
  font-weight: 600;
}
body.theme-bright .modal-footer-bezel,
body.theme-bright .dialog-footer {
  background: #f1f5f9;
  border-top-color: #cbd5e1;
}

body.theme-bright .chassis-footer {
  background: #e2e8f0;
  border-top-color: #cbd5e1;
}
body.theme-bright .footer-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-bright .footer-meta {
  color: #64748b;
}

/* Reset & Base Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Global Utility: Hidden */
.hidden {
  display: none !important;
}

.auth-form.hidden {
  display: none !important;
}

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

body {
  background-color: #0b0d10;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.25) 0%, transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  justify-content: center;
}

/* Master Shell Container */
.terminal-shell {
  width: 100%;
  max-width: 1380px;
  background: var(--panel-plate);
  border-radius: 12px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 3px solid #23272f;
}

/* CNC Machined Corner Screws */
.bezel-screw {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a94a6, #23272e);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(255, 255, 255, 0.15);
  z-index: 10;
}
.bezel-screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 15%;
  right: 15%;
  height: 1.5px;
  background: #0d0f12;
  transform: translateY(-50%) rotate(45deg);
}
.bezel-screw.top-left { top: 12px; left: 12px; }
.bezel-screw.top-right { top: 12px; right: 12px; }
.bezel-screw.bottom-left { bottom: 12px; left: 12px; }
.bezel-screw.bottom-right { bottom: 12px; right: 12px; }

/* ==========================================================================
   HEADER & BEZEL DECK
   ========================================================================== */
.master-bezel {
  background: linear-gradient(180deg, #242931 0%, #181b20 100%);
  border-bottom: 2px solid #0f1115;
  padding: 20px 24px 14px 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

.chassis-header {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

/* Market Region Selector (India vs Global) */
.market-region-deck {
  background: var(--display-recess);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.region-deck-title {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.region-rocker-bay {
  display: flex;
  gap: 6px;
}

.region-rocker-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #252b35 0%, #171a20 100%);
  border: 1px solid #363e4c;
  border-radius: 5px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
  transition: all 0.15s ease;
}

.region-rocker-btn:hover {
  background: linear-gradient(180deg, #2e3644 0%, #1e222a 100%);
  color: #ffffff;
}

.region-rocker-btn.active {
  background: linear-gradient(180deg, #12151b 0%, #1c222c 100%);
  color: var(--phosphor-green);
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 255, 136, 0.15);
}

.region-flag {
  font-size: 14px;
}

.region-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #252b36;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8);
  transition: all 0.2s;
}

.region-rocker-btn.active .region-led {
  background: var(--phosphor-green);
  box-shadow: 0 0 6px var(--phosphor-green);
}

/* Branding Plate */
.branding-cluster {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recessed-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--display-recess);
  padding: 8px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-text {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f1f5f9;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.version-tag {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--phosphor-cyan);
  padding-left: 2px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* LED Indicators */
.led-indicator, .mini-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a313d;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  position: relative;
  transition: all 0.3s ease;
}

.led-indicator.led-green, .mini-led.led-green.active {
  background: #00ff88;
  box-shadow: 0 0 8px var(--phosphor-green-glow), inset 0 1px 1px #ffffff;
}

.led-indicator.led-amber {
  background: #ffaa00;
  box-shadow: 0 0 8px var(--phosphor-amber-glow), inset 0 1px 1px #ffffff;
}

.mini-led.led-amber.active {
  background: #ffaa00;
  box-shadow: 0 0 12px var(--phosphor-amber-glow), inset 0 1px 1px #ffffff;
  animation: blinkIngestLed 0.7s infinite ease-in-out;
}

@keyframes blinkIngestLed {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 14px rgba(255, 170, 0, 0.95), inset 0 1px 1px #ffffff;
    transform: scale(1.15);
  }
  50% {
    opacity: 0.2;
    box-shadow: 0 0 2px rgba(255, 170, 0, 0.2);
    transform: scale(0.85);
  }
}

.led-indicator.pulse {
  animation: pulseLed 2s infinite ease-in-out;
}

@keyframes pulseLed {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.95); }
}

/* Macro Sentiment VU Meter */
.macro-gauge-module {
  background: var(--display-recess);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 240px;
  max-width: 320px;
  margin: 0 auto;
}

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

.analog-meter-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meter-face {
  width: 190px;
  height: 52px;
  background: radial-gradient(ellipse at 50% 100%, #151922 0%, #080a0d 100%);
  border-top-left-radius: 95px;
  border-top-right-radius: 95px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.meter-scale {
  display: flex;
  justify-content: space-between;
  padding: 10px 34px 0 34px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.scale-mark.mark-neg { color: var(--phosphor-red); text-shadow: 0 0 3px rgba(255, 51, 68, 0.3); }
.scale-mark.mark-mid { color: var(--text-dim); }
.scale-mark.mark-pos { color: var(--phosphor-green); text-shadow: 0 0 3px rgba(0, 255, 136, 0.3); }

.meter-needle-housing {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.meter-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 42px;
  background: #ff4444;
  box-shadow: 0 0 4px rgba(255, 68, 68, 0.8);
  transform-origin: bottom center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: rotate(0deg);
}

.meter-cap {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #5a6475, #12151a);
  box-shadow: 0 -1px 3px rgba(0,0,0,0.8);
}

.lcd-digital-score {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--phosphor-green);
  text-shadow: 0 0 6px var(--phosphor-green-glow);
  margin-top: 4px;
}

/* ==========================================================================
   REFRESH CONTROL DECK & FLIP COUNTDOWN
   ========================================================================== */
.refresh-deck {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, #1f232a 0%, #15181d 100%);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-bevel-out);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.refresh-info-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.deck-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.flip-clock-display {
  display: flex;
  align-items: center;
  background: var(--display-recess);
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.clock-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.unit-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--phosphor-amber);
  text-shadow: 0 0 6px var(--phosphor-amber-glow);
  line-height: 1;
}

.unit-lbl {
  font-size: 7px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.clock-separator {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--phosphor-amber);
  margin: 0 4px;
  animation: blinkColon 1s infinite;
}

@keyframes blinkColon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.next-refresh-timestamp {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

/* Tactile Push Button */
.tactile-button-bay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.skeuo-push-button {
  cursor: pointer;
  background: var(--metal-surface);
  border: 2px solid #333a46;
  border-radius: 6px;
  padding: 2px;
  box-shadow: var(--shadow-button-up);
  transition: all 0.1s ease;
  outline: none;
}

.btn-cap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #323946 0%, #1e222a 100%);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.skeuo-push-button:hover .btn-cap {
  background: linear-gradient(180deg, #3a4252 0%, #252b35 100%);
}

.skeuo-push-button:active, .skeuo-push-button.depressed {
  box-shadow: var(--shadow-button-down);
  transform: translateY(3px);
}

.skeuo-push-button:active .btn-cap, .skeuo-push-button.depressed .btn-cap {
  background: linear-gradient(180deg, #181b22 0%, #232731 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  border-top-color: transparent;
}

.button-led-tray {
  display: flex;
  gap: 12px;
}

.status-led-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Audio & Haptic Toggle Switch */
.audio-switch-bay {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 14px;
}

.toggle-switch-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 4px;
}

.toggle-text {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
}

.toggle-switch-label input {
  display: none;
}

.switch-toggle {
  width: 32px;
  height: 18px;
  background: #0a0c0f;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 1px rgba(255, 255, 255, 0.1);
  padding: 2px;
  position: relative;
  transition: all 0.2s ease;
}

.switch-lever {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #94a3b8, #334155);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(14px);
}

.toggle-switch-label input:not(:checked) + .switch-toggle .switch-lever {
  transform: translateX(0);
  background: radial-gradient(circle at 35% 35%, #64748b, #1e293b);
}

/* ==========================================================================
   SEARCH STRIP & AUTCOMPLETE
   ========================================================================== */
.search-command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}

.search-box-recessed {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--display-recess);
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.search-box-recessed:focus-within {
  border-color: var(--phosphor-cyan);
  box-shadow: var(--shadow-bevel-in), 0 0 10px var(--phosphor-cyan-glow);
}

.search-icon {
  color: var(--text-dim);
  margin-right: 10px;
}

.search-box-recessed input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.search-box-recessed input::placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
}
.btn-clear.hidden { display: none; }

.btn-search-execute {
  cursor: pointer;
  background: linear-gradient(180deg, #2b3340 0%, #191e27 100%);
  border: 1px solid #414d5e;
  color: var(--phosphor-cyan);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.btn-search-execute:hover {
  background: linear-gradient(180deg, #374252 0%, #202732 100%);
  color: #ffffff;
  border-color: var(--phosphor-cyan);
}

.btn-search-execute:active {
  transform: translateY(1px);
}

.autocomplete-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  width: 550px;
  max-width: 90vw;
  background: #14171d;
  border: 1px solid #333c4a;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
}
.autocomplete-dropdown.hidden { display: none; }

.autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.autocomplete-item:hover, .autocomplete-item.selected {
  background: #202632;
}

.item-ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--phosphor-green);
}

.item-name {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
}

.item-exchange {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* Quick Ticker Chips */
.quick-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

.quick-chip {
  cursor: pointer;
  background: #181c22;
  border: 1px solid #2e3540;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: #252b35;
  color: var(--phosphor-green);
  border-color: #4a5568;
}

/* ==========================================================================
   ROCKER SELECTOR TAB BAR
   ========================================================================== */
.rocker-selector-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  background: #0b0d11;
  padding: 6px;
  border-radius: 10px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.rocker-tab {
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #20252e 0%, #15181e 100%);
  border: 1px solid #2d3542;
  border-radius: 7px;
  padding: 10px 6px;
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

.rocker-tab .tab-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.rocker-tab:hover .tab-icon {
  transform: scale(1.15);
}

/* Tab 1: Market Pulse & Sectors (Emerald / Mint) */
.rocker-tab.tab-pulse:hover {
  background: linear-gradient(180deg, #1b332b 0%, #13241e 100%);
  border-color: rgba(0, 255, 136, 0.4);
  color: #a7f3d0;
}
.rocker-tab.tab-pulse.active {
  background: linear-gradient(180deg, #0e2920 0%, #173f32 100%);
  color: #00ff88;
  border-color: #00ff88;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 14px rgba(0, 255, 136, 0.25);
}
.rocker-tab.tab-pulse.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  border-radius: 3px 3px 0 0;
}

/* Tab 2: Top Stock Picks (Electric Blue / Cyan) */
.rocker-tab.tab-stocks:hover {
  background: linear-gradient(180deg, #16324f 0%, #102135 100%);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}
.rocker-tab.tab-stocks.active {
  background: linear-gradient(180deg, #0c2540 0%, #153c66 100%);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 14px rgba(56, 189, 248, 0.25);
}
.rocker-tab.tab-stocks.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  border-radius: 3px 3px 0 0;
}

/* Tab 3: Stock Analyzer (Violet / Amethyst) */
.rocker-tab.tab-analyzer:hover {
  background: linear-gradient(180deg, #321d4d 0%, #1e1130 100%);
  border-color: rgba(192, 132, 252, 0.4);
  color: #e9d5ff;
}
.rocker-tab.tab-analyzer.active {
  background: linear-gradient(180deg, #24113a 0%, #3e1b66 100%);
  color: #c084fc;
  border-color: #c084fc;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 14px rgba(192, 132, 252, 0.25);
}
.rocker-tab.tab-analyzer.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc;
  border-radius: 3px 3px 0 0;
}

/* Tab 4: Live News Feed (Orange / Amber) */
.rocker-tab.tab-wire:hover {
  background: linear-gradient(180deg, #3d2912 0%, #261909 100%);
  border-color: rgba(251, 146, 60, 0.4);
  color: #fed7aa;
}
.rocker-tab.tab-wire.active {
  background: linear-gradient(180deg, #2c1a06 0%, #4d2b09 100%);
  color: #fb923c;
  border-color: #fb923c;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 14px rgba(251, 146, 60, 0.25);
}
.rocker-tab.tab-wire.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #fb923c;
  box-shadow: 0 0 8px #fb923c;
  border-radius: 3px 3px 0 0;
}

/* Tab 5: My Watchlist (Gold / Sunburst) */
.rocker-tab.tab-watchlist:hover {
  background: linear-gradient(180deg, #3d340f 0%, #262007 100%);
  border-color: rgba(250, 204, 21, 0.4);
  color: #fef08a;
}
.rocker-tab.tab-watchlist.active {
  background: linear-gradient(180deg, #2b2406 0%, #4a3e09 100%);
  color: #facc15;
  border-color: #facc15;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 14px rgba(250, 204, 21, 0.25);
}
.rocker-tab.tab-watchlist.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #facc15;
  box-shadow: 0 0 8px #facc15;
  border-radius: 3px 3px 0 0;
}

/* Tab 6: Analyze Portfolio (Electric Ruby / Rose Velvet) */
.rocker-tab.tab-portfolio:hover {
  background: linear-gradient(180deg, #3d121e 0%, #240810 100%);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}
.rocker-tab.tab-portfolio.active {
  background: linear-gradient(180deg, #2b0b14 0%, #4c1122 100%);
  color: #fb7185;
  border-color: #f43f5e;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 16px rgba(244, 63, 94, 0.35);
}
.rocker-tab.tab-portfolio.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
  border-radius: 3px 3px 0 0;
}

.tab-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: #090b0e;
  padding: 2px 7px;
  border-radius: 10px;
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.35);
}

/* Bright Theme Overrides for Tabs */
body.theme-bright .rocker-selector-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

body.theme-bright .rocker-tab {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.theme-bright .rocker-tab.tab-pulse.active {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
  border-color: #10b981;
}

body.theme-bright .rocker-tab.tab-stocks.active {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0369a1;
  border-color: #0284c7;
}

body.theme-bright .rocker-tab.tab-analyzer.active {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  color: #6b21a8;
  border-color: #9333ea;
}

body.theme-bright .rocker-tab.tab-wire.active {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  border-color: #ea580c;
}

body.theme-bright .rocker-tab.tab-watchlist.active {
  background: linear-gradient(180deg, #fefce8 0%, #fef9c3 100%);
  color: #a16207;
  border-color: #ca8a04;
}

body.theme-bright .rocker-tab.tab-portfolio.active {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  border-color: #f43f5e;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.25);
}

/* ==========================================================================
   MAIN VIEWPORTS & SECTIONS
   ========================================================================== */
.instrument-deck {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f8fafc;
  margin-bottom: 4px;
}

.section-subtext {
  color: #8192a6;
  opacity: 0.7;
  font-size: 12px;
  line-height: 1.45;
}

.banner-stats-tray {
  display: flex;
  gap: 12px;
}

.stat-pill {
  background: var(--display-recess);
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pill-label {
  color: var(--text-dim);
  font-weight: 600;
}

.pill-val {
  color: var(--text-main);
  font-weight: 700;
  margin-left: 4px;
}

.pill-val.highlight {
  color: var(--phosphor-green);
  text-shadow: 0 0 6px var(--phosphor-green-glow);
}

/* ==========================================================================
   SECTORS GRID (TAB 1)
   ========================================================================== */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.sector-instrument-card {
  background: linear-gradient(180deg, #20242c 0%, #16191f 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-bevel-out);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sector-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.sector-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sector-icon-bezel {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--display-recess);
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sector-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.sector-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.tailwind-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-shadow: 0 0 4px currentColor;
}

.tailwind-badge.strong-tailwind {
  background: rgba(0, 255, 136, 0.15);
  color: var(--phosphor-green);
  border: 1px solid var(--phosphor-green);
}
.tailwind-badge.mod-tailwind {
  background: rgba(0, 229, 255, 0.15);
  color: var(--phosphor-cyan);
  border: 1px solid var(--phosphor-cyan);
}
.tailwind-badge.headwind {
  background: rgba(255, 51, 68, 0.15);
  color: var(--phosphor-red);
  border: 1px solid var(--phosphor-red);
}

/* Sector Score Meter Bar */
.score-track-housing {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-track-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.score-track-bar {
  height: 8px;
  background: var(--display-recess);
  border-radius: 4px;
  box-shadow: var(--shadow-bevel-in);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.score-fill.fill-green {
  background: linear-gradient(90deg, #10b981, #00ff88);
  box-shadow: 0 0 8px var(--phosphor-green-glow);
}
.score-fill.fill-cyan {
  background: linear-gradient(90deg, #0284c7, #00e5ff);
  box-shadow: 0 0 8px var(--phosphor-cyan-glow);
}

/* Sector Catalyst Articles */
.sector-catalysts {
  background: var(--display-recess);
  border-radius: 6px;
  padding: 10px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.catalysts-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.catalyst-item {
  font-size: 12px;
  color: var(--text-main);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.catalyst-item:last-child { border-bottom: none; }

.catalyst-link {
  color: var(--text-main);
  text-decoration: none;
  display: block;
  transition: color 0.15s;
}
.catalyst-link:hover {
  color: var(--phosphor-cyan);
}

.catalyst-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Sector Key Tickers */
.sector-footer-tickers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.footer-ticker-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.ticker-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  cursor: pointer;
  background: #252b36;
  border: 1px solid #3b4554;
  border-radius: 4px;
  color: var(--phosphor-green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  transition: all 0.15s;
}
.chip-btn:hover {
  background: #333c4c;
  border-color: var(--phosphor-green);
  box-shadow: 0 0 6px var(--phosphor-green-glow);
}

/* ==========================================================================
   STOCK OPPORTUNITY CARDS (TAB 2)
   ========================================================================== */
.filter-switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-buttons {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  flex: 1;
  padding: 2px 2px 6px 2px;
  scrollbar-width: thin;
}

.filter-buttons::-webkit-scrollbar {
  height: 3px;
}
.filter-buttons::-webkit-scrollbar-thumb {
  background: #384252;
  border-radius: 3px;
}

.filter-btn {
  cursor: pointer;
  background: #191c22;
  border: 1px solid #2d3440;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  transition: all 0.15s;
  flex: 0 0 auto;
  white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover {
  background: #28303d;
  color: #ffffff;
  border-color: var(--phosphor-cyan);
}

.stock-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.stock-opportunity-card {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-bevel-out);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.stock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stock-identity {
  display: flex;
  flex-direction: column;
}

.stock-ticker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ticker-symbol {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.subsector-badge {
  font-size: 10px;
  background: #111419;
  border: 1px solid #2a313d;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.company-name {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.price-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stock-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.stock-change {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 2px;
}

.stock-change.positive {
  color: var(--phosphor-green);
  background: rgba(0, 255, 136, 0.1);
}
.stock-change.negative {
  color: var(--phosphor-red);
  background: rgba(255, 51, 68, 0.1);
}

/* Catalyst Score Dial on Card */
.catalyst-meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--display-recess);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.catalyst-score-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--phosphor-green);
  text-shadow: 0 0 6px var(--phosphor-green-glow);
}

.catalyst-label-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.catalyst-news-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--phosphor-cyan);
}

/* Thesis & Risk Blocks */
.card-thesis-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--phosphor-green);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
}

.box-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.box-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
}

.card-risk-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--phosphor-amber);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
}

/* Card Actions */
.card-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-card-deepdive {
  cursor: pointer;
  background: linear-gradient(180deg, #2b3340 0%, #191e27 100%);
  border: 1px solid #414d5e;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.15s;
}
.btn-card-deepdive:hover {
  background: linear-gradient(180deg, #374252 0%, #202732 100%);
  border-color: var(--phosphor-cyan);
  color: var(--phosphor-cyan);
}

.btn-pin-toggle {
  cursor: pointer;
  background: transparent;
  border: 1px solid #333d4b;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  transition: all 0.15s;
}
.btn-pin-toggle:hover, .btn-pin-toggle.pinned {
  color: var(--phosphor-amber);
  border-color: var(--phosphor-amber);
  background: rgba(255, 170, 0, 0.08);
}

/* ==========================================================================
   DEEP DIVE & OSCILLOSCOPE (TAB 3)
   ========================================================================== */
.deepdive-search-prompt {
  background: linear-gradient(180deg, #1d2128 0%, #14171d 100%);
  border: 2px dashed #2f3744;
  border-radius: 10px;
  padding: 50px 24px;
  text-align: center;
}

.prompt-housing {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* In-Tab Dedicated Search Housing */
.tab-search-housing {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 8px 0;
}

.tab-search-bar-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--display-recess);
  border: 1px solid #3d4a5d;
  border-radius: 8px;
  padding: 2px 12px;
  box-shadow: var(--shadow-bevel-in);
  transition: all 0.2s ease;
}

.tab-search-bar-wrap:focus-within {
  border-color: #c084fc;
  box-shadow: var(--shadow-bevel-in), 0 0 12px rgba(192, 132, 252, 0.35);
}

.tab-search-icon {
  font-size: 14px;
  margin-right: 8px;
  opacity: 0.8;
}

.tab-search-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-heading);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  padding: 10px 0;
}

.tab-search-input::placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

.btn-tab-clear {
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px;
  transition: color 0.15s;
}
.btn-tab-clear:hover {
  color: #ffffff;
}

.btn-tab-analyze {
  cursor: pointer;
  background: linear-gradient(180deg, #3d205c 0%, #251239 100%);
  border: 1px solid #7c3aed;
  border-radius: 8px;
  color: #f3e8ff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 0 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-tab-analyze:hover {
  background: linear-gradient(180deg, #532d7d 0%, #351a52 100%);
  color: #ffffff;
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.4);
}

.tab-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111419;
  border: 1px solid #3d4a5d;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.85);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  text-align: left;
}

.quick-suggest-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 10px 0 4px 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.radar-scope-graphic {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #c084fc;
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.35), inset 0 0 10px rgba(192, 132, 252, 0.25);
  position: relative;
  animation: radarRotate 4s linear infinite;
}
.radar-scope-graphic::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 50%;
  background: linear-gradient(45deg, rgba(192, 132, 252, 0.4), transparent);
  transform-origin: bottom left;
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.popular-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-sample-pick {
  cursor: pointer;
  background: #252b36;
  border: 1px solid #3d4757;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.15s;
}
.btn-sample-pick:hover {
  background: #333c4c;
  color: var(--phosphor-cyan);
  border-color: var(--phosphor-cyan);
}

/* Active Panel Quick Search Bar */
.active-panel-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #1b2029 0%, #12151b 100%);
  border: 1px solid #2d3644;
  border-radius: 8px;
  padding: 8px 14px;
  gap: 12px;
  box-shadow: var(--shadow-bevel-in);
  flex-wrap: wrap;
}

.btn-reset-deepdive {
  cursor: pointer;
  background: linear-gradient(180deg, #252b36 0%, #171b22 100%);
  border: 1px solid #3d4a5d;
  border-radius: 6px;
  color: var(--phosphor-cyan);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-bevel-out);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-reset-deepdive:hover {
  background: linear-gradient(180deg, #333d4d 0%, #1e242e 100%);
  border-color: var(--phosphor-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px var(--phosphor-cyan-glow);
}

.search-bar-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.active-search-input-wrap {
  display: flex;
  flex: 1;
  max-width: 450px;
  gap: 8px;
}

.active-search-input-wrap input {
  flex: 1;
  background: var(--display-recess);
  border: 1px solid #333d4b;
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--text-heading);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.active-search-input-wrap input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

.btn-active-analyze {
  cursor: pointer;
  background: linear-gradient(180deg, #372054 0%, #201333 100%);
  border: 1px solid #8b5cf6;
  border-radius: 6px;
  color: #ede9fe;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-active-analyze:hover {
  background: #4c2875;
  color: #ffffff;
  border-color: #a78bfa;
}

/* Active Deep Dive View */
.deepdive-instrument-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.deepdive-instrument-panel.hidden { display: none; }

.deepdive-header-bezel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #242933 0%, #191c22 100%);
  border: 1px solid #3b4452;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: var(--shadow-bevel-out);
}

.ticker-identity-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticker-symbol-display {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  background: var(--display-recess);
  padding: 4px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-name-display {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.ticker-sector-tags {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.sector-tag {
  font-size: 10px;
  background: #12151b;
  border: 1px solid #2c3442;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--phosphor-cyan);
  font-family: var(--font-mono);
}

.subsector-tag {
  font-size: 10px;
  background: #12151b;
  border: 1px solid #2c3442;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.price-quote-bezel {
  display: flex;
  align-items: center;
  gap: 20px;
}

.live-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-val {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.price-change-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--phosphor-green);
}

.btn-watchlist-toggle {
  cursor: pointer;
  background: linear-gradient(180deg, #2b3340 0%, #1a1e26 100%);
  border: 1px solid #434e5f;
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--phosphor-amber);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-button-up);
  transition: all 0.15s;
}
.btn-watchlist-toggle:hover {
  background: linear-gradient(180deg, #374252 0%, #222833 100%);
}
.btn-watchlist-toggle:active {
  transform: translateY(2px);
}

/* Oscilloscope & Sentiment Core Grid */
.deepdive-core-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* CRT Oscilloscope Screen */
.oscilloscope-instrument {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-bevel-out);
  display: flex;
  flex-direction: column;
}

.instrument-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.title-with-timeframe {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.instrument-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f1f5f9;
}

/* Timeframe Selector Button Bar (1D, 1W, 1M, 6M, 1Y, 3Y) */
.timeframe-selector-bay {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--display-recess);
  padding: 3px 6px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tf-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.timeframe-buttons {
  display: flex;
  gap: 3px;
}

.tf-btn {
  cursor: pointer;
  background: linear-gradient(180deg, #242932 0%, #15181e 100%);
  border: 1px solid #333b47;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.08);
  transition: all 0.12s ease;
  outline: none;
}

.tf-btn:hover {
  background: linear-gradient(180deg, #2d3440 0%, #1c2028 100%);
  color: #ffffff;
  border-color: #495568;
}

.tf-btn.active {
  background: linear-gradient(180deg, #0e1115 0%, #181d24 100%);
  color: var(--phosphor-green);
  border-color: var(--phosphor-green);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 6px var(--phosphor-green-glow);
}

.grid-mode-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--phosphor-green);
}

.oscilloscope-screen {
  background: #080d14;
  border-radius: 8px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  height: 270px;
  width: 100%;
}

.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.3;
}

.crt-glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
  z-index: 6;
}

#oscilloscope-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  background: #12161f;
  border: 1px solid var(--phosphor-green);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ffffff;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}
.chart-tooltip.hidden { display: none; }

.oscilloscope-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* Analog VU Dial Instrument */
.sentiment-meter-instrument {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-bevel-out);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Precision Rectangular Sentiment Spectrum Gauge (Dark Theme Default) */
.rect-gauge-housing {
  width: 100%;
  background: var(--display-recess);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0;
}

.rect-gauge-readout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.rect-gauge-readout-row .readout-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-heading);
  text-transform: uppercase;
}

.rect-gauge-readout-row .readout-score {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--phosphor-green);
  text-shadow: 0 0 10px var(--phosphor-green-glow);
}

.rect-scale-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rect-scale-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rect-scale-labels .scale-lbl.bear {
  color: var(--phosphor-red);
  text-shadow: 0 0 4px rgba(255, 51, 68, 0.3);
}

.rect-scale-labels .scale-lbl.mid {
  color: var(--text-dim);
}

.rect-scale-labels .scale-lbl.bull {
  color: var(--phosphor-green);
  text-shadow: 0 0 4px rgba(0, 255, 136, 0.3);
}

.rect-spectrum-bar {
  position: relative;
  width: 100%;
  height: 14px;
  background: #090c10;
  border-radius: 7px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: visible;
}

.rect-spectrum-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, 
    rgba(255, 51, 68, 0.85) 0%, 
    rgba(255, 170, 0, 0.4) 35%, 
    rgba(90, 100, 115, 0.2) 50%, 
    rgba(0, 229, 255, 0.4) 65%, 
    rgba(0, 255, 136, 0.85) 100%
  );
  opacity: 0.85;
}

.rect-spectrum-center-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  opacity: 0.6;
  z-index: 2;
}

.rect-spectrum-indicator {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 16px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  transition: left 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.indicator-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #ffffff;
  filter: drop-shadow(0 0 4px #00e5ff);
}

.indicator-line {
  flex: 1;
  width: 3px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 8px #00e5ff, 0 0 12px #00e5ff;
}

.catalyst-volume-meter {
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: var(--display-recess);
  padding: 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.vol-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vol-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  font-weight: 600;
}

.vol-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}
.vol-val.val-green { color: var(--phosphor-green); }
.vol-val.val-red { color: var(--phosphor-red); }

/* Analysis Matrix Grid */
.analysis-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.matrix-card {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-bevel-out);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-header h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.matrix-body {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

/* Targeted News Panel */
.targeted-news-panel {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-bevel-out);
}

.news-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.news-panel-header h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.news-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--phosphor-cyan);
}

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

.targeted-news-item {
  background: var(--display-recess);
  border-radius: 6px;
  padding: 12px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.news-item-content {
  flex: 1;
}

.news-item-title {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.15s;
}
.news-item-title:hover {
  color: var(--phosphor-cyan);
}

.news-item-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.sentiment-badge-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.sentiment-badge-pill.bullish {
  background: rgba(0, 255, 136, 0.15);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}
.sentiment-badge-pill.bearish {
  background: rgba(255, 51, 68, 0.15);
  color: var(--phosphor-red);
  border: 1px solid rgba(255, 51, 68, 0.3);
}
.sentiment-badge-pill.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* ==========================================================================
   INCIDENT WIRE (TAB 4)
   ========================================================================== */
.wire-search-bar {
  margin-top: 8px;
}

.wire-search-bar input {
  width: 100%;
  background: var(--display-recess);
  border: 1px solid #2b3340;
  border-radius: 6px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: var(--shadow-bevel-in);
  outline: none;
}
.wire-search-bar input:focus {
  border-color: var(--phosphor-green);
  box-shadow: var(--shadow-bevel-in), 0 0 8px var(--phosphor-green-glow);
}

.incident-wire-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wire-incident-card {
  background: linear-gradient(180deg, #1e222a 0%, #15181e 100%);
  border: 1px solid #2e3642;
  border-radius: 6px;
  padding: 14px 18px;
  box-shadow: var(--shadow-bevel-out);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.15s;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.wire-incident-card:hover {
  border-color: #4a576c;
}

.wire-signal-beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.wire-signal-beacon.bullish { background: var(--phosphor-green); box-shadow: 0 0 6px var(--phosphor-green); }
.wire-signal-beacon.bearish { background: var(--phosphor-red); box-shadow: 0 0 6px var(--phosphor-red); }
.wire-signal-beacon.neutral { background: var(--text-dim); }

.wire-body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.wire-title-link {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.45;
  display: block;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: color 0.15s;
}
.wire-title-link:hover {
  color: var(--phosphor-cyan);
}

.wire-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.wire-tags-tray {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.wire-theme-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  background: #111419;
  border: 1px solid #28303d;
  color: var(--phosphor-cyan);
  padding: 2px 6px;
  border-radius: 3px;
  word-break: break-word;
}

.wire-source-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ==========================================================================
   WATCHLIST VAULT (TAB 5)
   ========================================================================== */
.empty-vault-card {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #1c2027 0%, #13161c 100%);
  border: 2px dashed #2e3644;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.vault-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.btn-action-small {
  cursor: pointer;
  background: linear-gradient(180deg, #252b36 0%, #161a22 100%);
  border: 1px solid #384252;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-out);
  transition: all 0.15s ease;
}

.btn-action-small:hover {
  background: linear-gradient(180deg, #372024 0%, #201316 100%);
  border-color: var(--phosphor-red);
  color: #ff6b7a;
  box-shadow: 0 0 8px rgba(255, 51, 68, 0.4);
}

/* ==========================================================================
   SOURCE OF TRUTH LINK & AUDIT REGISTRY MODAL
   ========================================================================== */
.source-truth-link-bar {
  margin-top: 10px;
}

.btn-source-registry {
  cursor: pointer;
  background: linear-gradient(180deg, #222730 0%, #15181e 100%);
  border: 1px solid #3d4756;
  border-radius: 6px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-button-up);
  transition: all 0.15s ease;
  outline: none;
}

.btn-source-registry:hover {
  background: linear-gradient(180deg, #2c3442 0%, #1c212a 100%);
  border-color: var(--phosphor-cyan);
  box-shadow: 0 0 10px var(--phosphor-cyan-glow);
}

.btn-source-registry:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-button-down);
}

.source-icon {
  font-size: 14px;
}

.source-text {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #f1f5f9;
}

.source-status-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  background: rgba(0, 255, 136, 0.12);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

/* ==========================================================================
   ADMIN GOVERNANCE CONSOLE (TAB 6)
   ========================================================================== */
.rocker-tab.tab-admin {
  border-color: rgba(223, 183, 108, 0.4);
}
.rocker-tab.tab-admin.active {
  border-color: #dfb76c;
  color: #fcd34d;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(223, 183, 108, 0.35);
}

.admin-badge-counter {
  background: rgba(223, 183, 108, 0.2);
  color: #dfb76c;
  border-color: rgba(223, 183, 108, 0.4);
}

.banner-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.admin-shield-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #dfb76c;
  background: rgba(223, 183, 108, 0.12);
  border: 1px solid rgba(223, 183, 108, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.admin-db-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.admin-db-status.status-online {
  color: var(--phosphor-green);
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.3);
}
.admin-db-status.status-local {
  color: var(--phosphor-cyan);
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-admin-primary {
  cursor: pointer;
  background: linear-gradient(180deg, #3d3118 0%, #201a0c 100%);
  border: 1px solid #dfb76c;
  color: #fef08a;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: var(--shadow-button-up), 0 0 10px rgba(223, 183, 108, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-admin-primary:hover {
  background: linear-gradient(180deg, #574520 0%, #2e2410 100%);
  box-shadow: 0 0 14px rgba(223, 183, 108, 0.4);
}

.btn-admin-secondary {
  cursor: pointer;
  background: #1c2027;
  border: 1px solid #333c4a;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.btn-admin-secondary:hover {
  background: #252b36;
  color: #ffffff;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-kpi-card {
  background: linear-gradient(180deg, #1b1f27 0%, #12151a 100%);
  border: 1px solid #2b3340;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-kpi-card .kpi-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.8px;
}

.admin-kpi-card .kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}
.admin-kpi-card .kpi-val.highlight-gold { color: #fcd34d; text-shadow: 0 0 8px rgba(252, 211, 77, 0.3); }
.admin-kpi-card .kpi-val.highlight-cyan { color: var(--phosphor-cyan); text-shadow: 0 0 8px var(--phosphor-cyan-glow); }
.admin-kpi-card .kpi-val.highlight-green { color: var(--phosphor-green); text-shadow: 0 0 8px var(--phosphor-green-glow); font-size: 15px; margin-top: 4px; }

/* Admin User Table */
.admin-table-chassis {
  background: linear-gradient(180deg, #20242c 0%, #16181e 100%);
  border: 1px solid #333a46;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-bevel-out);
}

.admin-table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-table-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f1f5f9;
}

.admin-search-wrap input {
  background: var(--display-recess);
  border: 1px solid #333d4b;
  border-radius: 6px;
  padding: 6px 14px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  min-width: 280px;
}
.admin-search-wrap input:focus {
  border-color: #dfb76c;
  box-shadow: 0 0 8px rgba(223, 183, 108, 0.3);
}

.admin-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.admin-user-table th {
  background: #0f1217;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-bottom: 1px solid #2a313d;
}

.admin-user-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.analyst-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #252b36;
  border: 1px solid #3b4554;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.user-avatar-mini.admin-avatar {
  background: rgba(223, 183, 108, 0.15);
  border-color: rgba(223, 183, 108, 0.4);
}

.user-display-name {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 13px;
}

.self-pill {
  font-size: 9px;
  background: var(--phosphor-cyan);
  color: #000000;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 6px;
}

.user-email-tag {
  color: var(--phosphor-cyan);
}

.user-org-text {
  color: var(--text-muted);
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.role-badge.role-admin {
  background: rgba(223, 183, 108, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(223, 183, 108, 0.4);
}
.role-badge.role-premium {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.role-badge.role-analyst {
  background: rgba(0, 229, 255, 0.12);
  color: var(--phosphor-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.admin-actions-cell {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-table-action {
  cursor: pointer;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  transition: all 0.15s ease;
}

.btn-role-toggle {
  background: #1e242e;
  border: 1px solid #384252;
  color: #cbd5e1;
}
.btn-role-toggle:hover {
  background: #2b3340;
  color: var(--phosphor-cyan);
  border-color: var(--phosphor-cyan);
}

.btn-delete-user {
  background: rgba(255, 51, 68, 0.12);
  border: 1px solid rgba(255, 51, 68, 0.3);
  color: var(--phosphor-red);
}
.btn-delete-user:hover {
  background: #dc2626;
  color: #ffffff;
}

.action-locked {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
}

.admin-select-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}
.admin-select-input option {
  background: #171b22;
  color: #ffffff;
}

.btn-cancel-modal {
  cursor: pointer;
  background: #1c2027;
  border: 1px solid #384252;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
}
.btn-cancel-modal:hover {
  background: #2b3340;
  color: #ffffff;
}

/* Modal Overlay */
.skeuo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 8, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalFadeIn 0.25s ease;
}

.skeuo-modal-overlay.hidden {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.skeuo-modal-chassis {
  background: var(--panel-plate);
  border: 2px solid #333a46;
  border-radius: 10px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.9), inset 0 1px 2px rgba(255,255,255,0.15);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header-bezel {
  background: linear-gradient(180deg, #242932 0%, #181b21 100%);
  border-bottom: 2px solid #0f1115;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
}

.modal-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-close-btn {
  background: #14171d;
  border: 1px solid #333c4a;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 10px;
  line-height: 1;
  transition: all 0.15s;
}
.modal-close-btn:hover {
  color: var(--phosphor-red);
  border-color: var(--phosphor-red);
}

.modal-content-deck {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audit-section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-sec-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-sec-header h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--phosphor-cyan);
}

.audit-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-card {
  background: var(--display-recess);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 14px;
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.status-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.status-chip.active {
  background: rgba(0, 255, 136, 0.12);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}
.status-chip.policy {
  background: rgba(255, 170, 0, 0.12);
  color: var(--phosphor-amber);
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.source-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.source-urls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.src-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--phosphor-cyan);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.15s;
}
.src-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.source-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 4px;
}

.methodology-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.methodology-list li {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
}

/* Dynamic Provenance Telemetry Additions */
.provenance-telemetry-banner {
  background: linear-gradient(180deg, #181d24 0%, #0d1015 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 15px rgba(0, 240, 255, 0.08);
}

.telemetry-stat-cluster {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.telemetry-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telemetry-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.telemetry-stat-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--phosphor-cyan);
}

.telemetry-stat-val.green {
  color: var(--phosphor-green);
  text-shadow: 0 0 6px var(--phosphor-green-glow);
}

.publisher-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pub-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pub-pill-count {
  color: var(--phosphor-cyan);
  font-weight: 700;
}

.endpoint-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.endpoint-link-row:last-child {
  border-bottom: none;
}

.endpoint-status-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--phosphor-green);
  background: rgba(0, 255, 136, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.modal-footer-bezel {
  background: #111317;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audit-timestamp {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--phosphor-green);
  text-shadow: 0 0 6px var(--phosphor-green-glow);
}

/* ==========================================================================
   AUTHENTICATION SECURITY VAULT GATE (LOGIN / SIGNUP)
   ========================================================================== */
.auth-vault-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #080a0d;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(26, 38, 57, 0.4) 0%, #05070a 100%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.auth-vault-overlay.hidden {
  display: none !important;
}

.vault-door-chassis {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #252a33 0%, #171a20 100%);
  border: 3px solid #384252;
  border-radius: 12px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.95), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vault-header {
  background: linear-gradient(180deg, #2a313d 0%, #1b1f26 100%);
  border-bottom: 2px solid #0f1216;
  padding: 20px 24px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vault-brand-cluster {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vault-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-subtitle {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.vault-lock-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--display-recess);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.lock-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--phosphor-amber);
}

.vault-form-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-tabs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--display-recess);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-tab-btn {
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 8px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.15s;
}

.auth-tab-btn.active {
  background: linear-gradient(180deg, #2b3340 0%, #1a1e26 100%);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.1);
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.auth-input-recess {
  background: var(--display-recess);
  border: 1px solid #333a46;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  align-items: center;
  transition: border-color 0.15s;
}

.auth-input-recess:focus-within {
  border-color: var(--phosphor-green);
  box-shadow: var(--shadow-bevel-in), 0 0 8px var(--phosphor-green-glow);
}

.auth-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.btn-toggle-password {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-dim);
  transition: all 0.15s ease;
  outline: none;
  opacity: 0.75;
  user-select: none;
  flex-shrink: 0;
}

.btn-toggle-password:hover {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 4px var(--phosphor-cyan-glow));
}

body.theme-bright .btn-toggle-password {
  color: #64748b;
}
body.theme-bright .btn-toggle-password:hover {
  color: #0284c7;
}

.auth-btn-submit {
  cursor: pointer;
  background: linear-gradient(180deg, #2a3340 0%, #171b22 100%);
  border: 1px solid #434f62;
  border-radius: 6px;
  padding: 12px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow-button-up);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.auth-btn-submit:hover {
  background: linear-gradient(180deg, #374254 0%, #1f2530 100%);
  color: var(--phosphor-green);
  border-color: var(--phosphor-green);
}

.auth-btn-submit:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-button-down);
}

.auth-demo-shortcut {
  background: var(--display-recess);
  border: 1px dashed #3a4454;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.demo-text {
  display: flex;
  flex-direction: column;
}

.demo-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--phosphor-cyan);
}

.demo-sub {
  font-size: 9px;
  color: var(--text-dim);
}

.btn-demo-fill {
  cursor: pointer;
  background: #242b36;
  border: 1px solid #3e4858;
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  transition: all 0.15s;
}
.btn-demo-fill:hover {
  background: #333c4c;
  color: var(--phosphor-cyan);
  border-color: var(--phosphor-cyan);
}

.auth-msg-toast {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
}
.auth-msg-toast.error {
  background: rgba(255, 51, 68, 0.15);
  color: var(--phosphor-red);
  border: 1px solid var(--phosphor-red);
}
.auth-msg-toast.success {
  background: rgba(0, 255, 136, 0.15);
  color: var(--phosphor-green);
  border: 1px solid var(--phosphor-green);
}
.auth-msg-toast.hidden { display: none; }

/* ==========================================================================
   USER ACCOUNT HEADER TRAY & SETTINGS
   ========================================================================== */
.user-account-tray {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--display-recess);
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow-bevel-in);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e5ff 0%, #00ff88 100%);
  color: #0b0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-name-display {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.user-role-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--phosphor-cyan);
  letter-spacing: 0.5px;
}

.btn-settings-gear, .btn-header-logout {
  cursor: pointer;
  background: #1f2530;
  border: 1px solid #384252;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 8px;
  transition: all 0.15s;
}

.btn-settings-gear:hover {
  color: var(--phosphor-cyan);
  border-color: var(--phosphor-cyan);
}

.btn-header-logout:hover {
  color: var(--phosphor-red);
  border-color: var(--phosphor-red);
}

/* ==========================================================================
   ACCOUNT SETTINGS & THEME CUSTOMIZATION MODAL
   ========================================================================== */
.theme-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.theme-card-option {
  cursor: pointer;
  background: var(--display-recess);
  border: 2px solid #333d4b;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-bevel-in);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s;
}

.theme-card-option:hover {
  border-color: #526075;
}

.theme-card-option.active {
  border-color: var(--phosphor-green);
  box-shadow: var(--shadow-bevel-in), 0 0 12px var(--phosphor-green-glow);
}

.theme-preview-swatch {
  height: 60px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-preview-dark {
  background: linear-gradient(180deg, #1f242c 0%, #121417 100%);
  color: #00ff88;
}

.theme-preview-bright {
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  color: #059669;
}

.theme-card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-name {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.theme-radio-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #5a6578;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-card-option.active .theme-radio-dot {
  border-color: var(--phosphor-green);
}
.theme-card-option.active .theme-radio-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phosphor-green);
}

.profile-field-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-field-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.profile-field-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffffff;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.chassis-footer {
  background: #111317;
  border-top: 2px solid #0a0c0f;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-engraving {
  flex: 1;
}

.disclaimer-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.disclaimer-text {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  text-align: right;
}

/* Loading Spinner & States */
.loading-plate {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 50px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--phosphor-green);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 255, 136, 0.2);
  border-top-color: var(--phosphor-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN & MOBILE UI SYSTEM
   ========================================================================== */
@media (max-width: 1100px) {
  .chassis-header {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .macro-gauge-module {
    grid-column: span 2;
    max-width: 100%;
    width: 100%;
  }
  .refresh-deck {
    justify-content: center;
  }
  .user-account-tray {
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  body {
    padding: 6px;
  }

  .terminal-shell {
    border-radius: 8px;
    border-width: 2px;
  }

  .bezel-screw {
    width: 10px;
    height: 10px;
  }
  .bezel-screw.top-left { top: 6px; left: 6px; }
  .bezel-screw.top-right { top: 6px; right: 6px; }
  .bezel-screw.bottom-left { bottom: 6px; left: 6px; }
  .bezel-screw.bottom-right { bottom: 6px; right: 6px; }

  .master-bezel {
    padding: 16px 12px 10px 12px;
  }

  .chassis-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .branding-cluster {
    align-items: center;
    text-align: center;
  }

  .user-account-tray {
    justify-content: space-between;
    width: 100%;
  }

  .market-region-deck {
    width: 100%;
  }

  .region-rocker-bay {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .region-rocker-btn {
    justify-content: center;
    padding: 8px;
  }

  .macro-gauge-module {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .refresh-deck {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  /* Search Command Strip */
  .search-command-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-search-bar {
    width: 100%;
    flex: 1 1 auto;
  }

  .quick-catalyst-chips {
    width: 100%;
  }

  .quick-tags-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .quick-tags-container::-webkit-scrollbar {
    height: 3px;
  }

  .quick-tags-container::-webkit-scrollbar-thumb {
    background: #384252;
    border-radius: 3px;
  }

  /* Rocker Tabs Nav - Touch Scrollable */
  .rocker-nav {
    margin: 8px 0 0 0;
  }

  .rocker-selector-bar {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 6px;
    padding: 4px 2px 6px 2px;
    scrollbar-width: thin;
  }

  .rocker-selector-bar::-webkit-scrollbar {
    height: 3px;
  }

  .rocker-selector-bar::-webkit-scrollbar-thumb {
    background: #384252;
    border-radius: 3px;
  }

  .rocker-tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 11px;
    border-radius: 6px;
  }

  /* Main Instrument Deck */
  .instrument-deck {
    padding: 12px 10px;
  }

  /* Banner & Stats Tray */
  .section-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .banner-stats-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .stat-pill {
    flex: 1 1 calc(50% - 6px);
    justify-content: space-between;
    font-size: 10px;
  }

  /* Sectors & Stock Opportunities Grid */
  .filter-switch-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .filter-buttons {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    display: flex;
    gap: 6px;
    padding-bottom: 6px;
  }

  .sectors-grid, .stock-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sector-instrument-card, .stock-opportunity-card, .stock-card {
    padding: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stock-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .price-cluster {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
    margin-top: 4px;
  }

  .sector-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Deep Dive Panel */
  .deepdive-header-bezel {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }

  .ticker-identity-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .price-quote-bezel {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .title-with-timeframe {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .timeframe-selector-bay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .timeframe-buttons {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .tf-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .deepdive-core-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .oscilloscope-canvas {
    width: 100% !important;
    height: 200px !important;
  }

  .analysis-matrix-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .matrix-cell {
    padding: 12px;
  }

  /* Incident Wire */
  .wire-card {
    padding: 12px;
  }

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

  /* Modals & Dialogs */
  .auth-vault-overlay {
    padding: 10px;
  }

  .vault-door-chassis {
    max-width: 100%;
    border-radius: 8px;
  }

  .vault-header {
    padding: 14px 16px;
  }

  .vault-form-body {
    padding: 16px;
    gap: 12px;
  }

  .theme-selector-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .chassis-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 2px;
  }

  .badge-text {
    font-size: 15px;
    letter-spacing: 1px;
  }

  .stat-pill {
    flex: 1 1 100%;
  }

  .refresh-deck {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .timeframe-selector-bay {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}


/* ==========================================================================
   GEMINI AI NARRATIVE PANEL
   ========================================================================== */
.ai-narrative-panel {
  margin: 0 0 20px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06) 0%, rgba(0, 255, 136, 0.04) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-left: 3px solid var(--phosphor-cyan);
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.08), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: narrativeFadeIn 0.6s ease forwards;
}

body.theme-bright .ai-narrative-panel {
  background: linear-gradient(135deg, rgba(0, 140, 200, 0.07) 0%, rgba(0, 180, 120, 0.05) 100%);
  border-color: rgba(0, 140, 200, 0.35);
  border-left-color: #0088cc;
  box-shadow: 0 2px 12px rgba(0, 140, 200, 0.1);
}

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

.ai-narrative-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ai-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--phosphor-cyan);
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 3px 9px;
  border-radius: 3px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

body.theme-bright .ai-badge {
  color: #0077bb;
  background: rgba(0, 140, 200, 0.1);
  border-color: rgba(0, 140, 200, 0.3);
  text-shadow: none;
}

.ai-timestamp {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.ai-narrative-text {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-main);
  margin: 0;
  font-style: italic;
}

body.theme-bright .ai-narrative-text {
  color: #2d3748;
}

/* ==========================================================================
   INTERACTIVE ONBOARDING TUTORIAL TOUR STYLES
   ========================================================================== */
.tutorial-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.tutorial-tour-overlay.hidden {
  display: none !important;
}

.tour-spotlight-box {
  position: fixed;
  border-radius: 8px;
  border: 2px solid var(--phosphor-cyan);
  box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.84), 0 0 25px var(--phosphor-cyan);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000000;
  animation: pulseSpotlight 2.5s infinite ease-in-out;
}

@keyframes pulseSpotlight {
  0%, 100% {
    border-color: var(--phosphor-cyan);
    box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.84), 0 0 20px rgba(0, 240, 255, 0.4);
  }
  50% {
    border-color: var(--phosphor-green);
    box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.84), 0 0 32px rgba(0, 255, 136, 0.6);
  }
}

.tour-popover-card {
  position: fixed;
  pointer-events: auto;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--metal-base, #1e2430);
  border: 1px solid var(--border-specular, #4a5568);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(0, 240, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  padding: 18px 20px;
  z-index: 1000001;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.theme-bright .tour-popover-card {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 0 20px rgba(0, 140, 200, 0.2), inset 0 1px 0 #ffffff;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

body.theme-bright .tour-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.tour-step-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--phosphor-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

body.theme-bright .tour-step-badge {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.tour-btn-skip {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.tour-btn-skip:hover {
  color: var(--phosphor-red);
  background: rgba(255, 51, 68, 0.1);
}

.tour-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.tour-icon-bezel {
  font-size: 26px;
  line-height: 1;
  background: var(--display-recess, #0a0d14);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

body.theme-bright .tour-icon-bezel {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
}

.tour-text-content {
  flex: 1;
}

.tour-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main, #ffffff);
  margin: 0 0 6px 0;
  letter-spacing: 0.04em;
}

body.theme-bright .tour-title {
  color: #0f172a;
}

.tour-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

body.theme-bright .tour-desc {
  color: #475569;
}

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-bright .tour-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.tour-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

body.theme-bright .tour-dot {
  background: #cbd5e1;
}

.tour-dot.active {
  width: 18px;
  border-radius: 4px;
  background: var(--phosphor-cyan);
  box-shadow: 0 0 8px var(--phosphor-cyan);
}

body.theme-bright .tour-dot.active {
  background: #0284c7;
  box-shadow: 0 0 6px #0284c7;
}

.tour-nav-buttons {
  display: flex;
  gap: 8px;
}

.tour-btn-nav {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-btn-nav.primary {
  background: linear-gradient(180deg, #00f0ff, #0088cc);
  color: #030812;
  border: 1px solid #00f0ff;
  box-shadow: 0 3px 10px rgba(0, 240, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.4);
}
.tour-btn-nav.primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.5);
}

.tour-btn-nav.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.tour-btn-nav.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}
.tour-btn-nav.hidden {
  display: none !important;
}

/* ========================================================================= */
/* TAB: ANALYZE MY PORTFOLIO & BROKER SYNCHRONIZATION (ISOLATED CSS)        */
/* ========================================================================= */

.tab-premium-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  color: #030812;
  background: linear-gradient(180deg, #fde047 0%, #d97706 100%);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13px;
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.4);
}

/* Clearance Gate Chassis */
.portfolio-gate-chassis {
  background: linear-gradient(180deg, #0e141f 0%, #080d14 100%);
  border: 1px solid rgba(223, 183, 108, 0.35);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  max-width: 860px;
  margin: 24px auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(223, 183, 108, 0.2);
  position: relative;
  overflow: hidden;
}

body.theme-bright .portfolio-gate-chassis {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.gate-emblem-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  margin-bottom: 18px;
}

.gate-crown-glow {
  font-size: 32px;
  position: absolute;
  top: -12px;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.gate-lock-icon {
  font-size: 24px;
  margin-top: 10px;
}

.gate-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  margin-bottom: 10px;
}

.gate-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.gate-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  text-align: left;
}

.gate-perk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

body.theme-bright .gate-perk-card {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

.gate-perk-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.gate-perk-card .perk-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.gate-perk-card h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.gate-perk-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.gate-action-bezel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-request-premium-glow {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #030812;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 14px 32px;
  border-radius: 8px;
  border: 1px solid #fde047;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
}

.btn-request-premium-glow:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.65);
  transform: translateY(-1px);
}

.gate-footnote {
  font-size: 11.5px;
  color: var(--text-dim);
}

.gate-footnote code {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.premium-request-status {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 255, 136, 0.12);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.35);
  max-width: 520px;
}

/* Portfolio Terminal Active Deck */
.portfolio-top-actions {
  display: flex;
  gap: 10px;
}

.btn-portfolio-action {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-portfolio-action.primary {
  background: linear-gradient(180deg, #00f0ff, #0284c7);
  color: #030812;
  border: 1px solid #00f0ff;
  box-shadow: 0 3px 12px rgba(0, 240, 255, 0.3);
}

.btn-portfolio-action.primary:hover {
  filter: brightness(1.15);
}

.btn-portfolio-action.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-portfolio-action.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.portfolio-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.portfolio-kpi-card {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-bevel-in);
}

body.theme-bright .portfolio-kpi-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.portfolio-kpi-card.highlight-border {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, #131926 0%, #0d121c 100%);
}

.kpi-resilience-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-badge-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.kpi-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* Warnings & Concentration Bar */
.portfolio-warnings-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-warning-item {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Portfolio Section Chassis & Sub-Headings */
.portfolio-section-chassis {
  background: rgba(11, 16, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

body.theme-bright .portfolio-section-chassis {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.portfolio-chassis-header {
  padding: 14px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chassis-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-main);
}

.chassis-subtitle {
  font-size: 11px;
  color: #8192a6;
  opacity: 0.65;
  letter-spacing: 0.2px;
  font-weight: 400;
}

body.theme-bright .chassis-subtitle {
  color: #64748b;
  opacity: 0.8;
}

/* Sector Allocation Bar */
.portfolio-sectors-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px 14px;
}

.portfolio-sector-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11.5px;
}

.portfolio-sector-pill .pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--phosphor-cyan);
}

/* Stock Cards Grid */
.portfolio-stocks-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.portfolio-stock-row {
  background: #0b1018;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1.7fr;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
}

body.theme-bright .portfolio-stock-row {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.portfolio-stock-row:hover {
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateX(2px);
}

.stock-sym-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-sym-group.clickable-stock-link {
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  position: relative;
}

.stock-sym-group.clickable-stock-link:hover {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.stock-sym-group .ticker {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-sym-group.clickable-stock-link:hover .ticker-name-link {
  color: var(--phosphor-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.deepdive-mini-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.35);
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
}

.stock-sym-group.clickable-stock-link:hover .deepdive-mini-pill {
  background: #c084fc;
  color: #050a14;
  border-color: #c084fc;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
}

.stock-sym-group .sector-tag {
  font-size: 10.5px;
  color: var(--text-dim);
}

.stock-price-group, .stock-val-group, .stock-pnl-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-price-group .val, .stock-val-group .val, .stock-pnl-group .val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.stock-rating-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stock-health-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stock-health-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.stock-health-score-badge .score-title {
  font-size: 8.5px;
  color: var(--text-dim);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.stock-health-score-badge .score-num {
  font-weight: 900;
  font-size: 11px;
}

.stock-health-score-badge.strong-bullish {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 255, 136, 0.12);
  color: var(--phosphor-green);
}
.stock-health-score-badge.strong-bullish .score-title {
  color: rgba(0, 255, 136, 0.85);
}

.stock-health-score-badge.bullish {
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.1);
  color: var(--phosphor-cyan);
}
.stock-health-score-badge.bullish .score-title {
  color: rgba(0, 229, 255, 0.85);
}

.stock-health-score-badge.neutral {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}
.stock-health-score-badge.neutral .score-title {
  color: rgba(245, 158, 11, 0.85);
}

.stock-health-score-badge.bearish {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}
.stock-health-score-badge.bearish .score-title {
  color: rgba(239, 68, 68, 0.85);
}

.stock-rating-group .verdict-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-align: center;
}

.stock-rating-group .verdict-badge.strong-bullish {
  background: rgba(0, 255, 136, 0.18);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.stock-rating-group .verdict-badge.bullish {
  background: rgba(0, 229, 255, 0.15);
  color: var(--phosphor-cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.stock-rating-group .verdict-badge.neutral {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.stock-rating-group .verdict-badge.bearish {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.stock-driver-text {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Empty Portfolio Placeholder */
.empty-portfolio-state {
  text-align: center;
  padding: 54px 24px;
  color: var(--text-dim);
  background: rgba(13, 18, 27, 0.65);
  border: 1px dashed rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  margin-top: 16px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
}

.empty-portfolio-state .empty-icon {
  font-size: 44px;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 8px rgba(0, 229, 255, 0.3));
}

.empty-portfolio-state h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--phosphor-cyan);
  margin-bottom: 8px;
}

.empty-portfolio-state p {
  font-size: 12.5px;
  max-width: 520px;
  line-height: 1.6;
  margin: 0 auto;
  color: var(--text-muted);
}

/* Broker Modal Tabs & Panels */
.broker-modal-chassis {
  max-width: 720px;
  max-height: 85vh;
}

.broker-modal-scroll {
  padding: 20px;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.broker-pane {
  display: none;
}

.broker-pane.active {
  display: block !important;
}

.broker-pane.hidden {
  display: none !important;
}

.broker-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.broker-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d121b;
  overflow: visible;
  scrollbar-width: none;
}

.broker-tabs-bar::-webkit-scrollbar {
  display: none;
}

.broker-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.broker-tab-btn * {
  pointer-events: none;
}

.broker-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(0, 229, 255, 0.35);
}

.broker-tab-btn.active {
  background: #141b27;
  color: var(--phosphor-cyan);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 -2px 8px rgba(0, 229, 255, 0.2);
}

.broker-guide-box {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.broker-guide-box h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--phosphor-cyan);
  margin-bottom: 6px;
}

.broker-guide-box ol, .broker-guide-box p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 18px;
  margin: 0;
}

.broker-guide-box a {
  color: #38bdf8;
  text-decoration: underline;
}

.file-picker-input, .csv-raw-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #080d14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
}

.broker-sync-status {
  margin-top: 14px;
  padding: 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.broker-sync-status.success {
  background: rgba(0, 255, 136, 0.12);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.35);
}

.broker-sync-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

@media (max-width: 768px) {
  .portfolio-stock-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Footer Support & Feedback Button */
.btn-support-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #182234 0%, #0d1522 100%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-bright .btn-support-footer {
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0f172a;
}

.btn-support-footer:hover {
  border-color: var(--phosphor-cyan);
  background: linear-gradient(180deg, #22324d 0%, #111c2e 100%);
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-support-footer .support-icon {
  font-size: 13px;
}

.btn-support-footer .support-text {
  color: var(--text-main);
}

body.theme-bright .btn-support-footer .support-text {
  color: #0f172a;
}

.btn-support-footer .support-badge {
  background: rgba(0, 255, 136, 0.15);
  color: var(--phosphor-green);
  border: 1px solid rgba(0, 255, 136, 0.4);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.support-modal-chassis {
  max-width: 620px;
  width: 92%;
}

.select-styled {
  cursor: pointer;
  appearance: auto;
  background-color: #0b111a !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(0, 229, 255, 0.25) !important;
  padding: 10px 12px !important;
  border-radius: 6px !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  outline: none;
}

.select-styled:focus {
  border-color: var(--phosphor-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3) !important;
}

.select-styled option {
  background-color: #0b111a !important;
  color: #f8fafc !important;
  padding: 12px 14px !important;
  font-size: 13px !important;
  font-weight: 500;
}

.select-styled option:hover,
.select-styled option:checked,
.select-styled option:focus {
  background-color: #0369a1 !important;
  color: #ffffff !important;
}

body.theme-bright .select-styled {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

body.theme-bright .select-styled option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body.theme-bright .select-styled option:checked {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

/* Quick 1-Click Demo Shortcut Box & Button */
.auth-demo-shortcut {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px dashed rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.theme-bright .auth-demo-shortcut {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
}

.auth-demo-shortcut .demo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.auth-demo-shortcut .demo-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--phosphor-cyan);
}

body.theme-bright .auth-demo-shortcut .demo-title {
  color: #0284c7;
}

.auth-demo-shortcut .demo-sub {
  font-size: 10.5px;
  color: var(--text-dim);
}

body.theme-bright .auth-demo-shortcut .demo-sub {
  color: #64748b;
}

.btn-demo-fill {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-demo-fill:hover {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
}

body.theme-bright .btn-demo-fill {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border: 1px solid #0284c7;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

body.theme-bright .btn-demo-fill:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
}

/* ==========================================================================
   AI PORTFOLIO COPILOT & STRATEGY ADVISOR DECK
   ========================================================================== */
.portfolio-ai-chat-chassis {
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(56, 189, 248, 0.15) !important;
  background: linear-gradient(180deg, #111622 0%, #0a0d14 100%);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-bright .portfolio-ai-chat-chassis {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(2, 132, 199, 0.3) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Centered Header Layout */
.chat-chassis-header-centered {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 16px 8px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 6px 6px 0 0;
}

body.theme-bright .chat-chassis-header-centered {
  background: rgba(241, 245, 249, 0.6);
  border-bottom-color: rgba(2, 132, 199, 0.15);
}

.chat-header-center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.chat-main-ai-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--phosphor-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.65), 0 0 20px rgba(0, 229, 255, 0.35);
}

body.theme-bright .chat-main-ai-title {
  color: #0077bb;
  text-shadow: 0 0 2px rgba(0, 119, 187, 0.25);
}

.chat-chassis-subtitle-centered {
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  margin: 0;
  max-width: 680px;
  line-height: 1.4;
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 820px) {
  .chat-header-controls {
    position: static;
    transform: none;
    margin-top: 8px;
  }
}

.btn-chat-maximize {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  color: #7dd3fc;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-chat-maximize:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.btn-chat-maximize:active {
  transform: translateY(1px);
}

body.theme-bright .btn-chat-maximize {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.theme-bright .btn-chat-maximize:hover {
  background: #bae6fd;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* Maximized Popup Modal Overlay */
.portfolio-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 17, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 90000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-chat-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

body.theme-bright .portfolio-chat-backdrop {
  background: rgba(241, 245, 249, 0.85);
}

.portfolio-ai-chat-chassis.is-maximized {
  position: fixed !important;
  top: 20px !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(1300px, calc(100vw - 32px)) !important;
  height: calc(100vh - 40px) !important;
  max-height: calc(100vh - 40px) !important;
  z-index: 90005 !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 12px !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 45px rgba(0, 229, 255, 0.25) !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  animation: chatModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: linear-gradient(180deg, #111726 0%, #080c14 100%) !important;
}

body.theme-bright .portfolio-ai-chat-chassis.is-maximized {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(2, 132, 199, 0.5) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 30px rgba(2, 132, 199, 0.15) !important;
}

@keyframes chatModalPop {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

.portfolio-ai-chat-chassis.is-maximized .portfolio-chat-stream {
  flex: 1 1 auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 18px 12px !important;
}

.portfolio-ai-chat-chassis.is-maximized .portfolio-chat-input-bay {
  margin-top: auto !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.theme-bright .portfolio-ai-chat-chassis.is-maximized .portfolio-chat-input-bay {
  border-top-color: #e2e8f0 !important;
}

.chat-quick-suggestions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  margin-top: 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

body.theme-bright .chat-quick-suggestions {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.suggestion-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--phosphor-cyan);
  letter-spacing: 0.5px;
}

body.theme-bright .suggestion-lbl {
  color: #0369a1;
}

.chat-chip-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #cbd5e1;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.chat-chip-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

body.theme-bright .chat-chip-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-bright .chat-chip-btn:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #0284c7;
}

.portfolio-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 380px;
  min-height: 180px;
  overflow-y: auto;
  padding: 14px 8px;
  margin-top: 12px;
  scrollbar-width: thin;
}

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #18202e;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.chat-msg-user .chat-avatar {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.2);
}

body.theme-bright .chat-avatar {
  background: #e0f2fe;
  border-color: #bae6fd;
}

body.theme-bright .chat-msg-user .chat-avatar {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.chat-bubble {
  max-width: 82%;
  background: linear-gradient(180deg, #161c28 0%, #101520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.6;
}

.chat-msg-user .chat-bubble {
  background: linear-gradient(180deg, #1e293b 0%, #151d2c 100%);
  border-color: rgba(56, 189, 248, 0.3);
  color: #f8fafc;
}

body.theme-bright .chat-bubble {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.theme-bright .chat-msg-user .chat-bubble {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--phosphor-cyan);
}

body.theme-bright .chat-bubble-header {
  color: #0284c7;
}

.chat-bubble-header .badge-pill {
  font-size: 8.5px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.chat-bubble-body h3, .chat-bubble-body h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  margin: 8px 0 4px 0;
  color: #38bdf8;
}

body.theme-bright .chat-bubble-body h3, body.theme-bright .chat-bubble-body h4 {
  color: #0369a1;
}

.chat-bubble-body ul, .chat-bubble-body ol {
  margin: 6px 0;
  padding-left: 18px;
}

.chat-bubble-body li {
  margin-bottom: 4px;
}

.portfolio-chat-input-bay {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-bright .portfolio-chat-input-bay {
  border-top-color: #e2e8f0;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: #080b10;
  border: 1px solid #2d3748;
  border-radius: 6px;
  padding: 2px 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
  border-color: #38bdf8;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 10px rgba(56, 189, 248, 0.3);
}

body.theme-bright .chat-input-wrapper {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.theme-bright .chat-input-wrapper:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.terminal-prefix {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--phosphor-cyan);
  margin-right: 8px;
  user-select: none;
}

body.theme-bright .terminal-prefix {
  color: #0284c7;
}

.chat-text-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 4px;
  outline: none;
}

body.theme-bright .chat-text-input {
  color: #0f172a;
}

.btn-chat-action {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 4px 6px;
  font-size: 14px;
}

.btn-chat-restart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #fca5a5;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-chat-restart:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.btn-chat-restart:active {
  transform: translateY(1px);
}

body.theme-bright .btn-chat-restart {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.theme-bright .btn-chat-restart:hover {
  background: #fecaca;
  border-color: #ef4444;
  color: #991b1b;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.chat-action-buttons-bay {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-chat-action-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 11px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-chat-action-reset:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}

.btn-chat-action-reset:active {
  transform: translateY(1px);
}

body.theme-bright .btn-chat-action-reset {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

body.theme-bright .btn-chat-action-reset:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-chat-action:hover {
  opacity: 1;
}

.btn-chat-send {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 11px 18px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-chat-send:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

.btn-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.typing-pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--phosphor-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  background: var(--phosphor-cyan);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}


