/* SIMAE - Custom Styles (Premium Aesthetic) */

/* Layout & General overrides */
body {
    background-color: #f8fafc !important;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Cards */
.card {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 24px !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.05) !important;
}

.card-header {
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 18px 24px !important;
}

.card-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.card-footer {
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    background-color: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 16px 24px !important;
}

/* Inputs & Forms */
.form-control, select.form-control {
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 10px 16px !important;
    height: auto !important;
    font-size: 0.95rem !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

.form-label, label {
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
    font-size: 0.9rem !important;
}

/* Buttons */
.btn {
    border-radius: 10px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-primary:active {
    transform: translateY(1px) !important;
}

.btn-secondary {
    background: #64748b !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: #475569 !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2) !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2) !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.3) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-light {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-light:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* Tables */
.table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100% !important;
}

.table tr {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.table tbody tr:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    background-color: #f8fafc !important;
}

.table th {
    border: none !important;
    padding: 12px 16px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    background-color: transparent !important;
}

.table td {
    border: none !important;
    padding: 16px !important;
    vertical-align: middle !important;
    color: #334155 !important;
}

.table tbody tr td:first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

.table tbody tr td:last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

/* Navigation Tabs Custom */
.nav-tabs-custom {
    border-bottom: 2px solid #e2e8f0 !important;
    gap: 8px !important;
}

.nav-tabs-custom .nav-link {
    border: none !important;
    color: #64748b !important;
    font-weight: 600 !important;
    padding: 14px 24px !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
}

.nav-tabs-custom .nav-link:hover {
    color: #4f46e5 !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

.nav-tabs-custom .nav-link.active {
    color: #4f46e5 !important;
    background: transparent !important;
}

.nav-tabs-custom .nav-link.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: #4f46e5 !important;
    border-radius: 3px 3px 0 0 !important;
}

/* Alerts */
.alert {
    border-radius: 12px !important;
    border: none !important;
    padding: 16px 20px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01) !important;
}

/* Reusable Premium Dashboard Header Card */
.simae-header-card {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border-radius: 16px !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

.simae-header-card h1, 
.simae-header-card h2, 
.simae-header-card h3, 
.simae-header-card h4, 
.simae-header-card h5 {
    color: white !important;
    font-weight: 700 !important;
}

.simae-header-card p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ==========================================================================
   NUEVOS ESTILOS PARA CONTROLES DE FORMULARIO PREMIUM (SELECT, CHECKBOX & SWITCH)
   ========================================================================== */

/* 1. SELECTS / DESPLEGABLES */
select:not([multiple]),
select.form-control:not([multiple]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px 14px !important;
    padding-right: 40px !important;
}

select:not([multiple]):focus,
select.form-control:not([multiple]):focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
}

select:not(.form-control) {
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 10px 16px !important;
    font-size: 0.95rem !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

select:not(.form-control):focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

/* 2. CHECKBOXES Y RADIOS NATIVOS / GENÉRICOS */
input[type="checkbox"]:not(.custom-control-input),
input[type="radio"]:not(.custom-control-input) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    outline: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    vertical-align: middle !important;
    position: relative !important;
    margin-top: -3px !important;
    margin-right: 8px !important;
    transition: all 0.2s ease !important;
}

input[type="checkbox"]:not(.custom-control-input) {
    border-radius: 5px !important;
}

input[type="radio"]:not(.custom-control-input) {
    border-radius: 50% !important;
}

/* Foco en elementos nativos */
input[type="checkbox"]:not(.custom-control-input):focus-visible,
input[type="radio"]:not(.custom-control-input):focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

/* Estados checkeados */
input[type="checkbox"]:not(.custom-control-input):checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 11px !important;
}

input[type="radio"]:not(.custom-control-input):checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 8px !important;
}

/* 3. CHECKBOXES Y RADIOS DE BOOTSTRAP (CUSTOM-CONTROL) */
.custom-control {
    min-height: 1.5rem !important;
    padding-left: 2rem !important;
    cursor: pointer !important;
}

.custom-control-label {
    cursor: pointer !important;
    user-select: none !important;
    margin-bottom: 0 !important;
    padding-top: 2px !important;
}

