() => openModal(app);
                        tableBody.appendChild(row);
                    });
                } else {
                    // Just update row visibility instead of re-adding them
                    document.querySelectorAll("#appTable tr").forEach(row => {
                        const appId = row.getAttribute("data-client-id");
                        const app = apps.find(a => a.client_id === appId);
                        row.style.display = app ? "table-row" : "none";
             