@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --tv-bg: #0a0b0f;
  --tv-surface: #131722;
  --tv-surface-2: #1e222d;
  --tv-surface-3: #2a2e39;
  --tv-border: #2a2e39;
  --tv-border-2: #363a45;
  --tv-text: #d1d4dc;
  --tv-text-2: #787b86;
  --tv-text-3: #50535c;
  --tv-green: #089981;
  --tv-red: #f23645;
  --tv-yellow: #ff9800;
  --tv-blue: #2962ff;
  --tv-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tv-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --tv-radius: 6px;
  --tv-radius-sm: 4px;
  --tv-glow-green: 0 0 20px rgba(8,153,129,0.15);
  --tv-glow-red: 0 0 20px rgba(242,54,69,0.15);
}

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

body {
  background: var(--tv-bg);
  color: var(--tv-text);
  font-family: var(--tv-font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* ── Background Image Overlay ── */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(10,11,15,0.88) 0%, rgba(10,11,15,0.92) 50%, rgba(10,11,15,0.97) 100%),
    url('https://images.pexels.com/photos/6770610/pexels-photo-6770610.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=1920') center/cover no-repeat fixed;
  pointer-events: none;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 20px 60px; 
  position: relative;
  z-index: 1;
}

/* ── Topbar ── */
.topbar{background:rgba(19,23,34,0.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--tv-border);position:sticky;top:0;z-index:100}
.topbar-inner{max-width:1200px;margin:0 auto;padding:0 20px;display:flex;align-items:center;gap:4px;height:52px}
.logo{font-size:15px;font-weight:800;color:var(--tv-text);text-decoration:none;display:flex;align-items:center;gap:10px;margin-right:20px}
.topbar-nav{display:flex;align-items:center;gap:0}
.nav-link{font-size:13px;font-weight:500;color:var(--tv-text-2);text-decoration:none;padding:6px 12px;border-radius:var(--tv-radius-sm);transition:all .15s;white-space:nowrap}
.nav-link:hover,.nav-link.active{background:var(--tv-surface-2);color:var(--tv-text)}

/* ── Page Header ── */
.page-header { 
  display: flex; align-items: flex-end; justify-content: space-between; 
  padding-top: 24px;
}
.page-title { font-size: 26px; font-weight: 700; color: var(--tv-text); letter-spacing: -0.03em; }
.page-title-wrap { display: flex; flex-direction: column; gap: 6px; }
.page-sub { font-size: 13px; color: var(--tv-text-2); display: flex; align-items: center; gap: 6px; }
.live-dot { 
  width: 8px; height: 8px; border-radius: 50%; background: var(--tv-green); 
  display: inline-block; animation: pulse 2s infinite; 
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.last-update { 
  font-size: 11px; color: var(--tv-text-3); 
  display: flex; align-items: center; gap: 6px; 
}
.update-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tv-green); display: inline-block; }

/* ── Section Header ── */
.section-header { 
  display: flex; align-items: center; gap: 12px; margin: 24px 0 14px; 
}
.section-title { font-size: 16px; font-weight: 600; color: var(--tv-text); }
.section-badge { 
  font-size: 11px; color: var(--tv-text-2); background: var(--tv-surface); 
  padding: 2px 10px; border-radius: 20px; border: 1px solid var(--tv-border); 
}

/* ════════════════════════════════════════
   KPI Dashboard 
   ════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--tv-border);
  border-radius: var(--tv-radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.kpi-card {
  background: var(--tv-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: background .15s;
}
.kpi-card:hover { background: var(--tv-surface-2); }
.kpi-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { opacity: .85; }
.kpi-icon-bots { background: rgba(41,98,255,0.12); color: var(--tv-blue); }
.kpi-icon-aum { background: rgba(8,153,129,0.12); color: var(--tv-green); }
.kpi-icon-profit { background: rgba(8,153,129,0.12); color: var(--tv-green); }
.kpi-icon-loss { background: rgba(242,54,69,0.12); color: var(--tv-red); }
.kpi-icon-trades { background: rgba(255,152,0,0.12); color: var(--tv-yellow); }
.kpi-body { display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--tv-text-2); }
.kpi-value { font-size: 20px; font-weight: 700; font-family: var(--tv-mono); color: var(--tv-text); line-height: 1.2; }
.kpi-change { font-size: 10px; font-weight: 500; }
.kpi-muted { color: var(--tv-text-3); }

/* ════════════════════════════════════════
   Chart Panel 
   ════════════════════════════════════════ */
