<?php
// Active page helper
$current = basename($_SERVER['PHP_SELF']);
?>

<!-- CUSTOMER SIDEBAR -->
<aside class="bg-dark text-white position-fixed vh-100 d-flex flex-column"
       style="width:240px; left:0; top:0; overflow-y:auto;">

  <!-- BRAND -->
  <div class="p-3 border-bottom border-secondary">
    <h5 class="mb-0 text-warning fw-bold">Eliteguarantytrust</h5>
    <small class="text-muted">Customer Portal</small>
  </div>

  <!-- NAV -->
  <nav class="nav flex-column p-2 flex-grow-1">

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

    <!-- ACCOUNTS -->
    <div class="text-uppercase text-muted small px-3 mt-3">Accounts</div>

    <a class="nav-link text-white <?= $current==='accounts.php'?'active':'' ?>"
       href="accounts.php">
      <i class="bi bi-bank me-2"></i> My Accounts
    </a>

    <a class="nav-link text-white <?= $current==='transactions.php'?'active':'' ?>"
       href="transactions.php">
      <i class="bi bi-list-ul me-2"></i> Transactions
    </a>
       <a class="nav-link text-white <?= $current==='wire_create.php'?'active':'' ?>"
       href="wire_create.php">
      <i class="bi bi-arrow-left-right me-2"></i> Wire Transfer
    </a>

    <!-- PAYMENTS -->
    <div class="text-uppercase text-muted small px-3 mt-3">Payments</div>

    <a class="nav-link text-white <?= $current==='crypto.php'?'active':'' ?>"
       href="crypto.php">
      <i class="bi bi-currency-bitcoin me-2"></i> Crypto Send
    </a>
    <a class="nav-link text-white <?= $current==='crypto_wallet.php'?'active':'' ?>"
       href="crypto_wallet.php">
      <i class="bi bi-currency-bitcoin me-2"></i> Crypto Wallet
    </a>

    <a class="nav-link text-white <?= $current==='crypto_addresses.php'?'active':'' ?>"
       href="crypto_addresses.php">
      <i class="bi bi-currency-bitcoin me-2"></i> Crypto Address
    </a>

  
    <!-- CARDS -->
    <div class="text-uppercase text-muted small px-3 mt-3">Cards</div>

    <a class="nav-link text-white <?= $current==='cards.php'?'active':'' ?>"
       href="cards.php">
      <i class="bi bi-credit-card me-2"></i> My Cards
    </a>
    <a class="nav-link text-white <?= $current==='loans.php'?'active':'' ?>"
       href="loans.php">
      <i class="bi bi-cash-stack me-2"></i> Loans
    </a>
       <a class="nav-link text-white <?= $current==='loan_apply.php'?'active':'' ?>"
       href="loan_apply.php">
      <i class="bi bi-cash-stack me-2"></i> Loan Application

    <!-- SETTINGS -->
    <div class="text-uppercase text-muted small px-3 mt-3">Account</div>

    <a class="nav-link text-white <?= $current==='profile.php'?'active':'' ?>"
       href="profile.php">
      <i class="bi bi-person me-2"></i> Profile
    </a>

    <a class="nav-link text-white <?= $current==='kyc.php'?'active':'' ?>"
       href="kyc.php">
      <i class="bi bi-shield-check me-2"></i> KYC Verification
    </a>

  </nav>

  <!-- FOOTER -->
  <div class="p-3 border-top border-secondary">
    <a href="logout.php" class="btn btn-outline-warning w-100 btn-sm">
      <i class="bi bi-box-arrow-right me-1"></i> Logout
    </a>
  </div>

</aside>
