<!-- Admin Sidebar Component -->
<aside class="admin-sidebar" role="navigation" aria-label="Main navigation">
    <!-- Sidebar Header -->
    <div class="admin-sidebar__header">
        <svg class="admin-sidebar__logo" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
            <rect width="40" height="40" rx="8" fill="currentColor" opacity="0.1"/>
            <path d="M20 10L28 16V24L20 30L12 24V16L20 10Z" fill="currentColor" opacity="0.8"/>
        </svg>
        <h1 class="admin-sidebar__title">Admin</h1>
    </div>

    <!-- Main Navigation -->
    <nav class="admin-nav" aria-label="Primary">
        <!-- Dashboard Section -->
        <div class="admin-nav__section">
            <ul class="admin-nav__list" role="list">
                <li class="admin-nav__item">
                    <a href="/admin" class="admin-nav__link" aria-current="{current_path === '/admin' ? 'page' : null}">
                        <svg class="admin-nav__icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
                        </svg>
                        <span>Dashboard</span>
                    </a>
                </li>
            </ul>
        </div>

        <!-- Content Section -->
        <div class="admin-nav__section">
            <h2 class="admin-nav__section-title">Content</h2>
            <ul class="admin-nav__list" role="list">
                <li class="admin-nav__item">
                    <a href="/admin/pages" class="admin-nav__link" aria-current="{current_path === '/admin/pages' ? 'page' : null}">
                        <svg class="admin-nav__icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
                        </svg>
                        <span>Pages</span>
                    </a>
                </li>
                <li class="admin-nav__item">
                    <a href="/admin/media" class="admin-nav__link" aria-current="{current_path === '/admin/media' ? 'page' : null}">
                        <svg class="admin-nav__icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
                        </svg>
                        <span>Media</span>
                    </a>
                </li>
            </ul>
        </div>

        <!-- System Section -->
        <div class="admin-nav__section">
            <h2 class="admin-nav__section-title">System</h2>
            <ul class="admin-nav__list" role="list">
                <li class="admin-nav__item">
                    <a href="/admin/users" class="admin-nav__link" aria-current="{current_path === '/admin/users' ? 'page' : null}">
                        <svg class="admin-nav__icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"/>
                        </svg>
                        <span>Users</span>
                    </a>
                </li>
                <li class="admin-nav__item">
                    <a href="/admin/settings" class="admin-nav__link" aria-current="{current_path === '/admin/settings' ? 'page' : null}">
                        <svg class="admin-nav__icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
                        </svg>
                        <span>Settings</span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    <!-- Sidebar Footer -->
    <div class="admin-sidebar__footer">
        <a href="/admin/profile" class="admin-sidebar__user">
            <img
                src="{user.avatar ?? '/assets/default-avatar.png'}"
                alt="{user.name}"
                class="admin-sidebar__avatar"
                width="32"
                height="32"
            />
            <div class="admin-sidebar__user-info">
                <span class="admin-sidebar__user-name">{user.name}</span>
                <span class="admin-sidebar__user-role">{user.role}</span>
            </div>
        </a>
    </div>
</aside>

<!-- Mobile Menu Toggle -->
<button
    type="button"
    class="admin-sidebar__mobile-toggle"
    aria-label="Toggle navigation menu"
    aria-expanded="false"
    data-mobile-menu-toggle
>
    <svg class="admin-sidebar__toggle-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
    </svg>
</button>

<!-- Mobile Overlay -->
<div class="admin-mobile-overlay" data-mobile-menu-overlay aria-hidden="true"></div>
