     treeViewBtn.classList.add('active');
            listContainer.style.display = 'none';
            treeContainer.style.display = 'block';
            
            if (!modalTreeData) {
                loadModalTreeData();
            }
        }
    }
    
    async function loadModalTreeData() {
        try {
            const response = await fetch('/api/v1/cases/devices/tree');
            if (!response.ok) {
                throw new Error(`HTTP ${response.status}: ${await response.text()}`);
     