/* =====================================================================
   Veresiyem.net — "Açık" (light) theme
   Active only when <html data-app-theme="light">. Loaded after all other
   styles; every rule is scoped so other themes are never affected.
   The base UI is hand-made dark (bg-dark / text-white / border-secondary /
   hardcoded #0f172a/#1e293b/#334155), so this file flips neutral dark
   surfaces to light while keeping colourful accents (gradients, badges,
   semantic colours) meaningful and readable on white.
   ===================================================================== */

/* ---------- 1. Tokens (app + Bootstrap) ---------- */
html[data-app-theme="light"],
html[data-app-theme="light"] [data-bs-theme] {
    color-scheme: light;

    --lt-bg: #f1f5f9;
    --lt-surface: #ffffff;
    --lt-elev: #f8fafc;
    --lt-well: #f1f5f9;
    --lt-border: #e2e8f0;
    --lt-border-strong: #cbd5e1;
    --lt-text: #0f172a;
    --lt-text-2: #334155;
    --lt-muted: #64748b;
    --lt-primary: #4f46e5;
    --lt-primary-hover: #4338ca;
    --lt-danger: #dc2626;
    --lt-success: #16a34a;
    --lt-warning: #b45309;
    --lt-info: #0369a1;

    /* PHP'deki satır içi var(--vr-inline-*, <koyu renk>) !important alanları */
    --vr-inline-surface: #ffffff;
    --vr-inline-deep: #f8fafc;
    --vr-inline-accent-border: rgba(79, 70, 229, 0.30);
    --lt-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.06);

    /* app variables from includes/header.php */
    --bg-body: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #9333ea;
    --border-color: #e2e8f0;
    --color-debt: #dc2626;
    --color-credit: #16a34a;
    --color-zero: #2563eb;

    /* Bootstrap 5.3 */
    --bs-body-bg: #f1f5f9;
    --bs-body-bg-rgb: 241, 245, 249;
    --bs-body-color: #0f172a;
    --bs-body-color-rgb: 15, 23, 42;
    --bs-emphasis-color: #0f172a;
    --bs-emphasis-color-rgb: 15, 23, 42;
    --bs-heading-color: #0f172a;
    --bs-secondary-color: #64748b;
    --bs-secondary-color-rgb: 100, 116, 139;
    --bs-secondary-bg: #e2e8f0;
    --bs-secondary-bg-rgb: 226, 232, 240;
    --bs-tertiary-color: rgba(15, 23, 42, 0.5);
    --bs-tertiary-bg: #f8fafc;
    --bs-tertiary-bg-rgb: 248, 250, 252;
    --bs-border-color: #e2e8f0;
    --bs-border-color-translucent: rgba(15, 23, 42, 0.1);
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-link-hover-color-rgb: 67, 56, 202;
    --bs-code-color: #be185d;
    --bs-highlight-bg: #fef3c7;
    --bs-primary-rgb: 79, 70, 229;
    --bs-primary-text-emphasis: #3730a3;
    --bs-secondary-text-emphasis: #334155;
    --bs-success-text-emphasis: #166534;
    --bs-info-text-emphasis: #075985;
    --bs-warning-text-emphasis: #92400e;
    --bs-danger-text-emphasis: #991b1b;
    --bs-light-text-emphasis: #334155;
    --bs-dark-text-emphasis: #1e293b;
    --bs-primary-bg-subtle: #e0e7ff;
    --bs-secondary-bg-subtle: #f1f5f9;
    --bs-success-bg-subtle: #dcfce7;
    --bs-info-bg-subtle: #e0f2fe;
    --bs-warning-bg-subtle: #fef3c7;
    --bs-danger-bg-subtle: #fee2e2;
    --bs-light-bg-subtle: #f8fafc;
    --bs-dark-bg-subtle: #e2e8f0;
    --bs-primary-border-subtle: #c7d2fe;
    --bs-secondary-border-subtle: #e2e8f0;
    --bs-success-border-subtle: #bbf7d0;
    --bs-info-border-subtle: #bae6fd;
    --bs-warning-border-subtle: #fde68a;
    --bs-danger-border-subtle: #fecaca;
    --bs-light-border-subtle: #e2e8f0;
    --bs-dark-border-subtle: #cbd5e1;
    --bs-form-valid-color: #16a34a;
    --bs-form-valid-border-color: #16a34a;
    --bs-form-invalid-color: #dc2626;
    --bs-form-invalid-border-color: #dc2626;
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23334155' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    --bs-btn-close-white-filter: none;
}

