API: api/kpi/live.php
Controller: Controllers/KPIController.php
Cron: cron/kpi_rollup.php

Usage:
GET /api/kpi/live.php?start=2025-12-01&end=2025-12-07
Auth: Bearer JWT (auth_check middleware validates)
Optional query params: user_id, team_id, role

Notes:
- The controller uses sd_customers.created_at and sd_followups.created_at. If your schema uses a different created column, update the queries in KPIController::countLeads / countFollowups / countByCustomerStatus.
- If your token middleware returns different claim names (e.g., team => teamId), update api/kpi/live.php to map them into $filters.
- Cron is safe to run daily; snapshot payload stored as JSON in sd_kpi_snapshots.payload.
