x-between rc-mt-lg">
                    <button onclick="showAddDeviceToCase(${caseID})" class="rc-btn rc-btn-primary">
                        <i class="bi bi-plus-lg"></i> Add Device
                    </button>
                    <div class="rc-text-sm rc-text-muted">${devices.length} device${devices.length !== 1 ? 's' : ''} in this case</div>
                </div>
            `;
        }
    }

    async function updateCaseDeviceCount(caseID) {
        try {
            const response = await fetch