auth_require_admin();
$q = $pdo->query("
  SELECT u.id, u.email, u.kyc_submitted_at,
         (SELECT COUNT(*) FROM kyc_documents d WHERE d.user_id=u.id) as docs
  FROM users u
  WHERE u.kyc_status='pending'
  ORDER BY u.kyc_submitted_at ASC
");
$rows = $q->fetchAll(PDO::FETCH_ASSOC);