.chart-panel {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 20px 20px 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.chart-panel-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.chart-panel-title { font-size: 14px; font-weight: 600; color: var(--tv-text); }
.chart-panel-controls { display: flex; gap: 4px; }
.chart-btn {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--tv-radius-sm);
  border: 1px solid var(--tv-border); background: var(--tv-surface);
  color: var(--tv-text-2); cursor: pointer; transition: all .15s;
  font-family: var(--tv-font);
}
.chart-btn:hover { background: var(--tv-surface-2); color: var(--tv-text); }
.chart-btn.active { background: var(--tv-blue); color: #fff; border-color: var(--tv-blue); }
#mainChart { width: 100% !important; height: 300px !important; }

/* ════════════════════════════════════════
   Distribution Row 
   ════════════════════════════════════════ */
.dist-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--tv-border);
  border-radius: var(--tv-radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.dist-card {
  background: var(--tv-surface);
  padding: 16px;
}
.dist-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--tv-text-2); margin-bottom: 12px;
}
#riskChart { max-height: 180px; }

/* Top performers */
.tp-row {
  display: grid;
  grid-template-columns: 20px 24px 1fr 1fr 60px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--tv-border);
}
.tp-row:last-child { border-bottom: none; }
.tp-rank { font-size: 11px; font-weight: 600; color: var(--tv-text-3); font-family: var(--tv-mono); }
.tp-avatar { font-size: 16px; text-align: center; }
.tp-name { font-size: 12px; font-weight: 500; color: var(--tv-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar-wrap { height: 4px; background: var(--tv-surface-3); border-radius: 2px; overflow: hidden; }
.tp-bar { height: 100%; border-radius: 2px; transition: width .3s; }
.tp-bar-up { background: var(--tv-green); }
.tp-bar-down { background: var(--tv-red); }
.tp-val { font-size: 12px; font-weight: 600; font-family: var(--tv-mono); text-align: right; }

/* ════════════════════════════════════════
   Bot List (Leaderboard)
   ════════════════════════════════════════ */
.bot-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--tv-border);
  border-radius: var(--tv-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bot-card {
  background: var(--tv-surface);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 40px 32px 1fr 120px 90px 24px;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background .1s, transform .1s;
}
.bot-card:hover {
  background: var(--tv-surface-2);
}
.bot-rank { font-size: 14px; font-weight: 700; color: var(--tv-text-3); font-family: var(--tv-mono); text-align: center; }
.bot-rank.gold { color: var(--tv-yellow); }
.bot-avatar-col { font-size: 20px; text-align: center; }
.bot-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.bot-name { font-size: 14px; font-weight: 600; color: var(--tv-text); }
.risk-badge {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px;
  background: rgba(120,123,134,0.12); color: var(--tv-text-2);
  border: 1px solid rgba(120,123,134,0.25);
  letter-spacing: 0.03em;
}
.bot-meta { font-size: 11px; color: var(--tv-text-2); }
.bot-val-col { text-align: right; }
.bot-val { font-size: 15px; font-weight: 600; font-family: var(--tv-mono); color: var(--tv-text); }
.bot-ret { font-size: 12px; font-family: var(--tv-mono); font-weight: 500; margin-top: 1px; }
.bot-today-col { text-align: right; }
.bot-today-lbl { font-size: 9px; color: var(--tv-text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.bot-today-val { font-size: 13px; font-weight: 600; font-family: var(--tv-mono); }
.bot-arrow { font-size: 14px; color: var(--tv-text-3); text-align: center; }

/* ── Utilities ── */
.c-green { color: var(--tv-green); }
.c-red { color: var(--tv-red); }
.c-blue { color: var(--tv-blue); }
.mono { font-family: var(--tv-mono); }

/* Footer */
.footer-text { 
  display: block; text-align: center; 
  padding: 20px 0 10px; font-size: 11px; color: var(--tv-text-3); 
  border-top: 1px solid var(--tv-border); margin-top: 24px; 
}

/* ── Empty state ── */
.empty { 
  text-align: center; padding: 40px 20px; 
  color: var(--tv-text-3); font-size: 13px; 
}

/* ── Countdown Wrap (top right of hero) ── */
.countdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.countdown-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tv-text-3);
}
.countdown-num {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--tv-mono);
  color: var(--tv-text);
  white-space: nowrap;
}

/* ── Prices Bar (ticker chips above session) ── */
.prices-bar {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.prices-bar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tv-text-2);
  margin-bottom: 8px;
}
.prices-bar-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tv-text-3);
  font-size: 10px;
}
.prices-bar-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.price-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--tv-surface-2);
  border: 1px solid var(--tv-border-2);
  border-radius: var(--tv-radius-sm);
}
.price-chip-sym {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--tv-mono);
  color: var(--tv-text);
}
.price-chip-val {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--tv-mono);
  color: var(--tv-text);
}
.price-chip-chg {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--tv-mono);
}

