/**
 * Oxford Chetumal - Estilos personalizados
 */

/* Loader - icono Oxford (corona sobre la O) */
.loader-wrapper .loader-index {
    filter: none;
}

.loader-wrapper .loader-index .loader-icon {
    width: 64px;
    height: auto;
    animation: loader-pulse 1.2s ease-in-out infinite;
}

.loader-wrapper .loader-index .for-dark {
    display: none;
}

body.dark-only .loader-wrapper .loader-index .for-light {
    display: none;
}

body.dark-only .loader-wrapper .loader-index .for-dark {
    display: block;
}

.loader-wrapper .loader-index span,
.loader-wrapper .loader-index::after {
    display: none !important;
}

@keyframes loader-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Tema dark mode */
body.dark-only {
    --theme-default: #4595d7;
    --rgb-primary: rgb(69, 149, 215);
    --primary-70: rgba(69, 149, 215, 0.7);
}

/* Login en dark: fondo sólido Oxford (#153855), sin imagen ni blend */
body.dark-only .login-card.login-dark {
    background-color: #032643 !important;
    background-image: none !important;
    background-blend-mode: normal !important;
}

/* Botones outline en dark mode - usar colores Oxford para buena visibilidad */
body.dark-only .btn-outline-primary {
    border-color: var(--theme-default);
    color: var(--theme-default);
}

body.dark-only .btn-outline-primary:hover {
    background-color: var(--theme-default);
    border-color: var(--theme-default);
    color: #fff;
}

body.dark-only .btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
}

body.dark-only .btn-outline-danger:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

body.dark-only .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content>li .sidebar-link.active {
    background-color: rgb(255 255 255 / 5%);
}

/* Correcciones inscripciones - barra alumno seleccionado: legible en light y dark */
.enrollment-tools-student-bar {
    color: #212529;
}
.enrollment-tools-student-bar .enrollment-tools-student-meta {
    color: #6c757d;
}
body.dark-only .enrollment-tools-student-bar {
    color: rgba(255, 255, 255, 0.9);
}
body.dark-only .enrollment-tools-student-bar .enrollment-tools-student-meta {
    color: rgba(255, 255, 255, 0.65);
}

