<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.security'); require_once __DIR__ . '/../modules/security/devices_data.php'; ?><?php if ($deviceMsg): ?> <div class="alert alert-success"><?= UI::e($deviceMsg) ?></div><?php endif; ?> <div class="kpi-grid" style="margin-bottom:24px"> <div class="kpi-card"><span class="kpi-value"><?= count($devices) ?></span><span class="kpi-label">Total Devices</span></div> <div class="kpi-card"><span class="kpi-value"><?= $activeCount ?></span><span class="kpi-label">Active (7d)</span></div> <div class="kpi-card kpi-warning"><span class="kpi-value"><?= $staleCount ?></span><span class="kpi-label">Stale</span></div> </div> <div class="glass" style="padding:0;overflow:hidden"> <?php require_once __DIR__ . '/../modules/security/devices_list.php'; ?> </div> <script nonce="<?= $cspNonce ?? '' ?>"> (function(){ document.querySelectorAll('[data-confirm]').forEach(function(f){ f.addEventListener('submit',function(e){if(!confirm(f.dataset.confirm))e.preventDefault();}); }); })(); </script>