/* ============================================================================
   TERMINAL DASHBOARD — Phase 3 (v4 — READABLE DENSITY)
   v3 was too dense. v4 bumps font sizes ~25% for readability while keeping
   sections tightly stacked (no empty gaps between Performance chart →
   Autonomous Agent → Event Impact → AI Briefing).
   PHASE-3 v2 LEGEND BELOW (kept for reference):
   Pushes the `/` portfolio dashboard hard toward the workspace look:
   single-row 10-column KPI strip, no extra empty space, consistent type
   sizes, hairline-only borders, tight panel chrome.

   Activated by `body.ix-bloomberg-tight`.
   ============================================================================ */

/* ── Page shell — tighter overall density ───────────────────────────────── */
body.ix-bloomberg-tight .db-main,
body.ix-bloomberg-tight .db-layout,
body.ix-bloomberg-tight .db-main-col {
  background: var(--bb-bg) !important;
}
/* Tighter content padding so the KPI strip + chart can claim more horizontal space */
body.ix-bloomberg-tight .db-main { padding: 6px !important; gap: 0 !important; }
body.ix-bloomberg-tight .db-main-col { padding: 0 !important; gap: 0 !important; }

/* ── Sidebar — narrower, denser ─────────────────────────────────────────── */
body.ix-bloomberg-tight .db-sidebar {
  background: var(--bb-bg-1) !important;
  border-right: 1px solid var(--bb-border) !important;
  padding: 0 !important;
  width: 220px !important;
  min-width: 220px !important;
}
body.ix-bloomberg-tight .db-sidebar-section {
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 8px 10px !important;
  background: transparent !important;
  margin-bottom: 0 !important;
}
body.ix-bloomberg-tight .db-sidebar-section:last-child { border-bottom: 0; }

body.ix-bloomberg-tight .db-sidebar-hdr {
  font-family: var(--bb-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--bb-text-3) !important;
  padding: 0 0 7px !important;
  margin-bottom: 5px !important;
  border-bottom: 1px solid var(--bb-border) !important;
}

body.ix-bloomberg-tight .db-sidebar-item {
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-size: 12px !important;
  color: var(--bb-text-2) !important;
  padding: 3px 6px !important;
  margin: 0 -6px !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.35;
}
body.ix-bloomberg-tight .db-sidebar-item:hover {
  background: rgba(217, 119, 87, 0.08) !important;
  color: var(--bb-text) !important;
}
body.ix-bloomberg-tight .db-sidebar-item.active-portfolio,
body.ix-bloomberg-tight .db-sidebar-item.active {
  background: rgba(217, 119, 87, 0.12) !important;
  color: var(--bb-amber) !important;
  border-left: 2px solid var(--bb-amber) !important;
  padding-left: 8px !important;
  margin-left: -6px !important;
}
body.ix-bloomberg-tight .db-sidebar-item span:last-child {
  font-family: var(--bb-mono) !important;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--bb-text-3);
}

/* Watchlist change tag */
body.ix-bloomberg-tight .db-wl-chg {
  font-family: var(--bb-mono) !important;
  font-variant-numeric: tabular-nums;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
}

