/* ============================================================
   Pantalla de entrada (login / recuperar / nueva contraseña)
   Diseño a dos columnas recuperado de la versión NutriTracker:
   panel visual amarillo + tarjeta de formulario.
   Carga después de styles.css y sobreescribe sus reglas de
   #auth-screen (fondo azul antiguo y blobs decorativos).
   ============================================================ */

#auth-screen {
    background: #FFFFFF;
    overflow: auto;
}

#auth-screen::before,
#auth-screen::after {
    display: none !important;
}

#auth-screen.active {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
}

/* === Panel visual (izquierda en escritorio) === */
.auth-visual {
    display: none;
    position: relative;
    background: #FFCC00;
    color: #1d1d1f;
    padding: 56px 56px 48px;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 45%),
        radial-gradient(circle at 10% 90%, rgba(29,29,31,0.08) 0%, rgba(29,29,31,0) 50%);
    pointer-events: none;
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: auto;
}

.auth-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #1d1d1f;
    color: #FFCC00;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.auth-brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1d1d1f;
}

.auth-visual-headline {
    font-size: 44px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: #1d1d1f;
    margin: 56px 0 18px;
}

.auth-visual-headline em {
    font-style: normal;
    background: #1d1d1f;
    color: #FFCC00;
    padding: 0 10px;
    border-radius: 8px;
    display: inline-block;
}

.auth-visual-sub {
    font-size: 17px;
    line-height: 1.5;
    color: rgba(29,29,31,0.78);
    font-weight: 500;
    margin-bottom: 36px;
    max-width: 420px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 0 40px;
    padding: 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.auth-feat-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #FFCC00;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-quote {
    margin-top: auto;
    padding: 20px 22px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    border: 1px solid rgba(29,29,31,0.08);
}

.auth-quote-text {
    font-size: 15px;
    line-height: 1.5;
    color: #1d1d1f;
    font-weight: 500;
    margin: 0 0 10px;
}

.auth-quote-author {
    font-size: 13px;
    color: rgba(29,29,31,0.65);
    font-weight: 600;
}

/* === Lado del formulario === */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #FFFFFF;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 28px;
    animation: authFadeIn 0.35s ease-out;
}

.auth-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-mobile-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #FFCC00;
    color: #1d1d1f;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
}

.auth-mobile-name {
    font-size: 15px;
    font-weight: 800;
    color: #1d1d1f;
}

/* === Formularios === */
.auth-card .auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 4px;
}

.auth-form-header h1,
.auth-form-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    margin: 0 0 6px;
}

.auth-form-header p {
    font-size: 15px;
    font-weight: 500;
    color: #6e6e73;
    margin: 0;
    line-height: 1.5;
}

.auth-notice {
    padding: 14px 16px;
    border-radius: 14px;
    background: #FFF5CC;
    border: 1px solid #FFE066;
    text-align: center;
}

.auth-notice p {
    font-size: 13px;
    color: #1d1d1f;
    line-height: 1.5;
    margin: 0 0 8px;
    font-weight: 500;
}

.auth-notice a {
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    text-decoration: none;
    border-bottom: 2px solid #FFCC00;
    padding-bottom: 2px;
}

.auth-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6e6e73;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #f5f5f7;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    color: #1d1d1f;
    background: #FAFAFA;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.auth-card input:focus {
    border-color: #FFCC00;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

.auth-error {
    font-size: 13px;
    font-weight: 600;
    color: #E74C3C;
    background: #FFF5F5;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #FED7D7;
    margin: 0;
}

.auth-success {
    font-size: 13px;
    font-weight: 600;
    color: #1d7a3a;
    background: #F0FBF4;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #BFE8CD;
    margin: 0;
    line-height: 1.5;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    font-size: 15px;
    font-family: inherit;
    color: #1d1d1f;
    background: #FFCC00;
    box-shadow: 0 4px 14px rgba(255, 204, 0, 0.45);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
    letter-spacing: -0.005em;
}

.auth-btn:hover:not(:disabled) {
    background: #FFD60A;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 204, 0, 0.5);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f5f5f7;
}

.auth-divider span {
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-link-primary {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    border-bottom: 2px solid #FFCC00;
    padding-bottom: 1px;
    align-self: center;
}

.auth-link-muted {
    font-size: 13px;
    font-weight: 500;
    color: #6e6e73;
    text-decoration: none;
}

.auth-link-muted:hover {
    color: #1d1d1f;
}

/* Aviso de email enviado (estado de éxito de recuperación) */
.auth-sent-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FFF5CC;
    border: 1px solid #FFE066;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 26px;
}

/* === Escritorio: dos columnas === */
@media (min-width: 900px) {
    #auth-screen.active {
        grid-template-columns: 1.05fr 1fr;
    }
    .auth-visual {
        display: block;
    }
    .auth-mobile-brand {
        display: none;
    }
    .auth-card {
        padding: 44px 32px;
    }
}

@media (max-width: 440px) {
    .auth-form-side {
        padding: 16px 12px 32px;
        align-items: flex-start;
        padding-top: 36px;
    }
    .auth-card {
        padding: 24px 14px;
    }
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
