
/* ========== FUENTES ========== */

@font-face {
    font-family: 'AstonScript';
    src: url('font/AstonScript.woff2') format('woff2'),
         url('font/AstonScript.woff') format('woff'),
         url('font/AstonScript.ttf') format('truetype'),
         url('font/AstonScript.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* ========== BASE ========== */

:root {
    --auth-bg: #fdf8f3;
    --auth-field: #f0ebe4;
    --auth-text: #2c2c2c;
    --auth-soft: #77736d;
    --auth-green: #2e7d32;
    --auth-green-dark: #1e4d2b;
    --auth-accent: #e65100;
    --auth-line: rgba(30, 77, 43, 0.13);
    --auth-radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    padding: 38px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}


/* ========== CONTENEDOR ========== */

.auth-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: auth-entrance 0.7s cubic-bezier(.22, 1, .36, 1) both;
}

.auth-logo {
    margin-bottom: 25px;
    color: var(--auth-green-dark);
    font-family: 'AstonScript', 'Helvetica Neue', Arial, sans-serif;
    font-size: 48px;
    line-height: 1.2;
    text-decoration: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-logo:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}


/* ========== TARJETA ========== */

.auth-card {
    width: 100%;
    padding: 38px;
    border: 1px solid rgba(30, 77, 43, 0.07);
    border-radius: var(--auth-radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        0 12px 45px rgba(30, 77, 43, 0.045),
        0 2px 8px rgba(30, 77, 43, 0.025);
}

.auth-heading {
    margin-bottom: 27px;
    text-align: center;
}

.auth-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--auth-green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.2px;
}

.auth-heading h1 {
    margin-bottom: 10px;
    color: var(--auth-green-dark);
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 6vw, 34px);
    font-weight: 400;
    line-height: 1.2;
}

.auth-heading p {
    color: var(--auth-soft);
    font-size: 13px;
    line-height: 1.8;
}


/* ========== BOTÓN GOOGLE ========== */

.google-btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid var(--auth-line);
    border-radius: 9px;
    background: #fff;
    color: var(--auth-text);
    font-size: 13px;
    cursor: pointer;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.google-btn svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.google-btn:hover {
    border-color: rgba(30, 77, 43, 0.28);
    background: #fefdfb;
    box-shadow: 0 5px 15px rgba(30, 77, 43, 0.06);
    transform: translateY(-1px);
}


/* ========== DIVISOR ========== */

.auth-divider {
    margin: 23px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-divider span {
    height: 1px;
    flex: 1;
    background: var(--auth-line);
}

.auth-divider p {
    color: #99948d;
    font-size: 11px;
    white-space: nowrap;
}


/* ========== FORMULARIOS ========== */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label,
.password-label label {
    color: #41453f;
    font-size: 12px;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    height: 47px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--auth-text);
    font-size: 13px;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.form-field input::placeholder {
    color: #aaa69f;
}

.form-field input:focus {
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.09);
}

.password-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.password-label a {
    color: var(--auth-green);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.password-label a:hover {
    color: var(--auth-accent);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8e9188;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password:hover {
    color: var(--auth-green-dark);
    background: var(--auth-field);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.field-hint {
    color: #99948d;
    font-size: 11px;
    line-height: 1.5;
}


/* ========== TÉRMINOS ========== */

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--auth-soft);
    font-size: 11px;
    line-height: 1.7;
    cursor: pointer;
}

.terms-label input {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--auth-green);
}

.terms-label a {
    color: var(--auth-green);
}


/* ========== BOTÓN PRINCIPAL ========== */

.auth-submit {
    width: 100%;
    min-height: 49px;
    padding: 13px 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 9px;
    background: var(--auth-green-dark);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.auth-submit span {
    font-size: 17px;
    font-weight: 400;
    transition: transform 0.25s ease;
}

.auth-submit:hover {
    background: var(--auth-green);
    box-shadow: 0 6px 18px rgba(30, 77, 43, 0.13);
    transform: translateY(-1px);
}

.auth-submit:hover span {
    transform: translateX(3px);
}

.auth-submit:active {
    transform: scale(0.99);
}


/* ========== MENSAJES ========== */

.form-message {
    display: none;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
}

.form-message:not(:empty) {
    display: block;
}

.form-message.info {
    background: #f0ebe4;
    color: var(--auth-green-dark);
}


/* ========== ENLACES INFERIORES ========== */

.auth-switch {
    margin-top: 25px;
    color: var(--auth-soft);
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

.auth-switch a {
    margin-left: 3px;
    color: var(--auth-green);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: var(--auth-accent);
}

.back-home {
    margin-top: 24px;
    color: var(--auth-soft);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-home:hover {
    color: var(--auth-green-dark);
    transform: translateX(-2px);
}

.auth-legal {
    margin-top: 22px;
    color: #aaa49b;
    font-size: 10px;
    text-align: center;
}


/* ========== RECUPERACIÓN ========== */

.recovery-card {
    padding-top: 40px;
    padding-bottom: 40px;
}

.recovery-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8eee5;
    color: var(--auth-green-dark);
}

.recovery-icon svg {
    width: 25px;
    height: 25px;
}

.recovery-back {
    display: block;
    margin-top: 23px;
    color: var(--auth-green);
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease;
}

.recovery-back:hover {
    color: var(--auth-accent);
}


/* ========== ANIMACIONES ========== */

@keyframes auth-entrance {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========== RESPONSIVE ========== */

@media (max-width: 480px) {
    body.auth-page {
        padding: 25px 15px;
        align-items: flex-start;
    }

    .auth-container {
        margin: auto 0;
    }

    .auth-logo {
        margin-bottom: 22px;
        font-size: 43px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 15px;
    }

    .auth-heading {
        margin-bottom: 24px;
    }

    .auth-heading h1 {
        font-size: 29px;
    }

    .auth-divider {
        margin: 21px 0;
    }
}


/* ========== ACCESIBILIDAD ========== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
