/* ============================================
 * CZGBLOG-ADMIN DEFAULT THEME CSS3 STYLE
 * Version: 1.0.0
 * Author: CZG
 * ============================================ */

/* CSS变量 */
:root {
    /* 主色调 */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    
    /* 功能色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 侧边栏 */
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    
    /* 尺寸 */
    --header-height: 56px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* 字体 */
    --font-sans: "Inter", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

/* 全局重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 布局容器 - CSS Grid */
.wrapper {
    display: grid;
    grid-template-areas:
        "sidebar header"
        "sidebar content";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    min-height: 100vh;
    transition: grid-template-columns var(--transition-normal);
}

.wrapper.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* 顶部导航栏 */
.main-header {
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-500);
    font-size: 17px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

/* 面包屑 */
.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: var(--gray-500);
    padding-left: 0.5rem;
    border-left: 1px solid var(--gray-200);
    margin-left: 0.25rem;
}

.header-breadcrumb i {
    font-size: 12px;
    color: var(--gray-400);
}

.header-breadcrumb span {
    color: var(--gray-600);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 头部操作按钮 */
.header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.header-action:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-200);
    margin: 0 0.375rem;
}

/* 面包屑分隔符和当前页 */
.header-breadcrumb .bc-sep {
    color: var(--gray-300);
    font-size: 12px;
    margin: 0 0.125rem;
    font-weight: 400;
}

.header-breadcrumb .bc-current {
    color: var(--gray-800);
    font-weight: 600;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.user-dropdown-toggle:hover {
    background: var(--gray-50);
}

/* 头像圆形 */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info-brief {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info-brief .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

.user-info-brief .user-role {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 400;
}

.user-dropdown-toggle .dd-arrow {
    font-size: 10px;
    color: var(--gray-400);
    transition: transform var(--transition-fast);
}

.user-dropdown.open .dd-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 200px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.12), 0 2px 8px rgb(0 0 0 / 0.06);
    border: 1px solid var(--gray-200);
    padding: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 右上角用户下拉菜单 */
.dd-user-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.dd-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.dd-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dd-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.dd-user-role {
    font-size: 12px;
    color: var(--gray-400);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.user-dropdown-menu a:hover {
    background: var(--gray-100);
}

.user-dropdown-menu a i {
    width: 16px;
    text-align: center;
    color: var(--gray-500);
}

.user-dropdown-menu .dd-danger:hover {
    background: #fef2f2;
    color: var(--danger-color);
}

.user-dropdown-menu .dd-danger:hover i {
    color: var(--danger-color);
}

.dd-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.25rem 0;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 420px;
    max-width: 90vw;
    animation: modalSlideIn 0.25s ease;
}

/* 视频播放器弹窗 */
.video-player-modal {
    width: 720px;
    max-width: 90vw;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-400);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* 左侧菜单 */
.main-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
}

/* 侧边栏品牌区 */
.sidebar-brand {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
}

.sidebar-brand > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgb(59 130 246 / 0.35);
    overflow: hidden;
}

.sidebar-brand-icon.has-logo {
    width: auto;
    max-width: 260px;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.sidebar-brand-icon.has-logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
}

.sidebar-brand-text {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* 菜单区域 - 可滚动 */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* 菜单分组标签 */
.sidebar-menu-label {
    padding: 0.5rem 1.25rem 0.375rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(148, 163, 184, 0.5);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-menu ul {
    list-style: none;
}

/* 一级菜单 */
.sidebar-menu > ul > li {
    margin: 1px 0.625rem;
}

.sidebar-menu > ul > li > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-menu > ul > li > a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.sidebar-menu > ul > li.active > a {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.12));
    color: var(--sidebar-text-active);
    box-shadow: 0 2px 8px rgb(59 130 246 / 0.15);
}

.sidebar-menu > ul > li > a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

/* 箭头指示器 */
.sidebar-menu > ul > li.has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    margin-left: auto;
    transition: transform var(--transition-fast);
    opacity: 0.5;
}

.sidebar-menu > ul > li.has-submenu.active > a::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* 子菜单 */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.has-submenu.active .submenu {
    max-height: 500px;
}

.submenu li {
    margin: 1px 0;
}

.submenu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 2.75rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
    position: relative;
    margin: 0 0.625rem;
    border-radius: var(--radius-sm);
}

.submenu li a::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1.5px solid var(--sidebar-text);
    background: transparent;
    opacity: 0.3;
    transition: all var(--transition-fast);
}

.submenu li a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.submenu li a:hover::before {
    opacity: 0.8;
    border-color: var(--sidebar-text-active);
}

.submenu li a.current {
    color: #fff;
    background: rgba(59, 130, 246, 0.18);
}

