        priorityBadge.className = newPriorityClass;
                        priorityBadge.textContent = newItem.priority;
                    }
                }
                
                // Update category badge
                const categoryBadge = element.querySelector('.category-badge');
                if (categoryBadge && categoryBadge.textContent !== newItem.category) {
                    categoryBadge.textContent = newItem.category;
                }
                
                // Updat