.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--bg, #f4f5fa);
}

.auth-content {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 145px);
    margin: -1.5rem -0.75rem;
    padding: 2rem 0.75rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.10), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(79, 70, 229, 0.08), transparent 45%),
        var(--bg, #f4f5fa);
    overflow-x: hidden;
}

.auth-page .login-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: clamp(1rem, 4vh, 2.5rem) 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 45px -18px rgba(30, 41, 59, 0.22);
    border: 1px solid #edeef5;
    overflow: hidden;
}

.login-card--unlock { max-width: 430px; }
.login-card--logout { max-width: 460px; }

.login-card__brand {
    text-align: center;
    padding: 2.1rem 2rem 1.4rem;
}
.login-card__logo {
    display: block;
    width: min(100%, 260px);
    height: 72px;
    margin: 0 auto 0.75rem;
    object-fit: contain;
}
.login-card__logo-dark {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 0.75rem;
    padding: 0.8rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.20), transparent 42%),
        linear-gradient(135deg, #0f172a, #111827 58%, #1e293b);
    box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.72);
}
.login-card__logo-dark .login-card__logo { margin-bottom: 0; }
.login-card__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-card__fallback[hidden],
.login-card__logo-dark[hidden] { display: none !important; }
.login-card__mark {
    width: 52px; height: 52px;
    margin: 0 auto 0.9rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand, #4f46e5), #8183f4);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}
.login-card__mark i { color: #fff; font-size: 1.5rem; }
.login-card__brand h4 { font-weight: 800; color: #1e293b; margin-bottom: 0.2rem; font-size: 1.35rem; }
.login-card__brand p { color: #94a3b8; font-size: 0.88rem; margin: 0; }

.login-card__body { padding: 0 2rem 2.1rem; }

.btn-social {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid #e7e9f2;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 0.92rem;
    transition: 0.15s;
    text-decoration: none;
}
.btn-social:hover { background: #f8f9fc; border-color: #d7d9ea; color: #1e293b; }
.btn-social .social-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}
.btn-social--google .social-icon { background: linear-gradient(135deg, #ea4335, #fbbc05); }
.btn-social--facebook .social-icon { background: #1877f2; }
.btn-social--linkedin .social-icon { background: #0a66c2; }

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 1.5rem 0 1.25rem;
}
.login-divider::before, .login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e7e9f2;
}

.login-card__body .form-label { font-weight: 600; color: #475569; font-size: 0.88rem; margin-bottom: 0.35rem; }
.login-card__body .form-control { padding: 0.65rem 0.9rem; border-radius: 10px; }

/* Estilos específicos para o campo de senha com olhinho */
.password-container { position: relative; }
.form-control-password { padding-right: 45px !important; }
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.toggle-password:hover { color: #4f46e5; }
.toggle-password:focus { outline: none; }

.btn-login-submit {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-dark, #4338ca), var(--brand, #4f46e5));
    color: #fff;
    margin-top: 0.4rem;
}
.btn-login-submit:hover { filter: brightness(1.06); color: #fff; }

.login-signup-link { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; }
.login-signup-link a { color: var(--brand, #4f46e5); font-weight: 600; text-decoration: none; }
.login-signup-link a:hover { text-decoration: underline; }

.logout-wrapper {
    background:
        radial-gradient(circle at 18% 16%, rgba(14, 165, 233, 0.11), transparent 34%),
        radial-gradient(circle at 82% 84%, rgba(79, 70, 229, 0.12), transparent 38%),
        var(--bg, #f4f5fa);
}

.logout-brand {
    padding-bottom: 0.85rem;
}

.logout-card__body {
    padding-top: 0.35rem;
    text-align: center;
}

.logout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 20px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    font-size: 1.7rem;
}

.logout-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--brand, #4f46e5);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.logout-card__body h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.45rem, 4vw, 1.8rem);
    font-weight: 800;
    line-height: 1.2;
}

.logout-description {
    max-width: 340px;
    margin: 0.75rem auto 1.5rem;
    color: #64748b;
    font-size: 0.93rem;
    line-height: 1.6;
}

.logout-actions {
    display: grid;
    gap: 0.75rem;
}

.logout-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 750;
}

.logout-confirm-button {
    border: 1px solid #dc2626;
    color: #fff;
    background: #dc2626;
    box-shadow: 0 10px 20px -12px rgba(220, 38, 38, 0.65);
}

.logout-confirm-button:hover,
.logout-confirm-button:focus-visible {
    border-color: #b91c1c;
    color: #fff;
    background: #b91c1c;
}

.logout-cancel-button {
    border: 1px solid #dbe2ec;
    color: #334155;
    background: #fff;
}

.logout-cancel-button:hover,
.logout-cancel-button:focus-visible {
    border-color: #a5b4fc;
    color: #3730a3;
    background: #f7f7ff;
}

.logout-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.3rem 0 0;
    color: #94a3b8;
    font-size: 0.79rem;
}

.logout-security-note i { color: #16a34a; }

.mfa-verify-wrapper {
    background:
        radial-gradient(circle at 14% 20%, rgba(14, 165, 233, 0.12), transparent 34%),
        radial-gradient(circle at 86% 80%, rgba(79, 70, 229, 0.13), transparent 38%),
        var(--bg, #f4f5fa);
}

.mfa-verify-card { max-width: 500px; }

.mfa-verify-brand {
    padding: 1.65rem 2.25rem 0.5rem;
    text-align: center;
}

.mfa-verify-logo {
    max-width: 250px;
    margin-bottom: 0;
}

.mfa-verify-logo .login-card__logo { height: 56px; }

.mfa-verify-body {
    padding: 1rem 2.5rem 2.25rem;
    text-align: center;
}

.mfa-security-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    color: #4f46e5;
    background: linear-gradient(145deg, #eef2ff, #eff6ff);
    box-shadow: 0 10px 22px -15px rgba(79, 70, 229, 0.65);
    font-size: 1.8rem;
}

.mfa-eyebrow {
    margin: 0 0 0.35rem;
    color: #4f46e5;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.mfa-verify-body h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.55rem, 4vw, 1.95rem);
    font-weight: 800;
    line-height: 1.2;
}

.mfa-description {
    max-width: 370px;
    margin: 0.75rem auto 1rem;
    color: #64748b;
    font-size: 0.94rem;
    line-height: 1.6;
}

.mfa-account {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
    padding: 0.48rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 650;
}

.mfa-account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mfa-account i { color: #16a34a; }

.mfa-messages {
    margin-bottom: 1rem;
    text-align: left;
}

.mfa-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.86rem;
}

.mfa-verify-form { text-align: left; }

.mfa-code-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 750;
}

.mfa-code-input {
    height: 58px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #172033;
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: 0.48em;
    text-align: center;
    text-indent: 0.48em;
}

.mfa-code-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.22rem rgba(99, 102, 241, 0.14);
}

.mfa-code-field > span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

.mfa-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    margin-top: 1.25rem;
}

.mfa-support-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1.15rem 0;
    padding: 0.72rem 0.8rem;
    border-radius: 10px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: left;
}

.mfa-support-note i {
    flex: 0 0 auto;
    color: #0ea5e9;
}

.mfa-cancel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 650;
    text-decoration: none;
}

.mfa-cancel-link:hover,
.mfa-cancel-link:focus-visible {
    color: #b91c1c;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .auth-page .login-wrapper {
        align-items: flex-start;
        padding: 1rem 0.75rem;
    }

    .login-card {
        max-width: 100%;
        border-radius: 16px;
    }

    .login-card__brand {
        padding: 1.5rem 1.25rem 1rem;
    }

    .login-card__logo { height: 60px; }

    .login-card__body {
        padding: 0 1.25rem 1.5rem;
    }

    .mfa-verify-brand { padding: 1.25rem 1.25rem 0.35rem; }
    .mfa-verify-body { padding: 0.8rem 1.25rem 1.5rem; }
    .mfa-security-icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 1.55rem;
    }
    .mfa-code-input { font-size: 1.35rem; }
}

@media (max-height: 680px) {
    .auth-page .login-wrapper { align-items: flex-start; }
    .login-card__brand { padding-top: 1.35rem; }
    .login-card__mark {
        width: 44px;
        height: 44px;
        margin-bottom: 0.65rem;
    }
    .login-card__logo { height: 52px; }
}
