/* ═══════════════════════════════════════════
   BLOOMBERG TERMINAL — Design Tokens
   Palette: Bloomberg Orange (#FF6B00) on deep charcoal
═══════════════════════════════════════════ */

:root {
  --text-xs:   clamp(0.625rem, 0.6rem + 0.15vw, 0.75rem);
  --text-sm:   clamp(0.75rem,  0.7rem + 0.2vw,  0.875rem);
  --text-base: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --text-lg:   clamp(1rem,     0.9rem + 0.4vw, 1.25rem);
  --text-xl:   clamp(1.25rem,  1rem   + 0.8vw, 1.75rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Bloomberg Dark Theme */
  --bg:             #0a0a0a;
  --surface:        #111111;
  --surface-2:      #161616;
  --surface-3:      #1c1c1c;
  --border:         #2a2a2a;
  --border-bright:  #3a3a3a;
  --text:           #d4d0c8;
  --text-muted:     #7a776f;
  --text-faint:     #3d3b38;
  --text-dim:       #5a5751;

  /* Bloomberg Brand */
  --orange:         #FF6B00;
  --orange-light:   #FF8A30;
  --orange-dim:     #cc5600;

  /* Market colors */
  --up:             #00d964;
  --up-bg:          #001f0e;
  --down:           #ff3b3b;
  --down-bg:        #1f0000;
  --neutral:        #7a776f;

  /* Accent blues */
  --blue:           #4a9eff;
  --blue-dim:       #1a3a5c;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-ui:   'IBM Plex Sans', 'Helvetica Neue', sans-serif;

  --radius-sm: 2px;
  --radius-md: 3px;
  --transition: 120ms ease;

  --sidebar-width: 180px;
  --header-height: 36px;
  --status-height: 24px;
}

[data-theme="light"] {
  --bg:             #f0ede6;
  --surface:        #f7f4ed;
  --surface-2:      #faf8f3;
  --surface-3:      #fffdf8;
  --border:         #d4cfc4;
  --border-bright:  #bfb9ae;
  --text:           #1a1814;
  --text-muted:     #6a665e;
  --text-faint:     #c8c4bc;
  --text-dim:       #9a968e;
  --up:             #007a2b;
  --up-bg:          #e8f5ee;
  --down:           #c41010;
  --down-bg:        #fbe8e8;
  --neutral:        #6a665e;
  --blue:           #1a5faa;
  --blue-dim:       #d0e4f5;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
}

button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── LAYOUT ─── */
.terminal {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100dvh;
  overflow: hidden;
}

.main-area {
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--status-height);
  overflow: hidden;
}

/* ─── SIDEBAR ─── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.logo-svg { width: 26px; height: 26px; flex-shrink: 0; }

.logo-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.12em;
}

.sidebar-search {
  display: flex;
  gap: 0;
  padding: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.sidebar-search input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: none;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--text);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  outline: none;
  font-family: var(--font-mono);
  min-width: 0;
}

.sidebar-search input:focus { border-color: var(--orange); }
.sidebar-search input::placeholder { color: var(--text-dim); }

.search-go {
  background: var(--orange);
  color: #000;
  font-weight: 700;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  letter-spacing: 0.05em;
  transition: background var(--transition);
}
.search-go:hover { background: var(--orange-light); }

.sidebar-nav {
  padding: var(--space-2) 0;
  flex-shrink: 0;
}

.nav-section-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.12em;
  padding: var(--space-2) var(--space-3) var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  border-left-color: var(--orange);
}

.nav-icon { font-size: 10px; width: 12px; display: inline-block; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-2) 0;
}

.sidebar-watchlist {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.watchlist-mini {
  padding: 0 var(--space-2) var(--space-2);
}

.wm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
  margin-bottom: 1px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.wm-item:hover { background: var(--surface-3); }

.wm-sym {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.06em;
}

.wm-price {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums lining-nums;
}

.wm-chg { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.wm-chg.up { color: var(--up); }
.wm-chg.down { color: var(--down); }

.sidebar-bottom {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.clock-display {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.market-status {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

/* ─── HEADER ─── */
.terminal-header {
  background: var(--bg);
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.header-ticker-tape {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.tape-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  animation: scroll-tape 60s linear infinite;
  white-space: nowrap;
  padding-right: var(--space-8);
}

.tape-inner:hover { animation-play-state: paused; }

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

.tape-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.tape-sym {
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.tape-price { font-variant-numeric: tabular-nums; }
.tape-change { font-variant-numeric: tabular-nums; }
.tape-change.up { color: var(--up); }
.tape-change.down { color: var(--down); }
.tape-sep { color: var(--border-bright); }
.tape-loading { font-size: var(--text-xs); color: var(--text-dim); padding: 0 var(--space-4); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  height: 100%;
  background: var(--surface);
}

.header-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--orange);
  font-weight: 700;
}

