/* ==========================================================
   MALVINAS GYM
   AUTENTICACIÓN
   Login / Recuperación de contraseña
   ========================================================== */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--offwhite);
}


/* ==========================================================
   PANEL IZQUIERDO
   ========================================================== */

.auth-brand {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 48px;

    color: var(--white);

    background:
        linear-gradient(
            160deg,
            rgba(0, 16, 31, 0.88),
            rgba(11, 42, 72, 0.82)
        ),
        url('/static/core/img/hero/hero-2.jpg')
        center / cover no-repeat;
}


.auth-brand-top .brand-logo {
    height: 56px;
    margin-bottom: 32px;
}


.auth-brand-title {
    max-width: 460px;

    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 40px);

    line-height: 1.2;
    letter-spacing: 1px;

    text-transform: uppercase;
}


.auth-brand-title strong {
    color: var(--gold-400);
}


.auth-brand-text {
    max-width: 420px;

    margin-top: 18px;

    color: var(--silver-300);

    font-size: 15px;
    line-height: 1.7;
}


.auth-brand-foot {
    display: flex;
    align-items: center;

    gap: 10px;

    color: var(--silver-400);

    font-size: 13px;
}


.auth-brand-foot i {
    color: var(--gold-400);
}


/* ==========================================================
   PANEL DERECHO
   ========================================================== */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px;
}


.auth-card {
    width: 100%;
    max-width: 400px;
}


.auth-card-header {
    margin-bottom: 28px;
}


.auth-card-eyebrow {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--gold-500);

    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;

    letter-spacing: 2px;
    text-transform: uppercase;
}


.auth-card-header h1 {
    color: var(--navy-900);

    font-family: var(--font-display);
    font-size: 28px;

    letter-spacing: 0.5px;
    text-transform: uppercase;
}


.auth-card-header p {
    margin-top: 8px;

    color: var(--ink-soft);

    font-size: 14.5px;
    line-height: 1.6;
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

.auth-form {
    display: grid;
    gap: 18px;
}


.auth-field {
    display: grid;
    gap: 6px;
}


.auth-field label {
    color: var(--navy-800);

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

    letter-spacing: 0.5px;
    text-transform: uppercase;
}


.auth-field input {
    width: 100%;

    padding: 13px 16px;

    border: 1.5px solid var(--silver-400);
    border-radius: var(--radius-sm);

    background: var(--white);

    color: var(--ink);

    font-family: var(--font-body);
    font-size: 15px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}


.auth-field input:focus {
    outline: none;

    border-color: var(--navy-500);

    box-shadow:
        0 0 0 3px rgba(28, 77, 120, 0.15);
}


.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    margin-top: -6px;
}


/* ==========================================================
   LINKS
   ========================================================== */

.auth-link {
    color: var(--navy-600);

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

    text-decoration: none;

    border-bottom: 1px solid transparent;

    transition:
        color var(--transition),
        border-color var(--transition);
}


.auth-link:hover {
    color: var(--gold-500);

    border-bottom-color: var(--gold-500);
}


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

.auth-submit {
    margin-top: 6px;
}


/* ==========================================================
   PIE DE LA TARJETA
   ========================================================== */

.auth-card-footer {
    margin-top: 26px;

    text-align: center;

    color: var(--ink-soft);

    font-size: 14px;
}


/* ==========================================================
   ALERTAS
   ========================================================== */

.auth-alert {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 13px 16px;

    margin-bottom: 4px;

    border-radius: var(--radius-sm);

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


.auth-alert i {
    margin-top: 2px;
}


.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
}


.auth-alert-success {
    background: #dcfce7;
    color: #166534;
}


.auth-alert-info {
    background: #dbeafe;
    color: #1e40af;
}


/* ==========================================================
   ERRORES Y AYUDA
   ========================================================== */

.auth-field-errors {
    margin-top: -2px;

    color: #b91c1c;

    font-size: 12.5px;
}


.auth-help-text {
    margin-top: -2px;

    color: var(--ink-soft);

    font-size: 12.5px;
}


/* ==========================================================
   ICONOS DE ESTADO
   ========================================================== */

.auth-icon-badge {
    width: 56px;
    height: 56px;

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

    margin-bottom: 18px;

    border-radius: 50%;

    font-size: 22px;
}


.auth-icon-badge-success {
    background: #dcfce7;
    color: #166534;
}


.auth-icon-badge-info {
    background: var(--gold-100);
    color: var(--navy-800);
}


/* Cambio de contraseña: ayuda, errores y acción secundaria. */
.auth-panel,
.auth-card,
.auth-field {
    min-width: 0;
}

.auth-link-button {
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.auth-password-help {
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid var(--silver-300);
    border-radius: var(--radius-sm);
    background: var(--silver-300);
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.35;
}

.auth-password-help-title {
    margin-bottom: 5px;
    color: var(--navy-800);
    font-weight: 600;
}

.auth-password-help-title i {
    margin-right: 6px;
    color: var(--gold-500);
}

.auth-password-help ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-password-help li {
    position: relative;
    padding-left: 15px;
}

.auth-password-help li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-500);
}

.auth-password-help li + li {
    margin-top: 2px;
}

.auth-field-errors .errorlist,
.auth-alert .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-field-errors,
.auth-help-text,
.auth-password-help,
.auth-alert {
    overflow-wrap: anywhere;
}

.auth-field input[aria-invalid="true"] {
    border-color: #b91c1c;
}

/* ==========================================================
   VISIBILIDAD DE CONTRASEÑA
   ========================================================== */

.password-input {
    position: relative;
    min-width: 0;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--navy-600);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--gold-100);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--navy-500);
    outline-offset: -2px;
}

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

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        padding: 24px;
    }

}
