<div class="panel" style="padding:0;overflow-x:auto;">
<table class="data-table">
<thead><tr><th>Date/Time</th><th>User</th><th>Action</th><th>Module</th><th>Description</th><th>IP</th></tr></thead>
<tbody>
<?php foreach ($logs as $log): ?>
<tr>
    <td style="white-space:nowrap;"><?= date('d M Y, h:i A', strtotime($log['created_at'])) ?></td>
    <td><?= e($log['full_name'] ?? 'System') ?></td>
    <td><span class="badge badge-gold"><i class="fa-solid fa-bolt"></i><?= e($log['action']) ?></span></td>
    <td><?= e($log['module_key'] ?? '—') ?></td>
    <td><?= e($log['description'] ?? '') ?></td>
    <td><?= e($log['ip_address'] ?? '') ?></td>
</tr>
<?php endforeach; ?>
<?php if (empty($logs)): ?>
<tr><td colspan="6" style="text-align:center;color:var(--color-text-muted);padding:30px;">No activity logged yet.</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