.custom-control-label::before {
    left: -2rem !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.custom-control-label::after {
    left: -2rem !important;
    width: 20px !important;
    height: 20px !important;
}

/* checked y focos */
.custom-control-input:checked ~ .custom-control-label::before {
    color: #ffffff !important;
    border-color: #6366f1 !important;
    background-color: #6366f1 !important;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

/* Checkbox de Bootstrap específico */
.custom-checkbox .custom-control-label::before {
    border-radius: 6px !important;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E") !important;
    background-size: 12px !important;
}

/* Radio de Bootstrap específico */
.custom-radio .custom-control-label::before {
    border-radius: 50% !important;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E") !important;
    background-size: 10px !important;
}

/* 4. INTERRUPTORES DE BOOTSTRAP (CUSTOM-SWITCH) */
.custom-switch {
    padding-left: 3.5rem !important;
}

.custom-switch .custom-control-label::before {
    left: -3.5rem !important;
    width: 44px !important;
    height: 24px !important;
    border-radius: 14px !important;
    background-color: #e2e8f0 !important;
    border: 2px solid #cbd5e1 !important;
}

.custom-switch .custom-control-label::after {
    left: calc(-3.5rem + 4px) !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background-color: #cbd5e1 !important;
    top: 6px !important;
    transition: transform 0.25s ease, background-color 0.25s ease !important;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(20px) !important;
    background-color: #ffffff !important;
}

/* 5. SELECT2 - BUSCADORES PERSONALIZADOS */
.select2-container--bootstrap4 .select2-selection,
.select2-container--default .select2-selection,
.select2-selection {
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    min-height: 42px !important;
    padding: 6px 12px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.select2-container--bootstrap4 .select2-selection--single,
.select2-container--default .select2-selection--single {
    height: 42px !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    color: #334155 !important;
    padding-left: 4px !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 8px !important;
    right: 12px !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--default.select2-container--focus .select2-selection,
.select2-container .select2-selection:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

/* Chips / Selección Múltiple en Select2 */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    color: #6366f1 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    margin-top: 2px !important;
    font-size: 0.9rem !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ef4444 !important;
    margin-right: 5px !important;
}

/* 6. ESTADOS DE INHABILITACIÓN */
select:disabled,
input:disabled,
.custom-control-input:disabled ~ .custom-control-label {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled,
.custom-control-input:disabled ~ .custom-control-label::before {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/* ==========================================================================
   DISEÑO MODERNO PREMIUM DEL MENÚ LATERAL (SIDEBAR) Y DE LA CABECERA (NAVBAR)
   ========================================================================== */

/* 1. CONTENEDOR DE LA BARRA LATERAL (SIDEBAR) */
.main-sidebar, 
.sidebar-dark-primary, 
.main-sidebar.sidebar-dark-primary {
    background-color: #0f172a !important; /* Slate muy oscuro, premium */
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Marca / Logotipo superior en sidebar */
.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #0f172a !important;
}

.brand-text {
    font-weight: 700 !important;
    color: #f8fafc !important;
    letter-spacing: 0.5px !important;
    font-size: 1.05rem !important;
}

.brand-image {
    max-height: 33px !important;
    margin-right: 12px !important;
}

/* 2. ÍTEMS DEL MENÚ (NAV LINK) */
.nav-sidebar .nav-item {
    margin: 4px 10px !important; /* Espaciado entre elementos */
}

.nav-sidebar .nav-link {
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: #94a3b8 !important; /* Gris suave, no contrastante */
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
}

/* Iconos de menú */
.nav-sidebar .nav-link i {
    font-size: 1.1rem !important;
    width: 28px !important;
    margin-right: 8px !important;
    color: #64748b !important;
    transition: color 0.2s ease !important;
}

/* Hover de links */
.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #f8fafc !important;
}

.nav-sidebar .nav-link:hover i {
    color: #a5b4fc !important; /* Tono indigo claro para el icono en hover */
}

/* Estado activo de links */
.nav-sidebar .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
}

.nav-sidebar .nav-link.active i {
    color: #ffffff !important;
}

/* Encabezados / Separadores de secciones */
.nav-sidebar .nav-header {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 18px 24px 8px !important;
}

/* Flechas desplegables de submenús */
.nav-sidebar .nav-link p i.right {
    margin-top: 2px !important;
    font-size: 0.8rem !important;
}

/* Submenús */
.nav-treeview {
    background-color: rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    padding: 4px 0 !important;
}

.nav-treeview .nav-item {
    margin: 2px 8px !important;
}

.nav-treeview .nav-link {
    padding-left: 20px !important;
    font-size: 0.88rem !important;
}

/* 3. CABECERA PRINCIPAL (NAVBAR SUPERIOR) */
.main-header.navbar {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01) !important;
    padding: 12px 18px !important;
}

.main-header.navbar .nav-link {
    color: #475569 !important;
    font-weight: 500 !important;
}

.main-header.navbar .nav-link:hover {
    color: #6366f1 !important;
}

.main-header.navbar .navbar-nav .nav-item .badge {
    top: 4px !important;
    right: 4px !important;
    padding: 3px 6px !important;
    font-size: 0.65rem !important;
}

/* 4. TARJETAS DE MÉTRICAS / WIDGETS (SMALL BOXES) */
.small-box {
    border-radius: 16px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.small-box:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1) !important;
}

.small-box .inner {
    padding: 20px 24px !important;
}

.small-box h3 {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

.small-box p {
    font-size: 0.95rem !important;
    opacity: 0.9 !important;
}

.small-box .icon {
    top: 15px !important;
    right: 20px !important;
    font-size: 60px !important;
    color: rgba(255, 255, 255, 0.15) !important;
    transition: transform 0.3s ease !important;
}

.small-box:hover .icon {
    transform: scale(1.1) rotate(5deg) !important;
}

.small-box-footer {
    background: rgba(0, 0, 0, 0.06) !important;
    padding: 8px 0 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.small-box-footer:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #ffffff !important;
}

/* Estilos para inputs Readonly y Disabled Globales */
.form-control[readonly],
.form-control:disabled {
    background-color: #f8fafc !important;
    opacity: 0.85 !important;
    color: #64748b !important;
}

/* 5. MODALES PREMIUM UNIFICADOS */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 20px 24px !important;
    background-color: #ffffff !important;
}

.modal-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 16px 24px !important;
    background-color: #f8fafc !important;
}

