<div class="topbar d-flex justify-content-between align-items-center px-3 py-2 shadow-sm bg-white">

    <!-- LEFT: MENU BUTTON -->
    <div class="d-flex align-items-center">
        <button class="btn btn-sm btn-light me-2 d-lg-none" onclick="toggleSidebar()">
            <i class="fa fa-bars"></i>
        </button>

        <h6 class="mb-0"><?= $pageTitle ?? 'Dashboard' ?></h6>
    </div>

    <!-- RIGHT: USER + LOGOUT -->
    <div class="d-flex align-items-center gap-3">

        <span class="text-muted">
            <i class="fa fa-user"></i> <?= e($_SESSION['username']) ?>
        </span>

        <a href="#" class="btn btn-sm btn-danger" data-bs-toggle="modal" data-bs-target="#logoutModal">
            <i class="fa fa-sign-out-alt me-2"></i>
        </a>

    </div>

</div>

