/* 侧边栏布局样式 - 兼容现有CSS变量系统 */

/* 主容器 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* 左侧导航栏 - 高级简约设计 */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100vh;
}

/* 侧边栏折叠状态 */
.sidebar.collapsed {
    width: 80px;
    min-width: 80px;
}

/* 折叠状态下隐藏文字内容 */
.sidebar.collapsed .menu-panel-item .item-name,
.sidebar.collapsed .menu-panel-item .item-count,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .menu-panel-title,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-subtext,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .menu-panel-bottom-info,
.sidebar.collapsed .menu-panel-header::after {
    display: none !important;
}

/* 折叠状态下调整Logo和图标大小 */
.sidebar.collapsed .logo-icon {
    width: 40px;
    height: 40px;
}

/* 折叠状态下调整菜单项间距 */
.sidebar.collapsed .menu-panel-item {
    padding: 12px 8px;
    justify-content: center;
}

/* 折叠状态下调整图标容器大小 */
.sidebar.collapsed .menu-panel-item .item-icon-wrapper {
    width: 40px;
    height: 40px;
}

/* 折叠状态下调整导航项样式 */
.sidebar.collapsed .nav-item {
    padding: 12px 8px;
    justify-content: center;
}

/* 折叠状态下隐藏导航项文字 */
.sidebar.collapsed .nav-item span {
    display: none;
}

/* 侧边栏折叠按钮 */
.sidebar-collapse-btn {
    position: absolute;
    top: 16px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: var(--button-bg);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
}

.sidebar-collapse-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sidebar-collapse-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* 确保主内容区在侧边栏折叠时自动调整 */
.app-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 最近使用工具样式 */
#recent-tools-list .menu-panel-item {
    padding: 12px 16px;
    font-size: 13px;
}

#recent-tools-list .menu-panel-item .item-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

#recent-tools-list .menu-panel-item i {
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

#recent-tools-list .menu-panel-item .item-icon-wrapper img {
    width: 20px;
    height: 20px;
}

#recent-tools-list .menu-panel-item .item-name {
    font-size: 13px;
}

#recent-tools-list .menu-panel-item .item-count {
    font-size: 11px;
    opacity: 0.7;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar.collapsed {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* 移动端隐藏折叠按钮 */
    .sidebar-collapse-btn {
        display: none;
    }
}

[data-theme="dark"] .sidebar {
    background: rgba(18, 18, 18, 0.95);
    border-right-color: rgba(255, 255, 255, 0.08);
}

/* 侧边栏容器 - 两列布局 */
.sidebar-container {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    flex-shrink: 1;
}

/* 右侧菜单面板 */
.sidebar-menu-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.menu-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.menu-panel.active {
    display: flex;
}

.menu-panel-header {
    padding: 0 20px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
    height: 72px;
    min-height: 72px;
    box-sizing: border-box;
    position: relative;
}

.menu-panel-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
}

[data-theme="dark"] .menu-panel-header::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
}

.menu-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.menu-panel-badge {
    background: #3b82f6;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.menu-panel-content {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: transparent;
    gap: 2px;
}

/* 自定义滚动条样式 - 简约高级 */
.menu-panel-content::-webkit-scrollbar {
    width: 4px;
}

.menu-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.menu-panel-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.menu-panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

[data-theme="dark"] .menu-panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .menu-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 确保所有工具列表容器样式一致 */
#pdf-tools-list,
#excel-tools-list,
#favorites-list,
.menu-categories-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

/* 确保分类列表中的项目间距统一 */
.menu-categories-section .menu-panel-item {
    margin: 3px 0;
}

/* 工具列表（PDF、Excel、收藏）使用更小的图标和文字 */
#pdf-tools-list .menu-panel-item,
#excel-tools-list .menu-panel-item,
#favorites-list .menu-panel-item {
    padding: 12px 16px;
    font-size: 13px;
}

#pdf-tools-list .menu-panel-item .item-icon-wrapper,
#excel-tools-list .menu-panel-item .item-icon-wrapper,
#favorites-list .menu-panel-item .item-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

#pdf-tools-list .menu-panel-item i,
#excel-tools-list .menu-panel-item i,
#favorites-list .menu-panel-item i {
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

#pdf-tools-list .menu-panel-item .item-icon-wrapper img,
#excel-tools-list .menu-panel-item .item-icon-wrapper img,
#favorites-list .menu-panel-item .item-icon-wrapper img {
    width: 20px;
    height: 20px;
}

