<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><?= $page_title ?? 'Admin Dashboard' ?> - HealthLink</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
  <style>
    body { font-family: Inter, sans-serif; background: #f0f4ff; margin: 0; }
    .admin-body { padding: 20px 24px; }
    .admin-card { background:#fff; border:1px solid #e8edf8; border-radius:14px; overflow:hidden; box-shadow:0 2px 12px rgba(11,74,203,.07); }
    @media(max-width:768px) { .admin-body { padding: 12px; } }

    /* TOPBAR */
    .topbar {
      background: linear-gradient(135deg, #0B4ACB, #3B63E6);
      padding: 0 24px; height: 58px;
      display: flex; align-items: center; justify-content: space-between;
      position: fixed; top: 0; left: 0; right: 0; z-index: 300;
      box-shadow: 0 2px 16px rgba(11,74,203,.3);
    }
    .topbar-left { display:flex; align-items:center; gap:12px; }
    .topbar-right { display:flex; align-items:center; gap:10px; }

    .tb-profile {
      display:flex; align-items:center; gap:8px;
      padding:5px 12px 5px 5px; border-radius:12px;
      background:rgba(255,255,255,.15); border:1.5px solid rgba(255,255,255,.25);
      text-decoration:none; transition:all .2s;
    }
    .tb-profile:hover { background:rgba(255,255,255,.25); }
    .tb-profile-img {
      width:30px; height:30px; border-radius:8px;
      display:flex; align-items:center; justify-content:center;
      background:rgba(255,255,255,.2); flex-shrink:0;
    }
    .tb-profile-img i { color:#fff; font-size:14px; }
    .tb-profile-name { font-size:12px; font-weight:600; color:#fff; }

    .admin-main { padding-top: 58px; }

    @media(max-width:768px) {
      .topbar { padding: 0 12px; }
      .tb-profile-name { display:none; }
    }
  </style>
</head>
<body>
<?php include 'sidebar.php'; ?>

<div class="topbar">
  <div class="topbar-left">
    <button class="sb-hamburger" onclick="mobToggle()" style="position:static;box-shadow:none;background:rgba(255,255,255,.15);">
      <i class="fas fa-bars"></i>
    </button>
    <img src="<?= SITE_URL ?>/black.png" alt="HealthLink" style="height:44px;object-fit:contain;">
  </div>
  <div class="topbar-right">
    <a href="notifications.php" style="position:relative;width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,.15);border:1.5px solid rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;text-decoration:none;">
      <i class="fas fa-bell"></i>
    </a>
    <div class="tb-profile">
      <div class="tb-profile-img"><i class="fas fa-user-shield"></i></div>
      <span class="tb-profile-name"><?= htmlspecialchars($_SESSION['admin_name'] ?? 'Admin') ?></span>
    </div>
  </div>
</div>

<div class="admin-main">
  <div class="admin-body">
