
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: #f1f5f9;
}

/* FONDO PRINCIPAL */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;

    background-image:
            linear-gradient(
                    rgba(8, 25, 48, 0.68),
                    rgba(8, 25, 48, 0.78)
            ),
            url("https://escihupuebla.edu.mx/wp-content/uploads/2024/10/ESCIHU-.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* TARJETA DE INICIO DE SESIÓN */

.login-card {
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.30);
}

/* PANEL INSTITUCIONAL */

.login-info {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 55px 48px;
    color: white;

    background:
            linear-gradient(
                    145deg,
                    rgba(8, 31, 61, 0.96),
                    rgba(13, 65, 112, 0.91)
            );
}

.logo-institucional {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo-icono {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 25px;
    font-weight: 800;
}

.informacion-institucional {
    max-width: 450px;
}

.subtitulo {
    margin-bottom: 18px;
    color: #8dd8ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
}

.informacion-institucional h1 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -1px;
}

.linea-decorativa {
    width: 75px;
    height: 5px;
    margin: 27px 0;
    border-radius: 10px;
    background: #42b9ee;
}

.informacion-institucional h2 {
    margin-bottom: 17px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 1px;
}

.descripcion {
    max-width: 390px;
    color: #d6e5f3;
    font-size: 15px;
    line-height: 1.8;
}

.pie-institucional {
    color: #b7cce0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* PANEL DEL FORMULARIO */

.login-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: #ffffff;
}

.formulario-contenido {
    width: 100%;
    max-width: 360px;
}

.icono-acceso {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border-radius: 16px;
    background: #e7f4fc;
    color: #125b91;
    font-size: 21px;
    font-weight: 800;
}

.etiqueta-acceso {
    margin-bottom: 10px;
    color: #1675ae;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.formulario-contenido h2 {
    margin-bottom: 10px;
    color: #142b45;
    font-size: 30px;
    font-weight: 800;
}

.texto-acceso {
    margin-bottom: 30px;
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
}

/* CAMPOS DEL FORMULARIO */

#formLogin {
    display: flex;
    flex-direction: column;
}

#formLogin label {
    margin-bottom: 9px;
    color: #263b53;
    font-size: 13px;
    font-weight: 700;
}

#formLogin input,
#formLogin select {
    width: 100%;
    height: 49px;
    margin-bottom: 21px;
    padding: 0 15px;
    border: 1px solid #dce5ed;
    border-radius: 9px;
    outline: none;
    background: #f8fafc;
    color: #263b53;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: 0.25s;
}

#formLogin input:focus,
#formLogin select:focus {
    border-color: #1684c2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 132, 194, 0.12);
}

/* BOTÓN */

.btn-ingresar {
    width: 100%;
    height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 5px;
    border: none;
    border-radius: 9px;
    background: #125b91;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}

.btn-ingresar:hover {
    background: #0b426d;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(18, 91, 145, 0.22);
}

.btn-ingresar span {
    font-size: 20px;
}

/* MENSAJES */

#mensajeLogin {
    min-height: 20px;
    margin-top: 13px;
    color: #dc2626;
    font-size: 12px;
    text-align: center;
}

/* PIE DEL FORMULARIO */

.pie-formulario {
    margin-top: 35px;
    color: #9aa8b6;
    font-size: 10px;
    text-align: center;
}

/* ESTILOS GENERALES PARA LOS MÓDULOS */

#app {
    width: 100%;
}

#app h1,
#app h2,
#app h3 {
    color: #142b45;
}

#app button {
    cursor: pointer;
}

/* DISEÑO RESPONSIVO */

@media (max-width: 850px) {

    .login-card {
        max-width: 600px;
        grid-template-columns: 1fr;
    }

    .login-info {
        min-height: 300px;
        padding: 35px;
    }

    .informacion-institucional h1 {
        font-size: 27px;
    }

    .login-form {
        padding: 40px 30px;
    }
}

@media (max-width: 500px) {

    .login-container {
        padding: 15px;
    }

    .login-card {
        border-radius: 15px;
    }

    .login-info {
        min-height: 280px;
        padding: 25px;
    }

    .informacion-institucional h1 {
        font-size: 23px;
    }

    .informacion-institucional h2 {
        font-size: 16px;
    }

    .descripcion {
        font-size: 13px;
    }

    .login-form {
        padding: 35px 22px;
    }

    .formulario-contenido h2 {
        font-size: 26px;
    }
}

/* =====================================
   DISEÑO GENERAL DE LOS PANELES ESCIHU
===================================== */

#app {
    min-height: 100vh;
    padding: 30px;
    background: #f1f5f9;
    font-family: 'Inter', sans-serif;
}

.panel {
    width: 100%;
    max-width: 1400px;
    min-height: calc(100vh - 60px);
    margin: auto;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(15, 40, 70, 0.08);
}

/* ENCABEZADO */

.encabezado {
    padding: 35px 40px;
    color: white;
    background: linear-gradient(120deg, #092c50, #125b91);
}

.encabezado h1 {
    margin-bottom: 10px;
    color: #ffffff !important;
    font-size: 28px;
    font-weight: 800;
}

.encabezado p {
    color: #dceeff;
    font-size: 14px;
}

/* MENÚ DE NAVEGACIÓN */

.menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 35px;
    border-bottom: 1px solid #e5eaf0;
    background: #ffffff;
}