/* Perfil alumno - hero con gradiente */
.student-profile-hero {
    border: none;
    overflow: hidden;
}
.student-profile-hero-body {
    background: linear-gradient(135deg, #133b64 0%, #1a5a8f 50%, #2a7ab8 100%);
    padding: 1.5rem 1.75rem;
}
.student-profile-hero .student-avatar-initials {
    width: 72px;
    height: 72px;
    min-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #133b64;
    border: white solid 2px;
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
}
body.dark-only .student-profile-hero-body {
    background: linear-gradient(315deg, #1a5a8f 0%, #133b64 100%);
}
.student-profile-hero .btn-outline-light {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.9);
}
.student-profile-hero .btn-outline-light:hover {
    color: #133b64 !important;
    background-color: #fff;
    border-color: #fff;
}
body.dark-only .student-profile-hero .btn-outline-light {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
}
body.dark-only .student-profile-hero .btn-outline-light:hover {
    color: #133b64 !important;
    background-color: #fff !important;
    border: 1px solid #fff !important;
}

/* Badges de grupos en el hero del perfil */
.student-profile-hero .badge-light-groups {
    background-color: rgba(255, 255, 255, 0.9);
    color: #133b64;
    font-weight: 500;
}

/* Indicador de estado (círculo verde/rojo) junto al nombre */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot-success {
    background-color: #22c55e;
}
.status-dot-danger {
    background-color: #ef4444;
}

/* Notification slider: solo en pantallas grandes, oculto cuando el menú está colapsado */
.left-header {
    display: none !important;
}

/* Evitar que al redimensionar se muestren todas las noticias: siempre solo una línea visible */
.left-header .notification-slider,
.left-header .notification-slider .slick-list {
    overflow: hidden !important;
    max-height: 2.25rem;
}
.left-header .notification-slider {
    height: 2.25rem;
}

@media (min-width: 1201px) {
    .left-header {
        display: block !important;
    }

    .page-header.close_icon .left-header {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 24px 16px;
    }

    .login-card > div {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .login-card .logo {
        margin-bottom: 24px;
    }

    .login-card .logo img {
        max-height: 80px;
        width: auto;
    }

    .login-main {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 24px 20px !important;
    }

    .login-main .theme-form h4 {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .login-main .theme-form p {
        margin-bottom: 20px;
    }

    .login-main .theme-form .form-group.mb-0 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .login-main .theme-form .form-group.mb-0 .form-check {
        margin-bottom: 0;
    }

    .login-main .theme-form .form-group.mb-0 .link {
        position: relative !important;
        margin-left: auto;
        font-size: 0.875rem;
    }

    .login-main .theme-form .form-group.mb-0 .text-end {
        width: 100%;
        margin-top: 16px;
    }

    .login-main .theme-form .form-group.mb-0 .btn {
        padding: 12px 16px;
    }
}

/* Profile avatar - alineación y dimensiones */
.edit-profile .profile-title .d-flex {
    align-items: center;
}

.edit-profile .profile-title .img-70,
.edit-profile .profile-title .profile-avatar {
    width: 70px;
    height: 70px;
    min-width: 70px;
    flex-shrink: 0;
}

.edit-profile .profile-title .profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-default, #7366ff);
    color: white;
    font-size: 1.75rem;
    border-radius: 50%;
}

/* Enlaces: subrayado al pasar el mouse (estilo tradicional) */
a.link-hover-underline {
    text-decoration: none;
}
a.link-hover-underline:hover {
    text-decoration: underline;
}

/* Profile dropdown: solo al hacer clic, no al pasar el mouse */
.profile-dropdown-click-only:hover .onhover-show-div {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
}
.profile-dropdown-click-only .onhover-show-div.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}
.profile-dropdown-click-only .onhover-show-div.active::before {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--white, #fff);
    content: "";
    top: -7px;
    position: absolute;
    left: 10px;
    z-index: 2;
}
.profile-dropdown-click-only .onhover-show-div.active::after {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--white, #fff);
    content: "";
    top: -7px;
    position: absolute;
    left: 10px;
    z-index: 1;
}
body.dark-only .profile-dropdown-click-only .onhover-show-div.active {
    background-color: var(--dark-body-background);
    box-shadow: 0 0 14px var(--dark-body-background);
}
body.dark-only .profile-dropdown-click-only .onhover-show-div.active::before,
body.dark-only .profile-dropdown-click-only .onhover-show-div.active::after {
    border-bottom-color: var(--dark-body-background);
}

/* Alertas dark del template Cuba: texto claro sobre fondo sólido */
.alert.dark .txt-light,
.alert.dark p.txt-light,
.alert.dark ul.txt-light,
.alert.dark li {
    color: #fff !important;
}

/* Dark mode: texto visible en inputs y textareas (modal cancelar cargo, etc.) */
body.dark-only .form-control,
body.dark-only textarea.form-control,
body.dark-only .form-select {
    color: #fff !important;
}
body.dark-only .form-control::placeholder,
body.dark-only textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Checkboxes de la tabla de cargos (bulk actions): más visibles en light mode */
#chargesTable .form-check-input {
    border-width: 2px;
    border-color: #495057;
    width: 1em;
    height: 1em;
}
#chargesTable .form-check-input:checked {
    border-color: var(--theme-default);
    background-color: var(--theme-default);
}
.activity-dot-primary {
    background-color: var(--theme-default);
    outline: 5px solid rgba(19,59,100,0.25);
}
/* code: negro en light mode, blanco en dark mode */
code {
    color: #404040 !important;
}
body.dark-only code {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Popover del dashboard (info ingresos esperados vs cobrados): adaptar a dark mode */
body.dark-only .popover {
    background-color: #1d1e26;
    border-color: rgba(255, 255, 255, 0.1);
}
body.dark-only .popover .popover-header {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--body-font-color);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.dark-only .popover .popover-body {
    background-color: #1d1e26;
    color: var(--body-font-color);
}
body.dark-only .popover .popover-arrow::before {
    border-bottom-color: #1d1e26;
    border-top-color: #1d1e26;
}
body.dark-only .popover .popover-arrow::after {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.08);
}