/* =========================================================
   SISTEMA ACADÉMICO
   ESTILOS GENERALES
   ========================================================= */

html {
    font-size: 14px;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient( circle at top left, rgba(37, 99, 235, 0.08), transparent 35% ), linear-gradient( 135deg, #f8fafc, #eef4ff );
    color: #172033;
}


/* =========================================================
   NAVBAR PRINCIPAL
   ========================================================= */

.navbar-academico {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-height: 70px;
    background: linear-gradient( 135deg, #2563eb, #1d4ed8 55%, #1e40af );
    box-shadow: 0 6px 22px rgba(30, 64, 175, 0.25);
    animation: aparecerNavbar .5s ease;
}


/* Contenedor interno */

.navbar-contenido {
    width: 100%;
    min-height: 70px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}


/* =========================================================
   LOGO
   ========================================================= */

.marca-sistema {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    color: white;
    text-decoration: none;
    transition: .3s ease;
}

    .marca-sistema:hover {
        color: white;
        transform: translateY(-2px);
    }


/* Icono */

.logo-sistema {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
    font-size: 21px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
    transition: .3s ease;
}

.marca-sistema:hover .logo-sistema {
    transform: rotate(-5deg) scale(1.05);
    background: rgba(255,255,255,.22);
}


/* Nombre */

.nombre-sistema {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

    .nombre-sistema strong {
        font-size: 16px;
        line-height: 18px;
        letter-spacing: .1px;
    }

    .nombre-sistema small {
        margin-top: 2px;
        font-size: 10px;
        opacity: .72;
    }


/* =========================================================
   MENÚ PRINCIPAL
   ========================================================= */

.menu-principal {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}


/* Elementos del menú */

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 7px;
    border-radius: 8px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}


    /* Iconos */

    .menu-item span:first-child {
        font-size: 14px;
        transition: .25s ease;
    }


    /* Hover */

    .menu-item:hover {
        color: white;
        background: rgba(255,255,255,.14);
        transform: translateY(-2px);
    }


        .menu-item:hover span:first-child {
            transform: scale(1.15);
        }


    /* Línea inferior */

    .menu-item::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 3px;
        width: 0;
        height: 2px;
        border-radius: 5px;
        background: white;
        transform: translateX(-50%);
        transition: width .25s ease;
    }

    .menu-item:hover::after {
        width: 50%;
    }


/* =========================================================
   ZONA DEL USUARIO
   ========================================================= */

.zona-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}


/* Información usuario */

.usuario-info {
    display: flex;
    align-items: center;
    gap: 7px;
    color: white;
}


/* Avatar */

.usuario-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    font-size: 16px;
    transition: .3s ease;
}

    .usuario-avatar:hover {
        transform: scale(1.08);
    }


/* Texto */

.usuario-info strong {
    display: block;
    font-size: 11px;
    line-height: 14px;
}

.usuario-info small {
    display: block;
    font-size: 9px;
    opacity: .72;
}


/* =========================================================
   BOTÓN CERRAR SESIÓN
   ========================================================= */

.btn-cerrar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 11px;
    border-radius: 8px;
    background: white;
    color: #1d4ed8;
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

    .btn-cerrar:hover {
        color: #1e40af;
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: 0 7px 17px rgba(0,0,0,.18);
    }


/* =========================================================
   CONTENIDO
   ========================================================= */

.contenido-principal {
    width: 100%;
    min-height: calc(100vh - 134px);
    padding: 30px;
    box-sizing: border-box;
    animation: aparecerContenido .5s ease;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer-academico {
    min-height: 64px;
    padding: 18px 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.78);
    border-top: 1px solid rgba(148,163,184,.2);
    backdrop-filter: blur(10px);
    color: #64748b;
    font-size: 12px;
}


    .footer-academico a {
        color: #2563eb;
        text-decoration: none;
        transition: .2s ease;
    }

        .footer-academico a:hover {
            color: #1d4ed8;
            text-decoration: underline;
        }


/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes aparecerNavbar {

    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes aparecerContenido {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   TARJETAS GENERALES
   ========================================================= */

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .07);
    transition: transform .25s ease, box-shadow .25s ease;
}


    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(15, 23, 42, .11);
    }


/* =========================================================
   BOTONES
   ========================================================= */

.btn {
    border-radius: 9px;
    transition: transform .2s ease, box-shadow .2s ease;
}


    .btn:hover {
        transform: translateY(-1px);
    }


/* =========================================================
   CAMPOS DE FORMULARIO
   ========================================================= */

.form-control,
.form-select {
    border-radius: 9px;
    border: 1px solid #d5dce8;
    padding: 9px 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}


    .form-control:focus,
    .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }


/* =========================================================
   TABLAS
   ========================================================= */

.table {
    border-radius: 12px;
    overflow: hidden;
    background: white;
}


    .table thead {
        background: #eff6ff;
    }


        .table thead th {
            color: #1e3a8a;
            font-size: 13px;
            font-weight: 600;
            border-bottom: 1px solid #dbeafe;
        }


    .table tbody tr {
        transition: background .2s ease;
    }


        .table tbody tr:hover {
            background: #f8fafc;
        }


/* =========================================================
   SCROLLBAR VERTICAL
   ========================================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #eef2f7;
}

::-webkit-scrollbar-thumb {
    background: #93a4c3;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }


/* =========================================================
   PANTALLAS MEDIANAS
   ========================================================= */

@media (max-width: 1400px) {

    .navbar-contenido {
        padding: 0 12px;
        gap: 6px;
    }

    .marca-sistema {
        min-width: 175px;
    }

    .nombre-sistema strong {
        font-size: 15px;
    }

    .menu-item {
        padding: 8px 5px;
        font-size: 11.5px;
    }

        .menu-item span:first-child {
            font-size: 13px;
        }

    .btn-cerrar {
        padding: 7px 9px;
        font-size: 10.5px;
    }

    .contenido-principal {
        padding: 25px;
    }
}


/* =========================================================
   PANTALLAS PEQUEÑAS
   ========================================================= */

@media (max-width: 1100px) {

    .navbar-academico {
        min-height: auto;
    }

    .navbar-contenido {
        min-height: auto;
        padding: 12px;
        flex-wrap: wrap;
    }

    .marca-sistema {
        min-width: auto;
    }

    .menu-principal {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 8px;
    }

    .menu-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    .usuario-info {
        display: none;
    }

    .zona-usuario {
        margin-left: auto;
    }
}


/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 700px) {

    .navbar-contenido {
        padding: 10px;
    }

    .logo-sistema {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .nombre-sistema strong {
        font-size: 14px;
    }

    .nombre-sistema small {
        display: none;
    }

    .menu-principal {
        gap: 3px;
    }

    .menu-item {
        padding: 8px;
        font-size: 11px;
    }

    .contenido-principal {
        padding: 18px 12px;
    }

    .footer-academico {
        padding: 15px;
        flex-direction: column;
        gap: 7px;
        text-align: center;
    }
}


/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 480px) {

    .navbar-contenido {
        gap: 8px;
    }

    .marca-sistema {
        flex: 1;
    }

    .nombre-sistema {
        display: none;
    }

    .btn-cerrar {
        padding: 7px 9px;
    }

    .menu-principal {
        justify-content: space-between;
    }

    .menu-item {
        padding: 7px;
        font-size: 10px;
    }

        .menu-item span:first-child {
            font-size: 13px;
        }

    .contenido-principal {
        padding: 15px 10px;
    }
}
