/* ============================================================
   AlephIQ Dark / Light Theme
   Scoped under data-bs-theme="dark"|"light" on <html>.
   Loads after admin.css + common.css so all overrides win.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   SHARED TOKENS  (available in both modes via var(--aleph-*))
   We define the dark palette first; light palette is below.
   ───────────────────────────────────────────────────────────── */
:root {
  --aleph-teal:       #1AAFB3;
  --aleph-teal-hover: #20c4c8;
  --aleph-teal-soft:  rgba(26,175,179,.15);
  --aleph-teal-tint:  rgba(26,175,179,.08);
  --aleph-danger:     #ef4d5e;
  --aleph-danger-soft:rgba(239,77,94,.12);
  --aleph-success:    #36d399;
  --aleph-warn:       #f5c518;
}

/* ─────────────────────────────────────────────────────────────
   DARK MODE PALETTE  (set on [data-bs-theme="dark"])
   ───────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --aleph-bg:        #0b1220;
  --aleph-bg-2:      #0f1a2d;
  --aleph-surface:   #111c30;
  --aleph-surface-2: #16243d;
  --aleph-surface-3: #1c2c4a;
  --aleph-sidebar:   #0a1424;
  --aleph-sidebar-2: #0d1a30;
  --aleph-fg:        #e6edf6;
  --aleph-fg-2:      #aab6c9;
  --aleph-fg-3:      #6f7d94;
  --aleph-line:      #1f2f4d;
  --aleph-line-2:    #243758;
  --aleph-grid:      #1a2740;

  /* Override Bootstrap's dark palette to match aleph */
  --bs-body-bg:              var(--aleph-bg);
  --bs-body-color:           var(--aleph-fg);
  --bs-border-color:         var(--aleph-line);
  --bs-secondary-bg:         var(--aleph-surface-2);
  --bs-tertiary-bg:          var(--aleph-surface);
  --bs-card-bg:              var(--aleph-surface);
  --bs-card-border-color:    var(--aleph-line);
  --bs-dropdown-bg:          var(--aleph-surface);
  --bs-dropdown-border-color:var(--aleph-line);
  --bs-dropdown-link-color:  var(--aleph-fg-2);
  --bs-dropdown-link-hover-bg: var(--aleph-surface-2);
  --bs-dropdown-link-hover-color: var(--aleph-fg);
  --bs-dropdown-divider-bg:  var(--aleph-line);
  --bs-link-color:           var(--aleph-teal);
  --bs-link-hover-color:     var(--aleph-teal-hover);
  --bs-table-color:          var(--aleph-fg);
  --bs-table-border-color:   var(--aleph-line);
  --bs-table-striped-bg:     rgba(255,255,255,.025);
  --bs-table-hover-bg:       var(--aleph-surface-2);

  /* AdminLTE sidebar tokens */
  --lte-sidebar-bg:                 var(--aleph-sidebar);
  --lte-sidebar-color:              var(--aleph-fg-2);
  --lte-sidebar-hover-color:        var(--aleph-fg);
  --lte-sidebar-active-color:       var(--aleph-teal);
  --lte-sidebar-hover-bg:           rgba(26,175,179,.06);
  --lte-sidebar-menu-active-bg:     rgba(26,175,179,.12);
  --lte-sidebar-menu-active-color:  var(--aleph-teal);
  --lte-sidebar-submenu-color:      var(--aleph-fg-2);
  --lte-sidebar-submenu-hover-color:var(--aleph-fg);
  --lte-sidebar-submenu-hover-bg:   rgba(26,175,179,.06);
  --lte-sidebar-submenu-active-color:var(--aleph-teal);
  --lte-sidebar-submenu-active-bg:  rgba(26,175,179,.12);
  --lte-sidebar-header-color:       var(--aleph-fg-3);
  --lte-main-header-bg:             var(--aleph-sidebar);
}

/* ─────────────────────────────────────────────────────────────
   LIGHT MODE PALETTE  (restore clean light values)
   ───────────────────────────────────────────────────────────── */
[data-bs-theme="light"] {
  --aleph-bg:        #f7f9fc;
  --aleph-bg-2:      #ffffff;
  --aleph-surface:   #ffffff;
  --aleph-surface-2: #f3f6fb;
  --aleph-surface-3: #ecf1f7;
  --aleph-sidebar:   #ffffff;
  --aleph-sidebar-2: #f7f9fc;
  --aleph-fg:        #0b1220;
  --aleph-fg-2:      #4a5666;
  --aleph-fg-3:      #7b8696;
  --aleph-line:      #e6ecf3;
  --aleph-line-2:    #d9e1ec;
  --aleph-grid:      #eef2f7;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE COMPONENT OVERRIDES
   ═══════════════════════════════════════════════════════════ */

/* ── Global text / body ── */
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body {
  background-color: #0b1220 !important;
  color: #e6edf6;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] button,
[data-bs-theme="dark"] input,
[data-bs-theme="dark"] optgroup,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] textarea {
  color: #e6edf6;
}

[data-bs-theme="dark"] body.layout-fixed {
  background: #0b1220 !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] .h6 {
  color: #e6edf6;
}

[data-bs-theme="dark"] a {
  color: var(--aleph-teal);
}
[data-bs-theme="dark"] a:hover {
  color: var(--aleph-teal-hover);
}

/* ── Preloader ── */
[data-bs-theme="dark"] #loading {
  background-color: #0b1220;
}

/* ── App wrapper ── */
[data-bs-theme="dark"] .app-main,
[data-bs-theme="dark"] .content-wrapper,
[data-bs-theme="dark"] .app-content {
  background: transparent;
}

