ontent(metricType, index);
    modal.innerHTML = `
        <div class="rc-flex rc-justify-between rc-items-center rc-mb-4">
            <h3 class="rc-heading-lg">${metricType} Details</h3>
            <button class="rc-btn rc-btn-ghost rc-btn-sm" onclick="closeMetricDetail()">
                <i class="bi bi-x-lg"></i>
            </button>
        </div>
        ${detailContent}
    `;
    
    overlay.appendChild(modal);
    document.body.appendChild(overlay);
    
    // Close on overlay click
    overla