<!-- Top Navbar (with integrated project toolbar) -->
<?php include constant('BASE_PATH') . '/core/views/project-navbar.php'; ?>

<!-- Sidebar Desktop -->
<nav id="sidebarDesktop" class="sidebar d-none d-lg-flex flex-column py-3">
    <ul class="nav nav-pills flex-column mb-auto">
        <li class="nav-item">
            <a href="<?= $baseUrl ?>/projects" class="nav-link">
                <i class="bi bi-arrow-left me-2"></i> Back to Projects
            </a>
        </li>
        <li>
            <hr class="text-secondary my-2">
        </li>
        <?php include constant('BASE_PATH') . '/core/views/project-nav-items.php'; ?>
    </ul>
    <div class="mt-auto px-3 pb-3"><small class="text-muted">v1.0</small></div>
</nav>

<!-- Mobile Offcanvas -->
<div class="offcanvas offcanvas-start bg-dark text-white d-lg-none" id="sidebarOffcanvas">
    <div class="offcanvas-header">
        <h5 class="offcanvas-title"><?= htmlspecialchars($project['name'] ?? 'Project') ?></h5>
        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close navigation"></button>
    </div>
    <div class="offcanvas-body">
        <a href="<?= $baseUrl ?>/projects" class="btn btn-outline-light w-100 mb-3"><i class="bi bi-arrow-left me-2"></i> Back to Projects</a>
        <ul class="nav nav-pills flex-column">
            <?php $navMobile = true; include constant('BASE_PATH') . '/core/views/project-nav-items.php'; $navMobile = false; ?>
        </ul>
    </div>
</div>