/* ---------- 2. Base ---------- */
html[data-app-theme="light"] body {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html[data-app-theme="light"] ::selection { background: rgba(79, 70, 229, 0.2); color: #0f172a; }
:where(html[data-app-theme="light"]) a { color: #4f46e5; }
:where(html[data-app-theme="light"]) a:hover { color: #4338ca; }
html[data-app-theme="light"] hr { border-color: #cbd5e1; opacity: 1; }
html[data-app-theme="light"] code { color: #be185d; }
html[data-app-theme="light"] pre { color: #0f172a; }

/* scrollbars */
html[data-app-theme="light"] { scrollbar-color: #cbd5e1 #f1f5f9; }
html[data-app-theme="light"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-app-theme="light"] ::-webkit-scrollbar-track { background: #f1f5f9; }
html[data-app-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid #f1f5f9; }
html[data-app-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
html[data-app-theme="light"] #sidebar::-webkit-scrollbar-thumb { background-color: #e2e8f0; border: 0; }

/* ---------- 3. Text utilities ---------- */
html[data-app-theme="light"] .text-white,
html[data-app-theme="light"] .text-light { color: #0f172a !important; }
html[data-app-theme="light"] .text-white-50 { color: #64748b !important; }
html[data-app-theme="light"] .text-white-dim { color: #475569 !important; }
html[data-app-theme="light"] .text-muted,
html[data-app-theme="light"] .table .text-muted,
html[data-app-theme="light"] .small.text-muted,
html[data-app-theme="light"] .text-secondary,
html[data-app-theme="light"] .text-body-secondary { color: #64748b !important; }
html[data-app-theme="light"] .text-muted-light { color: #475569 !important; }
html[data-app-theme="light"] .text-dark { color: #0f172a !important; }
html[data-app-theme="light"] .text-body { color: #0f172a !important; }
html[data-app-theme="light"] .link-muted { color: #64748b !important; }

html[data-app-theme="light"] .text-primary { color: #4f46e5 !important; }
html[data-app-theme="light"] .text-success { color: #16a34a !important; }
html[data-app-theme="light"] .text-danger { color: #dc2626 !important; }
html[data-app-theme="light"] .text-warning { color: #b45309 !important; }
html[data-app-theme="light"] .text-info { color: #0369a1 !important; }
html[data-app-theme="light"] .balance-debt { color: #dc2626 !important; }
html[data-app-theme="light"] .balance-credit { color: #16a34a !important; }
html[data-app-theme="light"] .balance-zero { color: #2563eb !important; }

/* Text that sits on a saturated (coloured) surface must stay white. */
html[data-app-theme="light"] :where(.bg-primary, .bg-success, .bg-danger, .bg-info, .bg-purple, .bg-indigo, .bg-gradient-indigo,
    .btn-primary, .btn-success, .btn-danger, .btn-info, .btn-secondary, .btn-dark,
    .badge.bg-secondary, .active.bg-primary, .nav-pills .nav-link.active, .dropdown-item.active, .page-item.active .page-link,
    .fab-option, .fab-main-btn, #notifPermBanner, #notifBanner, .user-avatar)
    :is(.text-white, .text-light, .text-white-50, .text-muted-light, .text-white-dim, .text-muted),
html[data-app-theme="light"] :is(.text-white, .text-light):is(.bg-primary, .bg-success, .bg-danger, .bg-info, .bg-secondary, .bg-purple, .bg-indigo, .bg-gradient-indigo,
    .btn-primary, .btn-success, .btn-danger, .btn-info, .btn-secondary, .btn-dark) {
    color: #ffffff !important;
}
html[data-app-theme="light"] :is(.bg-primary, .bg-success, .bg-danger, .bg-info, .bg-secondary, .bg-purple):is(.bg-opacity-10, .bg-opacity-20, .bg-opacity-25, .bg-opacity-30, .bg-opacity-40, .bg-opacity-50):is(.text-white, .text-light, :not([class*="text-"])),
html[data-app-theme="light"] :is(.bg-primary, .bg-success, .bg-danger, .bg-info, .bg-secondary, .bg-purple):is(.bg-opacity-10, .bg-opacity-20, .bg-opacity-25, .bg-opacity-30, .bg-opacity-40, .bg-opacity-50) :is(.text-white, .text-light) {
    color: #0f172a !important;
}
html[data-app-theme="light"] :is(.bg-primary, .bg-success, .bg-danger, .bg-info, .bg-secondary, .bg-purple):is(.bg-opacity-10, .bg-opacity-20, .bg-opacity-25, .bg-opacity-30, .bg-opacity-40, .bg-opacity-50) :is(.text-white-50, .text-muted-light, .text-muted) {
    color: #475569 !important;
}

/* ---------- 4. Background utilities ---------- */
html[data-app-theme="light"] .bg-dark,
html[data-app-theme="light"] .bg-dark-light { background-color: #ffffff !important; color: #0f172a; }
html[data-app-theme="light"] :is(.card, .modal-content, .list-group-item, .accordion-item, .offcanvas) :is(.bg-dark, .bg-dark-light):not(.card):not(.modal-content):not(.form-control):not(.form-select):not(.btn):not(.list-group-item),
html[data-app-theme="light"] .card.bg-dark .card-header.bg-dark,
html[data-app-theme="light"] .bg-black {
    background-color: #f8fafc !important;
}
html[data-app-theme="light"] .badge.bg-dark,
html[data-app-theme="light"] .badge.bg-black { background-color: #f1f5f9 !important; color: #334155 !important; border: 1px solid #e2e8f0; }
html[data-app-theme="light"] .bg-light { background-color: #f1f5f9 !important; }
html[data-app-theme="light"] .bg-body, html[data-app-theme="light"] .bg-body-tertiary { background-color: #f8fafc !important; }
html[data-app-theme="light"] .bg-white { background-color: #ffffff !important; }
html[data-app-theme="light"] .bg-primary:not([class*="bg-opacity"]) { background-color: #4f46e5 !important; }
html[data-app-theme="light"] .bg-warning:not([class*="bg-opacity"]) { color: #0f172a; }
html[data-app-theme="light"] .bg-warning:not([class*="bg-opacity"]) .text-white,
html[data-app-theme="light"] .bg-warning.text-white { color: #0f172a !important; }

/* Bootstrap subtle backgrounds */
html[data-app-theme="light"] .bg-danger-subtle { background-color: #fee2e2 !important; }
html[data-app-theme="light"] .bg-success-subtle { background-color: #dcfce7 !important; }
html[data-app-theme="light"] .bg-warning-subtle { background-color: #fef3c7 !important; }
html[data-app-theme="light"] .bg-info-subtle { background-color: #e0f2fe !important; }
html[data-app-theme="light"] .bg-primary-subtle { background-color: #e0e7ff !important; }
html[data-app-theme="light"] .bg-secondary-subtle { background-color: #f1f5f9 !important; }

/* ---------- 5. Borders ---------- */
html[data-app-theme="light"] .border-secondary { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .border-dark { border-color: #cbd5e1 !important; }
html[data-app-theme="light"] .border-light { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .border-white { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .border-secondary.border-opacity-25,
html[data-app-theme="light"] .border-secondary.border-opacity-50 { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .border-warning { border-color: #f59e0b !important; }
html[data-app-theme="light"] .border-info { border-color: #0ea5e9 !important; }
html[data-app-theme="light"] .border-primary { border-color: #6366f1 !important; }
html[data-app-theme="light"] .border-warning.border-opacity-25 { border-color: rgba(245, 158, 11, 0.4) !important; }

/* ---------- 6. Layout chrome: sidebar / top bar / bottom bar ---------- */
html[data-app-theme="light"] #sidebar {
    background: #ffffff !important;
    color: #0f172a;
    border-right: 1px solid #e2e8f0;
    box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02), 4px 0 16px rgba(15, 23, 42, 0.04) !important;
}
@media (max-width: 992px) {
    html[data-app-theme="light"] #sidebar { border-left: 1px solid #e2e8f0; border-right: 0; box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12) !important; }
}
html[data-app-theme="light"] #sidebar .sidebar-header { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] #sidebar .sidebar-footer { background: #ffffff !important; border-color: #e2e8f0 !important; }
:where(html[data-app-theme="light"]) ul li a { color: #475569; }
:where(html[data-app-theme="light"]) ul li a:hover,
:where(html[data-app-theme="light"]) ul li.active > a {
    color: #0f172a;
    background: #eef2ff;
}
html[data-app-theme="light"] #sidebar ul ul a { background: #f8fafc !important; }
html[data-app-theme="light"] #sidebar .active-sub,
html[data-app-theme="light"] #sidebar .active-sub > a { background: #eef2ff !important; }
html[data-app-theme="light"] #sidebar .active-sub a { color: #4338ca !important; }
html[data-app-theme="light"] #sidebar .nav-label { color: #94a3b8 !important; }
html[data-app-theme="light"] #sidebarOverlay { background: rgba(15, 23, 42, 0.35); }
html[data-app-theme="light"] .sidebar-header h3 { background: linear-gradient(to right, #4f46e5, #9333ea); -webkit-background-clip: text; background-clip: text; }

html[data-app-theme="light"] .top-navbar {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
html[data-app-theme="light"] .brand-logo-text,
html[data-app-theme="light"] .brand-logo-text:hover { color: #0f172a !important; }
html[data-app-theme="light"] .brand-net { color: #2563eb !important; text-shadow: none; }
html[data-app-theme="light"] .header-action-btn {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}
html[data-app-theme="light"] .header-action-btn:hover { background: #f1f5f9 !important; color: #0f172a !important; }
html[data-app-theme="light"] .user-profile:hover { background: #f1f5f9; }
html[data-app-theme="light"] .user-avatar { background: #4f46e5; color: #fff !important; }

html[data-app-theme="light"] .search-box input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}
html[data-app-theme="light"] .search-box input::placeholder { color: #94a3b8; }
html[data-app-theme="light"] .search-box input:focus { background: #ffffff; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12); }
html[data-app-theme="light"] .search-box i { color: #94a3b8; }
html[data-app-theme="light"] #mobileSearchOverlay {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
html[data-app-theme="light"] #mobileSearchOverlay .btn-close-search { color: #334155; }

/* quick buttons in header (admin) */
html[data-app-theme="light"] .btn-fast-debt { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
html[data-app-theme="light"] .btn-fast-coll { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
html[data-app-theme="light"] .header-btn[style*="13, 202, 240"] { background: #e0f2fe !important; color: #0369a1 !important; border-color: #bae6fd !important; }
html[data-app-theme="light"] .header-btn[style*="99, 102, 241"] { background: #eef2ff !important; color: #4338ca !important; border-color: #c7d2fe !important; }

/* mobile bottom bar */
html[data-app-theme="light"] .mobile-bottom-bar {
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}
html[data-app-theme="light"] .bottom-btn { color: #475569; }
html[data-app-theme="light"] .bottom-btn.active { background: #eef2ff !important; color: #4f46e5 !important; }
html[data-app-theme="light"] .bottom-btn.bb-debt { color: #dc2626; }
html[data-app-theme="light"] .bottom-btn.bb-coll { color: #16a34a; }
html[data-app-theme="light"] .bottom-btn.bb-income { color: #0891b2; }
html[data-app-theme="light"] .bottom-btn.bb-expense { color: #9333ea; }
html[data-app-theme="light"] .bottom-btn.bb-note { color: #b45309; }

/* FAB */
html[data-app-theme="light"] .fab-overlay { background: rgba(15, 23, 42, 0.35); }
html[data-app-theme="light"] .fab-main-btn { border-color: #ffffff; box-shadow: 0 8px 22px rgba(79, 70, 229, 0.35), 0 2px 6px rgba(15, 23, 42, 0.15); }
html[data-app-theme="light"] .fab-option { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18); border-color: rgba(255, 255, 255, 0.6); }
html[data-app-theme="light"] .fab-speed-dial .fab-radial-options .fab-option .fab-label {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

/* ---------- 7. Cards & surfaces ---------- */
html[data-app-theme="light"] .card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.05);
}
html[data-app-theme="light"] .card.border-0 { border: 1px solid #e2e8f0 !important; }
html[data-app-theme="light"] .card.shadow-lg,
html[data-app-theme="light"] .card.shadow { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.07) !important; }
html[data-app-theme="light"] .card-header,
html[data-app-theme="light"] .card-footer { border-color: #e2e8f0; color: inherit; }
html[data-app-theme="light"] .card-header:not([class*="bg-"]):not([style*="background"]) { background-color: #ffffff; }
html[data-app-theme="light"] .card-footer.bg-dark,
html[data-app-theme="light"] .card-header.bg-dark { background-color: #f8fafc !important; }
html[data-app-theme="light"] .shadow-lg { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10) !important; }
html[data-app-theme="light"] .shadow { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important; }

/* Inline dark backgrounds (style="background: #1e293b" etc.) */
html[data-app-theme="light"] [style*="background: #1e293b"],
html[data-app-theme="light"] [style*="background:#1e293b"],
html[data-app-theme="light"] [style*="background-color: #1e293b"],
html[data-app-theme="light"] [style*="background-color:#1e293b"],
html[data-app-theme="light"] [style*="background:var(--bg-card)"],
html[data-app-theme="light"] [style*="background: var(--bg-card)"] {
    background: #ffffff !important;
    color: #0f172a;
}
html[data-app-theme="light"] [style*="background: #0f172a"],
html[data-app-theme="light"] [style*="background:#0f172a"],
html[data-app-theme="light"] [style*="background-color: #0f172a"],
html[data-app-theme="light"] [style*="background-color:#0f172a"],
html[data-app-theme="light"] [style*="background: #334155"],
html[data-app-theme="light"] [style*="background:#334155"],
html[data-app-theme="light"] [style*="background: rgba(0,0,0"],
html[data-app-theme="light"] [style*="background:rgba(0,0,0"],
html[data-app-theme="light"] [style*="background: rgba(0, 0, 0"],
html[data-app-theme="light"] [style*="background:rgba(255,255,255,0.05)"],
html[data-app-theme="light"] [style*="background: rgba(255,255,255,0.05)"],
html[data-app-theme="light"] [style*="background: rgba(255, 255, 255, 0.05)"],
html[data-app-theme="light"] [style*="background: rgba(255,255,255,0.03)"],
html[data-app-theme="light"] [style*="background: rgba(255, 255, 255, 0.03)"] {
    background: #f8fafc !important;
    color: #0f172a;
}
html[data-app-theme="light"] [style*="border:1px solid rgba(255,255,255"],
html[data-app-theme="light"] [style*="border: 1px solid rgba(255,255,255"],
html[data-app-theme="light"] [style*="border: 1px solid rgba(255, 255, 255"],
html[data-app-theme="light"] [style*="border-color: #334155"],
html[data-app-theme="light"] [style*="border-color:#334155"] { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] [style*="border-bottom: 1px solid rgba(255,255,255"],
html[data-app-theme="light"] [style*="border-bottom:1px solid rgba(255,255,255"] { border-bottom-color: #e2e8f0 !important; }

/* Inline light text colours meant for dark surfaces */
html[data-app-theme="light"] [style*="color: #fff;"]:not([style*="background"]),
html[data-app-theme="light"] [style*="color:#fff;"]:not([style*="background"]),
html[data-app-theme="light"] [style*="color: #fff\""],
html[data-app-theme="light"] [style*="color: #e2e8f0"],
html[data-app-theme="light"] [style*="color:#e2e8f0"],
html[data-app-theme="light"] [style*="color: #f8fafc"],
html[data-app-theme="light"] [style*="color:#f8fafc"],
html[data-app-theme="light"] [style*="color: #f1f5f9"] { color: #0f172a !important; }
html[data-app-theme="light"] [style*="color: #cbd5e1"],
html[data-app-theme="light"] [style*="color:#cbd5e1"],
html[data-app-theme="light"] [style*="color:#94a3b8"],
html[data-app-theme="light"] [style*="color: #94a3b8"] { color: #64748b !important; }
html[data-app-theme="light"] [style*="color: #f87171"],
html[data-app-theme="light"] [style*="color:#f87171"],
html[data-app-theme="light"] [style*="color:#ef4444"],
html[data-app-theme="light"] [style*="color: #ef4444"] { color: #dc2626 !important; }
html[data-app-theme="light"] [style*="color: #34d399"],
html[data-app-theme="light"] [style*="color:#34d399"],
html[data-app-theme="light"] [style*="color: #10b981"],
html[data-app-theme="light"] [style*="color:#10b981"],
html[data-app-theme="light"] [style*="color: #4ade80"] { color: #16a34a !important; }
html[data-app-theme="light"] [style*="color:#fbbf24"],
html[data-app-theme="light"] [style*="color: #fbbf24"] { color: #b45309 !important; }
html[data-app-theme="light"] [style*="color:#818cf8"],
html[data-app-theme="light"] [style*="color: #818cf8"],
html[data-app-theme="light"] [style*="color:#a5b4fc"] { color: #4f46e5 !important; }
html[data-app-theme="light"] [style*="color: #38bdf8"],
html[data-app-theme="light"] [style*="color: #0dcaf0"] { color: #0369a1 !important; }

/* Dark-tinted gradient cards (e.g. panel KPI: "rgba(..,0.2) 0%, rgba(30,41,59,1) 100%") */
html[data-app-theme="light"] [style*="rgba(30,41,59,1)"],
html[data-app-theme="light"] [style*="rgba(30, 41, 59, 1)"],
html[data-app-theme="light"] [style*="#1e293b 100%"],
html[data-app-theme="light"] [style*="#0f172a 100%"] {
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 75%) !important;
}
html[data-app-theme="light"] [style*="rgba(16,185,129,0.2) 0%, rgba(6,78,59,1)"] {
    background: linear-gradient(135deg, #dcfce7 0%, #ffffff 80%) !important;
}

/* ---------- 8. Tables ---------- */
html[data-app-theme="light"] .table,
html[data-app-theme="light"] .table-dark {
    --bs-table-color: #0f172a;
    --bs-table-bg: #ffffff;
    --bs-table-border-color: #e2e8f0;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-striped-color: #0f172a;
    --bs-table-active-bg: #eef2ff;
    --bs-table-active-color: #0f172a;
    --bs-table-hover-bg: #f1f5f9;
    --bs-table-hover-color: #0f172a;
    --bs-table-accent-bg: transparent;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}
html[data-app-theme="light"] .table td,
html[data-app-theme="light"] .table th { color: #0f172a !important; border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .table thead th,
html[data-app-theme="light"] .table > thead > tr > * {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
html[data-app-theme="light"] .table tbody td,
html[data-app-theme="light"] .table tbody th {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eef2f7 !important;
}
html[data-app-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: #f8fafc !important; }
html[data-app-theme="light"] .table-hover tbody tr:hover td,
html[data-app-theme="light"] .table-hover tbody tr:hover th { background-color: #f1f5f9 !important; color: #0f172a !important; }
html[data-app-theme="light"] .table tfoot td,
html[data-app-theme="light"] .table tfoot th { background-color: #f8fafc !important; }
/* semantic text inside cells keeps its colour */
html[data-app-theme="light"] .table :is(td, th).text-success, html[data-app-theme="light"] .table :is(td, th) .text-success { color: #16a34a !important; }
html[data-app-theme="light"] .table :is(td, th).text-danger, html[data-app-theme="light"] .table :is(td, th) .text-danger { color: #dc2626 !important; }
html[data-app-theme="light"] .table :is(td, th).text-warning, html[data-app-theme="light"] .table :is(td, th) .text-warning { color: #b45309 !important; }
html[data-app-theme="light"] .table :is(td, th).text-info, html[data-app-theme="light"] .table :is(td, th) .text-info { color: #0369a1 !important; }
html[data-app-theme="light"] .table :is(td, th).text-primary, html[data-app-theme="light"] .table :is(td, th) .text-primary { color: #4f46e5 !important; }
html[data-app-theme="light"] .table :is(td, th).text-muted, html[data-app-theme="light"] .table :is(td, th) .text-muted,
html[data-app-theme="light"] .table :is(td, th).text-white-50, html[data-app-theme="light"] .table :is(td, th) .text-white-50 { color: #64748b !important; }
html[data-app-theme="light"] .table-bordered > :not(caption) > * > * { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .table[style*="color: #fff"] { color: #0f172a !important; }

/* ---------- 9. Forms ---------- */
html[data-app-theme="light"] .form-label { color: #334155 !important; }
html[data-app-theme="light"] label:not(.btn):not(.badge):not([class*="bg-"]) { color: #334155; }
html[data-app-theme="light"] .form-check-label { color: #334155 !important; }
html[data-app-theme="light"] .form-control,
html[data-app-theme="light"] .form-select,
html[data-app-theme="light"] .form-control.bg-dark,
html[data-app-theme="light"] .form-select.bg-dark,
html[data-app-theme="light"] .form-control.bg-black,
html[data-app-theme="light"] .form-select.bg-black,
html[data-app-theme="light"] .form-control.bg-transparent,
html[data-app-theme="light"] textarea.form-control,
html[data-app-theme="light"] input.form-control[style],
html[data-app-theme="light"] select.form-select[style] {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
html[data-app-theme="light"] .form-control.border-primary,
html[data-app-theme="light"] .form-select.border-primary { border-color: #818cf8 !important; }
html[data-app-theme="light"] .form-control:focus,
html[data-app-theme="light"] .form-select:focus {
    background-color: #ffffff !important;
    border-color: #6366f1 !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15) !important;
}
html[data-app-theme="light"] .form-control::placeholder,
html[data-app-theme="light"] textarea::placeholder,
html[data-app-theme="light"] input::placeholder { color: #94a3b8 !important; opacity: 1; }
html[data-app-theme="light"] .form-control:disabled,
html[data-app-theme="light"] .form-control[readonly],
html[data-app-theme="light"] .form-select:disabled {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}
html[data-app-theme="light"] .form-select { background-image: var(--bs-form-select-bg-img) !important; background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px 12px; }
html[data-app-theme="light"] .form-select[multiple],
html[data-app-theme="light"] .form-select[size]:not([size="1"]) { background-image: none !important; }
html[data-app-theme="light"] .form-select option { background: #ffffff; color: #0f172a; }
html[data-app-theme="light"] input[type="date"].form-control,
html[data-app-theme="light"] input[type="datetime-local"].form-control,
html[data-app-theme="light"] input[type="time"].form-control,
html[data-app-theme="light"] input[type="month"].form-control { color-scheme: light; }
html[data-app-theme="light"] ::-webkit-calendar-picker-indicator { filter: none !important; }
html[data-app-theme="light"] .input-group-text,
html[data-app-theme="light"] .input-group-text.bg-dark,
html[data-app-theme="light"] .input-group-text.bg-black,
html[data-app-theme="light"] .input-group-text.bg-transparent {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}
html[data-app-theme="light"] .form-check-input {
    background-color: #ffffff;
    border-color: #94a3b8;
}
html[data-app-theme="light"] .form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }
html[data-app-theme="light"] .form-check-input.bg-dark:not(:checked),
html[data-app-theme="light"] .form-check-input.bg-secondary:not(:checked) { background-color: #ffffff !important; }
html[data-app-theme="light"] .form-switch .form-check-input:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%2815, 23, 42, 0.35%29'/%3e%3c/svg%3e");
}
html[data-app-theme="light"] .form-range::-webkit-slider-runnable-track { background-color: #e2e8f0; }
html[data-app-theme="light"] .form-text { color: #64748b !important; }
html[data-app-theme="light"] .form-control-color { background: #ffffff !important; }

/* ---------- 10. Buttons ---------- */
html[data-app-theme="light"] .btn-primary {
    --bs-btn-bg: #4f46e5; --bs-btn-border-color: #4f46e5;
    --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
    --bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
    background-color: #4f46e5;
    color: #ffffff !important;
}
html[data-app-theme="light"] .btn-primary:hover { background-color: #4338ca; }
html[data-app-theme="light"] .btn-outline-light,
html[data-app-theme="light"] .btn-outline-custom {
    --bs-btn-color: #334155;
    --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-color: #0f172a;
    --bs-btn-hover-bg: #f1f5f9;
    --bs-btn-hover-border-color: #94a3b8;
    --bs-btn-active-color: #0f172a;
    --bs-btn-active-bg: #e2e8f0;
    --bs-btn-active-border-color: #94a3b8;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
    background-color: #ffffff;
}
html[data-app-theme="light"] .btn-outline-light:hover,
html[data-app-theme="light"] .btn-outline-custom:hover { background-color: #f1f5f9 !important; color: #0f172a !important; }
html[data-app-theme="light"] .btn-outline-light.active,
html[data-app-theme="light"] .btn-check:checked + .btn-outline-light { background-color: #4f46e5 !important; border-color: #4f46e5 !important; color: #fff !important; }
html[data-app-theme="light"] .btn-outline-secondary {
    --bs-btn-color: #475569; --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-color: #0f172a; --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-border-color: #94a3b8;
    --bs-btn-active-color: #ffffff; --bs-btn-active-bg: #475569; --bs-btn-active-border-color: #475569;
}
html[data-app-theme="light"] .btn-outline-secondary:not(.active):not(:hover) { color: #475569 !important; }
html[data-app-theme="light"] .btn-outline-secondary.active,
html[data-app-theme="light"] .btn-check:checked + .btn-outline-secondary { color: #fff !important; }
html[data-app-theme="light"] .btn-outline-info { --bs-btn-color: #0369a1; --bs-btn-border-color: #38bdf8; --bs-btn-hover-bg: #0284c7; --bs-btn-hover-border-color: #0284c7; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #0284c7; --bs-btn-active-color: #fff; }
html[data-app-theme="light"] .btn-outline-warning { --bs-btn-color: #b45309; --bs-btn-border-color: #f59e0b; --bs-btn-hover-bg: #f59e0b; --bs-btn-hover-border-color: #f59e0b; --bs-btn-hover-color: #0f172a; --bs-btn-active-bg: #f59e0b; --bs-btn-active-color: #0f172a; }
html[data-app-theme="light"] .btn-outline-success { --bs-btn-color: #15803d; --bs-btn-border-color: #22c55e; --bs-btn-hover-bg: #16a34a; --bs-btn-hover-border-color: #16a34a; --bs-btn-hover-color: #fff; }
html[data-app-theme="light"] .btn-outline-danger { --bs-btn-color: #dc2626; --bs-btn-border-color: #f87171; --bs-btn-hover-bg: #dc2626; --bs-btn-hover-border-color: #dc2626; --bs-btn-hover-color: #fff; }
html[data-app-theme="light"] .btn-outline-primary { --bs-btn-color: #4f46e5; --bs-btn-border-color: #818cf8; --bs-btn-hover-bg: #4f46e5; --bs-btn-hover-border-color: #4f46e5; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #4f46e5; --bs-btn-active-color: #fff; }
html[data-app-theme="light"] .btn-outline-dark { --bs-btn-color: #334155; --bs-btn-border-color: #cbd5e1; --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-color: #0f172a; }
html[data-app-theme="light"] :is(.btn-outline-info, .btn-outline-warning, .btn-outline-success, .btn-outline-danger, .btn-outline-primary):hover :is(i, span) { color: inherit; }
html[data-app-theme="light"] .btn-dark {
    --bs-btn-bg: #ffffff; --bs-btn-color: #0f172a; --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-color: #0f172a; --bs-btn-hover-border-color: #94a3b8;
    --bs-btn-active-bg: #e2e8f0; --bs-btn-active-color: #0f172a;
}
html[data-app-theme="light"] .btn-dark :is(.text-white, .text-light),
html[data-app-theme="light"] .btn-dark.text-white { color: #0f172a !important; }
html[data-app-theme="light"] .btn-secondary { --bs-btn-bg: #64748b; --bs-btn-border-color: #64748b; --bs-btn-hover-bg: #475569; --bs-btn-hover-border-color: #475569; }
html[data-app-theme="light"] .btn-warning { --bs-btn-color: #0f172a; --bs-btn-hover-color: #0f172a; }
html[data-app-theme="light"] .btn-warning.text-white,
html[data-app-theme="light"] .btn-warning .text-white { color: #0f172a !important; }
html[data-app-theme="light"] .btn-link { --bs-btn-color: #4f46e5; --bs-btn-hover-color: #4338ca; }
html[data-app-theme="light"] .btn.bg-dark,
html[data-app-theme="light"] .btn.bg-transparent.text-white { border-color: #cbd5e1; }
html[data-app-theme="light"] .btn-close-white,
html[data-app-theme="light"] .btn-close { filter: none !important; }
html[data-app-theme="light"] .btn-close {
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230f172a'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    background-image: var(--bs-btn-close-bg) !important;
}
html[data-app-theme="light"] :is(.bg-primary, .bg-danger, .bg-success, #notifBanner) > .btn-close,
html[data-app-theme="light"] .modal-header:is(.bg-primary, .bg-danger, .bg-success, .bg-info) .btn-close { filter: invert(1) grayscale(100%) brightness(200%) !important; }

/* ---------- 11. Modals / offcanvas / dropdowns / popovers ---------- */
html[data-app-theme="light"] .modal-content,
html[data-app-theme="light"] .modal-content.bg-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18) !important;
}
html[data-app-theme="light"] .modal-header,
html[data-app-theme="light"] .modal-footer { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .modal-header:not([class*="bg-"]):not([style*="background"]) { background-color: #ffffff; }
html[data-app-theme="light"] .modal-backdrop { --bs-backdrop-bg: #0f172a; --bs-backdrop-opacity: .45; }
html[data-app-theme="light"] .offcanvas,
html[data-app-theme="light"] .offcanvas.bg-dark { background-color: #ffffff !important; color: #0f172a !important; }

html[data-app-theme="light"] .dropdown-menu,
html[data-app-theme="light"] .dropdown-menu-dark {
    --bs-dropdown-bg: #ffffff;
    --bs-dropdown-color: #0f172a;
    --bs-dropdown-border-color: #e2e8f0;
    --bs-dropdown-link-color: #0f172a;
    --bs-dropdown-link-hover-color: #0f172a;
    --bs-dropdown-link-hover-bg: #f1f5f9;
    --bs-dropdown-link-active-color: #ffffff;
    --bs-dropdown-link-active-bg: #4f46e5;
    --bs-dropdown-divider-bg: #e2e8f0;
    --bs-dropdown-header-color: #64748b;
    --bs-dropdown-link-disabled-color: #94a3b8;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
}
html[data-app-theme="light"] .dropdown-item { color: #0f172a; }
html[data-app-theme="light"] .dropdown-item:hover,
html[data-app-theme="light"] .dropdown-item:focus { background-color: #f1f5f9; color: #0f172a; }
html[data-app-theme="light"] .dropdown-item.active,
html[data-app-theme="light"] .dropdown-item:active { background-color: #4f46e5 !important; color: #ffffff !important; }
html[data-app-theme="light"] .dropdown-item.text-danger { color: #dc2626 !important; }
html[data-app-theme="light"] .dropdown-item.text-info { color: #0369a1 !important; }
html[data-app-theme="light"] .dropdown-divider { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .dropdown-header { color: #64748b !important; }

html[data-app-theme="light"] .popover { --bs-popover-bg: #ffffff; --bs-popover-body-color: #0f172a; --bs-popover-border-color: #e2e8f0; }
html[data-app-theme="light"] .tooltip { --bs-tooltip-bg: #0f172a; --bs-tooltip-color: #ffffff; }

/* ---------- 12. List group / accordion / nav / pagination / progress ---------- */
html[data-app-theme="light"] .list-group {
    --bs-list-group-bg: #ffffff;
    --bs-list-group-color: #0f172a;
    --bs-list-group-border-color: #e2e8f0;
    --bs-list-group-action-color: #334155;
    --bs-list-group-action-hover-color: #0f172a;
    --bs-list-group-action-hover-bg: #f8fafc;
    --bs-list-group-action-active-bg: #eef2ff;
    --bs-list-group-active-bg: #4f46e5;
    --bs-list-group-active-border-color: #4f46e5;
    --bs-list-group-disabled-color: #94a3b8;
}
html[data-app-theme="light"] .list-group-item.bg-dark,
html[data-app-theme="light"] .list-group-item.bg-transparent { color: #0f172a; }
html[data-app-theme="light"] .list-group-item { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .list-group-item-action:hover { background-color: #f8fafc !important; }

html[data-app-theme="light"] .accordion {
    --bs-accordion-bg: #ffffff;
    --bs-accordion-color: #0f172a;
    --bs-accordion-border-color: #e2e8f0;
    --bs-accordion-btn-color: #0f172a;
    --bs-accordion-btn-bg: #ffffff;
    --bs-accordion-active-color: #3730a3;
    --bs-accordion-active-bg: #eef2ff;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23334155' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233730a3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
}
html[data-app-theme="light"] .accordion-button { filter: none !important; }
html[data-app-theme="light"] .accordion-button::after { filter: none !important; }
html[data-app-theme="light"] .accordion-button.bg-dark,
html[data-app-theme="light"] .accordion-button.bg-transparent { background-color: #ffffff !important; color: #0f172a !important; }
html[data-app-theme="light"] .accordion-button:not(.collapsed).bg-dark { background-color: #eef2ff !important; }
html[data-app-theme="light"] .accordion-body.bg-black { background-color: #f8fafc !important; }

html[data-app-theme="light"] .nav-tabs { --bs-nav-tabs-border-color: #e2e8f0; --bs-nav-tabs-link-hover-border-color: #e2e8f0 #e2e8f0 #e2e8f0; --bs-nav-tabs-link-active-color: #4f46e5; --bs-nav-tabs-link-active-bg: #ffffff; --bs-nav-tabs-link-active-border-color: #e2e8f0 #e2e8f0 #ffffff; border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .nav-link { --bs-nav-link-color: #475569; --bs-nav-link-hover-color: #0f172a; }
html[data-app-theme="light"] .nav-tabs .nav-link.active { color: #4f46e5 !important; background-color: #ffffff !important; }
html[data-app-theme="light"] .nav-pills { --bs-nav-pills-link-active-bg: #4f46e5; --bs-nav-pills-link-active-color: #ffffff; }
html[data-app-theme="light"] .nav-pills .nav-link:not(.active) { color: #475569; }
html[data-app-theme="light"] .nav-pills .nav-link:not(.active).text-white,
html[data-app-theme="light"] .nav-pills .nav-link:not(.active).text-white-50 { color: #475569 !important; }
html[data-app-theme="light"] .nav-pills .nav-link.active,
html[data-app-theme="light"] .nav-pills .nav-link.active * { color: #ffffff !important; }
html[data-app-theme="light"] .nav-pills .nav-link.active:not([class*="bg-"]) { background-color: #4f46e5 !important; }

html[data-app-theme="light"] .pagination {
    --bs-pagination-color: #4f46e5;
    --bs-pagination-bg: #ffffff;
    --bs-pagination-border-color: #e2e8f0;
    --bs-pagination-hover-color: #4338ca;
    --bs-pagination-hover-bg: #f1f5f9;
    --bs-pagination-hover-border-color: #e2e8f0;
    --bs-pagination-focus-bg: #eef2ff;
    --bs-pagination-active-color: #ffffff;
    --bs-pagination-active-bg: #4f46e5;
    --bs-pagination-active-border-color: #4f46e5;
    --bs-pagination-disabled-color: #94a3b8;
    --bs-pagination-disabled-bg: #f8fafc;
    --bs-pagination-disabled-border-color: #e2e8f0;
}
html[data-app-theme="light"] .page-link.bg-dark { background-color: #ffffff !important; color: #4f46e5 !important; }
html[data-app-theme="light"] .page-item.active .page-link { background-color: #4f46e5 !important; border-color: #4f46e5 !important; color: #ffffff !important; }

html[data-app-theme="light"] .progress,
html[data-app-theme="light"] .progress-stacked { --bs-progress-bg: #e2e8f0; background-color: #e2e8f0 !important; }
html[data-app-theme="light"] .progress.bg-dark,
html[data-app-theme="light"] .progress.bg-secondary,
html[data-app-theme="light"] .progress.bg-black { background-color: #e2e8f0 !important; }

/* ---------- 13. Badges & alerts ---------- */
html[data-app-theme="light"] .badge.bg-warning:not([class*="bg-opacity"]) { color: #0f172a !important; }
html[data-app-theme="light"] .badge.bg-warning.text-white { color: #0f172a !important; }
html[data-app-theme="light"] .badge.bg-info:not([class*="bg-opacity"]) { background-color: #0284c7 !important; color: #ffffff !important; }
html[data-app-theme="light"] .badge[class*="bg-opacity"].text-warning { color: #92400e !important; }
html[data-app-theme="light"] .badge[class*="bg-opacity"].text-success { color: #15803d !important; }
html[data-app-theme="light"] .badge[class*="bg-opacity"].text-info { color: #075985 !important; }
html[data-app-theme="light"] .badge[class*="bg-opacity"].text-danger { color: #b91c1c !important; }
html[data-app-theme="light"] .badge.bg-danger-subtle { color: #b91c1c !important; }
html[data-app-theme="light"] .badge.bg-success-subtle { color: #15803d !important; }
html[data-app-theme="light"] .badge.bg-warning-subtle { color: #92400e !important; }
html[data-app-theme="light"] .badge.bg-info-subtle { color: #075985 !important; }
html[data-app-theme="light"] .badge.bg-primary-subtle { color: #3730a3 !important; }
html[data-app-theme="light"] .badge.bg-light { color: #334155 !important; }

html[data-app-theme="light"] .alert-primary { --bs-alert-color: #3730a3; --bs-alert-bg: #eef2ff; --bs-alert-border-color: #c7d2fe; }
html[data-app-theme="light"] .alert-info { --bs-alert-color: #075985; --bs-alert-bg: #f0f9ff; --bs-alert-border-color: #bae6fd; }
html[data-app-theme="light"] .alert-success { --bs-alert-color: #166534; --bs-alert-bg: #f0fdf4; --bs-alert-border-color: #bbf7d0; }
html[data-app-theme="light"] .alert-warning { --bs-alert-color: #92400e; --bs-alert-bg: #fffbeb; --bs-alert-border-color: #fde68a; }
html[data-app-theme="light"] .alert-danger { --bs-alert-color: #991b1b; --bs-alert-bg: #fef2f2; --bs-alert-border-color: #fecaca; }
html[data-app-theme="light"] .alert-secondary,
html[data-app-theme="light"] .alert-dark,
html[data-app-theme="light"] .alert-light { --bs-alert-color: #334155; --bs-alert-bg: #f8fafc; --bs-alert-border-color: #e2e8f0; }
html[data-app-theme="light"] .alert :is(.text-white, .text-light) { color: inherit !important; }
html[data-app-theme="light"] .alert :is(.text-white-50, .text-muted-light) { color: #475569 !important; }
html[data-app-theme="light"] .alert.bg-dark { border: 1px solid #e2e8f0 !important; }

/* notification permission banners (inline gradient / indigo, white text) – keep coloured */
html[data-app-theme="light"] #notifPermBanner,
html[data-app-theme="light"] #notifBanner { color: #ffffff !important; }
html[data-app-theme="light"] #notifBanner :is(span, strong, i, p) { color: #ffffff !important; }

/* ---------- 14. jQuery UI autocomplete / select2 / toastr / Swal ---------- */
html[data-app-theme="light"] .ui-autocomplete,
html[data-app-theme="light"] .ui-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14) !important;
}
html[data-app-theme="light"] .ui-autocomplete li > div[style*="background"] { background: #ffffff !important; }
html[data-app-theme="light"] .ui-menu-item-wrapper { color: #0f172a !important; }
html[data-app-theme="light"] .ui-autocomplete.vrs-desc-ac .ui-menu-item-wrapper { color: #0f172a !important; }
html[data-app-theme="light"] .ui-menu-item-wrapper.ui-state-active,
html[data-app-theme="light"] .ui-autocomplete.vrs-desc-ac .ui-menu-item-wrapper.ui-state-active {
    background: #eef2ff !important;
    color: #0f172a !important;
}
html[data-app-theme="light"] .ui-menu-item-wrapper.ui-state-active > div[style*="background"] { background: #eef2ff !important; }
html[data-app-theme="light"] .ui-datepicker { background: #fff; color: #0f172a; border-color: #e2e8f0; }

html[data-app-theme="light"] .select2-container--default .select2-selection--single,
html[data-app-theme="light"] .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important; border-color: #cbd5e1 !important;
}
html[data-app-theme="light"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: #0f172a !important; }
html[data-app-theme="light"] .select2-dropdown { background-color: #ffffff !important; color: #0f172a !important; border-color: #e2e8f0 !important; }
html[data-app-theme="light"] .select2-results__option { color: #0f172a !important; }
html[data-app-theme="light"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #4f46e5 !important; color: #fff !important; }
html[data-app-theme="light"] .select2-search__field { background: #fff !important; color: #0f172a !important; border-color: #cbd5e1 !important; }

html[data-app-theme="light"] .swal2-popup { background: #ffffff !important; color: #0f172a !important; }
html[data-app-theme="light"] .swal2-title,
html[data-app-theme="light"] .swal2-html-container { color: #0f172a !important; }
html[data-app-theme="light"] .swal2-input,
html[data-app-theme="light"] .swal2-textarea,
html[data-app-theme="light"] .swal2-select { background: #ffffff !important; color: #0f172a !important; border-color: #cbd5e1 !important; }

/* ---------- 15. Calculator overlay ---------- */
html[data-app-theme="light"] #calculator-overlay {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.30) !important;
}
html[data-app-theme="light"] .calc-header { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
html[data-app-theme="light"] .calc-header h6 { color: #0f172a; }
html[data-app-theme="light"] .calc-display { background: #f1f5f9; }
html[data-app-theme="light"] .calc-history { color: #64748b; }
html[data-app-theme="light"] .calc-main-display { color: #0f172a; }
html[data-app-theme="light"] .calc-buttons,
html[data-app-theme="light"] .calc-tax-row { background: #e2e8f0; }
html[data-app-theme="light"] .calc-btn { background: #ffffff; color: #0f172a; }
html[data-app-theme="light"] .calc-btn:hover { background: #f1f5f9; }
html[data-app-theme="light"] .calc-btn:active { background: #e2e8f0; }
html[data-app-theme="light"] .calc-btn.op { background: #eef2ff; color: #4f46e5; }
html[data-app-theme="light"] .calc-btn.eq { background: #4f46e5; color: #fff; opacity: 1; }
html[data-app-theme="light"] .calc-btn.tax { background: #f0fdf4; color: #15803d; }
html[data-app-theme="light"] .calc-btn.mem { background: #fffbeb; color: #b45309; }
html[data-app-theme="light"] .calc-btn.ac { color: #dc2626; }
html[data-app-theme="light"] .calc-tax-btn { background: #ffffff; color: #15803d; }
html[data-app-theme="light"] .calc-tax-btn:hover { background: #dcfce7; }
html[data-app-theme="light"] .calc-close,
html[data-app-theme="light"] .calc-toggle-size { color: #64748b; }
html[data-app-theme="light"] .calc-mem-indicator { color: #b45309; }
html[data-app-theme="light"] #calcHistoryPanel { background: #f8fafc !important; border-bottom-color: #e2e8f0 !important; }

/* ---------- 16. Misc ---------- */
html[data-app-theme="light"] .opacity-25.text-primary,
html[data-app-theme="light"] .opacity-25.text-success,
html[data-app-theme="light"] .opacity-25.text-danger { opacity: .15 !important; }
html[data-app-theme="light"] .vr { background-color: #cbd5e1; }
html[data-app-theme="light"] .placeholder { background-color: #e2e8f0; }
html[data-app-theme="light"] kbd { background: #e2e8f0; color: #0f172a; }
html[data-app-theme="light"] .toast { --bs-toast-bg: #ffffff; --bs-toast-color: #0f172a; --bs-toast-header-bg: #f8fafc; --bs-toast-header-color: #0f172a; --bs-toast-border-color: #e2e8f0; }

/* ---------- 17. Page-level <style> blocks (ID-scoped dark rules) ---------- */
/* cariler / cari_detay / raporlar data tables */
html[data-app-theme="light"] :is(#customerTable, #transactionTable, #reportTable) { border: 1px solid #e2e8f0 !important; }
html[data-app-theme="light"] :is(#customerTable, #transactionTable, #reportTable) :is(th, td) { border: 1px solid #e2e8f0 !important; }
html[data-app-theme="light"] :is(#customerTable, #transactionTable, #reportTable) thead th {
    background: #f8fafc !important;
    color: #64748b !important;
    border-bottom: 2px solid #c7d2fe !important;
}
html[data-app-theme="light"] #transactionTable tfoot th { border-top: 2px solid #c7d2fe !important; }

/* kasa + txn category UI: type toggle and icon selector */
html[data-app-theme="light"] .type-toggle .btn { background: #ffffff; color: #334155; border-color: #cbd5e1; }
html[data-app-theme="light"] .type-toggle .btn-check:checked + .btn { color: #ffffff !important; }
html[data-app-theme="light"] :is(.icon-selector, .txn-icon-selector) label { background: #f8fafc; color: #334155 !important; border-color: #e2e8f0; }
html[data-app-theme="light"] :is(.icon-selector, .txn-icon-selector) label:hover { background: #eef2ff; border-color: #6366f1; color: #3730a3 !important; }
html[data-app-theme="light"] :is(.icon-selector, .txn-icon-selector) input[type="radio"]:checked + label { background: #4f46e5; border-color: #4f46e5; color: #ffffff !important; }
html[data-app-theme="light"] .txn-cat-badge { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }

/* notlar */
html[data-app-theme="light"] .note-card:hover { box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10); }
html[data-app-theme="light"] .view-list .note-card { border-color: #e2e8f0; }
html[data-app-theme="light"] .pin-btn { color: #94a3b8; }
html[data-app-theme="light"] .pin-btn:hover { color: #0f172a; }
html[data-app-theme="light"] .pin-btn.active { color: #d97706; text-shadow: none; }
html[data-app-theme="light"] .view-btn { border-color: #cbd5e1; color: #475569; background: #ffffff; }
html[data-app-theme="light"] .view-btn.active { background: #4f46e5; border-color: #4f46e5; color: #ffffff; }
@media (max-width: 767px) {
    html[data-app-theme="light"] .note-actions { background: #ffffff; border-color: #cbd5e1; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18); }
}

/* hatirlatmalar select2 */
html[data-app-theme="light"] .select2-container--default .select2-results__option--selected { background-color: #eef2ff !important; color: #0f172a !important; }

/* profilim tab grid */
html[data-app-theme="light"] .profile-grid-btn { background: #ffffff; color: #334155; border-color: #e2e8f0; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
html[data-app-theme="light"] .profile-grid-btn:hover:not(.active) { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
html[data-app-theme="light"] .profile-grid-btn.active { background: linear-gradient(135deg, #4f46e5, #6366f1); border-color: #4f46e5; color: #ffffff; }

/* teklif mobile card rows */
@media (max-width: 768px) {
    html[data-app-theme="light"] #offerTable tbody tr,
    html[data-app-theme="light"] #itemsTable tbody tr { background: #ffffff !important; border-color: #e2e8f0 !important; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
    html[data-app-theme="light"] #offerTable tbody td:nth-child(4),
    html[data-app-theme="light"] #itemsTable tbody td:nth-child(5) { border-top-color: #e2e8f0 !important; }
    html[data-app-theme="light"] #offerTable tbody td::before,
    html[data-app-theme="light"] #itemsTable tbody td::before { color: #64748b !important; }
    html[data-app-theme="light"] #offerTable tbody td:nth-child(4)::before { color: #4f46e5 !important; }
}
/* arama */
html[data-app-theme="light"] .list-group-item-action:hover { background-color: #f8fafc !important; }

/* ---------- 18. Inline `!important` dark backgrounds (cannot be overridden directly) ----------
   An inline `background(-color): X !important` beats any stylesheet rule, so the light surface
   is painted ON TOP of it: background-image (for cells whose bg is `inherit !important`) or an
   inset box-shadow (for elements using the `background:` shorthand, which also locks the image). */
html[data-app-theme="light"] tr[style*="background-color: #0f172a !important"] > :is(th, td),
html[data-app-theme="light"] tr[style*="background-color: #1e293b !important"] > :is(th, td) {
    background-image: linear-gradient(#f8fafc, #f8fafc) !important;
    color: #0f172a !important;
}
html[data-app-theme="light"] tr[style*="background-color: #0f172a !important"] > :is(th, td).text-white-50 { color: #64748b !important; }
html[data-app-theme="light"] tr[style*="background-color: #0f172a !important"] > :is(th, td).text-success,
html[data-app-theme="light"] tr[style*="background-color: #0f172a !important"] .text-success { color: #16a34a !important; }
html[data-app-theme="light"] tr[style*="background-color: #0f172a !important"] .text-danger { color: #dc2626 !important; }
html[data-app-theme="light"] tfoot.bg-dark { border-top: 2px solid #c7d2fe !important; }
html[data-app-theme="light"] [style*="background: #1e293b !important"],
html[data-app-theme="light"] [style*="background:#1e293b !important"] {
    box-shadow: inset 0 0 0 100vmax #ffffff, 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    color: #0f172a;
}
html[data-app-theme="light"] [style*="background: rgba(255,255,255,0.02) !important"] {
    box-shadow: inset 0 0 0 100vmax #ffffff, 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

/* media_gallery */
html[data-app-theme="light"] .gallery-item { border-color: #e2e8f0; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06); }
html[data-app-theme="light"] .gallery-item-info { background: #ffffff; }
html[data-app-theme="light"] .gallery-item-info h5 { color: #0f172a; }
html[data-app-theme="light"] .gallery-item-info p { color: #64748b; }
html[data-app-theme="light"] .feature-card { background: #ffffff; border-color: #e2e8f0; color: #0f172a; }
html[data-app-theme="light"] .feature-card:hover { background: linear-gradient(145deg, #eef2ff, #ffffff); }
html[data-app-theme="light"] .feature-icon { background: #eef2ff; }

/* ---------- 19. Logged-out / standalone pages (giris_yap, sifre_sifirla, hakkimizda,
   gizlilik_sozlesmesi, uyelik_sozlesmesi, iletisim, hesap_silme) ---------- */
html[data-app-theme="light"] body:not(:has(#content)) { background-color: #f8fafc !important; color: #0f172a !important; }
html[data-app-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
html[data-app-theme="light"] .navbar-brand { color: #0f172a !important; }
html[data-app-theme="light"] .navbar .nav-link { color: #334155 !important; opacity: 1; }
html[data-app-theme="light"] .navbar .nav-link:hover { color: #4f46e5 !important; }
html[data-app-theme="light"] .navbar-toggler,
html[data-app-theme="light"] .navbar-toggler i { color: #0f172a !important; }
html[data-app-theme="light"] .menu-icon span { background: #0f172a; }
@media (max-width: 991px) {
    html[data-app-theme="light"] .navbar-collapse { background: #ffffff; }
}
html[data-app-theme="light"] .brand-logo-text { color: #0f172a !important; -webkit-text-fill-color: #0f172a; }
html[data-app-theme="light"] .brand-net { -webkit-text-fill-color: #2563eb; color: #2563eb !important; text-shadow: none !important; }
html[data-app-theme="light"] .hero-inner {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
html[data-app-theme="light"] .hero-inner :is(h1, h2, .display-4) { color: #0f172a !important; }
html[data-app-theme="light"] .hero-inner p { color: #475569 !important; }
html[data-app-theme="light"] :is(.content-box, .contact-card) {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: none !important;
}
html[data-app-theme="light"] :is(.content-box, .contact-card) :is(h1, h2, h3, h4, h5, h6):not(.text-primary) { color: #0f172a !important; }
html[data-app-theme="light"] :is(.content-box, .contact-card) :is(p, li, span, div):not([class*="text-"]):not(.badge) { color: #334155 !important; }
html[data-app-theme="light"] .icon-box { background: #eef2ff !important; border-color: #c7d2fe !important; color: #4f46e5 !important; }
html[data-app-theme="light"] .footer-premium { background: #ffffff !important; border-top: 1px solid #e2e8f0 !important; }
html[data-app-theme="light"] .footer-premium :is(p, a) { color: #475569 !important; }
html[data-app-theme="light"] .footer-premium h6 { color: #0f172a !important; }
html[data-app-theme="light"] .footer-premium .footer-link:hover { color: #4f46e5 !important; }
html[data-app-theme="light"] .footer-premium .form-control { background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #0f172a !important; }
html[data-app-theme="light"] .footer { border-top-color: #e2e8f0 !important; }
html[data-app-theme="light"] .footer-links a { color: #475569 !important; }
html[data-app-theme="light"] .footer-links a:hover { color: #4f46e5 !important; }
html[data-app-theme="light"] .content-box h5 { color: #0f172a; }

/* giris_yap / sifre_sifirla */
html[data-app-theme="light"] .main-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15) !important;
}
html[data-app-theme="light"] .subtitle-text { color: #64748b !important; }
html[data-app-theme="light"] .main-card .input-group-text { background: transparent !important; border: 0 !important; color: #64748b !important; }
html[data-app-theme="light"] .main-card .form-check-label,
html[data-app-theme="light"] .main-card .text-muted,
html[data-app-theme="light"] .main-card .link-muted { color: #334155 !important; }
html[data-app-theme="light"] .main-card .nav-pills .nav-link:not(.active) { color: #475569 !important; }
html[data-app-theme="light"] .forgot-link,
html[data-app-theme="light"] .link-muted a,
html[data-app-theme="light"] .onay-alani a { color: #4f46e5 !important; }
html[data-app-theme="light"] .onay-alani { background: #eef2ff; border-color: #c7d2fe; }
/* includes/public_header.php pages (sifre_sifirla): global `p {#cbd5e1 !important}` / `h1..h6 {#f8fafc}` */
html[data-app-theme="light"] body:not(:has(#content)) :is(h1, h2, h3, h4, h5, h6):not([class*="text-"]) { color: #0f172a; }
html[data-app-theme="light"] body:not(:has(#content)) .card :is(h1, h2, h3, h4, h5, h6):not([class*="text-"]) { color: #0f172a !important; }
html[data-app-theme="light"] body:not(:has(#content)) .card p:not([class*="text-"]),
html[data-app-theme="light"] body:not(:has(#content)) .content-box p:not([class*="text-"]) { color: #475569 !important; }
html[data-app-theme="light"] body:not(:has(#content)) .card .form-label { color: #334155 !important; }
html[data-app-theme="light"] [style*="background: rgba(15,23,42"],
html[data-app-theme="light"] [style*="background:rgba(15,23,42"],
html[data-app-theme="light"] [style*="background: rgba(15, 23, 42"],
html[data-app-theme="light"] [style*="background: rgba(30,41,59"],
html[data-app-theme="light"] [style*="background: rgba(30, 41, 59"] { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #0f172a; }
html[data-app-theme="light"] .veri-sorumlusu-kutu { background: #eef2ff !important; border-color: #c7d2fe !important; border-left-color: #4f46e5 !important; color: #1e293b !important; }
html[data-app-theme="light"] .hukuki-metin { color: #334155 !important; }