/* ── Expandable Position Rows ── */
.pos-expand td {
  padding: 0 !important;
  background: var(--tv-surface-2);
}
.pos-expand:hover td {
  background: var(--tv-surface-2) !important;
}
.pos-detail {
  padding: 14px 16px 14px 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pos-detail-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--tv-text-3);
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 2px;
}
.pos-detail-val {
  font-size: 12px;
  color: var(--tv-text);
  font-family: var(--tv-mono);
}

/* ════════════════════════════════════════
   BOT DETAIL PAGE STYLES
   ════════════════════════════════════════ */

/* Hero */
.bot-hero {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hero-row { display: flex; gap: 16px; align-items: flex-start; }
.hero-icon { font-size: 40px; line-height: 1; }
.hero-meta { flex: 1; }
.hero-name { font-size: 22px; font-weight: 700; color: var(--tv-text); }
.hero-bio { font-size: 13px; color: var(--tv-text-2); margin-top: 2px; }
.hero-strategy { font-size: 12px; color: var(--tv-text-3); margin-top: 4px; font-style: italic; }
.risk-meter { display: flex; align-items: center; gap: 8px; }
.risk-track { flex:1; height: 4px; background: var(--tv-surface-3); border-radius: 2px; overflow: hidden; max-width: 120px; }
.risk-fill { height: 100%; border-radius: 2px; }
.risk-text { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tv-text-2); }

/* Metrics row */
.metrics-row { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); 
  gap: 8px; 
  margin-top: 20px; 
  padding-top: 16px; 
  border-top: 1px solid var(--tv-border); 
}
.metric { }
.metric-lbl { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--tv-text-2); margin-bottom: 2px; }
.metric-val { font-size: 16px; font-weight: 700; font-family: var(--tv-mono); color: var(--tv-text); }
.metric-val .profit { color: var(--tv-green); }
.metric-val .loss { color: var(--tv-red); }

/* Outlook / Latest Thinking */
.outlook {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-left: 3px solid var(--bot-color, var(--tv-blue));
  border-radius: var(--tv-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tv-text-2);
}
.outlook-lbl {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--tv-text-3); margin-bottom: 6px;
}

/* Session Card */
.session-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.session-header { 
  display: flex; align-items: center; justify-content: space-between; 
  margin-bottom: 14px; 
}
.session-title { font-size: 13px; font-weight: 600; color: var(--tv-text); }
.session-time { font-size: 11px; color: var(--tv-text-3); font-family: var(--tv-mono); }
.session-block { margin-bottom: 12px; }
.session-block:last-child { margin-bottom: 0; }
.session-block-lbl { 
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--tv-text-3); margin-bottom: 6px; 
}
.condition-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 3px;
  background: var(--tv-surface-2); color: var(--tv-text-2); border: 1px solid var(--tv-border-2);
}
.chip.fear { background: rgba(242,54,69,0.1); color: var(--tv-red); border-color: rgba(242,54,69,0.2); }
.chip.greed { background: rgba(8,153,129,0.1); color: var(--tv-green); border-color: rgba(8,153,129,0.2); }
.chip.up { color: var(--tv-green); }
.chip.down { color: var(--tv-red); }
.movers-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mover-chip {
  font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 2px;
  font-family: var(--tv-mono);
}
.mover-chip.up { color: var(--tv-green); }
.mover-chip.down { color: var(--tv-red); }
.mover-chip.flat { color: var(--tv-text-3); }
.session-news { list-style: none; padding: 0; }
.session-news li {
  position: relative; padding: 4px 0 4px 14px;
  font-size: 12px; color: var(--tv-text-2); line-height: 1.5;
}
.session-news li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--tv-text-3);
}
.domain-extra {
  background: var(--tv-surface-2); border-radius: var(--tv-radius-sm);
  padding: 10px 12px; font-size: 12px; line-height: 1.5; color: var(--tv-text-2);
}
.ai-reasoning {
  background: rgba(41,98,255,0.05); border-left: 2px solid var(--bot-color, var(--tv-blue));
  border-radius: var(--tv-radius-sm); padding: 10px 12px;
  font-size: 12px; line-height: 1.6; color: var(--tv-text-2);
}
.session-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tv-border); }
.decision-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--tv-surface-2); color: var(--tv-text-3); border: 1px solid var(--tv-border-2);
}
.decision-badge.traded { background: rgba(8,153,129,0.1); color: var(--tv-green); border-color: rgba(8,153,129,0.2); }