/* Quick links collapsibles — tighter */
body.ix-bloomberg-tight .db-ql-section {
  margin: 2px 0 !important;
  border-bottom: 1px solid rgba(58,55,53,0.4);
  padding-bottom: 2px;
}
body.ix-bloomberg-tight .db-ql-section:last-child { border-bottom: 0; }
body.ix-bloomberg-tight .db-ql-hdr {
  font-family: var(--bb-mono) !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--bb-text-3) !important;
  padding: 4px 0 !important;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: color 0.12s;
}
body.ix-bloomberg-tight .db-ql-hdr:hover { color: var(--bb-amber) !important; }
body.ix-bloomberg-tight .db-ql-arrow {
  font-size: 13px !important;
  color: var(--bb-text-4);
  transition: transform 0.15s;
}
body.ix-bloomberg-tight .db-ql-hdr.collapsed .db-ql-arrow { transform: rotate(-90deg); }
body.ix-bloomberg-tight .db-ql-links { padding: 1px 0; }
body.ix-bloomberg-tight .db-ql-links.collapsed { display: none; }
body.ix-bloomberg-tight .db-ql-links .db-sidebar-item {
  font-size: 10px !important;
  padding: 2px 6px !important;
  color: var(--bb-text-3) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Hero KPI strip — 10 cells in ONE ROW (matches workspace top stat row).
   On narrower screens fall back gracefully to 5×2.
   ───────────────────────────────────────────────────────────────────────── */
body.ix-bloomberg-tight .db-stat-strip {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 0 !important;
  background: var(--bb-bg-1) !important;
  border: 1px solid var(--bb-border) !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: hidden;
}
@media (max-width: 1600px) {
  body.ix-bloomberg-tight .db-stat-strip { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 1100px) {
  body.ix-bloomberg-tight .db-stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 800px) {
  body.ix-bloomberg-tight .db-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

body.ix-bloomberg-tight .db-stat-cell {
  background: transparent !important;
  padding: 8px 10px !important;
  border-right: 1px solid var(--bb-border) !important;
  border-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0;
  overflow: visible;
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 0 !important;
}
body.ix-bloomberg-tight .db-stat-cell:hover {
  background: rgba(217, 119, 87, 0.06) !important;
}
body.ix-bloomberg-tight .db-stat-cell:last-child { border-right: 0 !important; }
@media (max-width: 1600px) {
  body.ix-bloomberg-tight .db-stat-cell:nth-child(5n) { border-right: 0 !important; }
  body.ix-bloomberg-tight .db-stat-cell:nth-child(n+1):nth-child(-n+5) { border-bottom: 1px solid var(--bb-border) !important; }
}
@media (max-width: 1100px) {
  body.ix-bloomberg-tight .db-stat-cell:nth-child(5n) { border-right: 1px solid var(--bb-border) !important; }
  body.ix-bloomberg-tight .db-stat-cell:nth-child(4n) { border-right: 0 !important; }
  body.ix-bloomberg-tight .db-stat-cell:nth-child(n+1):nth-child(-n+8) { border-bottom: 1px solid var(--bb-border) !important; }
}

body.ix-bloomberg-tight .db-stat-label {
  font-family: var(--bb-mono) !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--bb-text-4) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.1;
}
body.ix-bloomberg-tight .db-stat-value {
  font-family: var(--bb-mono) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  color: var(--bb-text) !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
body.ix-bloomberg-tight .db-stat-sub {
  font-family: var(--bb-mono) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.02em !important;
  color: var(--bb-text-3) !important;
  line-height: 1.15;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Account block in sidebar — match KPI tone, drop chunky amber tint */
body.ix-bloomberg-tight .db-sidebar-section:first-child[style*="rgba(217,119,87"],
body.ix-bloomberg-tight .db-sidebar-section[style*="rgba(217,119,87"] {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bb-border) !important;
  border-radius: 0 !important;
  padding: 8px 10px !important;
  margin-bottom: 0 !important;
}
body.ix-bloomberg-tight #sb-acct-label {
  font-size: 9px !important;
  letter-spacing: 0.16em !important;
  color: var(--bb-text-4) !important;
  margin-bottom: 2px !important;
}
body.ix-bloomberg-tight #sb-acct-value {
  font-size: 16px !important;
  letter-spacing: -0.2px !important;
  line-height: 1.1 !important;
  color: var(--bb-text) !important;
}
body.ix-bloomberg-tight #sb-acct-change {
  margin-top: 2px !important;
  font-size: 10.5px !important;
  gap: 6px !important;
}
body.ix-bloomberg-tight #sb-acct-change > span {
  font-size: 10.5px !important;
}
/* The 3-up GAIN / YIELD / BETA strip — compact mono labels */
body.ix-bloomberg-tight .db-sidebar-section[style*="rgba(217,119,87"] > div:last-child {
  margin-top: 6px !important;
  padding-top: 6px !important;
  border-top: 1px solid var(--bb-border) !important;
  font-size: 10px !important;
}
body.ix-bloomberg-tight .db-sidebar-section[style*="rgba(217,119,87"] > div:last-child > div {
  font-size: 10px !important;
}

