        // Initialize counters on page load
        initializeCounters();
        
        // Handle Sync Projects button
        document.getElementById('syncProjectsBtn').addEventListener('click', function() {
            document.getElementById('syncProjectsForm').submit();
            this.disabled = true;
            this.innerHTML = '<i class="fas fa-spinner fa-spin mr-1"></i> Syncing...';
        });
        
        // Activity Over Time Chart
        const activityChartOptions = {
            serie