/* =====================================================================
   VECTOR QUANT - Institutional Design System & Stylesheet
   Theme: Bloomberg Terminal / TradingView Dark Mode
   ===================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-card: #121824;
  --bg-card-hover: #172030;
  --bg-card-inner: #0d121c;
  --border-subtle: #1e293b;
  --border-bright: #2d3e58;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00e5ff;
  --accent-emerald: #00e676;
  --accent-gold: #ffd600;
  --accent-crimson: #ff1744;
  --accent-violet: #7c4dff;
  --accent-blue: #2979ff;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.font-mono { font-family: var(--font-mono); }
.text-cyan { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-emerald); }
.text-gold { color: var(--accent-gold); }
.text-crimson { color: var(--accent-crimson); }
.text-muted { color: var(--text-muted); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-24 { padding: 24px; }

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
}

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

.brand-sub { color: var(--accent-cyan); }

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.regime-status-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 16px;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.8px;
}

.status-value {
  font-size: 13px;
  font-weight: 600;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
}

.regime-bull { background: rgba(0, 230, 118, 0.15); color: var(--accent-emerald); border: 1px solid rgba(0, 230, 118, 0.3); }
.regime-chop { background: rgba(255, 214, 0, 0.15); color: var(--accent-gold); border: 1px solid rgba(255, 214, 0, 0.3); }
.regime-rotation { background: rgba(124, 77, 255, 0.15); color: var(--accent-violet); border: 1px solid rgba(124, 77, 255, 0.3); }
.regime-crisis { background: rgba(255, 23, 68, 0.15); color: var(--accent-crimson); border: 1px solid rgba(255, 23, 68, 0.3); }

.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 28px 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.nav-tab.highlight { color: #fbbf24; }
.nav-tab.highlight.active { border-bottom-color: #fbbf24; }

.main-content {
  padding: 24px 28px;
  max-width: 1440px;
  margin: 0 auto;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.regime-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 20px;
}

.banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.banner-content strong {
  display: block;
  font-size: 13px;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

.banner-content span {
  font-size: 12px;
  color: var(--text-muted);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header-inner {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header-inner h3 {
  font-size: 15px;
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-card-inner);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr:hover { background: var(--bg-card-hover); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.4px;
}

.badge-strong-buy { background: rgba(0, 230, 118, 0.2); color: var(--accent-emerald); border: 1px solid rgba(0, 230, 118, 0.4); }
.badge-buy { background: rgba(0, 229, 255, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 229, 255, 0.3); }
.badge-hold { background: rgba(255, 214, 0, 0.15); color: var(--accent-gold); border: 1px solid rgba(255, 214, 0, 0.3); }
.badge-defensive { background: rgba(124, 77, 255, 0.15); color: var(--accent-violet); border: 1px solid rgba(124, 77, 255, 0.3); }
.badge-sell { background: rgba(255, 23, 68, 0.15); color: var(--accent-crimson); border: 1px solid rgba(255, 23, 68, 0.3); }

.conviction-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conviction-track {
  width: 90px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.conviction-fill { height: 100%; border-radius: 3px; }

.screener-controls { display: flex; gap: 12px; }

.search-input, .select-input, .number-input {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-bright);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus, .select-input:focus, .number-input:focus { border-color: var(--accent-cyan); }
.full-width { width: 100%; }
.small { width: 70px; text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary { background: var(--accent-cyan); color: #061019; }
.btn-primary:hover { background: #33ebff; box-shadow: 0 0 12px rgba(0, 229, 255, 0.4); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-bright);
}

.btn-sm { padding: 4px 10px; font-size: 12px; }

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: var(--bg-card);
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-bottom: 24px;
}

.config-card { display: flex; flex-direction: column; gap: 6px; }
.config-card label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.sub-label { font-size: 10px; color: var(--text-muted); }
.friction-inputs { display: flex; gap: 12px; }
.action-card { justify-content: flex-end; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 18px 20px;
}

.metric-title { font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.6px; margin-bottom: 6px; }
.metric-val { font-size: 26px; font-weight: 700; line-height: 1.1; margin-bottom: 4px; }
.metric-sub { font-size: 11px; color: var(--text-muted); }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-header h3 { font-size: 15px; font-weight: 700; }
.chart-sub { font-size: 12px; color: var(--text-muted); }
.chart-legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.strategy-dot { background: var(--accent-cyan); }
.benchmark-dot { background: #94a3b8; }

.canvas-container { width: 100%; position: relative; overflow: hidden; }
canvas { width: 100%; display: block; }

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.mc-metrics-strip {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 16px;
}

.mc-item { display: flex; flex-direction: column; align-items: center; }
.mc-label { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }
.mc-val { font-size: 18px; font-weight: 700; margin-top: 4px; }

.risk-stats-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-stat-row { display: flex; justify-content: space-between; font-size: 13px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.kelly-result-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
}

.kelly-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.kelly-row.highlight { border-top: 1px solid var(--border-subtle); margin-top: 8px; padding-top: 8px; font-size: 14px; }
.kelly-explanation { font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }

.regime-bar-item { margin-bottom: 12px; }
.regime-bar-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.regime-track { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.regime-fill { height: 100%; border-radius: 4px; }

.matrix-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.matrix-table th { background: var(--bg-card-inner); padding: 8px 12px; font-weight: 700; color: var(--text-dim); border-bottom: 1px solid var(--border-subtle); }
.matrix-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }

.factor-weight-list { display: flex; flex-direction: column; gap: 12px; }
.factor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.factor-info { display: flex; flex-direction: column; }
.factor-info strong { font-size: 13px; }
.factor-info span { font-size: 11px; }
.factor-badge { font-size: 13px; font-weight: 700; padding: 4px 8px; background: rgba(255, 255, 255, 0.04); border-radius: 4px; }

.masterclass-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .masterclass-grid { grid-template-columns: 1fr; } }

.myth-card { display: flex; flex-direction: column; gap: 16px; }
.myth-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.8px; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-bottom: 6px; }
.myth-tag.myth { background: rgba(255, 23, 68, 0.2); color: var(--accent-crimson); }
.myth-tag.reality { background: rgba(0, 229, 255, 0.2); color: var(--accent-cyan); }
.myth-tag.warning { background: rgba(255, 214, 0, 0.2); color: var(--accent-gold); }

.myth-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.myth-body strong { color: var(--text-main); }
.asymmetric-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.asymmetric-table th { background: var(--bg-card-inner); padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.asymmetric-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); }

.formula-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-bright);
  padding: 12px;
  text-align: center;
  font-size: 16px;
  color: var(--accent-cyan);
  border-radius: 6px;
  margin: 12px 0;
}

.bias-list { padding-left: 20px; font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 12px; }

.app-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  max-width: 780px;
  width: 90%;
  padding: 0;
  overflow: hidden;
}

.app-modal::backdrop { background: rgba(5, 8, 14, 0.85); backdrop-filter: blur(4px); }
.modal-content { display: flex; flex-direction: column; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-card-inner);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close-btn { background: none; border: none; font-size: 24px; color: var(--text-dim); cursor: pointer; }
.modal-close-btn:hover { color: var(--text-main); }
.modal-body { padding: 24px; max-height: 80vh; overflow-y: auto; }
.modal-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.modal-feat-item { background: var(--bg-card-inner); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 10px 12px; }
.feat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; }
.feat-val { font-size: 15px; font-weight: 700; margin-top: 4px; }

.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.bp-item { background: var(--bg-card-inner); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 12px; }
.bp-val { font-size: 20px; font-weight: 700; margin-top: 4px; }
.bp-checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--text-muted); }
.bp-checklist li { display: flex; align-items: center; gap: 8px; }

/* =====================================================================
   VECTOR APEX - Speculative High-Beta Breakout Styles
   ===================================================================== */
