<?php
// includes/sidebar_admin.php

$jenis_admin = $_SESSION['jenis_admin'] ?? 'admin';
?>

<style>
  .sidebar {
      position: fixed;
      top: 100px; /* sama tinggi header */
      left: 0;
      width: 180px;
      height: calc(100vh - 100px);
      background-color: #3b0a77;
      padding-top: 20px;
      color: white;
      font-family: 'Rubik', sans-serif;
      z-index: 1040;
  }
  .sidebar a {
      display: block;
      padding: 12px 20px;
      color: white;
      text-decoration: none;
      font-weight: 600;
      font-size: 16px;
      transition: background-color 0.3s ease;
  }
  .sidebar a i {
      margin-right: 8px;
      font-size: 18px;
  }
  .sidebar a:hover, .sidebar a.active {
      background-color: #ff6f00;
      color: white;
  }
</style>

<div class="sidebar">
  <a href="dashboard_admin.php"><i class="bi bi-speedometer2"></i> Dashboard</a>
  <a href="senarai_aktiviti.php"><i class="bi bi-calendar-event"></i> Pengurusan Aktiviti</a>
  <a href="senarai_pelajar.php"><i class="bi bi-people"></i> Pengurusan Pelajar</a>

  <?php if ($jenis_admin === 'utama'): ?>
    <a href="senarai_admin.php"><i class="bi bi-person-badge"></i> Pengurusan Admin</a>
  <?php endif; ?>
  
  <a href="senarai_penyertaan.php"><i class="bi bi-check2-square"></i> Pengurusan Penyertaan</a>
  <a href="pengurusan_kehadiran.php"><i class="bi bi-clipboard-check"></i> Pengurusan Kehadiran</a>
  <a href="pengurusan_sijil.php"><i class="bi bi-award"></i> Pengurusan Sijil</a>
  <a href="laporan.php"><i class="bi bi-bar-chart"></i> Laporan & Statistik</a>
  
  <!-- Tukar menu Tetapan Sistem kepada Laporan Merit -->
  <a href="laporan_merit.php" target="_blank"><i class="bi bi-file-earmark-text"></i> Laporan Merit</a>
  
  <a href="logout_admin.php" onclick="return confirm('Log keluar?')"><i class="bi bi-box-arrow-right"></i> Log Keluar</a>
</div>
