﻿/* ==========================================================
   CONEXIÓN A.L.M
   recuperar.css
   Recuperación de contraseña
========================================================== */


/* ==========================================================
   VARIABLES
========================================================== */

:root {

    --primary: #ED0015;

    --primary-dark: #C80012;

    --primary-light: #FF2D42;

    --beige: #FFF5F5;

    --white: #FFFFFF;

    --background: #F7F7F8;

    --text: #1D1D1D;

    --text-light: #626262;

    --border: #DEDEDE;

    --error: #C62828;

    --success: #2E7D32;

}


/* ==========================================================
   RESET
========================================================== */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    min-height: 100vh;

    font-family: "Poppins", sans-serif;

    background: var(--background);

    color: var(--text);

}


/* ==========================================================
   LAYOUT PRINCIPAL
========================================================== */

.recovery-layout {

    min-height: 100vh;

    display: grid;

    grid-template-columns: minmax(0, 1fr) minmax(480px, 0.95fr);

}


/* ==========================================================
   PANEL IZQUIERDO
========================================================== */

.left-panel {

    min-height: 100vh;

    padding: 35px 6% 50px;

    background: var(--white);

    display: flex;

    flex-direction: column;

}


/* ==========================================================
   BOTÓN VOLVER
========================================================== */

.back-link {

    width: fit-content;

    display: inline-flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 35px;

    color: var(--primary);

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    transition: 0.25s ease;

}


.back-link:hover {

    color: var(--primary-dark);

    transform: translateX(-3px);

}


.back-link i {

    font-size: 13px;

}


/* ==========================================================
   BRAND
========================================================== */

.brand {

    display: flex;

    align-items: center;

    gap: 18px;

}


.brand-logo {

    width: 82px;

    height: 82px;

    object-fit: contain;

    flex-shrink: 0;

}


.brand-text h1 {

    font-size: 27px;

    line-height: 1.1;

    font-weight: 700;

    letter-spacing: -0.5px;

}


.brand-text p {

    margin-top: 5px;

    color: var(--text-light);

    font-size: 13px;

}


/* ==========================================================
   TEXTO PRINCIPAL
========================================================== */

.welcome {

    margin-top: 70px;

    max-width: 590px;

}


.welcome h2 {

    font-size: clamp(36px, 4vw, 52px);

    line-height: 1.1;

    font-weight: 700;

    letter-spacing: -1.5px;

}


.welcome h2 span {

    display: block;

    color: var(--primary);

}


.title-line {

    width: 82px;

    height: 4px;

    margin: 25px 0 28px;

    background: var(--primary);

    border-radius: 10px;

}


.welcome > p {

    max-width: 560px;

    font-size: 16px;

    line-height: 2;

    color: #3E3E3E;

}


/* ==========================================================
   IMAGEN
========================================================== */

.image-container {

    width: 100%;

    margin-top: 45px;

    border-radius: 22px;

    overflow: hidden;

    aspect-ratio: 16 / 9;

}


.image-container img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

}


/* ==========================================================
   PANEL DERECHO
========================================================== */

.right-panel {

    min-height: 100vh;

    padding: 35px 6%;

    background: #F8F8F9;

    display: flex;

    align-items: center;

    justify-content: center;

}


/* ==========================================================
   CARD
========================================================== */

.recovery-card {

    width: 100%;

    max-width: 650px;

    padding: 48px;

    background: var(--white);

    border-radius: 24px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.05);

}


/* ==========================================================
   ICONO
========================================================== */

.recovery-icon {

    width: 92px;

    height: 92px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #F7EAF2;

    color: var(--primary);

    font-size: 32px;

    margin-bottom: 30px;

}


.recovery-card > h2 {

    font-size: clamp(30px, 3vw, 42px);

    line-height: 1.15;

    font-weight: 700;

    letter-spacing: -1px;

}


.card-description {

    margin-top: 16px;

    color: var(--text-light);

    font-size: 15px;

    line-height: 1.8;

    max-width: 560px;

}


/* ==========================================================
   FORMULARIO
========================================================== */

#recoveryForm {

    margin-top: 35px;

}


.input-group {

    width: 100%;

}


