<div class="stat-grid">
  <div class="stat-card"><div class="stat-label">Customers</div><div class="stat-value"><?= $counts['customers'] ?></div></div>
  <div class="stat-card"><div class="stat-label">Agents</div><div class="stat-value"><?= $counts['agents'] ?></div></div>
  <div class="stat-card"><div class="stat-label">Categories</div><div class="stat-value"><?= $counts['categories'] ?></div></div>
  <div class="stat-card"><div class="stat-label">KB Articles</div><div class="stat-value"><?= $counts['articles'] ?></div></div>
  <div class="stat-card"><div class="stat-label">Mail Quarantine</div><div class="stat-value <?= $counts['quarantine'] ? 'stat-amber' : '' ?>"><?= $counts['quarantine'] ?></div></div>
</div>

<div class="stat-grid" style="grid-template-columns:repeat(auto-fit,minmax(220px,1fr))">
  <?php
  $links = [
    ['Categories & Sub-categories', '/admin/categories', 'Ticket taxonomy driving routing and reporting'],
    ['Priority & Severity', '/admin/priorities', 'Priority definitions and the default matrix'],
    ['Queues & Teams', '/admin/queues', 'Queue definitions, teams and routing'],
    ['Business Calendar', '/admin/calendar', 'Working days, hours and holidays'],
    ['Templates', '/admin/templates', 'Notification templates and canned responses'],
    ['Customers & Contracts', '/admin/customers', 'Customer, contact and AMC masters'],
    ['Products / Modules', '/admin/products', 'Products this support desk covers'],
    ['Agents & Roles', '/admin/users', 'Internal user accounts and role assignment'],
    ['Roles & Permissions', '/admin/permissions', 'What each role is allowed to do'],
    ['Admin Audit Log', '/admin/audit-log', 'Every configuration change, recorded'],
    ['Mail Quarantine', '/admin/quarantine', 'Inbound email rejected from unregistered senders'],
  ];
  ?>
  <?php foreach ($links as [$title, $href, $desc]) : ?>
    <a href="<?= url($href) ?>" class="card" style="padding:16px;display:block">
      <div style="font-weight:650;margin-bottom:4px"><?= $title ?></div>
      <div class="text-faint text-sm"><?= $desc ?></div>
    </a>
  <?php endforeach; ?>
</div>
