/* ══════════════════════════════════════════════════════════════════════════════
   GB Capital — Centralized Theme System
   Dark mode (default) + Light mode with premium transitions
   Loaded by all portals. Portal-specific accent colors come from theme_*.css
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Dark Mode (Default) ──────────────────────────────────────────────────── */
:root, html[data-theme="dark"] {
  /* Backgrounds */
  --bg: #06090f;
  --bg-subtle: #080c14;
  --surface: rgba(255,255,255,.025);
  --surface-card: rgba(255,255,255,.035);
  --surface-card-hover: rgba(255,255,255,.055);
  --surface-raised: rgba(255,255,255,.06);
  --surface-overlay: rgba(6,9,15,.92);

  /* Borders */
  --border: rgba(255,255,255,.07);
  --border-strong: rgba(255,255,255,.12);
  --border-accent: rgba(var(--portal-accent-rgb, 48,131,132), .2);

  /* Text */
  --text: #e8edf4;
  --text-secondary: rgba(232,237,244,.6);
  --text-muted: rgba(232,237,244,.35);
  --text-inverse: #06090f;
  --heading: #fff;

  /* Sidebar (always dark in both modes) */
  --sidebar-text: rgba(255,255,255,.6);
  --sidebar-text-active: #fff;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-border: rgba(255,255,255,.06);

  /* Topbar */
  --topbar-bg: rgba(6,9,15,.92);
  --topbar-text: #e8edf4;
  --topbar-border: rgba(255,255,255,.06);

  /* Cards */
  --card-bg: rgba(255,255,255,.03);
  --card-border: rgba(255,255,255,.06);
  --card-shadow: 0 4px 16px rgba(0,0,0,.2);
  --card-hover-border: rgba(255,255,255,.12);

  /* Inputs */
  --input-bg: rgba(255,255,255,.04);
  --input-border: rgba(255,255,255,.1);
  --input-text: #e8edf4;
  --input-placeholder: rgba(255,255,255,.25);
  --input-focus-ring: rgba(var(--portal-accent-rgb, 48,131,132), .2);

  /* Tables */
  --table-header-bg: rgba(255,255,255,.02);
  --table-row-hover: rgba(255,255,255,.025);
  --table-border: rgba(255,255,255,.04);

  /* Modals */
  --modal-bg: #1a1a24;
  --modal-overlay: rgba(0,0,0,.6);
  --modal-border: rgba(255,255,255,.08);

  /* Badges */
  --badge-green-bg: rgba(26,122,94,.12);
  --badge-green-text: #2ecc71;
  --badge-red-bg: rgba(231,76,60,.1);
  --badge-red-text: #e74c3c;
  --badge-amber-bg: rgba(212,169,43,.1);
  --badge-amber-text: #f0c956;
  --badge-blue-bg: rgba(45,125,210,.12);
  --badge-blue-text: #5da9e9;
  --badge-gray-bg: rgba(255,255,255,.06);
  --badge-gray-text: rgba(255,255,255,.45);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.35);
  --shadow-glow: 0 0 0 3px rgba(var(--portal-accent-rgb, 48,131,132), .15);

  /* Scrollbars */
  --scrollbar-thumb: rgba(255,255,255,.1);
  --scrollbar-track: transparent;

  /* Charts */
  --chart-grid: rgba(255,255,255,.06);
  --chart-text: #94a3b8;
  --chart-tooltip-bg: #111827;
  --chart-tooltip-border: rgba(255,255,255,.1);

  /* Code */
  --code-bg: rgba(255,255,255,.06);
  --code-text: #e8edf4;

  color-scheme: dark;
}

/* ── Light Mode ───────────────────────────────────────────────────────────── */
html[data-theme="light"] {
  /* Backgrounds */
  --bg: #f5f7fa;
  --bg-subtle: #eef1f6;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-card-hover: #f8f9fc;
  --surface-raised: #ffffff;
  --surface-overlay: rgba(255,255,255,.95);

  /* Borders */
  --border: #e2e5ef;
  --border-strong: #c8cdd9;
  --border-accent: rgba(var(--portal-accent-rgb, 48,131,132), .25);

  /* Text */
  --text: #1a1a2e;
  --text-secondary: #4a5068;
  --text-muted: #8890a5;
  --text-inverse: #ffffff;
  --heading: #0f1729;

  /* Sidebar — stays dark in light mode (standard for dashboards) */
  --sidebar-text: rgba(255,255,255,.6);
  --sidebar-text-active: #fff;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-border: rgba(255,255,255,.06);

  /* Topbar */
  --topbar-bg: rgba(255,255,255,.92);
  --topbar-text: #1a1a2e;
  --topbar-border: #e2e5ef;

  /* Cards */
  --card-bg: #ffffff;
  --card-border: #e2e5ef;
  --card-shadow: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.03);
  --card-hover-border: #c8cdd9;

  /* Inputs */
  --input-bg: #ffffff;
  --input-border: #d5d8e3;
  --input-text: #1a1a2e;
  --input-placeholder: #a0a5b5;
  --input-focus-ring: rgba(var(--portal-accent-rgb, 48,131,132), .15);

  /* Tables */
  --table-header-bg: #f5f7fa;
  --table-row-hover: #f8f9fc;
  --table-border: #eef0f5;

  /* Modals */
  --modal-bg: #ffffff;
  --modal-overlay: rgba(0,0,0,.3);
  --modal-border: #e2e5ef;

  /* Badges */
  --badge-green-bg: rgba(26,122,94,.08);
  --badge-green-text: #15803d;
  --badge-red-bg: rgba(220,38,38,.08);
  --badge-red-text: #dc2626;
  --badge-amber-bg: rgba(180,83,9,.08);
  --badge-amber-text: #b45309;
  --badge-blue-bg: rgba(37,99,235,.08);
  --badge-blue-text: #2563eb;
  --badge-gray-bg: #f0f2f7;
  --badge-gray-text: #6b7280;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  --shadow-glow: 0 0 0 3px rgba(var(--portal-accent-rgb, 48,131,132), .12);

  /* Scrollbars */
  --scrollbar-thumb: rgba(0,0,0,.15);
  --scrollbar-track: transparent;

  /* Charts */
  --chart-grid: #e2e5ef;
  --chart-text: #6b7280;
  --chart-tooltip-bg: #ffffff;
  --chart-tooltip-border: #e2e5ef;

  /* Code */
  --code-bg: #f0f2f7;
  --code-text: #1a1a2e;

  color-scheme: light;
}

