/* ============================================
   BHARAT ECONOMY DASHBOARD — STYLES
   Theme: Claude API Dashboard (Dark Navy + Violet)
   Fonts: Inter (all weights)
   ============================================ */

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

:root {
  /* Backgrounds */
  --bg-base:        #0a0a0f;
  --bg-surface:     #0f0f17;
  --bg-card:        #13131e;
  --bg-card2:       #16162a;
  --bg-hover:       #1a1a2e;
  --bg-input:       #1c1c2e;

  /* Borders */
  --border:         #1e1e32;
  --border-light:   #2a2a45;
  --border-focus:   #6b5ce7;

  /* Accent — Claude violet/purple */
  --accent:         #8b5cf6;
  --accent-bright:  #a78bfa;
  --accent-dim:     #6d4fc7;
  --accent-glow:    rgba(139, 92, 246, 0.15);
  --accent-glow2:   rgba(139, 92, 246, 0.06);
  --accent-border:  rgba(139, 92, 246, 0.3);

  /* Secondary accent — warm copper */
  --copper:         #f59e0b;
  --copper-dim:     rgba(245, 158, 11, 0.12);

  /* India flag colors (subtle use) */
  --saffron:        #FF9933;
  --india-green:    #138808;

  /* Semantic */
  --up:             #34d399;
  --up-bg:          rgba(52, 211, 153, 0.1);
  --up-border:      rgba(52, 211, 153, 0.25);
  --down:           #f87171;
  --down-bg:        rgba(248, 113, 113, 0.1);
  --down-border:    rgba(248, 113, 113, 0.25);
  --neutral:        #fbbf24;
  --neutral-bg:     rgba(251, 191, 36, 0.1);
  --neutral-border: rgba(251, 191, 36, 0.25);

  /* Text */
  --text-primary:   #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted:     #4a4a6a;
  --text-accent:    #a78bfa;

  /* Radius */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.flag-badge {
  display: flex;
  flex-direction: column;
  width: 24px;
  height: 17px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.flag-stripe { flex: 1; }
.flag-stripe.top { background: #FF9933; }
.flag-stripe.mid { background: #f0f0f0; }
.flag-stripe.bot { background: #138808; }

.site-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.site-title span {
  color: var(--accent-bright);
}

.site-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--up);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
}

.pulse {
  width: 6px;
  height: 6px;
  background: var(--up);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

.header-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.header-rank {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.rank-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1;
}
.rank-label {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════
   TICKER
══════════════════════════════════════════ */
.ticker-wrap {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 45s linear infinite;
  will-change: transform;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 24px;
  font-size: 11.5px;
  font-weight: 500;
  border-right: 1px solid var(--border);
  height: 34px;
  font-variant-numeric: tabular-nums;
}

.ticker-item .t-label { color: var(--text-muted); font-weight: 400; font-size: 10.5px; }
.ticker-item .t-val   { color: var(--text-primary); }
.ticker-item .t-chg.up   { color: var(--up); }
.ticker-item .t-chg.down { color: var(--down); }

/* ══════════════════════════════════════════
   TOP NAV
══════════════════════════════════════════ */
.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  height: 44px;
  position: sticky;
  top: 56px;
  z-index: 190;
  overflow-x: auto;
}

.top-nav::-webkit-scrollbar { height: 0; }

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.nav-tab.active {
  color: var(--text-primary);
  background: var(--accent-glow2);
}

.nav-tab.active::after { opacity: 1; }

.nav-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav-icon { font-size: 13px; }

/* ══════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════ */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ══════════════════════════════════════════
   SHARED CARD
══════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.card-title .ct-icon {
  width: 26px;
  height: 26px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

/* ══════════════════════════════════════════
   KPI CARDS
══════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
  animation: fadeInUp 0.4s ease both;
}

.kpi-card:nth-child(1) { animation-delay: 0.04s; }
.kpi-card:nth-child(2) { animation-delay: 0.08s; }
.kpi-card:nth-child(3) { animation-delay: 0.12s; }
.kpi-card:nth-child(4) { animation-delay: 0.16s; }
.kpi-card:nth-child(5) { animation-delay: 0.20s; }
.kpi-card:nth-child(6) { animation-delay: 0.24s; }

.kpi-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

.kpi-icon {
  font-size: 18px;
  line-height: 1;
}

.kpi-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

.kpi-change {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kpi-change.up   { color: var(--up); }
.kpi-change.down { color: var(--down); }

.kpi-sparkline-wrap {
  height: 32px;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   CHARTS ROW
══════════════════════════════════════════ */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.28s;
}

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

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 220px;
}

.donut-wrap {
  min-height: 190px;
  max-height: 190px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

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

.legend-pct {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════
   BOTTOM ROW
══════════════════════════════════════════ */
.bottom-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.title-accent { font-size: 15px; }

/* ── IMPACT CARD ── */
.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.32s;
}

.impact-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.impact-timeline::before {
  content: '';
  position: absolute;
  left: 62px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.2;
}

.impact-item {
  display: grid;
  grid-template-columns: 54px 58px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.impact-item:last-child { border-bottom: none; }

.impact-item:hover {
  background: var(--accent-glow2);
  border-color: transparent;
}

.impact-year {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 3px;
}

.impact-rate {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.impact-rate.crash    { color: var(--down);    background: var(--down-bg);    border: 1px solid var(--down-border); }
.impact-rate.boom     { color: var(--up);      background: var(--up-bg);      border: 1px solid var(--up-border); }
.impact-rate.moderate { color: var(--neutral); background: var(--neutral-bg); border: 1px solid var(--neutral-border); }

.impact-content h3 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.impact-content p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 7px;
}

.impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.tag.green  { background: var(--up-bg);      color: var(--up);      border: 1px solid var(--up-border); }
.tag.red    { background: var(--down-bg);     color: var(--down);    border: 1px solid var(--down-border); }
.tag.yellow { background: var(--neutral-bg);  color: var(--neutral); border: 1px solid var(--neutral-border); }

/* ── NEWS CARD ── */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.36s;
}

.news-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.news-item {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: var(--radius-xs);
}

.news-item:last-child { border-bottom: none; }

.news-item:hover {
  background: rgba(255,255,255,0.03);
  padding-left: 10px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}

.news-cat {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.news-cat.growth    { background: var(--up-bg);                      color: var(--up); }
.news-cat.inflation { background: var(--neutral-bg);                  color: var(--neutral); }
.news-cat.trade     { background: rgba(99,102,241,0.12);              color: #818CF8; }
.news-cat.policy    { background: var(--accent-glow);                 color: var(--accent-bright); }
.news-cat.market    { background: rgba(14,165,233,0.12);              color: #38BDF8; }

.news-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.news-headline {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 2px;
}

.news-snippet {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.news-source {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   SECTOR BARS
══════════════════════════════════════════ */
.sector-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.40s;
}

.sector-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 4px;
}

.sector-bar-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

.sector-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sector-pct {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sector-track {
  height: 5px;
  background: var(--bg-base);
  border-radius: 3px;
  overflow: hidden;
}

.sector-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.sector-gdp-share {
  font-size: 10px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   GLOBAL COMPARISON
══════════════════════════════════════════ */
.global-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.44s;
}

.global-chart-wrap {
  min-height: 260px;
}

/* ══════════════════════════════════════════
   MARKET CAP TAB
══════════════════════════════════════════ */
#marketcapPanel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cap-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s;
}

.cap-kpi-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.cap-kpi-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.cap-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cap-kpi-change {
  font-size: 11px;
  font-weight: 500;
}
.cap-kpi-change.up   { color: var(--up); }
.cap-kpi-change.down { color: var(--down); }

.cap-charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.cap-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.cap-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cap-chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cap-chart-wrap { min-height: 240px; }
.cap-donut-wrap { min-height: 200px; max-height: 200px; }

.cap-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}

.top-stocks-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.top-stocks-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stock-item {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.stock-item:last-child { border-bottom: none; }
.stock-item:hover { background: rgba(255,255,255,0.03); }

.stock-rank {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.stock-info { display: flex; flex-direction: column; gap: 1px; }

.stock-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.stock-sector {
  font-size: 10px;
  color: var(--text-muted);
}

.stock-cap {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stock-chg {
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}
.stock-chg.up   { color: var(--up); }
.stock-chg.down { color: var(--down); }

.sector-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.sector-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

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

.sector-card-icon {
  font-size: 18px;
}

.sector-card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.sector-card-cap {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sector-card-bar-track {
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}

.sector-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.sector-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
}

.sector-card-players {
  font-size: 10.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cap-growth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cap-growth-wrap { min-height: 220px; }

/* ══════════════════════════════════════════
   TRADE BALANCE TAB
══════════════════════════════════════════ */
#tradePanel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trade-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.trade-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s;
}

.trade-kpi-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.trade-kpi-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.trade-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.trade-kpi-change {
  font-size: 11px;
  font-weight: 500;
}
.trade-kpi-change.up   { color: var(--up); }
.trade-kpi-change.down { color: var(--down); }
.trade-kpi-change.neutral { color: var(--neutral); }

.trade-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.trade-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.trade-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.trade-chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.trade-chart-wrap { min-height: 240px; }
.trade-donut-wrap { min-height: 200px; max-height: 200px; }

.trade-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.partners-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.partner-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.partner-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.partner-item:last-child { border-bottom: none; }
.partner-item:hover { background: rgba(255,255,255,0.03); }

.partner-flag { font-size: 18px; }

.partner-info { display: flex; flex-direction: column; gap: 1px; }

.partner-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.partner-type {
  font-size: 10px;
  color: var(--text-muted);
}

.partner-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.commodity-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

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

.commodity-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.commodity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.commodity-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.commodity-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.commodity-track {
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}

.commodity-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

/* ══════════════════════════════════════════
   INR EXCHANGE RATE TAB
══════════════════════════════════════════ */
#inrPanel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.inr-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s;
}

.inr-kpi-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.inr-kpi-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.inr-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.inr-kpi-change {
  font-size: 11px;
  font-weight: 500;
}
.inr-kpi-change.up      { color: var(--up); }
.inr-kpi-change.down    { color: var(--down); }
.inr-kpi-change.neutral { color: var(--neutral); }

.inr-main-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.inr-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.inr-chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.inr-chart-wrap { min-height: 260px; }

.inr-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.stress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stress-meter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

.stress-gauge-wrap {
  position: relative;
  width: 140px;
  height: 80px;
}

.stress-gauge-bg {
  width: 140px;
  height: 70px;
  border-radius: 70px 70px 0 0;
  background: conic-gradient(
    var(--up) 0deg 60deg,
    var(--neutral) 60deg 120deg,
    var(--down) 120deg 180deg
  );
  opacity: 0.25;
  position: absolute;
  bottom: 0;
}

.stress-gauge-fill {
  width: 140px;
  height: 70px;
  border-radius: 70px 70px 0 0;
  position: absolute;
  bottom: 0;
  overflow: hidden;
}

.stress-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 60px;
  background: var(--text-primary);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px 2px 0 0;
}

.stress-label {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stress-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.stress-status.low    { background: var(--up-bg);      color: var(--up);      border: 1px solid var(--up-border); }
.stress-status.medium { background: var(--neutral-bg);  color: var(--neutral); border: 1px solid var(--neutral-border); }
.stress-status.high   { background: var(--down-bg);     color: var(--down);    border: 1px solid var(--down-border); }

.rbi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.rbi-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rbi-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.rbi-item:last-child { border-bottom: none; }
.rbi-item:hover { background: rgba(255,255,255,0.03); }

.rbi-date {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.rbi-action {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
}

.rbi-action.hike { background: var(--down-bg);    color: var(--down);    border: 1px solid var(--down-border); }
.rbi-action.cut  { background: var(--up-bg);      color: var(--up);      border: 1px solid var(--up-border); }
.rbi-action.hold { background: var(--neutral-bg);  color: var(--neutral); border: 1px solid var(--neutral-border); }

.rbi-rate {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.inr-impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.impact-factor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.impact-factor {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.impact-factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.impact-factor-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.impact-factor-val {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.impact-factor-track {
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}

.impact-factor-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

/* ══════════════════════════════════════════
   STATE GDP TAB
══════════════════════════════════════════ */
#statePanel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.state-top-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
}

.state-map-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.india-map-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  position: relative;
}

.india-map-wrap svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
  justify-content: center;
}

.map-legend-gradient {
  width: 100px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #1e1e3a, #6d4fc7, #a78bfa);
}

.state-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.state-chart-wrap { min-height: 380px; }

.state-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.state-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.state-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.state-card.highlighted {
  border-color: var(--accent);
  background: var(--accent-glow2);
}

.state-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.state-card-gdp {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.state-card-share {
  font-size: 10.5px;
  color: var(--text-muted);
}

.state-card-bar-track {
  height: 3px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}

.state-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.state-card-growth {
  font-size: 11px;
  font-weight: 500;
}
.state-card-growth.up   { color: var(--up); }
.state-card-growth.down { color: var(--down); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-sep { margin: 0 5px; opacity: 0.4; }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .kpi-grid          { grid-template-columns: repeat(3, 1fr); }
  .cap-kpi-grid      { grid-template-columns: repeat(3, 1fr); }
  .trade-kpi-grid    { grid-template-columns: repeat(3, 1fr); }
  .inr-kpi-grid      { grid-template-columns: repeat(3, 1fr); }
  .charts-row        { grid-template-columns: 1fr; }
  .bottom-row        { grid-template-columns: 1fr; }
  .sector-bars       { grid-template-columns: repeat(2, 1fr); }
  .cap-charts-row    { grid-template-columns: 1fr; }
  .cap-bottom-row    { grid-template-columns: 1fr 1fr; }
  .sector-detail-grid{ grid-template-columns: repeat(2, 1fr); }
  .trade-charts-row  { grid-template-columns: 1fr; }
  .trade-bottom-row  { grid-template-columns: 1fr; }
  .inr-bottom-row    { grid-template-columns: 1fr 1fr; }
  .state-top-row     { grid-template-columns: 1fr; }
  .state-cards-grid  { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header            { padding: 0 16px; }
  .top-nav           { padding: 0 16px; }
  .main, #marketcapPanel, #tradePanel, #inrPanel, #statePanel { padding: 16px; gap: 14px; }
  .kpi-grid          { grid-template-columns: repeat(2, 1fr); }
  .cap-kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .trade-kpi-grid    { grid-template-columns: repeat(2, 1fr); }
  .inr-kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .sector-bars       { grid-template-columns: 1fr 1fr; }
  .cap-bottom-row    { grid-template-columns: 1fr; }
  .sector-detail-grid{ grid-template-columns: repeat(2, 1fr); }
  .inr-bottom-row    { grid-template-columns: 1fr; }
  .state-cards-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid          { grid-template-columns: 1fr 1fr; }
  .sector-bars       { grid-template-columns: 1fr; }
  .sector-detail-grid{ grid-template-columns: 1fr; }
  .state-cards-grid  { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   INVESTOR INTEL TAB
   ============================================================ */

.inv-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Top bar ── */
.inv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.inv-topbar-left { display: flex; flex-direction: column; gap: 3px; }
.inv-topbar-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.inv-topbar-sub   { font-size: 11px; color: var(--text-secondary); }
.inv-topbar-right { display: flex; align-items: center; gap: 10px; }
.inv-refresh-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--up);
  background: var(--up-bg); border: 1px solid var(--up-border);
  border-radius: 20px; padding: 4px 10px;
}
.inv-refresh-btn {
  background: var(--accent-glow); border: 1px solid var(--accent-border);
  color: var(--accent-bright); border-radius: var(--radius-sm);
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.inv-refresh-btn:hover { background: var(--accent); color: #fff; }

/* ── Sentiment card ── */
.inv-sentiment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  align-items: center;
}
.inv-sentiment-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 4px; }
.inv-sentiment-value { font-size: 20px; font-weight: 700; color: var(--up); margin-bottom: 4px; }
.inv-sentiment-sub   { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }

/* Fear & Greed meter */
.inv-fear-greed { width: 100%; }
.fg-track {
  position: relative; height: 10px; border-radius: 5px;
  background: linear-gradient(to right, #ef4444, #f97316, #fbbf24, #84cc16, #22c55e);
  margin-bottom: 6px;
}
.fg-fill { display: none; }
.fg-needle {
  position: absolute; top: -4px;
  width: 18px; height: 18px;
  background: #fff; border: 2px solid var(--bg-base);
  border-radius: 50%; transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(139,92,246,0.5);
  transition: left 1s ease;
}
.fg-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--text-muted);
  margin-bottom: 4px;
}
.fg-score { font-size: 13px; font-weight: 700; color: var(--text-primary); text-align: center; }
.fg-score span { font-weight: 400; color: var(--text-secondary); }

/* Macro pills */
.inv-macro-pills { display: flex; flex-direction: column; gap: 6px; }
.macro-pill {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px; min-width: 140px;
}
.mp-label { font-size: 10px; color: var(--text-secondary); }
.mp-val   { font-size: 12px; font-weight: 700; color: var(--text-primary); }

/* ── Section header ── */
.inv-section-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 4px 0;
}
.inv-section-icon  { font-size: 18px; }
.inv-section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.inv-section-sub   { font-size: 11px; color: var(--text-secondary); flex: 1; }
.inv-filter-row    { display: flex; gap: 6px; margin-left: auto; }
.inv-filter {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 20px;
  padding: 4px 12px; font-size: 11px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.inv-filter.active, .inv-filter:hover {
  background: var(--accent-glow); border-color: var(--accent-border);
  color: var(--accent-bright);
}

/* ── Sector opportunity grid ── */
.inv-sector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.inv-sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.25s; cursor: pointer;
  position: relative; overflow: hidden;
}
.inv-sector-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent));
}
.inv-sector-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.inv-sector-card.hidden { display: none; }

.isc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.isc-icon { font-size: 22px; }
.isc-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.isc-badge.strong_buy { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.isc-badge.buy        { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.isc-badge.hold       { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.isc-badge.avoid      { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

.isc-name  { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.isc-index { font-size: 10px; color: var(--text-secondary); }

/* Score ring */
.isc-score-row { display: flex; align-items: center; gap: 10px; }
.isc-score-ring {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--text-primary);
  background: conic-gradient(var(--ring-color, #8b5cf6) var(--ring-pct, 0%), #1e1e32 0%);
  position: relative;
}
.isc-score-ring::after {
  content: ''; position: absolute;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card);
}
.isc-score-num { position: relative; z-index: 1; }

.isc-score-details { flex: 1; }
.isc-score-label { font-size: 10px; color: var(--text-secondary); margin-bottom: 2px; }
.isc-score-bar-track {
  height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.isc-score-bar-fill {
  height: 100%; border-radius: 2px; width: 0;
  transition: width 1s ease; background: var(--card-accent, var(--accent));
}

/* Stats row */
.isc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.isc-stat { background: var(--bg-surface); border-radius: var(--radius-sm); padding: 6px 8px; }
.isc-stat-label { font-size: 9px; color: var(--text-muted); margin-bottom: 2px; }
.isc-stat-val   { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.isc-stat-val.up   { color: var(--up); }
.isc-stat-val.down { color: var(--down); }

/* Catalysts */
.isc-catalysts { display: flex; flex-wrap: wrap; gap: 4px; }
.isc-catalyst-tag {
  font-size: 9px; padding: 2px 7px; border-radius: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Top stocks */
.isc-stocks { font-size: 10px; color: var(--text-secondary); line-height: 1.6; }
.isc-stocks strong { color: var(--text-primary); }

/* ── Charts row ── */
.inv-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.inv-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.inv-chart-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px; gap: 10px;
}
.inv-chart-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.inv-chart-sub   { font-size: 11px; color: var(--text-secondary); }
.inv-chart-wrap  { position: relative; }

.inv-select {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 11px; cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* ── Bottom row ── */
.inv-bottom-row {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 14px;
}

/* Horizon card */
.inv-horizon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.inv-horizon-tabs { display: flex; gap: 6px; }
.inv-htab {
  flex: 1; background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: var(--radius-sm);
  padding: 6px 8px; font-size: 11px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.inv-htab.active, .inv-htab:hover {
  background: var(--accent-glow); border-color: var(--accent-border);
  color: var(--accent-bright);
}
.inv-horizon-list { display: flex; flex-direction: column; gap: 8px; }
.inv-horizon-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color 0.2s;
}
.inv-horizon-item:hover { border-color: var(--border-light); }
.inv-horizon-rank {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-glow); border: 1px solid var(--accent-border);
  color: var(--accent-bright); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inv-horizon-info { flex: 1; }
.inv-horizon-name   { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.inv-horizon-reason { font-size: 10px; color: var(--text-secondary); line-height: 1.4; }
.inv-horizon-ret {
  font-size: 12px; font-weight: 700; color: var(--up);
  white-space: nowrap;
}

/* ── Catalyst card ── */
.inv-catalyst-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.inv-live-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--up);
  background: var(--up-bg); border: 1px solid var(--up-border);
  border-radius: 20px; padding: 3px 10px; white-space: nowrap;
}
.inv-catalyst-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.catalyst-item {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s;
}
.catalyst-item:hover { border-color: var(--border-light); }
.catalyst-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.catalyst-sector-tag {
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
  background: var(--accent-glow); border: 1px solid var(--accent-border);
  color: var(--accent-bright);
}
.catalyst-impact {
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}
.catalyst-impact.positive { background: var(--up-bg); color: var(--up); border: 1px solid var(--up-border); }
.catalyst-impact.negative { background: var(--down-bg); color: var(--down); border: 1px solid var(--down-border); }
.catalyst-impact.neutral  { background: var(--neutral-bg); color: var(--neutral); border: 1px solid var(--neutral-border); }
.catalyst-headline { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.catalyst-detail   { font-size: 10px; color: var(--text-secondary); line-height: 1.5; }
.catalyst-date     { font-size: 9px; color: var(--text-muted); }

/* ══ SECTOR CARD INTERNALS (inv-* classes generated by JS) ══ */

/* Card header row */
.inv-card-header {
  display: flex; align-items: flex-start; gap: 10px;
}
.inv-sector-icon { font-size: 22px; flex-shrink: 0; }
.inv-sector-title { flex: 1; min-width: 0; }
.inv-sector-name {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.inv-sector-etf { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

/* Score ring */
.inv-score-ring {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--score-color, #8b5cf6) calc(var(--score-pct, 80) * 1%), #1e1e32 0%);
  position: relative;
}
.inv-score-ring::after {
  content: ''; position: absolute;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card);
}
.inv-score-num {
  position: relative; z-index: 1;
  font-size: 14px; font-weight: 800; color: var(--text-primary);
  line-height: 1;
}
.inv-score-lbl {
  position: relative; z-index: 1;
  font-size: 8px; color: var(--text-secondary); line-height: 1;
}

/* Rank badge */
.inv-rank-badge {
  font-size: 9px; font-weight: 800; padding: 2px 6px;
  border-radius: 10px; white-space: nowrap;
}
.inv-rank-badge.rank-1 { background: rgba(251,191,36,0.2); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }
.inv-rank-badge.rank-2 { background: rgba(148,163,184,0.2); color: #94a3b8; border: 1px solid rgba(148,163,184,0.4); }
.inv-rank-badge.rank-3 { background: rgba(180,120,60,0.2); color: #cd7f32; border: 1px solid rgba(180,120,60,0.4); }

/* Metrics row */
.inv-card-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.inv-metric {
  background: var(--bg-surface); border-radius: var(--radius-sm);
  padding: 6px 8px; display: flex; flex-direction: column; gap: 2px;
}
.inv-metric-val {
  font-size: 12px; font-weight: 700; color: var(--text-primary);
}
.inv-metric-val.up { color: var(--up); }
.inv-metric-val.down { color: var(--down); }
.inv-metric-lbl { font-size: 9px; color: var(--text-muted); }

/* Description */
.inv-card-desc {
  font-size: 11px; color: var(--text-secondary); line-height: 1.5;
}

/* Catalyst tags */
.inv-catalysts { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-catalyst-tag {
  font-size: 9px; padding: 2px 7px; border-radius: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Card footer */
.inv-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 2px;
}
.inv-horizon-tag {
  font-size: 10px; color: var(--text-secondary);
}

/* Recommendation badges */
.inv-rec-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap; letter-spacing: 0.04em;
}
.inv-rec-badge.strong-buy {
  background: rgba(52,211,153,0.15); color: #34d399;
  border: 1px solid rgba(52,211,153,0.35);
}
.inv-rec-badge.buy {
  background: rgba(139,92,246,0.15); color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.35);
}
.inv-rec-badge.accumulate {
  background: rgba(56,189,248,0.15); color: #38bdf8;
  border: 1px solid rgba(56,189,248,0.35);
}
.inv-rec-badge.hold {
  background: rgba(251,191,36,0.15); color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.35);
}
.inv-rec-badge.avoid {
  background: rgba(248,113,113,0.15); color: #f87171;
  border: 1px solid rgba(248,113,113,0.35);
}

/* Expanded card state */
.inv-sector-card.inv-card-expanded {
  border-color: var(--border-light);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ══ HORIZON LIST ITEMS ══ */
.inv-horizon-icon { font-size: 16px; flex-shrink: 0; }
.inv-horizon-info { flex: 1; min-width: 0; }
.inv-horizon-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.inv-horizon-meta { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }

/* ══ CATALYST FEED ITEMS (inv-feed-* generated by JS) ══ */
.inv-feed-item {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s;
}
.inv-feed-item:hover { border-color: var(--border-light); }
.inv-feed-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.inv-feed-tag {
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; white-space: nowrap;
}
.inv-feed-time { font-size: 9px; color: var(--text-muted); white-space: nowrap; }
.inv-feed-text { font-size: 12px; color: var(--text-primary); line-height: 1.5; }

/* ── Disclaimer ── */
.inv-disclaimer {
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 11px; color: var(--text-secondary); line-height: 1.6;
}
.inv-disclaimer strong { color: var(--neutral); }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .inv-sector-grid  { grid-template-columns: repeat(2, 1fr); }
  .inv-bottom-row   { grid-template-columns: 1fr; }
  .inv-catalyst-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .inv-wrap         { padding: 14px 16px; }
  .inv-sentiment-card { grid-template-columns: 1fr; }
  .inv-sector-grid  { grid-template-columns: 1fr; }
  .inv-charts-row   { grid-template-columns: 1fr; }
  .inv-catalyst-grid{ grid-template-columns: 1fr; }
}