.perfil-migrante-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.form-header h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
}

.form-header .form-intro {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.perfil-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #2c3e50;
    font-size: 20px;
    margin: 0 0 25px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #34495e;
    font-weight: 500;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

/* Inputs más grandes para edad y año */
.input-large {
    font-size: 20px !important;
    padding: 16px 20px !important;
    font-weight: 600;
    text-align: center;
    max-width: 300px;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-label span {
    flex: 1;
    font-size: 15px;
    color: #2c3e50;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f5f7ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    flex: 1;
    font-size: 15px;
    color: #2c3e50;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: #f5f7ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Selector de nacionalidades */
.nacionalidades-selector {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.search-nacionalidad {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.nac-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 10px;
    background: white;
}

.nac-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.nac-item:hover {
    background: #f0f0f0;
}

.nac-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.nac-item span {
    font-size: 14px;
    color: #2c3e50;
}

.nac-selected {
    margin-top: 15px;
    padding: 10px;
    background: #e8f4f8;
    border-radius: 6px;
    min-height: 40px;
}

.nac-selected-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px;
    font-size: 13px;
}

.nac-selected-tag .remove-nac {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Resultados de examen de inglés */
.resultados-ingles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.resultado-item {
    display: flex;
    flex-direction: column;
}

.resultado-item label {
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
}

.resultado-item input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.resultado-overall {
    grid-column: 1 / -1;
}

.resultado-overall input {
    max-width: 200px;
    margin: 0 auto;
    background: #f8f9fa;
    font-weight: 600;
}

/* Botón de envío */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mensajes */
.form-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

/* Responsive */
@media (max-width: 768px) {
    .perfil-migrante-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .perfil-form {
        padding: 25px 20px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .form-header .form-intro {
        font-size: 14px;
    }
    
    .radio-label,
    .checkbox-label {
        padding: 12px;
    }
    
    .submit-button {
        width: 100%;
        padding: 14px 30px;
    }
    
    .input-large {
        max-width: 100%;
    }
    
    .resultados-ingles-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .resultado-overall {
        grid-column: 1 / -1;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message {
    animation: fadeIn 0.3s ease-out;
}

/* Loading state */
.button-loader {
    display: inline-block;
}
