
/* ── Account Type Checkboxes ─────────────────────────────────────────── */
.account-type-checkboxes {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.role-checkbox-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 2px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    user-select: none !important;
}

.role-checkbox-item:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.role-checkbox-item input[type="checkbox"] {
    display: none !important;
}

.role-chk-box {
    width: 18px !important;
    height: 18px !important;
    border: 1.5px solid #5a5c68 !important;
    border-radius: 4px !important;
    background: #141517 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.role-checkbox-item:hover .role-chk-box {
    border-color: var(--accent-color, #4F8EF7) !important;
}

.role-checkbox-item input[type="checkbox"]:checked + .role-chk-box {
    background: var(--accent-color, #4F8EF7) !important;
    border-color: var(--accent-color, #4F8EF7) !important;
}

.role-checkbox-item input[type="checkbox"]:checked + .role-chk-box::after {
    content: '' !important;
    width: 4px !important;
    height: 8px !important;
    border: solid #ffffff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
    margin-bottom: 2px !important;
}

.role-chk-label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
}

.role-chk-label small {
    font-size: 0.8rem !important;
    color: #8e8f99 !important;
    font-weight: 400 !important;
}

.account-type-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    background: #1e1f22 !important;
    border: 1.5px solid #2e2f33 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.account-type-card:hover {
    border-color: #4a4d5e !important;
    background: #22232a !important;
}

.account-type-card.active {
    border-color: var(--accent-color, #4F8EF7) !important;
    background: rgba(79, 142, 247, 0.08) !important;
}

.account-type-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: #2a2b30 !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    color: #aaa !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.account-type-card.active .account-type-icon {
    background: rgba(79, 142, 247, 0.15) !important;
    color: var(--accent-color, #4F8EF7) !important;
}

.account-type-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.account-type-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.account-type-desc {
    font-size: 0.78rem !important;
    color: #8e8f99 !important;
}

/* Fix Top Gap (Google Translate suppression) */
html, body {
    top: 0 !important;
    position: relative !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
    min-height: 100% !important;
}

.login-page-wrapper {
    position: relative;
}

/* Posição do seletor de idiomas: dentro da topbar (não absoluta) */
.login-lang-wrapper {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
}

.login-lang-wrapper .lang-btn {
    color: #ffffff !important;
    opacity: 1 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    gap: 8px !important;
    padding: 0 !important;
}

.login-lang-wrapper .lang-selector-group {
    display: flex !important;
}

.login-lang-wrapper .lang-dropdown {
    margin-top: 10px;
}



/* ── Dropdown de Seleção de Países (Flutuante por Baixo do Campo) ── */
.country-select-wrapper {
    position: relative !important;
    width: 100% !important;
    /* login.css isola este grupo (isolation/transform); sem z-index explícito
       os irmãos seguintes (data, botões) eram pintados por cima do dropdown */
    z-index: 30;
}

.country-trigger-input {
    cursor: pointer !important;
}

.country-dropdown-list {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    width: 100% !important;
    background: #1a1a1c !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    z-index: 1000 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.country-dropdown-list.active {
    display: flex !important;
}

.country-search-wrapper {
    position: relative !important;
    width: calc(100% - 24px) !important;
    margin: 10px 12px 6px !important;
    box-sizing: border-box !important;
}

.country-search-input {
    width: 100% !important;
    background: #2d2e36 !important;
    border: 1px solid #42434e !important;
    border-radius: 10px !important;
    padding: 12px 40px 12px 14px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.country-search-input:focus {
    border-color: var(--accent-color, #007BFF) !important;
}

.country-search-icon {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    color: #a1a1aa !important;
    pointer-events: none !important;
}

/* Botão de busca (lupa) — clicável, foca o input de busca */
.country-search-btn {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    padding: 6px !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #a1a1aa !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.country-search-btn:hover {
    color: #ffffff !important;
    background: #3a3b44 !important;
}

.country-search-btn:focus-visible {
    outline: 2px solid var(--accent-color, #007BFF);
    outline-offset: 1px;
}

.country-search-btn .country-search-icon {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    pointer-events: auto !important;
}

.country-options-container {
    max-height: 220px !important;
    overflow-y: auto !important;
    padding: 4px 6px 8px !important;
    box-sizing: border-box !important;
}

.country-options-container::-webkit-scrollbar {
    width: 6px;
}
.country-options-container::-webkit-scrollbar-track {
    background: #1a1a1c;
}
.country-options-container::-webkit-scrollbar-thumb {
    background: #3a3b3c;
    border-radius: 3px;
}

.country-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 12px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    font-size: 0.9rem !important;
}

.country-option .country-flag {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.country-option .country-flag img {
    display: block !important;
    object-fit: cover !important;
    border-radius: 2px !important;
}

.country-option:hover {
    background: #2a2a2c !important;
    color: var(--accent-color, #007BFF) !important;
}


@media (min-width: 1025px) {
    .country-mobile-header {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .country-dropdown-list {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        background: #111113 !important;
        z-index: 99999999 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 16px !important;
        margin: 0 !important;
        display: none;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }

    .country-dropdown-list.active {
        display: flex !important;
    }

    .country-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding-bottom: 8px !important;
        margin-bottom: 12px !important;
        border-bottom: none !important;
    }

    .country-mobile-title {
        font-size: 1.15rem !important;
        font-weight: 600 !important;
        color: #ffffff !important;
    }

    .country-mobile-close {
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 1.8rem !important;
        line-height: 1 !important;
        cursor: pointer !important;
        padding: 4px 8px !important;
    }

    .country-search-wrapper {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        margin: 0 0 12px 0 !important;
        box-sizing: border-box !important;
    }

    .country-options-container {
        flex: 1 !important;
        max-height: none !important;
        height: calc(100vh - 130px) !important;
        overflow-y: auto !important;
        padding: 0 !important;
    }
}
/* White caret on all inputs */
input, .login-input, .country-search-input {
    caret-color: #ffffff !important;
    color: #ffffff !important;
}

/* Guarantee white text inside inputs (autofill/autocomplete popup forces its own color) */
input {
    color: #ffffff !important;
}

/* Robust autofill fix: animation overrides the browser's injected background */
@keyframes register-autofill-fix {
    from { background-color: #1a1a1c; }
    to   { background-color: #1a1a1c; }
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1c inset !important;
    caret-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
    -webkit-animation-name: register-autofill-fix;
    -webkit-animation-fill-mode: both;
    -webkit-animation-duration: 0.01s;
}

/* Remove ou neutraliza :invalid nativo que coloca bordas vermelhas */
input:invalid,
.login-input:invalid {
    border: none !important;
    box-shadow: none !important;
}

/* Password wrapper with eye toggle */
.password-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    isolation: isolate;
    transform: translateZ(0);
}
.password-wrapper .login-input {
    width: 100% !important;
    padding-right: 48px !important;
    box-sizing: border-box !important;
    text-indent: 0 !important;
}
.toggle-password-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}
.toggle-password-btn:hover {
    color: #ffffff;
}
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* ── Multi-step form ─────────────────────────────────────────────── */
.form-steps-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}
.form-steps-track {
    display: contents;
}
.form-step {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 320px;
    box-sizing: border-box;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.form-step.active {
    opacity: 1;
    pointer-events: auto;
}

.login-input-group {
    width: 100%;
    box-sizing: border-box;
    padding: 0 !important;
    margin-bottom: 12px;
}

.login-input-group:last-of-type {
    margin-bottom: 0;
}

/* Step indicator — left-aligned with label */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 16px;
}
.step-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #333;
    transition: all 0.3s ease;
}
.step-dot.active {
    width: 18px;
    border-radius: 10px;
    background: var(--accent-color, #007BFF);
}
.step-label {
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Terms & Privacy text — spaced away from the submit button */
.terms-text {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.85rem;
    color: #a1a1aa;
    margin-top: 12px;
    margin-bottom: 20px;
    line-height: 1.4;
    word-break: break-word;
}
.terms-text a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* Group of actions on Step 2 (Side-by-side buttons) */
.step-actions-group {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
}

/* Secondary Back Button */
.btn-step-back {
    flex: 1;
    height: 58px;
    box-sizing: border-box;
    background: #2a2a2c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 16px;
}
.btn-step-back:hover {
    background: #333336;
    color: #ffffff;
}
.btn-step-back:active {
    background: #1f1f21;
}

/* Submit Button in Step 2 */
.step-actions-group .btn-login-submit {
    flex: 1;
    height: 58px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 16px;
}

.country-modal-header {
    display: none;
}



/* Anti-flicker styles for initial Step 2 render from sessionStorage */
html[data-initial-step="2"] #step1 {
    opacity: 0 !important;
    pointer-events: none !important;
}
html[data-initial-step="2"] #step2 {
    opacity: 1 !important;
    pointer-events: auto !important;
}
html[data-initial-step="2"] #dot1 {
    width: 6px !important;
    border-radius: 50% !important;
    background: #333 !important;
}
html[data-initial-step="2"] #dot2 {
    width: 18px !important;
    border-radius: 10px !important;
    background: var(--accent-color, #007BFF) !important;
}

html[data-initial-step="3"] #step1,
html[data-initial-step="3"] #step2 {
    opacity: 0 !important;
    pointer-events: none !important;
}
html[data-initial-step="3"] #step3 {
    opacity: 1 !important;
    pointer-events: auto !important;
}
html[data-initial-step="3"] #dot1,
html[data-initial-step="3"] #dot2 {
    width: 6px !important;
    border-radius: 50% !important;
    background: #333 !important;
}
html[data-initial-step="3"] #dot3 {
    width: 18px !important;
    border-radius: 10px !important;
    background: var(--accent-color, #007BFF) !important;
}