/* ── Smooth Theme Transitions ─────────────────────────────────────────────── */
body,
.main-wrap,
.content-area,
.topbar, .gb-topbar,
.card, .gb-card, .stat-card, .kpi-card,
.modal, .gb-modal,
table, th, td,
input, select, textarea, button,
.nav-link, .sb-group-btn,
.sidebar-foot,
.data-table, .data-table th, .data-table td,
.gb-table, .gb-table th, .gb-table td,
.cmd-palette, .cmd-box,
.notif-panel,
#gbps-panel,
pre, code {
  transition: background-color .3s cubic-bezier(.4,0,.2,1),
              color .3s cubic-bezier(.4,0,.2,1),
              border-color .3s cubic-bezier(.4,0,.2,1),
              box-shadow .3s cubic-bezier(.4,0,.2,1);
}

/* ── Light Mode Component Overrides ───────────────────────────────────────── */

/* Body & Layout */
html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
  background-image: none;
}

/* Topbar */
html[data-theme="light"] .topbar,
html[data-theme="light"] .gb-topbar {
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--topbar-border);
}
html[data-theme="light"] .topbar-title,
html[data-theme="light"] .tb-title,
html[data-theme="light"] .gb-topbar-title {
  color: var(--heading);
}
html[data-theme="light"] .tb-hamburger,
html[data-theme="light"] .gb-hamburger,
html[data-theme="light"] .tb-icon-btn {
  color: var(--text-secondary);
}
html[data-theme="light"] .tb-hamburger:hover,
html[data-theme="light"] .gb-hamburger:hover,
html[data-theme="light"] .tb-icon-btn:hover {
  background: rgba(0,0,0,.04);
  color: var(--heading);
}

/* Cards */
html[data-theme="light"] .card,
html[data-theme="light"] .gb-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .kpi-card {
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}
html[data-theme="light"] .card:hover,
html[data-theme="light"] .gb-card:hover {
  border-color: var(--card-hover-border);
}
html[data-theme="light"] .card-value,
html[data-theme="light"] .gb-stat-value,
html[data-theme="light"] .page-title {
  color: var(--heading);
}

/* Tables */
html[data-theme="light"] .data-table th,
html[data-theme="light"] .gb-table th {
  background: var(--table-header-bg);
  color: var(--text-secondary);
  border-bottom-color: var(--border);
}
html[data-theme="light"] .data-table td,
html[data-theme="light"] .gb-table td {
  color: var(--text);
  border-bottom-color: var(--table-border);
}
html[data-theme="light"] .data-table tr:hover td,
html[data-theme="light"] .gb-table tr:hover td {
  background: var(--table-row-hover);
}

