/* 
 * Sistema de Gestión Escolar - Estilos Centralizados
 * Adaptado del Sistema SSE existente
 */

/* ===== VARIABLES CSS ===== */

@font-face {
    font-family: "Raleway";
    src: url("../fuentes/Raleway-Regular.woff") format("woff"),
        url("../fuentes/Raleway-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Raleway-bolder";
    src: url("../fuentes/Raleway-Bold.woff") format("woff"),
        url("../fuentes/Raleway-Bold.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Raleway-bold";
    src: url("../fuentes/Raleway-SemiBold.woff") format("woff"),
        url("../fuentes/Raleway-SemiBold.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Raleway-semibold";
    src: url("../fuentes/Raleway-Medium.woff") format("woff"),
        url("../fuentes/Raleway-Medium.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Raleway-thin";
    src: url("../fuentes/Raleway-Thin.woff") format("woff"),
        url("../fuentes/Raleway-Thin.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

.fw-bolder {
    font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
}

.fw-bold {
    font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
}

.fw-semibold {
    font-family: "Raleway-semibold", Arial, Helvetica, sans-serif !important;
}


* {
    font-family: "Raleway", Arial, Helvetica, sans-serif !important;
}

* {
    transition: all 0.2s ease-in-out;
}



:root {
    --primary-gradient: linear-gradient(135deg, #03155c 0%, #051e80 100%);
    --secondary-gradient: linear-gradient(135deg, #6c757d 0%, #8d98a3 100%);
    --success-gradient: linear-gradient(135deg, #198754 0%, #20ad6b 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #ffd107 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #ff3d43 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #1bc3de 100%);
    --dark-gradient: linear-gradient(135deg, #020d3aff 0%, #031560 100%);

    --primary-gradient-blur: linear-gradient(135deg, rgb(3, 21, 92, 0.9) 0%, rgb(5, 30, 128, 0.9) 100%);
    --secondary-gradient-blur: linear-gradient(135deg, rgb(108, 117, 125, 0.9) 0%, rgb(141, 152, 163, 0.9) 100%);
    --success-gradient-blur: linear-gradient(135deg, rgb(25, 135, 84, 0.9) 0%, rgb(32, 173, 107, 0.9) 100%);
    --warning-gradient-blur: linear-gradient(135deg, rgb(255, 193, 7, 0.9) 0%, rgb(255, 209, 7, 0.9) 100%);
    --danger-gradient-blur: linear-gradient(135deg, rgb(220, 53, 69, 0.9) 0%, rgb(255, 61, 67, 0.9) 100%);
    --info-gradient-blur: linear-gradient(135deg, rgb(23, 162, 184, 0.9) 0%, rgb(27, 195, 222, 0.9) 100%);
    --dark-gradient-blur: linear-gradient(135deg, rgb(2, 13, 58, 0.9) 0%, rgb(3, 21, 96, 0.9) 100%);


    --primary-color: #0627a9;
    --secondary-color: #ffd700;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    --border-radius: 15px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-l: 0 3px 10px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.25s ease-in-out;
}

.text-primary {
    color: #0627a9 !important;
}


/* ===== ESTILOS GENERALES ===== */

.form-control,
.form-select,
.form-check-input,
.form-check,
.border,
.form-control-sm,
.stats {
    border-radius: 0.65rem !important;
}

.input-group {

    .form-control,
    .form-select,
    .form-check-input,
    .form-check,
    .border,
    .form-control-sm {
        border-radius: 0 0.65rem 0.65rem 0 !important;
    }

}

.input-group-text {
    background-color: #ebebeb !important;
    color: #0627a9 !important;
    border-radius: 0.65rem 0 0 0.65rem !important;

}


input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
.input-group-text,
.form-control,
.form-select,
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
input[type="range"],
input[type="color"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
input[type="week"],
textarea,
.marcado-next,
.marcado-prev,
.border {
    border: #0627a9 1px solid !important;
    border-bottom: #0627a9 0.18rem solid !important;
    box-shadow: var(--box-shadow-l) !important;
    cursor: pointer !important;

}

.btn-sm {
    padding: 0.55rem !important;
}

.btn-group .btn:not(.no-custom-border) {
    box-shadow: var(--box-shadow) !important;
    border-bottom: 0.18rem solid !important;
}

.btn-group .btn:hover {
    box-shadow: var(--box-shadow-hover) !important;
}

.btn-group .btn-outline-info {
    border-radius: 0.65rem 0 0 0.65rem !important;
}

.btn-group .btn-outline-danger {
    border-radius: 0 0.65rem 0.65rem 0 !important;
}

.btn-sm:hover {
    box-shadow: var(--box-shadow-hover) !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
}

body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
    padding-top: 4.65rem !important;
    /* Espacio para el navbar Fixed */
}

.modal-title {
    font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
}

.img-thumbnail {
    border: #d1d1d1 1.5px solid !important;
    box-shadow: var(--box-shadow-l) !important;
    border-bottom: #d1d1d1 3px solid !important;
    margin-bottom: 1rem !important;
}

.img-thumbnail:hover {
    box-shadow: var(--box-shadow) !important;
    transform: scale(1.3) translateY(-1px) !important;


}

.bg-primary,
.btn-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: var(--box-shadow);

}

.bg-primary:not(.no-custom-border),
.btn-primary:not(.no-custom-border) {
    border-radius: var(--border-radius) !important;

}

.btn-primary {
    background: var(--primary-gradient);
    border: #ffffff 1px solid !important;
    padding: 8px 16px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(6, 39, 169, 0.5) !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 15px rgba(6, 39, 169, 0.75) !important;
}

.btn-outline-primary {
    color: #0627a9 !important;
    border-color: #0627a9 !important;
    border-bottom: #0627a9 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(6, 39, 169, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(6, 39, 169, 0.15) !important;
    background: #0627a9 !important;
    color: white !important;
}

.bg-success,
.btn-success {
    background: var(--success-gradient) !important;
    color: white !important;
    box-shadow: var(--box-shadow);
}

.btn-success {
    background: var(--success-gradient);
    border: #ffffff 1px solid !important;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.5) !important;
    border-bottom: #ffffff 0.18rem solid !important;

}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 15px rgba(40, 167, 69, 0.75) !important;
}


.bg-success:not(.no-custom-border),
.btn-success:not(.no-custom-border) {
    background: var(--success-gradient) !important;
    color: white !important;

    border-radius: var(--border-radius) !important;
}

.btn-outline-success {
    color: rgba(40, 167, 69, 1) !important;
    border-color: rgba(40, 167, 69, 1) !important;
    border-bottom: rgba(40, 167, 69, 1) 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(40, 167, 69, 0.15) !important;
    background: rgba(40, 167, 69, 1) !important;
    color: white !important;
}

.bg-warning,
.btn-warning {
    background: var(--warning-gradient) !important;
    color: white !important;
    box-shadow: var(--box-shadow) !important;

}

.bg-warning:not(.no-custom-border),
.btn-warning:not(.no-custom-border) {

    border-radius: var(--border-radius) !important;
}

.btn-warning {
    background: var(--warning-gradient);
    border: #ffffff 1px solid !important;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.5) !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.75) !important;
}

.btn-outline-warning {
    color: rgba(255, 193, 7, 1) !important;
    border-color: rgba(255, 193, 7, 1) !important;
    border-bottom: rgba(255, 193, 7, 1) 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(255, 193, 7, 0.15) !important;
    background: rgba(255, 193, 7, 1) !important;
    color: white !important;
}

.bg-danger,
.btn-danger {
    background: var(--danger-gradient) !important;
    color: white !important;

}

.bg-danger:not(.no-custom-border),
.btn-danger:not(.no-custom-border) {
    border-radius: var(--border-radius) !important;
}


.btn-danger {
    background: var(--danger-gradient);
    border: #ffffff 1px solid !important;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(220, 53, 69, 0.5) !important;
    border-bottom: #ffffff 0.18rem solid !important;

}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 15px rgba(220, 53, 69, 0.75) !important;
}

.btn-outline-danger {
    color: rgba(220, 53, 69, 1) !important;
    border-color: rgba(220, 53, 69, 1) !important;
    border-bottom: rgba(220, 53, 69, 1) 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(220, 53, 69, 0.15) !important;
    background: rgba(220, 53, 69, 1) !important;
    color: white !important;
}

.bg-info,
.btn-info {
    color: white !important;
    background: var(--info-gradient) !important;

}

.bg-info:not(.no-custom-border),
.btn-info:not(.no-custom-border) {

    border-radius: var(--border-radius) !important;
}

.btn-info {
    background: var(--info-gradient);
    border: #ffffff 1px solid !important;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(23, 162, 184, 0.5) !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 15px rgba(23, 162, 184, 0.75) !important;
}

.btn-outline-info {
    color: rgba(23, 162, 184, 1) !important;
    border-color: rgba(23, 162, 184, 1) !important;
    border-bottom: rgba(23, 162, 184, 1) 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(23, 162, 184, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(23, 162, 184, 0.15) !important;
    background: rgba(23, 162, 184, 1) !important;
    color: white !important;
}

.bg-secondary,
.btn-secondary {
    background: var(--secondary-gradient) !important;
    color: white !important;
}

.bg-secondary:not(.no-custom-border),
.btn-secondary:not(.no-custom-border) {

    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius) !important;
}

.btn-secondary {
    padding: 6px 14px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 0px 15px rgba(108, 117, 125, 0.5) !important;
    border: #ffffff 1px solid !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 15px rgba(108, 117, 125, 0.75) !important;
}

.btn-outline-secondary {
    color: rgba(108, 117, 125, 1) !important;
    border-color: rgba(108, 117, 125, 1) !important;
    border-bottom: rgba(108, 117, 125, 1) 0.18rem solid !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.30) !important;
    border-radius: 0.65rem;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 12px rgba(108, 117, 125, 0.15) !important;
    background: rgba(108, 117, 125, 1) !important;
    color: white !important;
}

.btn-hover {
    box-shadow: var(--box-shadow-hover) !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
}

.modal-header.bg-primary,
.modal-header.bg-secondary,
.modal-header.bg-success,
.modal-header.bg-warning,
.modal-header.bg-danger,
.modal-header.bg-info,
.modal-header.bg-light,
.modal-header.bg-dark {
    border-radius: 0px !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.alert {
    border-radius: 1rem !important;
}

.page-link {
    border: #0627a9ad 1px solid !important;
    border-bottom: #0627a9 0.18rem solid !important;
    cursor: pointer !important;
    color: #021252 !important;
}

.page-link:hover {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    transform: translateY(-1px) !important;
}

.page-item.active .page-link {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
    color: #ffc107 !important;
    background-color: #0627a9 !important;
}

.asistencia-cell.no-custom-border {
    border: #0627a999 0.5px dashed !important;
}

@media (min-width: 990px) {
    .nav-tabs {

        color: #04196b !important;
        border-top: rgb(218, 218, 218) 1px solid !important;
        border-left: rgb(218, 218, 218) 1px solid !important;
        border-right: rgb(218, 218, 218) 1px solid !important;
        background-color: white !important;
        border-radius: 0.75rem !important;
        z-index: 1 !important;
        box-shadow: 0 -3px 10px 2px hsla(0, 0%, 0%, 0.065) !important;
    }

    .nav-tabs .nav-link {
        font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
        color: #04196b !important;
        border-radius: 0rem !important;
        border-color: rgba(255, 255, 255, 0) !important;
        border-bottom: #0627a9 0.18rem solid !important;
        border-left: #dfdfdf 1px solid !important;



    }

    .nav-tabs .nav-item .nav-link.active {
        z-index: 11 !important;
        background-color: #f8f9fa !important;
        color: #0627a9 !important;
        font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
        border-top: 2px solid #0627a9 !important;
        border-left: 2px solid #0627a9 !important;
        border-right: 2px solid #0627a9 !important;
        border-bottom: 2px solid #f8f9fa !important;
        border-radius: 0.75rem 0.75rem 0 0 !important;
    }


    .nav-tabs .nav-item .nav-link:hover {
        border: 2px solid #ffd900c5 !important;
        transform: translateY(-1px) !important;
        color: #0627a9 !important;
        border-radius: 0.75rem !important;
        border-radius: 0.75rem 0.75rem 0 0 !important;
    }
}

@media (max-width: 990px) {
    .nav-tabs {

        color: #04196b !important;
        border-top: rgb(218, 218, 218) 1px solid !important;
        border-left: rgb(218, 218, 218) 1px solid !important;
        border-right: rgb(218, 218, 218) 1px solid !important;
        border-bottom: #0627a9 3px solid !important;
        background-color: white !important;
        border-radius: 0.75rem !important;
        z-index: 1 !important;
        box-shadow: var(--box-shadow);
    }

    .nav-tabs .nav-link {
        font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
        color: #04196b !important;
        border-radius: 0.25rem !important;
        border: hsla(0, 0%, 87%, 0.5) 0.18rem solid !important;



    }

    .nav-tabs .nav-item .nav-link.active {
        z-index: 11 !important;
        background-color: #f8f9fa !important;
        color: #0627a9 !important;
        font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
        border: 2px solid #0627a9 !important;
        border-radius: 0.75rem !important;
    }


    .nav-tabs .nav-item .nav-link:hover {
        border: 2px solid #ffd900c5 !important;
        transform: translateY(-1px) !important;
        color: #0627a9 !important;
        border-radius: 0.75rem !important;
    }
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-3px);
}


.clickable-alert {
    cursor: pointer;
    border: #0627a9 1px solid !important;
}

.clickable-alert:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-3px);
}




.estudiante-success {
    background: var(--success-gradient);
}


.card:not(.no-custom-border) {
    border: #0627a9 0.5px solid;
    border-bottom: #0627a9 0.18rem solid !important;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

.card-header {
    border-radius: var(--border-radius);
}

.card-footer {
    border-radius: 0 0 0.9rem 0.9rem !important;
}

.list-group-item:first-of-type {
    border-radius: 0.9rem 0.9rem 0 0 !important;
}

.list-group-item:last-of-type {
    border-radius: 0 0 0.9rem 0.9rem !important;
}

.card-body {
    border-radius: var(--border-radius);
}

.table-dark {
    background: linear-gradient(135deg, #020d3aff 0%, #031560 100%);
    color: white;
}


/* ===== NAVBAR PERSONALIZADO ===== */
@keyframes navbarSlideOut {
    0% {
        transform: translateY(0rem);
        opacity: 1;
    }

    100% {
        transform: translateY(-5rem);
        opacity: 0;
    }
}

@keyframes navbarSlideIn {
    0% {
        transform: translateY(-5rem);
        opacity: 0;
    }

    100% {
        transform: translateY(0rem);
        opacity: 1;
    }
}

@keyframes navbarItemsSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-18px);
    }
}

@keyframes navbarItemsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 3. BARRA DE NAVEGACIÓN DINÁMICA (CONSOLIDADO) ===== */
.navbar-custom {
    background: linear-gradient(90deg, rgba(3, 18, 77, 0.85) 0%, rgba(4, 26, 110, 0.85) 100%) !important;
    backdrop-filter: blur(0.5rem) !important;
    -webkit-backdrop-filter: blur(0.5rem) !important;
    max-height: 4.65rem;
    min-height: 4.6rem;
    border-radius: 0rem !important;
    margin: 0rem !important;
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1030 !important;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
    display: flex;
    align-items: center;
    padding: 0.5rem 0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
    border-bottom: 2px solid rgb(255, 255, 255, 0.5) !important;
}

/* Estado: Al inicio de la página */
.navbar-initial {
    top: 0 !important;
    opacity: 1 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;

}

/* Estado: Scroll hacia arriba (Mostrar) */
.navbar-show {
    top: 0 !important;
    opacity: 1 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}

/* Estado: Scroll hacia abajo (Ocultar) */
.navbar-hide {
    top: -100px !important;
    opacity: 0 !important;
    pointer-events: none;
    /* No clickable while hidden */
}

/* Ajustes adicionales para elementos internos */
.navbar-custom .navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
}

.navbar-custom .navbar-toggler {
    border: none;
    color: white;
}

@media (min-width: 992px) {

    /* Asegurar que el botón del perfil esté por encima de otros elementos */
    .navbar-custom button[data-bs-toggle="modal"] {
        position: relative;
        z-index: 1050;
    }

    /* Asegurar que el contenedor del perfil esté por encima de la navegación fija */
    .navbar-custom .d-flex.align-items-center.order-lg-2 {
        position: relative;
        z-index: 1051;
        height: 100%;
        max-height: 3.75rem;
        display: flex;
        align-self: center;

    }


}

@media (max-width: 576px) {
    .info-usuario {
        height: 100%;
        max-height: 3.75rem;
        display: flex;
        align-self: center;
        margin-top: 0.65rem;
    }


}

@media (max-width: 1260px) and (min-width: 992px) {
    .nav-custom-item {
        font-size: 0.85rem !important;
        text-align: center;


    }

    .nav-custom {
        max-height: 4rem;
        min-height: 3.75rem;
    }

    .info-usuario {
        font-size: 0.5rem !important;
    }

    .info-usuario-nombre {
        font-size: 0.75rem !important;
    }

}


.navbar-custom .navbar-toggler {
    border: none;
    color: white;
}


.navbar-custom .navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
}


.navbar-custom .navbar-brand:hover {
    transform: translateY(-2px);
    text-shadow: 0 0px 10px rgba(255, 215, 0, 0.75) !important;
}

.navbar-custom .nav-perfil:hover {
    transform: translateY(-2px);
    text-shadow: 0 0px 10px rgba(255, 215, 0, 0.75) !important;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 1) !important;
    transition: var(--transition);
    border-radius: 0.85rem;
    padding-bottom: 0.4rem;
}

