/* ════════════════════════════════════════════════════════════════
   DARK MODE — body[data-bs-theme="dark"] altında geçerli
   Temel sayfa kabuğu, kart, tablo, form, modal ve özel ödeme
   modallarımız (.ms-pmodal) için karanlık tema değişkenleri.
   ════════════════════════════════════════════════════════════════ */

[data-bs-theme="dark"] {
    /* Bootstrap 5 değişkenleri */
    --bs-body-bg:           #0f172a;
    --bs-body-color:        #e2e8f0;
    --bs-secondary-bg:      #1e293b;
    --bs-tertiary-bg:       #0b1320;
    --bs-border-color:      #334155;
    --bs-emphasis-color:    #f8fafc;
    --bs-secondary-color:   #94a3b8;

    color-scheme: dark;
}

/* ─── Sayfa kabuğu ─── */
[data-bs-theme="dark"],
[data-bs-theme="dark"] body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .main-content,
[data-bs-theme="dark"] .page-content,
[data-bs-theme="dark"] #layout-wrapper {
    background: #0f172a !important;
    color: #e2e8f0;
}

/* ─── Topbar ─── */
[data-bs-theme="dark"] #page-topbar,
[data-bs-theme="dark"] .navbar-header {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .navbar-header .header-item,
[data-bs-theme="dark"] .navbar-header .noti-icon,
[data-bs-theme="dark"] .navbar-header .btn { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .navbar-header .header-item:hover { background: #334155 !important; }

/* ─── Sidebar (zaten data-sidebar=dark var, ama refine edelim) ─── */
[data-bs-theme="dark"] .vertical-menu {
    background: #0b1320 !important;
    border-right: 1px solid #1e293b;
}
[data-bs-theme="dark"] #sidebar-menu .has-arrow,
[data-bs-theme="dark"] #sidebar-menu li a {
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] #sidebar-menu li a:hover,
[data-bs-theme="dark"] #sidebar-menu li.mm-active > a {
    color: #fff !important;
    background: rgba(99,102,241,.15);
}

/* ─── Cards ─── */
[data-bs-theme="dark"] .card {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card .text-muted {
    color: #cbd5e1 !important;
}

/* ─── Headings & breadcrumbs ─── */
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .page-title { color: #f1f5f9 !important; }

[data-bs-theme="dark"] .breadcrumb-item.active { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .breadcrumb-item a       { color: #94a3b8 !important; }
[data-bs-theme="dark"] .breadcrumb-item a:hover { color: #fff !important; }

/* ─── Tables ─── */
[data-bs-theme="dark"] .table {
    --bs-table-bg:           #1e293b;
    --bs-table-color:        #e2e8f0;
    --bs-table-striped-bg:   #243044;
    --bs-table-striped-color:#e2e8f0;
    --bs-table-hover-bg:     #2c3a52;
    --bs-table-hover-color:  #fff;
    --bs-table-border-color: #334155;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .table thead th {
    background: #0f172a !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .table-bordered > :not(caption) > * > * {
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table > tbody > tr.table-light > * { background-color: #2c3a52 !important; color: #e2e8f0 !important; }

/* DataTables-specific */
[data-bs-theme="dark"] .dataTables_wrapper,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select { color: #e2e8f0; }
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: #0f172a; border: 1px solid #334155;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #fff !important; background: #4f46e5 !important; border-color: #4f46e5 !important;
}
[data-bs-theme="dark"] .dataTables_info { color: #94a3b8 !important; }

/* ─── Forms ─── */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea.form-control,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] input[type="month"],
[data-bs-theme="dark"] input[type="search"] {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0f172a !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 .2rem rgba(99,102,241,.25) !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #64748b !important; }
[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled {
    background-color: #1e293b !important;
    color: #64748b !important;
}
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label                 { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .form-text             { color: #94a3b8 !important; }
[data-bs-theme="dark"] .form-check-input      { background-color: #0f172a; border-color: #475569; }
[data-bs-theme="dark"] .form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }
[data-bs-theme="dark"] .form-check-label     { color: #cbd5e1; }

/* Select2 dark */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .select2-dropdown {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .select2-results__option {
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-results__option[aria-selected="true"] {
    background: #4f46e5 !important; color: #fff !important;
}
[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background: #0f172a !important; border: 1px solid #334155 !important; color: #e2e8f0 !important;
}

/* ─── Modal ─── */
[data-bs-theme="dark"] .modal-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .modal-title { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ─── Buttons (subtle dark variants) ─── */
[data-bs-theme="dark"] .btn-secondary {
    background: #475569; border-color: #475569; color: #f8fafc;
}
[data-bs-theme="dark"] .btn-light {
    background: #334155 !important; border-color: #334155 !important; color: #f1f5f9 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #cbd5e1 !important; border-color: #475569 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: #334155 !important; color: #fff !important;
}
[data-bs-theme="dark"] .btn-outline-info {
    color: #67e8f9 !important; border-color: #06b6d4 !important;
}
[data-bs-theme="dark"] .btn-outline-info:hover {
    background: #06b6d4 !important; color: #fff !important;
}

/* ─── Dropdown menus ─── */
[data-bs-theme="dark"] .dropdown-menu {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}
[data-bs-theme="dark"] .dropdown-item        { color: #cbd5e1 !important; }
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus { background: #334155 !important; color: #fff !important; }
[data-bs-theme="dark"] .dropdown-divider     { border-color: #334155 !important; }

/* ─── Badges & Alerts ─── */
[data-bs-theme="dark"] .badge.bg-light       { background: #475569 !important; color: #f1f5f9 !important; }
[data-bs-theme="dark"] .alert-info           { background: #0c4a6e !important; color: #bae6fd !important; border-color: #075985 !important; }
[data-bs-theme="dark"] .alert-warning        { background: #713f12 !important; color: #fde68a !important; border-color: #854d0e !important; }
[data-bs-theme="dark"] .alert-success        { background: #14532d !important; color: #bbf7d0 !important; border-color: #166534 !important; }
[data-bs-theme="dark"] .alert-danger         { background: #7f1d1d !important; color: #fecaca !important; border-color: #991b1b !important; }

/* ─── Bg helper classes ─── */
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-soft-light,
[data-bs-theme="dark"] .bg-white { background: #1e293b !important; color: #e2e8f0 !important; }
[data-bs-theme="dark"] .bg-soft-primary { background: rgba(99,102,241,.15) !important; }
[data-bs-theme="dark"] .bg-soft-info    { background: rgba(6,182,212,.15) !important; }
[data-bs-theme="dark"] .bg-soft-success { background: rgba(16,185,129,.15) !important; }

[data-bs-theme="dark"] .text-muted   { color: #94a3b8 !important; }
[data-bs-theme="dark"] .text-dark    { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .text-body    { color: #e2e8f0 !important; }

/* ─── Borders ─── */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end { border-color: #334155 !important; }

/* ════════════════════════════════════════════════════════════════
   ÖDEME MODALLARI (.ms-pmodal) — dark override
   ════════════════════════════════════════════════════════════════ */
[data-bs-theme="dark"] .ms-pmodal .modal-content {
    background: #1e293b !important;
    box-shadow: 0 20px 60px -12px rgba(0,0,0,.5) !important;
}
[data-bs-theme="dark"] .ms-pmodal .modal-header {
    border-bottom-color: #334155 !important;
}
[data-bs-theme="dark"] .ms-pmodal .modal-header.pm-h-primary { background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%) !important; }
[data-bs-theme="dark"] .ms-pmodal .modal-header.pm-h-success { background: linear-gradient(135deg, #064e3b 0%, #1e293b 100%) !important; }
[data-bs-theme="dark"] .ms-pmodal .modal-header.pm-h-info    { background: linear-gradient(135deg, #155e75 0%, #1e293b 100%) !important; }
[data-bs-theme="dark"] .ms-pmodal .modal-body { background: #1e293b !important; }
[data-bs-theme="dark"] .ms-pmodal .modal-footer { background: #0f172a !important; border-top-color: #334155 !important; }

[data-bs-theme="dark"] .ms-pmodal .pm-title-block .pm-h-title { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-title-block .pm-h-sub  { color: #94a3b8 !important; }

[data-bs-theme="dark"] .ms-pmodal .pm-section-title {
    color: #a5b4fc !important;
    border-bottom-color: rgba(99,102,241,.3) !important;
}

[data-bs-theme="dark"] .ms-pmodal .pm-field-label    { color: #cbd5e1 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-field-label i  { color: #818cf8 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-hint,
[data-bs-theme="dark"] .ms-pmodal .pm-mgr-hint       { color: #64748b !important; }

[data-bs-theme="dark"] .ms-pmodal .form-control,
[data-bs-theme="dark"] .ms-pmodal .form-select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .ms-pmodal .form-control:focus,
[data-bs-theme="dark"] .ms-pmodal .form-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,.25) !important;
}

[data-bs-theme="dark"] .ms-pmodal .pm-money::before { color: #94a3b8 !important; }

[data-bs-theme="dark"] .ms-pmodal .pm-period-list {
    background: #0f172a !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .period-row {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .period-row:hover { background: #243044 !important; border-color: #6366f1 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .period-row.is-checked { background: rgba(99,102,241,.18) !important; border-color: #6366f1 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .period-row .pm-month { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .pm-amounts { color: #94a3b8 !important; }
[data-bs-theme="dark"] .ms-pmodal .pm-period-list .pm-amounts .pm-rem { color: #6ee7b7 !important; }

[data-bs-theme="dark"] .ms-pmodal .pm-summary-bar {
    background: linear-gradient(135deg, #064e3b, #065f46) !important;
    border-color: #047857 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-summary-bar .pm-sb-label,
[data-bs-theme="dark"] .ms-pmodal .pm-summary-bar .pm-sb-value { color: #6ee7b7 !important; }

[data-bs-theme="dark"] .ms-pmodal .pm-info-alert {
    background: linear-gradient(135deg, #1e1b4b, #312e81) !important;
    border-color: #4f46e5 !important;
    color: #c7d2fe !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-switch-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .ms-pmodal .pm-year-table {
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-year-table thead th {
    background: #0f172a !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-year-table tbody td {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .ms-pmodal .pm-year-table tfoot td {
    background: #713f12 !important;
    color: #fde68a !important;
}

[data-bs-theme="dark"] .ms-pmodal .btn-pm-cancel {
    background: transparent !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .ms-pmodal .btn-pm-cancel:hover {
    background: #334155 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .ms-pmodal .btn-pm-mini {
    background: #0f172a !important; border-color: #334155 !important; color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .ms-pmodal .btn-pm-mini:hover {
    background: rgba(99,102,241,.2) !important; color: #c7d2fe !important; border-color: #6366f1 !important;
}

[data-bs-theme="dark"] .ms-pmodal .pm-rem-pill {
    background: rgba(16,185,129,.18) !important;
    color: #6ee7b7 !important;
}

/* ─── SweetAlert2 dark ─── */
[data-bs-theme="dark"] .swal2-popup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .swal2-title,
[data-bs-theme="dark"] .swal2-html-container { color: #f1f5f9 !important; }

/* ─── Avatar / Icon backgrounds ─── */
[data-bs-theme="dark"] .avatar-title.bg-soft-primary { background: rgba(99,102,241,.2) !important; color: #a5b4fc !important; }
[data-bs-theme="dark"] .avatar-title.bg-soft-info    { background: rgba(6,182,212,.2)  !important; color: #67e8f9 !important; }
[data-bs-theme="dark"] .avatar-title.bg-soft-success { background: rgba(16,185,129,.2) !important; color: #6ee7b7 !important; }

/* ─── Footer ─── */
[data-bs-theme="dark"] .footer {
    background: #1e293b !important;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* ════════════════════════════════════════════════════════════════
   ✨ KAPSAMLI TEMA UYUMU — Badges, Cards, Tables, Modals, Tabs
   (eklenme: tema uyumu cilası — 26 May 2026)
═══════════════════════════════════════════════════════════════ */

/* ─── BADGES — tüm Bootstrap varyantları + soft badges ─────────── */
/* Light mode'da `text-dark` zorunlu olan badge'ler dark mode'da
   görünmez olur — burada renkleri sıkıştırıyoruz */
[data-bs-theme="dark"] .badge.bg-warning,
[data-bs-theme="dark"] .badge.bg-warning.text-dark {
    background: #f59e0b !important;
    color: #1a1a1a !important;
}
[data-bs-theme="dark"] .badge.bg-info,
[data-bs-theme="dark"] .badge.bg-info.text-dark {
    background: #06b6d4 !important;
    color: #0c1426 !important;
}
[data-bs-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] .badge.bg-light.text-dark {
    background: #475569 !important;
    color: #f1f5f9 !important;
}
[data-bs-theme="dark"] .badge.bg-success { background: #10b981 !important; color: #ecfdf5 !important; }
[data-bs-theme="dark"] .badge.bg-danger  { background: #ef4444 !important; color: #fef2f2 !important; }
[data-bs-theme="dark"] .badge.bg-primary { background: #6366f1 !important; color: #eef2ff !important; }
[data-bs-theme="dark"] .badge.bg-secondary { background: #64748b !important; color: #f1f5f9 !important; }
[data-bs-theme="dark"] .badge.bg-dark    { background: #1e293b !important; color: #f1f5f9 !important; border: 1px solid #334155; }

/* Soft badge varyantları (bg-soft-* + text-color) */
[data-bs-theme="dark"] .badge.bg-soft-primary,
[data-bs-theme="dark"] .bg-soft-primary.text-primary {
    background: rgba(99,102,241,.20) !important; color: #a5b4fc !important;
}
[data-bs-theme="dark"] .badge.bg-soft-success,
[data-bs-theme="dark"] .bg-soft-success.text-success {
    background: rgba(16,185,129,.20) !important; color: #6ee7b7 !important;
}
[data-bs-theme="dark"] .badge.bg-soft-danger,
[data-bs-theme="dark"] .bg-soft-danger.text-danger {
    background: rgba(239,68,68,.18) !important; color: #fca5a5 !important;
}
[data-bs-theme="dark"] .badge.bg-soft-warning,
[data-bs-theme="dark"] .bg-soft-warning.text-warning {
    background: rgba(245,158,11,.20) !important; color: #fcd34d !important;
}
[data-bs-theme="dark"] .badge.bg-soft-info,
[data-bs-theme="dark"] .bg-soft-info.text-info {
    background: rgba(6,182,212,.20) !important; color: #67e8f9 !important;
}
[data-bs-theme="dark"] .badge.bg-soft-secondary,
[data-bs-theme="dark"] .bg-soft-secondary {
    background: rgba(100,116,139,.20) !important; color: #cbd5e1 !important;
}

/* Bootstrap 5.3 *-subtle helper'ları (badge'lerde kullanılıyor) */
[data-bs-theme="dark"] .bg-success-subtle { background: rgba(16,185,129,.18) !important; }
[data-bs-theme="dark"] .bg-danger-subtle  { background: rgba(239,68,68,.18)  !important; }
[data-bs-theme="dark"] .bg-warning-subtle { background: rgba(245,158,11,.18) !important; }
[data-bs-theme="dark"] .bg-info-subtle    { background: rgba(6,182,212,.18)  !important; }
[data-bs-theme="dark"] .bg-primary-subtle { background: rgba(99,102,241,.18) !important; }
[data-bs-theme="dark"] .text-success-subtle { color: #6ee7b7 !important; }
[data-bs-theme="dark"] .text-danger-subtle  { color: #fca5a5 !important; }
[data-bs-theme="dark"] .text-warning-subtle { color: #fcd34d !important; }
[data-bs-theme="dark"] .text-info-subtle    { color: #67e8f9 !important; }
[data-bs-theme="dark"] .text-primary-subtle { color: #a5b4fc !important; }

/* Modül-özel badge'ler */
[data-bs-theme="dark"] .exp-cat-chip { box-shadow: 0 1px 3px rgba(0,0,0,.4) !important; }
[data-bs-theme="dark"] .exp-mini-badge {
    background: rgba(99,102,241,.15) !important;
    color: #c7d2fe !important;
    border-color: rgba(99,102,241,.35) !important;
}
[data-bs-theme="dark"] .exp-mini-badge.mb-demirbas { background: rgba(245,158,11,.18) !important; color: #fcd34d !important; border-color: rgba(245,158,11,.40) !important; }
[data-bs-theme="dark"] .exp-mini-badge.mb-aidat    { background: rgba(59,130,246,.18) !important; color: #93c5fd !important; border-color: rgba(59,130,246,.40) !important; }
[data-bs-theme="dark"] .exp-mini-badge.mb-contract { background: rgba(139,92,246,.18) !important; color: #c4b5fd !important; border-color: rgba(139,92,246,.40) !important; }
[data-bs-theme="dark"] .exp-mini-badge.mb-aidata,
[data-bs-theme="dark"] .exp-mini-badge.mb-uretim   { background: rgba(20,184,166,.18) !important; color: #5eead4 !important; border-color: rgba(20,184,166,.40) !important; }

/* Aidat durum rozetleri (.s-pending, .s-paid, .s-partial, .s-overdue) */
[data-bs-theme="dark"] .pm-status-tag.s-pending { background: rgba(99,102,241,.22) !important; color: #c7d2fe !important; }
[data-bs-theme="dark"] .pm-status-tag.s-paid    { background: rgba(16,185,129,.22) !important; color: #6ee7b7 !important; }
[data-bs-theme="dark"] .pm-status-tag.s-partial { background: rgba(245,158,11,.22) !important; color: #fcd34d !important; }
[data-bs-theme="dark"] .pm-status-tag.s-overdue { background: rgba(239,68,68,.22)  !important; color: #fca5a5 !important; }

/* ─── TABLES — hardcoded light backgrounds ─────────────────────── */
[data-bs-theme="dark"] table.table thead.table-light th { background: #2c3a52 !important; color: #cbd5e1 !important; border-color: #334155 !important; }
[data-bs-theme="dark"] table.table tbody tr:hover > * { background: rgba(99,102,241,.07) !important; }
[data-bs-theme="dark"] table.table tfoot.table-light th { background: #2c3a52 !important; color: #e2e8f0 !important; }

/* DataTables-DT */
[data-bs-theme="dark"] .dt-buttons .btn { background: #334155 !important; color: #cbd5e1 !important; border-color: #475569 !important; }
[data-bs-theme="dark"] .dt-buttons .btn:hover { background: #475569 !important; color: #fff !important; }
[data-bs-theme="dark"] .dt-button-collection { background: #1e293b !important; border-color: #334155 !important; }
[data-bs-theme="dark"] .dt-button-collection .dt-button { color: #cbd5e1 !important; }
[data-bs-theme="dark"] .dt-button-collection .dt-button.active { background: rgba(99,102,241,.20) !important; color: #fff !important; }

/* ─── CARDS — sabit zeminli kartlar (chart cards vb.) ─────────── */
[data-bs-theme="dark"] .card.border-0,
[data-bs-theme="dark"] .card.shadow-sm { background: #1e293b !important; }
[data-bs-theme="dark"] .card.border-0 .card-body { color: #e2e8f0; }

/* Inline style="background:#..." pastel vurgulu hücreler ve div'ler */
[data-bs-theme="dark"] td[style*="background:#fef3c7"],
[data-bs-theme="dark"] th[style*="background:#fef3c7"],
[data-bs-theme="dark"] div[style*="background:#fef3c7"] { background: rgba(245,158,11,.18) !important; color: #fcd34d !important; border-color: rgba(245,158,11,.40) !important; }
[data-bs-theme="dark"] td[style*="background:#fef2f2"],
[data-bs-theme="dark"] th[style*="background:#fef2f2"],
[data-bs-theme="dark"] div[style*="background:#fef2f2"] { background: rgba(239,68,68,.14) !important; color: #fca5a5 !important; border-color: rgba(239,68,68,.40) !important; }
[data-bs-theme="dark"] td[style*="background:#ecfdf5"],
[data-bs-theme="dark"] th[style*="background:#ecfdf5"],
[data-bs-theme="dark"] div[style*="background:#ecfdf5"] { background: rgba(16,185,129,.14) !important; color: #6ee7b7 !important; border-color: rgba(16,185,129,.40) !important; }
[data-bs-theme="dark"] div[style*="background:#eef6ff"],
[data-bs-theme="dark"] div[style*="background:#e0f2fe"] { background: rgba(6,182,212,.12) !important; color: #67e8f9 !important; border-color: rgba(6,182,212,.30) !important; }
[data-bs-theme="dark"] div[style*="background:#fff8f0"] { background: rgba(245,158,11,.10) !important; color: #fcd34d !important; }
[data-bs-theme="dark"] div[style*="background:#f8f9fa"],
[data-bs-theme="dark"] div[style*="background:#fafafa"],
[data-bs-theme="dark"] div[style*="background:#f0f0f0"] { background: #1e293b !important; color: #e2e8f0 !important; }

/* Inline hardcoded text colors (genel uyum) */
[data-bs-theme="dark"] *[style*="color:#1a4480"],
[data-bs-theme="dark"] *[style*="color:#0b5394"] { color: #93c5fd !important; }
[data-bs-theme="dark"] *[style*="color:#92400e"],
[data-bs-theme="dark"] *[style*="color:#78350f"] { color: #fcd34d !important; }
[data-bs-theme="dark"] *[style*="color:#0c5460"] { color: #67e8f9 !important; }
[data-bs-theme="dark"] *[style*="color:#856404"] { color: #fcd34d !important; }
[data-bs-theme="dark"] *[style*="color:#721c24"],
[data-bs-theme="dark"] *[style*="color:#7f1d1d"] { color: #fca5a5 !important; }
[data-bs-theme="dark"] *[style*="color:#14532d"] { color: #86efac !important; }
[data-bs-theme="dark"] *[style*="color:#555"],
[data-bs-theme="dark"] *[style*="color:#666"] { color: #94a3b8 !important; }

/* Tablo thead'leri inline style="background:#1a4480" (Expense Payment List) */
[data-bs-theme="dark"] thead[style*="background:#1a4480"] { background: rgba(99,102,241,.30) !important; }
[data-bs-theme="dark"] thead[style*="background:#f0f0f0"] { background: #2c3a52 !important; color: #cbd5e1 !important; }
[data-bs-theme="dark"] td[style*="background:rgba(16,185,129"],
[data-bs-theme="dark"] th[style*="background:rgba(16,185,129"] { color: #6ee7b7 !important; }
[data-bs-theme="dark"] td[style*="background:rgba(239,68,68"],
[data-bs-theme="dark"] th[style*="background:rgba(239,68,68"] { color: #fca5a5 !important; }

/* ─── TABS — nav-pills + nav-tabs ──────────────────────────────── */
[data-bs-theme="dark"] .nav-pills .nav-link { color: #cbd5e1 !important; }
[data-bs-theme="dark"] .nav-pills .nav-link.active { background: #4f46e5 !important; color: #fff !important; }
[data-bs-theme="dark"] .nav-pills .nav-link:hover:not(.active) { background: rgba(99,102,241,.15) !important; }
[data-bs-theme="dark"] .nav-tabs { border-bottom-color: #334155 !important; }
[data-bs-theme="dark"] .nav-tabs .nav-link { color: #94a3b8 !important; background: transparent !important; }
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 #334155 #1e293b !important;
}

/* ─── BUTTONS — outline ve solid varyantları ───────────────────── */
[data-bs-theme="dark"] .btn-outline-success { color: #6ee7b7 !important; border-color: #10b981 !important; }
[data-bs-theme="dark"] .btn-outline-success:hover { background: #10b981 !important; color: #fff !important; }
[data-bs-theme="dark"] .btn-outline-danger  { color: #fca5a5 !important; border-color: #ef4444 !important; }
[data-bs-theme="dark"] .btn-outline-danger:hover  { background: #ef4444 !important; color: #fff !important; }
[data-bs-theme="dark"] .btn-outline-warning { color: #fcd34d !important; border-color: #f59e0b !important; }
[data-bs-theme="dark"] .btn-outline-warning:hover { background: #f59e0b !important; color: #1a1a1a !important; }
[data-bs-theme="dark"] .btn-outline-primary { color: #a5b4fc !important; border-color: #6366f1 !important; }
[data-bs-theme="dark"] .btn-outline-primary:hover { background: #6366f1 !important; color: #fff !important; }

/* ─── ALERTS — daha temalı ─────────────────────────────────────── */
[data-bs-theme="dark"] .alert {
    background: rgba(99,102,241,.10) !important;
    border-color: rgba(99,102,241,.30) !important;
    color: #e2e8f0 !important;
}

/* ─── MODAL header gradient'leri (.bg-primary/.bg-info kullanan) ─ */
[data-bs-theme="dark"] .modal-header.bg-primary,
[data-bs-theme="dark"] .modal-header.bg-success,
[data-bs-theme="dark"] .modal-header.bg-info,
[data-bs-theme="dark"] .modal-header.bg-warning { color: #fff !important; }

/* ─── INPUT-GROUP icons ────────────────────────────────────────── */
[data-bs-theme="dark"] .input-group-text {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* ─── PROGRESS bar zemini ──────────────────────────────────────── */
[data-bs-theme="dark"] .progress { background: rgba(148,163,184,.15) !important; }

/* ─── LIST-GROUP ──────────────────────────────────────────────── */
[data-bs-theme="dark"] .list-group-item {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .list-group-item:hover { background: #2c3a52 !important; }

/* ─── DETAILS / SUMMARY (auto user sonucu) ─────────────────────── */
[data-bs-theme="dark"] details summary { color: #cbd5e1; }
[data-bs-theme="dark"] details ul { color: #94a3b8; }

/* ─── KOD blokları ────────────────────────────────────────────── */
[data-bs-theme="dark"] code {
    background: rgba(99,102,241,.18) !important;
    color: #c7d2fe !important;
    padding: .15em .35em;
    border-radius: 3px;
}

/* ─── Spesifik dashboard sınıfları ────────────────────────────── */
[data-bs-theme="dark"] .avatar-title.bg-soft-warning { background: rgba(245,158,11,.20) !important; color: #fcd34d !important; }
[data-bs-theme="dark"] .avatar-title.bg-soft-danger  { background: rgba(239,68,68,.20)  !important; color: #fca5a5 !important; }
[data-bs-theme="dark"] .avatar-title.bg-soft-secondary { background: rgba(100,116,139,.20) !important; color: #cbd5e1 !important; }

/* ─── Card border-left (status indicator) korunsun ─────────────── */
[data-bs-theme="dark"] .card[style*="border-left"] { /* inline color korunur */ }

/* ─── Filter card etiketleri ───────────────────────────────────── */
[data-bs-theme="dark"] .card .form-label { color: #cbd5e1 !important; }
[data-bs-theme="dark"] .card-body .text-muted { color: #94a3b8 !important; }

/* ─── btn-xs utility (Bootstrap'ta yok, ekleyelim) ─────────────── */
.btn-xs {
    padding: .15rem .45rem !important;
    font-size: .72rem !important;
    line-height: 1.4 !important;
    border-radius: 4px !important;
}

/* ─── Print modu: arka planları temizle, badge renkleri korunsun ── */
@media print {
    [data-bs-theme="dark"] body,
    [data-bs-theme="dark"] .card,
    [data-bs-theme="dark"] .card-body,
    [data-bs-theme="dark"] .modal-content,
    [data-bs-theme="dark"] table.table,
    [data-bs-theme="dark"] table.table > * > * { background: #fff !important; color: #000 !important; }
    [data-bs-theme="dark"] .text-muted { color: #555 !important; }
    /* Badge'lerin renkleri yazdırılsın */
    [data-bs-theme="dark"] .badge,
    [data-bs-theme="dark"] .exp-cat-chip,
    [data-bs-theme="dark"] .pm-status-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