/* ── Specs grid ── */
.spec-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.spec-card-title {
  font-size: 14px; font-weight: 600; color: var(--tv-text); margin-bottom: 14px;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--tv-border);
  border-radius: var(--tv-radius-sm);
  overflow: hidden;
}
.spec-item {
  background: var(--tv-surface-2);
  padding: 10px 12px;
}
.spec-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--tv-text-3); margin-bottom: 4px; }
.spec-val { font-size: 13px; font-weight: 600; color: var(--tv-text); }
.spec-sub { font-size: 11px; color: var(--tv-text-2); margin-top: 2px; }
.fallback-sub { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--tv-border); }

/* Badges */
.badge {
  display: inline-block; font-size: 9px; font-weight: 600; text-transform: uppercase;
  padding: 1px 6px; border-radius: 2px; letter-spacing: .03em;
}
.badge-free { background: rgba(8,153,129,0.12); color: var(--tv-green); border: 1px solid rgba(8,153,129,0.2); }
.badge-fallback { background: rgba(255,152,0,0.12); color: var(--tv-yellow); border: 1px solid rgba(255,152,0,0.2); }
.badge-buy { background: rgba(8,153,129,0.12); color: var(--tv-green); border: 1px solid rgba(8,153,129,0.25); padding: 2px 8px; font-size: 10px; }
.badge-sell { background: rgba(242,54,69,0.12); color: var(--tv-red); border: 1px solid rgba(242,54,69,0.25); padding: 2px 8px; font-size: 10px; }

/* ── Follow Guide ── */
.follow-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 18px;
  margin-bottom: 12px;
}
.follow-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.follow-step {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--tv-text-2); line-height: 1.5;
}
.follow-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--tv-surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--tv-text-2); flex-shrink: 0;
}
.follow-warning {
  background: rgba(242,54,69,0.06); border: 1px solid rgba(242,54,69,0.15);
  border-radius: var(--tv-radius-sm); padding: 10px 12px;
  font-size: 11px; color: var(--tv-text-2); line-height: 1.5;
}

/* ── Table ── */
.table-wrap {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  overflow-x: auto;
  margin-bottom: 12px;
}
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .05em; color: var(--tv-text-2);
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--tv-border);
  background: var(--tv-surface-2);
  white-space: nowrap;
}
.table-wrap td {
  font-size: 12px; color: var(--tv-text);
  padding: 10px 12px;
  border-bottom: 1px solid var(--tv-border);
  font-family: var(--tv-mono);
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: var(--tv-surface-2); }
.profit { color: var(--tv-green); }
.loss { color: var(--tv-red); }

/* ── Chart wrap (detail page) ── */
.chart-wrap {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.chart-wrap canvas { width: 100% !important; height: 280px !important; }

/* ── Ticker chips ── */
.ticker-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ticker-chip { 
  font-size: 11px; font-family: var(--tv-mono); padding: 3px 10px; 
  border-radius: 3px; background: var(--tv-surface-2); color: var(--tv-blue); 
  text-decoration: none; border: 1px solid var(--tv-border-2); 
}
.ticker-chip:hover { background: var(--tv-border-2); }

/* ── Signal context chips ── */
.signal-ctx { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.ctx-item { 
  font-size: 9px; padding: 1px 5px; border-radius: 2px; 
  font-weight: 500; background: var(--tv-surface-2); color: var(--tv-text-3); 
  border: 1px solid var(--tv-border-2);
}
.ctx-up { color: var(--tv-green); }
.ctx-down { color: var(--tv-red); }

/* ── Back link ── */
.back-link { font-size: 12px; color: var(--tv-blue); text-decoration: none; display: inline-block; margin-bottom: 8px; }
.back-link:hover { text-decoration: underline; }

/* ── Live indicator ── */
.live { 
  width: 6px; height: 6px; border-radius: 50%; background: var(--tv-green); 
  display: inline-block; margin-right: 4px; 
}

/* ── Records page buttons ── */
.filter-btn { 
  font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: var(--tv-radius-sm);
  border: 1px solid var(--tv-border); background: var(--tv-surface); 
  color: var(--tv-text-2); cursor: pointer; transition: all .15s;
  font-family: var(--tv-font);
}
.filter-btn:hover { background: var(--tv-surface-2); color: var(--tv-text); }
.filter-btn.active { background: var(--tv-blue); color: #fff; border-color: var(--tv-blue); }

/* ════════════════════════════════════════
   Dashboard 3-Panel Layout (Homepage)
   ════════════════════════════════════════ */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-panel {
  background: var(--tv-surface);
  border: 1px solid var(--tv-border);
  border-radius: var(--tv-radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-panel-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tv-text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tv-border);
}

/* ── Market Sentinel Signal Card ── */

.signal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--tv-surface-2);
  border-radius: var(--tv-radius-sm);
  border: 1px solid var(--tv-border-2);
}

.signal-direction {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--tv-mono);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.signal-direction.up {
  color: var(--tv-green);
}

.signal-direction.down {
  color: var(--tv-red);
}

.signal-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tv-text-3);
}

