/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.cadastro-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
}

/* Container principal */
.main-content {
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cadastro-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    border: 1px solid #e2e8f0;
    animation: slideUp 0.4s ease-out;
}

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

/* Header do cadastro */
.cadastro-header {
    text-align: center;
    margin-bottom: 40px;
}

.cadastro-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.cadastro-header p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Botão gerar dados */
.btn-gerar-dados {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-gerar-dados:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-gerar-dados i {
    font-size: 14px;
}



/* Formulário */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:read-only {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* Switches */
.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.switch-label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Container de senha */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    user-select: none;
}

.password-toggle:hover {
    color: #3b82f6;
}



.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #f8fafc;
}

/* Alertas customizados */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #ef4444;
    padding: 16px 20px;
    max-width: 400px;
    z-index: 1000;
    display: none;
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.custom-alert.success {
    border-left-color: #10b981;
}

.custom-alert.warning {
    border-left-color: #f59e0b;
}

.custom-alert.error {
    border-left-color: #ef4444;
}

.custom-alert-close {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 18px;
    color: #9ca3af;
    font-weight: bold;
}

.custom-alert-close:hover {
    color: #6b7280;
}

.custom-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.custom-alert-icon {
    font-size: 16px;
}

.custom-alert-title {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.custom-alert-message {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

/* Modal de loading */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-content h3 {
    color: #1a202c;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.modal-content p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Estados de validação */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .cadastro-container {
        padding: 30px 20px;
        max-width: 100%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        margin-top: 60px;
    }
    
    .cadastro-header h1 {
        font-size: 28px;
    }
    

    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    

    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .custom-alert {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cadastro-container {
        padding: 20px 16px;
        margin-top: 40px;
    }
    
    .cadastro-header h1 {
        font-size: 24px;
    }
    
    .cadastro-header p {
        font-size: 14px;
    }
    
    .btn-gerar-dados {
        padding: 10px 16px;
        font-size: 13px;
    }
    

    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .switch-group {
        padding: 12px;
    }
    
    .switch-label {
        font-size: 13px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    

}

/* Controle de visibilidade do botão submit */
#submitBtn {
    display: none;
}

#submitBtn.show {
    display: inline-flex;
}


