<?php $currentPage = basename($_SERVER['PHP_SELF']); ?>
<nav class="sidebar" id="sidebar">
  <div class="sidebar-header">
    <div class="sidebar-logo">
      <svg width="32" height="32" viewBox="0 0 48 48" fill="none"><rect width="48" height="48" rx="10" fill="var(--primary)"/><path d="M14 34V20l10-8 10 8v14H28v-8h-8v8H14z" fill="white"/></svg>
      <span>Admin Panel</span>
    </div>
    <button class="sidebar-close" onclick="closeSidebar()">✕</button>
  </div>
  <ul class="nav-list">
    <li><a href="dashboard.php" class="nav-link <?= $currentPage==='dashboard.php'?'active':'' ?>">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>Dashboard
    </a></li>
    <li><a href="users.php" class="nav-link <?= $currentPage==='users.php'?'active':'' ?>">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>Users
    </a></li>
    <li><a href="services.php" class="nav-link <?= $currentPage==='services.php'?'active':'' ?>">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>Services
    </a></li>
    <li><a href="jobs.php" class="nav-link <?= $currentPage==='jobs.php'?'active':'' ?>">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/></svg>Jobs
    </a></li>
    <li><a href="settings.php" class="nav-link <?= $currentPage==='settings.php'?'active':'' ?>">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.07 4.93l-1.41 1.41M4.93 4.93l1.41 1.41M20 12h-1M4 12H3M19.07 19.07l-1.41-1.41M4.93 19.07l1.41-1.41M12 20v1M12 4V3"/></svg>Settings
    </a></li>
  </ul>
  <div class="sidebar-footer">
    <a href="logout.php" class="nav-link nav-logout">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>Logout
    </a>
  </div>
</nav>
<div class="sidebar-overlay" id="sidebarOverlay" onclick="closeSidebar()"></div>