/* ── Section panels — sections stack tightly with NO gap, only hairline
   dividers between them. v3 had 6px margin-bottom which made the sections
   look "floating" with empty space between. v4 removes the gap so each
   section's bottom border IS the next section's top border. */
body.ix-bloomberg-tight .db-section,
body.ix-bloomberg-tight .db-panel,
body.ix-bloomberg-tight .db-card,
body.ix-bloomberg-tight .db-glass,
body.ix-bloomberg-tight .db-chart-wrap,
body.ix-bloomberg-tight .db-ai-insight-card,
body.ix-bloomberg-tight .db-closable-widget {
  background: var(--bb-bg-1) !important;
  border: 1px solid var(--bb-border) !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  overflow: hidden;
}
/* Last section in the column gets its bottom border restored */
body.ix-bloomberg-tight .db-main-col > *:last-child,
body.ix-bloomberg-tight .db-main-col > .db-section:last-child,
body.ix-bloomberg-tight .db-main-col > .db-panel:last-child,
body.ix-bloomberg-tight .db-main-col > .db-card:last-child,
body.ix-bloomberg-tight .db-main-col > .db-glass:last-child,
body.ix-bloomberg-tight .db-main-col > .db-ai-insight-card:last-child {
  border-bottom: 1px solid var(--bb-border) !important;
}
body.ix-bloomberg-tight .db-section-head {
  background: transparent !important;
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 10px 14px !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.ix-bloomberg-tight .db-section-head-title,
body.ix-bloomberg-tight .db-section-title,
body.ix-bloomberg-tight .db-section-link span:first-child {
  font-family: var(--bb-mono) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--bb-text) !important;
}
body.ix-bloomberg-tight .db-section-link {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  text-decoration: none !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  cursor: pointer;
  transition: opacity 0.12s;
}
body.ix-bloomberg-tight .db-section-link:hover { opacity: 0.7; }
body.ix-bloomberg-tight .db-nav-arrow {
  font-size: 13px !important;
  color: var(--bb-amber) !important;
}

/* DON'T impose a 2-col grid on #db-main-grid — the dashboard's allocation
   panel lives in a separate OUTER right column, so the chart should fill
   the entire middle column. Forcing 1.8fr/1fr was squeezing the chart
   canvas after Chart.js had already sized to the old wider container,
   making the chart appear half-clipped. Let the chart breathe. */
body.ix-bloomberg-tight #db-main-grid {
  display: block !important;
  margin-bottom: 6px !important;
}
body.ix-bloomberg-tight #db-main-grid > .db-chart-wrap,
body.ix-bloomberg-tight #db-main-grid > .db-glass {
  width: 100% !important;
  margin-bottom: 6px !important;
}

/* ── Chart panel ──────────────────────────────────────────────────────── */
body.ix-bloomberg-tight .db-chart-wrap > div:first-child {
  padding: 7px 12px 6px !important;
}
body.ix-bloomberg-tight .db-chart-expand {
  background: transparent !important;
  border: 1px solid var(--bb-border) !important;
  color: var(--bb-text-3) !important;
  font-family: var(--bb-mono) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  padding: 3px 7px !important;
  cursor: pointer;
  transition: all 0.12s;
}
body.ix-bloomberg-tight .db-chart-expand:hover {
  border-color: var(--bb-amber-line) !important;
  color: var(--bb-amber) !important;
}

