<div class="topbar">
    <div class="topbar-left" style="display: flex; align-items: center; gap: 0.75rem;">
        <button id="sidebar-toggle" class="menu-toggle-btn" aria-label="Toggle Menu">
            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 1.25rem; height: 1.25rem; stroke-width: 2.5;">
                <path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16"></path>
            </svg>
        </button>
        <div class="dashboard-header">
            <h1 class="dashboard-title"><?php echo e($title ?? 'Dashboard'); ?></h1>
            <?php if(isset($subtitle)): ?>
                <p class="dashboard-subtitle"><?php echo e($subtitle); ?></p>
            <?php endif; ?>
        </div>
    </div>

    <div class="topbar-right">
        <?php if(isset($breadcrumbs)): ?>
            <?php echo $breadcrumbs; ?>

        <?php endif; ?>

        <?php if(isset($rightContent)): ?>
            <?php echo $rightContent; ?>

        <?php endif; ?>

        <div class="admin-profile" style="margin-left: 1rem;">
            <div class="avatar-initials">
                <?php echo e(strtoupper(substr(session('admin_name', 'Admin'), 0, 2))); ?>

                <span class="online-dot"></span>
            </div>
            <div class="admin-info">
                <span class="admin-name"><?php echo e(session('admin_name', 'Admin')); ?></span>
                <span class="admin-role">Super Admin</span>
            </div>
        </div>
    </div>
</div>

<style>
    /* Topbar Header Area */
    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        flex-wrap: wrap;
        width: 100%;
    }

    .topbar-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .menu-toggle-btn {
        display: none;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #334155;
        transition: all 0.2s ease;
    }

    .menu-toggle-btn:hover {
        background-color: #eff6ff;
        color: #3b46f1;
        border-color: #3b46f1;
    }

    .menu-toggle-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .dashboard-header {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }

    .dashboard-title {
        font-size: 1.75rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: #0e1c59;
    }

    .dashboard-subtitle {
        font-size: 0.875rem;
        color: #64748b;
        font-weight: 500;
    }

    /* Right section: Admin Profile */
    .topbar-right {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
    }

    /* User Admin profile badge */
    .admin-profile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background-color: #ffffff;
        padding: 0.375rem 0.875rem 0.375rem 0.375rem;
        border-radius: 50px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .avatar-initials {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, #4f46e5, #3b82f6);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-weight: 700;
        font-size: 0.875rem;
        position: relative;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .online-dot {
        width: 10px;
        height: 10px;
        background-color: #10b981;
        border: 2px solid #ffffff;
        border-radius: 50%;
        position: absolute;
        bottom: 0;
        right: 0;
    }

    .admin-info {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .admin-name {
        font-size: 0.875rem;
        font-weight: 700;
        color: #0f172a;
    }

    .admin-role {
        font-size: 0.75rem;
        color: #64748b;
        font-weight: 500;
    }

    /* Breadcrumbs navigation */
    .breadcrumbs-container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: #64748b;
    }

    .breadcrumbs-link {
        color: #3b46f1;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .breadcrumbs-link:hover {
        color: #2a35d8;
    }

    @media (max-width: 1024px) {
        .menu-toggle-btn {
            display: flex !important;
        }
    }
</style>
<?php /**PATH /home/sainikcanteen/public_html/tFDataask/resources/views/admin/sidebar/topbar.blade.php ENDPATH**/ ?>