/* ─────────────── HEADER ─────────────── */
[data-bs-theme="dark"] .alephiq-main-header {
  background: #0a1424 !important;
  border-bottom: 1px solid #1f2f4d;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

[data-bs-theme="dark"] .alephiq-main-header .nav-link {
  color: #aab6c9;
}
[data-bs-theme="dark"] .alephiq-main-header .nav-link:hover,
[data-bs-theme="dark"] .alephiq-main-header .nav-link:focus {
  background: #16243d;
  color: #e6edf6;
}

/* Market nav */
[data-bs-theme="dark"] .alephiq-market-slider .nav-link:hover,
[data-bs-theme="dark"] .alephiq-market-slider .nav-link:focus,
[data-bs-theme="dark"] .alephiq-market-compact .nav-link:hover,
[data-bs-theme="dark"] .alephiq-market-compact .nav-link:focus {
  background: rgba(26,175,179,.15);
  box-shadow: none;
  color: #1AAFB3;
}
[data-bs-theme="dark"] .alephiq-market-slider .nav-item.active .nav-link,
[data-bs-theme="dark"] .alephiq-market-slider .nav-item.index-type.active .nav-link {
  background: rgba(26,175,179,.12);
  color: #1AAFB3;
  box-shadow: none;
}
[data-bs-theme="dark"] li.nav-item.index-type.active {
  border-top-color: #1AAFB3;
}
[data-bs-theme="dark"] .alephiq-market-compact .nav-link {
  border-color: #243758;
  color: #aab6c9;
}

/* Header dropdowns */
[data-bs-theme="dark"] .alephiq-main-header .dropdown-menu {
  background: #111c30;
  border-color: #1f2f4d;
  box-shadow: 0 12px 28px rgba(0,0,0,.5);
}
[data-bs-theme="dark"] .alephiq-main-header .dropdown-header {
  color: #6f7d94;
}
[data-bs-theme="dark"] .alephiq-main-header .dropdown-item {
  color: #aab6c9;
}
[data-bs-theme="dark"] .alephiq-main-header .dropdown-item.active,
[data-bs-theme="dark"] .alephiq-main-header .dropdown-item:active,
[data-bs-theme="dark"] .alephiq-main-header .dropdown-item:hover,
[data-bs-theme="dark"] .alephiq-main-header .dropdown-item:focus {
  background: rgba(26,175,179,.12);
  color: #1AAFB3;
}
[data-bs-theme="dark"] .dropdown-divider {
  border-color: #1f2f4d;
}

/* ─────────────── SIDEBAR ─────────────── */
[data-bs-theme="dark"] .alephiq-sidebar {
  background: #0a1424 !important;
  border-right: 1px solid #1f2f4d;
  box-shadow: none;
}
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-brand {
  background: #0a1424;
  border-bottom: 1px solid #1f2f4d;
}
[data-bs-theme="dark"] .alephiq-brand-link .brand-text {
  color: #e6edf6;
}
[data-bs-theme="dark"] .alephiq-sidebar .user-panel {
  border-bottom-color: #1f2f4d !important;
}
[data-bs-theme="dark"] .alephiq-sidebar .user-panel .info > a {
  color: #e6edf6;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-icon {
  color: #6f7d94;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-header {
  color: #6f7d94 !important;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-link {
  color: #aab6c9;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-link p {
  color: #aab6c9;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:hover,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:focus {
  background: rgba(26,175,179,.06) !important;
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:hover p,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:focus p,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:hover .nav-icon,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link:focus .nav-icon {
  color: #e6edf6 !important;
}

/* Active nav link */
[data-bs-theme="dark"] .alephiq-sidebar .nav-link.active,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item:hover > .nav-link.active,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item > .nav-link.active:focus,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link.active {
  background: rgba(26,175,179,.12) !important;
  box-shadow: inset 3px 0 0 #1AAFB3;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-link.active p,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link.active .nav-icon,
[data-bs-theme="dark"] .alephiq-sidebar .nav-link.active .nav-arrow,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item:hover > .nav-link.active p,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item > .nav-link.active:focus p,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link.active p,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item:hover > .nav-link.active .nav-icon,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item > .nav-link.active:focus .nav-icon,
[data-bs-theme="dark"] .alephiq-sidebar .sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link.active .nav-icon {
  color: #1AAFB3 !important;
}

/* Treeview */
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link { color: #aab6c9; }
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link:hover,
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link:focus {
  background: rgba(26,175,179,.06) !important;
  color: #e6edf6;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link.active,
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link.active:hover,
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link.active:focus {
  background: rgba(26,175,179,.12) !important;
  color: #1AAFB3;
  box-shadow: none;
}
[data-bs-theme="dark"] .alephiq-sidebar .nav-treeview > .nav-item > .nav-link.active .nav-icon {
  color: #1AAFB3;
}

/* ─────────────── CARDS ─────────────── */
[data-bs-theme="dark"] .card {
  background: #111c30 !important;
  border-color: #1f2f4d !important;
  color: #e6edf6;
}
[data-bs-theme="dark"] .card-header {
  background: transparent !important;
  border-bottom-color: #1f2f4d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .card-footer {
  background: transparent !important;
  border-top-color: #1f2f4d;
}
[data-bs-theme="dark"] .card-title {
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .card-text,
[data-bs-theme="dark"] .card-body {
  color: #e6edf6;
}
[data-bs-theme="dark"] .card-outline.card-primary,
[data-bs-theme="dark"] .card-outline.card-info {
  border-top-color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .card-outline.card-danger {
  border-top-color: #ef4d5e !important;
}
[data-bs-theme="dark"] .card-outline.card-success {
  border-top-color: #36d399 !important;
}
[data-bs-theme="dark"] .card-outline.card-warning {
  border-top-color: #f5c518 !important;
}

/* Small/info box */
[data-bs-theme="dark"] .small-box,
[data-bs-theme="dark"] .info-box {
  background: #111c30 !important;
  color: #e6edf6;
}

/* ─────────────── FOOTER ─────────────── */
[data-bs-theme="dark"] .app-footer {
  background: #0a1424 !important;
  border-top: 1px solid #1f2f4d;
  color: #6f7d94;
}
[data-bs-theme="dark"] .app-footer a {
  color: #1AAFB3;
}

/* ─────────────── SECTION / MISC ─────────────── */
[data-bs-theme="dark"] .section-main-data {
  background: #111c30 !important;
  box-shadow: 0 5px 10px rgba(0,0,0,.3);
}
[data-bs-theme="dark"] .main-index-text {
  background: transparent;
}

/* ─────────────── FORMS ─────────────── */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #16243d !important;
  border-color: #243758 !important;
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #16243d !important;
  border-color: #1AAFB3 !important;
  color: #e6edf6 !important;
  box-shadow: 0 0 0 3px rgba(26,175,179,.2) !important;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #6f7d94; }
[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled {
  background-color: #1c2c4a !important;
  color: #6f7d94 !important;
}
[data-bs-theme="dark"] .form-check-input {
  background-color: #16243d;
  border-color: #243758;
}
[data-bs-theme="dark"] .form-check-input:checked {
  background-color: #1AAFB3;
  border-color: #1AAFB3;
}
[data-bs-theme="dark"] .form-check-label { color: #e6edf6; }
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label { color: #aab6c9; }
[data-bs-theme="dark"] .input-group-text {
  background-color: #16243d;
  border-color: #243758;
  color: #aab6c9;
}
[data-bs-theme="dark"] fieldset legend,
[data-bs-theme="dark"] .form-text {
  color: #6f7d94;
}

/* ─────────────── BUTTONS ─────────────── */
[data-bs-theme="dark"] .btn-primary {
  background: #1AAFB3 !important;
  border-color: #1AAFB3 !important;
  color: #06222a !important;
}
[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus {
  background: #20c4c8 !important;
  border-color: #20c4c8 !important;
}
[data-bs-theme="dark"] .btn-outline-primary {
  border-color: #1AAFB3 !important;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
  background: rgba(26,175,179,.15) !important;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .btn-secondary {
  background: #16243d !important;
  border-color: #243758 !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #243758 !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background: #16243d !important;
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .btn-light {
  background: #16243d !important;
  border-color: #243758 !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .btn-outline-light {
  border-color: #243758 !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ─────────────── TABLES ─────────────── */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] table.dataTable {
  --bs-table-color: #e6edf6;
  --bs-table-bg: transparent;
  --bs-table-border-color: #1f2f4d;
  color: #e6edf6;
  border-color: #1f2f4d;
}
[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] table.dataTable > :not(caption) > * > * {
  border-bottom-color: #1f2f4d;
  background-color: transparent;
  color: #e6edf6;
}
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table.dataTable thead th {
  background: #16243d !important;
  color: #aab6c9;
  border-bottom-color: #243758 !important;
}
[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="dark"] .table tbody th {
  color: #e6edf6;
  border-bottom-color: #1f2f4d;
}
[data-bs-theme="dark"] .table tbody tr:hover > td,
[data-bs-theme="dark"] table.dataTable tbody tr:hover > td {
  background-color: #1c2c4a !important;
  color: #e6edf6;
}
[data-bs-theme="dark"] table.dataTable.display tbody tr:hover > .sorting_1 {
  background-color: #1c2c4a !important;
}
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd,
[data-bs-theme="dark"] table.dataTable.display tbody tr.odd {
  background-color: rgba(22,36,61,.5) !important;
  color: #e6edf6;
}
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *:hover {
  background-color: #1c2c4a !important;
}

/* DataTables fixed columns */
[data-bs-theme="dark"] table.DTFC_Cloned thead,
[data-bs-theme="dark"] table.DTFC_Cloned tfoot,
[data-bs-theme="dark"] div.DTFC_Blocker {
  background-color: #111c30 !important;
}
[data-bs-theme="dark"] table.DTFC_Cloned tbody tr {
  background-color: #111c30 !important;
}
[data-bs-theme="dark"] table.DTFC_Cloned tbody td,
[data-bs-theme="dark"] table.DTFC_Cloned tbody th {
  background-color: #111c30 !important;
  color: #e6edf6 !important;
  border-bottom-color: #1f2f4d !important;
}
[data-bs-theme="dark"] table.DTFC_Cloned tbody tr:hover td,
[data-bs-theme="dark"] table.DTFC_Cloned tbody tr:hover th {
  background-color: #1c2c4a !important;
}
[data-bs-theme="dark"] .DTFC_LeftWrapper,
[data-bs-theme="dark"] .DTFC_RightWrapper {
  background-color: #111c30 !important;
}

/* ─────────────── DATATABLES CONTROLS ─────────────── */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
  background: #16243d !important;
  border-color: #243758 !important;
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select:focus {
  border-color: #1AAFB3 !important;
  box-shadow: 0 0 0 0.2rem rgba(26,175,179,.18) !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
  color: #aab6c9;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #aab6c9 !important;
  border-radius: 0.6rem !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(26,175,179,.15) !important;
  border: none !important;
  box-shadow: none;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: rgba(26,175,179,.22) !important;
  border: none !important;
  color: #1AAFB3 !important;
  box-shadow: none;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #6f7d94 !important;
  background: transparent !important;
}

/* ─────────────── SCROLLBARS ─────────────── */
[data-bs-theme="dark"] .market-data-table-wrap,
[data-bs-theme="dark"] .table-responsive {
  scrollbar-color: rgba(26,175,179,.5) rgba(22,36,61,.75);
}
[data-bs-theme="dark"] .market-data-table-wrap::-webkit-scrollbar-track,
[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar-track {
  background: rgba(22,36,61,.85);
  border-radius: 999px;
}
[data-bs-theme="dark"] .market-data-table-wrap::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(26,175,179,.65) 0%, rgba(26,175,179,.45) 100%);
  border-radius: 999px;
}

/* ─────────────── ALERTS ─────────────── */
[data-bs-theme="dark"] .alert {
  border-color: #243758;
  color: #e6edf6;
}
[data-bs-theme="dark"] .alert-info {
  background: rgba(26,175,179,.1);
  border-color: rgba(26,175,179,.3);
  color: #66d4d6;
}
[data-bs-theme="dark"] .alert-success {
  background: rgba(54,211,153,.1);
  border-color: rgba(54,211,153,.3);
  color: #36d399;
}
[data-bs-theme="dark"] .alert-warning {
  background: rgba(245,197,24,.1);
  border-color: rgba(245,197,24,.3);
  color: #f5c518;
}
[data-bs-theme="dark"] .alert-danger {
  background: rgba(239,77,94,.1);
  border-color: rgba(239,77,94,.3);
  color: #ef4d5e;
}
[data-bs-theme="dark"] .alert-primary {
  background: rgba(26,175,179,.1);
  border-color: rgba(26,175,179,.3);
  color: #66d4d6;
}

/* ─────────────── BADGES ─────────────── */
[data-bs-theme="dark"] .badge.text-bg-secondary,
[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #16243d !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .badge.text-bg-light,
[data-bs-theme="dark"] .badge.bg-light {
  background-color: #16243d !important;
  color: #aab6c9 !important;
}

/* ─────────────── TOASTS ─────────────── */
[data-bs-theme="dark"] .toast {
  background: #111c30;
  border-color: #1f2f4d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .toast-body { color: #e6edf6; }

/* ─────────────── NAV TABS / PILLS ─────────────── */
[data-bs-theme="dark"] .nav-tabs {
  border-bottom-color: #1f2f4d;
}
[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #aab6c9;
  border-color: transparent;
}
[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  border-color: #1f2f4d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background: #111c30;
  border-color: #1f2f4d #1f2f4d #111c30;
  color: #1AAFB3;
}
[data-bs-theme="dark"] .nav-pills .nav-link {
  color: #aab6c9;
}
[data-bs-theme="dark"] .nav-pills .nav-link.active,
[data-bs-theme="dark"] .nav-pills .show > .nav-link {
  background: #1AAFB3;
  color: #06222a;
}

/* ─────────────── ACCORDIONS ─────────────── */
[data-bs-theme="dark"] .accordion-item {
  background: #111c30;
  border-color: #1f2f4d;
}
[data-bs-theme="dark"] .accordion-button {
  background: #16243d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background: rgba(26,175,179,.1);
  color: #1AAFB3;
  box-shadow: inset 0 -1px 0 #1f2f4d;
}
[data-bs-theme="dark"] .accordion-body {
  background: #111c30;
  color: #e6edf6;
}

/* ─────────────── MODALS ─────────────── */
[data-bs-theme="dark"] .modal-content {
  background: #111c30;
  border-color: #1f2f4d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .modal-header {
  border-bottom-color: #1f2f4d;
}
[data-bs-theme="dark"] .modal-footer {
  border-top-color: #1f2f4d;
}

/* ─────────────── PAGINATION ─────────────── */
[data-bs-theme="dark"] .page-link {
  background: #16243d;
  border-color: #243758;
  color: #aab6c9;
}
[data-bs-theme="dark"] .page-link:hover {
  background: rgba(26,175,179,.15);
  border-color: #1AAFB3;
  color: #1AAFB3;
}
[data-bs-theme="dark"] .page-item.active .page-link {
  background: #1AAFB3;
  border-color: #1AAFB3;
  color: #06222a;
}
[data-bs-theme="dark"] .page-item.disabled .page-link {
  background: #111c30;
  border-color: #1f2f4d;
  color: #6f7d94;
}

/* ─────────────── LIST GROUPS ─────────────── */
[data-bs-theme="dark"] .list-group-item {
  background: #111c30;
  border-color: #1f2f4d;
  color: #e6edf6;
}
[data-bs-theme="dark"] .list-group-item:hover {
  background: #16243d;
}
[data-bs-theme="dark"] .list-group-item.active {
  background: rgba(26,175,179,.15);
  border-color: rgba(26,175,179,.3);
  color: #1AAFB3;
}

/* ─────────────── BREADCRUMBS ─────────────── */
[data-bs-theme="dark"] .breadcrumb-item { color: #aab6c9; }
[data-bs-theme="dark"] .breadcrumb-item.active { color: #6f7d94; }
[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: #6f7d94; }

/* ─────────────── TEXT UTILITIES ─────────────── */
[data-bs-theme="dark"] .text-muted { color: #6f7d94 !important; }
[data-bs-theme="dark"] .text-dark { color: #e6edf6 !important; }
[data-bs-theme="dark"] .text-body { color: #e6edf6 !important; }
[data-bs-theme="dark"] .text-body-secondary { color: #aab6c9 !important; }
[data-bs-theme="dark"] .text-body-tertiary { color: #6f7d94 !important; }
[data-bs-theme="dark"] small, [data-bs-theme="dark"] .small { color: #aab6c9; }

/* ─────────────── BACKGROUND UTILITIES ─────────────── */
[data-bs-theme="dark"] .bg-white { background-color: #111c30 !important; }
[data-bs-theme="dark"] .bg-light { background-color: #16243d !important; }
[data-bs-theme="dark"] .bg-body { background-color: #0b1220 !important; }
[data-bs-theme="dark"] .bg-body-secondary { background-color: #16243d !important; }
[data-bs-theme="dark"] .bg-body-tertiary { background-color: #111c30 !important; }

/* ─────────────── BORDERS ─────────────── */
[data-bs-theme="dark"] .border { border-color: #1f2f4d !important; }
[data-bs-theme="dark"] .border-top { border-top-color: #1f2f4d !important; }
[data-bs-theme="dark"] .border-bottom { border-bottom-color: #1f2f4d !important; }

/* ─────────────── COOKIE BANNER ─────────────── */
[data-bs-theme="dark"] #CookielawBanner {
  background: #0a1424;
  border-top: 1px solid #1f2f4d;
}

/* ─────────────── BACKTEST HOME WIDGET ─────────────── */
[data-bs-theme="dark"] .bt-home-tab {
  background: #16243d !important;
  border-color: #243758 !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] .bt-home-tab.active {
  background: #1AAFB3 !important;
  border-color: #1AAFB3 !important;
  color: #06222a !important;
}
[data-bs-theme="dark"] .bt-stat-lbl,
[data-bs-theme="dark"] .bt-stat-sub { color: #6f7d94; }

/* bt-panel inline background */
[data-bs-theme="dark"] [style*="background:#F9FBFC"],
[data-bs-theme="dark"] [style*="background: #F9FBFC"],
[data-bs-theme="dark"] [style*="background:#f9fbfc"] {
  background: #16243d !important;
  border-color: #243758 !important;
}
[data-bs-theme="dark"] [style*="color:#0A1A2C"],
[data-bs-theme="dark"] [style*="color: #0A1A2C"],
[data-bs-theme="dark"] [style*="color:#0a1a2c"] {
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] [style*="color:#6B7886"],
[data-bs-theme="dark"] [style*="color: #6B7886"],
[data-bs-theme="dark"] [style*="color:#6b7886"] {
  color: #6f7d94 !important;
}

/* ─────────────── SELECT2 DARK MODE ─────────────── */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
  background-color: #16243d !important;
  border: 1px solid #243758 !important;
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #6f7d94 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-top-color: #6f7d94 !important;
}
[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-bottom-color: #6f7d94 !important;
}
[data-bs-theme="dark"] .select2-dropdown {
  background-color: #111c30 !important;
  border: 1px solid #243758 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #16243d !important;
  border: 1px solid #243758 !important;
  color: #e6edf6 !important;
  outline: none;
}
[data-bs-theme="dark"] .select2-container--default .select2-results__option {
  color: #aab6c9 !important;
  background: transparent !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: rgba(26,175,179,.15) !important;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: rgba(26,175,179,.1) !important;
  color: #1AAFB3 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: rgba(26,175,179,.15) !important;
  border-color: rgba(26,175,179,.3) !important;
  color: #1AAFB3 !important;
}

/* ─────────────── STATUS CHIPS (api-availability, ingestion-config) ─────────────── */
/* Override light-mode status badges with dark equivalents */
[data-bs-theme="dark"] [style*="background: #d4edda"],
[data-bs-theme="dark"] [style*="background:#d4edda"],
[data-bs-theme="dark"] [style*="background: #dcfce7"],
[data-bs-theme="dark"] [style*="background:#dcfce7"],
[data-bs-theme="dark"] [style*="background: #e8f7ef"],
[data-bs-theme="dark"] [style*="background:#e8f7ef"],
[data-bs-theme="dark"] [style*="background: #d1fae5"],
[data-bs-theme="dark"] [style*="background:#d1fae5"] {
  background: rgba(54,211,153,.12) !important;
  border-color: rgba(54,211,153,.3) !important;
  color: #36d399 !important;
}
[data-bs-theme="dark"] [style*="color: #155724"],
[data-bs-theme="dark"] [style*="color:#155724"],
[data-bs-theme="dark"] [style*="color: #166534"],
[data-bs-theme="dark"] [style*="color:#166534"] {
  color: #36d399 !important;
}
[data-bs-theme="dark"] [style*="background: #fff3cd"],
[data-bs-theme="dark"] [style*="background:#fff3cd"],
[data-bs-theme="dark"] [style*="background: #fef3c7"],
[data-bs-theme="dark"] [style*="background:#fef3c7"],
[data-bs-theme="dark"] [style*="background: #ffedd5"],
[data-bs-theme="dark"] [style*="background:#ffedd5"] {
  background: rgba(245,197,24,.1) !important;
  border-color: rgba(245,197,24,.3) !important;
  color: #f5c518 !important;
}
[data-bs-theme="dark"] [style*="color: #856404"],
[data-bs-theme="dark"] [style*="color:#856404"] {
  color: #f5c518 !important;
}
[data-bs-theme="dark"] [style*="background: #f8d7da"],
[data-bs-theme="dark"] [style*="background:#f8d7da"],
[data-bs-theme="dark"] [style*="background: #fee2e2"],
[data-bs-theme="dark"] [style*="background:#fee2e2"],
[data-bs-theme="dark"] [style*="background: #fecaca"],
[data-bs-theme="dark"] [style*="background:#fecaca"] {
  background: rgba(239,77,94,.1) !important;
  border-color: rgba(239,77,94,.3) !important;
  color: #ef4d5e !important;
}
[data-bs-theme="dark"] [style*="color: #721c24"],
[data-bs-theme="dark"] [style*="color:#721c24"] {
  color: #ef4d5e !important;
}
[data-bs-theme="dark"] [style*="background: #e9ecef"],
[data-bs-theme="dark"] [style*="background:#e9ecef"],
[data-bs-theme="dark"] [style*="background: #f3f4f6"],
[data-bs-theme="dark"] [style*="background:#f3f4f6"] {
  background: rgba(111,125,148,.12) !important;
  border-color: rgba(111,125,148,.25) !important;
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] [style*="color: #495057"],
[data-bs-theme="dark"] [style*="color:#495057"] {
  color: #aab6c9 !important;
}

/* ─────────────── PROFILE PAGE ─────────────── */
[data-bs-theme="dark"] [style*="background: #fff"],
[data-bs-theme="dark"] [style*="background:#fff"],
[data-bs-theme="dark"] [style*="background: #ffffff"],
[data-bs-theme="dark"] [style*="background:#ffffff"],
[data-bs-theme="dark"] [style*="background: #fbfcfe"],
[data-bs-theme="dark"] [style*="background:#fbfcfe"] {
  background: #111c30 !important;
}
[data-bs-theme="dark"] [style*="border: 1px solid #E2E8EC"],
[data-bs-theme="dark"] [style*="border:1px solid #E2E8EC"],
[data-bs-theme="dark"] [style*="border: 1px solid #EEF2F5"],
[data-bs-theme="dark"] [style*="border-bottom: 1px solid #EEF2F5"] {
  border-color: #1f2f4d !important;
}
[data-bs-theme="dark"] [style*="background: #F4F7F9"],
[data-bs-theme="dark"] [style*="background:#F4F7F9"],
[data-bs-theme="dark"] [style*="background: rgba(244,247,249"] {
  background: #16243d !important;
}
[data-bs-theme="dark"] [style*="background: #E6F6EE"],
[data-bs-theme="dark"] [style*="background:#E6F6EE"] {
  background: rgba(54,211,153,.1) !important;
}

/* ─────────────── TRADE-EXECUTION-CONFIG TABLE ─────────────── */
[data-bs-theme="dark"] [style*="background: #f8fbff"],
[data-bs-theme="dark"] [style*="background:#f8fbff"],
[data-bs-theme="dark"] [style*="background: #f2f7ff"],
[data-bs-theme="dark"] [style*="background:#f2f7ff"],
[data-bs-theme="dark"] [style*="background: #f9fafb"],
[data-bs-theme="dark"] [style*="background:#f9fafb"],
[data-bs-theme="dark"] [style*="background: #f8fafc"],
[data-bs-theme="dark"] [style*="background:#f8fafc"],
[data-bs-theme="dark"] [style*="background: #fcfdff"],
[data-bs-theme="dark"] [style*="background:#fcfdff"],
[data-bs-theme="dark"] [style*="background: #f9fbff"],
[data-bs-theme="dark"] [style*="background:#f9fbff"],
[data-bs-theme="dark"] [style*="background: #f6faff"],
[data-bs-theme="dark"] [style*="background:#f6faff"] {
  background: #111c30 !important;
}
[data-bs-theme="dark"] [style*="background: #eef6ff"],
[data-bs-theme="dark"] [style*="background:#eef6ff"],
[data-bs-theme="dark"] [style*="background: #dbeafe"],
[data-bs-theme="dark"] [style*="background:#dbeafe"],
[data-bs-theme="dark"] [style*="background: #e2ecff"],
[data-bs-theme="dark"] [style*="background:#e2ecff"],
[data-bs-theme="dark"] [style*="background: #edf4ff"],
[data-bs-theme="dark"] [style*="background:#edf4ff"] {
  background: rgba(26,175,179,.08) !important;
  border-color: rgba(26,175,179,.2) !important;
}
[data-bs-theme="dark"] [style*="background: linear-gradient(180deg, #f2f7ff"],
[data-bs-theme="dark"] [style*="background:linear-gradient(180deg, #f2f7ff"] {
  background: #16243d !important;
}
[data-bs-theme="dark"] [style*="color: #0f172a"],
[data-bs-theme="dark"] [style*="color:#0f172a"],
[data-bs-theme="dark"] [style*="color: #1f2937"],
[data-bs-theme="dark"] [style*="color:#1f2937"],
[data-bs-theme="dark"] [style*="color: #111827"],
[data-bs-theme="dark"] [style*="color:#111827"] {
  color: #e6edf6 !important;
}
[data-bs-theme="dark"] [style*="color: #6b7280"],
[data-bs-theme="dark"] [style*="color:#6b7280"],
[data-bs-theme="dark"] [style*="color: #374151"],
[data-bs-theme="dark"] [style*="color:#374151"] {
  color: #aab6c9 !important;
}
[data-bs-theme="dark"] [style*="border: 1px solid #d7e3f3"],
[data-bs-theme="dark"] [style*="border:1px solid #d7e3f3"],
[data-bs-theme="dark"] [style*="border-color: #d7e3f3"],
[data-bs-theme="dark"] [style*="border-color:#d7e3f3"] {
  border-color: #1f2f4d !important;
}
[data-bs-theme="dark"] [style*="background: #e2ecff; color: #1e3a8a"],
[data-bs-theme="dark"] [style*="background:#e2ecff;color:#1e3a8a"] {
  background: rgba(26,175,179,.1) !important;
  color: #1AAFB3 !important;
}

/* ─────────────── SETTINGS DROPDOWN ACTIVE INDICATOR ─────────────── */
.alephiq-settings-btn .dropdown-item .theme-check { display: none; }
[data-bs-theme="dark"]  .alephiq-settings-btn .dropdown-item[data-theme="dark"]  .theme-check { display: inline; }
[data-bs-theme="light"] .alephiq-settings-btn .dropdown-item[data-theme="light"] .theme-check { display: inline; }

/* ─────────────── DTFC CLONE: fix all cell border sides in dark mode ─────────────── */
[data-bs-theme="dark"] table.DTFC_Cloned tbody td,
[data-bs-theme="dark"] table.DTFC_Cloned tbody th {
  border-color: #1f2f4d !important;
}
[data-bs-theme="dark"] table.DTFC_Cloned thead td,
[data-bs-theme="dark"] table.DTFC_Cloned thead th,
[data-bs-theme="dark"] table.DTFC_Cloned tfoot td,
[data-bs-theme="dark"] table.DTFC_Cloned tfoot th {
  border-color: #243758 !important;
}

/* ─────────────── TOAST WARNING: dark text on yellow background ─────────────── */
.toast-warning,
.toast-warning .toast-title,
.toast-warning .toast-message {
  color: #3a2800 !important;
}
.toast-warning .toast-close-button { color: #3a2800 !important; opacity: 0.7; }
.toast-warning .toast-close-button:hover { opacity: 1; }

/* ─────────────── ADMIN CONTACT MESSAGES: inline color on message cell ─────────────── */
[data-bs-theme="dark"] td[style*="color:#3A4A5A"],
[data-bs-theme="dark"] td[style*="color: #3A4A5A"] {
  color: #aab6c9 !important;
}

/* ─────────────── AUTH PAGES (account/base.html) au- component dark overrides ─────────────── */
[data-bs-theme="dark"] .au-notice {
  background: var(--aleph-bg) !important;
}
[data-bs-theme="dark"] .au-notice-card {
  background: #111c30 !important;
  border-color: #1f2f4d !important;
  color: #e6edf6;
}
[data-bs-theme="dark"] .au-notice-title { color: #e6edf6; }
[data-bs-theme="dark"] .au-notice-text  { color: #aab6c9; }
[data-bs-theme="dark"] .au-notice-icon  { background: #16243d; }
[data-bs-theme="dark"] .au-submit:not(.is-primary) {
  background: #16243d;
  color: #e6edf6;
  border: 1.5px solid #243758;
}
[data-bs-theme="dark"] .au-submit:not(.is-primary):hover { background: #1c2c4a; }
[data-bs-theme="dark"] .au-frame  { background: var(--aleph-bg) !important; }
[data-bs-theme="dark"] .au-right  { background: var(--aleph-bg) !important; }
[data-bs-theme="dark"] .au-input  { background: #16243d !important; color: #e6edf6 !important; border-color: #243758 !important; }
[data-bs-theme="dark"] .au-input::placeholder { color: #6f7d94 !important; }
[data-bs-theme="dark"] .au-social-btn { background: #16243d !important; color: #e6edf6 !important; border-color: #243758 !important; }
[data-bs-theme="dark"] .au-card  { background: #111c30 !important; border-color: #1f2f4d !important; }
[data-bs-theme="dark"] .au-card-title { color: #e6edf6; }
[data-bs-theme="dark"] .au-card-sub   { color: #aab6c9; }
[data-bs-theme="dark"] .au-side  { background: #111c30 !important; border-right-color: #1f2f4d !important; }
[data-bs-theme="dark"] .au-mini-btn { background: #16243d !important; color: #e6edf6 !important; border-color: #243758 !important; }
[data-bs-theme="dark"] .au-mini-btn.danger { border-color: #ef4d5e !important; color: #ef4d5e !important; }
[data-bs-theme="dark"] .au-form-wrap .form-control,
[data-bs-theme="dark"] .au-form-wrap input[type=text],
[data-bs-theme="dark"] .au-form-wrap input[type=email],
[data-bs-theme="dark"] .au-form-wrap input[type=password] {
  background: #16243d !important; color: #e6edf6 !important; border-color: #243758 !important;
}
[data-bs-theme="dark"] .au-form-wrap label { color: #aab6c9; }
[data-bs-theme="dark"] .au-form-title { color: #e6edf6; }
[data-bs-theme="dark"] .au-form-sub  { color: #aab6c9; }

/* ─────────────── LEGAL PAGES: .aiq-doc-content text ─────────────── */
[data-bs-theme="dark"] .aiq-doc-content         { color: #aab6c9; }
[data-bs-theme="dark"] .aiq-doc-content h2       { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-doc-content strong   { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-doc-content a        { color: #1AAFB3; }
[data-bs-theme="dark"] .aiq-doc-content ul li::marker { color: #1AAFB3; }

/* ─────────────── CAREERS PAGE ─────────────── */
[data-bs-theme="dark"] .aiq-section-tint { background: #111c30; }
[data-bs-theme="dark"] .aiq-section-title { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-value-card {
  background: #111c30;
  border-color: #1f2f4d;
}
[data-bs-theme="dark"] .aiq-value-card h3 { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-value-card p  { color: #6f7d94; }
[data-bs-theme="dark"] .aiq-role-row { border-top-color: #1f2f4d; color: #e6edf6; }
[data-bs-theme="dark"] .aiq-role-row:last-child { border-bottom-color: #1f2f4d; }
[data-bs-theme="dark"] .aiq-role-title { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-role-meta  { color: #6f7d94; }
[data-bs-theme="dark"] .aiq-role-tag   { background: rgba(26,175,179,.15); color: #1AAFB3; }
[data-bs-theme="dark"] .aiq-role-arrow { color: #6f7d94; }

/* ─────────────── CONTACT US FORM ─────────────── */
[data-bs-theme="dark"] .aiq-contact-form-card {
  background: #111c30;
  border-color: #1f2f4d;
}
[data-bs-theme="dark"] .aiq-contact-form-card h2 { color: #e6edf6; }
[data-bs-theme="dark"] .aiq-contact-form-card > p { color: #6f7d94; }
[data-bs-theme="dark"] .aiq-field span { color: #6f7d94; }
[data-bs-theme="dark"] .aiq-field input,
[data-bs-theme="dark"] .aiq-field textarea,
[data-bs-theme="dark"] .aiq-field select {
  background: #16243d;
  border-color: #243758;
  color: #e6edf6;
}
[data-bs-theme="dark"] .aiq-field input::placeholder,
[data-bs-theme="dark"] .aiq-field textarea::placeholder { color: #6f7d94; }
[data-bs-theme="dark"] .aiq-success-banner {
  background: rgba(54,211,153,.1);
  border-color: rgba(54,211,153,.3);
  color: #36d399;
}

/* ─────────────── API-AVAILABILITY BADGES ─────────────── */
[data-bs-theme="dark"] .api-badge-ok   { background: rgba(54,211,153,.12); color: #36d399; }
[data-bs-theme="dark"] .api-badge-muted { background: rgba(111,125,148,.14); color: #aab6c9; }
[data-bs-theme="dark"] .api-badge-warn  { background: rgba(245,197,24,.12); color: #f5c518; }
[data-bs-theme="dark"] .api-badge-bad   { background: rgba(239,77,94,.12); color: #ef4d5e; }

/* ─────────────── TRADE-EXECUTION-CONFIG: section card + symbol chips ─────────────── */
[data-bs-theme="dark"] .symbol-summary-panel {
  background: #111c30;
  border-color: #1f2f4d;
}
[data-bs-theme="dark"] .symbol-summary-header { color: #aab6c9; }
[data-bs-theme="dark"] .symbol-chip {
  background: rgba(26,175,179,.1);
  color: #1AAFB3;
  border-color: rgba(26,175,179,.3);
}
[data-bs-theme="dark"] .symbol-chip-more {
  background: #16243d;
  color: #6f7d94;
  border-color: #243758;
}
[data-bs-theme="dark"] select[data-role='symbols-multiselect'] option.symbol-db-active {
  background-color: #16243d;
  color: #1AAFB3;
}
/* Log terminal: light-mode override so it's visible in light mode too */
[data-bs-theme="light"] #action-log-panel {
  border-color: #e6ecf3;
  background: #f7f9fc;
}
[data-bs-theme="light"] #action-log-panel .terminal-header {
  background: #eef2f7;
  color: #334155;
  border-bottom-color: #e6ecf3;
}
[data-bs-theme="light"] #action-log-output.terminal-output {
  background: #f0f4f8;
  color: #1e293b;
  scrollbar-color: #94a3b8 #e2e8f0;
}
[data-bs-theme="light"] #action-log-output.terminal-output::-webkit-scrollbar-track { background: #e2e8f0; }
[data-bs-theme="light"] #action-log-output.terminal-output::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  border-color: #e2e8f0;
}

/* ─────────── TRADE-EXECUTION-CONFIG: section cards + user grid ─────────── */
[data-bs-theme="dark"] .section-card {
  background: #111c30 !important;
  border-color: #1f2f4d !important;
  border-top-color: #2f80ed !important;
}
[data-bs-theme="dark"] .section-card > .card-header {
  background: #16243d !important;
  border-bottom-color: #1f2f4d !important;
}
[data-bs-theme="dark"] .section-card > .card-header h5,
[data-bs-theme="dark"] .section-card > .card-header strong { color: #e6edf6; }
[data-bs-theme="dark"] .section-card > .card-body { background: #111c30 !important; }
[data-bs-theme="dark"] .user-card-grid .user-choice-row {
  background: #16243d !important;
  border-color: #243758 !important;
}
[data-bs-theme="dark"] .user-card-grid .user-choice-row:hover {
  background: #1c2c4a !important;
  border-color: #2f4270 !important;
}
[data-bs-theme="dark"] .user-card-grid .user-choice-row.is-focused {
  background: #1c2c4a !important;
  border-color: #2f80ed !important;
}
[data-bs-theme="dark"] .user-card-title { color: #e6edf6; }
[data-bs-theme="dark"] tr.is-focused-user { background: #16243d; }

/* ─────────────── INGESTION-CONFIG: pc-badge + log viewer ─────────────── */
[data-bs-theme="dark"] .pc-badge    { background: rgba(111,125,148,.14); color: #aab6c9; }
[data-bs-theme="dark"] .pc-badge-ok   { background: rgba(54,211,153,.12); color: #36d399; }
[data-bs-theme="dark"] .pc-badge-warn { background: rgba(245,197,24,.12); color: #f5c518; }
[data-bs-theme="dark"] .pc-badge-bad  { background: rgba(239,77,94,.12); color: #ef4d5e; }
[data-bs-theme="dark"] .pc-badge-muted { background: rgba(111,125,148,.14); color: #6f7d94; }
[data-bs-theme="dark"] #process-control-log-viewer {
  background: #111c30;
  color: #aab6c9;
  border: 1px solid #1f2f4d;
  border-radius: 8px;
  padding: 10px 14px;
}
[data-bs-theme="light"] #process-control-log-viewer {
  background: #f7f9fc;
  color: #334155;
  border: 1px solid #e6ecf3;
  border-radius: 8px;
  padding: 10px 14px;
}
