/* =========================================
   VIVIENDA | LOGIN.CSS
   ========================================= */

.pantalla-login {
    min-height: 100vh;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 25px 20px 15px;
}

.login-contenedor {
    width: 100%;
    max-width: 480px;
    transform: translateY(-20px);

    background: #ffffff;

    padding: 40px;

    border-radius: 24px;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.10);

    text-align: center;
}

.login-icono {
    width: 95px;
    height: 95px;

    margin: 0 auto 18px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #f2f6f4;

    border-radius: 22px;

    font-size: 65px;
    line-height: 1;

    font-family: "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.login-contenedor h1 {
    font-size: 34px;
    margin-bottom: 8px;
}

.login-contenedor h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.login-descripcion {
    font-size: 16px;
    line-height: 1.5;

    color: #68756f;

    margin-bottom: 30px;
}

/* =========================================
   CAMPOS
   ========================================= */

.campo {
    text-align: left;
    margin-bottom: 20px;
}

.campo label {
    display: block;

    font-size: 17px;
    font-weight: 600;

    margin-bottom: 8px;
}

.campo input {
    display: block;

    width: 100%;
    max-width: 100%;
    min-height: 52px;

    padding: 12px 15px;

    border: 1px solid #ccd5d0;
    border-radius: 10px;

    font-size: 17px;

    outline: none;

    box-sizing: border-box;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.campo input:focus {
    border-color: #4c8b67;

    box-shadow:
        0 0 0 3px rgba(76, 139, 103, 0.12);
}

/* =========================================
   CAMPO DE CONTRASEÑA
   ========================================= */

.campo-password {
    position: relative;

    width: 100%;
    max-width: 100%;
}

.campo-password input {
    width: 100%;
    max-width: 100%;

    height: 52px;

    padding: 12px 58px 12px 15px;

    box-sizing: border-box;
}

/* =========================================
   BOTÓN OJO
   ========================================= */

.boton-ojo {
    position: absolute;

    top: 50%;
    right: 7px;

    width: 40px;
    height: 40px;

    padding: 0;
    margin: 0;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #526860;

    cursor: pointer;

    font-size: 0;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.boton-ojo:hover {
    background: #edf4f0;

    color: #29463b;
}

.boton-ojo:active {
    transform: translateY(-50%) scale(0.94);
}

/* Ojo dibujado con CSS */

.boton-ojo::before {
    content: "";

    width: 22px;
    height: 14px;

    border: 2px solid currentColor;

    border-radius: 75% 15%;

    transform: rotate(45deg);

    display: block;
}

.boton-ojo::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;
}

.boton-ojo.visible {
    color: #29463b;
}

/* =========================================
   BOTÓN INGRESAR
   ========================================= */

.boton-ingresar {
    width: 100%;

    min-height: 54px;

    border: none;
    border-radius: 10px;

    background: #4c8b67;
    color: #ffffff;

    font-size: 17px;
    font-weight: 700;

    cursor: pointer;

    margin-top: 5px;

    transition:
        transform 0.2s,
        opacity 0.2s;
}

.boton-ingresar:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

/* =========================================
   BOTÓN VOLVER AL INICIO
   ========================================= */

.boton-volver {
    width: 100%;

    min-height: 48px;

    margin-top: 12px;
    padding: 12px 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    box-sizing: border-box;

    border: 1px solid #cbd8d2;
    border-radius: 10px;

    background: #ffffff;
    color: #496158;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.boton-volver::before {
    content: "←";

    font-size: 19px;
    font-weight: 700;

    line-height: 1;
}

.boton-volver:hover {
    background: #f1f6f3;

    border-color: #9fb7ac;

    color: #29463b;

    transform: translateY(-1px);

    box-shadow:
        0 4px 12px rgba(40, 70, 59, 0.10);
}

.boton-volver:active {
    transform: translateY(0);
}

/* =========================================
   MENSAJES DEL LOGIN
   ========================================= */

.mensaje-login {
    min-height: 22px;

    margin: 8px 0 10px;

    font-size: 14px;
    line-height: 1.4;
}

.mensaje-login.error {
    color: #b33a3a;
}

.mensaje-login.correcto {
    color: #3f7d58;
}

.mensaje-login.cargando {
    color: #68756f;
}

/* =========================================
   PIE DE PÁGINA
   ========================================= */

.login-footer {
    margin-top: 30px;

    font-size: 13px;
    line-height: 1.6;

    color: #7a857f;
}

/* =========================================
   TABLET Y TELÉFONOS
   ========================================= */

@media (max-width: 500px) {

    .pantalla-login {
        padding: 20px 15px;
    }

    .login-contenedor {
        padding: 30px 22px;

        border-radius: 20px;
    }

    .login-contenedor h1 {
        font-size: 30px;
    }

    .login-contenedor h2 {
        font-size: 20px;
    }

    .campo input {
        min-height: 50px;

        font-size: 16px;
    }

    .campo-password input {
        height: 50px;
    }

    .boton-ojo {
        width: 38px;
        height: 38px;

        right: 6px;
    }

    .boton-ojo::before {
        width: 21px;
        height: 13px;
    }

    .boton-ojo::after {
        width: 6px;
        height: 6px;
    }

    .boton-ingresar {
        min-height: 52px;
    }

    .boton-volver {
        min-height: 48px;
    }
}

/* =========================================
   TELÉFONOS MUY PEQUEÑOS
   ========================================= */

@media (max-width: 360px) {

    .pantalla-login {
        padding: 15px 10px;
    }

    .login-contenedor {
        padding: 25px 17px;

        border-radius: 18px;
    }

    .login-contenedor h1 {
        font-size: 27px;
    }

    .login-contenedor h2 {
        font-size: 18px;
    }

    .campo label {
        font-size: 16px;
    }

    .campo input {
        font-size: 16px;
    }
}

/* =========================================
   TELÉFONO EN HORIZONTAL
   ========================================= */

@media (max-height: 500px) and (orientation: landscape) {

    .pantalla-login {
        align-items: flex-start;

        padding-top: 20px;
        padding-bottom: 20px;

        overflow-y: auto;
    }

    .login-contenedor {
        margin: 0 auto;
    }
}