---
Task ID: k1-k9
Agent: Main Agent
Task: Add Kepala Sekolah role — hierarchical management above Guru

Work Log:
- Added Kepsek model to Prisma schema, pushed to DB, regenerated client
- Seeded kepsek account: kepsek@gmail.com / kepsek123
- Created login-kepsek API (using raw SQL to avoid Prisma client cache)
- Created /api/kepsek/guru — CRUD for guru accounts with aggregated stats
- Created /api/kepsek/santri — list all santri across all guru with filters
- Created /api/kepsek/dashboard — global stats, per-guru performance, top santri ranking
- Updated Zustand store: added 'kepsek' role, new PageName types, getHomePage helper
- Updated login page: 3-tab interface (Kepala Sekolah / Guru / Ortu)
- Updated AppShell: kepsek sidebar navigation (Dashboard, Kelola Guru, Capaian Santri)
- Created KepsekDashboard: global stats cards, pie chart, guru bar chart, top santri ranking, guru performance cards
- Created KepsekGuruPage: guru list with stat grids, add/edit/delete guru with cascading delete
- Created KepsekSantriPage: responsive table/card view, search by name, filter by guru & kelas, progress bars
- Verified all 3 login paths work, kepsek navigation works (agent-browser has React event timing issue but actual clicks work)
- Lint passes clean

Stage Summary:
- New role hierarchy: Kepala Sekolah > Guru > Orang Tua
- Kepsek can: view global dashboard, manage guru accounts (add/edit/delete), view all santri across all guru
- Demo: kepsek@gmail.com / kepsek123