.btn-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color var(--transition), background var(--transition);
  border: 1px solid transparent;
}
.btn-icon:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }

/* ─── CONTENT GRID ─── */
.content-grid {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--bg);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.panel-full { display: flex; flex-direction: column; gap: var(--space-2); }
.panel-full.hidden { display: none !important; }

/* ─── PANEL BOX ─── */
.panel-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  min-height: 32px;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.panel-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange);
  text-transform: uppercase;
}

.panel-badge {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.live-badge { color: var(--up); }

.panel-hint {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ─── KPI ROW ─── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-2);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  border-radius: var(--radius-sm);
}

.kpi-card:hover {
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 5%, var(--surface));
}

.kpi-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-1);
  white-space: nowrap;
}

.kpi-value {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
  white-space: nowrap;
  margin-bottom: 2px;
}

.kpi-delta {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.kpi-delta.up { color: var(--up); }
.kpi-delta.down { color: var(--down); }
.kpi-delta.neutral { color: var(--text-dim); }

/* ─── MIDDLE ROW ─── */
.middle-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2);
  min-height: 360px;
}

/* ─── CHART PANEL ─── */
.chart-panel {
  display: flex;
  flex-direction: column;
}

.chart-controls {
  display: flex;
  gap: 2px;
}

.chart-btn {
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition: all var(--transition);
  background: transparent;
  font-family: var(--font-mono);
}
.chart-btn:hover { color: var(--text); border-color: var(--border-bright); }
.chart-btn.active { background: var(--orange); color: #000; border-color: var(--orange); font-weight: 700; }

.chart-price-info {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--surface-2);
}

.chart-price {
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.chart-change {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.chart-volume {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.tv-chart-container {
  flex: 1;
  min-height: 280px;
}

/* ─── MARKET TABLE ─── */
.market-table-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-group {
  display: flex;
  gap: 1px;
}

.tab-btn {
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  font-family: var(--font-mono);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

.market-table-wrapper {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.market-table {
  font-size: var(--text-xs);
}

.market-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  padding: var(--space-2) var(--space-2);
  text-align: right;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}

.market-table th:first-child { text-align: left; }

.market-table td {
  padding: var(--space-1) var(--space-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--border);
}

.market-table td:first-child { text-align: left; }

.market-table tr:hover td { background: var(--surface-2); cursor: pointer; }

.sym-cell {
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.06em;
}

.table-loading {
  text-align: center !important;
  color: var(--text-dim);
  padding: var(--space-6) !important;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

/* ─── BOTTOM ROW ─── */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 240px 200px;
  gap: var(--space-2);
  min-height: 200px;
}

/* ─── NEWS ─── */
.news-feed {
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 220px;
  padding: var(--space-2) var(--space-3);
}

.news-item {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: color-mix(in srgb, var(--orange) 4%, transparent); }

.news-time {
  font-size: var(--text-xs);
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
}

.news-headline {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.news-headline strong {
  color: var(--text);
  font-weight: 500;
}

.news-loading {
  font-size: var(--text-xs);
  color: var(--text-dim);
  padding: var(--space-4);
  text-align: center;
  letter-spacing: 0.06em;
}

/* ─── SECTOR GRID ─── */
.sector-grid {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sector-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px 0;
}

.sector-name {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.04em;
}

.sector-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--surface-3);
  border-radius: 1px;
  overflow: hidden;
}

.sector-bar {
  height: 100%;
  border-radius: 1px;
  transition: width 0.5s ease;
}

.sector-pct {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── YIELDS ─── */
.yields-list {
  padding: var(--space-2) var(--space-3);
}

.yield-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}

.yield-term {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.yield-rate {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.yield-change {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  width: 50px;
  text-align: right;
}

.yield-curve-canvas {
  padding: 4px var(--space-2);
  max-height: 72px;
  min-height: 60px;
}

/* ─── STATUS BAR ─── */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-top: 1px solid var(--orange);
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.06em;
  overflow: hidden;
  gap: var(--space-4);
}

.status-ticker {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  flex: 1;
  letter-spacing: 0.06em;
}

.pplx-link {
  color: var(--text-dim);
  white-space: nowrap;
  transition: color var(--transition);
}
.pplx-link:hover { color: var(--orange); }

/* ─── EQUITIES TABLE ─── */
.equities-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-2);
  gap: var(--space-3);
}

.equity-search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--text);
  font-family: var(--font-mono);
  outline: none;
}
.equity-search-input:focus { border-color: var(--orange); }
.equity-search-input::placeholder { color: var(--text-dim); }