/* 6. DISEÑO MODERNO DE LA PÁGINA DE INGRESO (LOGIN) */
.login-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

.login-box {
    width: 400px !important;
}

.login-logo a {
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    letter-spacing: -0.5px !important;
}

.login-logo a b {
    color: #6366f1 !important;
    font-weight: 900 !important;
}

.login-card-body {
    border-radius: 16px !important;
    padding: 32px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 16px -6px rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    background-color: #ffffff !important;
}

.login-box-msg {
    color: #64748b !important;
    font-size: 0.95rem !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
}

/* Entradas transparentes y unificadas en grupos de inputs */
.input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    border-radius: 10px !important;
}

.input-group .form-control {
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    box-shadow: none !important;
}

.input-group .input-group-append .input-group-text {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    color: #64748b !important;
    transition: border-color 0.2s ease !important;
}

.input-group .input-group-append .input-group-text:last-child {
    border-right: 1px solid #cbd5e1 !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

/* Sincronización del estado de foco */
.input-group:focus-within .form-control {
    border-color: #6366f1 !important;
}

.input-group:focus-within .input-group-append .input-group-text {
    border-color: #6366f1 !important;
}

/* Enlaces del Login */
.login-card-body a {
    color: #6366f1 !important;
    font-weight: 600 !important;
    transition: color 0.2s ease !important;
}

.login-card-body a:hover {
    color: #4f46e5 !important;
    text-decoration: none !important;
}

/* 7. REFACTORIZACIÓN DE MENÚS DESPLEGABLES (DROPDOWNS) */
.dropdown-menu {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 8px 0 !important;
    overflow: hidden !important;
}

.dropdown-item {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    color: #475569 !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #6366f1 !important;
}

.dropdown-header {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #64748b !important;
    padding: 12px 20px !important;
}

.dropdown-divider {
    margin: 4px 0 !important;
    border-color: #f1f5f9 !important;
}

/* 8. DETALLES ADICIONALES DE SIDEBAR (ROTACIÓN DE FLECHAS Y TRANSICIONES) */
.nav-sidebar .menu-is-opening > .nav-link i.right,
.nav-sidebar .menu-open > .nav-link i.right {
    transform: rotate(-90deg) !important;
    transition: transform 0.25s ease !important;
}

.nav-sidebar .nav-link i.right {
    transition: transform 0.25s ease !important;
}

/* 9. MAQUETADO DE PIE DE PÁGINA (FOOTER) */
.main-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 16px 24px !important;
    color: #64748b !important;
    font-size: 0.85rem !important;
}

.main-footer a {
    color: #6366f1 !important;
    font-weight: 600 !important;
    transition: color 0.2s ease !important;
}

.main-footer a:hover {
    color: #4f46e5 !important;
    text-decoration: none !important;
}
