/*
 * theme.css — InvoClouds eFiling
 * Indigo color system with light/dark mode support via [data-theme] attribute.
 * Loaded first so all downstream CSS files can reference --ic-* variables.
 */

/* ── LIGHT MODE (default) ── */
:root,
[data-theme="light"] {
  --ic-primary:           #533afd;
  --ic-primary-deep:      #4434d4;
  --ic-primary-press:     #2e2b8c;
  --ic-primary-soft:      #7c3aed;
  --ic-primary-bg:        rgba(83, 58, 253, 0.08);
  --ic-primary-border:    rgba(83, 58, 253, 0.20);

  --ic-bg-body:           #f8fafc;
  --ic-bg-card:           #ffffff;
  --ic-bg-sidebar:        #ffffff;
  --ic-bg-topbar:         #ffffff;
  --ic-bg-input:          #ffffff;
  --ic-bg-hover:          #f1f5f9;
  --ic-bg-subtle:         #f8fafc;

  --ic-text-primary:      #0f172a;
  --ic-text-secondary:    #475569;
  --ic-text-muted:        #94a3b8;
  --ic-text-on-primary:   #ffffff;

  --ic-border:            #e2e8f0;
  --ic-border-input:      #cbd5e1;
  --ic-border-focus:      #533afd;

  --ic-sidebar-text:      #64748b;
  --ic-sidebar-active-bg: rgba(83, 58, 253, 0.06);
  --ic-sidebar-active-text: #533afd;
  --ic-sidebar-active-border: #533afd;

  --ic-success:           #0d9488;
  --ic-success-bg:        rgba(13, 148, 136, 0.10);
  --ic-warning:           #d97706;
  --ic-warning-bg:        rgba(217, 119, 6, 0.10);
  --ic-info:              #2563eb;
  --ic-info-bg:           rgba(37, 99, 235, 0.10);
  --ic-danger:            #dc2626;
  --ic-danger-bg:         rgba(220, 38, 38, 0.10);

  --ic-gradient:          linear-gradient(135deg, #533afd 0%, #7c3aed 100%);
  --ic-gradient-bar:      linear-gradient(90deg, #533afd, #7c3aed);

  --ic-shadow:            0 1px 3px rgba(0, 55, 112, 0.08);
  --ic-shadow-md:         0 4px 16px rgba(0, 55, 112, 0.08), 0 1px 4px rgba(0, 55, 112, 0.04);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  /* Primary */
  --ic-primary:             #7c6fcd;
  --ic-primary-deep:        #533afd;
  --ic-primary-press:       #4434d4;
  --ic-primary-soft:        #a78bfa;
  --ic-primary-bg:          rgba(124, 111, 205, 0.14);
  --ic-primary-border:      rgba(124, 111, 205, 0.28);

  /* Backgrounds — layered, NOT all black */
  --ic-bg-body:             #0f1117;
  --ic-bg-card:             #1a1f2e;
  --ic-bg-sidebar:          #13151f;
  --ic-bg-topbar:           #13151f;
  --ic-bg-input:            #1e2436;
  --ic-bg-hover:            #252b3b;
  --ic-bg-subtle:           #161b28;
  --ic-bg-table-row:        #1a1f2e;
  --ic-bg-table-alt:        #1e2436;
  --ic-bg-table-hover:      #252b3b;

  /* Text — clear contrast hierarchy */
  --ic-text-primary:        #e2e8f0;
  --ic-text-secondary:      #94a3b8;
  --ic-text-muted:          #64748b;
  --ic-text-on-primary:     #ffffff;

  /* Borders — subtle but visible */
  --ic-border:              #2a3147;
  --ic-border-input:        #2e3650;
  --ic-border-focus:        #7c6fcd;

  /* Sidebar specific */
  --ic-sidebar-text:        #8892a4;
  --ic-sidebar-active-bg:   rgba(124, 111, 205, 0.15);
  --ic-sidebar-active-text: #a78bfa;
  --ic-sidebar-active-border: #7c6fcd;
  --ic-sidebar-section-hdr: #4a5568;

  /* Status colors — vivid enough to read on dark */
  --ic-success:             #34d399;
  --ic-success-bg:          rgba(52, 211, 153, 0.12);
  --ic-success-border:      rgba(52, 211, 153, 0.25);

  --ic-warning:             #fbbf24;
  --ic-warning-bg:          rgba(251, 191, 36, 0.12);
  --ic-warning-border:      rgba(251, 191, 36, 0.25);

  --ic-info:                #60a5fa;
  --ic-info-bg:             rgba(96, 165, 250, 0.12);
  --ic-info-border:         rgba(96, 165, 250, 0.25);

  --ic-danger:              #f87171;
  --ic-danger-bg:           rgba(248, 113, 113, 0.12);
  --ic-danger-border:       rgba(248, 113, 113, 0.25);

  --ic-pending:             #fbbf24;
  --ic-pending-bg:          rgba(251, 191, 36, 0.12);
  --ic-accepted:            #34d399;
  --ic-accepted-bg:         rgba(52, 211, 153, 0.12);
  --ic-rejected:            #f87171;
  --ic-rejected-bg:         rgba(248, 113, 113, 0.12);
  --ic-processing:          #60a5fa;
  --ic-processing-bg:       rgba(96, 165, 250, 0.12);

  /* Gradient */
  --ic-gradient:            linear-gradient(135deg, #533afd 0%, #7c3aed 100%);
  --ic-gradient-bar:        linear-gradient(90deg, #7c6fcd, #a78bfa);

  /* Shadows — visible on dark */
  --ic-shadow:              0 1px 4px rgba(0, 0, 0, 0.50);
  --ic-shadow-md:           0 4px 20px rgba(0, 0, 0, 0.40);
}

/* ── Bootstrap 5 primary override ── */
:root {
  --bs-primary:           #533afd;
  --bs-primary-rgb:       83, 58, 253;
  --bs-link-color:        #533afd;
  --bs-link-hover-color:  #4434d4;
}

.btn-primary {
  background-color: var(--ic-primary) !important;
  border-color: var(--ic-primary) !important;
  color: var(--ic-text-on-primary) !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--ic-primary-deep) !important;
  border-color: var(--ic-primary-deep) !important;
}
.btn-outline-primary {
  color: var(--ic-primary) !important;
  border-color: var(--ic-primary) !important;
}
.btn-outline-primary:hover {
  background-color: var(--ic-primary) !important;
  color: #fff !important;
}
.text-primary  { color: var(--ic-primary) !important; }
.bg-primary    { background-color: var(--ic-primary) !important; }
.border-primary { border-color: var(--ic-primary) !important; }
.badge.bg-primary { background-color: var(--ic-primary) !important; }

/* Card & page background for dark/light */
html, body {
  background-color: var(--ic-bg-body) !important;
  color: var(--ic-text-primary) !important;
}
.card, .card-body {
  background-color: var(--ic-bg-card) !important;
  border-color: var(--ic-border) !important;
  color: var(--ic-text-primary) !important;
}
.sidebar, #sidebar, .app-sidebar, nav.sidebar {
  background-color: var(--ic-bg-sidebar) !important;
  border-right-color: var(--ic-border) !important;
}
.navbar, .topbar, .top-bar, header {
  background-color: var(--ic-bg-topbar) !important;
  border-bottom-color: var(--ic-border) !important;
}
.form-control, .form-select {
  background-color: var(--ic-bg-input) !important;
  border-color: var(--ic-border-input) !important;
  color: var(--ic-text-primary) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ic-border-focus) !important;
  box-shadow: 0 0 0 3px rgba(83, 58, 253, 0.12) !important;
}
.table { color: var(--ic-text-primary) !important; }
.table > :not(caption) > * > * {
  background-color: var(--ic-bg-card) !important;
  border-color: var(--ic-border) !important;
}
.nav-link.active, .nav-item.active > .nav-link {
  color: var(--ic-sidebar-active-text) !important;
  background-color: var(--ic-sidebar-active-bg) !important;
  border-left-color: var(--ic-sidebar-active-border) !important;
}
.nav-link { color: var(--ic-sidebar-text) !important; }
.dropdown-menu {
  background-color: var(--ic-bg-card) !important;
  border-color: var(--ic-border) !important;
}
.dropdown-item { color: var(--ic-text-secondary) !important; }
.dropdown-item:hover { background-color: var(--ic-bg-hover) !important; }

/* Status badges */
.badge.bg-success, .badge.text-bg-success { background-color: var(--ic-success-bg) !important; color: var(--ic-success) !important; }
.badge.bg-warning, .badge.text-bg-warning { background-color: var(--ic-warning-bg) !important; color: var(--ic-warning) !important; }
.badge.bg-info,    .badge.text-bg-info    { background-color: var(--ic-info-bg) !important;    color: var(--ic-info) !important;    }
.badge.bg-danger,  .badge.text-bg-danger  { background-color: var(--ic-danger-bg) !important;  color: var(--ic-danger) !important;  }

/* Progress bars */
.progress-bar { background: var(--ic-gradient-bar) !important; }

/* Alerts */
.alert-primary { background-color: var(--ic-primary-bg) !important; border-color: var(--ic-primary-border) !important; color: var(--ic-primary) !important; }

/* Theme toggle button */
#theme-toggle {
  background: transparent;
  border: 1px solid var(--ic-border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--ic-text-secondary);
  font-size: 13px;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}
