<?php require_once __DIR__ . '/../auth.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title><?php echo isset($pageTitle) ? h($pageTitle) : 'Gotalist Members'; ?></title>
  <link rel="stylesheet" href="assets/css/styles.css" />
</head>
<body>
  <header class="topbar">
    <div class="container topbar-inner">
      <a href="dashboard.php" class="brand">
        <span class="brand-mark">G</span>
        <span>Gotalist Members</span>
      </a>
      <div class="btn-row" style="margin-top:0;">
        <div class="user-pill">
  Logged in as <?php echo h($_SESSION['username'] ?? 'Member'); ?>
  (<?php echo h($_SESSION['role'] ?? 'member'); ?>)
</div>
        <a class="btn btn-danger" href="logout.php">Logout</a>
      </div>
    </div>
  </header>