#pdf-tools-list .menu-panel-item .item-name,
#excel-tools-list .menu-panel-item .item-name,
#favorites-list .menu-panel-item .item-name {
    font-size: 13px;
}

#pdf-tools-list .menu-panel-item .item-count,
#excel-tools-list .menu-panel-item .item-count,
#favorites-list .menu-panel-item .item-count {
    font-size: 13px;
}


.menu-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 1px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    background: transparent;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.menu-panel-item::before {
    display: none;
}

.menu-panel-item::after {
    display: none;
}

.menu-panel-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.menu-panel-item.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.menu-panel-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--button-bg);
    border-radius: 0 2px 2px 0;
}

/* 分类标题样式 - 简洁设计 */
.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 16px;
    padding: 0 14px;
    position: relative;
    display: block;
    opacity: 0.6;
}

.menu-section-title::after {
    display: none;
}

/* 分类组样式 */
/* 移除分类组样式，不再需要展开/收起功能 */

.menu-panel-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 1px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    background: transparent;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
}

.menu-panel-category-header::before {
    display: none;
}

.menu-panel-category-header::after {
    display: none;
}

.menu-panel-category-header:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.menu-panel-category-header.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.menu-panel-category-header.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--button-bg);
    border-radius: 0 2px 2px 0;
}

.menu-panel-category-header.active .item-name {
    color: var(--text-primary);
}

.menu-panel-category-header.active i {
    color: var(--text-primary);
    opacity: 1;
}

.menu-panel-category-header.active .item-icon-wrapper img {
    opacity: 1;
    filter: none;
}

/* 移除展开/收起箭头图标样式 */

/* 移除分类列表的收起/展开功能，始终显示 */

.menu-panel-sub-item {
    padding-left: 16px;
    font-size: 14px;
    position: relative;
}

.menu-panel-sub-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: var(--border-color);
    opacity: 0.5;
}

[data-theme="dark"] .menu-panel-sub-item::before {
    background: rgba(255, 255, 255, 0.1);
}

.menu-panel-sub-item .item-icon-wrapper {
    width: 30px;
    height: 30px;
}


.menu-panel-item i {
    font-size: 18px;
    width: auto;
    height: auto;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    opacity: 0.7;
}

.menu-panel-item:hover i {
    color: var(--link-color);
    opacity: 1;
}

.menu-panel-item.active i {
    color: var(--link-color);
    opacity: 1;
}

.menu-panel-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.menu-panel-item:hover img {
    opacity: 1;
    color: var(--link-color);
}

.menu-panel-item.active img {
    opacity: 1;
    color: var(--link-color);
}

.menu-panel-item .item-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.menu-panel-item:hover .item-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
}

.menu-panel-item.active .item-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
}

.menu-panel-item .item-icon-wrapper::before {
    display: none;
}

.menu-panel-item:hover .item-icon-wrapper {
    background: transparent;
    transform: none;
    border: none;
    box-shadow: none;
}

.menu-panel-item:hover .item-icon-wrapper::before {
    display: none;
}

.menu-panel-item.active .item-icon-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
}

.menu-panel-item.active .item-icon-wrapper::before {
    display: none;
}

.menu-panel-item .item-icon-wrapper img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-panel-item:hover .item-icon-wrapper img {
    opacity: 1;
}

.menu-panel-item.active .item-icon-wrapper img {
    opacity: 1;
    filter: none;
}

/* category-header的item-icon-wrapper样式 */
.menu-panel-category-header .item-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.menu-panel-category-header .item-icon-wrapper::before {
    display: none;
}

.menu-panel-category-header:hover .item-icon-wrapper {
    background: transparent;
    transform: none;
    border: none;
    box-shadow: none;
}

.menu-panel-category-header:hover .item-icon-wrapper::before {
    display: none;
}

.menu-panel-category-header .item-icon-wrapper img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-panel-category-header:hover .item-icon-wrapper img {
    opacity: 1;
}

