/* css/register.css - v3.3 (Completo com Fix de Ícones e Scroll) */

/* --- 1. Ajustes Gerais e Autofill --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px rgba(21, 27, 35, 0.9) inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- 2. Layout Estrutural --- */
.split-screen-container.register-layout .visual-pane {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.split-screen-container.register-layout .visual-logo {
    margin-left: auto; 
    display: block;
    width: max-content;
}

.visual-text h1 { color: #ffffff !important; }

/* Form Pane: Centralizado mas permite rolagem */
.form-pane {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden; /* Importante para mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    padding: 1rem;
}

@media (max-height: 800px) {
    .form-pane { justify-content: flex-start; padding-top: 3rem; }
}

.auth-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* --- 3. Cabeçalho Fixo Visualmente --- */
.auth-header {
    margin-bottom: 1.5rem;
    text-align: left;
}
.auth-header h2 { font-size: 2rem; color: #fff; margin-bottom: 0.2rem; }
.auth-header p { color: #8b949e; font-size: 0.95rem; }

/* --- 4. Wizard & Inputs --- */
.wizard-progress {
    display: flex; justify-content: flex-start; gap: 10px; margin-bottom: 1.5rem;
}
.progress-dot {
    width: 8px; height: 8px;
    background: rgba(255, 255, 255, 0.1); border-radius: 50%; transition: 0.4s;
}
.progress-dot.active { background: #00e676; transform: scale(1.3); box-shadow: 0 0 10px rgba(0, 230, 118, 0.4); }
.progress-dot.completed { background: rgba(0, 230, 118, 0.5); opacity: 0.6; }

.modern-form .input-group { margin-bottom: 1rem; }
.modern-form label { font-size: 0.85rem; margin-bottom: 0.3rem; }

/* Correção Z-Index dos Ícones também no Register */
.input-wrapper { position: relative; isolation: isolate; }
.input-wrapper input {
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}
.input-icon {
    z-index: 10;
    pointer-events: none;
}

/* Seletor Focus Within para garantir cor ativa */
.input-wrapper:focus-within .input-icon {
    color: #00e676;
}

.validation-msg { font-size: 0.75rem; margin-top: 3px; min-height: 15px; font-weight: 500; display: block;}
.validation-msg.valid { color: #00e676; }
.validation-msg.invalid { color: #ff4757; }

/* --- 5. Botões --- */
.btn-lg { padding: 0.8rem; font-size: 1rem; }

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #8b949e;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    border-color: #fff;
    color: #fff;
}

/* --- 6. Termos --- */
.terms-wrapper {
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.terms-check-label {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem; color: #8b949e; cursor: pointer;
}
.terms-check-label input { accent-color: #00e676; width: 16px; height: 16px; }
.terms-check-label.disabled { opacity: 0.6; cursor: not-allowed; }
.terms-check-label.disabled input { pointer-events: none; }

.terms-link-single {
    display: block; margin-top: 5px; margin-left: 26px;
    color: #00e676; font-size: 0.8rem; text-decoration: underline; cursor: pointer;
}
.terms-link-single.read::after {
    content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: 5px;
}

/* --- 7. Loading e Animações --- */
.input-wrapper.loading .input-icon {
    color: #fff; animation: spinCenter 1s infinite linear;
}
@keyframes spinCenter { 
    0% { transform: translateY(-50%) rotate(0deg); } 
    100% { transform: translateY(-50%) rotate(360deg); } 
}

.step-container { display: none; }
.step-container.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsivo Mobile - Estilo App Moderno */
@media (max-width: 900px) {
    .split-screen-container.register-layout { 
        flex-direction: column; 
        height: 100dvh;
        overflow-x: hidden;
    }
    
    .split-screen-container.register-layout .visual-pane { display: none; }

    .form-pane { 
        padding: 1.5rem; 
        justify-content: flex-start; /* Começa do topo */
        height: 100dvh;
        min-height: 100dvh;
        width: 100%;
        
        /* Fundo Rico */
        background: radial-gradient(circle at bottom left, #1c2530 0%, #0b1116 70%);
        position: relative;
        overflow-x: hidden; /* CORREÇÃO PARA SCROLL HORIZONTAL */
    }

    /* Elemento decorativo Topo Direita */
    .form-pane::before {
        content: ''; position: absolute; top: -50px; right: -50px;
        width: 200px; height: 200px;
        background: radial-gradient(circle, rgba(0, 230, 118, 0.1), transparent 70%);
        filter: blur(40px); z-index: 0;
        pointer-events: none;
    }

    /* Elemento decorativo Fundo Esquerda */
    .form-pane::after {
        content: ''; position: absolute; bottom: -50px; left: -50px;
        width: 250px; height: 250px;
        background: radial-gradient(circle, rgba(0, 150, 255, 0.05), transparent 70%);
        filter: blur(50px); z-index: 0;
        pointer-events: none;
    }

    /* Container principal scrollável se necessário, mas centralizado */
    .auth-wrapper {
        z-index: 2;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Header Compacto */
    .mobile-logo { margin-bottom: 1rem; text-align: center; }
    .mobile-logo img { height: 35px; }
    
    .auth-header { margin-bottom: 1rem; text-align: center; }
    .auth-header h2 { font-size: 1.5rem; }
    
    /* Wizard Progress Centralizado */
    .wizard-progress { 
        justify-content: center; 
        margin-bottom: 1.5rem; 
    }

    /* Área do formulário expande para preencher o espaço */
    .modern-form {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto; 
        overflow-x: hidden;
        padding-bottom: 10px; 
    }

    /* Os containers dos passos ocupam a altura disponível */
    .step-container {
        display: none; 
        height: 100%;
        flex-direction: column;
    }
    .step-container.active { display: flex; }

    /* Empurra os botões para o final da tela */
    .step-container.active > div:last-child, 
    .step-container.active > button.next-step {
        margin-top: auto;
        padding-top: 1rem;
    }

    /* Footer fora do caminho */
    .auth-footer {
        margin-top: 0.5rem;
        text-align: center;
        font-size: 0.85rem;
        z-index: 2;
    }
}