/* Inputs */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .gb-input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] .gb-input::placeholder {
  color: var(--input-placeholder);
}
html[data-theme="light"] input:focus,
html[data-theme="light"] .gb-input:focus {
  border-color: var(--portal-accent, #308384);
  box-shadow: var(--shadow-glow);
}

/* Buttons */
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .gb-btn-secondary {
  background: #f0f2f7;
  border-color: #d5d8e3;
  color: var(--text);
}
html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .gb-btn-secondary:hover {
  background: #e2e5ef;
}

/* Badges */
html[data-theme="light"] .badge-green, html[data-theme="light"] .gb-badge.green { background: var(--badge-green-bg); color: var(--badge-green-text); }
html[data-theme="light"] .badge-red, html[data-theme="light"] .gb-badge.red { background: var(--badge-red-bg); color: var(--badge-red-text); }
html[data-theme="light"] .badge-amber, html[data-theme="light"] .gb-badge.amber { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
html[data-theme="light"] .badge-blue, html[data-theme="light"] .gb-badge.blue { background: var(--badge-blue-bg); color: var(--badge-blue-text); }

/* Modals */
html[data-theme="light"] .gb-modal,
html[data-theme="light"] .modal {
  background: var(--modal-bg);
  border-color: var(--modal-border);
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}
html[data-theme="light"] .gb-modal-title,
html[data-theme="light"] .modal-title {
  color: var(--heading);
}

/* Dropdowns & Panels */
html[data-theme="light"] #gbps-panel {
  background: rgba(255,255,255,.98);
  border-color: #e2e5ef;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
html[data-theme="light"] .gbps-name { color: var(--heading); }
html[data-theme="light"] .gbps-desc { color: var(--text-muted); }
html[data-theme="light"] .gbps-card:hover { background: #f5f7fa; }
html[data-theme="light"] .gbps-lbl,
html[data-theme="light"] .gbps-header-label { color: var(--text-muted); }
html[data-theme="light"] .gbps-header { background: linear-gradient(135deg, #f0fafa, #f0f4ff); border-bottom-color: #e2e5ef; }
html[data-theme="light"] .gbps-header-portal { color: var(--heading); }
html[data-theme="light"] .gbps-footer { color: var(--text-muted); border-top-color: #e2e5ef; }
html[data-theme="light"] .gbps-divider { background: #e2e5ef; }

/* Command Palette */
html[data-theme="light"] .cmd-box,
html[data-theme="light"] #cmd-palette .cmd-box {
  background: rgba(255,255,255,.98);
  border-color: #e2e5ef;
}
html[data-theme="light"] .cmd-item:hover { background: #f5f7fa; }
html[data-theme="light"] .cmd-item-label { color: var(--heading); }

/* Notification Panel */
html[data-theme="light"] .notif-panel {
  background: rgba(255,255,255,.98);
  border-color: #e2e5ef;
}

/* Scrollbars */
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }

/* Main content area */
html[data-theme="light"] .main-wrap,
html[data-theme="light"] .content-area,
html[data-theme="light"] #mainContent {
  background: var(--bg);
}

/* Section titles */
html[data-theme="light"] .section-title,
html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3 {
  color: var(--heading);
}

/* ── Theme Transition Ripple Effect ───────────────────────────────────────── */
#theme-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  transform: scale(0);
  opacity: 0;
}
#theme-ripple.expanding {
  transition: transform .6s cubic-bezier(.4,0,.2,1), opacity .6s ease;
  transform: scale(1);
  opacity: 1;
}
#theme-ripple.fading {
  transition: opacity .3s ease;
  opacity: 0;
}
/* ══════════════════════════════════════════════════════════════════════════════
   GB Capital — Comprehensive Light Mode Fixes
   Overrides ALL hardcoded rgba(255,255,255,...) patterns in portal templates
   Appended to theme_system.css
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Global Text Overrides ────────────────────────────────────────────────── */
html[data-theme="light"] * {
  --text-primary-override: #1a1a2e;
}

html[data-theme="light"] body,
html[data-theme="light"] .app-layout,
html[data-theme="light"] .app-shell {
  background: #f5f7fa !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .main-wrap,
html[data-theme="light"] #mainContent,
html[data-theme="light"] .content-area,
html[data-theme="light"] .content {
  background: #f5f7fa !important;
}

/* ── Kanban Board — Deals Portal ──────────────────────────────────────────── */
html[data-theme="light"] .kb-col,
html[data-theme="light"] .kb2-col {
  background: #fff !important;
  border: 1px solid #e2e5ef;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

html[data-theme="light"] .kb-col-header,
html[data-theme="light"] .kb2-col-head {
  background: #f8f9fc !important;
  border-bottom: 1px solid #e2e5ef !important;
}

html[data-theme="light"] .kb-col-title,
html[data-theme="light"] .kb2-col-title {
  color: #1a1a2e !important;
}

html[data-theme="light"] .kb-card,
html[data-theme="light"] .kb2-card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
html[data-theme="light"] .kb-card:hover,
html[data-theme="light"] .kb2-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
  border-color: #c8cdd9 !important;
}

html[data-theme="light"] .kb-card-title,
html[data-theme="light"] .kb2-card-name {
  color: #1a1a2e !important;
}

html[data-theme="light"] .kb-card-meta,
html[data-theme="light"] .kb2-card-deal {
  color: #6b7280 !important;
}

html[data-theme="light"] .kb-card-val,
html[data-theme="light"] .kb2-metric-val {
  color: #1a1a2e !important;
}

html[data-theme="light"] .kb-card-ebitda,
html[data-theme="light"] .kb2-metric-label {
  color: #8890a5 !important;
}

html[data-theme="light"] .kb-empty,
html[data-theme="light"] .kb2-empty {
  color: #8890a5 !important;
}

html[data-theme="light"] .kb2-geo,
html[data-theme="light"] .kb2-assigned {
  color: #6b7280 !important;
}

html[data-theme="light"] .kb2-col-total {
  color: #4a5068 !important;
}

html[data-theme="light"] .kb2-drop-zone,
html[data-theme="light"] .kb-drop-zone {
  background: transparent !important;
}

/* ── Cards (Generic) ──────────────────────────────────────────────────────── */
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .adv-card,
html[data-theme="light"] .dr-card,
html[data-theme="light"] .confirm-card,
html[data-theme="light"] .deal-pick-card,
html[data-theme="light"] .info.card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.04) !important;
}

html[data-theme="light"] .card-value,
html[data-theme="light"] .card-num,
html[data-theme="light"] .stat-value {
  color: #1a1a2e !important;
}

html[data-theme="light"] .card-label,
html[data-theme="light"] .card-sub,
html[data-theme="light"] .card-section {
  color: #4a5068 !important;
}

/* ── Page Titles & Headings ───────────────────────────────────────────────── */
html[data-theme="light"] .page-title,
html[data-theme="light"] .page-meta,
html[data-theme="light"] .section-title,
html[data-theme="light"] h1, html[data-theme="light"] h2,
html[data-theme="light"] h3, html[data-theme="light"] h4 {
  color: #1a1a2e !important;
}

html[data-theme="light"] .page-meta {
  color: #6b7280 !important;
}

/* ── Topbar ───────────────────────────────────────────────────────────────── */
html[data-theme="light"] .topbar,
html[data-theme="light"] .dr-topbar {
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom-color: #e2e5ef !important;
}

html[data-theme="light"] .topbar-title,
html[data-theme="light"] .tb-title,
html[data-theme="light"] .topbar-breadcrumb {
  color: #1a1a2e !important;
}

html[data-theme="light"] .tb-hamburger,
html[data-theme="light"] .tb-icon-btn {
  color: #4a5068 !important;
}
html[data-theme="light"] .tb-hamburger:hover,
html[data-theme="light"] .tb-icon-btn:hover {
  background: rgba(0,0,0,.04) !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .tb-search-trigger {
  background: #f0f2f7 !important;
  border-color: #d5d8e3 !important;
  color: #6b7280 !important;
}

html[data-theme="light"] .tb-user-name {
  color: #1a1a2e !important;
}

html[data-theme="light"] .tb-avatar {
  background: var(--portal-accent, #308384) !important;
  color: #fff !important;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
html[data-theme="light"] .btn-ghost,
html[data-theme="light"] .btn.btn-ghost {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
  border-color: #d5d8e3 !important;
}
html[data-theme="light"] .btn-ghost:hover {
  background: #e2e5ef !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .btn-teal,
html[data-theme="light"] .btn.btn-teal,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn.btn-primary {
  color: #fff !important;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
html[data-theme="light"] table th {
  background: #f5f7fa !important;
  color: #4a5068 !important;
  border-bottom: 1px solid #e2e5ef !important;
}

html[data-theme="light"] table td {
  color: #1a1a2e !important;
  border-bottom: 1px solid #f0f2f7 !important;
}

html[data-theme="light"] table tr:hover td {
  background: #f8f9fc !important;
}

/* ── Forms & Inputs ───────────────────────────────────────────────────────── */
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #fff !important;
  border-color: #d5d8e3 !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #a0a5b5 !important;
}

html[data-theme="light"] label {
  color: #4a5068 !important;
}

/* ── Tabs & Pill Navs ─────────────────────────────────────────────────────── */
html[data-theme="light"] .tab,
html[data-theme="light"] .pill,
html[data-theme="light"] .view-toggle-btn {
  color: #4a5068 !important;
}
html[data-theme="light"] .tab.active,
html[data-theme="light"] .pill.active {
  color: #1a1a2e !important;
}

/* ── Modals & Overlays ────────────────────────────────────────────────────── */
html[data-theme="light"] .modal,
html[data-theme="light"] .modal-content {
  background: #fff !important;
  border-color: #e2e5ef !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .modal-title {
  color: #1a1a2e !important;
}

/* ── Sidebar: stays dark always ───────────────────────────────────────────── */
html[data-theme="light"] .sidebar,
html[data-theme="light"] aside.sidebar,
html[data-theme="light"] #sidebar {
  background: var(--sidebar-bg) !important;
}
html[data-theme="light"] .sidebar *,
html[data-theme="light"] aside.sidebar * {
  /* Sidebar text stays light */
}
html[data-theme="light"] .nav-link {
  color: rgba(255,255,255,.6) !important;
}
html[data-theme="light"] .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.06) !important;
}
html[data-theme="light"] .nav-link.active {
  color: var(--portal-accent, #308384) !important;
  background: rgba(var(--portal-accent-rgb, 48,131,132),.12) !important;
}

/* ── Notifications Panel ──────────────────────────────────────────────────── */
html[data-theme="light"] .notif-panel {
  background: #fff !important;
  border-color: #e2e5ef !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.1) !important;
}
html[data-theme="light"] .notif-header {
  border-bottom-color: #e2e5ef !important;
}
html[data-theme="light"] .notif-title {
  color: #1a1a2e !important;
}
html[data-theme="light"] .notif-item-title {
  color: #1a1a2e !important;
}
html[data-theme="light"] .notif-item:hover {
  background: #f5f7fa !important;
}

/* ── Command Palette ──────────────────────────────────────────────────────── */
html[data-theme="light"] #cmd-palette .cmd-box {
  background: #fff !important;
  border-color: #e2e5ef !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.1) !important;
}
html[data-theme="light"] .cmd-input {
  color: #1a1a2e !important;
}
html[data-theme="light"] .cmd-item-label {
  color: #1a1a2e !important;
}
html[data-theme="light"] .cmd-item:hover {
  background: #f5f7fa !important;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
html[data-theme="light"] .toast {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.08) !important;
  color: #1a1a2e !important;
}

/* ── Deal Detail Pages ────────────────────────────────────────────────────── */
html[data-theme="light"] .deal-name,
html[data-theme="light"] .deal-company {
  color: #1a1a2e !important;
}

html[data-theme="light"] .detail-label {
  color: #6b7280 !important;
}

html[data-theme="light"] .detail-value {
  color: #1a1a2e !important;
}

/* ── General rgba(255,255,255,...) Overrides ───────────────────────────────── */
/* These catch any inline styles using white-on-dark patterns */

html[data-theme="light"] [style*="color:rgba(255,255,255,0.88)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.85)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.8)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.75)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.7)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.65)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.6)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.55)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.5)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.88)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.85)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.8)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.75)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.7)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.65)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.6)"] {
  color: #1a1a2e !important;
}

html[data-theme="light"] [style*="color:rgba(255,255,255,0.45)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.4)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.38)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.35)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.3)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.28)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.25)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.22)"],
html[data-theme="light"] [style*="color:rgba(255,255,255,0.2)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.45)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.4)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.35)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.3)"] {
  color: #6b7280 !important;
}

html[data-theme="light"] [style*="color:#fff"],
html[data-theme="light"] [style*="color: #fff"],
html[data-theme="light"] [style*="color:#ffffff"],
html[data-theme="light"] [style*="color: #ffffff"] {
  color: #1a1a2e !important;
}

/* Preserve white text in colored backgrounds (badges, buttons, sidebar) */
html[data-theme="light"] .sidebar [style*="color:#fff"],
html[data-theme="light"] .sidebar [style*="color: #fff"],
html[data-theme="light"] .btn-teal [style*="color:#fff"],
html[data-theme="light"] .btn-primary [style*="color:#fff"],
html[data-theme="light"] [style*="background:#043839"] [style*="color:#fff"],
html[data-theme="light"] [style*="background:linear-gradient"] [style*="color:#fff"] {
  color: #fff !important;
}

/* ── Background Overrides ─────────────────────────────────────────────────── */
html[data-theme="light"] [style*="background:rgba(255,255,255,0.0"],
html[data-theme="light"] [style*="background:rgba(255,255,255, 0.0"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.1"],
html[data-theme="light"] [style*="background: rgba(255,255,255,0.0"] {
  background: #f8f9fc !important;
}

html[data-theme="light"] [style*="border:1px solid rgba(255,255,255"],
html[data-theme="light"] [style*="border-color:rgba(255,255,255"],
html[data-theme="light"] [style*="border-bottom:1px solid rgba(255,255,255"] {
  border-color: #e2e5ef !important;
}

/* ── Scrollbar in Light Mode ──────────────────────────────────────────────── */
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.12) !important;
}
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: transparent !important;
}

