/* ==========================================
   RESET GLOBAL E ESTILOS BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #004aad;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   CONTAINER PRINCIPAL (LAYOUT TELA DIVIDIDA)
   ========================================== */
.main-container {
    /* Divide a tela entre formulário e área ilustrada do cadastro. */
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #004aad;
    overflow: hidden;
}

/* LADO ESQUERDO: FORMULÁRIO BRANCO */
.left-side {
    flex: 1.1;
    background-color: #ffffff;
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    max-height: 100vh;
}

/* LADO DIREITO: AZUL CORPORATIVO */
.right-side {
    flex: 0.9;
    background-color: #004aad;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   CABEÇALHO E BRANDING
   ========================================== */
.cadastro-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 44px;
    gap: 12px;
}

.brand-logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: #000000;
    letter-spacing: -1px;
}

.brand-logo a { 
    text-decoration: none;
    color: #000000;
}

.brand-logo span { 
    color: #004aad; 
}

.cadastro-header .site-menu { 
    align-items: center; 
    margin-left: auto; 
}

.cadastro-header .header-action {
    align-items: center;
    background: #004aad;
    border-radius: 30px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 44px;
    padding: 8px 28px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cadastro-header .header-action:hover,
.cadastro-header .header-action:focus-visible { 
    background: #00357a; 
}

/* ==========================================
   ALTERNADOR (PESSOAL / EMPRESA)
   ========================================== */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.toggle-btn {
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 35px;
    border-radius: 30px;
    transition: all 0.2s ease;
    color: #004aad;
    border: 2px solid #004aad;
    background-color: transparent;
}

.toggle-btn.active {
    color: #ffffff;
    background-color: #004aad;
    border: 2px solid #004aad;
}

.toggle-divider {
    color: #a0aec0;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ==========================================
   FORMULÁRIO E INPUTS EM FORMATO DE PÍLULA
   ========================================== */
.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #004aad;
    margin-bottom: 10px;
}

.register-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-columns {
    /* Distribui campos em colunas iguais sem deixar conteúdo longo estourar a largura. */
    display: flex;
    gap: 40px;
}

.form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #000000;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 20px;
    border: 1.5px solid #000000;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.input-group select,
.input-group textarea {
    border-radius: 20px;
}

.input-group textarea {
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: #004aad;
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.15);
}