.highlight-speculative {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.15), rgba(156, 39, 176, 0.25)) !important;
  border-color: rgba(233, 30, 99, 0.4) !important;
  color: #ff4081 !important;
  font-weight: 700;
}
.highlight-speculative:hover, .highlight-speculative.active {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.3), rgba(156, 39, 176, 0.4)) !important;
  box-shadow: 0 0 16px rgba(233, 30, 99, 0.35);
}

.text-magenta { color: #ff4081 !important; }
.glow-magenta { border: 1px solid rgba(233, 30, 99, 0.45); box-shadow: 0 0 20px rgba(233, 30, 99, 0.15); }

.badge-no-penny {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: #00e676;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.btn-speculative {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.4);
  transition: all 0.2s ease;
}
.btn-speculative:hover {
  background: linear-gradient(135deg, #f06292, #ab47bc);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.6);
  transform: translateY(-1px);
}

.badge-coiled {
  background: rgba(255, 214, 0, 0.15);
  border: 1px solid rgba(255, 214, 0, 0.4);
  color: #ffd600;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-fired {
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid rgba(0, 230, 118, 0.5);
  color: #00e676;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.badge-accelerating {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.payoff-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.payoff-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.payoff-card.risk { border-color: rgba(255, 23, 68, 0.4); }
.payoff-card.target1 { border-color: rgba(0, 229, 255, 0.4); }
.payoff-card.target2 { border-color: rgba(0, 230, 118, 0.4); }
.payoff-card.target3 { border-color: rgba(233, 30, 99, 0.5); background: rgba(233, 30, 99, 0.05); }

.payoff-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; font-weight: 600; }
.payoff-val { font-size: 18px; font-weight: 700; margin-top: 6px; }
.payoff-sub { font-size: 11px; margin-top: 2px; }

.spec-mechanics-text .mech-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.spec-mechanics-text p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------- */
/* Live Market Data Feed & Real-Time Ticker Tape Styles          */
/* ------------------------------------------------------------- */

.live-indicator-wrap {
  display: flex;
  flex-direction: column;
}

.live-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00e676;
  box-shadow: 0 0 8px #00e676;
  display: inline-block;
}

.live-dot.pulse {
  animation: live-pulse 1.2s infinite ease-in-out;
}

@keyframes live-pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #00e676; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px #00e676; }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #00e676; }
}