/* Reduzir espaçamento superior do título "Criar Conta" em dispositivos móveis */
@media (max-width: 1024px) {
    .login-sidebar .login-form-container .login-header {
        padding-top: 0.2rem;
        margin-top: 0;
    }
    .login-sidebar .login-form-container .login-header h1 {
        margin-top: 0;
        font-size: 1.1rem;
    }
}

/* PC — compactar espaçamentos verticais */
@media (min-width: 1025px) {
    .login-sidebar .login-back-link {
        margin-bottom: 40px;
    }
    .login-sidebar .login-form-container .login-header {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .login-sidebar .login-form-container .login-header p {
        margin-bottom: 12px;
    }
    .login-sidebar .login-input-group {
        margin-bottom: 16px;
    }
    .form-step {
        min-height: 0;
    }
    .step-indicator {
        margin-top: 0;
        margin-bottom: 12px;
    }
}

/* Mobile — inputs e botões sem overflow */
@media (max-width: 1024px) {
    .form-step {
        min-height: 0 !important;
    }
    .login-input-group {
        margin-bottom: 10px !important;
    }
    .btn-login-submit {
        margin-top: 8px;
        padding: 16px;
    }
    .login-signup-prompt {
        margin-top: 12px;
        margin-bottom: 0;
    }
}
/* Correção completa e definitiva para o Autocomplete / Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #1a1a1c inset !important;
    background-color: #1a1a1c !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
}

input:autofill,
.login-input:autofill {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #1a1a1c !important;
    caret-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
}

@media (min-width: 1025px) {

    .login-sidebar .login-form-container .login-header {
        margin-top: 0;
        padding-top: 0;
    }
    .login-sidebar .login-form-container .login-header h1 {
        margin-top: 0;
        margin-bottom: 4px;
    }
    .login-sidebar .login-form-container .login-header p {
        margin-bottom: 8px;
    }
}

.login-error,
input.login-error,
input:-webkit-autofill.login-error,
input:-webkit-autofill:hover.login-error,
input:-webkit-autofill:focus.login-error,
input:-webkit-autofill:active.login-error,
.login-input.login-error,
.login-input.login-error:-webkit-autofill {
    border: none !important;
    outline: none !important;
    -webkit-box-shadow: 0 0 0px 1000px #3d1a1f inset !important;
    background-color: #3d1a1f !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* Fix outline/border lines on back buttons */
.btn-step-back,
.btn-step-back:hover,
.btn-step-back:focus,
.btn-step-back:focus-visible,
.btn-step-back:active,
.login-back-link,
.login-back-link:hover,
.login-back-link:focus,
.login-back-link:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* ── Topbar do sidebar: Voltar + Idioma no mesmo header, alinhados ── */
.sidebar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.sidebar-topbar .login-back-link {
    margin-bottom: 0;
    align-self: center;
}

.sidebar-topbar .login-lang-wrapper {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .sidebar-topbar {
        max-width: 400px; /* alinhado com o .login-form-container centrado */
        margin: 0 auto 24px;
    }
}
