/* =====================================================
   SISTEMA DE GESTIÓN ESCOLAR
   ESTILOS DEL LOGIN
===================================================== */


/* =====================================================
   VARIABLES
===================================================== */

:root {

    --verde-principal: #2e765e;
    --verde-oscuro: #245f4c;
    --verde-opaco: #2e765e5d;
    --verde-claro: #e8f3ee;

    --gris-fondo: #eef1f0;
    --gris-texto: #5f6865;
    --gris-borde: #d9dfdc;

    --blanco: #ffffff;

    --sombra:
        0 20px 50px rgba(0, 0, 0, 0.10);

}


/* =====================================================
   RESETEO
===================================================== */

* {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}


html {

    min-height: 100%;

}


body {

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background-color: var(--gris-fondo);

    color: #27302d;

}


/* =====================================================
   CONTENEDOR GENERAL
===================================================== */

.login-page {

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 35px 20px;

}


/* =====================================================
   CONTENEDOR PRINCIPAL
===================================================== */

.login-container {

    width: 100%;

    max-width: 1050px;

    padding: 55px 65px 30px;

    background-color: var(--blanco);

    border-radius: 24px;

    box-shadow: var(--sombra);

}


/* =====================================================
   ENCABEZADO
===================================================== */

.login-header {

    text-align: center;

}


.school-logo {

    width: 155px;

    height: 155px;

    margin: 0 auto 22px;

    display: flex;

    justify-content: center;

    align-items: center;

}


.school-logo img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    border-radius: 50%;

}


.login-header h1 {

    margin-bottom: 10px;

    color: var(--verde-principal);

    font-size: 32px;

    font-weight: 700;

    text-transform: uppercase;

}


.school-name {

    color: var(--gris-texto);

    font-size: 16px;

    line-height: 1.6;

}


/* =====================================================
   ACCIONES PRINCIPALES
===================================================== */

.login-actions {

    width: 100%;

    max-width: 520px;

    margin: 38px auto 0;

    text-align: center;

}


.action-buttons {

    display: flex;

    flex-direction: column;

    gap: 12px;

}


/* =====================================================
   BOTÓN INICIAR SESIÓN
===================================================== */

.login-button {

    width: 100%;

    height: 54px;

    border: none;

    border-radius: 12px;

    background-color: var(--verde-principal);

    color: var(--blanco);

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.login-button:hover {

    background-color: var(--verde-oscuro);

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(46, 118, 94, 0.22);

}


.login-button:active {

    transform: translateY(0);

}


/* =====================================================
   BOTÓN INSTALAR PWA
===================================================== */

.install-button {

    width: 100%;

    height: 54px;

    border: none;

    border-radius: 12px;

    background-color: var(--verde-principal);

    color: var(--blanco);

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.install-button:hover {

    background-color: var(--verde-oscuro);

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(46, 118, 94, 0.22);

}


/* =====================================================
   CARDS DE FUNCIONALIDADES
===================================================== */

.features {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-top: 55px;

}


.feature-card {

    padding: 25px 20px;

    background-color: var(--verde-opaco);

    border: 1px solid #e4eae7;

    border-radius: 15px;

    text-align: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;

}


.feature-card:hover {

    transform: translateY(-4px);

    border-color: #cddbd5;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.07);

}


/* =====================================================
   ICONOS DE LAS CARDS
===================================================== */

.feature-icon {

    width: 50px;

    height: 50px;

    margin: 0 auto 14px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 12px;

    background-color: var(--verde-claro);

}


.feature-icon img {

    width: 20px;

    height: 20px;

    object-fit: contain;

}


.feature-card h3 {

    margin-bottom: 8px;

    color: #2d3834;

    font-size: 16px;

}


.feature-card p {

    color: var(--gris-texto);

    font-size: 13px;

    line-height: 1.5;

}


/* =====================================================
   FOOTER
===================================================== */

.login-footer {

    margin-top: 45px;

    padding-top: 25px;

    border-top: 1px solid #e7ebe9;

    color: #8a9490;

    font-size: 12px;

    line-height: 1.7;

    text-align: center;

}


/* =====================================================
   MODAL DE INICIO DE SESIÓN
===================================================== */

.login-overlay {

    position: fixed;

    inset: 0;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    background:
        rgba(18, 32, 27, 0.48);

    backdrop-filter: blur(9px);

    -webkit-backdrop-filter: blur(9px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

    z-index: 99999;

}


.login-overlay.active {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}


/* =====================================================
   TARJETA DEL MODAL
===================================================== */

.login-modal {

    position: relative;

    width: 100%;

    max-width: 430px;

    padding: 42px 40px 40px;

    background: rgba(255, 255, 255, 0.98);

    border: 1px solid rgba(255, 255, 255, 0.8);

    border-radius: 24px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.28),
        0 10px 30px rgba(0, 0, 0, 0.12);

    opacity: 0;

    transform:
        translateY(25px)
        scale(0.92);

    transition:
        opacity 0.28s ease,
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);

}


.login-overlay.active .login-modal {

    opacity: 1;

    transform:
        translateY(0)
        scale(1);

}


/* =====================================================
   BOTÓN CERRAR MODAL
===================================================== */

.modal-close {

    position: absolute;

    top: 16px;

    right: 16px;

    width: 36px;

    height: 36px;

    display: flex;

    justify-content: center;

    align-items: center;

    border: none;

    border-radius: 50%;

    background: #f1f4f2;

    color: #65716c;

    font-size: 24px;

    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;

}


.modal-close:hover {

    background: #e3ebe7;

    color: var(--verde-oscuro);

    transform: rotate(90deg);

}


/* =====================================================
   ENCABEZADO DEL MODAL
===================================================== */

.modal-header {

    margin-bottom: 30px;

    text-align: center;

}


.modal-icon {

    width: 64px;

    height: 64px;

    margin: 0 auto 17px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            var(--verde-principal),
            var(--verde-oscuro)
        );

    box-shadow:
        0 10px 25px rgba(46, 118, 94, 0.25);

}


