/* ═══ Split-Screen Auth Layout ═══ */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* ── Hero Side ── */
.auth-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 211, 102, 0.08), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(7, 94, 84, 0.06), transparent 50%),
        var(--bg-primary);
}

.auth-hero::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-glass), transparent);
}

.auth-hero-content {
    max-width: 520px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: var(--wpp-green);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--wpp-green), #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hero-feature-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpp-green);
    font-size: 0.9rem;
}

.hero-feature strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hero-feature span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Form Side ── */
.auth-form-side {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.5s ease;
}

/* ── Misc ── */
.forgot-link {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

.auth-card .auth-title {
    margin-bottom: 12px;
}

/* Aviso do limite de tentativas (cookie RateLimitMsg). O laranja claro some no tema claro. */
.alert-glass.alert-warn {
    background: rgba(255, 170, 51, .12);
    border-color: rgba(255, 170, 51, .3);
    color: #ffaa33;
}

/* ── Tema claro: o verde vivo do tema escuro fica abaixo de 3:1 sobre branco ── */
[data-theme="light"] .hero-badge,
[data-theme="light"] .forgot-link,
[data-theme="light"] .auth-link a {
    color: var(--accent-hover);
}

[data-theme="light"] .hero-highlight {
    background: linear-gradient(135deg, var(--wpp-green-dark), #075E54);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .alert-glass.alert-warn {
    color: #8a5300;
}

/* ── Notebook baixo (1366×768 com as barras do navegador): cartão mais enxuto ── */
@media (min-width: 993px) and (max-height: 800px) {
    .auth-form-side {
        padding: 24px 40px;
    }

    .auth-card {
        padding: 28px 40px;
    }

    .auth-card .auth-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .auth-subtitle {
        margin-bottom: 20px;
    }
}

/* ── Responsive ── */
/* No celular o formulário é a ação da página: o marketing vira só o título, e o
   cartão vem logo abaixo, sem o selo e o parágrafo de 5 linhas que o empurravam
   para fora da tela. */
@media (max-width: 992px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-hero {
        /* flex:1 faria o título crescer e empurrar o cartão para baixo em telas altas */
        flex: none;
        align-self: stretch;
        padding: 20px 20px 8px;
    }

    .auth-hero::after {
        display: none;
    }

    .hero-badge,
    .hero-description,
    .hero-features {
        display: none;
    }

    .hero-title {
        font-size: 1.35rem;
        margin-bottom: 0;
        text-align: center;
    }

    .auth-form-side {
        flex: none;
        padding: 0 24px 40px;
    }
}

@media (max-width: 768px) {
    .auth-card .auth-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .auth-subtitle {
        margin-bottom: 20px;
    }

    .auth-form .form-group {
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .auth-hero {
        padding: 16px 16px 8px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .auth-form-side {
        padding: 0 16px 32px;
    }

    .auth-card {
        padding: 24px 20px !important;
    }
}

/* ── Toque: links com área de pelo menos ~36px de altura ── */
@media (pointer: coarse) {
    .auth-link a {
        display: inline-block;
        padding: 10px 6px;
    }

    .forgot-link {
        width: fit-content;
        margin: 0 0 0 auto;
        padding: 10px 0 10px 12px;
    }
}