.menu button {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid #dce5ed;
    border-radius: 8px;
    background: #f8fafc;
    color: #29445f;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.menu button:hover {
    border-color: #125b91;
    background: #eaf4fb;
    color: #125b91;
}

.menu .btn-secundario {
    margin-left: auto;
    border-color: #fee2e2;
    background: #fff1f2;
    color: #be123c;
}

.menu .btn-secundario:hover {
    background: #ffe4e6;
    color: #9f1239;
}

/* CONTENIDO */

#contenidoAlumno,
#contenidoMaestro,
#contenidoCoordinador {
    padding: 30px 35px;
}

/* TARJETAS */

.tarjeta {
    width: 100%;
    margin-bottom: 25px;
    padding: 28px;
    border: 1px solid #e5eaf0;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 40, 70, 0.04);
}

.tarjeta h2 {
    margin-bottom: 24px;
    color: #123b61;
    font-size: 21px;
    font-weight: 800;
}

.tarjeta p {
    margin: 13px 0;
    color: #526477;
    font-size: 14px;
    line-height: 1.7;
}

.tarjeta strong {
    color: #203b56;
}

/* TABLAS */

.tarjeta table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    font-size: 13px;
}

.tarjeta thead {
    background: #edf4fa;
}

.tarjeta th {
    padding: 15px;
    color: #17466e;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid #dce5ed;
}

.tarjeta td {
    padding: 14px 15px;
    color: #526477;
    border-bottom: 1px solid #edf0f4;
}

.tarjeta tbody tr:hover {
    background: #f7fafc;
}

/* FORMULARIOS DE LOS MÓDULOS */

.tarjeta form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tarjeta label {
    margin-top: 8px;
    color: #29445f;
    font-size: 13px;
    font-weight: 700;
}

.tarjeta input,
.tarjeta select,
.tarjeta textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #dce5ed;
    border-radius: 8px;
    outline: none;
    background: #f8fafc;
    color: #263b53;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.tarjeta input:focus,
.tarjeta select:focus,
.tarjeta textarea:focus {
    border-color: #1684c2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 132, 194, 0.10);
}

/* BOTONES DE LOS MÓDULOS */

.tarjeta button {
    width: fit-content;
    min-height: 42px;
    margin-top: 12px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background: #125b91;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}

.tarjeta button:hover {
    background: #0b426d;
    transform: translateY(-1px);
}

/* RESPONSIVO */

@media (max-width: 700px) {
    #app {
        padding: 12px;
    }

    .panel {
        min-height: calc(100vh - 24px);
    }

    .encabezado {
        padding: 25px 20px;
    }

    .encabezado h1 {
        font-size: 23px;
    }

    .menu {
        padding: 15px;
    }

    .menu button {
        flex: 1 1 140px;
    }

    .menu .btn-secundario {
        margin-left: 0;
    }

    #contenidoAlumno,
    #contenidoMaestro,
    #contenidoCoordinador {
        padding: 18px 12px;
    }

    .tarjeta {
        padding: 18px;
        overflow-x: auto;
    }

    .tarjeta table {
        min-width: 550px;
    }
}

/* =====================================
   ETAPA 4: ESTILOS NUEVOS (sin tocar los anteriores)
===================================== */

/* Corrige el espacio en blanco bajo el login: #app solo ocupa espacio cuando tiene contenido */
#app:empty {
    display: none;
}

/* Mensajes de éxito / error de los módulos (reemplazan a los alert) */
.tarjeta .aviso {
    margin: 16px 0 0;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.tarjeta .aviso:empty {
    display: none;
}

.tarjeta .aviso-ok {
    border: 1px solid #bfe5cd;
    background: #e7f6ec;
    color: #14663a;
}

.tarjeta .aviso-error {
    border: 1px solid #f5c2bd;
    background: #fdecea;
    color: #a1261b;
}

/* Botones Guardar / Cancelar del formulario */
.acciones-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tarjeta .btn-cancelar {
    background: #e6edf4;
    color: #29445f;
}

.tarjeta .btn-cancelar:hover {
    background: #d5e0ea;
}

/* Botones Editar / Eliminar dentro de las tablas */
.tarjeta td.col-acciones {
    white-space: nowrap;
}

.tarjeta td button.btn-tabla {
    min-height: 32px;
    margin: 0 6px 0 0;
    padding: 0 12px;
    font-size: 12px;
}

.tarjeta td button.btn-peligro {
    background: #b42318;
}

.tarjeta td button.btn-peligro:hover {
    background: #8f1c12;
}

.tarjeta tbody tr.fila-edicion {
    background: #fff8e1;
}

/* Campos que no se pueden cambiar al editar (matrícula, usuario, alumno, materia) */
.tarjeta input:disabled,
.tarjeta select:disabled {
    background: #eaeff4;
    color: #7a8a9b;
    cursor: not-allowed;
}