.menu-panel-item .item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.menu-panel-item .item-name {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-panel-item.active .item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.menu-panel-item .item-count {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
    font-weight: 400;
    line-height: 1.4;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0;
}

.menu-panel-item.active .item-count {
    color: var(--text-secondary);
    opacity: 0.8;
}

.menu-panel-item:hover .item-count {
    opacity: 0.8;
    color: var(--text-secondary);
}

.menu-panel-item .item-arrow {
    display: none;
}

/* 菜单列表项中的系统图标：图标颜色与文字颜色保持一致 */
.menu-panel-item img[data-icon-mode="system"] {
    filter: brightness(0) saturate(100%) !important;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.menu-panel-item:hover img[data-icon-mode="system"] {
    opacity: 1;
    color: var(--link-color);
}

.menu-panel-item.active img[data-icon-mode="system"] {
    opacity: 1;
    color: var(--link-color);
}


/* 菜单面板底部信息 */
.menu-panel-bottom-info {
    margin-top: auto;
    padding: 16px 12px;
    border-top: none;
    flex-shrink: 0;
    width: 100%;
    background: transparent;
    position: relative;
}

.menu-panel-bottom-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
}

[data-theme="dark"] .menu-panel-bottom-info::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
}


/* 搜索面板样式 */
.menu-search-bar {
    padding: 8px 0;
}

.menu-search-bar .search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 40px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .menu-search-bar .search-bar {
    background: #1e293b;
    border-color: #30363d;
}

.menu-search-bar .search-bar:hover {
    border-color: #cbd5e1;
    background: var(--bg-primary);
}

.menu-search-bar .search-bar:focus-within {
    border-color: #3b82f6;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

[data-theme="dark"] .menu-search-bar .search-bar:hover {
    border-color: #475569;
}

[data-theme="dark"] .menu-search-bar .search-bar:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.menu-search-bar .search-bar i {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.menu-search-bar .search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    width: 0;
    min-width: 0;
}

.menu-search-bar .search-bar input::placeholder {
    color: var(--text-secondary);
}

/* 功能分割线 */
.menu-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 20%, var(--border-color) 80%, transparent 100%);
    margin: 20px 0;
    flex-shrink: 0;
    position: relative;
}

.menu-section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 1px;
    background: var(--link-color);
    opacity: 0.3;
    border-radius: 1px;
}

[data-theme="dark"] .menu-section-divider {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent 100%);
}

[data-theme="dark"] .menu-section-divider::before {
    background: var(--link-color);
    opacity: 0.4;
}

/* 侧边栏头部 */
.sidebar-header {
    padding: 16px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

[data-theme="dark"] .sidebar-header {
    background: var(--bg-primary);
}

/* 品牌卡片 */
.brand-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: none;
    transition: none;
}

.brand-card:hover {
    box-shadow: none;
}

