Plot('annotations-per-image', histData, histLayout);
                }
            } catch (error) {
                console.error('Error fetching overview data:', error);
                alert('Failed to load project overview');
            }
        });
    });

    document.querySelectorAll('.project-card').forEach(card => {
        card.addEventListener('click', async (e) => {
            if (e.target.closest('.menu-btn, .menu-dropdown, .overview-btn, .import-btn, .delete-btn')) {
                return