/* ─── FinanceFlow — Telas de Autenticação ─────────────────────────────────── */

/* ── Layout da página ─────────────────────────────────────────────────────── */
.auth-page {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-container--wide {
    max-width: 680px;
}

/* ── Marca ────────────────────────────────────────────────────────────────── */
.auth-brand {
    text-align: center;
    color: #fff;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
}

.auth-brand__name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.auth-brand__slogan {
    font-size: .9rem;
    opacity: .85;
}

/* ── Card do formulário ───────────────────────────────────────────────────── */
.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.auth-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.auth-card__subtitle {
    font-size: .9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-card__hint {
    margin-top: 14px;
    font-size: .8rem;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}

/* ── Layout de duas colunas no cadastro ───────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .auth-card { padding: 24px 20px; }
}

/* ── Label com link à direita ─────────────────────────────────────────────── */
.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.auth-link--right {
    font-size: .8rem;
    font-weight: 400;
    color: var(--color-primary-light);
}

/* ── Campo de senha com botão de toggle ───────────────────────────────────── */
.input-password {
    position: relative;
}

.input-password .form-control {
    padding-right: 42px;
}

.input-password__toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.input-password__toggle:hover {
    color: var(--color-primary);
}

/* ── Indicador de força da senha ──────────────────────────────────────────── */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-strength__bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.password-strength__fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    transition: width .3s ease, background .3s ease;
}

.password-strength__label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 50px;
}

/* ── Checkbox de termos ───────────────────────────────────────────────────── */
.form-group--checkbox {
    margin-top: 4px;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 400 !important;
    color: var(--color-text-muted);
    justify-content: flex-start !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--color-primary-light);
}

/* ── Rodapé do card ───────────────────────────────────────────────────────── */
.auth-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: .88rem;
    color: var(--color-text-muted);
}

.auth-footer-text a {
    color: var(--color-primary-light);
    font-weight: 600;
}

/* ── Botão submit ─────────────────────────────────────────────────────────── */
.auth-card .btn--primary {
    margin-top: 8px;
    padding: 13px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

/* ── Alerta de convidado ──────────────────────────────────────────────────── */
.auth-card .alert {
    margin-bottom: 20px;
}

/* ── Animação de entrada ──────────────────────────────────────────────────── */
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: authFadeIn .4s ease both;
}

.auth-brand {
    animation: authFadeIn .3s ease both;
}