.market-ticker-tape {
  display: flex;
  align-items: center;
  background: #070b14;
  border-bottom: 1px solid var(--border-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  height: 38px;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.tape-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #0b1120;
  border-right: 1px solid var(--border-subtle);
  height: 100%;
  flex-shrink: 0;
  z-index: 2;
}

.tape-live-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #00e5ff;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.tape-refresh-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.tape-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.tape-scroll-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  scrollbar-width: none;
}
.tape-scroll-container::-webkit-scrollbar {
  display: none;
}

.tape-track {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  white-space: nowrap;
}

.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.tape-symbol {
  font-weight: 700;
  color: var(--text-main);
}

.tape-price {
  font-weight: 600;
  color: #ffffff;
}

.tape-change {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
}

.tape-change.up {
  color: #00e676;
  background: rgba(0, 230, 118, 0.12);
}

.tape-change.down {
  color: #ff1744;
  background: rgba(255, 23, 68, 0.12);
}

.tape-change.neutral {
  color: var(--text-muted);
}

/* Micro-flash visual animations on live tick */
.price-flash-up {
  animation: flash-green 0.6s ease-out;
}

.price-flash-down {
  animation: flash-red 0.6s ease-out;
}

@keyframes flash-green {
  0% { background-color: rgba(0, 230, 118, 0.35); color: #00e676; }
  100% { background-color: transparent; }
}

@keyframes flash-red {
  0% { background-color: rgba(255, 23, 68, 0.35); color: #ff1744; }
  100% { background-color: transparent; }
}

/* Sub-second volatility spike pulse */
.tape-item.volatility-pulse {
  animation: vol-pulse-glow 0.8s ease-in-out;
  border: 1px solid rgba(255, 214, 0, 0.6);
  background: rgba(255, 214, 0, 0.15);
}

@keyframes vol-pulse-glow {
  0% { transform: scale(1.0); box-shadow: 0 0 0 0 rgba(255, 214, 0, 0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(255, 214, 0, 0.5); }
  100% { transform: scale(1.0); box-shadow: 0 0 0 0 rgba(255, 214, 0, 0); }
}

.tape-breadth-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

/* ------------------------------------------------------------- */
/* Portfolio Health & AI Diagnostic Auditor Styles               */
/* ------------------------------------------------------------- */

.auditor-card {
  border: 1px solid rgba(124, 77, 255, 0.35);
  background: linear-gradient(180deg, rgba(16, 24, 48, 0.8) 0%, rgba(10, 14, 26, 0.95) 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.auditor-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: rgba(124, 77, 255, 0.2);
  border: 1px solid rgba(124, 77, 255, 0.5);
  color: #b388ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.auditor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.auditor-actions {
  display: flex;
  gap: 8px;
}

.auditor-cash-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-card-inner);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.auditor-input-table input {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}

.auditor-input-table input:focus {
  border-color: var(--accent-cyan);
  outline: none;
}

/* Diagnostic Score Banner */
.audit-score-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.grade-circle-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.grade-letter {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.grade-score-num {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

.audit-meta-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.audit-sub-score-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.audit-sub-val {
  font-size: 16px;
  font-weight: 700;
}

/* Diagnostic Warning Flags */
.audit-flags-box {
  margin-bottom: 20px;
}

.flag-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid;
}

.flag-item.CRITICAL {
  background: rgba(255, 23, 68, 0.08);
  border-left-color: #ff1744;
  border: 1px solid rgba(255, 23, 68, 0.2);
  border-left-width: 4px;
}

.flag-item.WARNING {
  background: rgba(255, 214, 0, 0.08);
  border-left-color: #ffd600;
  border: 1px solid rgba(255, 214, 0, 0.2);
  border-left-width: 4px;
}

.flag-item.OPTIMIZATION {
  background: rgba(0, 229, 255, 0.08);
  border-left-color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-left-width: 4px;
}

.flag-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

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

/* Comparison Cards */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.comp-card {
  background: var(--bg-card-inner);
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--border-subtle);
}

.comp-card.optimized {
  border-color: rgba(0, 230, 118, 0.4);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.05) 0%, rgba(10, 14, 26, 0.95) 100%);
}

.comp-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comp-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
}
.comp-stat-row:last-child {
  border-bottom: none;
}

