<?php
if (session_status() === PHP_SESSION_NONE) session_start();
if (!isset($_SESSION['csr_id'])) { header('Location: ../login.php'); exit(); }
if (($_SESSION['csr_role'] ?? 'csr') !== 'team_leader') { header('Location: dashboard.php'); exit(); }
$title = ucwords(str_replace('_', ' ', basename(__FILE__, '.php')));
ob_start();
?>
<div class="cm-card">
  <div class="cm-card__title"><?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?></div>
  <h3 style="font-family:'Space Grotesk',system-ui,sans-serif;font-weight:900;">Team Leader <?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?></h3>
  <p class="text-muted mb-0">This Team Leader page is separated and ready for the next data/layout update.</p>
</div>
<?php
$content = ob_get_clean();
include __DIR__ . '/layout.php';
