<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title><%= title %></title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
  <div class="container my-4">
    <h1>Admin Users</h1>
    <a href="/admin/dashboard" class="btn btn-secondary mb-3">Back</a>
    <table class="table">
      <thead><tr><th>Name</th><th>Email</th><th>Role</th><th>Last Login</th></tr></thead>
      <tbody>
        <% users.forEach(u => { %>
          <tr>
            <td><%= u.name %></td>
            <td><%= u.email %></td>
            <td><%= u.role %></td>
            <td><%= u.lastlogin ? new Date(u.lastlogin).toLocaleDateString() : 'Never' %></td>
          </tr>
        <% }) %>
      </tbody>
    </table>
  </div>
</body>
</html>