/*
 * Auth Pages
 * Fonte compartilhada para login, recuperação e ativação de conta.
 */

body.auth-page {
    min-height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(22, 219, 255, 0.12), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(102, 126, 234, 0.15), transparent 28%),
        #0b132b;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: #e8ecf4;
    font-family: var(--font-sans);
}

body.auth-page--image-one {
    background-image: url("../../public/images/auth-bg/bg-1.jpg");
}

body.auth-page--unauthorized {
    background-image: url("../../images/auth-bg/bg-16.jpg");
}

.auth-page .login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100dvh;
    padding: 40px 16px;
}

.auth-page .login-wrapper {
    width: 100%;
    max-width: 520px;
    padding: 0 12px;
}

.auth-page .login-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 28, 50, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.auth-page .login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(22, 219, 255, 0.18), transparent 45%);
    pointer-events: none;
}

.auth-page .login-logo,
.auth-page .login-content {
    position: relative;
    z-index: 1;
}

.auth-page .login-logo img {
    width: 100%;
    max-width: 260px;
}

.auth-page .login-logo .auth-logo--compact {
    max-width: 240px;
}

.auth-page .login-subtitle {
    margin-top: 12px;
    margin-bottom: 12px;
    color: rgba(232, 236, 244, 0.7);
}

.auth-page--login .login-subtitle {
    margin-bottom: 24px;
}

.auth-page--forgot .login-subtitle {
    margin-bottom: 0;
}

.auth-page .login-content {
    width: 100%;
    padding: 0 40px 40px !important;
}

.auth-page--forgot .login-content {
    padding-top: 24px !important;
}

.auth-page .login-content label {
    color: #c9d4e7;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.auth-page .login-content form,
.auth-page .login-content .input-group,
.auth-page .login-content .form-control {
    width: 100%;
}

.auth-page .login-content .input-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
}

.auth-page .login-content .form-control {
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0 10px 10px 0;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-weight: 400;
}

.auth-page .login-content .form-control::placeholder {
    color: rgba(232, 236, 244, 0.55);
    font-weight: 400;
}

.auth-page .login-content .form-control:focus {
    border-color: #16dbff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 0 0.1rem rgba(22, 219, 255, 0.25) !important;
}

.auth-page .login-content .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px 0 0 10px;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #c9d4e7;
}

.auth-page .login-content .input-group > .input-group-text:last-child {
    border-radius: 0 10px 10px 0;
}

.auth-page .login-content a {
    font-weight: 500;
}

.auth-page .slider-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 0 12px;
}

.auth-page .slider-container input[type="range"] {
    accent-color: #16dbff;
}

.auth-page .activate-account-alert {
    border: 1px solid rgba(22, 219, 255, 0.45);
    border-radius: 10px;
    background: rgba(22, 219, 255, 0.12);
    color: #dff8ff;
    font-weight: 600;
}

.auth-page .login-content .alert-danger,
.auth-page .login-content .alert-success {
    border-width: 1px;
    border-radius: 10px;
}

.auth-page .password-help {
    display: block;
    margin-top: 6px;
    color: rgba(232, 236, 244, 0.62);
    font-size: 11px;
    line-height: 1.35;
}

.auth-page .forgot-password-link {
    color: rgba(232, 236, 244, 0.7);
    font-weight: 300;
    transition: color 150ms ease;
}

.auth-page .forgot-password-link:hover,
.auth-page .forgot-password-link:focus {
    color: #16dbff;
}

.auth-page .alert {
    transition: opacity 300ms ease;
}

.auth-page .alert.is-dismissing {
    opacity: 0;
}

.auth-page #testCredentials[hidden],
.auth-page [hidden] {
    display: none !important;
}

.auth-page .auth-shield-icon {
    font-size: 4rem;
}

.auth-mfa__title {
    margin: 20px 0 0;
    color: rgba(232, 236, 244, 0.7);
    font-size: 14px;
    font-weight: 400;
}

.auth-mfa__content {
    padding-top: 20px !important;
}

.auth-mfa__verify-form {
    margin-top: 10px;
}

.auth-mfa__steps {
    margin: 0 0 20px;
    padding-left: 20px;
    color: rgba(232, 236, 244, 0.82);
    font-size: 0.875rem;
}

.auth-mfa__qr {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin-bottom: 16px;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    color: #172038;
    text-align: center;
}

.auth-mfa__qr img {
    display: block;
    max-width: 100%;
    height: auto;
}

.auth-mfa__secret {
    display: grid;
    gap: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.auth-mfa__secret span {
    color: rgba(232, 236, 244, 0.66);
    font-size: 0.75rem;
}

.auth-mfa__secret code,
.auth-mfa__codes code {
    background: transparent;
    color: #dff8ff;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.auth-mfa__secret code {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.auth-mfa__codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.auth-mfa__codes li {
    padding: 10px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

@media (max-width: 991px) {
    .auth-page .login-page {
        padding: 32px 16px;
    }
}

@media (max-width: 575px) {
    .auth-page .login-page {
        padding: 24px 12px;
    }

    .auth-page .login-card {
        border-top-width: 3px;
        border-bottom-width: 3px;
    }

    .auth-page .content-top-agile {
        padding: 30px 20px 10px !important;
    }

    .auth-page .login-content,
    .auth-page--forgot .login-content {
        padding: 0 20px 28px !important;
    }

    .auth-page--forgot .login-content {
        padding-top: 28px !important;
    }

    .auth-page .slider-container {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }

    .auth-page #sliderValue {
        text-align: right;
    }

    .auth-mfa__codes {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
