

<style>
/* ===== SIDEBAR BASE ===== */
#admin-sidebar {
  width: 240px;
  background: #111;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;   /* ✅ SCROLLABLE */
  transition: width .25s ease;
  z-index: 1030;
}

/* Collapsed */
#admin-sidebar.collapsed {
  width: 70px;
}

/* Hide text when collapsed */
#admin-sidebar.collapsed .menu-text,
#admin-sidebar.collapsed small,
#admin-sidebar.collapsed .section-title {
  display: none;
}

/* Nav links */
#admin-sidebar .nav-link {
  color: #e5e7eb;
  padding: 10px 14px;
  border-radius: 6px;
}

#admin-sidebar .nav-link:hover {
  background: rgba(255,255,255,.08);
}

#admin-sidebar .nav-link.active {
  background: rgba(255,193,7,.15);
  color: #ffc107;
}

/* MAIN OFFSET */
#admin-main {
  margin-left: 240px;
  transition: margin-left .25s ease;
}

#admin-main.collapsed {
  margin-left: 70px;
}

/* Scrollbar */
#admin-sidebar::-webkit-scrollbar {
  width: 6px;
}
#admin-sidebar::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
</style>

<div class="d-flex">

  <!-- SIDEBAR -->
  <aside id="admin-sidebar" class="bg-dark text-white">

    <div class="p-3 border-bottom border-secondary d-flex justify-content-between align-items-center">
      <div>
        <h5 class="mb-0 text-warning fw-bold">Eliteguarantytrust</h5>
        <small class="text-muted">Admin Panel</small>
      </div>

      <!-- TOGGLE BUTTON -->
      <button class="btn btn-sm btn-outline-warning"
              onclick="toggleSidebar()">
        <i class="bi bi-list"></i>
      </button>
    </div>

    <nav class="nav flex-column p-2">

      <a class="nav-link <?= $current==='dashboard.php'?'active':'' ?>" href="dashboard.php">
        <i class="bi bi-speedometer2 me-2"></i>
        <span class="menu-text">Dashboard</span>
      </a>

      <div class="text-uppercase text-muted small px-3 mt-3 section-title">Customers</div>

      <a class="nav-link <?= $current==='customers.php'?'active':'' ?>" href="customers.php">
        <i class="bi bi-people me-2"></i>
        <span class="menu-text">Customers</span>
      </a>

      <a class="nav-link <?= $current==='customer_create.php'?'active':'' ?>" href="customer_create.php">
        <i class="bi bi-person-plus me-2"></i>
        <span class="menu-text">Add Customers</span>
      </a>

      <a class="nav-link <?= $current==='adjust_balance.php'?'active':'' ?>" href="adjust_balance.php">
        <i class="bi bi-plus-slash-minus me-2"></i>
        <span class="menu-text">Adjust Balance</span>
      </a>

      <div class="text-uppercase text-muted small px-3 mt-3 section-title">Operations</div>

      <a class="nav-link <?= $current==='kyc_review.php'?'active':'' ?>" href="kyc_review.php">
        <i class="bi bi-shield-check me-2"></i>
        <span class="menu-text">KYC Review</span>
      </a>

      <a class="nav-link <?= $current==='loan_approvals.php'?'active':'' ?>" href="loan_approvals.php">
        <i class="bi bi-bank me-2"></i>
        <span class="menu-text">Loans</span>
      </a>

      <a class="nav-link <?= $current==='savings.php'?'active':'' ?>" href="savings.php">
        <i class="bi bi-piggy-bank me-2"></i>
        <span class="menu-text">Savings Entries</span>
      </a>

      <div class="text-uppercase text-muted small px-3 mt-3 section-title">Approvals</div>

      <a class="nav-link <?= $current==='wire_approvals.php'?'active':'' ?>" href="wire_approvals.php">
        <i class="bi bi-arrow-left-right me-2"></i>
        <span class="menu-text">Wire Transfers</span>
      </a>
       <a class="nav-link <?= $current==='wire_codes.php'?'active':'' ?>" href="wire_codes.php">
        <i class="bi bi-arrow-left-right me-2"></i>
        <span class="menu-text">Wire Codes</span>
      </a>


      <a class="nav-link <?= $current==='crypto_approvals.php'?'active':'' ?>" href="crypto_approvals.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Crypto Approvals</span>
      </a>
     
      <a class="nav-link <?= $current==='card_requests.php'?'active':'' ?>" href="card_requests.php">
        <i class="bi bi-credit-card-2-front me-2"></i>
        <span class="menu-text">Card Requests</span>
      </a>

      <div class="text-uppercase text-muted small px-3 mt-3 section-title">Crypto Dashboard</div>
 
     <a class="nav-link <?= $current==='crypto_admin_dashboard.php'?'active':'' ?>" href="crypto_admin_dashboard.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Crypto Admin</span>
      </a>
      <a class="nav-link <?= $current==='crypto_rates.php'?'active':'' ?>" href="crypto_rates.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Crypto Rates</span>
      </a>
         <a class="nav-link <?= $current==='crypto_reserve.php'?'active':'' ?>" href="crypto_reserve.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Crypto Reserve</span>
      </a>
        <a class="nav-link <?= $current==='crypto_faucet_admin.php'?'active':'' ?>" href="crypto_faucet_admin.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Faucet Admin</span>
      </a>
       <a class="nav-link <?= $current==='crypto_multisig_review.php'?'active':'' ?>" href="crypto_multisig_review.php">
        <i class="bi bi-currency-bitcoin me-2"></i>
        <span class="menu-text">Multisig Admin</span>
      </a>


      <div class="text-uppercase text-muted small px-3 mt-3 section-title">Reports</div>

      <a class="nav-link <?= $current==='reports.php'?'active':'' ?>" href="reports.php">
        <i class="bi bi-graph-up me-2"></i>
        <span class="menu-text">Financial Reports</span>
      </a>

      <a class="nav-link <?= $current==='audit_logs.php'?'active':'' ?>" href="audit_logs.php">
        <i class="bi bi-journal-check me-2"></i>
        <span class="menu-text">Audit Logs</span>
      </a>

      <div class="text-uppercase text-muted small px-3 mt-3 section-title">System</div>

      <a class="nav-link <?= $current==='settings.php'?'active':'' ?>" href="settings.php">
        <i class="bi bi-gear me-2"></i>
        <span class="menu-text">Settings</span>
      </a>

      <div class="mt-4 px-3">
        <a class="btn btn-outline-warning w-100 btn-sm" href="logout.php">
          <i class="bi bi-box-arrow-right me-1"></i>
          <span class="menu-text">Logout</span>
        </a>
      </div>

    </nav>
  </aside>

  <!-- MAIN -->
  <main id="admin-main" class="flex-grow-1">
