/* Makha — shared layout used by the demo and every org portal. */

:root {
  --sidebar-w: 230px;
  --accent: #6366F1;
  --accent-soft: #eef2ff;
  --accent-dark: #4338ca;
  --amber: #f59e0b;
  --ink: #0f172a;
}

body { background: #f4f6f9; margin: 0; font-family: 'Segoe UI', sans-serif; }

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: var(--sidebar-w);
  background: #fff; border-right: 1px solid #e8edf2;
  display: flex; flex-direction: column; z-index: 100;
}
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid #e8edf2; }
.brand-name { font-size: 16px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.brand-name .accent { color: var(--amber); }
.brand-sub  { font-size: 11px; color: #999; margin-top: 2px; }
.demo-pill  {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-left: 5px; vertical-align: middle;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: #555; font-size: 14px;
  text-decoration: none; border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.nav-link:hover  { background: #eef2ff; color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 600; border-left-color: var(--accent); background: #eef2ff; }
.nav-link i { width: 18px; text-align: center; }
.nav-section { font-size: 10px; color: #aaa; font-weight: 700; text-transform: uppercase;
               letter-spacing: .6px; padding: 14px 20px 4px; }
.sidebar-footer {
  padding: 14px 20px; font-size: 12px; color: #aaa;
  border-top: 1px solid #e8edf2;
}
.sidebar-footer a { color: #aaa; text-decoration: none; font-size: 12px; }
.sidebar-footer a:hover { color: #dc3545; }

/* ── Main ── */
.main-content { margin-left: var(--sidebar-w); padding: 24px 28px 48px; min-height: 100vh; }

/* ── Page header ── */
.page-header { margin-bottom: 22px; }
.page-header h4 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin: 0; color: #0f172a; }
.page-header p  { font-size: 13px; color: #64748b; margin: 4px 0 0; }

/* ── Stat cards ── */
.stat-card .card-body { padding: 20px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex;
             align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: #888; }
.bg-indigo-soft  { background: #eef2ff; }
.bg-success-soft { background: #ecfdf5; }
.bg-warning-soft { background: #fffbeb; }
.bg-danger-soft  { background: #fff1f2; }
.text-indigo { color: var(--accent); }

/* ── Status badges ── */
.status-badge { display: inline-flex; align-items: center;
                font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-completed, .badge-paid, .badge-matched, .badge-active, .badge-closed
                { background: #ecfdf5; color: #059669; }
.badge-scheduled, .badge-open, .badge-ongoing
                { background: #eef2ff; color: #4338ca; }
.badge-cancelled, .badge-unmatched
                { background: #fff1f2; color: #dc3545; }
.badge-unpaid   { background: #fffbeb; color: #d97706; }
.badge-partial  { background: #fff8e1; color: #856404; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* Role chips */
.role-chip { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.role-admin   { background: #eef2ff; color: #4338ca; }
.role-manager { background: #fef3c7; color: #d97706; }
.role-staff   { background: #f1f5f9; color: #475569; }

/* ── Demo callout ── */
.demo-callout {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 16px; font-size: 13px; color: #92400e; margin-bottom: 20px;
}

/* ── Info callout ── */
.callout {
  background: #eef2ff; border-radius: 10px;
  padding: 14px 16px; font-size: 13px; color: var(--accent-dark); margin-bottom: 20px;
}
.callout i { margin-right: 6px; }

/* ── Feature toggle switch ── */
.feat-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.feat-toggle input { opacity: 0; width: 0; height: 0; }
.feat-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1;
               border-radius: 20px; transition: .2s; }
.feat-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px;
                      bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
input:checked + .feat-slider { background: var(--accent); }
input:checked + .feat-slider:before { transform: translateX(16px); }

/* Toggle switch (settings) */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1;
          border-radius: 20px; transition: .2s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px;
                 bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #10b981; }
.switch input:checked + .slider:before { transform: translateX(16px); }

/* Access grid checkboxes */
.access-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.access-chip { display: inline-block; background: #eef2ff; color: var(--accent-dark);
               padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; margin: 2px; }

/* Settings tabs */
.settings-tabs { display: flex; gap: 4px; border-bottom: 2px solid #f1f5f9; margin-bottom: 22px; }
.settings-tabs a { padding: 10px 18px; font-size: 14px; font-weight: 600; color: #94a3b8;
                   text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.settings-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.settings-tabs a:hover { color: var(--ink); }

/* Feature table rows */
.feature-row { border-bottom: 1px solid #f1f5f9; }
.feature-row:last-child { border-bottom: none; }
.feature-ico { width: 34px; height: 34px; border-radius: 8px; background: #eef2ff; color: var(--accent);
               display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }

/* ── Mobile overlay ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 1040;
}
.sidebar-overlay.show { display: block; }

/* ── Mobile topbar ── */
.mobile-topbar {
  display: none; align-items: center; gap: 12px;
  background: #fff; border-bottom: 1px solid #e8edf2;
  padding: 13px 16px; margin: 0 -16px 16px;
  position: sticky; top: 0; z-index: 98;
}
.hamburger-btn {
  background: none; border: none; padding: 2px 6px;
  color: #555; font-size: 24px; cursor: pointer; line-height: 1; flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index: 1050;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.15);
  }
  .main-content { margin-left: 0; padding: 0 16px 48px; }
  .mobile-topbar { display: flex; }
  .page-header h4 { font-size: 18px; }
  .stat-value { font-size: 20px; }
}

/* ── Theme toggle button ── */
.theme-toggle-btn {
  background: none; border: none; cursor: pointer;
  color: #aaa; font-size: 16px; padding: 4px 6px; border-radius: 6px;
  transition: color .15s, background .15s; line-height: 1;
}
.theme-toggle-btn:hover { color: var(--accent); background: var(--accent-soft); }

/* ── Dark mode ── */
/*
  Elevation layers (lighter = higher):
    bg:       #1a1a1a  (page canvas)
    surface:  #242424  (sidebar, cards)
    elevated: #2e2e2e  (modals, dropdowns, hover)
    border:   #333333
*/
[data-theme="dark"] {
  /* Our own tokens */
  --ink:           #e8e8e8;
  --dark-bg:       #1a1a1a;
  --dark-surface:  #242424;
  --dark-elevated: #2e2e2e;
  --dark-border:   #333333;
  --accent-soft:   rgba(99,102,241,0.13);

  /* Bootstrap 5 core tokens — these cascade into almost every component */
  --bs-body-bg:             #1a1a1a;
  --bs-body-bg-rgb:         26,26,26;
  --bs-body-color:          #e8e8e8;
  --bs-body-color-rgb:      232,232,232;
  --bs-emphasis-color:      #f0f0f0;
  --bs-emphasis-color-rgb:  240,240,240;
  --bs-secondary-color:     rgba(232,232,232,0.6);
  --bs-secondary-bg:        #2e2e2e;
  --bs-tertiary-color:      rgba(232,232,232,0.4);
  --bs-tertiary-bg:         #242424;
  --bs-heading-color:       #f0f0f0;
  --bs-link-color:          #818cf8;
  --bs-link-color-rgb:      129,140,248;
  --bs-link-hover-color:    #a5b4fc;
  --bs-border-color:        #333333;
  --bs-border-color-translucent: rgba(255,255,255,0.08);

  /* Bootstrap card */
  --bs-card-bg:             #242424;
  --bs-card-border-color:   #333333;
  --bs-card-cap-bg:         #242424;

  /* Bootstrap table */
  --bs-table-bg:            transparent;
  --bs-table-color:         #e8e8e8;
  --bs-table-striped-bg:    rgba(255,255,255,0.02);
  --bs-table-hover-bg:      rgba(255,255,255,0.04);
  --bs-table-border-color:  #333333;

  /* Bootstrap form */
  --bs-form-control-bg:         #1a1a1a;
  --bs-form-control-border-color: #3a3a3a;

  /* Bootstrap modal */
  --bs-modal-bg:            #2e2e2e;
  --bs-modal-border-color:  #3a3a3a;
  --bs-modal-header-border-color: #3a3a3a;
  --bs-modal-footer-border-color: #3a3a3a;

  /* Bootstrap dropdown */
  --bs-dropdown-bg:         #2e2e2e;
  --bs-dropdown-border-color: #3a3a3a;
  --bs-dropdown-link-color: #e8e8e8;
  --bs-dropdown-link-hover-bg: #383838;
  --bs-dropdown-link-hover-color: #f0f0f0;
  --bs-dropdown-divider-bg: #3a3a3a;

  /* Bootstrap list-group */
  --bs-list-group-bg:           #242424;
  --bs-list-group-border-color: #333333;
  --bs-list-group-color:        #e8e8e8;
  --bs-list-group-hover-bg:     #2e2e2e;
  --bs-list-group-action-color: #e8e8e8;

  /* Bootstrap input-group / form */
  --bs-input-group-addon-bg:            #2e2e2e;
  --bs-input-group-addon-border-color:  #3a3a3a;

  /* Bootstrap accordion */
  --bs-accordion-bg:                    #242424;
  --bs-accordion-border-color:          #333333;
  --bs-accordion-btn-bg:                #242424;
  --bs-accordion-btn-color:             #e8e8e8;
  --bs-accordion-btn-focus-border-color: var(--accent);
  --bs-accordion-active-bg:             #2e2e2e;
  --bs-accordion-active-color:          var(--accent);
  --bs-accordion-body-padding-x:        1.25rem;

  /* Bootstrap nav-tabs */
  --bs-nav-tabs-border-color:           #333333;
  --bs-nav-tabs-link-hover-border-color: #3a3a3a #3a3a3a #333333;
  --bs-nav-tabs-link-active-color:      var(--accent);
  --bs-nav-tabs-link-active-bg:         #242424;
  --bs-nav-tabs-link-active-border-color: #333333 #333333 #242424;

  /* Bootstrap progress */
  --bs-progress-bg:         #2e2e2e;

  /* Bootstrap tooltip / popover */
  --bs-tooltip-bg:          #2e2e2e;
  --bs-tooltip-color:       #e8e8e8;
  --bs-popover-bg:          #2e2e2e;
  --bs-popover-border-color: #3a3a3a;
  --bs-popover-header-bg:   #383838;
  --bs-popover-header-color: #f0f0f0;
  --bs-popover-body-color:  #d8d8d8;
}

[data-theme="dark"] body {
  background: #1a1a1a;
  color: #e8e8e8;
}

/* ── Sidebar ── */
[data-theme="dark"] .sidebar {
  background: #242424;
  border-right-color: #333333;
}
[data-theme="dark"] .sidebar-brand   { border-bottom-color: #333333; }
[data-theme="dark"] .brand-sub       { color: #8a8a8a; }
[data-theme="dark"] .nav-link        { color: #a8a8a8; }
[data-theme="dark"] .nav-link:hover  { background: rgba(99,102,241,0.10); color: var(--accent); }
[data-theme="dark"] .nav-link.active { background: rgba(99,102,241,0.13); color: var(--accent); border-left-color: var(--accent); }
[data-theme="dark"] .nav-section     { color: #5a5a5a; }
[data-theme="dark"] .sidebar-footer  { border-top-color: #333333; color: #8a8a8a; }
[data-theme="dark"] .sidebar-footer a { color: #8a8a8a; }
[data-theme="dark"] .theme-toggle-btn { color: #8a8a8a; }
[data-theme="dark"] .theme-toggle-btn:hover { color: var(--accent); background: rgba(99,102,241,0.13); }

/* ── Mobile topbar ── */
[data-theme="dark"] .mobile-topbar {
  background: #242424;
  border-bottom-color: #333333;
}
[data-theme="dark"] .hamburger-btn { color: #a8a8a8; }

/* ── Text & headings ── */
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 { color: #f0f0f0; }
[data-theme="dark"] .page-header h4  { color: #f0f0f0; }
[data-theme="dark"] .page-header p   { color: #8a8a8a; }
[data-theme="dark"] .stat-label      { color: #8a8a8a; }
[data-theme="dark"] .text-muted      { color: #8a8a8a !important; }
[data-theme="dark"] .text-secondary  { color: #8a8a8a !important; }
[data-theme="dark"] .text-dark       { color: #e8e8e8 !important; }
[data-theme="dark"] .text-black      { color: #e8e8e8 !important; }
[data-theme="dark"] .text-body       { color: #e8e8e8 !important; }
[data-theme="dark"] strong, [data-theme="dark"] b { color: inherit; }
[data-theme="dark"] .fw-semibold, [data-theme="dark"] .fw-bold,
[data-theme="dark"] .fw-black { color: inherit; }

/* ── Cards ── */
[data-theme="dark"] .card {
  background: #242424;
  border-color: #333333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
[data-theme="dark"] .card-header {
  background: #242424 !important;
  border-bottom-color: #333333;
  color: #e8e8e8;
}
[data-theme="dark"] .card-footer {
  background: #242424 !important;
  border-top-color: #333333;
}
[data-theme="dark"] .card-title, [data-theme="dark"] .card-text { color: #e8e8e8; }

/* ── Background utilities ── */
[data-theme="dark"] .bg-white      { background: #242424 !important; }
[data-theme="dark"] .bg-light      { background: #2e2e2e !important; color: #e8e8e8 !important; }
[data-theme="dark"] .bg-secondary  { background: #3a3a3a !important; }
[data-theme="dark"] .bg-dark       { background: #383838 !important; }
[data-theme="dark"] .bg-body       { background: #1a1a1a !important; }
[data-theme="dark"] .bg-indigo-soft  { background: rgba(99,102,241,0.13); }
[data-theme="dark"] .bg-success-soft { background: rgba(16,185,129,0.11); }
[data-theme="dark"] .bg-warning-soft { background: rgba(245,158,11,0.11); }
[data-theme="dark"] .bg-danger-soft  { background: rgba(239,68,68,0.11); }

/* Bootstrap 5.3 subtle backgrounds */
[data-theme="dark"] .bg-secondary-subtle  { background: rgba(100,116,139,0.15) !important; }
[data-theme="dark"] .bg-success-subtle    { background: rgba(16,185,129,0.12) !important; }
[data-theme="dark"] .bg-danger-subtle     { background: rgba(239,68,68,0.12) !important; }
[data-theme="dark"] .bg-warning-subtle    { background: rgba(245,158,11,0.12) !important; }
[data-theme="dark"] .bg-info-subtle       { background: rgba(99,102,241,0.12) !important; }
[data-theme="dark"] .text-secondary-emphasis { color: #a8a8a8 !important; }
[data-theme="dark"] .text-success-emphasis   { color: #6ee7b7 !important; }
[data-theme="dark"] .text-danger-emphasis    { color: #fca5a5 !important; }
[data-theme="dark"] .text-warning-emphasis   { color: #fcd34d !important; }

/* Inline-style hardcoded color overrides (attribute selectors) */
[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #0f172a"] { color: #e8e8e8 !important; }
[data-theme="dark"] [style*="color:#64748b"],
[data-theme="dark"] [style*="color: #64748b"] { color: #8a8a8a !important; }
[data-theme="dark"] [style*="color:#94a3b8"],
[data-theme="dark"] [style*="color: #94a3b8"],
[data-theme="dark"] [style*="color:#94A3B8"],
[data-theme="dark"] [style*="color: #94A3B8"] { color: #6a6a6a !important; }
[data-theme="dark"] [style*="background:#f8fafc"],
[data-theme="dark"] [style*="background: #f8fafc"] { background: #2a2a2a !important; }
[data-theme="dark"] [style*="background:#f1f5f9"],
[data-theme="dark"] [style*="background: #f1f5f9"] { background: #2a2a2a !important; }
[data-theme="dark"] [style*="background:#fff;"],
[data-theme="dark"] [style*="background: #fff;"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"] { background: #242424 !important; }

/* ── Tables ── */
[data-theme="dark"] .table { color: #e8e8e8; border-color: #333333; }
[data-theme="dark"] .table-light { background: #2e2e2e !important; color: #a8a8a8; }
[data-theme="dark"] .table-hover tbody tr:hover td { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .table td, [data-theme="dark"] .table th { border-color: #333333; }
[data-theme="dark"] thead th { color: #a8a8a8; }
[data-theme="dark"] .table-bordered { border-color: #333333; }

/* ── Forms ── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #1a1a1a;
  border-color: #3a3a3a;
  color: #e8e8e8;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #1a1a1a;
  border-color: var(--accent);
  color: #e8e8e8;
  box-shadow: 0 0 0 .2rem rgba(99,102,241,.18);
}
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled {
  background-color: #222222;
  color: #6a6a6a;
}
[data-theme="dark"] .form-control::placeholder { color: #5a5a5a; }
[data-theme="dark"] .form-text   { color: #8a8a8a; }
[data-theme="dark"] .form-label  { color: #c8c8c8; }
[data-theme="dark"] .form-check-label { color: #c8c8c8; }
[data-theme="dark"] .form-check-input {
  background-color: #1a1a1a;
  border-color: #3a3a3a;
}
[data-theme="dark"] .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}
[data-theme="dark"] .input-group-text {
  background: #2e2e2e;
  border-color: #3a3a3a;
  color: #a8a8a8;
}

/* ── Modals ── */
[data-theme="dark"] .modal-content {
  background: #2e2e2e;
  border-color: #3a3a3a;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  color: #e8e8e8;
}
[data-theme="dark"] .modal-header { border-bottom-color: #3a3a3a; color: #f0f0f0; }
[data-theme="dark"] .modal-footer { border-top-color: #3a3a3a; }
[data-theme="dark"] .modal-title  { color: #f0f0f0; }

/* ── Dropdowns ── */
[data-theme="dark"] .dropdown-menu {
  background: #2e2e2e;
  border-color: #3a3a3a;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
[data-theme="dark"] .dropdown-item { color: #e8e8e8; }
[data-theme="dark"] .dropdown-item:hover { background: #383838; color: #f0f0f0; }
[data-theme="dark"] .dropdown-divider { border-color: #3a3a3a; }
[data-theme="dark"] .dropdown-header { color: #8a8a8a; }

/* ── Accordion ── */
[data-theme="dark"] .accordion-item {
  background: #242424;
  border-color: #333333;
  color: #e8e8e8;
}
[data-theme="dark"] .accordion-button {
  background: #242424;
  color: #e8e8e8;
  box-shadow: none;
}
[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: #2e2e2e;
  color: var(--accent);
  box-shadow: inset 0 -1px 0 #333333;
}
[data-theme="dark"] .accordion-button::after {
  filter: invert(0.8) brightness(1.2);
}
[data-theme="dark"] .accordion-button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(99,102,241,.15);
}
[data-theme="dark"] .accordion-body { color: #c0c0c0; background: #242424; }
[data-theme="dark"] .accordion-flush .accordion-item { border-color: #333333; }

/* ── Nav tabs (Bootstrap) ── */
[data-theme="dark"] .nav-tabs { border-bottom-color: #333333; }
[data-theme="dark"] .nav-tabs .nav-link { color: #8a8a8a; border-color: transparent; }
[data-theme="dark"] .nav-tabs .nav-link:hover { color: #e8e8e8; border-color: #3a3a3a #3a3a3a #333333; }
[data-theme="dark"] .nav-tabs .nav-link.active {
  background: #242424;
  border-color: #333333 #333333 #242424;
  color: var(--accent);
}
[data-theme="dark"] .tab-content { background: #242424; }

/* ── Alerts ── */
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.28); color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.28);  color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.28); color: #a5b4fc; }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.28); color: #fcd34d; }
[data-theme="dark"] .alert .btn-close { filter: invert(1) brightness(1.5); }

/* ── List groups ── */
[data-theme="dark"] .list-group-item {
  background: #242424;
  border-color: #333333;
  color: #e8e8e8;
}
[data-theme="dark"] .list-group-item:hover { background: #2e2e2e; }
[data-theme="dark"] .list-group-item-action { color: #e8e8e8; }
[data-theme="dark"] .list-group-item-action:hover { background: #2e2e2e; color: #f0f0f0; }

/* ── Badges ── */
/* Custom status badges */
[data-theme="dark"] .badge-completed,
[data-theme="dark"] .badge-paid,
[data-theme="dark"] .badge-matched,
[data-theme="dark"] .badge-active,
[data-theme="dark"] .badge-closed   { background: rgba(16,185,129,0.14); color: #6ee7b7; }
[data-theme="dark"] .badge-scheduled,
[data-theme="dark"] .badge-open,
[data-theme="dark"] .badge-ongoing  { background: rgba(99,102,241,0.14); color: #a5b4fc; }
[data-theme="dark"] .badge-cancelled,
[data-theme="dark"] .badge-unmatched { background: rgba(239,68,68,0.14); color: #fca5a5; }
[data-theme="dark"] .badge-unpaid   { background: rgba(245,158,11,0.14); color: #fcd34d; }
[data-theme="dark"] .badge-partial  { background: rgba(245,158,11,0.14); color: #fcd34d; }
[data-theme="dark"] .badge-inactive { background: rgba(100,116,139,0.14); color: #8a8a8a; }
/* Bootstrap badge utilities */
[data-theme="dark"] .badge.bg-light  { background: #2e2e2e !important; color: #a8a8a8 !important; border-color: #3a3a3a !important; }
[data-theme="dark"] .badge.bg-secondary { background: #3a3a3a !important; color: #c0c0c0 !important; }
[data-theme="dark"] .badge.text-bg-secondary { background: #3a3a3a !important; color: #c0c0c0 !important; }
[data-theme="dark"] .badge.text-bg-light { background: #2e2e2e !important; color: #a8a8a8 !important; }

/* ── Buttons ── */
[data-theme="dark"] .btn-outline-secondary { color: #a8a8a8; border-color: #3a3a3a; }
[data-theme="dark"] .btn-outline-secondary:hover { background: #2e2e2e; color: #e8e8e8; border-color: #555; }
[data-theme="dark"] .btn-light { background: #2e2e2e; border-color: #3a3a3a; color: #e8e8e8; }
[data-theme="dark"] .btn-light:hover { background: #383838; color: #f0f0f0; }
[data-theme="dark"] .btn-outline-light { color: #c8c8c8; border-color: #3a3a3a; }
[data-theme="dark"] .btn-outline-light:hover { background: #2e2e2e; color: #f0f0f0; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.5); }

/* ── Callouts ── */
[data-theme="dark"] .callout {
  background: rgba(99,102,241,0.10);
  border-left: 3px solid var(--accent);
  color: #a5b4fc;
}
[data-theme="dark"] .demo-callout {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.30);
  color: #fcd34d;
}

/* ── Settings tabs (custom) ── */
[data-theme="dark"] .settings-tabs { border-bottom-color: #333333; }
[data-theme="dark"] .settings-tabs a { color: #6a6a6a; }
[data-theme="dark"] .settings-tabs a:hover { color: #e8e8e8; }
[data-theme="dark"] .settings-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Demo bar ── */
[data-theme="dark"] .demo-bar { background: #242424; border-color: #333333; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
[data-theme="dark"] .demo-bar-label { color: #5a5a5a; }
[data-theme="dark"] .persona-pill { background: #2e2e2e; border-color: #3a3a3a; color: #a8a8a8; }
[data-theme="dark"] .persona-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.08); }
[data-theme="dark"] .persona-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .demo-bar-cta { color: var(--accent); }

/* ── Feature rows / icons ── */
[data-theme="dark"] .feature-ico { background: rgba(99,102,241,0.13); }
[data-theme="dark"] .feature-row { border-bottom-color: #333333; }

/* ── Progress bars ── */
[data-theme="dark"] .progress { background: #2e2e2e; }

/* ── Misc Bootstrap utilities ── */
[data-theme="dark"] .shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.45) !important; }
[data-theme="dark"] .border    { border-color: #333333 !important; }
[data-theme="dark"] .border-bottom { border-bottom-color: #333333 !important; }
[data-theme="dark"] .border-top    { border-top-color: #333333 !important; }
[data-theme="dark"] .border-top-0  { border-top: none !important; }
[data-theme="dark"] hr { border-color: #333333; opacity: 1; }
[data-theme="dark"] .rounded, [data-theme="dark"] .rounded-3 { background-color: inherit; }
/* Prevent Bootstrap's default "bg-*" text from going black on dark mode */
[data-theme="dark"] .bg-success-soft .text-indigo { color: var(--accent); }
[data-theme="dark"] p { color: inherit; }