.submenu li a.current::before {
    opacity: 1;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.submenu li a i {
    width: 18px;
    text-align: center;
    font-size: 13px;
}

/* 侧边栏底部 */
.sidebar-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.sidebar-footer:hover {
    opacity: 0.8;
}

.sidebar-footer-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.sidebar-footer-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-footer-text .version {
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-family: var(--font-mono);
}

/* --- 侧边栏折叠态 --- */
.sidebar-collapsed .main-sidebar {
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-collapsed .sidebar-menu {
    overflow: visible;
}

.sidebar-collapsed .sidebar-brand {
    padding: 1rem 0;
}

.sidebar-collapsed .sidebar-brand > a {
    justify-content: center;
}

.sidebar-collapsed .sidebar-brand-text {
    display: none;
}

.sidebar-collapsed .sidebar-brand-icon.has-logo {
    max-width: 36px;
}

.sidebar-collapsed .sidebar-brand-icon.has-logo img {
    height: 32px;
}

.sidebar-collapsed .sidebar-menu-label {
    display: none;
}

/* 折叠态：一级菜单只显示图标 */
.sidebar-collapsed .sidebar-menu > ul > li {
    margin: 1px 0.375rem;
}

.sidebar-collapsed .sidebar-menu > ul > li > a {
    justify-content: center;
    padding: 0.625rem 0;
    gap: 0;
}

.sidebar-collapsed .sidebar-menu > ul > li > a span,
.sidebar-collapsed .sidebar-menu > ul > li.has-submenu > a::after {
    display: none;
}

.sidebar-collapsed .sidebar-menu > ul > li > a i {
    margin: 0;
    font-size: 17px;
}

/* 折叠态：子菜单展开显示图标 */
.sidebar-collapsed .submenu {
    max-height: 500px !important;
    transition: none !important;
    overflow: visible;
    background: transparent;
}

.sidebar-collapsed .has-submenu .submenu {
    max-height: 500px !important;
}

.sidebar-collapsed .submenu li {
    margin: 1px 0;
}

.sidebar-collapsed .submenu li a {
    justify-content: center;
    padding: 0.5rem 0 !important;
    margin: 0 0.375rem;
    border-radius: var(--radius-md);
    gap: 0;
}

/* 折叠态子菜单：隐藏文字和圆点，只显示图标 */
.sidebar-collapsed .submenu li a span,
.sidebar-collapsed .submenu li a::before {
    display: none;
}

.sidebar-collapsed .submenu li a i {
    margin: 0;
    font-size: 15px;
    width: auto;
}

/* 折叠态底部 */
.sidebar-collapsed .sidebar-footer {
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar-collapsed .sidebar-footer-text {
    display: none;
}

/* 内容区域 */
.content-wrapper {
    grid-area: content;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* 多标签导航 */
.tabs-wrapper {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.5rem;
}

.tabs-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tabs-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.tabs-scroll::-webkit-scrollbar {
    display: none;
}

/* 标签滚动箭头按钮 */
.tab-scroll-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 11px;
    transition: all var(--transition-fast);
}

.tab-scroll-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.tabs-wrapper.tabs-overflowing .tab-scroll-btn {
    display: inline-flex;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.tabs li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.tabs li a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 13px;
}

.tabs li:hover {
    background: var(--gray-200);
}

.tabs li.active {
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tabs li.active a {
    color: #fff;
}

.tabs li .close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.tabs li:hover .close-btn {
    opacity: 1;
}

.tabs li .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.tabs li.active .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 标签操作按钮 */
.tabs-actions {
    display: flex;
    gap: 0.25rem;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* 主内容区 */
.content-container {
    flex: 1;
    position: relative;
    background: var(--gray-50);
    overflow-y: auto;
}

/* 内容面板 */
.content-panel {
    display: none;
    padding: 20px;
    min-height: 100%;
    animation: contentFadeIn 0.2s ease;
}

.content-panel.active {
    display: block;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载指示器 */
.content-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10;
    justify-content: center;
    align-items: center;
}

.content-loading.show {
    display: flex;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 内容加载失败 */
.content-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--gray-500);
}

.content-error i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--danger-color);
}

.content-error p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-retry {
    padding: 8px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition-fast);
}

.btn-retry:hover {
    background: var(--primary-hover);
}

/* 子菜单当前项高亮 */
.submenu li a.current {
    color: #fff;
    background: var(--sidebar-active);
    border-radius: var(--radius-sm);
    margin: 0 0.5rem;
    padding-left: 2.25rem;
}

.submenu li a.current::before {
    opacity: 1;
    background: #fff;
    left: 1.25rem;
}

/* 右键菜单 - 玻璃态效果 */
.context-menu {
    position: fixed;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    z-index: 1000;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu ul {
    list-style: none;
    padding: 0.5rem;
}

.context-menu li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.context-menu li:hover {
    background: var(--gray-100);
}

.context-menu li i {
    width: 16px;
    text-align: center;
    color: var(--gray-500);
}

/* ============================================
 * 公共页面组件样式
 * ============================================ */

/* 页面标题 */
.page-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.page-header h1 { font-size: 20px; color: var(--gray-800); font-weight: 600; }

/* 搜索栏 */
.search-bar { background: #fff; padding: 15px; border-radius: var(--radius-md); margin-bottom: 20px; display: flex; gap: 15px; flex-wrap: wrap; align-items: center; box-shadow: var(--shadow-sm); }
.search-bar input, .search-bar select { padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-sans); transition: border-color var(--transition-fast); }
.search-bar input:focus, .search-bar select:focus { outline: none; border-color: var(--primary-color); }
.search-bar .date-input { width: 140px; }
.search-bar button { padding: 8px 20px; background: var(--primary-color); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; transition: background var(--transition-fast); }
.search-bar button:hover { background: var(--primary-hover); }
.search-bar .btn-success { background: var(--success-color); }
.search-bar .btn-success:hover { background: #059669; }
.btn-add { padding: 8px 20px; background: var(--success-color); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; transition: background var(--transition-fast); }
.btn-add:hover { background: #059669; }

/* 数据表格 */
.data-table { width: 100%; background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--gray-200); font-size: 13px; }
.data-table th { background: var(--gray-50); color: var(--gray-800); font-weight: 600; }
.data-table tr:hover { background: var(--gray-50); }

/* 状态标签 */
.status-tag { padding: 4px 8px; border-radius: var(--radius-sm); font-size: 12px; display: inline-block; }
.status-tag.success { background: #dcfce7; color: #16a34a; }
.status-tag.danger { background: #fee2e2; color: #dc2626; }
.status-tag.warning { background: #fef3c7; color: #d97706; }
.status-tag.primary { background: #dbeafe; color: #2563eb; }
.status-tag.secondary { background: #f3e8ff; color: #7c3aed; }
.status-tag.draft { background: var(--gray-200); color: var(--gray-600); }
.status-tag.published { background: #dcfce7; color: #16a34a; }
.status-tag.unpublished { background: #fee2e2; color: #dc2626; }

/* 操作按钮 */
.action-btns a, .action-btns button { padding: 4px 8px; margin-right: 5px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; text-decoration: none; display: inline-block; transition: opacity var(--transition-fast); }
.action-btns a:hover, .action-btns button:hover { opacity: 0.85; }
.btn-edit { background: var(--primary-color); color: #fff; }
.btn-delete { background: var(--danger-color); color: #fff; }
.btn-warning { background: var(--warning-color); color: #fff; }
.btn-publish { background: var(--success-color); color: #fff; }
.btn-unpublish { background: var(--warning-color); color: #fff; }

/* ===== 批量操作栏 ===== */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    background: var(--blue-50, #eff6ff);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: var(--radius-lg);
    font-size: 0.8125rem;
}
.batch-bar .batch-count {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.5rem;
    white-space: nowrap;
}
.batch-bar button {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.batch-bar button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.batch-bar button.btn-danger {
    border-color: var(--red-500, #ef4444);
    color: var(--red-500, #ef4444);
}
.batch-bar button.btn-danger:hover {
    background: var(--red-500, #ef4444);
    color: #fff;
}
.batch-bar button.btn-success {
    border-color: var(--green-500, #22c55e);
    color: var(--green-500, #22c55e);
}
.batch-bar button.btn-success:hover {
    background: var(--green-500, #22c55e);
    color: #fff;
}

/* 行选择checkbox */
.row-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}
th .row-check {
    vertical-align: middle;
}

/* 选中行高亮 */
.data-table tbody tr.selected {
    background: var(--blue-50, #eff6ff);
}

/* 回收站入口按钮 */
.btn-recycle {
    color: var(--gray-500);
    background: transparent;
    border: 1px solid var(--gray-300);
}
.btn-recycle:hover {
    color: var(--orange-500, #f97316);
    border-color: var(--orange-500, #f97316);
}

/* ============================================
 * 视频播放器倍速控制
 * ============================================ */
.video-speed-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.video-speed-bar .speed-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-right: 4px;
    white-space: nowrap;
}
.video-speed-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.4;
}
.video-speed-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.video-speed-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 分页器 */
.pagination { margin-top: 20px; display: flex; justify-content: center; gap: 5px; }
.pagination a, .pagination span { padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; transition: all var(--transition-fast); }
.pagination button { padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; transition: all var(--transition-fast); background: #fff; color: var(--gray-700); font-family: var(--font-sans); }
.pagination a:hover, .pagination span:hover, .pagination button:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination .active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.pagination .active:hover { color: #fff; }

/* 表单组件 */
.form-container { background: #fff; border-radius: var(--radius-md); padding: 30px; max-width: 720px; width: 100%; box-shadow: var(--shadow-sm); }
.form-container.wide { max-width: 100%; }
.form-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--gray-200); }
.form-header h1 { font-size: 18px; color: var(--gray-800); font-weight: 600; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--gray-800); font-size: 14px; font-weight: 500; }
.form-group label .required { color: var(--danger-color); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-sans); transition: border-color var(--transition-fast); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-group label { display: flex; align-items: center; gap: 5px; font-weight: normal; cursor: pointer; }
/* 角色选择卡片 */
.role-select-group { display: flex; flex-wrap: wrap; gap: 10px; }
.role-card { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); background: #fff; min-width: 180px; flex: 0 1 auto; }
.role-card:hover { border-color: var(--primary-color, #3b82f6); background: #f0f7ff; }
.role-card:has(input:checked) { border-color: var(--primary-color, #3b82f6); background: #eff6ff; box-shadow: 0 0 0 1px var(--primary-color, #3b82f6); }
.role-card input[type="checkbox"] { margin-top: 2px; cursor: pointer; flex-shrink: 0; }
.role-card-body { display: flex; flex-direction: column; gap: 2px; }
.role-card-name { font-size: 14px; font-weight: 500; color: var(--gray-800, #1f2937); }
.role-card-code { font-size: 12px; color: var(--gray-400, #9ca3af); font-family: monospace; }
.role-card-desc { font-size: 12px; color: var(--gray-500, #6b7280); line-height: 1.4; }
.form-actions { margin-top: 30px; display: flex; gap: 10px; }
.btn { padding: 10px 30px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; transition: all var(--transition-fast); }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-default { background: var(--gray-200); color: var(--gray-800); }
.btn-default:hover { background: var(--gray-300); }

/* 菜单树操作栏 */
.menu-tree-actions { margin-bottom: 8px; display: flex; gap: 12px; }
.menu-tree-actions a { color: var(--primary); font-size: 13px; text-decoration: none; }
.menu-tree-actions a:hover { text-decoration: underline; }

/* 菜单树容器 */
.menu-tree { max-height: 400px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--gray-50, #fafafa); }

/* 树节点 */
.tree-node { padding: 3px 0; }
.tree-label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 14px; line-height: 1.6; }
.tree-label:hover { color: var(--primary); }
.tree-label input[type="checkbox"] { margin: 0; cursor: pointer; }

/* 展开/收起箭头 */
.tree-toggle { display: inline-block; width: 16px; text-align: center; font-size: 10px; color: var(--gray-400, #999); cursor: pointer; user-select: none; }
.tree-toggle:hover { color: var(--primary); }
.tree-spacer { display: inline-block; width: 16px; }

/* 菜单类型标签 */
.menu-type-tag { font-size: 11px; padding: 1px 5px; border-radius: 3px; margin-right: 2px; }
.menu-type-tag.type-0 { background: #e6f7ff; color: #1890ff; }
.menu-type-tag.type-1 { background: #f6ffed; color: #52c41a; }
.menu-type-tag.type-2 { background: #fff7e6; color: #fa8c16; }

/* 树节点名称 */
.tree-name { user-select: none; }

/* 配置页面 */
.config-container { background: #fff; border-radius: var(--radius-md); padding: 30px; max-width: 800px; box-shadow: var(--shadow-sm); }
.config-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--gray-200); }
.config-item:last-child { border-bottom: none; }
.config-item .label { min-width: 150px; color: var(--gray-800); font-size: 14px; font-weight: 500; }
.config-item .desc { color: var(--gray-400); font-size: 12px; margin-top: 4px; }
.config-item input { flex: 1; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; }
.config-item input:focus { outline: none; border-color: var(--primary-color); }
.empty-tip { color: var(--gray-400); padding: 40px; text-align: center; }

/* 树形缩进 */
.tree-indent { display: inline-block; width: 20px; }

/* 文本溢出省略 */
.ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast 通知 */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-md); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform 0.3s ease; min-width: 250px; }
.toast.show { transform: translateX(0); }
.toast-success { background: var(--success-color); }
.toast-error { background: var(--danger-color); }
.toast-warning { background: var(--warning-color); }
.toast-info { background: var(--info-color); }

/* 响应式设计 */
@media (max-width: 1024px) {
    .wrapper {
        grid-template-columns: 1fr;
    }
    
    .main-sidebar {
        position: fixed;
        left: 0;
        top: var(--header-height);
        width: var(--sidebar-width);
        transform: translateX(-100%);
        z-index: 50;
        box-shadow: var(--shadow-xl);
    }
    
    .main-sidebar.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .user-dropdown-toggle span {
        display: none;
    }
    
    .tabs li {
        max-width: 120px;
    }
    
    .tabs li a span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
    }
}

/* 打印样式 */
@media print {
    .main-header,
    .main-sidebar,
    .tabs-wrapper {
        display: none;
    }
    
    .wrapper {
        display: block;
    }
    
    .content-container {
        height: auto;
    }
}

/* ============================================
 * 子页面公共容器
 * ============================================ */
.page-body {
    padding: 20px;
    background: var(--gray-100);
    min-height: 100%;
}

/* ============================================
 * 登录页
 * ============================================ */
.login-page {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #7c3aed 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -150px;
    right: -100px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -80px;
    left: -60px;
}

.login-container {
    width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: loginSlideIn 0.4s ease;
}

@keyframes loginSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .login-logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-header .login-logo-img {
    margin-bottom: 8px;
    text-align: center;
}

.login-header .login-logo-img img {
    max-width: 160px;
    max-height: 60px;
    object-fit: contain;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.login-form .form-group .input-icon {
    position: absolute;
    left: 14px;
    top: 44px;
    color: var(--gray-400);
    font-size: 15px;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.login-form .form-group input {
    height: 46px;
    padding: 0 15px 0 42px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gray-200);
    transition: all var(--transition-fast);
}

.login-form .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form .form-group input:focus + .input-icon,
.login-form .form-group input:focus ~ .input-icon {
    color: var(--primary-color);
}

.login-form .form-group .captcha-container{
    display: flex;
    gap: 8px;
    align-items: center;
}
.login-form .form-group .captcha-container #captchaImg {
    height:40px;
    border-radius:4px;
    cursor:pointer;
    border:1px solid #ddd;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 13px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.login-btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 2px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    background: #fef2f2;
    color: var(--danger-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #fecaca;
}

.error-message.hidden {
    display: none;
}

/* ============================================
 * 仪表盘
 * ============================================ */
.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-size: 22px;
    color: var(--gray-800);
    font-weight: 600;
}

.dashboard-header .welcome-sub {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .stat-cards { grid-template-columns: 1fr; }
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-fast);
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-card .stat-info h3 {
    font-size: 28px;
    color: var(--gray-800);
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-info p {
    color: var(--gray-500);
    font-size: 13px;
    margin-top: 2px;
}

/* ============================================
 * 日志页 Tab 切换
 * ============================================ */
.log-tabs {
    display: inline-flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.log-tab {
    padding: 10px 18px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.log-tab i {
    font-size: 13px;
}

.log-tab:hover {
    color: var(--primary-color);
    background: var(--gray-50);
}

.log-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--primary-light);
    font-weight: 600;
}

.log-tab .log-tab-count {
    font-size: 11px;
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.log-tab.active .log-tab-count {
    background: var(--primary-color);
    color: #fff;
}

.log-panel {
    display: none;
    animation: logPanelFadeIn 0.25s ease;
}

.log-panel.active {
    display: block;
}

@keyframes logPanelFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 请求方法彩色标签 */
.method-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    display: inline-block;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.method-tag.get { background: #dbeafe; color: #2563eb; }
.method-tag.post { background: #dcfce7; color: #16a34a; }
.method-tag.put { background: #fef3c7; color: #d97706; }
.method-tag.delete { background: #fee2e2; color: #dc2626; }
.method-tag.patch { background: #f3e8ff; color: #7c3aed; }

/* 日志表格增强 */
.data-table.log-table {
    font-size: 13px;
}

.data-table.log-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    padding: 10px 12px;
}

.data-table.log-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.data-table.log-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.data-table.log-table tbody tr:hover {
    background: #eef2ff;
}

/* IP 地址样式 */
.ip-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-600);
}

/* 日志时间样式 */
.log-time {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
}

/* 日志操作类型标签 */
.op-tag {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
}

.op-tag.op-query { background: #dbeafe; color: #2563eb; }
.op-tag.op-add { background: #dcfce7; color: #16a34a; }
.op-tag.op-edit { background: #fef3c7; color: #d97706; }
.op-tag.op-delete { background: #fee2e2; color: #dc2626; }
.op-tag.op-login { background: #f3e8ff; color: #7c3aed; }
.op-tag.op-other { background: var(--gray-100); color: var(--gray-600); }

/* 日志详情弹窗 */
.log-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.log-detail-overlay.open {
    opacity: 1;
    visibility: visible;
}

.log-detail-panel {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.2s ease;
}

.log-detail-overlay.open .log-detail-panel {
    transform: translateY(0) scale(1);
}

.log-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.log-detail-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-detail-header h3 i {
    color: var(--primary-color);
}

.log-detail-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.log-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

.log-detail-row:last-child {
    border-bottom: none;
}

.log-detail-label {
    width: 100px;
    flex-shrink: 0;
    color: var(--gray-500);
    font-weight: 500;
}

.log-detail-value {
    flex: 1;
    color: var(--gray-800);
    word-break: break-all;
}

.log-detail-value .method-tag {
    vertical-align: middle;
}

/* 搜索栏重置按钮 */
.btn-reset {
    padding: 8px 20px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.btn-reset:hover {
    background: var(--gray-200);
}

/* 可点击行 */
.data-table.log-table tbody tr.clickable-row {
    cursor: pointer;
}

.data-table.log-table tbody tr.clickable-row:hover {
    background: #eef2ff;
}

.data-table.log-table tbody tr.clickable-row:active {
    background: #e0e7ff;
}

/* ============================================
 * 菜单管理树形表格
 * ============================================ */
.menu-table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}

.menu-table th,
.menu-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
}

.menu-table th {
    background: var(--gray-50);
    color: var(--gray-800);
    font-weight: 600;
}

.menu-table tr:hover {
    background: var(--gray-50);
}

.indent {
    display: inline-block;
}

.tree-icon {
    color: var(--gray-400);
    margin-right: 4px;
    font-size: 12px;
}

.menu-type-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    display: inline-block;
    font-weight: 500;
}

.type-dir { background: #dbeafe; color: #2563eb; }
.type-menu { background: #dcfce7; color: #16a34a; }
.type-btn { background: #fef3c7; color: #d97706; }

/* ============================================
 * 静态发布批量操作区
 * ============================================ */
.publish-actions {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.publish-actions h3 {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.publish-actions .btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.publish-actions .btn-group button {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    transition: all var(--transition-fast);
}

.publish-actions .btn-group button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-batch-article { background: var(--primary-color); }
.btn-batch-category { background: var(--success-color); }

/* ============================================
 * 空数据状态
 * ============================================ */
.empty-state {
    text-align: center !important;
    color: var(--gray-400);
    padding: 48px 20px;
    font-size: 14px;
    vertical-align: middle;
}

.empty-state i {
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--gray-300);
}

/* ============================================
 * 自定义确认弹窗
 * ============================================ */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.confirm-dialog {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 380px;
    max-width: 90vw;
    animation: modalSlideIn 0.2s ease;
    overflow: hidden;
}

.confirm-body {
    padding: 32px 24px 20px;
    text-align: center;
}

.confirm-body .confirm-icon {
    font-size: 44px;
    color: var(--warning-color);
    margin-bottom: 16px;
}

.confirm-body .confirm-icon.danger {
    color: var(--danger-color);
}

.confirm-body .confirm-msg {
    font-size: 15px;
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.5;
}

.confirm-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: center;
}

.confirm-footer .btn {
    min-width: 90px;
    padding: 9px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
}

.confirm-footer .btn-confirm-ok {
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.confirm-footer .btn-confirm-ok:hover {
    background: var(--primary-hover);
}

.confirm-footer .btn-confirm-ok.danger {
    background: var(--danger-color);
}

.confirm-footer .btn-confirm-ok.danger:hover {
    background: #dc2626;
}

.confirm-footer .btn-confirm-cancel {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.confirm-footer .btn-confirm-cancel:hover {
    background: var(--gray-200);
}

/* ============================================
 * 增强分页
 * ============================================ */
.pagination .page-info {
    color: var(--gray-500);
    font-size: 13px;
    padding: 8px 12px;
    user-select: none;
}

.pagination a.disabled,
.pagination span.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.pagination .page-prev,
.pagination .page-next {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
 * wangEditor 编辑器样式
 * ============================================ */
.editor-wrapper {
    border: 1px solid #dce3ec;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.editor-wrapper .toolbar-container {
    border-bottom: 1px solid #e8ecf1;
    background: #f8fafc;
}
.editor-wrapper .editor-container {
    min-height: 400px;
}
.editor-wrapper .w-e-text-container {
    min-height: 400px !important;
    max-height: 700px;
    overflow-y: auto;
}
.editor-wrapper .w-e-text-container [data-slate-editor] {
    min-height: 380px;
}
.editor-wrapper .w-e-text-container p {
    margin: 6px 0;
}
.editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #8392a5;
    font-size: 14px;
    gap: 8px;
}
.editor-loading.error {
    color: #ef4444;
}

/* ============================================
 * 栏目类型提示
 * ============================================ */
.type-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}
.type-hint i {
    font-size: 13px;
}

/* ============================================
 * 封面图上传组件
 * ============================================ */
.cover-upload-row {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}
.cover-upload-item {
    flex: 1;
}
.cover-upload-item .cover-label {
    font-size: 13px;
    font-weight: 500;
    color: #506690;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cover-upload-item .cover-label .cover-size-hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}
.cover-upload-box {
    position: relative;
    width: 100%;
    height: 160px;
    border: 2px dashed #dce3ec;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
    background: #f8fafc;
}
.cover-upload-box:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}
.cover-upload-box.has-image {
    border-style: solid;
    border-color: #e8ecf1;
}
.cover-upload-box .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 13px;
}
.cover-upload-box .upload-placeholder i {
    font-size: 28px;
    color: #c0c6cc;
}
.cover-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 首页模块封面预览框 - 4:3比例 */
.module-cover-box {
    max-width: 280px;
    aspect-ratio: 4 / 3;
    height: auto;
}
.cover-upload-box .cover-actions {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.cover-upload-box:hover .cover-actions {
    display: flex;
}
.cover-actions button {
    background: rgba(255,255,255,.9);
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    color: #344563;
    transition: all .15s;
}
.cover-actions button:hover {
    background: #fff;
}
.cover-actions .btn-cover-del {
    color: #ef4444;
}
.cover-upload-box .upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e7eb;
}
.cover-upload-box .upload-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width .3s;
}

/* 视频封面播放按钮 */
.video-cover-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.card-thumb .video-cover-wrap {
    width: 100%;
    height: 100%;
}
.card-thumb .video-cover-wrap video {
    background: #000;
}
.video-cover-wrap:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    opacity: 0.7;
    transition: all 0.2s;
    pointer-events: none;
}
.video-play-btn i {
    margin-left: 2px;
}

/* ============================================
 * 内容来源切换开关
 * ============================================ */
.link-toggle-row {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}
.toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #506690;
    transition: all .2s;
    background: #fff;
}
.toggle-option:hover {
    border-color: var(--primary-color);
}
.toggle-option input[type="radio"] {
    accent-color: var(--primary-color);
}
.toggle-option:has(input:checked) {
    border-color: var(--primary-color);
    background: #f0f4ff;
    color: var(--primary-color);
    font-weight: 500;
}

/* ============================================
 * 封面图缩略图（栏目列表）
 * ============================================ */
.cover-thumbs {
    display: flex;
    gap: 6px;
    align-items: center;
}
.cover-thumb {
    position: relative;
    width: 60px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
    background: #f8fafc;
}
.cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cover-thumb .cover-device {
    position: absolute;
    bottom: 1px;
    right: 1px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 2px;
    line-height: 1;
}
.cover-empty {
    color: #c0c6cc;
    font-size: 12px;
}

/* ============================================
 * 栏目列表类型标签
 * ============================================ */
.cat-type-list {
    background: #e0f2fe;
    color: #0369a1;
}
.cat-type-page {
    background: #fef3c7;
    color: #92400e;
}
.cat-type-link {
    background: #fce7f3;
    color: #9d174d;
}
.cat-type-reservation {
    background: #dcfce7;
    color: #166534;
}
.cat-type-list i,
.cat-type-page i,
.cat-type-link i,
.cat-type-reservation i {
    font-size: 11px;
}

/* ============================================
 * 通用图标修饰类
 * ============================================ */
.icon-label {
    color: var(--primary-color);
    margin-right: 4px;
}
.icon-label-warning {
    color: #f59e0b;
    margin-right: 4px;
}
.text-muted-dash {
    color: #9ca3af;
}

/* ============================================
 * 主题颜色切换
 * ============================================ */

/* 主题变量覆盖 */
[data-theme="purple"] {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: #ede9fe;
    --sidebar-bg: #1e1b2e;
    --sidebar-hover: #2d2845;
    --sidebar-active: #8b5cf6;
    --theme-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
}
[data-theme="green"] {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --sidebar-bg: #0f1f1b;
    --sidebar-hover: #1a3329;
    --sidebar-active: #10b981;
    --theme-gradient: linear-gradient(135deg, #10b981, #06b6d4);
}
[data-theme="orange"] {
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --primary-light: #fef3c7;
    --sidebar-bg: #1f1a0e;
    --sidebar-hover: #33291a;
    --sidebar-active: #f59e0b;
    --theme-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
}
[data-theme="red"] {
    --primary-color: #ef4444;
    --primary-hover: #dc2626;
    --primary-light: #fee2e2;
    --sidebar-bg: #1f0f0f;
    --sidebar-hover: #331a1a;
    --sidebar-active: #ef4444;
    --theme-gradient: linear-gradient(135deg, #ef4444, #f97316);
}
[data-theme="teal"] {
    --primary-color: #06b6d4;
    --primary-hover: #0891b2;
    --primary-light: #cffafe;
    --sidebar-bg: #0f1a1f;
    --sidebar-hover: #1a2d33;
    --sidebar-active: #06b6d4;
    --theme-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
}
[data-theme="indigo"] {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --sidebar-bg: #151530;
    --sidebar-hover: #252552;
    --sidebar-active: #6366f1;
    --theme-gradient: linear-gradient(135deg, #6366f1, #a855f7);
}

/* 默认主题渐变 */
:root {
    --theme-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* 主题渐变应用到品牌图标、头像、活动菜单 */
[data-theme] .sidebar-brand-icon,
.sidebar-brand-icon {
    background: var(--theme-gradient);
}
[data-theme] .sidebar-brand-icon.has-logo,
.sidebar-brand-icon.has-logo {
    background: none;
}
[data-theme] .user-avatar,
.user-avatar {
    background: var(--theme-gradient);
}
[data-theme] .sidebar-menu > ul > li.active > a {
    background: linear-gradient(135deg, color-mix(in srgb, var(--sidebar-active) 20%, transparent), color-mix(in srgb, var(--sidebar-active) 8%, transparent));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--sidebar-active) 15%, transparent);
}
[data-theme] .submenu li a.current {
    background: color-mix(in srgb, var(--sidebar-active) 18%, transparent);
}
[data-theme] .submenu li a.current::before {
    background: var(--sidebar-active);
    border-color: var(--sidebar-active);
}

/* 主题选择器按钮 */
.theme-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}
.theme-picker-btn:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}
.theme-picker-btn .theme-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-gradient);
    border: 1.5px solid #fff;
}

/* 主题选择面板 */
.theme-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all .25s;
}
.theme-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}
.theme-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    z-index: 1001;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}
.theme-panel-overlay.open .theme-panel {
    right: 0;
}
.theme-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}
.theme-panel-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.theme-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gray-500);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.theme-panel-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}
.theme-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.theme-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 14px;
}

/* 主题颜色网格 */
.theme-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.theme-color-item {
    cursor: pointer;
    border-radius: var(--radius-lg);
    padding: 3px;
    border: 2px solid transparent;
    transition: all .2s;
}
.theme-color-item.active {
    border-color: var(--primary-color);
}
.theme-color-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.theme-color-preview {
    height: 56px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}
.theme-color-preview .preview-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 35%;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.theme-color-preview .preview-header {
    position: absolute;
    left: 35%;
    top: 0;
    right: 0;
    height: 30%;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.theme-color-preview .preview-content {
    position: absolute;
    left: 35%;
    top: 30%;
    right: 0;
    bottom: 0;
    background: #f8fafc;
}
.theme-color-preview .preview-dot {
    position: absolute;
    left: calc(35% / 2 - 5px);
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.theme-color-name {
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 6px;
    font-weight: 500;
}
.theme-color-item.active .theme-color-name {
    color: var(--primary-color);
    font-weight: 600;
}

/* 主题面板 - 导航颜色设置 */
.nav-color-settings {
    margin-bottom: 16px;
}
.nav-color-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 8px;
}
.nav-gradient-preview {
    height: 28px;
    border-radius: 6px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    border: 1px solid var(--gray-200);
}
.nav-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.nav-color-row > label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    flex-shrink: 0;
    width: 64px;
}
.nav-color-input {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.nav-color-input input[type="color"] {
    width: 34px;
    height: 30px;
    padding: 2px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}
.nav-color-input input[type="text"] {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-700);
    min-width: 0;
}
.nav-color-input input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59,130,246,.12);
}
.nav-color-clear {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-300);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
}
.nav-color-clear:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}
.nav-color-save {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.nav-color-save:hover {
    opacity: .85;
}
.nav-color-tip {
    text-align: center;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 8px;
}
.nav-color-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 0;
}
.nav-color-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    margin: 8px 0 4px;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== 列表页 Toggle 开关 ========== */
.list-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    vertical-align: middle;
    cursor: pointer;
}
.list-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.list-toggle .slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--gray-300);
    border-radius: 20px;
    transition: 0.3s;
}
.list-toggle .slider:before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.list-toggle input:checked + .slider {
    background-color: var(--primary-color);
}
.list-toggle input:checked + .slider:before {
    transform: translateX(16px);
}

/* ===== 批量操作栏 ===== */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    background: var(--blue-50, #eff6ff);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: var(--radius-lg);
    font-size: 0.8125rem;
}
.batch-bar .batch-count {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.5rem;
    white-space: nowrap;
}
.batch-bar button {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.batch-bar button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.batch-bar button.btn-danger {
    border-color: var(--red-500, #ef4444);
    color: var(--red-500, #ef4444);
}
.batch-bar button.btn-danger:hover {
    background: var(--red-500, #ef4444);
    color: #fff;
}
.batch-bar button.btn-success {
    border-color: var(--green-500, #22c55e);
    color: var(--green-500, #22c55e);
}
.batch-bar button.btn-success:hover {
    background: var(--green-500, #22c55e);
    color: #fff;
}

/* 行选择checkbox */
.row-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}
th .row-check {
    vertical-align: middle;
}

/* 选中行高亮 */
.data-table tbody tr.selected {
    background: var(--blue-50, #eff6ff);
}

/* 回收站入口按钮 */
.btn-recycle {
    color: var(--gray-500);
    background: transparent;
    border: 1px solid var(--gray-300);
}
.btn-recycle:hover {
    color: var(--orange-500, #f97316);
    border-color: var(--orange-500, #f97316);
}

/* 图片预览弹窗 */
.banner-thumb {
    width: 90px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--gray-100);
    display: block;
}

.module-thumb {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--gray-100);
    display: block;
}

.module-thumb-empty {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 20px;
}

.link-target {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.image-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    cursor: pointer;
}

.image-preview-overlay img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg, 8px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.25s ease;
    cursor: default;
}

.image-preview-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1101;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.banner-thumb-clickable {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.banner-thumb-clickable:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.module-thumb-clickable {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.module-thumb-clickable:hover {
    opacity: 0.8;
    transform: scale(1.05);
}
