.bg-auth-page {
    background: url('../../galerias/background.png') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.auth-login-container {
    max-width: 460px;
    margin: 0 auto;
}

.auth-register-container {
    max-width: 760px;
    margin: 0 auto;
}

.auth-login-container .card,
.auth-register-container .card,
.auth-login-container .card-body,
.auth-register-container .card-body {
    border-radius: 22px !important;
}

.auth-theme-card {
    background: linear-gradient(165deg, rgba(9, 12, 20, 0.95), rgba(25, 28, 40, 0.93));
    border: 1px solid rgba(214, 175, 91, 0.22) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}

.auth-theme-card .card-body {
    background: transparent;
}

.auth-theme-card .card-body.border,
.auth-theme-card .card-body[class*="border"] {
    border-color: transparent !important;
}

.auth-theme-card .auth-title-section h2,
.auth-theme-title {
    color: #ffffff !important;
    font-weight: 700;
}

.auth-theme-card .auth-title-section p,
.auth-theme-subtitle {
    color: rgba(255, 255, 255, 0.75) !important;
}

.auth-theme-card .form-label,
.auth-theme-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
}

.auth-theme-card .input-group-text,
.auth-theme-input-group-text {
    min-width: 42px;
    justify-content: center;
    border-radius: 999px 0 0 999px;
    border-right: 0;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(214, 175, 91, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.auth-theme-card .form-control,
.auth-theme-card .form-select,
.auth-theme-input {
    min-height: 46px;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(214, 175, 91, 0.4);
    color: #ffffff;
}

.auth-theme-card .form-control::placeholder,
.auth-theme-card .form-select::placeholder,
.auth-theme-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-theme-card .form-control:focus,
.auth-theme-card .form-select:focus,
.auth-theme-input:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.auth-theme-card .form-control[readonly],
.auth-theme-card .form-control:read-only,
body.bg-auth-page input[readonly] {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(214, 175, 91, 0.35) !important;
    color: rgba(255, 255, 255, 0.78) !important;
}
.auth-theme-card select.form-control{
    cursor: pointer;
}

.auth-theme-card .form-control[readonly]:focus,
.auth-theme-card .form-control:read-only:focus,
body.bg-auth-page input[readonly]:focus {
    box-shadow: none !important;
    border-color: rgba(214, 175, 91, 0.35) !important;
    background: rgba(255, 255, 255, 0.18) !important;
}

.auth-theme-card .form-select option {
    color: #1f2937;
    background: #ffffff;
}

body.bg-auth-page input:-webkit-autofill,
body.bg-auth-page input:-webkit-autofill:hover,
body.bg-auth-page input:-webkit-autofill:focus,
body.bg-auth-page input:-webkit-autofill:active,
body.bg-auth-page textarea:-webkit-autofill,
body.bg-auth-page textarea:-webkit-autofill:hover,
body.bg-auth-page textarea:-webkit-autofill:focus,
body.bg-auth-page textarea:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.14) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.14) inset !important;
    border-color: rgba(214, 175, 91, 0.55) !important;
    transition: background-color 9999s ease-in-out 0s !important;
}

.auth-login-container .input-group input {
    border-radius: 0 999px 999px 0 !important;
    min-height: 40px !important;
    max-height: 40px !important;
}

.auth-theme-btn-primary {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.8rem 1rem;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-color-theme-hover));
    border: 0;
    color: #151515 !important;
}

.auth-theme-btn-primary:hover {
    color: #151515 !important;
    filter: brightness(1.05);
}

.auth-theme-btn-secondary {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(214, 175, 91, 0.55);
    color: #f7f1e4 !important;
}

.auth-theme-btn-secondary:hover {
    background: rgba(214, 175, 91, 0.2);
    border-color: var(--bs-primary);
    color: #fff8e8 !important;
}

.auth-theme-link {
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
}

.auth-theme-link:hover {
    color: var(--bs-primary);
}

