Replaces the three Phase A scaffold placeholders with working pages backed by
the existing server endpoints (no server changes).
- src/api/teams.ts (new): useTeams, useTeam, useCreateTeam, useAddMember,
useUpdateMemberRole, useRemoveMember. All with cache invalidation.
- src/api/admin.ts (new): useAllUsers, useToggleSuperAdmin.
- routes/teams/list.tsx: list of teams (cards with role badge + slug + Personal
marker), inline "Create a team" form (POSTs /api/teams), each card links to
/teams/:id. Inline 409 / validation handling.
- routes/teams/detail.tsx: team header with my role; members table; owners can
change member roles via dropdown, owners + admins can remove members
(confirm dialog); below the table, an Invite form (email + role select)
matching POST /api/teams/:id/members. Per-row + per-form error surfacing.
- routes/admin/users.tsx: full users table — email, name, super-admin badge,
created/last-login timestamps, promote/revoke button. Disables the toggle
for the current user when they're super-admin (matches the server's
self-demotion guard); also shows "(you)" indicator next to your own row.
Bundle size: 258 kB → /social-reports/assets/index-C0ofQc9Y.js (+7 kB gzipped).
TS strict + vite build pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>