[data-theme="dark"] .brand-card {
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .brand-card:hover {
    box-shadow: none;
}

.logo-section {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.logo-section:hover {
    opacity: 0.9;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    min-width: 0;
    flex: 1;
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-subtext {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
    margin-top: 2px;
}

[data-theme="dark"] .logo-text {
    color: #f1f5f9;
}

[data-theme="dark"] .logo-subtext {
    color: #94a3b8;
}

.workspace-toggle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.workspace-toggle:hover {
    opacity: 1;
}

.workspace-toggle i {
    font-size: 10px;
    color: #64748b;
}

[data-theme="dark"] .workspace-toggle i {
    color: #94a3b8;
}

/* 侧边栏搜索框 */
.sidebar-search {
    width: 100%;
}

.sidebar-search .search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
    position: relative;
    height: 36px;
    box-sizing: border-box;
}

[data-theme="dark"] .sidebar-search .search-bar {
    background: transparent;
    border-color: var(--border-color);
}

.sidebar-search .search-bar:hover {
    border-color: var(--border-color);
    background: transparent;
}

.sidebar-search .search-bar:focus-within {
    border-color: var(--text-primary);
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .sidebar-search .search-bar:hover {
    border-color: var(--border-color);
}

[data-theme="dark"] .sidebar-search .search-bar:focus-within {
    border-color: var(--text-primary);
    box-shadow: none;
}

.sidebar-search .search-bar i {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-search .search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    width: 0;
    min-width: 0;
}

.sidebar-search .search-bar input::placeholder {
    color: var(--text-secondary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: none;
}

.logo-icon:hover {
    transform: none;
}

.logo-icon i {
    font-size: 18px;
    color: var(--text-primary);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* 侧边栏导航 */
.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
    overflow-x: visible;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}

/* 导航分组（保留旧样式以兼容） */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    padding: 0 12px 8px 12px;
    user-select: none;
    opacity: 0.6;
}

[data-theme="dark"] .nav-section-title {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* 导航项 - 简洁现代设计 */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 1px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .nav-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* active 状态 */
.nav-item.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    position: relative;
    z-index: 1;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .nav-item.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--button-bg);
    border-radius: 0 2px 2px 0;
}

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.nav-item-left span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item i {
    font-size: 18px;
    width: auto;
    height: auto;
    text-align: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    background: transparent;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: none;
}

.nav-item:hover i,
.nav-item.active i {
    opacity: 1;
    color: var(--link-color);
    background: rgba(59, 130, 246, 0.1);
}

.nav-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.2s ease;
    filter: none !important;
    background: transparent;
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 8px;
    box-shadow: none;
}

.nav-item:hover img,
.nav-item.active img {
    opacity: 1;
    color: var(--link-color);
    background: rgba(59, 130, 246, 0.1);
    filter: none !important;
}

/* 导航项中的系统图标 */
.nav-item img[data-icon-mode="system"] {
    filter: brightness(0) saturate(100%) !important;
    opacity: 0.7;
}

.nav-item:hover img[data-icon-mode="system"],
.nav-item.active img[data-icon-mode="system"] {
    opacity: 1;
    filter: brightness(0) saturate(100%) !important;
    color: var(--link-color);
}

.nav-item-badge {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 18px;
    text-align: center;
}

.nav-item.active .nav-item-badge {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-item-badge {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-item.active .nav-item-badge {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 可折叠导航项容器 */
.nav-item-collapsible {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 可折叠导航项切换按钮 */
.nav-item-toggle {
    user-select: none;
}

.nav-item-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-item-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 折叠/展开箭头 */
.nav-item-chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.6;
    margin-left: auto;
}

.nav-item-collapsible.collapsed .nav-item-chevron {
    transform: rotate(180deg);
}

.nav-item-toggle:hover .nav-item-chevron {
    opacity: 1;
}

/* 子菜单容器 */
.nav-submenu {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    margin-left: 0;
    padding-left: 0;
    margin-top: 4px;
    background: transparent;
}

[data-theme="dark"] .nav-submenu {
    background: transparent;
}

[data-theme="dark"] .nav-submenu {
    border-left-color: #30363d;
}

.nav-item-collapsible.collapsed .nav-submenu {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* 子菜单项 - 简洁现代设计 */
.nav-submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px 8px 36px;
    margin: 1px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
}

.nav-submenu-item::before {
    display: none;
}

.nav-submenu-item::after {
    display: none;
}

.nav-submenu-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-submenu-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-submenu-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-submenu-item.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
}

.nav-submenu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--button-bg);
    border-radius: 0 2px 2px 0;
}


.nav-submenu-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.nav-submenu-item-left span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-submenu-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    color: inherit;
}

.nav-submenu-item:hover i,
.nav-submenu-item.active i {
    opacity: 1;
    color: inherit;
}

.nav-submenu-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.nav-submenu-item:hover img,
.nav-submenu-item.active img {
    opacity: 1;
}

/* 侧边栏底部 - 横跨两列的通用底部，横向布局 */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    background: var(--bg-primary);
    flex-shrink: 0;
    overflow-y: auto;
    max-height: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

[data-theme="dark"] .sidebar-footer {
    border-top-color: #30363d;
    background: var(--bg-primary);
}

.user-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    transition: none;
    width: 100%;
    box-sizing: border-box;
}

.user-card:hover {
    border-color: var(--border-color);
    box-shadow: none;
}

[data-theme="dark"] .user-card {
    background: transparent;
    border-color: var(--border-color);
}

