/**
 * Overrides modo oscuro para estilos inline de vistas (carga al final del layout).
 */

html[data-kw-theme="dark"] .doc-screen { color: #e2e8f0 !important; }
html[data-kw-theme="dark"] .doc-bandeja-tabs {
    background: linear-gradient(180deg, rgba(15, 28, 48, 0.95) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}
html[data-kw-theme="dark"] .doc-bandeja-tab { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .doc-bandeja-tab:hover {
    background: rgba(30, 41, 59, 0.75) !important;
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .doc-bandeja-tab.is-active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(59, 130, 246, 0.32) 100%) !important;
    color: #67e8f9 !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.18) !important;
}
html[data-kw-theme="dark"] .doc-inbox-head { border-color: rgba(148, 163, 184, 0.18) !important; }
html[data-kw-theme="dark"] .doc-inbox-title,
html[data-kw-theme="dark"] .doc-title,
html[data-kw-theme="dark"] .doc-section-title,
html[data-kw-theme="dark"] .doc-mail-title,
html[data-kw-theme="dark"] .doc-compose-summary-title {
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .doc-inbox-sub,
html[data-kw-theme="dark"] .doc-sub,
html[data-kw-theme="dark"] .doc-mail-date,
html[data-kw-theme="dark"] .doc-mail-meta,
html[data-kw-theme="dark"] .doc-mail-snippet,
html[data-kw-theme="dark"] .doc-compose-summary-sub,
html[data-kw-theme="dark"] .doc-bandeja-hint {
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .doc-bandeja-badge--muted {
    background: rgba(51, 65, 85, 0.85) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .doc-inbox-card,
html[data-kw-theme="dark"] .doc-worker-card,
html[data-kw-theme="dark"] .doc-compose-panel,
html[data-kw-theme="dark"] .doc-upload-panel,
html[data-kw-theme="dark"] .doc-nuevo-card .card,
html[data-kw-theme="dark"] .doc-form-card {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-kw-theme="dark"] .doc-mail-list { background: transparent !important; }
html[data-kw-theme="dark"] .doc-mail-empty {
    background: rgba(15, 23, 42, 0.55) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-kw-theme="dark"] .doc-mail-item {
    background: rgba(15, 28, 48, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-kw-theme="dark"] .doc-mail-item:hover {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(34, 211, 238, 0.2) !important;
}
html[data-kw-theme="dark"] .doc-mail-item--pending {
    border-left-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08) !important;
}
html[data-kw-theme="dark"] .doc-mail-dir--recibido {
    background: rgba(34, 211, 238, 0.14) !important;
    color: #67e8f9 !important;
}
html[data-kw-theme="dark"] .doc-mail-dir--enviado {
    background: rgba(129, 140, 248, 0.16) !important;
    color: #c4b5fd !important;
}
html[data-kw-theme="dark"] .doc-mail-chip {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .doc-mail-chip--muted {
    background: rgba(15, 23, 42, 0.65) !important;
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .doc-mail-chip--danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
}
html[data-kw-theme="dark"] .doc-status--success {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #86efac !important;
}
html[data-kw-theme="dark"] .doc-status--warning {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fcd34d !important;
}
html[data-kw-theme="dark"] .doc-status--danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
}
html[data-kw-theme="dark"] .doc-status--secondary {
    background: rgba(51, 65, 85, 0.75) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .doc-dropzone {
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .doc-dropzone-ico { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .doc-compose-summary {
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

/* ---------- Fichajes / reloj ---------- */

html[data-kw-theme="dark"] .emp-card,
html[data-kw-theme="dark"] .emp-cal-month,
html[data-kw-theme="dark"] .emp-detail,
html[data-kw-theme="dark"] .emp-detail-card,
html[data-kw-theme="dark"] .state-item,
html[data-kw-theme="dark"] .reminder-card,
html[data-kw-theme="dark"] .timeline-card,
html[data-kw-theme="dark"] .clock-hero,
html[data-kw-theme="dark"] .fichajes-dia-table-wrap,
html[data-kw-theme="dark"] .fichajes-audit-card,
html[data-kw-theme="dark"] .fichajes-audit-item {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}
html[data-kw-theme="dark"] .emp-hero-title,
html[data-kw-theme="dark"] .emp-now,
html[data-kw-theme="dark"] .emp-timer,
html[data-kw-theme="dark"] .emp-cal-title,
html[data-kw-theme="dark"] .emp-detail-date,
html[data-kw-theme="dark"] .emp-detail-value,
html[data-kw-theme="dark"] .emp-detail-row,
html[data-kw-theme="dark"] .emp-day-num,
html[data-kw-theme="dark"] .clock-page-title,
html[data-kw-theme="dark"] .hero-label,
html[data-kw-theme="dark"] .fichaje-total-dia {
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .emp-hero-sub,
html[data-kw-theme="dark"] .emp-worked,
html[data-kw-theme="dark"] .emp-cal-sub,
html[data-kw-theme="dark"] .emp-detail-label,
html[data-kw-theme="dark"] .hero-time,
html[data-kw-theme="dark"] .gps-status {
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .emp-cal-dows {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}
html[data-kw-theme="dark"] .emp-cal-dow { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .emp-day {
    background: rgba(15, 28, 48, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
}
html[data-kw-theme="dark"] .emp-day:hover,
html[data-kw-theme="dark"] .emp-day.is-selected {
    background: rgba(34, 211, 238, 0.1) !important;
}
html[data-kw-theme="dark"] .emp-day-pill--soft {
    background: rgba(51, 65, 85, 0.85) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .emp-pill--idle {
    background: rgba(51, 65, 85, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .emp-pill--run {
    background: rgba(34, 211, 238, 0.12) !important;
    border-color: rgba(34, 211, 238, 0.28) !important;
    color: #67e8f9 !important;
}
html[data-kw-theme="dark"] .admin-cierre-card {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}
html[data-kw-theme="dark"] .rem-item {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #fcd34d !important;
}
html[data-kw-theme="dark"] .clock-alert {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #fca5a5 !important;
}
html[data-kw-theme="dark"] .clock-imp-badge--ok {
    background: rgba(34, 197, 94, 0.14) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
}
html[data-kw-theme="dark"] .clock-imp-badge--warn {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
}
html[data-kw-theme="dark"] .timeline { border-color: rgba(148, 163, 184, 0.22) !important; }
html[data-kw-theme="dark"] .timeline-filter input,
html[data-kw-theme="dark"] .timeline-filter select,
html[data-kw-theme="dark"] .timeline-filter button:not(.btn) {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .fichajes-dia-table thead th {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}
html[data-kw-theme="dark"] .fichajes-dia-table tbody td {
    border-color: rgba(148, 163, 184, 0.12) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .fichajes-dia-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35) !important;
}
html[data-kw-theme="dark"] .fichajes-audit-head {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-kw-theme="dark"] .fichajes-edit-motivo-wrap {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}
html[data-kw-theme="dark"] .fichajes-edit-badge {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fcd34d !important;
}

/* ---------- Empleados ---------- */

html[data-kw-theme="dark"] .emp-dir-emp {
    background: rgba(15, 28, 48, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-kw-theme="dark"] .emp-dir-emp:hover {
    background: rgba(30, 41, 59, 0.85) !important;
}
html[data-kw-theme="dark"] .emp-dir-name { color: #f1f5f9 !important; }
html[data-kw-theme="dark"] .emp-dir-subline { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .emp-side-card,
html[data-kw-theme="dark"] .emp-main-card,
html[data-kw-theme="dark"] .emp-list-lite {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-kw-theme="dark"] .emp-head-text h2,
html[data-kw-theme="dark"] .emp-side-card h3,
html[data-kw-theme="dark"] .emp-main-card h3,
html[data-kw-theme="dark"] .emp-prod-kpi-val {
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .emp-head-text p,
html[data-kw-theme="dark"] .emp-tabs a,
html[data-kw-theme="dark"] .emp-prod-kpi-lbl,
html[data-kw-theme="dark"] .emp-empty {
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .emp-tabs .is-active {
    color: var(--kw-accent-soft, #22d3ee) !important;
    border-color: var(--kw-accent-soft, #22d3ee) !important;
}
html[data-kw-theme="dark"] .emp-mini-table th,
html[data-kw-theme="dark"] .emp-mini-table td {
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
}
html[data-kw-theme="dark"] .emp-mini-table thead th {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .emp-hourglass-widget {
    background: rgba(15, 28, 48, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

/* ---------- Calendario ---------- */

html[data-kw-theme="dark"] .page-title,
html[data-kw-theme="dark"] .calendar-period,
html[data-kw-theme="dark"] .calendar-hoy {
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .calendario-wrapper,
html[data-kw-theme="dark"] .calendario {
    background: rgba(15, 28, 48, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}
html[data-kw-theme="dark"] .calendario th,
html[data-kw-theme="dark"] .calendario td {
    border-color: rgba(148, 163, 184, 0.14) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .calendario thead th {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .calendario tbody td.dia-sabado:not(.seleccionada),
html[data-kw-theme="dark"] .calendario tbody td.dia-domingo:not(.seleccionada) {
    background: rgba(15, 23, 42, 0.45) !important;
}
html[data-kw-theme="dark"] .calendario td.calendar-cell:hover {
    background: rgba(34, 211, 238, 0.08) !important;
}
html[data-kw-theme="dark"] .btn-cal-secondary {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #cbd5e1 !important;
}
html[data-kw-theme="dark"] .admin-year-month {
    background: rgba(15, 28, 48, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}
html[data-kw-theme="dark"] .admin-year-month-head { color: #f1f5f9 !important; }
html[data-kw-theme="dark"] .admin-year-cell {
    background: rgba(15, 23, 42, 0.45) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}
html[data-kw-theme="dark"] .admin-year-cell.is-selected {
    background: rgba(34, 211, 238, 0.14) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
}
html[data-kw-theme="dark"] .admin-year-daynum { color: #e2e8f0 !important; }
html[data-kw-theme="dark"] .year-modal-overlay { background: rgba(0, 0, 0, 0.65) !important; }
html[data-kw-theme="dark"] .year-modal-box {
    background: rgba(15, 28, 48, 0.98) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #e2e8f0 !important;
}

/* ---------- Tareas / chat ---------- */

html[data-kw-theme="dark"] .tw-app {
    --tw-accent: #0891b2;
    --tw-accent-hover: #06b6d4;
    --tw-bg: transparent;
    --tw-card: rgba(15, 28, 48, 0.96);
    --tw-muted: #94a3b8;
    --tw-text: #e2e8f0;
    --tw-border: rgba(148, 163, 184, 0.2);
    background: transparent !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .tw-card,
html[data-kw-theme="dark"] .tw-chat-panel,
html[data-kw-theme="dark"] .tw-chat-sidebar,
html[data-kw-theme="dark"] .tw-msg-bubble--other {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-kw-theme="dark"] .tw-input,
html[data-kw-theme="dark"] .tw-form input,
html[data-kw-theme="dark"] .tw-form textarea,
html[data-kw-theme="dark"] .tw-form select {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .tw-alert {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #fcd34d !important;
}
html[data-kw-theme="dark"] .tw-alert-info {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .tw-personal-toast {
    background: rgba(15, 28, 48, 0.98) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .tw-personal-toast-btn-sec {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #cbd5e1 !important;
}

/* ---------- Turnos ---------- */

html[data-kw-theme="dark"] .shift-turno-card {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

/* ---------- Modern style (admin bolsa, festivos) ---------- */

html[data-kw-theme="dark"] .modern-container {
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .modern-header {
    background: transparent !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-kw-theme="dark"] .modern-title { color: #f1f5f9 !important; }
html[data-kw-theme="dark"] .modern-subtitle { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .modern-stat-card,
html[data-kw-theme="dark"] .modern-card,
html[data-kw-theme="dark"] .modern-table-container {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .modern-table th {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .modern-table td {
    border-color: rgba(148, 163, 184, 0.14) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .modern-table tbody tr:hover {
    background: rgba(34, 211, 238, 0.06) !important;
}

/* ---------- Dashboard (cards genéricas fuera de dashboard-page.css) ---------- */

html[data-kw-theme="dark"] .dashboard-bizneo .dashboard-card,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-stat,
html[data-kw-theme="dark"] .dashboard-bizneo .kpi-mini-card {
    background: rgba(15, 28, 48, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .dashboard-bizneo .dash-top-title,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-c-title,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-header-title {
    color: #f1f5f9 !important;
}

/* ---------- Utilidades ---------- */

html[data-kw-theme="dark"] details summary {
    color: #e2e8f0;
}
html[data-kw-theme="dark"] .bg-white,
html[data-kw-theme="dark"] .bg-light {
    background-color: rgba(15, 28, 48, 0.92) !important;
}
html[data-kw-theme="dark"] .border,
html[data-kw-theme="dark"] .border-top,
html[data-kw-theme="dark"] .border-bottom {
    border-color: rgba(148, 163, 184, 0.16) !important;
}

/* ---------- Admin (bolsa horas, detalle, servicios) ---------- */

html[data-kw-theme="dark"] .detalle-container,
html[data-kw-theme="dark"] .bolsa-horas-container,
html[data-kw-theme="dark"] .servicios-container {
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .detalle-title,
html[data-kw-theme="dark"] .bolsa-title,
html[data-kw-theme="dark"] .resumen-number,
html[data-kw-theme="dark"] .stat-number {
    color: #f1f5f9 !important;
}
html[data-kw-theme="dark"] .detalle-subtitle,
html[data-kw-theme="dark"] .bolsa-subtitle,
html[data-kw-theme="dark"] .resumen-label,
html[data-kw-theme="dark"] .stat-label {
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .resumen-card,
html[data-kw-theme="dark"] .stat-card,
html[data-kw-theme="dark"] .detalle-table,
html[data-kw-theme="dark"] .empleados-table,
html[data-kw-theme="dark"] .filtros-form {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .detalle-table th,
html[data-kw-theme="dark"] .empleados-table th {
    background: rgba(15, 23, 42, 0.75) !important;
    color: #94a3b8 !important;
}
html[data-kw-theme="dark"] .detalle-table td,
html[data-kw-theme="dark"] .empleados-table td {
    border-color: rgba(148, 163, 184, 0.14) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .detalle-table tr:hover td,
html[data-kw-theme="dark"] .empleados-table tr:hover td {
    background: rgba(34, 211, 238, 0.06) !important;
}
html[data-kw-theme="dark"] .filtros-form input,
html[data-kw-theme="dark"] .filtros-form select {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .btn-volver,
html[data-kw-theme="dark"] .btn-filtrar {
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    color: #fff !important;
}

/* ---------- Dashboard empleado (cards claras por defecto) ---------- */

html[data-kw-theme="dark"] .dashboard-bizneo .dashboard-card,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-stat,
html[data-kw-theme="dark"] .dashboard-bizneo .kpi-mini-card,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-kpi,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-alerts-card,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-table-card,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-top-pill,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-pill,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-datetime,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-panel,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-listpane,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-contact,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-search-wrap,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-bubble--in,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-compose textarea {
    background: rgba(15, 28, 48, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .dashboard-bizneo {
    background: transparent !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .dashboard-bizneo .dash-top-title,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-c-title,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-header-title,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-hello,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-kpi-value,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-ring-title,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-table-title,
html[data-kw-theme="dark"] .dashboard-bizneo .chart-center-value,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-stat-value,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-contact-name {
    color: #f8fafc !important;
}
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-muted,
html[data-kw-theme="dark"] .dashboard-bizneo .chart-center-label,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-chat-contact-meta {
    color: #94a3b8 !important;
}

/* Inline styles y elementos sueltos */
html[data-kw-theme="dark"] .biz-card[style*="background:#fff"],
html[data-kw-theme="dark"] .biz-card[style*="background: #fff"] {
    background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(12, 20, 36, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-kw-theme="dark"] .emp-cal-nav a {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #e2e8f0 !important;
}
html[data-kw-theme="dark"] .emp-day-pill--fest {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #fcd34d !important;
}
html[data-kw-theme="dark"] .auth-brand-svg text {
    fill: #f1f5f9 !important;
}
html[data-kw-theme="dark"] #empChatMessages {
    background: var(--kw-bg-inset, rgba(6, 12, 22, 0.92)) !important;
    border-color: var(--kw-line-soft, rgba(255, 255, 255, 0.1)) !important;
    color: #e8edf5 !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

/* ============================================================
   FIX GLOBAL — eliminar blancos + jerarquía visual uniforme
   ============================================================ */

html[data-kw-theme="dark"] .content,
html[data-kw-theme="dark"] .content .biz-page {
    background: transparent !important;
}

html[data-kw-theme="dark"] .content .app-page-inner.container-fluid {
    background: rgba(20, 32, 54, 0.62) !important;
    border: 1px solid rgba(79, 195, 247, 0.14) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 28px rgba(0, 0, 0, 0.18) !important;
    margin: 10px 12px 14px !important;
}

html[data-kw-theme="dark"] .card-body,
html[data-kw-theme="dark"] .modal-body,
html[data-kw-theme="dark"] details,
html[data-kw-theme="dark"] .list-group,
html[data-kw-theme="dark"] .accordion-item,
html[data-kw-theme="dark"] .accordion-body {
    background: transparent !important;
    color: #e8edf5;
}

html[data-kw-theme="dark"] .accordion-item,
html[data-kw-theme="dark"] .accordion-button {
    background: var(--kw-bg-inset, rgba(6, 12, 22, 0.92)) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e8edf5 !important;
}

html[data-kw-theme="dark"] .accordion-button:not(.collapsed) {
    background: rgba(38, 50, 72, 0.45) !important;
    color: #f1f5f9 !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

/* Superficies con relieve (no todo igual) */
html[data-kw-theme="dark"] .doc-bandeja-tabs {
    background: linear-gradient(180deg, rgba(38, 50, 72, 0.35) 0%, rgba(12, 20, 36, 0.85) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .doc-bandeja-tab.is-active {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.28) 0%, rgba(21, 101, 192, 0.42) 100%) !important;
    color: #e0f7fa !important;
    border: 1px solid rgba(79, 195, 247, 0.45) !important;
    box-shadow: 0 4px 18px rgba(79, 195, 247, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

html[data-kw-theme="dark"] .doc-inbox-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .doc-mail-item {
    background: rgba(12, 20, 36, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html[data-kw-theme="dark"] .doc-mail-item:hover {
    background: rgba(38, 50, 72, 0.38) !important;
    border-color: rgba(79, 195, 247, 0.22) !important;
}

html[data-kw-theme="dark"] .doc-mail-item--pending {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(12, 20, 36, 0.65) 18%) !important;
    border-left: 3px solid #f59e0b !important;
}

html[data-kw-theme="dark"] .doc-inbox-card,
html[data-kw-theme="dark"] .doc-compose-panel,
html[data-kw-theme="dark"] .doc-upload-panel,
html[data-kw-theme="dark"] .doc-worker-card,
html[data-kw-theme="dark"] .doc-nuevo-card .card {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.4) 0%, rgba(18, 28, 46, 0.96) 42%, rgba(10, 18, 32, 0.99) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 28px rgba(0, 0, 0, 0.32) !important;
}

html[data-kw-theme="dark"] .doc-compose-summary,
html[data-kw-theme="dark"] .doc-dropzone {
    background: rgba(6, 12, 22, 0.88) !important;
    border: 1px dashed rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

html[data-kw-theme="dark"] .doc-mail-empty {
    background: rgba(6, 12, 22, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Fichajes — capas */
html[data-kw-theme="dark"] .emp-card,
html[data-kw-theme="dark"] .timeline-card,
html[data-kw-theme="dark"] .reminder-card,
html[data-kw-theme="dark"] .state-item {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.38) 0%, rgba(18, 28, 46, 0.96) 45%, rgba(10, 18, 32, 0.99) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 28px rgba(0, 0, 0, 0.32) !important;
}

html[data-kw-theme="dark"] .emp-cal-month,
html[data-kw-theme="dark"] .emp-detail,
html[data-kw-theme="dark"] .fichajes-dia-table-wrap,
html[data-kw-theme="dark"] .fichajes-audit-card {
    background: rgba(12, 20, 36, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .emp-cal-dows,
html[data-kw-theme="dark"] .fichajes-dia-table thead th,
html[data-kw-theme="dark"] .fichajes-audit-head {
    background: rgba(38, 50, 72, 0.38) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html[data-kw-theme="dark"] .emp-day {
    background: rgba(8, 14, 26, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-kw-theme="dark"] .emp-detail-card {
    background: rgba(6, 12, 22, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .fichajes-dia-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02) !important;
}

html[data-kw-theme="dark"] .admin-cierre-card {
    background: rgba(6, 12, 22, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Calendario */
html[data-kw-theme="dark"] .calendario-wrapper,
html[data-kw-theme="dark"] .calendario,
html[data-kw-theme="dark"] .admin-year-month {
    background: rgba(12, 20, 36, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .calendario thead th,
html[data-kw-theme="dark"] .admin-year-dow {
    background: rgba(38, 50, 72, 0.38) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .calendario tbody td.dia-hoy,
html[data-kw-theme="dark"] .admin-year-cell.is-today {
    box-shadow: inset 0 0 0 1px rgba(79, 195, 247, 0.45) !important;
}

/* Empleados / admin */
html[data-kw-theme="dark"] .emp-dir-emp,
html[data-kw-theme="dark"] .emp-side-card,
html[data-kw-theme="dark"] .emp-main-card,
html[data-kw-theme="dark"] .resumen-card,
html[data-kw-theme="dark"] .stat-card,
html[data-kw-theme="dark"] .detalle-table,
html[data-kw-theme="dark"] .modern-stat-card,
html[data-kw-theme="dark"] .modern-card {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.35) 0%, rgba(18, 28, 46, 0.94) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .emp-list-lite,
html[data-kw-theme="dark"] .emp-mini-table thead th,
html[data-kw-theme="dark"] .detalle-table th,
html[data-kw-theme="dark"] .modern-table th {
    background: rgba(38, 50, 72, 0.38) !important;
}

/* Tareas */
html[data-kw-theme="dark"] .tw-app {
    --tw-accent: #29b6f6;
    --tw-accent-hover: #4fc3f7;
    --tw-bg: transparent;
    --tw-card: rgba(18, 28, 46, 0.96);
    --tw-muted: #94a3b8;
    --tw-text: #e8edf5;
    --tw-border: rgba(255, 255, 255, 0.1);
}

html[data-kw-theme="dark"] .tw-card,
html[data-kw-theme="dark"] .tw-card-head {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.35) 0%, rgba(18, 28, 46, 0.96) 100%) !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .tw-input,
html[data-kw-theme="dark"] .tw-form input,
html[data-kw-theme="dark"] .tw-form textarea,
html[data-kw-theme="dark"] .tw-form select {
    background: rgba(6, 12, 22, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22) !important;
}

/* Dashboard — capas diferenciadas */
html[data-kw-theme="dark"] .dashboard-bizneo .dashboard-card,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-stat,
html[data-kw-theme="dark"] .dashboard-bizneo .kpi-mini-card,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-kpi,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-alerts-card,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-table-card {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.38) 0%, rgba(18, 28, 46, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-ring-card {
    background: rgba(8, 18, 34, 0.55) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    box-shadow: none !important;
    min-height: 148px;
}

html[data-kw-theme="dark"] .dashboard-bizneo .dash-top-pill,
html[data-kw-theme="dark"] .dashboard-bizneo .dash-pill,
html[data-kw-theme="dark"] .dashboard-bizneo .kw-dash2-datetime {
    background: rgba(6, 12, 22, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Catch-all inline blancos (sin tocar imágenes) */
html[data-kw-theme="dark"] div[style*="background:#fff"]:not([class*="logo"]):not(img),
html[data-kw-theme="dark"] div[style*="background: #fff"]:not([class*="logo"]),
html[data-kw-theme="dark"] div[style*="background:#ffffff"],
html[data-kw-theme="dark"] div[style*="background: #ffffff"],
html[data-kw-theme="dark"] section[style*="background:#fff"],
html[data-kw-theme="dark"] section[style*="background:#ffffff"] {
    background: rgba(18, 28, 46, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] [style*="background:#f8fafc"],
html[data-kw-theme="dark"] [style*="background: #f8fafc"],
html[data-kw-theme="dark"] [style*="background:#f3f4f6"],
html[data-kw-theme="dark"] [style*="background:#f4f7f9"] {
    background: rgba(38, 50, 72, 0.32) !important;
}

html[data-kw-theme="dark"] [style*="color:#0f172a"],
html[data-kw-theme="dark"] [style*="color: #0f172a"],
html[data-kw-theme="dark"] [style*="color:#111827"] {
    color: #e8edf5 !important;
}

html[data-kw-theme="dark"] hr,
html[data-kw-theme="dark"] .doc-inbox-head,
html[data-kw-theme="dark"] .emp-edit-head {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Turnos */
html[data-kw-theme="dark"] .shift-turno-card {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.35) 0%, rgba(18, 28, 46, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* ---------- General / Clientes (.cl-*) ---------- */

html[data-kw-theme="dark"] .cl-wrap {
    background: transparent !important;
    color: #e8edf5 !important;
}

html[data-kw-theme="dark"] .cl-card,
html[data-kw-theme="dark"] .cl-srv-list {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.38) 0%, rgba(18, 28, 46, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

html[data-kw-theme="dark"] .cl-page-title,
html[data-kw-theme="dark"] .cl-h2,
html[data-kw-theme="dark"] .cl-h3,
html[data-kw-theme="dark"] .cl-srv-list-sum {
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] .cl-small,
html[data-kw-theme="dark"] .cl-intro,
html[data-kw-theme="dark"] .cl-srv-head {
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .cl-label,
html[data-kw-theme="dark"] .cl-srv-det-sum,
html[data-kw-theme="dark"] .cl-det-label {
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .cl-bc a {
    color: #67e8f9 !important;
}

html[data-kw-theme="dark"] .cl-input,
html[data-kw-theme="dark"] .cl-det-ta,
html[data-kw-theme="dark"] .cl-form select {
    background: rgba(6, 12, 22, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e8edf5 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22) !important;
}

html[data-kw-theme="dark"] .cl-input::placeholder,
html[data-kw-theme="dark"] .cl-det-ta::placeholder {
    color: #64748b !important;
}

html[data-kw-theme="dark"] .cl-srv-det {
    background: rgba(6, 12, 22, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .cl-srv-row {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .cl-srv-table-wrap {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .cl-srv-compact tbody tr.cl-srv-compact-row td {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .cl-srv-instr-pop summary {
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(6, 12, 22, 0.72) !important;
}

html[data-kw-theme="dark"] .cl-srv-instr-pop summary.has-value {
    color: #67e8f9 !important;
    border-color: rgba(79, 195, 247, 0.25) !important;
}

html[data-kw-theme="dark"] .cl-srv-instr-pop[open] summary {
    color: #67e8f9 !important;
    border-color: rgba(79, 195, 247, 0.35) !important;
    background: rgba(34, 211, 238, 0.12) !important;
}

html[data-kw-theme="dark"] .cl-srv-instr-pop input {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-kw-theme="dark"] .cl-srv-row-actions .cl-del {
    font-size: 12px !important;
}

html[data-kw-theme="dark"] .cl-table th {
    background: rgba(38, 50, 72, 0.38) !important;
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .cl-table th,
html[data-kw-theme="dark"] .cl-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .cl-click-row:hover {
    background: rgba(34, 211, 238, 0.08) !important;
}

html[data-kw-theme="dark"] .cl-click-row:focus-visible {
    background: rgba(34, 211, 238, 0.12) !important;
    outline-color: rgba(79, 195, 247, 0.55) !important;
}

html[data-kw-theme="dark"] .cl-alert-err {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
    color: #fca5a5 !important;
}

html[data-kw-theme="dark"] .cl-wrap .cl-alert[style*="background:#ecfdf5"] {
    background: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
    color: #86efac !important;
}

html[data-kw-theme="dark"] .cl-del {
    color: #fca5a5 !important;
}

html[data-kw-theme="dark"] .btn-sub {
    background: rgba(6, 12, 22, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .btn-sec {
    background: rgba(38, 50, 72, 0.55) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .btn-danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
}

/* ---------- Tareas General (tablas y pestañas) ---------- */

html[data-kw-theme="dark"] .tw-h2,
html[data-kw-theme="dark"] .tw-h3,
html[data-kw-theme="dark"] .tw-strong {
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] .tw-small,
html[data-kw-theme="dark"] .tw-muted,
html[data-kw-theme="dark"] .tw-empty {
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .tw-table-wrap {
    background: rgba(6, 12, 22, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .tw-table thead th {
    background: rgba(38, 50, 72, 0.38) !important;
    color: #94a3b8 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-kw-theme="dark"] .tw-table td {
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .tw-tbody-group .tw-tr-group td {
    background: rgba(38, 50, 72, 0.42) !important;
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] .tw-link {
    color: #67e8f9 !important;
}

html[data-kw-theme="dark"] .tw-link-danger {
    color: #fca5a5 !important;
}

html[data-kw-theme="dark"] .tw-admin-tasktab {
    background: rgba(38, 50, 72, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .tw-admin-tasktab.is-active {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.28) 0%, rgba(21, 101, 192, 0.42) 100%) !important;
    border-color: rgba(79, 195, 247, 0.45) !important;
    color: #e0f7fa !important;
    box-shadow: 0 4px 18px rgba(79, 195, 247, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

html[data-kw-theme="dark"] .tw-btn-secondary {
    background: rgba(6, 12, 22, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .tw-btn-secondary:hover,
html[data-kw-theme="dark"] .tw-btn-outline:hover {
    background: rgba(38, 50, 72, 0.55) !important;
}

html[data-kw-theme="dark"] .tw-btn-outline {
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #67e8f9 !important;
}

html[data-kw-theme="dark"] .tw-input {
    background: rgba(6, 12, 22, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e8edf5 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22) !important;
}

html[data-kw-theme="dark"] .tw-form input,
html[data-kw-theme="dark"] .tw-form textarea,
html[data-kw-theme="dark"] .tw-form select {
    background: rgba(6, 12, 22, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e8edf5 !important;
}

/* ---------- Ausencias / vacaciones ---------- */

html[data-kw-theme="dark"] .table tbody td .text-primary,
html[data-kw-theme="dark"] .table tbody td summary.text-primary {
    color: #67e8f9 !important;
}

html[data-kw-theme="dark"] .table tbody td .bg-light,
html[data-kw-theme="dark"] .table tbody details .bg-light {
    background: rgba(6, 12, 22, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .card .display-6 {
    color: #f1f5f9 !important;
}

/* ---------- Calendario turnos — zonas blancas (inline list.php) ---------- */

html[data-kw-theme="dark"] .content .biz-page .calendario-wrapper {
    background: rgba(12, 20, 36, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

html[data-kw-theme="dark"] .calendar-toolbar {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-kw-theme="dark"] .calendario tbody td,
html[data-kw-theme="dark"] .calendario .empleado-col,
html[data-kw-theme="dark"] .calendario .total-horas-col,
html[data-kw-theme="dark"] .calendario thead th.empleado-col,
html[data-kw-theme="dark"] .calendario thead th.total-horas-col {
    background: rgba(18, 28, 46, 0.92) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .calendario tbody td.dia-sabado:not(.seleccionada),
html[data-kw-theme="dark"] .calendario tbody td.dia-domingo:not(.seleccionada),
html[data-kw-theme="dark"] .calendario tbody td.calendar-cell-pad {
    background: rgba(15, 23, 42, 0.55) !important;
}

html[data-kw-theme="dark"] .calendario thead th.dia-sabado,
html[data-kw-theme="dark"] .calendario thead th.dia-domingo {
    background: rgba(38, 50, 72, 0.42) !important;
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .calendario thead th.th-fuera-mes {
    background: rgba(15, 23, 42, 0.35) !important;
    color: #64748b !important;
    opacity: 1 !important;
}

html[data-kw-theme="dark"] .calendario thead th.dia-festivo,
html[data-kw-theme="dark"] .calendario tbody td.dia-festivo:not(.seleccionada) {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fcd34d !important;
}

html[data-kw-theme="dark"] .calendario tbody td.dia-hoy,
html[data-kw-theme="dark"] .calendario thead th.dia-hoy {
    background: rgba(34, 211, 238, 0.12) !important;
    color: #67e8f9 !important;
}

html[data-kw-theme="dark"] .calendario td.calendar-cell.seleccionada {
    background: rgba(34, 211, 238, 0.18) !important;
}

html[data-kw-theme="dark"] .calendario td.calendar-cell:hover,
html[data-kw-theme="dark"] .calendario tbody td.dia-sabado.calendar-cell:hover,
html[data-kw-theme="dark"] .calendario tbody td.dia-domingo.calendar-cell:hover {
    background: rgba(34, 211, 238, 0.1) !important;
}

html[data-kw-theme="dark"] .tfoot-resumen-turnos,
html[data-kw-theme="dark"] .tfoot-resumen-turnos td,
html[data-kw-theme="dark"] .shift-count-total-row,
html[data-kw-theme="dark"] .shift-count-total-row td {
    background: rgba(12, 20, 36, 0.88) !important;
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .shift-name-footer,
html[data-kw-theme="dark"] .shift-count-number {
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .btn-cal-arrow {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .btn-cal-arrow:hover {
    background: rgba(38, 50, 72, 0.55) !important;
}

html[data-kw-theme="dark"] .btn-cal-secondary {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .btn-cal-secondary:hover {
    background: rgba(38, 50, 72, 0.55) !important;
}

html[data-kw-theme="dark"] .btn-danger {
    background: rgba(127, 29, 29, 0.35) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-kw-theme="dark"] .admin-year-month-head {
    background: rgba(38, 50, 72, 0.38) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] .admin-year-cell.is-out,
html[data-kw-theme="dark"] .admin-year-cell.is-not-year {
    background: rgba(15, 23, 42, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #64748b !important;
}

html[data-kw-theme="dark"] .admin-year-cell.is-selected {
    background: rgba(34, 211, 238, 0.14) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    box-shadow: inset 0 0 0 2px rgba(34, 211, 238, 0.2) !important;
}

html[data-kw-theme="dark"] .admin-year-fest {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
}

html[data-kw-theme="dark"] .admin-year-aus {
    background: rgba(51, 65, 85, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .modal-box {
    background: rgba(15, 28, 48, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .admin-cal-tooltip {
    background: rgba(15, 28, 48, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .admin-cal-tooltip::after {
    background: rgba(15, 28, 48, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-kw-theme="dark"] .admin-tt-date {
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] .admin-tt-meta {
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .biz-page .biz-card[style*="border:1px solid #e2e8f0"],
html[data-kw-theme="dark"] .biz-page div[style*="background:#fff"] {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ---------- Fichajes — modal, tabla y zonas claras ---------- */

html[data-kw-theme="dark"] .live-state.card {
    background: linear-gradient(180deg, rgba(42, 54, 78, 0.38) 0%, rgba(18, 28, 46, 0.96) 45%, rgba(10, 18, 32, 0.99) 100%) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .live-state.card h2,
html[data-kw-theme="dark"] .clock-page-sub,
html[data-kw-theme="dark"] .tl-title,
html[data-kw-theme="dark"] .tl-hours,
html[data-kw-theme="dark"] .tl-total,
html[data-kw-theme="dark"] .tl-total-live,
html[data-kw-theme="dark"] .tl-row,
html[data-kw-theme="dark"] .fichajes-audit-item-main {
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .fichajes-dia-table tbody tr {
    background: rgba(12, 20, 36, 0.55) !important;
}

html[data-kw-theme="dark"] .pausa-pill {
    background: rgba(120, 53, 15, 0.35) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
}
html[data-kw-theme="dark"] .pausa-dur { color: #fde68a !important; }
html[data-kw-theme="dark"] .pausa-total { color: #94a3b8 !important; }
html[data-kw-theme="dark"] .fichaje-neto-txt { color: #94a3b8 !important; }

html[data-kw-theme="dark"] .fichajes-dia-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03) !important;
}

html[data-kw-theme="dark"] .fichajes-audit-item {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .fichajes-audit-when,
html[data-kw-theme="dark"] .fichajes-audit-item-meta,
html[data-kw-theme="dark"] .fichajes-audit-badge {
    color: #94a3b8 !important;
}

html[data-kw-theme="dark"] .fichajes-audit-badge {
    background: rgba(51, 65, 85, 0.65) !important;
}

html[data-kw-theme="dark"] .fichajes-edit-motivo-wrap {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.22) !important;
    color: #fcd34d !important;
}

html[data-kw-theme="dark"] .fichajes-edit-badge {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fcd34d !important;
}

html[data-kw-theme="dark"] .tl-total {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] .fichaje-geo-btn--in:hover {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
}

html[data-kw-theme="dark"] .fichaje-geo-btn--out:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
}

html[data-kw-theme="dark"] .fichaje-geo-modal-badge--in {
    background: rgba(34, 197, 94, 0.14) !important;
    color: #86efac !important;
}

html[data-kw-theme="dark"] .fichaje-geo-modal-badge--out {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #fca5a5 !important;
}

html[data-kw-theme="dark"] .hover-bg-light:hover,
html[data-kw-theme="dark"] .rem-item-row.hover-bg-light:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-kw-theme="dark"] .live-state-box {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html[data-kw-theme="dark"] .live-state-box-label,
html[data-kw-theme="dark"] .live-state-name {
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .live-state-box-chevron {
    color: #64748b !important;
}

html[data-kw-theme="dark"] .live-state-panel {
    background: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
}

html[data-kw-theme="dark"] .live-state-panel .admin-emp-item {
    color: #cbd5e1 !important;
}

html[data-kw-theme="dark"] .live-state-panel .admin-emp-item:hover,
html[data-kw-theme="dark"] .live-state-panel .admin-emp-item:focus {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .live-state-panel .admin-emp-item.is-selected {
    background: rgba(34, 211, 238, 0.12) !important;
    box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.55) !important;
}

html[data-kw-theme="dark"] .admin-emp-dd .dropdown-menu {
    background: rgba(15, 28, 48, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-kw-theme="dark"] .admin-emp-dd .dropdown-item {
    color: #e2e8f0 !important;
}

html[data-kw-theme="dark"] .admin-emp-dd .dropdown-item:hover,
html[data-kw-theme="dark"] .admin-emp-dd .dropdown-item:focus,
html[data-kw-theme="dark"] .admin-emp-dd .dropdown-item.is-selected {
    background: rgba(38, 50, 72, 0.55) !important;
    color: #f1f5f9 !important;
}

html[data-kw-theme="dark"] #modalFichajeUbicacionMap,
html[data-kw-theme="dark"] #modalFichajeUbicacion .ratio {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-kw-theme="dark"] #modalEditFichaje .modal-footer.bg-light,
html[data-kw-theme="dark"] #modalRecordatorios .modal-footer.bg-light,
html[data-kw-theme="dark"] #modalRecordatorios .modal-body .bg-light {
    background: rgba(15, 23, 42, 0.72) !important;
}

html[data-kw-theme="dark"] #editFichajeEmpName.bg-light {
    background: rgba(6, 12, 22, 0.82) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
