           const viewToggleBtn = document.getElementById('viewToggle');
                                if (viewToggleBtn) {
                                    viewToggleBtn.addEventListener('click', function() {
                                        const cardViews = document.querySelectorAll('.metrics-card-view');
                                        const tableViews = document.querySelectorAll('.metrics-table-view');
                                        
                                        c