 document.getElementById('allDevicesModal');
    if (modal) {
        modal.style.display = 'flex';
        loadAllDevices();
    }
}

function closeAllDevicesModal() {
    const modal = document.getElementById('allDevicesModal');
    if (modal) {
        modal.style.display = 'none';
    }
}

function loadAllDevices() {
    // Show loading state
    document.getElementById('allDevicesLoading').style.display = 'block';
    document.getElementById('allDevicesContent').style.display = 'none';
    document.get