/* Ícone do Olho (Senha) */
.input-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.toggle-password-eye {
    position: absolute;
    right: 20px;
    cursor: pointer;
    user-select: none;
    width: 22px;
    height: auto;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.toggle-password-eye:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Requisitos de Senha e Validações */
.error-message-text {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 4px;
    padding-left: 10px;
    display: none;
}

.error-message-text.visible {
    display: block;
}

.password-requirements {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
    padding-left: 5px;
}

.requirement-item {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.requirement-item.req-invalid { color: #ef4444; }
.requirement-item.req-valid   { color: #10b981; }

/* Titulo da tela de Currículo */
.title-curriculo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #004aad;
    margin-bottom: 25px;
    text-align: center;
}

/* ==========================================
   AÇÃO DO FORMULÁRIO E BOTÃO ENVIAR
   ========================================== */
.form-footer-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 35px;
    gap: 15px;
}

.btn-submit {
    background-color: #004aad;
    color: #ffffff;
    border: none;
    padding: 12px 60px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover { 
    background-color: #00357a; 
}

.btn-submit:disabled {
    opacity: .7;
    cursor: wait;
}

.login-redirect { 
    font-size: 0.9rem; 
    color: #000000; 
}

.login-redirect a { 
    color: #004aad; 
    font-weight: 700; 
    text-decoration: none; 
}

.login-redirect a:hover { 
    text-decoration: underline; 
}

/* Botão de Login Superior Direito (Mascote Side) */
.btn-top-login {
    position: absolute;
    top: 40px;
    right: 60px;
    text-decoration: none;
    color: #004aad;
    background-color: #ffffff;
    padding: 8px 35px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.btn-top-login:hover { 
    transform: scale(1.03); 
}

/* Container e Animação do Mascote (Robô) */
.mascot-container {
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: -81px;
    z-index: 1;
}

.mascot-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================
   RODAPÉ E NOTIFICAÇÕES (TOAST)
   ========================================== */
.page-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #000000;
    font-weight: 600;
    margin-top: 20px;
}

.page-footer span { 
    color: #004aad; 
}

.php-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.error-toast   { background-color: #ef4444; }
.success-toast { background-color: #10b981; }

/* Easter Egg: Ponto secreto Doom */
.secret-doom{
    color: #000000 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    cursor: default !important;
}

/* Mantém os formulários de cadastro em duas metades sem rolagem interna no desktop. */
@media (min-width: 951px) {
    body.cadastro-page {
        align-items: stretch;
        justify-content: flex-start;
        overflow: hidden;
    }

    .cadastro-page .main-container {
        width: 100%;
        min-height: 0;
    }

    .cadastro-page .left-side {
        flex: 0 0 56%;
        max-width: 56%;
        border-radius: 0 40px 40px 0;
        padding: clamp(16px, 3.2vh, 28px) clamp(24px, 3vw, 48px);
        overflow: hidden;
    }

    .cadastro-page .right-side {
        flex: 0 0 44%;
        min-width: 0;
    }

    .cadastro-page .toggle-container {
        margin-block: 12px;
    }

    .cadastro-page .form-columns {
        gap: 24px;
    }

    .cadastro-page .form-column {
        gap: 12px;
    }

    .cadastro-page .form-footer-action {
        margin-top: 16px;
        gap: 10px;
    }

    .cadastro-page .page-footer {
        margin-top: 12px;
    }
}

/* ==========================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================== */
@media (max-width: 950px) {
    .main-container { flex-direction: column; height: auto; overflow: visible; }
    .right-side { display: none; }
    .left-side { border-radius: 0; padding: 32px 20px; min-height: 100vh; max-height: none; }
    .form-columns { flex-direction: column; gap: 14px; }
    .form-column { display: contents; }
    .register-form { flex: initial; }
    .mobile-order-1 { order: 1; }
    .mobile-order-2 { order: 2; }
    .mobile-order-3 { order: 3; }
    .mobile-order-4 { order: 4; }
    .mobile-order-5 { order: 5; }
    .mobile-order-6 { order: 6; }
    .mobile-order-7 { order: 7; }
    .mobile-order-8 { order: 8; }
    .toggle-container { gap: 8px; }
    .toggle-btn { padding: 10px 18px; }
    .btn-submit { width: 100%; padding-inline: 20px; }
}

@media (max-width: 720px) {
    .left-side {
        min-height: 100vh;
        min-height: 100svh;
        padding: 22px 16px 28px;
        justify-content: flex-start;
        gap: 16px;
    }
    .toggle-container { margin: 0; }
    .page-title { margin-bottom: 0; }
    .form-columns { gap: 14px; }
    .input-group input,
    .input-group select { min-height: 48px; font-size: 16px; }
    .toggle-btn { min-height: 44px; display: inline-flex; align-items: center; }
    .form-footer-action { margin-top: 18px; gap: 12px; }
    .btn-submit { min-height: 48px; }
    .toggle-password-eye {
        width: 44px;
        height: 44px;
        padding: 10px;
        right: 4px;
        object-fit: contain;
    }
    .input-icon-container input { padding-right: 56px; }
    .cadastro-header { position: relative; }
    .cadastro-header .site-menu-toggle { display: inline-flex; }
    .cadastro-header .site-menu {
        background: #ffffff;
        border: 1px solid #e1e8f0;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 14px 28px rgba(0, 74, 173, .12);
        display: none;
        left: 0;
        padding: 12px;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        z-index: 4;
    }
    .cadastro-header .site-menu.is-open { display: grid; }
    .cadastro-header .header-action { width: 100%; }
    .input-group input,
    .input-group select,
    .input-group textarea { max-width: 100%; }
}

@media (max-width: 480px) {
    .brand-logo { font-size: 1.9rem; }
    .toggle-btn { font-size: 0.9rem; padding-inline: 12px; }
    .toggle-divider { letter-spacing: 0; }
    .php-toast { left: 20px; right: 20px; bottom: 20px; text-align: center; }
}