.offcanvas-body .nav-link {
    color: rgba(255, 255, 255, 1) !important;
    transition: var(--transition);
    border-radius: 0.5rem;
}

.offcanvas-body .nav-link .bi {
    margin-left: 0.5rem;
}

.navbar-custom .nav-link.active,
.offcanvas-body .nav-link.active {
    font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700 !important;
    border-radius: 0.85rem;
    padding-bottom: 0.3rem;
    border: 0.04rem solid rgb(147, 157, 188, 0.75) !important;
    border-bottom: 0.2rem solid rgb(147, 157, 188, 0.75) !important;
}




.navbar-custom .nav-link:hover,
.offcanvas-body .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700 !important;
    border-radius: 0.85rem;
    transform: translateY(-2px);
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.75) !important;
}

.footer-link:hover {
    color: #ffd700 !important;
    transform: translateY(-2px) scale(1.05) !important;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.75) !important;
}

/* ===== TARJETAS DEL DASHBOARD ===== */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* ===== TARJETAS DE ESTADÍSTICAS ===== */
.stat-card {
    border: #0627a9 0.5px solid;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    margin-bottom: 10px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.stat-number {
    font-size: 2rem;
    font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== TARJETAS DE FUNCIONALIDADES ===== */
.feature-card {
    border: #0627a9 1px solid;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}



.feature-card a {
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.feature-card:hover {
    color: #ffd700 !important;
    transform: translateY(-2px) scale(1.05) !important;
    text-shadow: 0 0px 10px #ffd700 !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===== CONTENEDORES DE ESCANEO ===== */
.scanner-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.estudiante-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

/* ===== FORMULARIOS ===== */
.form-control {
    border-radius: 8px;
    border: 1px solid #5c6fbe;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #5c6fbe;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===== BOTONES ===== */
.btn-login {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}










.btn-light {
    background: var(--light-gradient);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

.btn-dark {
    background: var(--dark-gradient);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 52, 52, 0.4);
}


/* ===== INPUTS ESPECIALES ===== */
.qr-input {
    font-size: 1.2rem;
    padding: 15px;
    border-radius: 10px;
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    backdrop-filter: blur(0.5rem) !important;
    --webkit-backdrop-filter: blur(0.5rem) !important;
}

.alert-success {
    background: var(--success-gradient-blur);
    color: white;
}

.alert-danger {
    background: var(--danger-gradient-blur);
    color: white;
}

.alert-warning {
    background: var(--warning-gradient-blur);
    color: white;
}

.alert-info {
    background: var(--info-gradient-blur);
    color: white;
}

/* ===== BADGES ===== */
.badge {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
}

/* ===== LOGIN ===== */
.login-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

/* ===== UTILIDADES ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-secondary {
    background: var(--secondary-gradient);
}

.bg-gradient-success {
    background: var(--success-gradient);
}

.bg-gradient-warning {
    background: var(--warning-gradient);
}

.bg-gradient-danger {
    background: var(--danger-gradient);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }

    .feature-card {
        margin-bottom: 20px;
    }

    .scanner-container {
        padding: 20px;
    }

    .login-container {
        margin: 20px;
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .stat-card {
        margin-bottom: 15px;
    }

    .feature-card {
        padding: 20px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== ESTILOS PARA TABLAS ===== */
.table-custom {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.table-custom th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table-custom td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ===== ESTILOS PARA MODALES ===== */
.modal-custom .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-custom .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-hover);
}

/* ===== ESTILOS PARA PAGINACIÓN ===== */
.pagination-custom .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    transition: var(--transition);
}

.pagination-custom .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px) !important;
}

.pagination-custom .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

/* ===== ESTILOS PARA CARDS DE ESTUDIANTES ===== */
.estudiante-info-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.estudiante-foto {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

.estudiante-foto-placeholder {
    width: 120px;
    height: 120px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

/* ===== ESTILOS PARA ESTADÍSTICAS AVANZADAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

/* ===== ESTILOS PARA FORMULARIOS AVANZADOS ===== */
.form-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 20px;
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

/* ===== ESTILOS PARA NOTIFICACIONES ===== */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ===== ESTILOS PARA LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ESTILOS PARA TOOLTIPS ===== */
.tooltip-custom .tooltip-inner {
    background: var(--dark-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
}

.tooltip-custom .arrow::before {
    border-top-color: var(--dark-color);
}

/* ===== ESTILOS PARA DROPDOWNS ===== */
.dropdown-menu-custom {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    border: none;
    padding: 10px 0;
}

.dropdown-item-custom {
    padding: 10px 20px;
    transition: var(--transition);
    border-radius: 6px;
    margin: 0 10px;
}

.dropdown-item-custom:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* ===== ESTILOS PARA SCROLLBARS ===== */
::-webkit-scrollbar {
    border-radius: 0.75rem;
    width: 0.75rem;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.75rem;
    border: #d9d9d9 1px solid;
}

::-webkit-scrollbar-thumb {
    background: #051e80;

    border-radius: 0.75rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f2788;
    border-radius: 0.75rem;
    border: #fff 1px solid;
}

::-webkit-scrollbar-button {
    display: none;
}

/* ===== ESTILOS PARA EL FOOTER ===== */
footer {
    background: linear-gradient(45deg, #021252 0%, #04196b 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

/* Haz que el backdrop del modal tenga fondo semitransparente y desfoque */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.4) !important;
    /* Ajusta opacidad según preferencia */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    /* Compatibilidad Safari */
    opacity: 1 !important;
    /* Requerido para que el blur sea visible */
}

/* ===== ESTILOS PARA TARJETAS DE RESUMEN (SUMMARY CARDS) ===== */
.summary-card {
    border: 1px solid #0627a9;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.summary-card .card-body {
    padding: 1.15rem;
    display: flex;
    align-items: center;
}

.summary-card .icon-container {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.summary-card .stats {
    flex-grow: 1;
}

.summary-card .stats-value {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 2px;
    color: #2d3436;
}

.summary-card .stats-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #636e72;
    letter-spacing: 0.5px;
}

/* Efecto de brillo sutil */
.summary-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.summary-card:hover::after {
    left: 125%;
}

/* Colores temáticos para Conducta */
.card-meritos {
    border-bottom: 4px solid #28a745 !important;
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.25) !important;
}

.card-meritos .icon-container {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.card-demeritos {
    border-bottom: 4px solid #dc3545 !important;
    box-shadow: 0 2px 12px rgba(220, 53, 69, 0.25) !important;
}

.card-demeritos .icon-container {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.card-sanciones {
    border-bottom: 4px solid #ffd700 !important;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.25) !important;
}

.card-sanciones .icon-container {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.card-total-obs {
    border-bottom: 4px solid #0627a9 !important;
    box-shadow: 0 2px 12px rgba(6, 39, 169, 0.25) !important;
}

.card-total-obs .icon-container {
    background: rgba(6, 39, 169, 0.1);
    color: #0627a9;
}

.card-balance-info {
    border-bottom: 4px solid #17a2b8 !important;
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.25) !important;
}

.card-balance-info .icon-container {
    background: rgba(23, 162, 184, 0.1);
    color: rgb(23, 162, 184);
}

.card-balance-warning {
    border-bottom: 4px solid #ffc107 !important;
    box-shadow: 0 2px 12px rgba(255, 193, 7, 0.3) !important;
}

.card-balance-warning .icon-container {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;

}

@media (max-width: 768px) {
    .summary-card .stats-value {
        font-size: 1.1rem;
    }

    .summary-card .icon-container {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.2rem;
    }
}

/* ===== FIXES FOR MOBILE LAYOUT AND MODALS ===== */

/* 1. Prevent desktop-like zooming out and horizontal overflow */
html,
body {
    width: 100%;
    overflow-x: clip;
    /* Usar clip para evitar scroll horizontal sin bloquear el canvas de forma destructiva */
    position: relative;
    max-width: 100vw;
}

/* 2. Lock body scroll strictly when modal is open (REMOVED to prevent jump-to-top) */
/*
body.modal-open {
    height: 100vh;
    overflow-y: hidden !important;
    position: fixed;
    width: 100%;
}
*/

/* 3. Ensure Modals represent the viewport correctly */
.modal-dialog {
    margin: 1.75rem auto;
    /* Default centering */
    max-width: 500px;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Fix for "deformed" modals - Ensure modal container covers everything */
.modal {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

/* 4. Offcanvas Fixes - Ensure it stays on top and valid */
.offcanvas {
    max-width: 85vw;
    /* Prevent it from being too wide on some devices */
}

.offcanvas.show {
    visibility: visible;
}

/* Ensure navbar stays proper */


/* Force override if Bootstrap's JS handling fails or conflicts */
body.offcanvas-open {
    overflow: hidden !important;
}

.btn-check:checked+.btn-outline-danger {
    background-color: #dc3545 !important;
    color: white !important;
    border: #ffffff 1px solid !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-check:checked+.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    color: white !important;
    border: #ffffff 1px solid !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

.btn-check:checked+.btn-outline-danger:active {
    background-color: #dc3545 !important;
    color: white !important;
    border: #ffffff 1px solid !important;
    border-bottom: #ffffff 0.18rem solid !important;
}

/* Estilos para el contenedor emergente de eliminar */
.emergente-eliminar {
    max-width: 22rem !important;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    backdrop-filter: blur(0.5rem) !important;
    -webkit-backdrop-filter: blur(0.5rem) !important;
    background-color: rgb(3, 21, 96, 0.8) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75) !important;

    border-radius: 1rem !important;

}