<section class="section">
  <p class="eyebrow">Admin</p>
  <h1>Frauda si securitate</h1>
  <p>Scanari invalide, tentative repetate si semnale operationale.</p>

  <h2>Tentative invalide repetate</h2>
  <div class="table-wrap">
    <table>
      <thead><tr><th>IP</th><th>Incercari</th><th>Ultima incercare</th></tr></thead>
      <tbody>
        <% repeatedInvalids.forEach((item) => { %>
          <tr><td><%= item.ip || '-' %></td><td><%= item.attempts %></td><td><%= item.last_seen %></td></tr>
        <% }) %>
      </tbody>
    </table>
  </div>

  <h2>Ultimele scanari invalide</h2>
  <div class="table-wrap">
    <table>
      <thead><tr><th>Rezultat</th><th>Bilet</th><th>Eveniment</th><th>Scanner</th><th>IP</th><th>Data</th></tr></thead>
      <tbody>
        <% invalidScans.forEach((scan) => { %>
          <tr>
            <td><%- include('../partials/status-badge', { status: scan.result }) %></td>
            <td><%= scan.ticket_code || '-' %></td>
            <td><%= scan.event_title || '-' %></td>
            <td><%= scan.scanned_by_user_id || '-' %></td>
            <td><%= scan.ip || '-' %></td>
            <td><%= scan.created_at %></td>
          </tr>
        <% }) %>
      </tbody>
    </table>
  </div>
</section>