.input-group label {

    display: block;

    margin-bottom: 10px;

    font-size: 14px;

    font-weight: 600;

}


.input-box {

    width: 100%;

    min-height: 58px;

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 0 18px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: var(--white);

    transition: 0.25s ease;

}


.input-box > i {

    color: #888;

    font-size: 17px;

    flex-shrink: 0;

}


.input-box:focus-within {

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(237, 0, 21, 0.08);

}


.input-box input {

    width: 100%;

    height: 56px;

    border: none;

    outline: none;

    background: transparent;

    font-family: inherit;

    font-size: 14px;

    color: var(--text);

}


.input-box input::placeholder {

    color: #999;

}


/* ==========================================================
   ERROR
========================================================== */

.error-message {

    display: block;

    min-height: 20px;

    margin-top: 7px;

    color: var(--error);

    font-size: 12px;

}


/* ==========================================================
   INFO BOX
========================================================== */

.info-box {

    display: flex;

    align-items: flex-start;

    gap: 15px;

    margin-top: 15px;

    padding: 18px;

    border-radius: 14px;

    background: #F8EEF5;

}


.info-box i {

    margin-top: 2px;

    color: var(--primary);

    font-size: 21px;

    flex-shrink: 0;

}


.info-box p {

    color: #3E3E3E;

    font-size: 13px;

    line-height: 1.6;

}


/* ==========================================================
   MENSAJE
========================================================== */

.recovery-message {

    display: none;

    margin-top: 18px;

    padding: 14px 16px;

    border-radius: 12px;

    font-size: 13px;

    line-height: 1.5;

}


.recovery-message.show {

    display: block;

}


.recovery-message.error {

    color: var(--error);

    background: #FDECEC;

}


.recovery-message.success {

    color: var(--success);

    background: #EDF7EE;

}


/* ==========================================================
   BOTÓN PRINCIPAL
========================================================== */

.recovery-button {

    width: 100%;

    min-height: 58px;

    margin-top: 22px;

    border: none;

    border-radius: 15px;

    background: linear-gradient(
        135deg,
        var(--primary-light),
        var(--primary)
    );

    color: var(--white);

    font-family: inherit;

    font-size: 15px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    cursor: pointer;

    transition: 0.25s ease;

}


.recovery-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(237, 0, 21, 0.22);

}


.recovery-button:active {

    transform: translateY(0);

}


.recovery-button.loading {

    pointer-events: none;

    opacity: 0.75;

}


/* ==========================================================
   SEPARADOR
========================================================== */

.separator {

    display: flex;

    align-items: center;

    gap: 18px;

    margin: 30px 0;

    color: #888;

    font-size: 13px;

}


.separator::before,
.separator::after {

    content: "";

    flex: 1;

    height: 1px;

    background: #E2E2E2;

}


.separator span {

    font-weight: 500;

}


/* ==========================================================
   VOLVER AL LOGIN
========================================================== */

.back-login-button {

    width: 100%;

    min-height: 56px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    border: 2px solid var(--primary);

    border-radius: 15px;

    color: var(--primary);

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition: 0.25s ease;

}


.back-login-button:hover {

    background: var(--primary);

    color: var(--white);

}


/* ==========================================================
   AYUDA
========================================================== */

.help-box {

    display: flex;

    align-items: flex-start;

    gap: 15px;

    margin-top: 30px;

    padding: 20px;

    background: #FAFAFA;

    border-radius: 15px;

}


.help-icon {

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #F7EAF2;

    color: var(--primary);

    font-size: 18px;

}


.help-box h3 {

    margin-bottom: 5px;

    font-size: 14px;

}


.help-box p {

    color: var(--text-light);

    font-size: 12px;

    line-height: 1.6;

}


/* ==========================================================
   RESPONSIVE - TABLET
========================================================== */

@media (max-width: 1100px) {

    .recovery-layout {

        grid-template-columns: 1fr 1fr;

    }


    .left-panel {

        padding: 30px 5% 40px;

    }


    .right-panel {

        padding: 30px 5%;

    }


    .recovery-card {

        padding: 38px;

    }


    .welcome {

        margin-top: 50px;

    }


    .welcome h2 {

        font-size: 40px;

    }


    .brand-logo {

        width: 70px;

        height: 70px;

    }


    .brand-text h1 {

        font-size: 23px;

    }

}


