us-${booking.job_status}">${booking.job_status}</span></td>
                    `;
                });
            } else {
                tbody.innerHTML = '<tr><td colspan="9" style="text-align: center; color: var(--text-secondary);">No bookings found for this period</td></tr>';
            }
        }

        function updateDeviceAnalyticsPeriod() {
            const period = document.getElementById('deviceAnalyticsPeriod').value;
            const loading = document.getElementById('deviceAnalyticsLoad