/* Period buttons — readable but tight */
body.ix-bloomberg-tight .db-period,
body.ix-bloomberg-tight .db-period-btn,
body.ix-bloomberg-tight .db-tf-btn,
body.ix-bloomberg-tight [class*="db-time"] button,
body.ix-bloomberg-tight .db-perf-period {
  background: transparent !important;
  border: 1px solid var(--bb-border) !important;
  color: var(--bb-text-3) !important;
  font-family: var(--bb-mono) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 5px 11px !important;
  border-radius: 0 !important;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.12s;
  margin-left: -1px;
}

/* Section header inline mono labels (e.g. "Performance >", "AI Insights >",
   "Movers >", "Holdings (87) >" etc.) — bump up so they're readable. The
   EJS sets font-size:10px inline; we override here. */
body.ix-bloomberg-tight .db-section-link span[style*="font-size:10px"],
body.ix-bloomberg-tight .db-section-link span[style*="font-family"][style*="mono"] {
  font-size: 11.5px !important;
  letter-spacing: 0.12em !important;
}
body.ix-bloomberg-tight .db-nav-arrow { font-size: 15px !important; }
body.ix-bloomberg-tight .db-period.active,
body.ix-bloomberg-tight .db-period-btn.active,
body.ix-bloomberg-tight .db-tf-btn.active,
body.ix-bloomberg-tight .db-perf-period.active {
  background: var(--bb-amber-dim) !important;
  color: var(--bb-amber) !important;
  border-color: var(--bb-amber-line) !important;
  z-index: 1;
  position: relative;
}

/* Performance hero value inline (e.g. "$1,197,642 +0.47% today") */
body.ix-bloomberg-tight .db-chart-wrap span[style*="font-size:20px"] {
  font-size: 18px !important;
}

/* ── Holdings/positions tables ────────────────────────────────────────── */
body.ix-bloomberg-tight .db-holdings-table th,
body.ix-bloomberg-tight .db-table th {
  font-family: var(--bb-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--bb-text-4) !important;
  background: var(--bb-bg-1) !important;
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 8px 12px !important;
}
body.ix-bloomberg-tight .db-holdings-table td,
body.ix-bloomberg-tight .db-table td {
  font-family: var(--bb-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 12px !important;
  padding: 7px 12px !important;
  border-bottom: 1px solid var(--bb-border) !important;
  background: transparent !important;
  color: var(--bb-text-2) !important;
}
body.ix-bloomberg-tight .db-holdings-table tr:hover td {
  background: rgba(217, 119, 87, 0.06) !important;
}

/* ── Allocation donut + sector list ─────────────────────────────────────── */
body.ix-bloomberg-tight .db-allocation,
body.ix-bloomberg-tight .db-sector-row,
body.ix-bloomberg-tight .db-allocation-row {
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 7px 14px !important;
  font-family: var(--bb-mono);
  font-size: 12px;
}
body.ix-bloomberg-tight .db-allocation-row:last-child,
body.ix-bloomberg-tight .db-sector-row:last-child { border-bottom: 0 !important; }
body.ix-bloomberg-tight .db-allocation-pct,
body.ix-bloomberg-tight .db-sector-pct {
  font-family: var(--bb-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 700 !important;
  color: var(--bb-text) !important;
}

/* Asset types horizontal bar — flat */
body.ix-bloomberg-tight .db-asset-bar {
  background: var(--bb-bg-2) !important;
  border-radius: 0 !important;
  height: 8px !important;
  overflow: hidden;
  margin: 5px 0 !important;
}
body.ix-bloomberg-tight .db-asset-bar-segment { border-radius: 0 !important; }

/* ── Market Pulse, Earnings, Events ─────────────────────────────────────── */
body.ix-bloomberg-tight .db-event-item {
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 5px 12px !important;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--bb-mono);
  font-size: 10.5px;
}
body.ix-bloomberg-tight .db-event-badge {
  background: rgba(217, 119, 87, 0.10) !important;
  border: 1px solid rgba(217, 119, 87, 0.32) !important;
  color: var(--bb-amber) !important;
  font-family: var(--bb-mono) !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  padding: 1px 5px !important;
  border-radius: 0 !important;
  text-transform: uppercase;
}

/* ── AI Insight / Briefing card ─────────────────────────────────────────── */
body.ix-bloomberg-tight .db-ai-insight-card {
  background: linear-gradient(180deg, rgba(217,119,87,0.04) 0%, var(--bb-bg-1) 80%) !important;
  border: 1px solid var(--bb-border) !important;
  border-left: 2px solid var(--bb-amber) !important;
}
body.ix-bloomberg-tight .db-ai-bullet {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 14px !important;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--bb-text-2);
  border-bottom: 1px solid rgba(58,55,53,0.4);
  line-height: 1.55;
}
body.ix-bloomberg-tight .db-ai-bullet:last-child { border-bottom: 0; }
body.ix-bloomberg-tight .db-ai-bullet-icon {
  font-size: 13px !important;
  color: var(--bb-amber) !important;
  margin-top: 2px;
}
body.ix-bloomberg-tight .db-ai-msg-user {
  background: var(--bb-amber-dim) !important;
  color: var(--bb-amber) !important;
  border: 1px solid var(--bb-amber-line) !important;
  border-radius: 0 !important;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 11px;
  padding: 6px 10px !important;
  margin: 5px 0 !important;
  align-self: flex-end;
}

