<header class="bg-white shadow-sm border-b border-gray-200 px-6 py-3 flex items-center justify-between flex-shrink-0">
    <?php
        $headerSmsBalance = null;

        if (auth()->check() && auth()->user()->isOwner()) {
            $headerSmsBalance = \Illuminate\Support\Facades\Cache::remember(
                'owner_sms_balance_badge',
                now()->addSeconds(60),
                fn () => app(\App\Services\SmsService::class)->getBalance()
            );
        }
    ?>

    <div class="flex items-center gap-3">
        
        <button class="md:hidden text-gray-500 hover:text-gray-700" onclick="document.getElementById('sidebar').classList.toggle('hidden')">
            <svg 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"/>
            </svg>
        </button>
        <h1 class="text-lg font-semibold text-gray-800"><?php echo $__env->yieldContent('page-title', 'Dashboard'); ?></h1>
    </div>

    <div class="flex items-center gap-4">
        <?php if(!empty($headerSmsBalance)): ?>
            <div class="flex items-center gap-2 rounded-full border px-3 py-1.5 text-sm <?php echo e(($headerSmsBalance['success'] ?? false) ? 'border-emerald-200 bg-emerald-50 text-emerald-800' : 'border-amber-200 bg-amber-50 text-amber-800'); ?>">
                <span class="font-semibold">SMS</span>
                <span class="font-bold">
                    <?php echo e(($headerSmsBalance['success'] ?? false) ? (($headerSmsBalance['balance'] ?? '--') . ' left') : 'Unavailable'); ?>

                </span>
            </div>
        <?php endif; ?>

        <?php echo $__env->make('partials.panel-notifications', [
            'dropdownId' => 'adminNotificationsMenu',
            'alignmentClass' => 'right-0',
        ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

        
        <a href="<?php echo e(url('/')); ?>" target="_blank"
           class="text-sm text-gray-500 hover:text-blue-600 flex items-center gap-1">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                      d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/>
            </svg>
            View Site
        </a>

        
        <a href="<?php echo e(route('profile.edit')); ?>" class="flex items-center gap-2 rounded-full px-2 py-1 transition hover:bg-gray-100">
            <div class="w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-white text-sm font-semibold">
                <?php echo e(strtoupper(substr(auth()->user()->name, 0, 1))); ?>

            </div>
            <span class="text-sm font-medium text-gray-700 hidden sm:block"><?php echo e(auth()->user()->name); ?></span>
        </a>
    </div>

</header>
<?php /**PATH C:\xampp\htdocs\gps-migration\resources\views/admin/partials/topnav.blade.php ENDPATH**/ ?>