.equities-table-wrapper {
  overflow: auto;
  overscroll-behavior: contain;
  max-height: calc(100dvh - 220px);
}

.full-table {
  font-size: var(--text-xs);
}

.full-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  padding: var(--space-2) var(--space-2);
  text-align: right;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  z-index: 2;
  cursor: default;
  white-space: nowrap;
}

.full-table th:first-child,
.full-table th:nth-child(2) { text-align: left; }

.full-table th.sortable { cursor: pointer; }
.full-table th.sortable:hover { color: var(--orange); }

.full-table td {
  padding: var(--space-1) var(--space-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.full-table td:first-child,
.full-table td:nth-child(2) { text-align: left; }

.full-table tr:hover td { background: var(--surface-2); }

.up { color: var(--up); }
.down { color: var(--down); }
.neutral-color { color: var(--neutral); }

.btn-primary {
  background: var(--orange);
  color: #000;
  font-weight: 700;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  transition: background var(--transition);
  font-family: var(--font-mono);
}
.btn-primary:hover { background: var(--orange-light); }

.btn-small {
  font-size: var(--text-xs);
  padding: 1px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: all var(--transition);
  font-family: var(--font-mono);
}
.btn-small:hover { color: var(--orange); border-color: var(--orange); }

.btn-del {
  font-size: var(--text-xs);
  color: var(--down);
  transition: color var(--transition);
}
.btn-del:hover { color: var(--orange); }

/* ─── FULL CHART ─── */
.chart-panel-full {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 130px);
}

.full-chart-stats {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

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

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.stat-val {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.full-chart-container {
  flex: 1;
  min-height: 0;
}

/* ─── NEWS FULL ─── */
.news-full-panel {
  min-height: calc(100dvh - 130px);
  display: flex;
  flex-direction: column;
}

.news-full-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.news-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.news-card:hover {
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 4%, var(--surface-2));
}

.news-card-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

.news-card-source {
  font-size: var(--text-xs);
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.news-card-time {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.news-card-headline {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.4;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.news-card-summary {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── MACRO ─── */
.macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-2);
  padding: var(--space-2);
}

.macro-card {
  display: flex;
  flex-direction: column;
}

.yields-table {
  padding: var(--space-2) var(--space-3);
}

.fx-grid {
  padding: var(--space-2) var(--space-3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.fx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.fx-pair { font-size: var(--text-xs); color: var(--text-muted); letter-spacing: 0.08em; }
.fx-rate { font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-chg  { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

.commodities-grid {
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.commodity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
}

.commodity-name { font-size: var(--text-xs); color: var(--text-muted); letter-spacing: 0.06em; }
.commodity-price { font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.commodity-chg { font-size: var(--text-xs); font-variant-numeric: tabular-nums; width: 60px; text-align: right; }

.crypto-grid {
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.crypto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.crypto-name  { font-size: var(--text-xs); color: var(--orange); font-weight: 600; letter-spacing: 0.08em; }
.crypto-price { font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.crypto-chg   { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

/* ─── WATCHLIST PANEL ─── */
.watchlist-panel {
  min-height: calc(100dvh - 130px);
  display: flex;
  flex-direction: column;
}

.watchlist-table-wrapper {
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
}

/* ─── SPARKLINE CELL ─── */
.sparkline-cell canvas { display: inline-block; }

/* ─── SCROLLBARS ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── LOADING PULSE ─── */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
.loading-pulse { animation: pulse 1.5s infinite; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  :root { --sidebar-width: 44px; }
  .logo-text, .nav-item span:last-child, .sidebar-watchlist,
  .nav-section-label, .sidebar-search, .clock-display, .market-status { display: none; }
  .nav-icon { width: auto; }
  .sidebar { align-items: center; }
  .nav-item { justify-content: center; padding: var(--space-2); }
  .kpi-row { grid-template-columns: repeat(4, 1fr); }
  .middle-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
  .macro-grid { grid-template-columns: 1fr; }
  .news-full-grid { grid-template-columns: 1fr; }
}
