/* CSS Document */
:root {

    --azul: #015291;
    --azul-hover: #003f70;
    --azul-suave: #eaf2f8;

    --gris-marca: #8B8A88;
    --gris-oscuro: #535353;

    --texto: #20252a;
    --texto-suave: #69727c;

    --borde: #d9dee3;

    --fondo: #f3f6f8;

    --blanco: #ffffff;

    --error-fondo: #fff1f1;
    --error-texto: #9c2828;
    --error-borde: #f0caca;

}


/* ---------------------------------------------
   GENERAL
--------------------------------------------- */

* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}


body {

    font-family: "Inter", sans-serif;

    background:
        linear-gradient(
            145deg,
            #f7f9fa 0%,
            #eef3f6 100%
        );

    color: var(--texto);

    -webkit-font-smoothing: antialiased;

}


/* ---------------------------------------------
   CONTENEDOR
--------------------------------------------- */

.login-page {

    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 20px;

    position: relative;
    overflow: hidden;

}


/*
Detalle de fondo muy sutil.
No queremos una pantalla llena de azul.
*/

.login-page::before {

    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    border-radius: 50%;

    background: rgba(1, 82, 145, 0.055);

    top: -260px;
    right: -180px;

}


.login-page::after {

    content: "";

    position: absolute;

    width: 380px;
    height: 380px;

    border-radius: 50%;

    background: rgba(139, 138, 136, 0.06);

    bottom: -220px;
    left: -140px;

}


/* ---------------------------------------------
   TARJETA
--------------------------------------------- */

.login-card {

    width: 100%;
    max-width: 430px;

    background: var(--blanco);

    border-radius: 18px;

    padding: 34px 42px 28px;

    box-shadow:
        0 20px 55px rgba(23, 43, 61, 0.10),
        0 2px 8px rgba(23, 43, 61, 0.04);

    position: relative;
    z-index: 1;

}


/* ---------------------------------------------
   LOGO
--------------------------------------------- */

.login-logo {

    display: flex;
    justify-content: center;

    margin-bottom: 18px;

}


.login-logo img {

    display: block;

    width: min(255px, 78%);
    height: auto;

}


/* ---------------------------------------------
   CABECERA
--------------------------------------------- */

.login-header {

    text-align: center;

    margin-bottom: 28px;

}


.login-header h1 {

    margin: 0 0 8px;

    font-size: 26px;
    line-height: 1.2;

    font-weight: 700;

    color: var(--texto);

}


.login-header p {

    margin: 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--texto-suave);

}


/* ---------------------------------------------
   ERROR
--------------------------------------------- */

.login-alert {

    display: flex;
    align-items: center;

    gap: 9px;

    margin-bottom: 20px;

    padding: 11px 13px;

    border: 1px solid var(--error-borde);
    border-radius: 9px;

    background: var(--error-fondo);

    color: var(--error-texto);

    font-size: 13px;
    line-height: 1.4;

}


.login-alert .material-symbols-outlined {

    font-size: 20px;

    flex: 0 0 auto;

}


/* ---------------------------------------------
   FORMULARIO
--------------------------------------------- */

.login-form {

    width: 100%;

}


.form-group {

    margin-bottom: 19px;

}


.form-group label {

    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;

    color: var(--gris-oscuro);

}


/* ---------------------------------------------
   INPUTS
--------------------------------------------- */

.input-wrap {

    position: relative;

    display: flex;
    align-items: center;

}


.input-wrap input {

    width: 100%;
    height: 50px;

    padding:
        0
        48px
        0
        45px;

    border: 1px solid var(--borde);
    border-radius: 9px;

    background: var(--blanco);

    color: var(--texto);

    font-family: "Inter", sans-serif;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;

}


.input-wrap input::placeholder {

    color: #a1a8af;

}


.input-wrap input:hover {

    border-color: #bec6cd;

}


.input-wrap input:focus {

    border-color: var(--azul);

    box-shadow:
        0 0 0 3px rgba(1, 82, 145, 0.11);

}


/* ---------------------------------------------
   ICONOS INPUT
--------------------------------------------- */

.input-icon {

    position: absolute;

    left: 14px;

    color: #7a858e;

    font-size: 21px;

    pointer-events: none;

}


.input-wrap:focus-within .input-icon {

    color: var(--azul);

}


/* ---------------------------------------------
   VER PASSWORD
--------------------------------------------- */

.password-toggle {

    position: absolute;

    right: 7px;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: #78838c;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.18s ease,
        color 0.18s ease;

}


.password-toggle:hover {

    background: var(--azul-suave);

    color: var(--azul);

}


.password-toggle:focus-visible {

    outline: 2px solid var(--azul);
    outline-offset: 1px;

}


.password-toggle .material-symbols-outlined {

    font-size: 21px;

}


/* ---------------------------------------------
   RECUPERAR CONTRASEÑA
--------------------------------------------- */

.login-options {

    display: flex;
    justify-content: flex-end;

    margin-top: -3px;
    margin-bottom: 23px;

}


.login-options a {

    color: var(--azul);

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

}


.login-options a:hover {

    text-decoration: underline;

}


/* ---------------------------------------------
   BOTÓN INGRESAR
--------------------------------------------- */

.login-button {

    width: 100%;
    min-height: 51px;

    border: 0;
    border-radius: 9px;

    padding: 0 18px;

    background: var(--azul);

    color: var(--blanco);

    font-family: "Inter", sans-serif;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    box-shadow:
        0 5px 12px rgba(1, 82, 145, 0.16);

    transition:
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;

}


.login-button:hover {

    background: var(--azul-hover);

    box-shadow:
        0 7px 16px rgba(1, 82, 145, 0.22);

}


.login-button:active {

    transform: translateY(1px);

}


.login-button:focus-visible {

    outline: 3px solid rgba(1, 82, 145, 0.20);
    outline-offset: 3px;

}


.login-button .material-symbols-outlined {

    font-size: 20px;

}


/* ---------------------------------------------
   PIE
--------------------------------------------- */

.login-footer {

    margin-top: 27px;

    padding-top: 20px;

    border-top: 1px solid #edf0f2;

    text-align: center;

    font-size: 11px;

    color: #949ba1;

}


/* =====================================================
   CELULAR
===================================================== */

@media (max-width: 600px) {

    .login-page {

        align-items: stretch;

        padding: 0;

        background: var(--blanco);

    }


    .login-page::before,
    .login-page::after {

        display: none;

    }


    .login-card {

        max-width: none;

        min-height: 100vh;
        min-height: 100svh;

        border-radius: 0;

        box-shadow: none;

        padding:
            max(34px, env(safe-area-inset-top))
            24px
            28px;

        display: flex;
        flex-direction: column;
        justify-content: center;

    }


    .login-logo {

        margin-bottom: 18px;

    }


    .login-logo img {

        width: min(245px, 72vw);

    }


    .login-header {

        margin-bottom: 28px;

    }


    .login-header h1 {

        font-size: 25px;

    }


    .input-wrap input {

        height: 54px;

        font-size: 16px;

        border-radius: 10px;

    }


    .login-button {

        min-height: 54px;

        border-radius: 10px;

        font-size: 16px;

    }


    .login-options a {

        font-size: 14px;

    }


    .login-footer {

        margin-top: 32px;

    }

}


/* ---------------------------------------------
   TELÉFONOS MUY PEQUEÑOS
--------------------------------------------- */

@media (max-width: 360px) {

    .login-card {

        padding-left: 18px;
        padding-right: 18px;

    }


    .login-logo img {

        width: 215px;

    }

}

