/* ===== DARK MODE - KonKorde ===== */
/* Activated via data-theme="dark" on <html> */

[data-theme="dark"] {
    /* ===== GLOBAL VARIABLES ===== */
    --sidebar-bg: #0a1120;
    --sidebar-hover: #101a2e;
    --sidebar-active: #16213f;
    --sidebar-text: #93a8c4;
    --sidebar-text-active: #ffffff;
    --sidebar-accent: #60a5fa;

    /* ===== BODY & LAYOUT ===== */
    background: #070c18 !important;
    color: #eaf1fb;
}

[data-theme="dark"] body {
    background: #070c18 !important;
    color: #eaf1fb;
}

/* ===== SIDEBAR ===== */
[data-theme="dark"] .sidebar {
    background:
        radial-gradient(900px 480px at 10% -8%, rgba(37, 99, 235, 0.34) 0%, transparent 62%),
        radial-gradient(700px 420px at 110% 8%, rgba(14, 165, 233, 0.20) 0%, transparent 60%),
        linear-gradient(180deg, #0a1120 0%, #070c18 60%, #060a12 100%);
}

[data-theme="dark"] .sidebar-header {
    border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .sidebar-header .logo-icon {
    background: #60a5fa;
}

[data-theme="dark"] .sidebar-header .logo-sub {
    color: #93a8c4;
}

[data-theme="dark"] .sidebar-nav .nav-section {
    color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .sidebar-nav .nav-link {
    color: #93a8c4;
}

[data-theme="dark"] .sidebar-nav .nav-link:hover {
    background: #101a2e;
    color: #eaf1fb;
}

[data-theme="dark"] .sidebar-nav .nav-link.active {
    background: #16213f;
    color: #eaf1fb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

[data-theme="dark"] .sidebar-footer {
    border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .sidebar-toggle-btn {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .sidebar-toggle-btn:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== TOPBAR ===== */
[data-theme="dark"] .topbar {
    background: #101a2c;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .topbar-brand {
    color: #eaf1fb;
}

[data-theme="dark"] .topbar-brand span {
    color: #60a5fa;
}

[data-theme="dark"] .topbar-user {
    color: #7f93af;
}

[data-theme="dark"] .topbar-user .avatar {
    background: #60a5fa;
}

[data-theme="dark"] .topbar .menu-toggle {
    color: #eaf1fb;
}

[data-theme="dark"] .topbar .menu-toggle:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== OVERLAY ===== */
[data-theme="dark"] .sidebar-overlay {
    background: rgba(0,0,0,0.7);
}

/* ===== MAIN CONTENT ===== */
[data-theme="dark"] .main-content .content-wrapper {
    color: #eaf1fb;
}

/* ===== BOOTSTRAP COMPONENTS ===== */

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content {
    background: #101a2c;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .card-header {
    background: #16223a !important;
    border-bottom-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .card-footer {
    background: #16223a;
    border-top-color: #22304d;
}

/* Tables */
[data-theme="dark"] .table {
    color: #eaf1fb;
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    color: #eaf1fb;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .table thead th {
    background-color: #16223a !important;
    color: #7f93af;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255,255,255,0.03) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255,255,255,0.01);
}

[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-bordered > * {
    border-color: #22304d;
}

/* Forms */
[data-theme="dark"] .form-control {
    background-color: #16223a;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .form-control:focus {
    background-color: #1c2b47;
    border-color: #60a5fa;
    color: #eaf1fb;
    box-shadow: 0 0 0 0.2rem rgba(129, 140, 248, 0.15);
}

/* Selects en modo oscuro (legibilidad y contraste mejorado) */
[data-theme="dark"] select,
[data-theme="dark"] .form-select,
[data-theme="dark"] select.form-control {
    background-color: #16223a !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 14px 10px !important;
    border-color: #2a3b5c !important;
    color: #f8fafc !important;
    padding-right: 2.5rem !important;
}

[data-theme="dark"] select:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] select.form-control:focus {
    background-color: #1c2b47 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3.5px rgba(96, 165, 250, 0.22) !important;
}

[data-theme="dark"] select option,
[data-theme="dark"] .form-select option {
    background-color: #16223a;
    color: #f8fafc;
}

[data-theme="dark"] .form-control::placeholder {
    color: #7f93af;
}

[data-theme="dark"] .form-label,
[data-theme="dark"] .form-check-label {
    color: #b6c8e0;
}

[data-theme="dark"] .form-check-input {
    background-color: #16223a;
    border-color: #46617f;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: #60a5fa;
    border-color: #60a5fa;
}

[data-theme="dark"] .input-group-text {
    background-color: #16223a;
    border-color: #22304d;
    color: #7f93af;
}

/* Modals */
[data-theme="dark"] .modal-header {
    background: #16223a;
    border-bottom-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .modal-body {
    background: #101a2c;
    color: #eaf1fb;
}

[data-theme="dark"] .modal-footer {
    background: #16223a;
    border-top-color: #22304d;
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* Buttons */
[data-theme="dark"] .btn-outline-secondary {
    color: #7f93af;
    border-color: #46617f;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #22304d;
    color: #eaf1fb;
    border-color: #7f93af;
}

[data-theme="dark"] .btn-outline-primary {
    color: #60a5fa;
    border-color: #60a5fa;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: #60a5fa;
    color: #070c18;
}

[data-theme="dark"] .btn-outline-danger {
    color: #f87171;
    border-color: #f87171;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background: #f87171;
    color: #070c18;
}

[data-theme="dark"] .btn-outline-success {
    color: #34d399;
    border-color: #34d399;
}

[data-theme="dark"] .btn-outline-success:hover {
    background: #34d399;
    color: #070c18;
}

[data-theme="dark"] .btn-outline-warning {
    color: #fbbf24;
    border-color: #fbbf24;
}

[data-theme="dark"] .btn-outline-warning:hover {
    background: #fbbf24;
    color: #070c18;
}

[data-theme="dark"] .btn-outline-info {
    color: #60a5fa;
    border-color: #60a5fa;
}

[data-theme="dark"] .btn-outline-info:hover {
    background: #60a5fa;
    color: #070c18;
}

[data-theme="dark"] .btn-outline-dark {
    color: #eaf1fb;
    border-color: #46617f;
}

[data-theme="dark"] .btn-outline-dark:hover {
    background: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .btn-secondary {
    background: #22304d;
    border-color: #46617f;
    color: #eaf1fb;
}

[data-theme="dark"] .btn-dark {
    background: #16223a;
    border-color: #22304d;
    color: #eaf1fb;
}

/* Dropdowns */
[data-theme="dark"] .dropdown-menu {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .dropdown-item {
    color: #eaf1fb;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: #22304d;
    color: #60a5fa;
}

/* Alerts */
[data-theme="dark"] .alert-info {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    color: #93c5fd;
}

[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

[data-theme="dark"] .alert-danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

[data-theme="dark"] .alert-success {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: #6ee7b7;
}

[data-theme="dark"] .alert-secondary,
[data-theme="dark"] .alert {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: #7f93af;
}

/* Badges */
[data-theme="dark"] .badge.bg-primary {
    background: rgba(129, 140, 248, 0.2) !important;
    color: #a5b4fc !important;
}

[data-theme="dark"] .badge.bg-success {
    background: rgba(52, 211, 153, 0.2) !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .badge.bg-warning {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .badge.bg-danger {
    background: rgba(248, 113, 113, 0.2) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .badge.bg-info {
    background: rgba(96, 165, 250, 0.2) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #7f93af !important;
}

[data-theme="dark"] .badge.bg-dark {
    background: rgba(30, 34, 53, 0.8) !important;
    color: #eaf1fb !important;
}

[data-theme="dark"] .badge.bg-purple {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #c4b5fd !important;
}

/* Pagination */
[data-theme="dark"] .page-link {
    background: #16223a;
    border-color: #22304d;
    color: #60a5fa;
}

[data-theme="dark"] .page-item.active .page-link {
    background: #60a5fa;
    border-color: #60a5fa;
    color: #070c18;
}

[data-theme="dark"] .page-item.disabled .page-link {
    background: #101a2c;
    border-color: #22304d;
    color: #46617f;
}

/* Navs & Tabs */
[data-theme="dark"] .nav-tabs {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: #7f93af;
    border-color: transparent;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #22304d #22304d transparent;
    color: #eaf1fb;
    background: #16223a;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background: #101a2c;
    border-color: #22304d #22304d #101a2c;
    color: #eaf1fb;
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb {
    background: transparent;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #46617f;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #60a5fa;
}

/* Text utilities */
[data-theme="dark"] .text-muted {
    color: #7f93af !important;
}

[data-theme="dark"] .text-dark {
    color: #eaf1fb !important;
}

[data-theme="dark"] .text-body {
    color: #eaf1fb !important;
}

[data-theme="dark"] .text-secondary {
    color: #7f93af !important;
}

/* Background utilities */
[data-theme="dark"] .bg-light {
    background: #16223a !important;
}

[data-theme="dark"] .bg-white {
    background: #101a2c !important;
}

[data-theme="dark"] .bg-body {
    background: #101a2c !important;
}

[data-theme="dark"] .bg-body-secondary {
    background: #16223a !important;
}

[data-theme="dark"] .bg-body-tertiary {
    background: #1c2b47 !important;
}

[data-theme="dark"] .bg-dark {
    background: #16223a !important;
}

/* Border utilities */
[data-theme="dark"] .border {
    border-color: #22304d !important;
}

[data-theme="dark"] .border-top {
    border-top-color: #22304d !important;
}

[data-theme="dark"] .border-bottom {
    border-bottom-color: #22304d !important;
}

[data-theme="dark"] .border-start {
    border-left-color: #22304d !important;
}

[data-theme="dark"] .border-end {
    border-right-color: #22304d !important;
}

[data-theme="dark"] .border-secondary {
    border-color: #46617f !important;
}

/* Accordion */
[data-theme="dark"] .accordion-item {
    background: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .accordion-button {
    background: #16223a;
    color: #eaf1fb;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: #1c2b47;
    color: #60a5fa;
}

[data-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

[data-theme="dark"] .accordion-body {
    background: #101a2c;
    color: #eaf1fb;
}

/* List group */
[data-theme="dark"] .list-group-item {
    background: #101a2c;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .list-group-item.active {
    background: #60a5fa;
    border-color: #60a5fa;
    color: #070c18;
}

/* Tooltip / Popover */
[data-theme="dark"] .tooltip-inner {
    background: #16223a;
    color: #eaf1fb;
}

[data-theme="dark"] .popover {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .popover-header {
    background: #1c2b47;
    border-bottom-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .popover-body {
    color: #eaf1fb;
}

/* ===== DARK MODE TOGGLE BUTTON ===== */
.dark-mode-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #eaf1fb;
    background: transparent;
    color: #eaf1fb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
}

.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: #60a5fa;
    color: #60a5fa;
    transform: rotate(30deg);
}

[data-theme="dark"] .dark-mode-toggle {
    border-color: #46617f;
    color: #fbbf24;
}

[data-theme="dark"] .dark-mode-toggle:hover {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* ===== INDEX PAGE (Module Selector) ===== */
[data-theme="dark"] body[class] {
    background: #070c18 !important;
}

[data-theme="dark"] .dashboard {
    color: #eaf1fb;
}

[data-theme="dark"] .header {
    border-bottom-color: rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .title-section h1 {
    background: linear-gradient(120deg, #eaf1fb, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .title-section p {
    color: #60a5fa;
}

[data-theme="dark"] .badge-date {
    background: rgba(30, 34, 53, 0.8);
    color: #60a5fa;
    border-color: rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .app-card {
    background: rgba(26, 29, 41, 0.96);
    border-color: rgba(129, 140, 248, 0.15);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .app-card:hover {
    background: #16223a;
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 28px 40px -16px rgba(0,0,0,0.5);
}

[data-theme="dark"] .icon-wrapper {
    background: linear-gradient(145deg, #1c2b47, #16213f);
    color: #60a5fa;
}

[data-theme="dark"] .app-title {
    color: #eaf1fb;
}

[data-theme="dark"] .app-sub {
    color: #60a5fa;
}

[data-theme="dark"] .card-description {
    color: #7f93af;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .btn-access {
    background: #1c2b47;
    color: #60a5fa;
    border-color: #2e3f61;
}

[data-theme="dark"] .btn-access:hover {
    background: #60a5fa;
    color: #070c18;
    border-color: #60a5fa;
}

[data-theme="dark"] .info-footer {
    color: #60a5fa;
    border-top-color: #22304d;
    background: rgba(30, 34, 53, 0.7);
}

[data-theme="dark"] ::selection {
    background: rgba(129, 140, 248, 0.3);
    color: #eaf1fb;
}

/* ===== DASHBOARD MODULE ===== */
[data-theme="dark"] .dash-card {
    background: #101a2c;
    border-color: #22304d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] .dash-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

[data-theme="dark"] .dash-card-number {
    color: #eaf1fb;
}

[data-theme="dark"] .dash-card-label {
    color: #7f93af;
}

[data-theme="dark"] .dash-chart-card {
    background: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .dash-chart-card h6 {
    color: #eaf1fb;
}

[data-theme="dark"] .donut-hole {
    background: #101a2c;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

[data-theme="dark"] .donut-num {
    color: #eaf1fb;
}

[data-theme="dark"] .donut-label {
    color: #7f93af;
}

[data-theme="dark"] .bar-h-label {
    color: #b6c8e0;
}

[data-theme="dark"] .bar-h-track {
    background: #16223a;
}

[data-theme="dark"] .bar-h-val {
    color: #eaf1fb;
}

[data-theme="dark"] .bar-vertical-val {
    color: #eaf1fb;
}

[data-theme="dark"] .bar-vertical-track {
    background: #16223a;
}

[data-theme="dark"] .bar-vertical-label {
    color: #7f93af;
}

[data-theme="dark"] .dash-legend {
    color: #7f93af;
}

[data-theme="dark"] .actividad-mini-item {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .actividad-mini-icon {
    background: rgba(129, 140, 248, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .actividad-mini-body {
    color: #b6c8e0;
}

[data-theme="dark"] .actividad-mini-body strong {
    color: #eaf1fb;
}

[data-theme="dark"] .actividad-mini-body span {
    color: #7f93af;
}

[data-theme="dark"] .actividad-mini-body small {
    color: #7f93af;
}

[data-theme="dark"] .actividad-mini-time {
    color: #7f93af;
}

[data-theme="dark"] .dash-mini-proyecto {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .dash-mini-proyecto:hover {
    background: rgba(129, 140, 248, 0.1);
    border-color: rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .dash-mini-proyecto span {
    color: #eaf1fb;
}

/* ===== PROYECTOS MODULE ===== */
[data-theme="dark"] .kanban-desktop {
    background: #101a2e;
    border-color: #22304d;
}

[data-theme="dark"] .kanban-toolbar {
    background: #101a2c;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .zoom-level {
    color: #7f93af;
}

[data-theme="dark"] .kanban-column-header {
    background: #101a2c;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .kanban-column-title {
    color: #eaf1fb;
}

[data-theme="dark"] .btn-add-tarea-header {
    background: rgba(255,255,255,0.02);
    border-color: #46617f;
    color: #7f93af;
}

[data-theme="dark"] .btn-add-tarea {
    border-color: #46617f;
    color: #7f93af;
}

[data-theme="dark"] .kanban-card {
    background: #16223a;
    border-color: #22304d;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

[data-theme="dark"] .kanban-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border-color: #46617f;
}

[data-theme="dark"] .kanban-card-completada {
    background: #101a2c;
    border-color: #22304d !important;
}

[data-theme="dark"] .kanban-checkbox {
    border-color: #46617f;
    background: #16223a;
}

[data-theme="dark"] .kanban-card-title {
    color: #eaf1fb;
}

[data-theme="dark"] .kanban-card-desc {
    color: #7f93af;
}

[data-theme="dark"] .kanban-card-footer {
    border-top-color: #22304d;
}

[data-theme="dark"] .badge-baja {
    background: #22304d;
    color: #7f93af;
}

[data-theme="dark"] .badge-media {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .badge-alta {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

[data-theme="dark"] .badge-urgente {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .sortable-ghost {
    background: rgba(129, 140, 248, 0.1);
    border-color: rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] .proyecto-dashboard {
    background: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .proyecto-dashboard .dash-card {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .proyecto-dashboard .dash-seccion {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .proyecto-dashboard .dash-seccion h6 {
    color: #eaf1fb;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .proyecto-dashboard .dash-label {
    color: #7f93af;
}

[data-theme="dark"] .modal-tarea .tarea-seccion {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .modal-tarea .form-tarea-input {
    background-color: #1c2b47;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .modal-tarea .form-label {
    color: #7f93af;
}

[data-theme="dark"] .tarea-tabs .nav-link {
    color: #7f93af;
    border-color: transparent;
}

[data-theme="dark"] .tarea-tabs .nav-link:hover {
    border-color: #22304d;
    color: #60a5fa;
}

[data-theme="dark"] .tarea-tabs .nav-link.active {
    color: #60a5fa;
    border-color: #22304d;
    border-bottom-color: #101a2c;
    background: #101a2c;
}

[data-theme="dark"] .actividades-list .actividad-item {
    background: #16223a;
    color: #eaf1fb;
}

[data-theme="dark"] .actividades-list .actividad-item:hover {
    background: #22304d;
    color: #ffffff;
}

[data-theme="dark"] .actividades-list .actividad-item .fw-bold {
    color: #ffffff;
}

[data-theme="dark"] .actividades-list .actividad-completada {
    background: #1d2a24;
    border-left-color: #28a745;
    color: #eaf1fb;
}

[data-theme="dark"] .actividades-list .texto-actividad-completada {
    color: #6ee7b7;
}

/* ===== CHAT MODULE ===== */
[data-theme="dark"] .chat-container {
    background: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .chat-messages {
    background: #13151f;
}

[data-theme="dark"] .chat-messages::-webkit-scrollbar-thumb {
    background: #46617f;
}

[data-theme="dark"] .chat-message-content {
    background: #16223a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

[data-theme="dark"] .chat-message-propio .chat-message-content {
    background: rgba(255, 102, 0, 0.15);
}

[data-theme="dark"] .chat-message-usuario {
    color: #b6c8e0;
}

[data-theme="dark"] .chat-message-fecha {
    color: #7f93af;
}

[data-theme="dark"] .chat-message-text {
    color: #eaf1fb;
}

[data-theme="dark"] .chat-message-sistema {
    background: #16223a;
    color: #7f93af;
}

[data-theme="dark"] .chat-empty {
    color: #46617f;
}

[data-theme="dark"] .chat-input {
    border-top-color: #22304d;
    background: #101a2c;
}

[data-theme="dark"] .chat-input .form-control {
    background: #16223a;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .chat-input .form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}

[data-theme="dark"] .chat-date-separator {
    color: #7f93af;
}

[data-theme="dark"] .chat-date-separator::before,
[data-theme="dark"] .chat-date-separator::after {
    background: #22304d;
}

[data-theme="dark"] .chat-evento-contexto {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .chat-sidebar {
    background: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .chat-sidebar-titulo {
    color: #7f93af;
    border-bottom-color: #22304d;
}

[data-theme="dark"] .chat-canal-item {
    color: #b6c8e0;
}

[data-theme="dark"] .chat-canal-item:hover {
    background: rgba(255, 102, 0, 0.08);
    color: #60a5fa;
}

[data-theme="dark"] .chat-header {
    background: #101a2c;
    border-bottom-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .btn-chat-fondo {
    background: #22304d;
    color: #7f93af;
}

[data-theme="dark"] .btn-chat-adjunto {
    background: #22304d;
    color: #7f93af;
}

[data-theme="dark"] .chat-fondo-muestra {
    border-color: #22304d;
}

[data-theme="dark"] .chat-adjunto-link {
    background: #16223a;
    border-color: #22304d;
    color: #b6c8e0;
}

[data-theme="dark"] .chat-adjunto-audio {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .chat-emoji-panel {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .chat-emoji-cat {
    color: #7f93af;
}

[data-theme="dark"] .chat-sidebar-buscar {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .chat-buscar-resultados {
    background: #16223a;
    border-color: #22304d;
}

[data-theme="dark"] .chat-buscar-item {
    color: #eaf1fb;
}

[data-theme="dark"] .chat-buscar-item-texto {
    color: #7f93af;
}

[data-theme="dark"] .chat-sidebar-filtros {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .chat-filtro-btn {
    border-color: #46617f;
    background: #16223a;
    color: #7f93af;
}

[data-theme="dark"] .buscar-modo-btn {
    border-color: #46617f;
    background: #16223a;
    color: #7f93af;
}

[data-theme="dark"] .chat-grabando {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

[data-theme="dark"] .chat-layout:fullscreen {
    background: #070c18;
}

/* ===== CALENDAR MODULE ===== */
[data-theme="dark"] .cal-grid-wrapper {
    border-color: #22304d;
    background: #101a2c;
}

[data-theme="dark"] .cal-grid {
    background: #101a2c;
}

[data-theme="dark"] .cal-dia-nombre {
    background: #16223a;
    border-bottom-color: #22304d;
    border-right-color: #22304d;
    color: #7f93af;
}

[data-theme="dark"] .cal-cell {
    border-right-color: #22304d;
    border-bottom-color: #22304d;
    background: #101a2c;
}

[data-theme="dark"] .cal-cell:hover {
    background: #16223a;
}

[data-theme="dark"] .cal-cell.cal-fuera-mes {
    background: #101a2e;
}

[data-theme="dark"] .cal-cell.cal-fuera-mes .cal-num-dia {
    color: #46617f;
}

[data-theme="dark"] .cal-cell.cal-hoy {
    background: rgba(255, 102, 0, 0.08);
}

[data-theme="dark"] .cal-num-dia {
    color: #b6c8e0;
}

[data-theme="dark"] .cal-btn-add {
    color: #7f93af;
}

[data-theme="dark"] .cal-chip {
    background: #22304d;
    color: #b6c8e0;
}

[data-theme="dark"] .cal-chip:hover {
    background: #2e3f61;
    color: #eaf1fb;
}

[data-theme="dark"] .cal-agenda-dia {
    border-color: #22304d;
    background: #101a2c;
}

[data-theme="dark"] .cal-agenda-fecha {
    background: #16223a;
    border-bottom-color: #22304d;
    color: #7f93af;
}

[data-theme="dark"] .cal-agenda-fila {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .cal-agenda-fila.cal-fila-vencida {
    background: rgba(248, 113, 113, 0.08);
}

[data-theme="dark"] .cal-agenda-titulo {
    color: #eaf1fb;
}

[data-theme="dark"] .cal-lectura-desc {
    color: #7f93af;
    background: #16223a;
}

[data-theme="dark"] .cal-cell.cal-drop-target {
    background: rgba(255, 102, 0, 0.1) !important;
}

[data-theme="dark"] .cal-filtros .form-select,
[data-theme="dark"] .cal-filtros .form-control {
    background-color: #16223a;
    border-color: #22304d;
    color: #eaf1fb;
}

/* ===== CONTABILIDAD COBROS MODULE ===== */
[data-theme="dark"] .cobros-container {
    background: #070c18;
    color: #eaf1fb;
}

[data-theme="dark"] .cobros-container .card {
    border-color: #22304d;
}

[data-theme="dark"] .cobros-container .card-header {
    background-color: #2563eb !important;
}

[data-theme="dark"] .cobros-container .table tbody tr:hover {
    background-color: rgba(255,255,255,0.03) !important;
}

[data-theme="dark"] .cobros-container .form-group label {
    color: #b6c8e0;
}

[data-theme="dark"] .cobros-loading {
    border-color: #22304d;
}

[data-theme="dark"] .close {
    background-color: rgba(255,255,255,0.08);
    color: #7f93af;
}

[data-theme="dark"] .badge-pendiente {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

[data-theme="dark"] .badge-verificado {
    background-color: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .badge-aplicado {
    background-color: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
}

/* ===== RESERVAS MODULE ===== */
[data-theme="dark"] .table-responsive-custom {
    background-color: #101a2c;
}

[data-theme="dark"] .table-responsive-vertical tbody tr {
    background-color: #101a2c;
    border-color: #22304d;
}

[data-theme="dark"] .table-responsive-vertical tbody td::before {
    color: #7f93af;
}

[data-theme="dark"] .table-responsive-vertical tbody td {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .table-responsive-vertical tbody td:last-child {
    background-color: #16223a;
}

/* ===== CLIENTES RESERVAS MODULE ===== */
[data-theme="dark"] .card-custom {
    border-color: rgba(255, 102, 0, 0.2);
}

[data-theme="dark"] #modalHistorial .table th {
    background: #16223a;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 102, 0, 0.05) !important;
}

/* ===== CLIENTES / VEHICULOS / USUARIOS TABLE MODULES ===== */
[data-theme="dark"] .table-custom tr {
    border-color: #22304d;
    background-color: #101a2c;
}

[data-theme="dark"] .table-custom td {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .table-custom td::before {
    color: #7f93af;
}

[data-theme="dark"] .table-custom td.action-cell {
    background-color: #16223a;
}

[data-theme="dark"] textarea.form-control {
    min-height: 80px;
}

/* ===== DOCUMENTOS RESERVAS MODULE ===== */
[data-theme="dark"] .doc-card {
    border-color: #22304d;
    background: #101a2c;
}

[data-theme="dark"] .doc-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .doc-card .card-img-top {
    background: #16223a;
}

[data-theme="dark"] .doc-card .card-body {
    color: #eaf1fb;
}

[data-theme="dark"] .doc-card .card-footer {
    background: #16223a;
    border-top-color: #22304d;
}

/* ===== RH VACACIONES MODULE ===== */
[data-theme="dark"] .table-responsive {
    border-color: #22304d;
}

[data-theme="dark"] .font-monospace {
    color: #eaf1fb;
}

/* ===== ESTADISTICAS COBRO MODULE ===== */
[data-theme="dark"] .custom-card-dashboard {
    border-color: #22304d !important;
    background: #101a2c;
}

[data-theme="dark"] .table tbody tr.rango-verde {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .table tbody tr.rango-naranja {
    background-color: rgba(251, 191, 36, 0.15) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .table tbody tr.rango-rojo-claro {
    background-color: rgba(248, 113, 113, 0.15) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .table tbody tr.rango-rojo-fuego {
    background-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .table tbody tr.rango-rojo-amarillento {
    background-color: rgba(255, 128, 0, 0.2) !important;
    color: #fdba74 !important;
}

/* ===== LOGIN MODULE (already dark-ish, minor tweaks) ===== */
[data-theme="dark"] .login-page {
    background:
        radial-gradient(1100px 600px at 8% -10%, rgba(15, 52, 96, 0.85) 0%, transparent 60%),
        radial-gradient(900px 500px at 110% 115%, rgba(226, 87, 30, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, #0a0b12 0%, #0a1120 55%, #111328 100%);
}

[data-theme="dark"] .login-card {
    background: #101a2c;
}

[data-theme="dark"] .login-form-inner h2 {
    color: #eaf1fb;
}

[data-theme="dark"] .login-field input {
    background: #16223a;
    border-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .login-field input:focus {
    background: #1c2b47;
}

[data-theme="dark"] .login-error {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

/* ===== SCROLLBAR STYLING ===== */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #101a2c;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #22304d;
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #46617f;
}

[data-theme="dark"] * {
    scrollbar-width: thin;
    scrollbar-color: #22304d #101a2c;
}

/* ===== RESPONSIVE TABLES (shared across modules) ===== */
[data-theme="dark"] .table-responsive-vertical tbody td {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .table-responsive-vertical tbody tr {
    background-color: #101a2c;
}

[data-theme="dark"] .table-responsive-vertical tbody td:last-child {
    background-color: #16223a;
}

/* ===== DASHBOARD INLINE BAR FILLS (override inline background) ===== */
[data-theme="dark"] .bar-vertical-fill,
[data-theme="dark"] .bar-h-fill {
    filter: brightness(1.1);
}

/* ===== TRANSITIONS ===== */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .topbar,
[data-theme="dark"] .main-content,
[data-theme="dark"] .card,
[data-theme="dark"] .kanban-card,
[data-theme="dark"] .chat-container,
[data-theme="dark"] .cal-grid-wrapper {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ===== NOTIFICATIONS (DARK MODE) ===== */
[data-theme="dark"] .notif-trigger {
    border-color: #46617f;
    color: #7f93af;
}

[data-theme="dark"] .notif-trigger:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .notif-panel {
    background: #101a2c;
    border-color: #22304d;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

[data-theme="dark"] .notif-panel-header {
    border-bottom-color: #22304d;
    color: #eaf1fb;
}

[data-theme="dark"] .notif-mark-all {
    color: #60a5fa;
}

[data-theme="dark"] .notif-mark-all:hover {
    background: rgba(129, 140, 248, 0.15);
}

[data-theme="dark"] .notif-list::-webkit-scrollbar-thumb {
    background: #46617f;
}

[data-theme="dark"] .notif-empty {
    color: #7f93af;
}

[data-theme="dark"] .notif-item {
    border-bottom-color: #22304d;
}

[data-theme="dark"] .notif-item:hover {
    background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .notif-item-nueva {
    background: rgba(129, 140, 248, 0.08);
}

[data-theme="dark"] .notif-item-nueva:hover {
    background: rgba(129, 140, 248, 0.12);
}

[data-theme="dark"] .notif-item-icon {
    background: rgba(129, 140, 248, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .notif-item-titulo {
    color: #eaf1fb;
}

[data-theme="dark"] .notif-item-detalle {
    color: #7f93af;
}

[data-theme="dark"] .notif-item-fecha {
    color: #7f93af;
}

[data-theme="dark"] .notif-item-vencida {
    background: rgba(225, 29, 72, 0.10);
    border-left-color: #e11d48;
}

[data-theme="dark"] .notif-item-vencida:hover {
    background: rgba(225, 29, 72, 0.18);
}

[data-theme="dark"] .notif-item-vencida .notif-item-icon {
    background: rgba(225, 29, 72, 0.2);
    color: #fb7185;
}

[data-theme="dark"] .notif-item-vencida .notif-item-titulo {
    color: #fda4af;
}