/* ── Autonomous Agent card ─────────────────────────────────────────────── */
body.ix-bloomberg-tight .db-agent-section,
body.ix-bloomberg-tight [class*="db-agent"] {
  background: var(--bb-bg-1) !important;
  border: 1px solid var(--bb-border) !important;
  border-radius: 0 !important;
}
body.ix-bloomberg-tight .db-agent-trust-badge,
body.ix-bloomberg-tight .db-trust-level,
body.ix-bloomberg-tight [class*="db-trust"] {
  font-family: var(--bb-mono) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  background: var(--bb-amber-dim) !important;
  border: 1px solid var(--bb-amber-line) !important;
  color: var(--bb-amber) !important;
  padding: 2px 6px !important;
  border-radius: 0 !important;
  text-transform: uppercase;
}

/* ── Movers / Top Holdings rows ──────────────────────────────────────── */
body.ix-bloomberg-tight .db-mover-row,
body.ix-bloomberg-tight .db-top-row,
body.ix-bloomberg-tight [class*="db-mover"],
body.ix-bloomberg-tight [class*="db-holding-row"] {
  border-bottom: 1px solid var(--bb-border) !important;
  padding: 7px 14px !important;
  font-family: var(--bb-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  display: grid;
  align-items: center;
  cursor: pointer;
  transition: background 0.12s;
}
body.ix-bloomberg-tight .db-mover-row:hover,
body.ix-bloomberg-tight .db-top-row:hover,
body.ix-bloomberg-tight [class*="db-mover"]:hover,
body.ix-bloomberg-tight [class*="db-holding-row"]:hover {
  background: rgba(217, 119, 87, 0.06) !important;
}

/* ── Action / utility buttons inside dashboard ─────────────────────────── */
body.ix-bloomberg-tight .db-add-holding-btn,
body.ix-bloomberg-tight .db-action-btn,
body.ix-bloomberg-tight [class*="db-btn"] {
  background: transparent !important;
  border: 1px solid var(--bb-border-2) !important;
  border-radius: 0 !important;
  color: var(--bb-text-2) !important;
  font-family: var(--bb-mono) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  padding: 5px 10px !important;
  cursor: pointer;
  transition: all 0.12s;
}
body.ix-bloomberg-tight .db-add-holding-btn:hover,
body.ix-bloomberg-tight .db-action-btn:hover,
body.ix-bloomberg-tight [class*="db-btn"]:hover {
  border-color: var(--bb-amber-line) !important;
  color: var(--bb-amber) !important;
  background: var(--bb-amber-dim) !important;
}

/* ── Status footer (bottom strip) ────────────────────────────────────── */
body.ix-bloomberg-tight .db-footer-status,
body.ix-bloomberg-tight .db-bottom-bar,
body.ix-bloomberg-tight [class*="db-status-bar"] {
  background: var(--bb-bg-1) !important;
  border-top: 1px solid var(--bb-border) !important;
  font-family: var(--bb-mono) !important;
  font-size: 9.5px !important;
  letter-spacing: 0.06em;
  color: var(--bb-text-3) !important;
  padding: 5px 12px !important;
}

/* ── Market closed/open badge ────────────────────────────────────── */
body.ix-bloomberg-tight .db-market-status,
body.ix-bloomberg-tight [class*="market-closed"],
body.ix-bloomberg-tight [class*="market-open"] {
  font-family: var(--bb-mono) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  border-radius: 0 !important;
}

/* ── Performance chart benchmark pills (BMK · SPY · QQQ · DIA · BTC) ──── */
body.ix-bloomberg-tight .db-bmk-btn,
body.ix-bloomberg-tight [class*="db-bench"] {
  background: transparent !important;
  border: 1px solid var(--bb-border) !important;
  font-family: var(--bb-mono) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  color: var(--bb-text-3) !important;
  padding: 2px 8px !important;
  border-radius: 0 !important;
}
body.ix-bloomberg-tight .db-bmk-btn.active,
body.ix-bloomberg-tight [class*="db-bench"].active {
  background: var(--bb-amber-dim) !important;
  border-color: var(--bb-amber-line) !important;
  color: var(--bb-amber) !important;
}

/* Sidebar account summary (top of left rail) */
body.ix-bloomberg-tight .db-sidebar-account,
body.ix-bloomberg-tight .db-account-card {
  background: var(--bb-bg-1) !important;
  border: 1px solid var(--bb-border) !important;
  border-radius: 0 !important;
  padding: 8px 10px !important;
}
body.ix-bloomberg-tight .db-account-label {
  font-family: var(--bb-mono) !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color: var(--bb-text-4) !important;
}
body.ix-bloomberg-tight .db-account-value {
  font-family: var(--bb-mono) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  color: var(--bb-text) !important;
  letter-spacing: -0.2px !important;
  line-height: 1.1;
}
body.ix-bloomberg-tight .db-account-sub {
  font-family: var(--bb-mono) !important;
  font-size: 9.5px !important;
  font-variant-numeric: tabular-nums;
  color: var(--bb-text-3) !important;
}

/* Closable widget × buttons */
body.ix-bloomberg-tight .db-closable-x,
body.ix-bloomberg-tight [class*="db-close-btn"] {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--bb-text-4) !important;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.12s;
  border-radius: 0 !important;
}
body.ix-bloomberg-tight .db-closable-x:hover {
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: var(--bb-red) !important;
  background: rgba(239, 68, 68, 0.10) !important;
}