@media (max-width: 768px) {
    .auth-login-container {
        max-width: 88%;
        margin: 40px auto;
    }

    .auth-register-container {
        max-width: 92%;
        margin: 40px auto;
    }
}

/* Login page specific */
.auth-login-split-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.auth-process-card,
.auth-login-card {
    --animate-duration: 0.75s;
}

.auth-login-split-container > .text-center.mb-4 {
    display: none;
}

.auth-login-split-grid .card {
    border-radius: 22px !important;
    border: 1px solid rgba(214, 175, 91, 0.22);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}

.auth-process-card {
    background: linear-gradient(165deg, rgba(214, 175, 91, 0.2), rgba(27, 31, 44, 0.84));
}

.auth-login-card {
    background: linear-gradient(165deg, rgba(18, 24, 39, 0.35), rgba(25, 28, 40, 0.33));
}

.auth-process-title {
    color: #ffffff;
    font-weight: 700;
}

.auth-process-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.auth-process-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.process-step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(7, 10, 17, 0.52);
    border: 1px solid rgba(214, 175, 91, 0.24);
    border-radius: 12px;
    padding: 14px;
}

.step-anim-1 {
    --animate-duration: 0.55s;
    --animate-delay: 0.05s;
    animation-delay: 0.05s;
}

.step-anim-2 {
    --animate-duration: 0.65s;
    --animate-delay: 0.12s;
    animation-delay: 0.12s;
}

.step-anim-3 {
    --animate-duration: 0.75s;
    --animate-delay: 0.2s;
    animation-delay: 0.2s;
}

.process-step-item .step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: var(--bs-primary);
    color: #1d1d1d;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(214, 175, 91, 0.4);
}

.process-step-item h6 {
    color: #ffffff;
    font-weight: 700;
}

.process-step-item p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.auth-register-cta {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(214, 175, 91, 0.55);
    color: #f7f1e4;
}

.auth-register-cta:hover {
    background: rgba(214, 175, 91, 0.2);
    border-color: var(--bs-primary);
    color: #fff8e8;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(2px);
}

.auth-login-logo {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.auth-login-title {
    color: #ffffff;
    font-weight: 700;
}

.auth-login-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.auth-form-label {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

.auth-login-card .input-group-text {
    min-width: 42px;
    justify-content: center;
    border-radius: 999px 0 0 999px;
    border-right: 0;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(214, 175, 91, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.auth-login-card .form-control {
    min-height: 46px;
    font-size: 1rem !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(214, 175, 91, 0.4);
    color: #ffffff;
}

.auth-login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-login-card .form-control:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
    background: rgba(255, 255, 255, 0.14);
}

.auth-forgot-link {
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    font-size: 0.92rem;
}

.auth-forgot-link:hover {
    color: var(--bs-primary);
}

.auth-login-submit {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.8rem 1rem;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-color-theme-hover));
    border: 0;
    color: #151515;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.auth-login-submit:hover {
    color: #151515;
    filter: brightness(1.08);
}

.auth-login-submit:focus-visible {
    color: #151515;
    outline: none;
    box-shadow:
        0 0 0 3px rgba(214, 175, 91, 0.45),
        0 0 16px rgba(214, 175, 91, 0.4);
}

.auth-login-success {
    min-height: 360px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-login-success-icon {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--bs-primary), var(--bs-color-theme-hover));
    color: #1b1b1b;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(214, 175, 91, 0.45);
}

.auth-login-success-title {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
}

@media (max-width: 991.98px) {
    .auth-login-split-container {
        max-width: 90%;
        margin-top: 32px;
        margin-bottom: 32px;
    }

    .auth-login-split-grid .card {
        min-height: auto;
    }

    .auth-login-logo {
        max-width: 140px;
    }
}

