<!-- 左侧菜单栏 -->
<aside class="admin-sidebar">
    <!-- Logo -->
    <div class="sidebar-logo">
        <span class="material-symbols-outlined logo-icon">blur_on</span>
        <span class="logo-text">ZJPB - 自己品吧</span>
    </div>

    <!-- 主菜单 -->
    <nav class="sidebar-nav">
        <div class="nav-section">
            <div class="nav-section-title">主菜单</div>
            <ul class="nav-menu">
                <li class="nav-item {% if active_page == 'dashboard' %}active{% endif %}">
                    <a href="{{ url_for('admin.index') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">dashboard</span>
                        <span class="nav-text">控制台</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'site' %}active{% endif %}">
                    <a href="{{ url_for('site.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">public</span>
                        <span class="nav-text">网站管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'tag' %}active{% endif %}">
                    <a href="{{ url_for('tag.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">label</span>
                        <span class="nav-text">标签管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'news' %}active{% endif %}">
                    <a href="{{ url_for('news.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">newspaper</span>
                        <span class="nav-text">新闻管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'prompt' %}active{% endif %}">
                    <a href="{{ url_for('prompttemplate.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">psychology</span>
                        <span class="nav-text">Prompt管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'admin_user' %}active{% endif %}">
                    <a href="{{ url_for('admin_users.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">admin_panel_settings</span>
                        <span class="nav-text">管理员</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'skill' %}active{% endif %}">
                    <a href="{{ url_for('skills.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">handyman</span>
                        <span class="nav-text">Skills管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'api_key' %}active{% endif %}">
                    <a href="{{ url_for('api_keys.index_view') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">key</span>
                        <span class="nav-text">API密钥</span>
                    </a>
                </li>
            </ul>
        </div>

        <!-- 系统菜单 -->
        <div class="nav-section">
            <div class="nav-section-title">系统</div>
            <ul class="nav-menu">
                <li class="nav-item {% if active_page == 'users' %}active{% endif %}">
                    <a href="{{ url_for('admin_users') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">group</span>
                        <span class="nav-text">用户管理</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'seo' %}active{% endif %}">
                    <a href="{{ url_for('seo_tools') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">search</span>
                        <span class="nav-text">SEO工具</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'batch_import' %}active{% endif %}">
                    <a href="{{ url_for('batch_import') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">upload_file</span>
                        <span class="nav-text">批量导入</span>
                    </a>
                </li>
                <li class="nav-item {% if active_page == 'change_password' %}active{% endif %}">
                    <a href="{{ url_for('change_password') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">lock_reset</span>
                        <span class="nav-text">修改密码</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{ url_for('index') }}" class="nav-link" target="_blank">
                        <span class="material-symbols-outlined nav-icon">open_in_new</span>
                        <span class="nav-text">查看网站</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{ url_for('admin_logout') }}" class="nav-link">
                        <span class="material-symbols-outlined nav-icon">logout</span>
                        <span class="nav-text">退出登录</span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    <!-- 用户信息 -->
    <div class="sidebar-user">
        <div class="user-avatar">
            <span class="material-symbols-outlined">account_circle</span>
        </div>
        <div class="user-info">
            <div class="user-name">{{ current_user.username }}</div>
            <div class="user-email">{{ current_user.email or 'admin@zjpb.com' }}</div>
        </div>
    </div>
</aside>