<header class="border-b border-trade-border bg-trade-sidebar/80 px-4 py-4 backdrop-blur lg:px-6">
    <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
        <div>
            <h1 class="text-2xl font-bold text-white"><?php echo e($pageTitle ?? 'Trading Desk'); ?></h1>
            <p class="text-sm text-slate-400"><?php echo e($pageSubtitle ?? 'FlatTrade account — Real orders & balance'); ?></p>
        </div>
        <div class="flex flex-wrap items-center gap-3">
            <a href="<?php echo e(route('notifications')); ?>" class="relative rounded-lg border border-trade-border bg-trade-panel px-3 py-2 text-sm text-slate-300 hover:text-white">
                Alerts
                <?php if(($unread_notifications ?? 0) > 0): ?>
                    <span class="absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-rose-500 text-xs font-bold text-white"><?php echo e($unread_notifications); ?></span>
                <?php endif; ?>
            </a>
            <div class="rounded-full border border-emerald-500/30 bg-emerald-500/10 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-400">
                Live
            </div>
            <div id="live-clock" class="font-mono text-sm text-slate-300">--:--:--</div>

            <div class="hidden h-6 w-px bg-trade-border sm:block"></div>

            <div class="flex items-center gap-2 rounded-xl border border-trade-border bg-trade-panel px-3 py-1.5">
                <div class="hidden text-right sm:block">
                    <div class="text-sm font-medium text-white"><?php echo e(auth()->user()->name); ?></div>
                    <div class="text-xs text-slate-500"><?php echo e(auth()->user()->isAdmin() ? 'Admin' : 'Trader'); ?></div>
                </div>
                <form method="POST" action="<?php echo e(route('logout')); ?>">
                    <?php echo csrf_field(); ?>
                    <button type="submit" class="trade-btn-ghost text-xs sm:text-sm">
                        <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"/>
                        </svg>
                        Log out
                    </button>
                </form>
            </div>
        </div>
    </div>
</header>
<?php /**PATH /Users/vishal/Desktop/AutoTrade-FlatTrade/resources/views/layouts/partials/topbar.blade.php ENDPATH**/ ?>