[data-theme="dark"] .user-card:hover {
    border-color: var(--border-color);
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar {
    position: relative;
}

.user-avatar::before {
    display: none;
}

.user-card:hover .user-avatar::before {
    display: none;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: none;
    position: relative;
    z-index: 1;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 2px;
}

[data-theme="dark"] .user-name {
    color: #c9d1d9;
}

.user-status {
    font-size: 11px;
    color: #10b981;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.user-action-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease;
    color: var(--text-secondary);
    position: relative;
    font-size: 12px;
}

.user-action-btn:hover {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .user-action-btn {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .user-action-btn:hover {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

/* 侧边栏底部信息 - 横跨两列的最底部，完全独立 */
.sidebar-bottom-info {
    padding: 12px 16px;
    background: var(--bg-primary);
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    /* 确保横跨整个侧边栏宽度 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

[data-theme="dark"] .sidebar-bottom-info {
    background: var(--bg-primary);
}

.bottom-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.bottom-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    justify-content: center;
    white-space: nowrap;
    flex: 1;
    box-sizing: border-box;
    opacity: 0.7;
}

.bottom-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    opacity: 1;
    transform: translateY(-1px);
}

[data-theme="dark"] .bottom-link {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .bottom-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.bottom-link i {
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.icp-number {
    text-align: center;
    font-size: 11px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
}

.icp-number a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 400;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    opacity: 0.6;
    letter-spacing: 0;
}

.icp-number a:hover {
    color: var(--text-primary);
    opacity: 1;
}

[data-theme="dark"] .icp-number a {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .icp-number a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* 设置开关样式 */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.settings-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.settings-switch input:checked + .settings-slider {
    background-color: #3b82f6;
}

.settings-switch input:focus + .settings-slider {
    box-shadow: 0 0 1px #3b82f6;
}

.settings-switch input:checked + .settings-slider:before {
    transform: translateX(20px);
}

[data-theme="dark"] .settings-slider {
    background-color: #4a5568;
}

[data-theme="dark"] .settings-switch input:checked + .settings-slider {
    background-color: #3b82f6;
}

[data-theme="dark"] .settings-slider:before {
    background-color: #e2e8f0;
}

.icp-number i {
    font-size: 10px;
}

/* 右侧内容区域 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
    min-width: 0;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.top-header {
    height: 64px;
    min-height: 64px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    box-sizing: border-box;
    z-index: 100;
    flex-shrink: 0;
}

/* 左侧快速操作区域 */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

/* 移动端菜单按钮（默认隐藏） */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* 顶部导航菜单 */
.header-left .nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.header-left .nav-menu .nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow: visible;
    width: 100%;
    min-width: 0;
}

/* 更多按钮下拉菜单样式 - 确保在侧边栏布局中正常工作 */
.header-left .nav-more-item {
    position: relative;
}

/* 覆盖tailwind.css中的默认样式 */
.top-header .header-left .nav-more-dropdown,
.content-wrapper .header-left .nav-more-dropdown,
.header-left .nav-more-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 50% !important;
    transform: translate(-50%, -10px) !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    min-width: fit-content !important;
    max-width: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 1001 !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    pointer-events: none !important;
    display: none !important;
    visibility: hidden !important;
}

/* 显示状态 - 使用更高优先级的选择器覆盖所有默认样式 */
.top-header .header-left .nav-more-dropdown.show,
.content-wrapper .header-left .nav-more-dropdown.show,
.header-left .nav-more-dropdown.show,
.nav-more-dropdown.show {
    display: block !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* 快捷操作按钮组 */
.header-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.header-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.header-action-btn:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* 中间区域 - 搜索和快捷功能（已移除，搜索框移到左侧） */
.header-center {
    display: none;
}

/* 顶部搜索框 */
.header-search-bar {
    position: relative;
    flex: 1;
    max-width: 600px;
    min-width: 200px;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    transition: all 0.2s ease;
    height: 36px;
    box-sizing: border-box;
    overflow: visible;
    z-index: 1000;
}

.header-search-bar:hover {
    border-color: #3b82f6;
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.header-search-bar:focus-within {
    border-color: #3b82f6;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.header-search-bar i {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.header-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    padding: 0;
}

.header-search-bar input::placeholder {
    color: var(--text-secondary);
}

/* 顶部搜索下拉框 */
.header-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
}

.header-search-dropdown .search-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-search-dropdown .search-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-search-dropdown .search-dropdown-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.header-search-dropdown .search-dropdown-list {
    padding: 8px;
}

/* 搜索框快捷键提示 */
.search-shortcut-hint {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    opacity: 0.5;
    font-size: 11px;
}

.search-shortcut-hint kbd {
    padding: 2px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    color: var(--text-secondary);
}


/* 统计信息卡片 */
.header-stats-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    height: 36px;
    box-sizing: border-box;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.stats-item i {
    font-size: 12px;
    color: #3b82f6;
}

.stats-value {
    font-weight: 600;
    color: var(--text-primary);
}

.stats-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

/* 收藏下拉菜单 */
.header-favorites-dropdown {
    position: relative;
}

.header-favorites-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    position: relative;
}

.header-favorites-btn:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    color: #3b82f6;
}

.header-favorites-btn i {
    font-size: 14px;
}

.header-favorites-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

.header-favorites-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 480px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

.header-favorites-menu.active {
    display: flex !important;
}

.header-favorites-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-favorites-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-favorites-content {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    max-height: 360px;
    padding: 8px;
}

.header-favorites-content::-webkit-scrollbar {
    width: 6px;
}

.header-favorites-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.header-favorites-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.header-favorites-content::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.header-favorites-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 12px;
}

.header-favorites-loading i {
    font-size: 20px;
    color: #3b82f6;
}

.header-favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 12px;
}

