    <!-- Top Navbar -->
    <header class="bg-slate-900 border-b border-slate-200 sticky top-0 z-50 shadow-xs">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
            <div class="flex items-center gap-6">
                <a href="dashboard.php" class="flex items-center gap-2">
                    <span class="text-2xl font-extrabold text-white tracking-tight">MiBuild<span class="text-indigo-300">qc</span></span>
                </a>
                <nav class="hidden md:flex items-center gap-1 text-xs font-semibold text-slate-600">
                    <a href="dashboard.php" class="px-3 py-2 rounded-lg bg-slate-100 text-indigo-700 font-bold">Projects & Artifacts</a>
                    <a href="partners.php" class="px-3 py-2 rounded-lg text-slate-300 hover:bg-slate-50 hover:text-slate-900 transition-colors">Subcontractors</a>
                    <a href="artifact-template-builder.php" class="px-3 py-2 rounded-lg text-slate-300 hover:bg-slate-50 hover:text-slate-900 transition-colors">Artifact Builder</a>
                </nav>
            </div>
            
            <div class="hidden md:flex items-center gap-3">
                <div class="text-right">
                    <!-- <div class="text-xs font-bold text-slate-900"><?php //echo htmlspecialchars($_SESSION['first_name'] . ' ' . $_SESSION['last_name']); ?></div>
                    <div class="text-[10px] text-slate-500 font-medium"><?php //echo htmlspecialchars($user_role); ?></div> -->
                </div>
                <a href="../logout.php" class="px-4 py-1.5 rounded-lg border border-red-500 text-xs font-semibold bg-red-600 text-white hover:bg-slate-900 transition-colors">Log Out</a>
            </div>

            <!-- Mobile Hamburger Button -->
            <div class="flex md:hidden items-center gap-2">
                <button type="button" onclick="toggleMobileNav()" class="p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-100 focus:outline-hidden transition-colors" aria-label="Toggle navigation menu">
                    <svg id="mobile-menu-open-icon" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                    </svg>
                    <svg id="mobile-menu-close-icon" class="w-6 h-6 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                    </svg>
                </button>
            </div>
        </div>

        <!-- Mobile Collapsible Navigation Menu -->
        <div id="mobile-nav-menu" class="hidden md:hidden border-t border-slate-200 bg-white px-4 pt-3 pb-4 space-y-3 shadow-lg">
            <nav class="space-y-1">
                <a href="dashboard.php" class="flex items-center gap-2 px-3 py-2.5 rounded-xl bg-indigo-50 text-indigo-700 font-bold text-sm border border-indigo-100">
                    <svg class="w-4 h-4 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path></svg>
                    <span>Projects & Artifacts</span>
                </a>
                <a href="partners.php" class="flex items-center gap-2 px-3 py-2.5 rounded-xl hover:bg-slate-50 text-slate-700 font-semibold text-sm transition-colors">
                    <svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>
                    <span>Subcontractors</span>
                </a>
                <a href="artifact-template-builder.php" class="flex items-center gap-2 px-3 py-2.5 rounded-xl hover:bg-slate-50 text-slate-700 font-semibold text-sm transition-colors">
                    <svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path></svg>
                    <span>Artifact Builder</span>
                </a>
            </nav>

            <div class="pt-3 border-t border-slate-100 flex items-center justify-between">
                <div class="flex items-center gap-2">
                    <div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center font-bold text-xs">
                        <?php echo strtoupper(substr($_SESSION['first_name'] ?? 'U', 0, 1)); ?>
                    </div>
                    <div>
                        <div class="text-xs font-bold text-slate-900"><?php echo htmlspecialchars($_SESSION['first_name'] . ' ' . $_SESSION['last_name']); ?></div>
                        <div class="text-[10px] text-slate-500 font-medium"><?php echo htmlspecialchars($user_role); ?></div>
                    </div>
                </div>
                <a href="../logout.php" class="px-3 py-1.5 rounded-lg border border-slate-200 text-xs font-semibold text-rose-600 hover:bg-rose-50 transition-colors">
                    Log Out
                </a>
            </div>
        </div>
    </header>

    <!-- Sub-Header Bar: Company Name & Primary Owner Name -->
    <div id="sub-header-bar" class="w-full bg-white border-b border-slate-200/90 shadow-2xs">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2.5 sm:py-0 sm:h-11 flex flex-col sm:flex-row sm:items-center justify-between gap-1.5 text-xs">
            <div class="flex items-center gap-2 font-bold text-slate-800 truncate">
                <svg class="w-4 h-4 text-indigo-600 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
                </svg>
                <span class="truncate"><?php echo htmlspecialchars($company_name); ?></span>
            </div>
            <div class="flex items-center gap-2 font-medium text-slate-600">
                <span class="text-slate-400 text-[11px]">Primary Owner:</span>
                <span class="font-bold text-slate-800 flex items-center gap-1.5">
                    <svg class="w-3.5 h-3.5 text-indigo-500 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
                    </svg>
                    <?php echo htmlspecialchars($primary_owner_name); ?>
                </span>
            </div>
        </div>
    </div>