/* Dark Mode - aggressive Overrides */
[data-theme="dark"] body { background: #0f172a !important; color: #e2e8f0 !important; }
[data-theme="dark"] .sidebar { background: #0b1120 !important; }
[data-theme="dark"] .app-header { background: #1e293b !important; border-bottom-color: #334155 !important; }
[data-theme="dark"] .page-title { color: #f1f5f9 !important; }
[data-theme="dark"] .app-main { background: #0f172a !important; }
[data-theme="dark"] .stat-card, [data-theme="dark"] .content-card, [data-theme="dark"] .card { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .stat-card h3, [data-theme="dark"] .stat-value { color: #f1f5f9 !important; }
[data-theme="dark"] .stat-card p, [data-theme="dark"] .stat-label { color: #94a3b8 !important; }
[data-theme="dark"] .quick-action { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .quick-action:hover { background: #334155 !important; }
[data-theme="dark"] .absence-item, [data-theme="dark"] .team-item { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .table { color: #e2e8f0 !important; }
[data-theme="dark"] .table th { background: #162032 !important; color: #94a3b8 !important; border-color: #334155 !important; }
[data-theme="dark"] .table td { border-color: #334155 !important; color: #cbd5e1 !important; }
[data-theme="dark"] .table-hover tbody tr:hover td { background: #162032 !important; }
[data-theme="dark"] .modal-content { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .modal-header { border-bottom-color: #334155 !important; }
[data-theme="dark"] .modal-header h5, [data-theme="dark"] .modal-title { color: #f1f5f9 !important; }
[data-theme="dark"] .modal-footer { border-top-color: #334155 !important; }
[data-theme="dark"] .modal-header .btn-close, [data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background-color: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus { background-color: #1e293b !important; border-color: #3b82f6 !important; }
[data-theme="dark"] .form-control::placeholder { color: #64748b !important; }
[data-theme="dark"] .form-label, [data-theme="dark"] label { color: #cbd5e1 !important; }
[data-theme="dark"] .form-text, [data-theme="dark"] .text-muted { color: #64748b !important; }
[data-theme="dark"] .input-group-text { background-color: #334155 !important; border-color: #334155 !important; color: #94a3b8 !important; }
[data-theme="dark"] .dropdown-menu { background-color: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .dropdown-item { color: #e2e8f0 !important; }
[data-theme="dark"] .dropdown-item:hover { background-color: #334155 !important; }
[data-theme="dark"] .dropdown-divider { border-color: #334155 !important; }
[data-theme="dark"] .alert-info { background: rgba(59,130,246,0.12) !important; border-color: rgba(59,130,246,0.25) !important; color: #93c5fd !important; }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.12) !important; border-color: rgba(245,158,11,0.25) !important; color: #fcd34d !important; }
[data-theme="dark"] .alert-danger { background: rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.25) !important; color: #fca5a5 !important; }
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.12) !important; border-color: rgba(16,185,129,0.25) !important; color: #6ee7b7 !important; }
[data-theme="dark"] .nav-tabs { border-bottom-color: #334155 !important; }
[data-theme="dark"] .nav-tabs .nav-link { color: #94a3b8 !important; }
[data-theme="dark"] .nav-tabs .nav-link.active { background: #1e293b !important; border-color: #334155 #334155 #1e293b !important; color: #f1f5f9 !important; }
[data-theme="dark"] .btn-outline-secondary { border-color: #475569 !important; color: #94a3b8 !important; }
[data-theme="dark"] .btn-outline-secondary:hover { background: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .btn-light { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .badge.bg-light { background: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .card-header { background: #1e293b !important; border-bottom-color: #334155 !important; }
[data-theme="dark"] .card-footer { background: #1e293b !important; border-top-color: #334155 !important; }
[data-theme="dark"] .progress { background-color: #334155 !important; }
[data-theme="dark"] .list-group-item { background-color: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .border, [data-theme="dark"] .border-bottom, [data-theme="dark"] .border-top { border-color: #334155 !important; }
[data-theme="dark"] .bg-white { background-color: #1e293b !important; }
[data-theme="dark"] .bg-light { background-color: #0f172a !important; }
[data-theme="dark"] .sp-sidebar { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .sp-sidebar h6 { color: #f1f5f9 !important; }
[data-theme="dark"] .sp-sidebar .text-muted, [data-theme="dark"] .tpl-chip-info { color: #cbd5e1 !important; }
[data-theme="dark"] .action-btn { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .action-btn:hover { background: #475569 !important; color: #fff !important; }
[data-theme="dark"] .org-dept-header { background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important; border-color: #475569 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .org-dept-header:hover { background: #334155 !important; }
[data-theme="dark"] .org-toggle { background: #334155 !important; border-color: #64748b !important; color: #f1f5f9 !important; }
[data-theme="dark"] .org-user { background: #1e293b !important; border-color: #475569 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .stat-card .stat-detail, [data-theme="dark"] .stat-card small { color: #cbd5e1 !important; }
[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: #f1f5f9 !important; }
[data-theme="dark"] p { color: #cbd5e1 !important; }
[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item) { color: #60a5fa !important; }
[data-theme="dark"] hr { border-color: #334155 !important; }
[data-theme="dark"] .sidebar-footer-dropdown { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .form-check-input { background-color: #334155 !important; border-color: #475569 !important; }
[data-theme="dark"] .form-check-input:checked { background-color: #0d6efd !important; border-color: #0d6efd !important; }
[data-theme="dark"] pre, [data-theme="dark"] code { background: #0f172a !important; color: #e2e8f0 !important; }
[data-theme="dark"] .page-link { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
[data-theme="dark"] .toast { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569 !important; }

/* ── Komponenten mit hart kodiertem hellen Hintergrund ──────────────────────
   Diese Klassen setzen in ihrem eigenen CSS ein festes background:#fff bzw.
   einen sehr hellen Grauton. Ohne Gegenstueck hier bleibt die Flaeche im Dark
   Mode weiss, waehrend die globale Regel oben (h1-h6 -> #f1f5f9, p -> #cbd5e1)
   die Schrift aufhellt: heller Text auf hellem Grund, praktisch unlesbar.
   Gemeldet aus dem Beta-Betrieb (Reports-Kacheln). */
[data-theme="dark"] .report-card { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .report-card:hover { border-color: #3b82f6 !important; }
[data-theme="dark"] .report-card.active { background: #1e3a5f !important; border-color: #3b82f6 !important; }
[data-theme="dark"] .report-card h5 { color: #f1f5f9 !important; }
[data-theme="dark"] .report-card p { color: #94a3b8 !important; }
[data-theme="dark"] .filter-panel { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .mob-emp-row { background: #1e293b !important; color: #e2e8f0 !important; }
[data-theme="dark"] .mob-emp-row.is-self { background: #422006 !important; color: #fde68a !important; }
[data-theme="dark"] .type-homeoffice { background: rgba(21,128,61,0.18) !important; color: #86efac !important; }
[data-theme="dark"] .type-remote { background: rgba(161,98,7,0.18) !important; color: #fcd34d !important; }
[data-theme="dark"] .feature-gate-icon { background: #334155 !important; color: #e2e8f0 !important; }

@media (max-width: 576px) {
    .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
    .modal-body { padding: .75rem; max-height: 70vh; overflow-y: auto; }
    .modal-header { padding: .75rem; }
    .modal-footer { padding: .5rem .75rem; }
}