/* ── Accuracy History ── */

.accuracy-bar {
  height: 4px;
  background: var(--tv-surface-3);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.accuracy-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s;
}

.accuracy-bar-fill.green { background: var(--tv-green); }
.accuracy-bar-fill.red { background: var(--tv-red); }
.accuracy-bar-fill.yellow { background: var(--tv-yellow); }

.accuracy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--tv-border);
}

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

.accuracy-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--tv-text-2);
  font-family: var(--tv-mono);
}

.accuracy-result {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--tv-mono);
}

.accuracy-result.correct { color: var(--tv-green); }
.accuracy-result.wrong { color: var(--tv-red); }

.accuracy-stats {
  display: flex;
  gap: 12px;
  padding-top: 6px;
}

.accuracy-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.accuracy-stat-val {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--tv-mono);
  color: var(--tv-text);
}

.accuracy-stat-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tv-text-3);
}

/* ── Polymarket Deal Card ── */

.poly-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--tv-surface-2);
  border: 1px solid var(--tv-border-2);
  border-radius: var(--tv-radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}

.poly-card:hover { background: var(--tv-surface-3); }

.poly-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--tv-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poly-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poly-odds {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--tv-mono);
  color: var(--tv-green);
  padding: 2px 8px;
  background: rgba(8,153,129,0.1);
  border: 1px solid rgba(8,153,129,0.2);
  border-radius: 3px;
}

.poly-volume {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--tv-mono);
  color: var(--tv-text-2);
}

.poly-expiry {
  font-size: 9px;
  font-weight: 500;
  color: var(--tv-text-3);
}

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

/* ── Trading Arena Leaderboard (within panel) ── */

.panel-leader-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--tv-surface-2);
  border-radius: var(--tv-radius-sm);
  border: 1px solid var(--tv-border-2);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}

.panel-leader-row:hover { background: var(--tv-surface-3); }

.panel-leader-rank {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--tv-mono);
  color: var(--tv-text-3);
  text-align: center;
}

.panel-leader-rank.gold { color: var(--tv-yellow); }
.panel-leader-rank.silver { color: #c0c0c0; }
.panel-leader-rank.bronze { color: #cd7f32; }

.panel-leader-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--tv-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-leader-pnl {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--tv-mono);
  text-align: right;
}

.panel-leader-pnl.profit { color: var(--tv-green); }
.panel-leader-pnl.loss { color: var(--tv-red); }

.panel-leader-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Panel status / empty / error ── */

.panel-empty {
  text-align: center;
  padding: 20px 10px;
  font-size: 12px;
  color: var(--tv-text-3);
}

.panel-error {
  text-align: center;
  padding: 14px 10px;
  font-size: 11px;
  color: var(--tv-red);
  background: rgba(242,54,69,0.06);
  border: 1px solid rgba(242,54,69,0.15);
  border-radius: var(--tv-radius-sm);
}

.panel-loading {
  text-align: center;
  padding: 20px 10px;
  font-size: 11px;
  color: var(--tv-text-3);
}

.panel-loading::after {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  margin-left: 6px;
  border: 2px solid var(--tv-text-3);
  border-top-color: var(--tv-blue);
  border-radius: 50%;
  animation: panel-spin .8s linear infinite;
  vertical-align: middle;
}

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

/* ── Dashboard Responsive ── */
@media (max-width:900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Mobile tweaks ── */
@media (max-width:900px){
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .dist-row { grid-template-columns: 1fr; }
  .bot-card { grid-template-columns: 30px 28px 1fr 100px; }
  .bot-today-col, .bot-arrow { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* Mobile nav */
  .topbar-inner { gap: 2px; padding: 0 10px; }
  .logo { font-size: 13px; margin-right: 8px; }
  .nav-link { font-size: 11px; padding: 4px 6px; }
}
@media (max-width:600px){
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .metrics-row { grid-template-columns: repeat(2,1fr); }
}