/* ==========================================================
   RESPONSIVE - TABLET PEQUEÑA
========================================================== */

@media (max-width: 850px) {

    .recovery-layout {

        display: block;

    }


    .left-panel {

        min-height: auto;

        padding: 30px 7% 45px;

    }


    .right-panel {

        min-height: auto;

        padding: 50px 7% 70px;

    }


    .welcome {

        max-width: 700px;

    }


    .welcome h2 {

        font-size: 42px;

    }


    .image-container {

        max-width: 700px;

    }


    .recovery-card {

        max-width: 700px;

    }

}


/* ==========================================================
   RESPONSIVE - CELULAR
========================================================== */

@media (max-width: 600px) {

    .left-panel {

        padding: 22px 20px 35px;

    }


    .back-link {

        margin-bottom: 25px;

        font-size: 12px;

    }


    .brand {

        gap: 11px;

    }


    .brand-logo {

        width: 58px;

        height: 58px;

    }


    .brand-text h1 {

        font-size: 19px;

        letter-spacing: -0.3px;

    }


    .brand-text p {

        font-size: 10px;

    }


    .welcome {

        margin-top: 45px;

    }


    .welcome h2 {

        font-size: 34px;

        letter-spacing: -1px;

    }


    .title-line {

        width: 65px;

        height: 3px;

        margin: 20px 0;

    }


    .welcome > p {

        font-size: 14px;

        line-height: 1.8;

    }


    .image-container {

        margin-top: 30px;

        border-radius: 16px;

        aspect-ratio: 4 / 3;

    }


    .right-panel {

        padding: 35px 20px 50px;

    }


    .recovery-card {

        padding: 28px 21px;

        border-radius: 20px;

    }


    .recovery-icon {

        width: 70px;

        height: 70px;

        font-size: 25px;

        margin-bottom: 22px;

    }


    .recovery-card > h2 {

        font-size: 29px;

        letter-spacing: -0.7px;

    }


    .card-description {

        font-size: 13px;

        line-height: 1.7;

    }


    #recoveryForm {

        margin-top: 28px;

    }


    .input-box {

        min-height: 54px;

        padding: 0 15px;

        border-radius: 13px;

    }


    .input-box input {

        height: 52px;

        font-size: 13px;

    }


    .info-box {

        padding: 15px;

        gap: 11px;

    }


    .info-box p {

        font-size: 11px;

    }


    .recovery-button {

        min-height: 55px;

        font-size: 13px;

    }


    .back-login-button {

        min-height: 53px;

        font-size: 12px;

    }


    .help-box {

        padding: 16px;

        gap: 11px;

    }


    .help-icon {

        width: 36px;

        height: 36px;

        font-size: 15px;

    }


    .help-box h3 {

        font-size: 12px;

    }


    .help-box p {

        font-size: 10px;

    }

}


/* ==========================================================
   CELULARES MUY PEQUEÑOS
========================================================== */

@media (max-width: 380px) {

    .brand-logo {

        width: 50px;

        height: 50px;

    }


    .brand-text h1 {

        font-size: 17px;

    }


    .brand-text p {

        font-size: 9px;

    }


    .welcome h2 {

        font-size: 29px;

    }


    .recovery-card {

        padding: 24px 17px;

    }


    .recovery-card > h2 {

        font-size: 26px;

    }

}


/* ==========================================================
   REDUCIR ANIMACIONES
========================================================== */

@media (prefers-reduced-motion: reduce) {

    * {

        scroll-behavior: auto !important;

        transition: none !important;

    }

}
.input-box:has(input.input-error) {
    border-color: var(--error);
}

.input-box:has(input.input-error):focus-within {
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.08);
}

/* ==========================================================
   MOSTRAR / OCULTAR CONTRASEÑA
   (usado en restablecer.html)
========================================================== */

.password-box {

    position: relative;

}


.toggle-password {

    background: none;

    border: none;

    cursor: pointer;

    color: #888;

    font-size: 16px;

    flex-shrink: 0;

    transition: 0.25s ease;

}


.toggle-password:hover {

    color: var(--primary);

}