/* ------------------------------------------------------------- */
/* Personal Income Growth Center & Modal Styles                 */
/* ------------------------------------------------------------- */

.highlight-income {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(0, 229, 255, 0.22)) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #10b981 !important;
  font-weight: 700;
}
.highlight-income:hover, .highlight-income.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(0, 229, 255, 0.38)) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.income-play-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 30, 0.98) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.income-play-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.12);
}

.income-play-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.income-harvest-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.income-runner-box {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.income-risk-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #94a3b8;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.app-modal .modal-content.small {
  max-width: 520px;
}

.app-modal .modal-content.medium {
  max-width: 680px;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}

.pulse-dot.green {
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: pulse-glow 1.5s infinite;
}

.pulse-dot.dim {
  background: #64748b;
  box-shadow: none;
  animation: none;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.badge-t1-harvest {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.badge-zero-risk {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid #00e5ff;
  color: #00e5ff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.ira-milestone-banner {
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

/* ------------------------------------------------------------- */
/* Sub-Minute High-Frequency Scalper HUD Styles                 */
/* ------------------------------------------------------------- */

.app-modal .modal-content.large {
  max-width: 880px;
}

.pulse-dot.gold {
  background: #ffd700;
  box-shadow: 0 0 8px #ffd700;
  animation: pulse-glow-gold 1.5s infinite;
}

@keyframes pulse-glow-gold {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.scalper-hud-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  align-items: center;
}

.scalper-hud-stat-box {
  display: flex;
  flex-direction: column;
}

.scalper-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}

.scalper-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.scalper-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 30, 0.98) 100%);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.scalper-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.12);
}

.imbalance-bar {
  height: 6px;
  background: rgba(239, 68, 68, 0.6);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin: 6px 0;
}

.imbalance-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease;
}

.badge-coiled {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid #a855f7;
  color: #c084fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.scalper-hotkey-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #cbd5e1;
}