/* Performance chart container — fix the ABT line + perf chart inside */
body.ix-bloomberg-tight .db-chart-wrap canvas,
body.ix-bloomberg-tight .db-chart-wrap svg {
  background: transparent !important;
}

/* ── AI Briefing body — readable paragraph text */
body.ix-bloomberg-tight .db-ai-insight-card p,
body.ix-bloomberg-tight .db-ai-insight-card .ai-text,
body.ix-bloomberg-tight [class*="db-ai-briefing"] p {
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: var(--bb-text-2) !important;
  padding: 12px 16px !important;
}

/* ── Autonomous Agent KPIs (Trust Level / Actions / Pending / Tone / Scan) */
body.ix-bloomberg-tight [class*="db-agent"] [class*="label"],
body.ix-bloomberg-tight [class*="db-agent"] [class*="lbl"] {
  font-family: var(--bb-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--bb-text-4) !important;
}
body.ix-bloomberg-tight [class*="db-agent"] [class*="value"],
body.ix-bloomberg-tight [class*="db-agent"] [class*="num"] {
  font-family: var(--bb-mono) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--bb-text) !important;
  letter-spacing: -0.3px !important;
}

/* ── Event Impact panel ──────────────────────────────────────────────── */
body.ix-bloomberg-tight [class*="db-event"] {
  font-size: 12px !important;
}
body.ix-bloomberg-tight [class*="event-impact-empty"],
body.ix-bloomberg-tight [class*="db-event-empty"] {
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-size: 12px !important;
  color: var(--bb-text-3) !important;
  padding: 18px 14px !important;
  text-align: center;
}

