:root {
    --primary-color: #1947b8;
    --primary-gradient: linear-gradient(180deg, #112240 0%, #070d19 100%);
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #070d19;
    --sidebar-bg: #112240;
    --text-color: #1f2937;
    --light-bg: #f8fafc;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.02), 0 4px 6px -2px rgba(0, 0, 0, 0.01), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .sidebar-heading, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

#wrapper {
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin .25s ease-out;
    background: var(--primary-gradient) !important;
    width: 15rem;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.25rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.12);
}

#sidebar-wrapper .list-group {
    width: 15rem;
    padding: 0.5rem 0;
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

.list-group-item-dark {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin: 2px 0 2px 8px;
    border-radius: 6px 0 0 6px;
    transition: all 0.2s ease-in-out;
}

.list-group-item-dark:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    transform: translateX(2px);
}

.list-group-item-dark.active {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    font-weight: 600;
    border-left: 3px solid #3b82f6 !important;
    box-shadow: none;
}

.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(20, 43, 187, 0.15);
}

.btn-primary:hover {
    background-color: #0d1e8c;
    border-color: #0d1e8c;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(20, 43, 187, 0.25);
}

/* ============================================================
   SELECT2 / DAL - Ocultar el <select> nativo correctamente
   ============================================================ */

/* Fuerza ocultamiento del select nativo cuando Select2 ya lo inicializó */
select.select2-hidden-accessible {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Asegura que el contenedor Select2 ocupa el ancho completo */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* === Estilo Bootstrap 5 para los controles Select2 === */
.select2-container--bootstrap-5 .select2-selection,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

/* Texto seleccionado dentro del control */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529 !important;
    line-height: 1.5 !important;
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

/* Flecha del dropdown */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0.5rem !important;
}

/* Dropdown list */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #4a6cf7 !important;
    color: #fff !important;
}

/* Hover en opciones */
.select2-results__option {
    padding: 0.375rem 0.75rem !important;
}

/* Caja de búsqueda dentro del dropdown */
.select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.9rem !important;
}

/* Placeholder color */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
}