      container.appendChild(errorDiv);
    }
}

// Additional JavaScript functions
let isLoading = false;

// Refresh dashboard with loading state
function refreshDashboard() {
    if (isLoading) return;
    
    isLoading = true;
    const refreshBtn = document.querySelector('[onclick="refreshDashboard()"]');
    if (refreshBtn) {
        const originalText = refreshBtn.innerHTML;
        
        // Show loading state
        refreshBtn.innerHTML = '<i class="bi bi-arrow-clockwise bi-spin"></i> Refreshing