/* Asegurar que el body cambie de color según el tema */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="light"] body {
    background-color: #f8f9fa !important;
    color: #212529;
}

[data-bs-theme="dark"] body {
    background-color: #212529 !important;
    color: #dee2e6;
}

    /* CORRECCIÓN: Tab Content y Tab Panes */
    [data-bs-theme="dark"] body .tab-content {
        background-color: #2b3035;
        color: #dee2e6;
    }

    [data-bs-theme="dark"] body .tab-pane {
        background-color: #2b3035;
        color: #dee2e6;
    }

    /* Cards en dark mode */
    [data-bs-theme="dark"] body .card {
        background-color: #343a40;
        border-color: #495057;
        color: #dee2e6;
    }

    [data-bs-theme="dark"] body .card-body {
        background-color: #343a40;
        color: #dee2e6;
    }

    /* Tablas en dark mode */
    [data-bs-theme="dark"] body .calc-table thead th {
        background: #2b3035 !important;
        color: #dee2e6 !important;
    }

    /* Form controls en dark mode */
    [data-bs-theme="dark"] body .form-control {
        background-color: #343a40;
        border-color: #495057;
        color: #dee2e6;
    }

        [data-bs-theme="dark"] body .form-control:focus {
            background-color: #343a40;
            border-color: #0d6efd;
            color: #dee2e6;
        }

    /* Alert en dark mode */
    [data-bs-theme="dark"] body .alert-secondary {
        background-color: #495057;
        border-color: #6c757d;
        color: #dee2e6;
    }

/* Texto de explicación en tabs */
.explanation-text {
    background-color: #f8f9fa;
    color: #212529;
}

[data-bs-theme="dark"] body .explanation-text {
    background-color: #1a1d20;
    color: #dee2e6;
}

/* Borde interno verde fuerte + color de fuente para no-activos success en dark */
[data-bs-theme="dark"] body .nav-link.bg-success-subtle:not(.active),
[data-bs-theme="dark"] body .nav-link.bg-success:not(.active),
[data-bs-theme="dark"] body .alert.alert-success { /* agregado el alert-succes */
    box-shadow: inset 0 0 0 1px var(--bs-success) !important;
    color: var(--bs-success-text-emphasis) !important;
}

/* Borde interno rojo fuerte + color de fuente para no-activos danger en dark */
[data-bs-theme="dark"] body .nav-link.bg-danger-subtle:not(.active),
[data-bs-theme="dark"] body .nav-link.bg-danger:not(.active) {
    box-shadow: inset 0 0 0 1px var(--bs-danger) !important;
    color: var(--bs-danger-text-emphasis) !important;
}

[data-bs-theme="dark"] .custom-card-hover:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

/* Minimalist fix for list-groups in dark mode */
[data-bs-theme="dark"] body .list-group-item {
    background-color: transparent;
    color: #dee2e6;
    border-color: #495057;
}
[data-bs-theme="dark"] body .list-group-item:hover,
[data-bs-theme="dark"] body .list-group-item:focus {
    background-color: rgba(255, 255, 255, 0.05);
}
[data-bs-theme="dark"] body .list-group-item.text-primary {
    color: #6ea8fe !important;
}