/* ── Charts adapt ─────────────────────────────────────────────────────────── */
html[data-theme="light"] canvas {
  filter: none;
}

/* ── Portal badge in light mode ───────────────────────────────────────────── */
html[data-theme="light"] .portal-badge {
  border-color: var(--portal-accent, #308384) !important;
}

/* ── Misc overrides ───────────────────────────────────────────────────────── */
html[data-theme="light"] hr {
  border-color: #e2e5ef !important;
}

html[data-theme="light"] code, html[data-theme="light"] pre {
  background: #f0f2f7 !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .empty-state {
  color: #8890a5 !important;
}

html[data-theme="light"] .skeleton,
html[data-theme="light"] .loading-skeleton {
  background: #e2e5ef !important;
}
/* ══════════════════════════════════════════════════════════════════════════════
   GB Capital — Light Mode Fixes: Accounting Portal
   Targets all pc-*, inv-*, stat-*, kpi-*, and inline dark backgrounds
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Payables Command Centre ──────────────────────────────────────────────── */
html[data-theme="light"] .pc-wrap,
html[data-theme="light"] .pc-main,
html[data-theme="light"] .pc-body {
  background: #f5f7fa !important;
}

html[data-theme="light"] .pc-header {
  background: #fff !important;
  border-bottom: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .pc-header-title { color: #1a1a2e !important; }
html[data-theme="light"] .pc-header-sub { color: #6b7280 !important; }

html[data-theme="light"] .pc-card,
html[data-theme="light"] .pc-kanban-card,
html[data-theme="light"] .pc-sidebar-item {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
html[data-theme="light"] .pc-card:hover,
html[data-theme="light"] .pc-kanban-card:hover,
html[data-theme="light"] .pc-card-hover:hover {
  background: #f8f9fc !important;
  border-color: #c8cdd9 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.06) !important;
}

html[data-theme="light"] .pc-card-vendor,
html[data-theme="light"] .pc-si-vendor { color: #1a1a2e !important; }
html[data-theme="light"] .pc-card-amount { color: #1a1a2e !important; }
html[data-theme="light"] .pc-card-ref,
html[data-theme="light"] .pc-card-meta,
html[data-theme="light"] .pc-si-date,
html[data-theme="light"] .pc-si-detail { color: #6b7280 !important; }

html[data-theme="light"] .pc-kanban-col {
  background: #f8f9fc !important;
  border: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .pc-kanban-col-header {
  background: #f0f2f7 !important;
  border-bottom: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .pc-kanban-col-header * { color: #1a1a2e !important; }
html[data-theme="light"] .pc-kanban-empty { color: #8890a5 !important; }

html[data-theme="light"] .pc-sidebar,
html[data-theme="light"] .pc-sidebar-panel {
  background: #fff !important;
  border-left: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .pc-sidebar-header {
  border-bottom: 1px solid #e2e5ef !important;
  color: #1a1a2e !important;
}
html[data-theme="light"] .pc-sidebar-section { color: #6b7280 !important; }

html[data-theme="light"] .pc-section-label { color: #6b7280 !important; }
html[data-theme="light"] .pc-text { color: #1a1a2e !important; }
html[data-theme="light"] .pc-secondary { color: #6b7280 !important; }
html[data-theme="light"] .pc-muted { color: #8890a5 !important; }

html[data-theme="light"] .pc-status-strip,
html[data-theme="light"] .pc-kanban-badge { border-color: #e2e5ef !important; }

html[data-theme="light"] .pc-scorecard,
html[data-theme="light"] .pc-scorecards,
html[data-theme="light"] .pc-insight-box {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .pc-sc-name,
html[data-theme="light"] .pc-sc-header { color: #1a1a2e !important; }
html[data-theme="light"] .pc-sc-sub,
html[data-theme="light"] .pc-sc-label { color: #6b7280 !important; }
html[data-theme="light"] .pc-sc-count { color: #1a1a2e !important; }

html[data-theme="light"] .pc-progress-track {
  background: #e2e5ef !important;
}

html[data-theme="light"] .pc-border,
html[data-theme="light"] .pc-border-bright {
  border-color: #e2e5ef !important;
}

/* Payables buttons */
html[data-theme="light"] .pc-card-btn,
html[data-theme="light"] .pc-si-btn,
html[data-theme="light"] .pc-header-btn {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
  border: 1px solid #d5d8e3 !important;
}
html[data-theme="light"] .pc-card-btn:hover,
html[data-theme="light"] .pc-si-btn:hover,
html[data-theme="light"] .pc-header-btn:hover {
  background: #e2e5ef !important;
  color: #1a1a2e !important;
}
html[data-theme="light"] .pc-header-btn-gold {
  background: rgba(201,168,92,.1) !important;
  color: #b45309 !important;
  border: 1px solid rgba(201,168,92,.3) !important;
}

/* ── Invoice Table ────────────────────────────────────────────────────────── */
html[data-theme="light"] .inv-table-wrap,
html[data-theme="light"] .inv-table {
  background: #fff !important;
}
html[data-theme="light"] .inv-table-head {
  background: #f5f7fa !important;
  border-bottom: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-table-head * { color: #4a5068 !important; }
html[data-theme="light"] .invoice-row {
  border-bottom: 1px solid #f0f2f7 !important;
}
html[data-theme="light"] .invoice-row:hover {
  background: #f8f9fc !important;
}
html[data-theme="light"] .inv-vendor-link,
html[data-theme="light"] .inv-vendor-plain { color: #1a1a2e !important; }
html[data-theme="light"] .inv-ref { color: #6b7280 !important; }
html[data-theme="light"] .inv-amount-cell { color: #1a1a2e !important; }
html[data-theme="light"] .inv-date-cell,
html[data-theme="light"] .inv-due-cell { color: #4a5068 !important; }
html[data-theme="light"] .inv-mono { color: #4a5068 !important; }
html[data-theme="light"] .inv-ov-cell { color: #4a5068 !important; }

html[data-theme="light"] .inv-action-btn {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
  border: 1px solid #d5d8e3 !important;
}
html[data-theme="light"] .inv-action-btn:hover {
  background: #e2e5ef !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .inv-tabs {
  border-bottom: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-tab { color: #6b7280 !important; }
html[data-theme="light"] .inv-tab.active { color: #1a1a2e !important; }

html[data-theme="light"] .inv-kpi-strip {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-kpi {
  background: #f8f9fc !important;
  border: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-kpi-val { color: #1a1a2e !important; }
html[data-theme="light"] .inv-kpi-lbl { color: #6b7280 !important; }
html[data-theme="light"] .inv-kpi-amt { color: #4a5068 !important; }

html[data-theme="light"] .inv-search-bar input {
  background: #fff !important;
  border: 1px solid #d5d8e3 !important;
  color: #1a1a2e !important;
}

html[data-theme="light"] .inv-bulk-bar {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-bulk-btn {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
}

html[data-theme="light"] .inv-expand-body {
  background: #f8f9fc !important;
  border-top: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .inv-expand-title { color: #1a1a2e !important; }

html[data-theme="light"] .inv-detail-grid {
  background: #fff !important;
}
html[data-theme="light"] .inv-timeline {
  border-left-color: #e2e5ef !important;
}

html[data-theme="light"] .inv-dl dt { color: #6b7280 !important; }
html[data-theme="light"] .inv-dl dd { color: #1a1a2e !important; }
html[data-theme="light"] .inv-ai-btn {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
}

/* ── Stat & KPI Cards ─────────────────────────────────────────────────────── */
html[data-theme="light"] .stat-card,
html[data-theme="light"] .kpi-card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.04) !important;
}
html[data-theme="light"] .stat-card *,
html[data-theme="light"] .kpi-card * {
  /* Let specific overrides handle text colors */
}

/* ── Generic Background Overrides ─────────────────────────────────────────── */
/* These catch the 200+ hardcoded rgba(255,255,255,...) backgrounds */
html[data-theme="light"] [style*="background:rgba(255,255,255,.02)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.03)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.04)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.05)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.06)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.07)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.08)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.1)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,.2)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.02)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.03)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.04)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.05)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.06)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.07)"],
html[data-theme="light"] [style*="background:rgba(255,255,255,0.08)"],
html[data-theme="light"] [style*="background: rgba(255,255,255,.03)"],
html[data-theme="light"] [style*="background: rgba(255,255,255,.04)"],
html[data-theme="light"] [style*="background: rgba(255,255,255,.05)"] {
  background: #fff !important;
  border-color: #e2e5ef !important;
}

/* Dark gradient backgrounds → white in light mode */
html[data-theme="light"] [style*="background:linear-gradient"][style*="#06090f"],
html[data-theme="light"] [style*="background:linear-gradient"][style*="#0c1825"],
html[data-theme="light"] [style*="background:linear-gradient"][style*="#0a0e16"],
html[data-theme="light"] [style*="background:rgba(6,9,15"],
html[data-theme="light"] [style*="background:rgba(4,56,57"],
html[data-theme="light"] [style*="background:#06090f"],
html[data-theme="light"] [style*="background:#0c1825"] {
  background: #fff !important;
}

/* Inline border overrides */
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,0.0"],
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,0.1"],
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,.0"],
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,.1"],
html[data-theme="light"] [style*="border-color:rgba(255,255,255"],
html[data-theme="light"] [style*="border-bottom:1px solid rgba(255,255,255"],
html[data-theme="light"] [style*="border-top:1px solid rgba(255,255,255"],
html[data-theme="light"] [style*="border-left:1px solid rgba(255,255,255"] {
  border-color: #e2e5ef !important;
}

/* ── Accounting-Specific Section Headers ──────────────────────────────────── */
html[data-theme="light"] .section-title,
html[data-theme="light"] .page-title,
html[data-theme="light"] .page-meta {
  color: #1a1a2e !important;
}
html[data-theme="light"] .page-meta {
  color: #6b7280 !important;
}

/* ── Hub/Dashboard Cards ──────────────────────────────────────────────────── */
html[data-theme="light"] .hub-row { border-color: #e2e5ef !important; }
html[data-theme="light"] .hub-icon { color: #4a5068 !important; }

/* ── Links ────────────────────────────────────────────────────────────────── */
html[data-theme="light"] a:not(.sidebar a):not(.nav-link):not(.btn):not(.btn-teal):not(.btn-primary) {
  color: var(--portal-accent, #2d6a4f);
}

/* ── Accounting Sub-navigation (tabs) ─────────────────────────────────────── */
html[data-theme="light"] .subnav,
html[data-theme="light"] .sub-nav,
html[data-theme="light"] .tabs-bar {
  background: #fff !important;
  border-bottom: 1px solid #e2e5ef !important;
}
html[data-theme="light"] .subnav a,
html[data-theme="light"] .sub-nav a,
html[data-theme="light"] .tabs-bar a {
  color: #6b7280 !important;
}
html[data-theme="light"] .subnav a.active,
html[data-theme="light"] .sub-nav a.active,
html[data-theme="light"] .tabs-bar a.active {
  color: #1a1a2e !important;
  border-bottom-color: var(--portal-accent, #2d6a4f) !important;
}

/* ── Bank Reconciliation ──────────────────────────────────────────────────── */
html[data-theme="light"] .bank-card,
html[data-theme="light"] .match-card,
html[data-theme="light"] .txn-card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}

/* ── Approval Cards ───────────────────────────────────────────────────────── */
html[data-theme="light"] .approval-card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}

/* ── Financial Statements ─────────────────────────────────────────────────── */
html[data-theme="light"] .fin-table th {
  background: #f5f7fa !important;
  color: #4a5068 !important;
}
html[data-theme="light"] .fin-table td {
  color: #1a1a2e !important;
  border-bottom: 1px solid #f0f2f7 !important;
}
html[data-theme="light"] .fin-total td {
  background: #f0f2f7 !important;
  font-weight: 700 !important;
}

/* ── Month-End ────────────────────────────────────────────────────────────── */
html[data-theme="light"] .me-task,
html[data-theme="light"] .me-card {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
}

/* ── Dropdown menus ───────────────────────────────────────────────────────── */
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .context-menu {
  background: #fff !important;
  border: 1px solid #e2e5ef !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
}
html[data-theme="light"] .dropdown-item,
html[data-theme="light"] .context-item {
  color: #1a1a2e !important;
}
html[data-theme="light"] .dropdown-item:hover,
html[data-theme="light"] .context-item:hover {
  background: #f5f7fa !important;
}

/* ── Tooltips ─────────────────────────────────────────────────────────────── */
html[data-theme="light"] .tooltip,
html[data-theme="light"] [role="tooltip"] {
  background: #1a1a2e !important;
  color: #fff !important;
}

/* ── Preserve sidebar darkness in light mode ──────────────────────────────── */
html[data-theme="light"] .sidebar *:not(img),
html[data-theme="light"] aside.sidebar *:not(img) {
  /* Don't override sidebar content — it stays dark */
}
/* Re-ensure sidebar stays dark */
html[data-theme="light"] .sidebar { background: var(--sidebar-bg) !important; }
html[data-theme="light"] .sidebar .nav-link { color: rgba(255,255,255,.6) !important; }
html[data-theme="light"] .sidebar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.06) !important; }
html[data-theme="light"] .sidebar .nav-link.active { color: var(--portal-accent) !important; }
html[data-theme="light"] .sidebar .sb-group-btn { color: rgba(255,255,255,.5) !important; }
html[data-theme="light"] .sidebar .sb-group-label { color: rgba(255,255,255,.5) !important; }
html[data-theme="light"] .sidebar .sb-logo * { color: rgba(255,255,255,.9) !important; }
html[data-theme="light"] .sidebar .tagline { color: rgba(255,255,255,.5) !important; }
html[data-theme="light"] .sidebar .sidebar-foot { border-top-color: rgba(255,255,255,.06) !important; }
html[data-theme="light"] .sidebar .add-co-btn { color: rgba(255,255,255,.5) !important; border-color: rgba(255,255,255,.1) !important; }

/* ══════════════════════════════════════════════════════════════════════════════
   Light Mode Deals Board — Critical Text Visibility Fixes
   The board cards become white in light mode but text stays invisible
   because inline styles use white-on-dark patterns
   ══════════════════════════════════════════════════════════════════════════════ */

/* Force ALL text inside cards to be dark in light mode */
html[data-theme="light"] .kb-card *,
html[data-theme="light"] .kb2-card *,
html[data-theme="light"] .kb2-card-body * {
  color: #1a1a2e !important;
}
html[data-theme="light"] .kb2-card-body [style*="color:#308384"],
html[data-theme="light"] .kb2-card-body [style*="color:rgba(48,131,132"] {
  color: #1a7a5e !important;
}

/* Card priority dots keep their colors */
html[data-theme="light"] .kb-priority-dot,
html[data-theme="light"] .kb2-badge {
  color: inherit !important;
}

/* Column headers - text must be dark */
html[data-theme="light"] .kb-col *,
html[data-theme="light"] .kb2-col-head * {
  color: #1a1a2e !important;
}

/* Muted/secondary text in cards */
html[data-theme="light"] .kb-card-ebitda,
html[data-theme="light"] .kb-card-meta,
html[data-theme="light"] .kb2-metric-label,
html[data-theme="light"] .kb2-geo,
html[data-theme="light"] .kb2-assigned,
html[data-theme="light"] .kb2-card-deal {
  color: #6b7280 !important;
}

/* Board columns with light card shadows */
html[data-theme="light"] .kb2-card,
html[data-theme="light"] .kb-card {
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}

/* Pipeline page title */
html[data-theme="light"] [style*="color:rgba(255,255,255,0.92)"],
html[data-theme="light"] [style*="color:rgba(255,255,255, 0.92)"] {
  color: #1a1a2e !important;
}

/* The stage header counts */
html[data-theme="light"] .kb2-col-count {
  border: 1px solid #e2e5ef !important;
}

/* Sub-navigation bar */
html[data-theme="light"] .subnav-bar,
html[data-theme="light"] [style*="border-bottom:2px solid"] {
  background: #fff !important;
}

/* Page header area */
html[data-theme="light"] .page-header,
html[data-theme="light"] [class*="page-header"] {
  background: transparent !important;
}

/* View toggle buttons (Board/List/Kanban) */
html[data-theme="light"] .view-toggle a,
html[data-theme="light"] .view-btn {
  color: #4a5068 !important;
  background: #f0f2f7 !important;
  border-color: #d5d8e3 !important;
}
html[data-theme="light"] .view-toggle a.active,
html[data-theme="light"] .view-btn.active {
  background: var(--portal-accent, #308384) !important;
  color: #fff !important;
}

/* Export button */
html[data-theme="light"] .export-btn {
  color: #4a5068 !important;
}

/* ── Accounting Portal Specific ─────────────────────────────────────────────── */

/* Company switcher pills in topbar */
html[data-theme="light"] .co-btn,
html[data-theme="light"] .company-pill {
  background: #f0f2f7 !important;
  color: #4a5068 !important;
  border-color: #d5d8e3 !important;
}
html[data-theme="light"] .co-btn.active,
html[data-theme="light"] .company-pill.active {
  background: var(--portal-accent, #2d6a4f) !important;
  color: #fff !important;
}

/* Breadcrumbs */
html[data-theme="light"] .breadcrumb,
html[data-theme="light"] .breadcrumb a {
  color: #6b7280 !important;
}

/* All card internal text override — nuclear option for any remaining invisible text */
html[data-theme="light"] .card *:not(.badge):not(.btn):not(.btn-teal):not(.btn-primary),
html[data-theme="light"] .gb-card *:not(.badge):not(.btn) {
  color: inherit;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CRITICAL: Pipeline Board (kb2-*) Light Mode — Exact Class Overrides
   These must beat the inline <style> blocks in portal_app.py
   ══════════════════════════════════════════════════════════════════════════════ */

html[data-theme='light'] .kb2-col { background: #fff !important; border: 1px solid #e2e5ef !important; }
html[data-theme='light'] .kb2-col-head { background: #f5f7fa !important; border-bottom: 1px solid #e2e5ef !important; }
html[data-theme='light'] .kb2-col-title { color: #1a1a2e !important; }
html[data-theme='light'] .kb2-col-count { color: #4a5068 !important; }
html[data-theme='light'] .kb2-col-total { color: #6b7280 !important; }
html[data-theme='light'] .kb2-drop-zone { background: transparent !important; }
html[data-theme='light'] .kb2-drop-zone.drag-over { background: rgba(48,131,132,.06) !important; }
html[data-theme='light'] .kb2-new-btn { color: #8890a5 !important; border-color: #d5d8e3 !important; }
html[data-theme='light'] .kb2-new-btn:hover { color: var(--portal-accent) !important; border-color: var(--portal-accent) !important; }
html[data-theme='light'] .kb2-card { background: #fff !important; border: 1px solid #e2e5ef !important; box-shadow: 0 1px 3px rgba(0,0,0,.04) !important; }
html[data-theme='light'] .kb2-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; border-color: #c8cdd9 !important; }
html[data-theme='light'] .kb2-card-body { background: transparent !important; }
html[data-theme='light'] .kb2-card-name { color: #1a1a2e !important; }
html[data-theme='light'] .kb2-card-deal { color: #6b7280 !important; }
html[data-theme='light'] .kb2-metric { background: #f5f7fa !important; }
html[data-theme='light'] .kb2-metric-label { color: #8890a5 !important; }
html[data-theme='light'] .kb2-metric-val { color: #1a1a2e !important; }
html[data-theme='light'] .kb2-geo { color: #6b7280 !important; }
html[data-theme='light'] .kb2-assigned { color: #6b7280 !important; }
html[data-theme='light'] .kb2-empty { color: #8890a5 !important; }
html[data-theme='light'] .kb2-stat { background: #fff !important; border: 1px solid #e2e5ef !important; }
html[data-theme='light'] .kb2-stat-val { color: #1a1a2e !important; }
html[data-theme='light'] .kb2-stat-lbl { color: #6b7280 !important; }
html[data-theme='light'] .kb2-card-pri-bar { opacity: 1 !important; }
html[data-theme='light'] .kb2-card-footer { color: #6b7280 !important; }
html[data-theme='light'] .kb2-card-footer * { color: inherit !important; }
html[data-theme='light'] .kb2-badge { border: 1px solid #e2e5ef !important; }

/* Old kanban (kb-*) classes too */
html[data-theme='light'] .kb-col { background: #fff !important; border: 1px solid #e2e5ef !important; }
html[data-theme='light'] .kb-col-header { background: #f5f7fa !important; border-bottom: 1px solid #e2e5ef !important; }
html[data-theme='light'] .kb-col-title { color: #1a1a2e !important; }
html[data-theme='light'] .kb-col-count { color: #4a5068 !important; }
html[data-theme='light'] .kb-card { background: #fff !important; border: 1px solid #e2e5ef !important; box-shadow: 0 1px 3px rgba(0,0,0,.04) !important; }
html[data-theme='light'] .kb-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; }
html[data-theme='light'] .kb-card-title { color: #1a1a2e !important; }
html[data-theme='light'] .kb-card-meta { color: #6b7280 !important; }
html[data-theme='light'] .kb-card-val { color: #1a1a2e !important; }
html[data-theme='light'] .kb-card-ebitda { color: #8890a5 !important; }
html[data-theme='light'] .kb-empty { color: #8890a5 !important; }
html[data-theme='light'] .kb-drop-zone { background: transparent !important; }

/* Pipeline page specific */
html[data-theme='light'] .pipeline-page .content { background: #f5f7fa !important; }
html[data-theme='light'] .kb2-board-wrap { background: transparent !important; }
html[data-theme='light'] .kb2-board { background: transparent !important; }
html[data-theme='light'] .kb-board { background: transparent !important; }

/* Stats row above kanban */
html[data-theme='light'] .kb2-stats { background: transparent !important; }
html[data-theme='light'] .pipeline-stats { background: transparent !important; }