/* ── Reduce vertical padding inside the chart panel header (was huge gap
   between chart toolbar and the actual chart canvas) ───────────────── */
body.ix-bloomberg-tight .db-chart-wrap > div:first-child {
  padding: 10px 14px 8px !important;
}

/* ── Section panels: equalise inner padding so they don't have weird
   internal whitespace */
body.ix-bloomberg-tight .db-section > *:not(.db-section-head):not(.db-section-link),
body.ix-bloomberg-tight .db-glass > *:not(.db-section-head):not(:first-child) {
  /* honour the page's own padding choices for nested content */
}

/* ── Inline section-head padding (the chart, agent, event, briefing all
   use a custom inline-styled <div> as their header — make those uniform) */
body.ix-bloomberg-tight .db-glass > div[style*="padding"][style*="border-bottom"] {
  padding: 10px 14px !important;
}

/* ── Sidebar spacing — bump portfolio item rows for readability */
body.ix-bloomberg-tight .db-portfolio-item {
  padding: 6px 8px !important;
  font-size: 12px !important;
}
body.ix-bloomberg-tight .db-portfolio-item span:last-child {
  font-size: 11.5px !important;
}

/* ─── v5 polish — kill text cropping, tighten spacing, fill empty space ─── */

/* Reduce row height in Holdings so the long table doesn't dominate */
body.ix-bloomberg-tight .db-holdings-table td,
body.ix-bloomberg-tight .db-table td {
  font-size: 11px !important;
  padding: 5px 10px !important;
}
body.ix-bloomberg-tight .db-holdings-table th,
body.ix-bloomberg-tight .db-table th {
  font-size: 9px !important;
  padding: 6px 10px !important;
}

/* Remove black-space gap below short sections — make AI Briefing / Event
   Impact / last visible section grow to fill column height matching the
   taller right-rail Allocation panel. */
body.ix-bloomberg-tight .db-main-col {
  display: flex !important;
  flex-direction: column !important;
}
body.ix-bloomberg-tight .db-main-col > .db-section:last-child,
body.ix-bloomberg-tight .db-main-col > .db-glass:last-child,
body.ix-bloomberg-tight .db-main-col > .db-panel:last-child,
body.ix-bloomberg-tight .db-main-col > *:last-child {
  flex: 1 1 auto !important;
}

/* Section internal padding — compact (was producing the empty-pocket look) */
body.ix-bloomberg-tight .db-section,
body.ix-bloomberg-tight .db-panel,
body.ix-bloomberg-tight .db-glass,
body.ix-bloomberg-tight .db-card {
  padding: 0 !important;
}
body.ix-bloomberg-tight .db-section > div,
body.ix-bloomberg-tight .db-glass > div,
body.ix-bloomberg-tight .db-panel > div {
  padding-bottom: 0 !important;
}

/* Page footer status bar — flush mono strip (no extra bottom space) */
body.ix-bloomberg-tight .db-status-bar,
body.ix-bloomberg-tight .db-footer {
  border-top: 1px solid var(--bb-border) !important;
  background: var(--bb-bg-1) !important;
  padding: 4px 10px !important;
  font-family: var(--bb-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  color: var(--bb-text-3) !important;
}

