');
    if (!footer) {
        const container = document.querySelector('main') || document.body;
        footer = document.createElement('div');
        footer.className = 'analytics-footer rc-text-center rc-text-secondary rc-mt-4 rc-py-4';
        container.appendChild(footer);
    }
    footer.innerHTML = `<small><i class="bi bi-clock"></i> Last updated: ${timeString} on ${dateString}</small>`;
}

// Enhanced chart responsiveness
function makeChartsResponsive() {
    if (typeof Chart !== 'undefined' && C