<header class="admin-topbar d-flex align-items-center justify-content-between px-4">
    <div class="d-flex align-items-center gap-3">
        <button class="btn btn-sm btn-outline-secondary sidebar-toggle d-lg-none" type="button">
            <i class="bi bi-list"></i>
        </button>
        <h5 class="mb-0">@yield('title', 'Dashboard')</h5>
    </div>
    <div class="d-flex align-items-center gap-3">
        <a href="{{ url('/') }}" target="_blank" class="btn btn-sm btn-outline-secondary">
            <i class="bi bi-globe"></i> View Site
        </a>
        <div class="dropdown">
            <button class="btn btn-outline-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown">
                <i class="bi bi-person-circle me-1"></i>{{ auth()->user()->name }}
            </button>
            <ul class="dropdown-menu dropdown-menu-end">
                <li><a class="dropdown-item" href="{{ route('admin.settings.edit') }}"><i class="bi bi-gear me-2"></i>Settings</a></li>
                <li><a class="dropdown-item" href="{{ route('admin.password.edit') }}"><i class="bi bi-key me-2"></i>Change Password</a></li>
                <li><hr class="dropdown-divider"></li>
                <li>
                    <form action="{{ route('admin.logout') }}" method="POST">
                        @csrf
                        <button type="submit" class="dropdown-item text-danger"><i class="bi bi-box-arrow-right me-2"></i>Logout</button>
                    </form>
                </li>
            </ul>
        </div>
    </div>
</header>
