<!-- Sidebar -->
<nav class="sidebar sidebar-offcanvas" id="sidebar">
    <ul class="nav">

        <!-- Profile -->
        <li class="nav-item nav-profile border-bottom">
            <a href="#" class="nav-link flex-column">
                <div class="nav-profile-image">
                    <img src="assets/images/img2.png" alt="profile">
                </div>
                <div class="nav-profile-text d-flex ms-0 mb-3 flex-column">
                    <span class="fw-semibold mb-1 mt-2 text-center">
                       <?php echo $_SESSION['gym_owner']; ?>
                    </span>
                    <span class="text-secondary icon-sm text-center text-muted">
                            <?php echo htmlspecialchars($current_gym['name'] ?? ''); ?>
                    </span>
              </div>
            </a>
        </li>

        <!-- Logo + Search -->
        <li class="nav-item pt-3">
            <a class="nav-link d-block" href="index.php">
                <img class="sidebar-brand-logo" src="assets/images/logo.svg" alt="">
                <img class="sidebar-brand-logomini" src="assets/images/logo-mini.svg" alt="">
                <div class="small fw-light pt-1">Gym Management</div>
            </a>

            <form class="d-flex align-items-center" action="#">
                <div class="input-group">
                    <span class="input-group-text border-0">
                        <i class="mdi mdi-magnify"></i>
                    </span>
                    <input type="text" class="form-control border-0" placeholder="Search">
                </div>
            </form>
        </li>

        <li class="pt-2 pb-1"><span class="nav-item-head">Main Menu</span></li>

        <!-- Dashboard -->
        <li class="nav-item">
            <a class="nav-link" href="index.php">
                <i class="mdi mdi-compass-outline menu-icon"></i>
                <span class="menu-title">Dashboard</span>
            </a>
        </li>

        <!-- Staff Management -->
        <li class="nav-item">
            <a class="nav-link" data-bs-toggle="collapse" href="#staffMenu" aria-expanded="false">
                <i class="mdi mdi-account-group menu-icon"></i>
                <span class="menu-title">Staff Management</span>
                <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="staffMenu">
                <ul class="nav flex-column sub-menu">
                    <li class="nav-item">
                        <a class="nav-link" href="basic-staff.php">All Staff</a>
                    </li>
                </ul>
            </div>
        </li>

        <!-- Members -->
        <li class="nav-item">
            <a class="nav-link" data-bs-toggle="collapse" href="#membersMenu" aria-expanded="false">
                <i class="mdi mdi-account-multiple menu-icon"></i>
                <span class="menu-title">Members</span>
                <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="membersMenu">
                <ul class="nav flex-column sub-menu">
                    <li class="nav-item">
                        <a class="nav-link" href="members.php">All Members</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="payments.php">Payments</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="membership-plans.php">Membership Plans</a>
                    </li>
                </ul>
            </div>
        </li>

        <!-- Attendance -->
        <li class="nav-item">
            <a class="nav-link" data-bs-toggle="collapse" href="#attendanceMenu" aria-expanded="false">
                <i class="mdi mdi-calendar-check menu-icon"></i>
                <span class="menu-title">Attendance</span>
                <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="attendanceMenu">
                <ul class="nav flex-column sub-menu">
                    <li class="nav-item">
                        <a class="nav-link" href="reception_attendance.php">Staff Attendance</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="member_attendance.php">Member Attendance</a>
                    </li>
                </ul>
            </div>
        </li>

<!-- Subscriptions Main Menu -->
<li class="nav-item">
    <a class="nav-link" data-bs-toggle="collapse" href="#subscriptionsMenu" aria-expanded="false">
        <i class="mdi mdi-credit-card-multiple menu-icon"></i>
        <span class="menu-title">Subscriptions</span>
        <i class="menu-arrow"></i>
    </a>

    <!-- Sub Menu -->
    <div class="collapse" id="subscriptionsMenu">
        <ul class="nav flex-column sub-menu">
            <li class="nav-item">
                <a class="nav-link" href="subscriptions.php">Plans</a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="#">Current Packages</a>
            </li>
        </ul>
    </div>
</li>


<!-- Rest of sidebar code... -->

        <li class="pt-2 pb-1"><span class="nav-item-head">User Pages</span></li>

        <!-- Logout -->
        <li class="nav-item">
            <a class="nav-link text-danger" href="logout.php">
                <i class="mdi mdi-logout menu-icon"></i>
                <span class="menu-title">Logout</span>
            </a>
        </li>

    </ul>
</nav>
