# Admin Section Redesign Spec **Date:** 2026-03-18 **Scope:** UX/UI consistency overhaul of AuditLog, OidcConfig, UserManagement admin pages ## Overview Three expert reviews identified critical bugs, consistency gaps, and usability issues in the admin section. This spec covers all changes organized by priority tier. --- ## Tier 1: Critical Bugs ### 1.1 Replace nonexistent `--bg-base` token `--bg-base` is referenced 3 times but does not exist in `tokens.css`. Dark mode is broken. **Files:** - `Admin.module.css` line 6: `.adminNav` - `UserManagement.module.css` lines 13, 19: `.listPane`, `.detailPane` **Fix:** Replace all `var(--bg-base)` with `var(--bg-surface)`. ### 1.2 Change AuditEvent `id` to string `DataTable` requires `T extends { id: string }`. Current `AuditEvent.id` is `number`. **Files:** - `auditMocks.ts`: change `id: number` to `id: string`, update all IDs to `'audit-1'`, `'audit-2'`, etc. - `AuditLog.tsx`: update `expandedId` state from `number | null` to `string | null` --- ## Tier 2: High-Impact Consistency ### 2.1 Replace admin nav with Tabs composite The hand-rolled admin nav in `Admin.tsx` lacks ARIA roles and has subtle color differences from the Tabs composite. **Fix:** Replace the custom `