#theme-toggle:hover {
  background: var(--ic-bg-hover);
  border-color: var(--ic-primary);
}

/* ══════════════════════════════════════
   DARK MODE — dsh- component overrides
   ══════════════════════════════════════ */

/* Root wrapper */
[data-theme="dark"] .dsh-root,
[data-theme="dark"] body {
  background-color: #0f1117 !important;
  color: #e2e8f0 !important;
}

/* Topbar */
[data-theme="dark"] .dsh-topbar {
  background-color: #13151f !important;
  border-bottom: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-topbar-search input,
[data-theme="dark"] .dsh-topbar-search {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .dsh-topbar-btn {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .dsh-topbar-user-name { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-topbar-user-role { color: #64748b !important; }
[data-theme="dark"] .dsh-topbar-env {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .dsh-topbar-divider {
  border-color: #2a3147 !important;
  background-color: #2a3147 !important;
}

/* Sidebar */
[data-theme="dark"] .dsh-sidebar {
  background-color: #13151f !important;
  border-right: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-sidebar-logo { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-nav-section-label { color: #4a5568 !important; }
[data-theme="dark"] .dsh-nav-link {
  color: #8892a4 !important;
}
[data-theme="dark"] .dsh-nav-link:hover {
  color: #c4c9d4 !important;
  background-color: #1e2436 !important;
}
[data-theme="dark"] .dsh-nav-link.active,
[data-theme="dark"] .dsh-nav-link.dsh-active {
  color: #a78bfa !important;
  background-color: rgba(124,111,205,0.15) !important;
  border-left-color: #7c6fcd !important;
}

/* Help widget at bottom of sidebar */
[data-theme="dark"] .dsh-sidebar-help {
  background: #1e2436 !important;
  border: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-sidebar-help p,
[data-theme="dark"] .dsh-sidebar-help span { color: #94a3b8 !important; }

/* Page content background */
[data-theme="dark"] .dsh-page-content,
[data-theme="dark"] .dsh-main-col,
[data-theme="dark"] .dsh-page-grid,
[data-theme="dark"] .dsh-main-wrap {
  background-color: #0f1117 !important;
}

/* Greeting */
[data-theme="dark"] .dsh-greeting-text { color: #f1f5f9 !important; }
[data-theme="dark"] .dsh-greeting-text p,
[data-theme="dark"] .dsh-greeting-text small { color: #64748b !important; }
[data-theme="dark"] .dsh-datetime {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .dsh-btn-new-inc {
  background-color: #533afd !important;
  color: #fff !important;
  border-color: #533afd !important;
}

/* Stat cards */
[data-theme="dark"] .dsh-stat-card {
  background-color: #1a1f2e !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] .dsh-stat-value { color: #f1f5f9 !important; }
[data-theme="dark"] .dsh-stat-label { color: #64748b !important; }
[data-theme="dark"] .dsh-stat-trend { color: #475569 !important; }
[data-theme="dark"] .dsh-stat-icon {
  background-color: rgba(124,111,205,0.15) !important;
  color: #a78bfa !important;
}
[data-theme="dark"] .dsh-sparkline-wrap { opacity: 0.7; }

/* Quick actions */
[data-theme="dark"] .dsh-qa-item {
  background-color: #1a1f2e !important;
  border: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-qa-item:hover {
  background-color: #252b3b !important;
  border-color: rgba(124,111,205,0.4) !important;
}
[data-theme="dark"] .dsh-qa-icon { color: #7c6fcd !important; }
[data-theme="dark"] .dsh-qa-item span { color: #94a3b8 !important; }

/* Main content cards (Recent submissions, Recent filing requests) */
[data-theme="dark"] .dsh-card {
  background-color: #1a1f2e !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] .dsh-card-header {
  background-color: #1e2436 !important;
  border-bottom: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-card-title { color: #94a3b8 !important; }
[data-theme="dark"] .dsh-section-label { color: #f1f5f9 !important; }
[data-theme="dark"] .dsh-view-all { color: #7c6fcd !important; }

/* Right column cards (Today's summary, Performance, Announcements) */
[data-theme="dark"] .dsh-r-card {
  background-color: #1a1f2e !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[data-theme="dark"] .dsh-r-card-hd {
  background-color: #1e2436 !important;
  border-bottom: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-r-card-title { color: #94a3b8 !important; }
[data-theme="dark"] .dsh-r-card-title-icon { color: #7c6fcd !important; }
[data-theme="dark"] .dsh-r-card-body { color: #94a3b8 !important; }

/* Today's summary rows */
[data-theme="dark"] .dsh-sum-row {
  border-bottom: 1px solid #222840 !important;
}
[data-theme="dark"] .dsh-sum-label { color: #64748b !important; }
[data-theme="dark"] .dsh-sum-val { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-sum-icon { color: #7c6fcd !important; }

/* Performance overview */
[data-theme="dark"] .dsh-perf-rate { color: #f1f5f9 !important; }
[data-theme="dark"] .dsh-perf-sub { color: #475569 !important; }
[data-theme="dark"] .dsh-perf-bar-wrap {
  background-color: #252b3b !important;
}
[data-theme="dark"] .dsh-perf-bar {
  background: linear-gradient(90deg, #7c6fcd, #a78bfa) !important;
}
[data-theme="dark"] .dsh-perf-days { color: #f1f5f9 !important; }
[data-theme="dark"] .dsh-perf-days-label { color: #475569 !important; }
[data-theme="dark"] .dsh-perf-divider { border-color: #2a3147 !important; }

/* Announcements */
[data-theme="dark"] .dsh-ann-item { border-bottom: 1px solid #222840 !important; }
[data-theme="dark"] .dsh-ann-title { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-ann-desc { color: #64748b !important; }
[data-theme="dark"] .dsh-ann-time { color: #475569 !important; }

/* Tables inside dsh-card */
[data-theme="dark"] .dsh-card table { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-card table thead th {
  background-color: #1e2436 !important;
  color: #64748b !important;
  border-bottom: 1px solid #2a3147 !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
}
[data-theme="dark"] .dsh-card table tbody tr td {
  background-color: #1a1f2e !important;
  border-bottom: 1px solid #222840 !important;
  color: #cbd5e1 !important;
}
[data-theme="dark"] .dsh-card table tbody tr:nth-child(even) td {
  background-color: #1e2436 !important;
}
[data-theme="dark"] .dsh-card table tbody tr:hover td {
  background-color: #252b3b !important;
}

/* User dropdown */
[data-theme="dark"] .dsh-user-dropdown {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
[data-theme="dark"] .dsh-dd-name { color: #e2e8f0 !important; }
[data-theme="dark"] .dsh-dd-role { color: #64748b !important; }
[data-theme="dark"] .dsh-dd-item { color: #94a3b8 !important; }
[data-theme="dark"] .dsh-dd-item:hover {
  background-color: #252b3b !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .dsh-dd-divider { border-color: #2a3147 !important; }

/* Donut chart label */
[data-theme="dark"] .dsh-donut-label { color: #f1f5f9 !important; }

/* ══════════════════════════════════════
   LIGHT MODE — dsh- component overrides
   ══════════════════════════════════════ */

[data-theme="light"] .dsh-root,
[data-theme="light"] body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}
[data-theme="light"] .dsh-topbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-topbar-search input,
[data-theme="light"] .dsh-topbar-search {
  background-color: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .dsh-topbar-btn {
  background-color: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}
[data-theme="light"] .dsh-sidebar {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-nav-section-label { color: #94a3b8 !important; }
[data-theme="light"] .dsh-nav-link { color: #64748b !important; }
[data-theme="light"] .dsh-nav-link:hover {
  color: #533afd !important;
  background-color: rgba(83,58,253,0.05) !important;
}
[data-theme="light"] .dsh-nav-link.active,
[data-theme="light"] .dsh-nav-link.dsh-active {
  color: #533afd !important;
  background-color: rgba(83,58,253,0.07) !important;
  border-left-color: #533afd !important;
}
[data-theme="light"] .dsh-stat-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,55,112,0.06) !important;
}
[data-theme="light"] .dsh-stat-value { color: #0f172a !important; }
[data-theme="light"] .dsh-stat-label { color: #94a3b8 !important; }
[data-theme="light"] .dsh-stat-trend { color: #cbd5e1 !important; }
[data-theme="light"] .dsh-qa-item {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-qa-icon { color: #533afd !important; }
[data-theme="light"] .dsh-qa-item span { color: #94a3b8 !important; }
[data-theme="light"] .dsh-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,55,112,0.06) !important;
}
[data-theme="light"] .dsh-card-header {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-card-title { color: #475569 !important; }
[data-theme="light"] .dsh-r-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,55,112,0.06) !important;
}
[data-theme="light"] .dsh-r-card-hd {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-r-card-title { color: #475569 !important; }
[data-theme="light"] .dsh-sum-label { color: #64748b !important; }
[data-theme="light"] .dsh-sum-val { color: #0f172a !important; }
[data-theme="light"] .dsh-card table thead th {
  background-color: #f8fafc !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-card table tbody tr td {
  background-color: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #334155 !important;
}
[data-theme="light"] .dsh-card table tbody tr:hover td {
  background-color: #f8fafc !important;
}
[data-theme="light"] .dsh-sidebar-help {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .dsh-sidebar-help p,
[data-theme="light"] .dsh-sidebar-help span { color: #64748b !important; }

/* ── dsh-r-card transparent bg fix ── */
/* Using :is() to raise specificity above the original rule */
[data-theme="dark"] :is(.dsh-right-col, .dsh-r-card, .dsh-r-card-body) {
  background-color: #1a1f2e !important;
}
[data-theme="dark"] .dsh-right-col {
  background-color: #0f1117 !important;
}
[data-theme="dark"] .dsh-r-card {
  background-color: #1a1f2e !important;
  background: #1a1f2e !important;
  border: 1px solid #2a3147 !important;
}
[data-theme="dark"] .dsh-r-card-body {
  background-color: #1a1f2e !important;
  background: #1a1f2e !important;
}
[data-theme="dark"] .dsh-r-card-hd {
  background-color: #1e2436 !important;
  background: #1e2436 !important;
  border-bottom: 1px solid #2a3147 !important;
}

/* ── Nav link color fix — override purple ── */
html[data-theme="dark"] .dsh-sidebar .dsh-nav-link,
html[data-theme="dark"] .dsh-nav-link {
  color: #8892a4 !important;
}
html[data-theme="dark"] .dsh-sidebar .dsh-nav-link:hover {
  color: #c4c9d4 !important;
  background-color: #1e2436 !important;
}
html[data-theme="dark"] .dsh-sidebar .dsh-nav-link.active,
html[data-theme="dark"] .dsh-nav-link.active {
  color: #a78bfa !important;
  background-color: rgba(124,111,205,0.15) !important;
  border-left-color: #7c6fcd !important;
}
html[data-theme="dark"] .dsh-nav-section-label {
  color: #4a5568 !important;
}

/* ── Stat label/trend text ── */
html[data-theme="dark"] .dsh-stat-label {
  color: #64748b !important;
}
html[data-theme="dark"] .dsh-stat-trend {
  color: #334155 !important;
}
html[data-theme="dark"] .dsh-stat-value {
  color: #f1f5f9 !important;
}

/* ── Greeting text ── */
html[data-theme="dark"] .dsh-greeting,
html[data-theme="dark"] .dsh-greeting h1,
html[data-theme="dark"] .dsh-greeting-text h1,
html[data-theme="dark"] .dsh-greeting-right h1 {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .dsh-greeting p,
html[data-theme="dark"] .dsh-greeting-text p {
  color: #64748b !important;
}

/* ── Summary rows ── */
html[data-theme="dark"] .dsh-sum-label { color: #64748b !important; }
html[data-theme="dark"] .dsh-sum-val { color: #e2e8f0 !important; }
html[data-theme="dark"] .dsh-ann-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .dsh-ann-desc { color: #475569 !important; }
html[data-theme="dark"] .dsh-ann-time { color: #334155 !important; }
html[data-theme="dark"] .dsh-perf-rate { color: #f1f5f9 !important; }
html[data-theme="dark"] .dsh-perf-sub { color: #475569 !important; }
html[data-theme="dark"] .dsh-perf-days { color: #f1f5f9 !important; }
html[data-theme="dark"] .dsh-perf-days-label { color: #475569 !important; }
html[data-theme="dark"] .dsh-r-card-title { color: #94a3b8 !important; }
html[data-theme="dark"] .dsh-section-label { color: #f1f5f9 !important; }
html[data-theme="dark"] .dsh-view-all { color: #7c6fcd !important; }
html[data-theme="dark"] .dsh-card-title { color: #94a3b8 !important; }

/* ── Quick action labels ── */
html[data-theme="dark"] .dsh-qa-item span,
html[data-theme="dark"] .dsh-qa-item p { color: #94a3b8 !important; }
html[data-theme="dark"] .dsh-qa-icon { color: #7c6fcd !important; }

html[data-theme="dark"] .dsh-sidebar .dsh-nav-link,
html[data-theme="dark"] .dsh-nav-link,
html[data-theme="dark"] .dsh-sidebar-nav .dsh-nav-link {
  color: #8892a4 !important;
  background-color: transparent !important;
}
html[data-theme="dark"] .dsh-sidebar .dsh-nav-link.active,
html[data-theme="dark"] .dsh-nav-link.active,
html[data-theme="dark"] .dsh-sidebar-nav .dsh-nav-link.active {
  color: #a78bfa !important;
  background-color: rgba(124, 111, 205, 0.15) !important;
}

/* ════════════════════════════════════════
   DARK MODE — Inner page stat cards fix
   Targets: companies, submissions, CT600,
   filing requests, VAT, and all other
   pages using app-pages.css stat cards
   ════════════════════════════════════════ */

/* ── Companies page: co-stat-card ── */
html[data-theme="dark"] .co-stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .co-stat-num   { color: #f1f5f9 !important; }
html[data-theme="dark"] .co-stat-label { color: #64748b !important; }
html[data-theme="dark"] .co-stat-sub   { color: #475569 !important; }
html[data-theme="dark"] .co-stat-trend { color: #475569 !important; }
html[data-theme="dark"] .co-stat-icon-wrap {
  background-color: rgba(124, 111, 205, 0.15) !important;
}
html[data-theme="dark"] .co-stats-grid { background: transparent !important; }

/* ── Submissions page: sub-stat-card ── */
html[data-theme="dark"] .sub-stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .sub-stat-num   { color: #f1f5f9 !important; }
html[data-theme="dark"] .sub-stat-label { color: #64748b !important; }
html[data-theme="dark"] .sub-stat-pct   { color: #475569 !important; }
html[data-theme="dark"] .sub-stat-icon  {
  background-color: rgba(124, 111, 205, 0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .sub-stats-grid { background: transparent !important; }

/* ── Generic .stat-card (CT600, VAT, Filing Requests, all other pages) ── */
html[data-theme="dark"] .stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .stat-card:hover {
  border-color: rgba(124, 111, 205, 0.35) !important;
  background-color: #1e2436 !important;
}
html[data-theme="dark"] .stat-card-icon {
  background-color: rgba(124, 111, 205, 0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .stat-card-purple .stat-card-icon { background: rgba(124,111,205,0.15) !important; color: #a78bfa !important; }
html[data-theme="dark"] .stat-card-green  .stat-card-icon { background: rgba(52,211,153,0.12)  !important; color: #34d399 !important; }
html[data-theme="dark"] .stat-card-red    .stat-card-icon { background: rgba(248,113,113,0.12)  !important; color: #f87171 !important; }
html[data-theme="dark"] .stat-card-blue   .stat-card-icon { background: rgba(96,165,250,0.12)   !important; color: #60a5fa !important; }
html[data-theme="dark"] .stat-card-amber  .stat-card-icon { background: rgba(251,191,36,0.12)   !important; color: #fbbf24 !important; }
html[data-theme="dark"] .stat-card-body   { color: #94a3b8 !important; }
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .stat-card .stat-value { color: #f1f5f9 !important; font-feature-settings: "tnum" !important; }
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-card .stat-label { color: #64748b !important; }

/* ── stats-grid / stats-row containers ── */
html[data-theme="dark"] .stats-grid,
html[data-theme="dark"] .stats-row,
html[data-theme="dark"] .co-stats-grid,
html[data-theme="dark"] .sub-stats-grid { background: transparent !important; }

/* ── Status distribution bar (submissions/CT600 page) ── */
html[data-theme="dark"] .status-bar-wrap,
html[data-theme="dark"] [class*="status-bar"] {
  background-color: #252b3b !important;
  border: 1px solid #2a3147 !important;
}

/* ── Search/filter bar on inner pages ── */
html[data-theme="dark"] .table-toolbar,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] [class*="table-toolbar"],
html[data-theme="dark"] [class*="filter-bar"] {
  background-color: #1e2436 !important;
  border: 1px solid #2a3147 !important;
}
html[data-theme="dark"] .table-toolbar input,
html[data-theme="dark"] .filter-bar input,
html[data-theme="dark"] .search-input {
  background-color: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}

/* ── Page headers on inner pages ── */
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .page-title { color: #f1f5f9 !important; }
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .page-header p { color: #64748b !important; }

/* ── idle-card (empty state cards) ── */
html[data-theme="dark"] .idle-card {
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
  color: #64748b !important;
}

/* ── CT600 page: ct-stat-card ── */
html[data-theme="dark"] .ct-stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .ct-stat-num   { color: #f1f5f9 !important; }
html[data-theme="dark"] .ct-stat-label { color: #64748b !important; }
html[data-theme="dark"] .ct-stat-pct   { color: #475569 !important; }
html[data-theme="dark"] .ct-stat-icon  {
  background-color: rgba(124, 111, 205, 0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .ct-stats-grid { background: transparent !important; }

/* ── Filing Requests page: fi-stat-card ── */
html[data-theme="dark"] .fi-stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .fi-stat-num   { color: #f1f5f9 !important; }
html[data-theme="dark"] .fi-stat-label { color: #64748b !important; }
html[data-theme="dark"] .fi-stat-pct   { color: #475569 !important; }
html[data-theme="dark"] .fi-stat-icon  {
  background-color: rgba(124, 111, 205, 0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .fi-stats-grid,
html[data-theme="dark"] .fi-stat-grid  { background: transparent !important; }

/* ── Catch-all: any other page-specific stat card prefix ──
   Covers inc-, vat-, usr-, or any future prefix           */
html[data-theme="dark"] [class$="-stat-card"],
html[data-theme="dark"] [class*="-stat-card "] {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  background-image: none !important;
  border: 1px solid #2a3147 !important;
}

/* ══════════════════════════════════════
   DARK MODE — Page-specific card fixes
   ══════════════════════════════════════ */

/* ── VAT Returns page — main content card ── */
html[data-theme="dark"] .vat-empty-card,
html[data-theme="dark"] .vat-card,
html[data-theme="dark"] [class*="vat-"] .card,
html[data-theme="dark"] [class*="vat-wrap"] {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] [class*="vat-"] h1,
html[data-theme="dark"] [class*="vat-"] h2,
html[data-theme="dark"] [class*="vat-"] h3,
html[data-theme="dark"] [class*="vat-"] p { color: #94a3b8 !important; }

/* ── Incorporation wizard ── */
html[data-theme="dark"] .inc-step-card,
html[data-theme="dark"] .inc-option-card,
html[data-theme="dark"] .inc-form-card,
html[data-theme="dark"] .inc-summary-card,
html[data-theme="dark"] .inc-tips-card,
html[data-theme="dark"] [class*="inc-"] .card,
html[data-theme="dark"] [class*="inc-card"] {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] [class*="inc-"] label,
html[data-theme="dark"] [class*="inc-"] p,
html[data-theme="dark"] [class*="inc-"] h1,
html[data-theme="dark"] [class*="inc-"] h2,
html[data-theme="dark"] [class*="inc-"] h3,
html[data-theme="dark"] [class*="inc-"] h4 { color: #94a3b8 !important; }
html[data-theme="dark"] [class*="inc-"] h1,
html[data-theme="dark"] [class*="inc-"] h2 { color: #f1f5f9 !important; }

/* Incorporation option cards (SAME AS / SENSITIVE) */
html[data-theme="dark"] .inc-name-type-card,
html[data-theme="dark"] [class*="name-type"],
html[data-theme="dark"] [class*="option-card"] {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] [class*="option-card"].selected,
html[data-theme="dark"] [class*="option-card"]:checked {
  border-color: #7c6fcd !important;
  background: rgba(124,111,205,0.12) !important;
}

/* ── Users page — table and filter bar ── */
html[data-theme="dark"] .users-table-wrap,
html[data-theme="dark"] .user-table-card,
html[data-theme="dark"] [class*="users-"] .card,
html[data-theme="dark"] [class*="user-list"] {
  background: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .users-filter-bar,
html[data-theme="dark"] [class*="users-filter"],
html[data-theme="dark"] [class*="user-filter"] {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .user-row,
html[data-theme="dark"] [class*="user-row"] {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
}
html[data-theme="dark"] .user-row:hover,
html[data-theme="dark"] [class*="user-row"]:hover {
  background: #1e2436 !important;
}
html[data-theme="dark"] [class*="user-name"],
html[data-theme="dark"] [class*="user-email"] { color: #e2e8f0 !important; }
html[data-theme="dark"] [class*="user-role"],
html[data-theme="dark"] [class*="user-meta"] { color: #64748b !important; }

/* ── Activity Logs page ── */
html[data-theme="dark"] .activity-log-item,
html[data-theme="dark"] .log-item,
html[data-theme="dark"] [class*="log-item"],
html[data-theme="dark"] [class*="activity-item"],
html[data-theme="dark"] [class*="log-row"] {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .activity-log-item:hover,
html[data-theme="dark"] [class*="log-item"]:hover {
  background: #1e2436 !important;
}
html[data-theme="dark"] [class*="log-title"],
html[data-theme="dark"] [class*="log-action"] { color: #e2e8f0 !important; }
html[data-theme="dark"] [class*="log-meta"],
html[data-theme="dark"] [class*="log-time"],
html[data-theme="dark"] [class*="log-user"] { color: #64748b !important; }
html[data-theme="dark"] [class*="log-desc"] { color: #94a3b8 !important; }
html[data-theme="dark"] .activity-filter-bar,
html[data-theme="dark"] [class*="log-filter"] {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
}

/* ── Platform Admin — tenants table ── */
html[data-theme="dark"] .tenant-table-wrap,
html[data-theme="dark"] [class*="tenant-list"],
html[data-theme="dark"] [class*="tenants-card"],
html[data-theme="dark"] .platform-card {
  background: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] [class*="tenant-row"],
html[data-theme="dark"] [class*="tenant-item"] {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
}
html[data-theme="dark"] [class*="tenant-row"]:hover { background: #1e2436 !important; }
html[data-theme="dark"] [class*="tenant-name"] { color: #e2e8f0 !important; }
html[data-theme="dark"] [class*="tenant-slug"],
html[data-theme="dark"] [class*="tenant-meta"] { color: #64748b !important; }

/* ── Generic: any remaining white cards on inner pages ── */
html[data-theme="dark"] .page-card,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .inner-card,
html[data-theme="dark"] .panel-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}

/* ── Filter/search bars on all inner pages ── */
html[data-theme="dark"] .page-filter-bar,
html[data-theme="dark"] [class*="filter-wrap"],
html[data-theme="dark"] [class*="search-bar-wrap"],
html[data-theme="dark"] [class*="-filter-bar"] {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] [class*="filter-bar"] input,
html[data-theme="dark"] [class*="filter-bar"] select,
html[data-theme="dark"] [class*="search-bar"] input {
  background: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}

/* ── Settings page sections ── */
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] [class*="settings-card"],
html[data-theme="dark"] [class*="settings-section"] {
  background: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] [class*="settings-"] label { color: #94a3b8 !important; }
html[data-theme="dark"] [class*="settings-"] h3,
html[data-theme="dark"] [class*="settings-"] h4 { color: #e2e8f0 !important; }

/* ══════════════════════════════════════
   DARK MODE — Exact class fixes Round 2
   ══════════════════════════════════════ */

/* ── VAT page ── */
html[data-theme="dark"] .vat-page-card,
html[data-theme="dark"] .vat-modal-box {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
  color: #94a3b8 !important;
}

/* ── Users page ── */
html[data-theme="dark"] .um-table-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}

/* ── Activity Logs page (al- prefix) ── */
html[data-theme="dark"] .al-filter-bar,
html[data-theme="dark"] .al-filter-group,
html[data-theme="dark"] .al-search-wrap {
  background: #1e2436 !important;
  background-color: #1e2436 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .al-select,
html[data-theme="dark"] .al-date-input {
  background: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .al-search-btn {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}

/* ── Platform Admin (pa- prefix) ── */
html[data-theme="dark"] .pa-table-wrap {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pa-tbl {
  color: #e2e8f0 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pa-tbl thead th,
html[data-theme="dark"] .pa-table-head {
  background: #1e2436 !important;
  background-color: #1e2436 !important;
  color: #64748b !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .pa-tbl tbody tr td {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .pa-tbl tbody tr:nth-child(even) td {
  background: #1e2436 !important;
  background-color: #1e2436 !important;
}
html[data-theme="dark"] .pa-tbl tbody tr:hover td {
  background: #252b3b !important;
  background-color: #252b3b !important;
}
html[data-theme="dark"] .pa-stat-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pa-stat-num   { color: #f1f5f9 !important; }
html[data-theme="dark"] .pa-stat-label { color: #64748b !important; }
html[data-theme="dark"] .pa-stat-icon  {
  background: rgba(124,111,205,0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .pa-new-btn {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}
html[data-theme="dark"] .pa-view-btn {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
  color: #94a3b8 !important;
}

/* ── Generic outline/ghost buttons ── */
html[data-theme="dark"] .btn-outline-brand-sm,
html[data-theme="dark"] .idle-out {
  background: transparent !important;
  border-color: #533afd !important;
  color: #a78bfa !important;
}

/* ── Activity Logs — log item internals ── */
html[data-theme="dark"] .activity-icon {
  background: rgba(124, 111, 205, 0.15) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .activity-user-badge {
  background: rgba(124, 111, 205, 0.12) !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .activity-details {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: #2a3147 !important;
}

/* ══════════════════════════════════════
   DARK MODE — Platform Admin pages
   Announcements, Service Pricing, Revenue,
   Payments, Payment Requests, Pages, Settings
   ══════════════════════════════════════ */

/* ── pa-card (Platform Settings sections) ── */
html[data-theme="dark"] .pa-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pa-card h3,
html[data-theme="dark"] .pa-card h4 { color: #e2e8f0 !important; }
html[data-theme="dark"] .pa-card p,
html[data-theme="dark"] .pa-card label,
html[data-theme="dark"] .pa-card small { color: #94a3b8 !important; }

/* ── Announcements (ann-) ── */
html[data-theme="dark"] .ann-card,
html[data-theme="dark"] .ann-grid {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .ann-card-head {
  background: #1e2436 !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .ann-card-head-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .ann-label { color: #94a3b8 !important; }
html[data-theme="dark"] .ann-input {
  background: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .ann-submit-btn {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}
html[data-theme="dark"] .ann-list-hd-title { color: #e2e8f0 !important; }

/* ── Service Pricing (sp-) ── */
html[data-theme="dark"] .sp-table-wrap {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .sp-table-head {
  background: #1e2436 !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .sp-table-head-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .sp-table-head-sub   { color: #64748b !important; }
html[data-theme="dark"] .sp-tbl { color: #e2e8f0 !important; border-color: #2a3147 !important; }
html[data-theme="dark"] .sp-tbl thead th {
  background: #1e2436 !important;
  color: #64748b !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .sp-tbl tbody tr td {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .sp-tbl tbody tr:nth-child(even) td { background: #1e2436 !important; }
html[data-theme="dark"] .sp-tbl tbody tr:hover td { background: #252b3b !important; }
html[data-theme="dark"] .sp-svc-name  { color: #e2e8f0 !important; }
html[data-theme="dark"] .sp-svc-desc  { color: #64748b !important; }
html[data-theme="dark"] .sp-key {
  background: rgba(124,111,205,0.12) !important;
  color: #a78bfa !important;
  border-color: rgba(124,111,205,0.2) !important;
}
html[data-theme="dark"] .sp-cost-input {
  background: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .sp-cost-prefix { color: #64748b !important; }
html[data-theme="dark"] .sp-save-btn {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}

/* ── Revenue (rev-) ── */
html[data-theme="dark"] .rev-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .rev-card-head {
  background: #1e2436 !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .rev-card-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .rev-card-sub   { color: #64748b !important; }
html[data-theme="dark"] .rev-billing-box {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .rev-tbl { color: #e2e8f0 !important; }
html[data-theme="dark"] .rev-tbl thead th {
  background: #1e2436 !important;
  color: #64748b !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .rev-tbl tbody td {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .rev-tbl tbody tr:hover td { background: #252b3b !important; }
html[data-theme="dark"] .rev-list-row {
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .rev-stats-grid { background: transparent !important; }

/* ── Payments (pm-) ── */
html[data-theme="dark"] .pm-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pm-card-body { color: #94a3b8 !important; }
html[data-theme="dark"] .pm-icon-badge {
  background: rgba(124,111,205,0.12) !important;
}
html[data-theme="dark"] .pm-enabled-pill {
  background: rgba(52,211,153,0.12) !important;
  color: #34d399 !important;
}
html[data-theme="dark"] .pm-disabled-pill {
  background: rgba(100,116,139,0.12) !important;
  color: #64748b !important;
}
html[data-theme="dark"] .pm-cfg-strip {
  background: #1e2436 !important;
  border-top-color: #2a3147 !important;
  color: #64748b !important;
}
html[data-theme="dark"] .pm-btn-configure {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}
html[data-theme="dark"] .pm-btn-disable {
  background: transparent !important;
  border-color: #f87171 !important;
  color: #f87171 !important;
}
html[data-theme="dark"] .pm-btn-enable {
  background: transparent !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
}

/* ── Payment Requests (pr-) ── */
html[data-theme="dark"] .pr-filter-bar,
html[data-theme="dark"] .pr-filter-group {
  background: #1e2436 !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pr-filter-input {
  background: #1e2436 !important;
  border-color: #2e3650 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .pr-filter-label { color: #94a3b8 !important; }
html[data-theme="dark"] .pr-table-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pr-tbl { color: #e2e8f0 !important; }
html[data-theme="dark"] .pr-tbl thead th {
  background: #1e2436 !important;
  color: #64748b !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .pr-tbl tbody td {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .pr-tbl tbody tr:hover td { background: #252b3b !important; }
html[data-theme="dark"] .pr-modal {
  background: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pr-modal-head {
  background: #1e2436 !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .pr-modal-title { color: #e2e8f0 !important; }
html[data-theme="dark"] .pr-modal-body  { color: #94a3b8 !important; }
html[data-theme="dark"] .pr-modal-overlay { background: rgba(0,0,0,0.7) !important; }
html[data-theme="dark"] .pr-pill-rejected { background: rgba(248,113,113,0.12) !important; color: #f87171 !important; }
html[data-theme="dark"] .pr-pill-approved { background: rgba(52,211,153,0.12) !important; color: #34d399 !important; }

/* ── Pages (pg-) ── */
html[data-theme="dark"] .pg-table-card {
  background: #1a1f2e !important;
  background-color: #1a1f2e !important;
  border-color: #2a3147 !important;
}
html[data-theme="dark"] .pg-tbl { color: #e2e8f0 !important; }
html[data-theme="dark"] .pg-tbl thead th {
  background: #1e2436 !important;
  color: #64748b !important;
  border-bottom-color: #2a3147 !important;
}
html[data-theme="dark"] .pg-tbl tbody td {
  background: #1a1f2e !important;
  border-bottom-color: #222840 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .pg-tbl tbody tr:hover td { background: #252b3b !important; }
html[data-theme="dark"] .pg-tab {
  color: #64748b !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .pg-tab.active {
  color: #a78bfa !important;
  border-bottom-color: #7c6fcd !important;
}
html[data-theme="dark"] .pg-edit-btn {
  background: #533afd !important;
  border-color: #533afd !important;
  color: #fff !important;
}

/* ── Register page background image fix ── */
html[data-theme="dark"] body.register-page,
html[data-theme="dark"] body[class*="register"],
html[data-theme="dark"] .reg-wrap {
  background-color: transparent !important;
}

/* Make html/body not block the background image on register page */
/* Target: only when .reg-wrap exists on page */
body:has(.reg-wrap) {
  background-color: transparent !important;
  background-size: 100% 100% !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

html:has(.reg-wrap) {
  background-color: transparent !important;
}

/* Left side overlay — semi-transparent so image shows */
.reg-left {
  background: rgba(10, 10, 20, 0.55) !important;
  backdrop-filter: blur(2px) !important;
}

/* Right form panel — semi-transparent dark */
.reg-right {
  background: rgba(15, 17, 35, 0.80) !important;
  backdrop-filter: blur(12px) !important;
  border-left: 1px solid rgba(255,255,255,0.08) !important;
}

/* Fix old pink badge → new indigo */
.reg-badge {
  background: rgba(83, 58, 253, 0.15) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(83, 58, 253, 0.25) !important;
}

/* Fix old purple-blue gradient on feature icons → new indigo */
.reg-feat-icon {
  background: linear-gradient(135deg, #533afd, #7c3aed) !important;
}

/* Left side text — keep white since bg is dark overlay */
.reg-headline { color: #f1f5f9 !important; }
.reg-headline span,
.reg-headline strong { color: #a78bfa !important; }
.reg-subline { color: rgba(255,255,255,0.65) !important; }
.reg-feat-text { color: rgba(255,255,255,0.75) !important; }
.reg-trust-item { color: rgba(255,255,255,0.55) !important; }

/* ══════════════════════════════════════
   REGISTER PAGE — Light image fix
   White/lavender background image
   ══════════════════════════════════════ */

/* Remove dark overlay from left panel — let image show */
.reg-left {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(0px) !important;
  -webkit-backdrop-filter: blur(0px) !important;
}

/* Right form panel — white frosted glass */
.reg-right {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: -8px 0 32px rgba(83, 58, 253, 0.06) !important;
}

/* Left panel text — dark since background is now light */
.reg-headline { color: #1e1b3a !important; }
.reg-headline span,
.reg-headline strong { color: #533afd !important; }
.reg-subline { color: rgba(30, 27, 58, 0.65) !important; }
.reg-feat-text,
.reg-feat span { color: rgba(30, 27, 58, 0.75) !important; }
.reg-trust-item { color: rgba(30, 27, 58, 0.55) !important; }

/* Badge — indigo on light bg */
.reg-badge {
  background: rgba(83, 58, 253, 0.10) !important;
  color: #533afd !important;
  border: 1px solid rgba(83, 58, 253, 0.20) !important;
}

/* Feature icons — keep indigo gradient */
.reg-feat-icon {
  background: linear-gradient(135deg, #533afd, #7c3aed) !important;
}

/* Logo text on light bg */
.reg-logo,
.reg-logo span { color: #1e1b3a !important; }

/* Trust bar at bottom */
.reg-trust {
  background: rgba(255, 255, 255, 0.4) !important;
  border-top: 1px solid rgba(83, 58, 253, 0.10) !important;
}

/* Right form — dark text inputs */
.reg-right .reg-form-title,
.reg-right h1,
.reg-right h2,
.reg-right h3 { color: #1e1b3a !important; }

.reg-right label,
.reg-right .reg-label { color: #475569 !important; }

.reg-right input,
.reg-right select,
.reg-right textarea {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(83, 58, 253, 0.20) !important;
  color: #1e1b3a !important;
}

.reg-right input::placeholder,
.reg-right textarea::placeholder { color: #94a3b8 !important; }

.reg-right input:focus,
.reg-right select:focus {
  border-color: #533afd !important;
  box-shadow: 0 0 0 3px rgba(83, 58, 253, 0.12) !important;
  background: #ffffff !important;
}

/* Plan cards on light bg */
.reg-right .reg-plan-card,
.reg-right [class*="plan-card"],
.reg-right [class*="plan-opt"] {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(83, 58, 253, 0.15) !important;
  color: #1e1b3a !important;
}

.reg-right [class*="plan-card"].selected,
.reg-right [class*="plan-card"]:has(input:checked) {
  border-color: #533afd !important;
  background: rgba(83, 58, 253, 0.06) !important;
}

/* Account type cards */
.reg-right [class*="acc-type"],
.reg-right [class*="account-type"],
.reg-right [class*="reg-type"] {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(83, 58, 253, 0.15) !important;
  color: #1e1b3a !important;
}

/* Submit button */
.reg-right [class*="reg-submit"],
.reg-right [class*="create-btn"],
.reg-right button[type="submit"] {
  background: linear-gradient(135deg, #533afd, #7c3aed) !important;
  color: #fff !important;
  border: none !important;
}

/* Secondary text */
.reg-right p,
.reg-right small,
.reg-right span { color: #64748b !important; }

/* Links */
.reg-right a { color: #533afd !important; }

/* ── Register page — remove ALL backgrounds, show image only ── */
.reg-left {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.reg-right {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-left: none !important;
  box-shadow: none !important;
}

.reg-wrap {
  background: transparent !important;
  background-color: transparent !important;
}