@media (max-width: 767.98px) {
    /* Evita "trêmulo" e deslocamento lateral no mobile */
    .auth-login-split-grid .animate__animated {
        animation: none !important;
        transform: none !important;
    }

    .auth-login-split-grid {
        overflow: hidden;
    }
}

/* ============================================================
   Register Page — Wizard (2 steps)
   ============================================================ */

/* --- Progress bar --- */
.register-progress .progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.register-progress .progress-bar {
    background: var(--bs-primary);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.register-step-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
    cursor: default;
    user-select: none;
}

.register-step-label.active {
    color: var(--bs-primary);
    font-weight: 700;
}

.register-step-label.completed {
    color: rgba(154, 217, 157, 0.9);
}

/* --- Step animation --- */
.register-step {
    animation: registerFadeIn 0.3s ease-in-out;
}

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

/* --- PF/PJ type toggle --- */
.register-type-toggle {
    display: flex;
    gap: 10px;
}

.register-type-btn {
    flex: 1;
    border-radius: 999px !important;
    border: 1px solid rgba(214, 175, 91, 0.4) !important;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    padding: 0.55rem 1rem;
    transition: all 0.25s ease;
}

.btn-check:checked + .register-type-btn {
    border-color: var(--bs-primary) !important;
    background: rgba(214, 175, 91, 0.14);
    color: var(--bs-primary);
    box-shadow: 0 0 0 1px rgba(214, 175, 91, 0.25);
}

.register-type-btn:hover {
    border-color: rgba(214, 175, 91, 0.7) !important;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.09);
}

/* --- CNPJ loading spinner --- */
.cnpj-search-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-primary);
    font-size: 0.9rem;
    pointer-events: none;
}

/* --- Password toggle button --- */
.register-password-toggle {
    border-radius: 0 999px 999px 0 !important;
    border: 1px solid rgba(214, 175, 91, 0.4) !important;
    border-left: 0 !important;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.65);
    min-width: 48px;
    padding: 0 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.register-password-toggle:hover,
.register-password-toggle:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
    box-shadow: none;
}

/* --- Navigation area --- */
.register-navigation {
    border-top: 1px solid rgba(214, 175, 91, 0.2);
    padding-top: 1rem;
}

.register-navigation .btn-primary {
    border-radius: 999px;
    font-weight: 700;
    color: #151515;
}

.register-navigation .btn-outline-primary {
    border-radius: 999px;
}

/* --- Hint / helper text --- */
.register-hint {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.82rem;
}

/* --- Field inline validation --- */
.auth-theme-card .form-control.is-valid,
.auth-theme-card .form-select.is-valid {
    border-color: #4caf50 !important;
    background-image: none;
}

.auth-theme-card .form-control.is-invalid,
.auth-theme-card .form-select.is-invalid {
    border-color: #dc3545 !important;
    background-image: none;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.18);
}

/* --- CNPJ auto-fill: readonly indication --- */
.auth-theme-card .form-control.cnpj-autofilled {
    background: rgba(214, 175, 91, 0.08) !important;
    border-color: rgba(214, 175, 91, 0.55) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    cursor: default;
}

@media (max-width: 576px) {
    .register-type-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .register-type-btn {
        text-align: center;
    }
}

/* ============================================================
   Google Social Login Button
   ============================================================ */
.btn-google-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px !important;
    font-weight: 700;
    padding: 0.72rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #3c4043 !important;
    font-size: 0.97rem;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-google-social:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    color: #3c4043 !important;
    text-decoration: none;
}

.btn-google-social:active {
    background: #f1f3f4;
}

.btn-google-social .google-icon {
    flex-shrink: 0;
}

/* --- Auth divider (ou) --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.auth-divider-text {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    white-space: nowrap;
    text-transform: lowercase;
}

/* --- Profile complete avatar --- */
.profile-complete-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--bs-primary);
    box-shadow: 0 4px 14px rgba(214, 175, 91, 0.35);
    object-fit: cover;
}
