/* ============================================================================
   CADASTRO MODERNO - CSS ESPECÍFICO
   Modernização do formulário de cadastro
   100% compatível com código legado e condicionais PHP
   ============================================================================ */

/* ==== ANTI-FOUC: Oculta até harmonização estar pronta ==== */
.cadastro-card.harmonizacao-pendente {
    opacity: 0;
}

.cadastro-card.harmonized {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

/* ==== VARIÁVEIS CSS PARA HARMONIZAÇÃO ==== */
.cadastro-card {
    --cadastro-primary-color: #6366f1;
    --cadastro-primary-hover: #4f46e5;
    --cadastro-input-bg: #ffffff;
    --cadastro-input-border: #d1d5db;
    --cadastro-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==== CONTAINER PRINCIPAL ==== */
.cadastro-page {
    min-height: calc(100vh - 200px);
    padding: 30px 15px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ==== CARD MODERNIZADO ==== */
.cadastro-card {
    max-width: 900px;
    width: 100%;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 50px 46px;
    margin: 0 auto;
}

/* ==== TÍTULO ==== */
.cadastro-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 10px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.cadastro-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 32px 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ==== FORMULÁRIO ==== */
.cadastro-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ==== GRUPOS DE CAMPOS ==== */
.cadastro-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.cadastro-form-group label {
    font-size: 13px !important; /* Padrão 13px - compacto */
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* ==== INPUTS (CLASSE ESPECÍFICA SEM form-control) ==== */
.cadastro-input {
    width: 100%;
    height: auto !important; /* Sobrescreve height fixo */
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px;
    padding: 10px 14px !important; /* Padrão 13px: 10px vertical */
    font-size: 13px !important; /* Padrão 13px - compacto */
    color: #1f2937 !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    transition: var(--cadastro-transition);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ==== SELECT (CLASSE ESPECÍFICA SEM form-control) ==== */
.cadastro-select {
    width: 100%;
    height: auto !important; /* Sobrescreve height fixo */
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px;
    padding: 10px 14px !important; /* Padrão 13px: 10px vertical */
    font-size: 13px !important; /* Padrão 13px - compacto */
    color: #1f2937 !important;
    font-weight: 400 !important; /* 400 como inputs (consistência) */
    line-height: 1.5 !important;
    transition: var(--cadastro-transition);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer !important;
    /* Remove aparências nativas */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Seta customizada */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231f2937' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 40px !important;
}

/* Remove seta nativa do IE/Edge */
.cadastro-select::-ms-expand {
    display: none !important;
}

/* Opções do select */
.cadastro-select option {
    color: #1f2937 !important;
    background-color: #ffffff !important;
    font-weight: 400 !important;
    padding: 10px !important;
}

/* Opção selecionada */
.cadastro-select option:checked {
    background: linear-gradient(0deg, #e0e7ff 0%, #e0e7ff 100%) !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.cadastro-input::placeholder {
    color: #94a3b8 !important;
    font-size: 12px !important; /* Placeholder levemente menor */
    font-weight: 400 !important;
}

.cadastro-input:hover,
.cadastro-select:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.cadastro-input:focus,
.cadastro-select:focus {
    outline: none !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    /* Cor e box-shadow serão aplicados via JS harmonização */
}

/* ==== RADIO BUTTONS CPF/CNPJ ==== */
.cadastro-radio-group {
    display: flex;
    gap: 28px;
    margin-bottom: 12px;
    align-items: center;
}

.cadastro-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cadastro-radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--cadastro-primary-color);
}

.cadastro-radio-option label {
    font-size: 13px !important; /* Padrão 13px - compacto */
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    margin: 0 !important;
}

/* ==== CHECKBOX TERMOS ==== */
.cadastro-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: var(--cadastro-transition);
}

.cadastro-checkbox-group:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cadastro-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--cadastro-primary-color);
    flex-shrink: 0;
    margin: 0;
}

.cadastro-checkbox-label {
    font-size: 12px !important; /* Levemente menor - texto secundário */
    color: #374151;
    line-height: 1.6;
    margin: 0;
    cursor: pointer;
}

.cadastro-checkbox-label a {
    color: var(--cadastro-primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--cadastro-transition);
}

.cadastro-checkbox-label a:hover {
    color: var(--cadastro-primary-hover);
    text-decoration: underline;
}

/* ==== RECAPTCHA ==== */
.cadastro-recaptcha {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    min-height: 84px;
    transition: var(--cadastro-transition);
}

.cadastro-recaptcha:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cadastro-recaptcha .g-recaptcha {
    margin: 0 auto;
    transform: scale(1.02);
}

/* ==== BOTÃO ENVIAR ==== */
.cadastro-btn-submit {
    width: 100%;
    border-radius: 12px;
    padding: 11px 24px !important; /* Padrão 13px: 11px vertical */
    font-size: 13px !important; /* Padrão 13px - compacto */
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    /* Background base neutro - será substituído pela harmonização */
    background: linear-gradient(135deg, #64748b 0%, #475569 50%, #64748b 100%);
    color: #ffffff;
}

/* Efeito shimmer (brilho deslizante) */
.cadastro-btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cadastro-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cadastro-btn-submit:hover::after {
    left: 100%;
}

.cadastro-btn-submit:active {
    transform: translateY(0);
}

.cadastro-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.cadastro-btn-submit i {
    font-size: 14px !important; /* Proporcional ao texto 13px */
    transition: var(--cadastro-transition);
}

.cadastro-btn-submit:hover i {
    transform: scale(1.08) rotate(3deg);
}

/* ==== LINK VOLTAR AO LOGIN ==== */
.cadastro-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.cadastro-footer-text {
    font-size: 12px !important; /* Texto secundário */
    color: #6b7280;
    margin: 0 0 10px 0;
}

.cadastro-link-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cadastro-primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px !important; /* Alinhado com footer-text */
    transition: var(--cadastro-transition);
}

.cadastro-link-login:hover {
    color: var(--cadastro-primary-hover);
    gap: 8px;
}

.cadastro-link-login i {
    font-size: 12px !important; /* Proporcional ao texto */
    transition: var(--cadastro-transition);
}

/* ==== RESPONSIVO ==== */
@media (max-width: 768px) {
    .cadastro-page {
        padding: 20px 15px;
    }
    
    .cadastro-card {
        padding: 32px 28px;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .cadastro-title {
        font-size: 1.625rem;
    }
    
    .cadastro-subtitle {
        font-size: 0.875rem;
        margin-bottom: 28px;
    }
    
    .cadastro-form {
        gap: 16px;
    }
    
    .cadastro-form-group input,
    .cadastro-form-group select {
        height: auto !important;
        padding: 12px 14px !important;
        font-size: 14px !important; /* Tablets - proporcional */
    }
    
    .cadastro-input::placeholder {
        font-size: 13px !important;
    }
    
    .cadastro-btn-submit {
        padding: 13px 18px;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .cadastro-card {
        padding: 24px 20px;
        border-radius: 14px;
    }
    
    .cadastro-title {
        font-size: 1.5rem;
    }
    
    .cadastro-subtitle {
        font-size: 0.8125rem;
    }
    
    .cadastro-radio-group {
        gap: 14px;
    }
    
    .cadastro-form {
        gap: 14px;
    }
    
    .cadastro-form-group input,
    .cadastro-form-group select {
        height: auto !important;
        padding: 11px 12px !important;
        font-size: 14px !important; /* Mobile - legível e adequado */
    }
    
    .cadastro-input::placeholder {
        font-size: 13px !important;
    }
    
    .cadastro-btn-submit {
        padding: 12px 18px !important;
        font-size: 14px !important;
    }
    
    .cadastro-btn-submit i {
        font-size: 15px !important;
    }
}