.header-favorites-empty i {
    font-size: 32px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.header-favorites-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.header-favorites-item:hover {
    background: var(--bg-secondary);
}

.header-favorites-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-secondary);
}

.header-favorites-item-icon i {
    font-size: 16px;
}

.header-favorites-item-content {
    flex: 1;
    min-width: 0;
}

.header-favorites-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-favorites-item-category {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-favorites-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.header-favorites-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.header-favorites-more:hover {
    background: var(--bg-secondary);
    color: #3b82f6;
}

.header-favorites-more i {
    font-size: 10px;
}

/* 最近使用工具 */
.header-recent-tools {
    position: relative;
}

.recent-tools-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    position: relative;
}

.recent-tools-btn:hover {
    background: var(--bg-primary);
    border-color: #3b82f6;
    color: #3b82f6;
}


.menu-toggle-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.menu-toggle-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--link-color);
}

/* 搜索区域 */
.search-section {
    flex: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 24px;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    position: relative;
    min-width: 200px;
    height: 36px;
}

.search-bar:hover {
    border-color: var(--border-color);
    background: var(--bg-primary);
}

.search-bar:focus-within {
    border-color: #3b82f6;
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-bar i {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 14px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

/* 快速筛选标签 */
.quick-filters {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.filter-tag {
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 28px;
    display: flex;
    align-items: center;
}

.filter-tag:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.filter-tag.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* 顶部操作区域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 通用按钮样式 */
.quick-tool-btn,
.help-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    position: relative;
}

.quick-tool-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.help-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* 通知按钮 */
.notification-btn {
    position: relative;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.notification-btn:hover {
    background: var(--bg-primary);
    border-color: var(--link-color);
    color: var(--link-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.notification-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    border: 2px solid var(--bg-primary);
}

/* 用户菜单 */
.user-menu {
    position: relative;
    margin-left: 8px;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: var(--bg-primary);
    border-color: var(--link-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.user-menu-btn img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.user-menu-btn:hover img {
    border-color: var(--link-color);
}

.user-menu-btn i {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.user-menu-btn:hover i {
    color: var(--link-color);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    max-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: #3b82f6;
}

.dropdown-item:hover i {
    color: #3b82f6;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.08) 100%);
    color: #dc2626;
}

.dropdown-item.logout:hover i {
    color: #dc2626;
}

.dropdown-item.logout i {
    color: #ef4444;
    transition: color 0.2s ease;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.message-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header-left {
        min-width: 160px;
    }

    .search-section {
        margin: 0 16px;
        max-width: 400px;
    }

    .quick-filters {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .top-header {
        height: auto;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-left {
        order: 1;
        min-width: auto;
        flex: 1;
    }

    /* 移动端菜单按钮显示 */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* 移动端隐藏导航菜单 */
    .header-left > .nav-menu {
        display: none !important;
    }

    /* 移动端显示导航菜单（激活时） */
    .header-left > .nav-menu.active {
        display: block !important;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        padding: 16px;
    }

    /* 移动端导航链接垂直排列 */
    .header-left > .nav-menu.active .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .header-left > .nav-menu.active .nav-links li {
        width: 100%;
    }

    .header-left > .nav-menu.active .nav-links a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        height: auto;
    }

    .search-section {
        order: 3;
        width: 100%;
        margin: 8px 0 0 0;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .quick-filters {
        display: flex;
        justify-content: center;
    }

    .header-actions {
        order: 2;
        gap: 8px;
    }

    .user-menu {
        display: none;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 100%;
    }
}

/* 侧边栏遮罩层（移动端） */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

@media (max-width: 768px) {
    .sidebar-overlay.show {
        display: block;
    }
}