.modal-icon img {

    width: 40px;

    height: 40px;

    object-fit: contain;

}


.modal-header h2 {

    margin-bottom: 8px;

    color: #27302d;

    font-size: 25px;

    font-weight: 700;

}


.modal-header p {

    color: var(--gris-texto);

    font-size: 14px;

    line-height: 1.5;

}


/* =====================================================
   FORMULARIO DEL MODAL
===================================================== */

.modal-login-form {

    display: flex;

    flex-direction: column;

    gap: 20px;

}


.modal-login-form .form-group {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.modal-login-form label {

    color: #36413d;

    font-size: 14px;

    font-weight: 600;

}


.modal-login-form input {

    width: 100%;

    height: 52px;

    padding: 0 16px;

    border: 1px solid var(--gris-borde);

    border-radius: 13px;

    background: #f9fbfa;

    color: #27302d;

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;

}


.modal-login-form input::placeholder {

    color: #9aa39f;

}


.modal-login-form input:focus {

    border-color: var(--verde-principal);

    background: var(--blanco);

    box-shadow:
        0 0 0 4px rgba(46, 118, 94, 0.12);

}


/* =====================================================
   BOTÓN ENTRAR
===================================================== */

.modal-login-button {

    width: 100%;

    height: 53px;

    margin-top: 5px;

    border: none;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--verde-principal),
            var(--verde-oscuro)
        );

    color: var(--blanco);

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(46, 118, 94, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;

}


.modal-login-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(46, 118, 94, 0.28);

    filter: brightness(1.04);

}


.modal-login-button:active {

    transform: translateY(0);

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 800px) {

    .login-container {

        padding:
            45px 35px 25px;

    }


    .login-header h1 {

        font-size: 27px;

    }


    .features {

        grid-template-columns: 1fr;

        max-width: 500px;

        margin-right: auto;

        margin-left: auto;

    }

}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 520px) {

    .login-page {

        padding: 15px;

        align-items: flex-start;

    }


    .login-container {

        margin-top: 10px;

        padding:
            35px 20px 25px;

        border-radius: 18px;

    }


    .school-logo {

        width: 100px;

        height: 100px;

        margin-bottom: 18px;

    }


    .login-header h1 {

        font-size: 22px;

        line-height: 1.3;

    }


    .school-name {

        font-size: 14px;

    }


    .login-actions {

        margin-top: 30px;

    }


    .features {

        margin-top: 40px;

        gap: 12px;

    }


    .feature-card {

        padding: 20px 16px;

    }


    .login-footer {

        margin-top: 35px;

    }


    /* Modal */

    .login-overlay {

        padding: 16px;

    }


    .login-modal {

        max-width: 100%;

        padding:
            35px 25px 30px;

        border-radius: 20px;

    }


    .modal-header {

        margin-bottom: 25px;

    }


    .modal-header h2 {

        font-size: 21px;

    }


    .modal-icon {

        width: 58px;

        height: 58px;

        border-radius: 16px;

    }


    .modal-icon img {

        width: 34px;

        height: 34px;

    }


    .modal-login-form {

        gap: 17px;

    }

}