/* ============================================================
   app.css — 知识库系统 全局共享样式表(设计权威文件)
   视觉基准来源: _ref/demo.html(木末认可的设计稿), 逐字继承其全部规则
   职责: 布局框架(顶栏/侧栏/主区) + 全站共享组件(按钮/面板/表格/
         file-list/徽章/status/toggle/响应式) + 设计变量
   规则: 各页面独立 css 不得覆盖此处组件样式, 仅追加页面专属布局
 ============================================================ */


        /* ===== 全局重置 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: #f5f9fe;
            color: #1a2639;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* ============================================================ */
        /* 顶部导航栏 — 居中对齐 */
        /* ============================================================ */
        .top-nav {
            background: #ffffff;
            border-bottom: 1px solid #eaf1fa;
            padding: 10px 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
            position: sticky;
            top: 0;
            z-index: 100;
            flex-wrap: wrap;
            gap: 12px;
            position: relative;
        }
        .top-nav .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 18px;
            color: #0b1e3a;
            text-decoration: none;
            position: absolute;
            left: 32px;
        }
        .top-nav .brand .brand-icon {
            width: 34px;
            height: 34px;
            background: linear-gradient(135deg, #2b7be4, #5b9cf5);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 16px;
        }

        .global-search {
            flex: 0 1 420px;
            min-width: 240px;
            display: flex;
            align-items: center;
            background: #f7faff;
            border: 1px solid #e2edf7;
            border-radius: 40px;
            padding: 4px 6px 4px 16px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 20, 40, 0.02);
        }
        .global-search:focus-within {
            border-color: #2b7be4;
            background: #ffffff;
            box-shadow: 0 4px 16px rgba(43, 123, 228, 0.08);
        }
        .global-search .search-icon {
            color: #8ba9cc;
            font-size: 14px;
        }
        .global-search input {
            flex: 1;
            border: none;
            background: transparent;
            padding: 8px 8px 8px 10px;
            font-size: 13px;
            outline: none;
            color: #1a2639;
            min-width: 100px;
        }
        .global-search input::placeholder {
            color: #9ab0cc;
        }
        .global-search .search-shortcut {
            font-size: 10px;
            color: #b0c8e0;
            background: #eef4fa;
            padding: 1px 8px;
            border-radius: 30px;
            border: 1px solid #e5eefa;
            font-weight: 500;
            white-space: nowrap;
        }

        .hot-keywords {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: nowrap;
            flex-shrink: 0;
        }
        .hot-keywords .hot-tag {
            font-size: 12px;
            color: #2b7be4;
            background: #f0f6fe;
            padding: 3px 12px;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.15s ease;
            border: 1px solid transparent;
            white-space: nowrap;
        }
        .hot-keywords .hot-tag:hover {
            background: #e3eefa;
            border-color: #b8d0e8;
            transform: translateY(-1px);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            position: absolute;
            right: 32px;
        }
        .user-profile .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #e8f0fe, #d4e4fc);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2b7be4;
            font-weight: 600;
            font-size: 14px;
            border: 2px solid #ffffff;
            box-shadow: 0 2px 8px rgba(43, 123, 228, 0.08);
            cursor: pointer;
        }
        .user-profile .user-name {
            font-size: 14px;
            font-weight: 500;
            color: #1a2a44;
        }

        /* ============================================================ */
        /* 主体布局 */
        /* ============================================================ */
        .app-body {
            display: flex;
            flex: 1;
            min-height: 0;
        }

        /* ===== 左侧菜单 ===== */
        .sidebar {
            width: 260px;
            background: #ffffff;
            border-right: 1px solid #eaf1fa;
            padding: 20px 12px 28px;
            flex-shrink: 0;
            height: calc(100vh - 60px);
            position: sticky;
            top: 60px;
            overflow-y: auto;
            box-shadow: 2px 0 12px rgba(0, 20, 40, 0.02);
            z-index: 10;
            display: flex;
            flex-direction: column;
        }
        .sidebar-menu {
            list-style: none;
            padding: 0;
            flex: 1;
            margin: 0;
        }
        .sidebar-menu>li {
            margin-bottom: 1px;
        }
        .sidebar-menu>li>a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 9px 14px;
            border-radius: 10px;
            font-size: 14px;
            color: #3a4e6a;
            text-decoration: none;
            transition: all 0.2s ease;
            font-weight: 450;
            cursor: pointer;
        }
        .sidebar-menu>li>a i {
            width: 20px;
            text-align: center;
            font-size: 15px;
            color: #7a96b8;
        }
        .sidebar-menu>li>a:hover {
            background: #f0f6fe;
            color: #1a3a5a;
        }
        .sidebar-menu>li>a:hover i {
            color: #2b7be4;
        }
        .sidebar-menu>li>a.active {
            background: #e8f0fe;
            color: #1a4a7a;
            font-weight: 500;
        }
        .sidebar-menu>li>a.active i {
            color: #2b7be4;
        }

        .collapsible-group {
            margin-bottom: 1px;
        }
        .group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 9px 14px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            font-weight: 450;
            color: #3a4e6a;
            user-select: none;
        }
        .group-header:hover {
            background: #f0f6fe;
            color: #1a3a5a;
        }
        .group-header .group-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .group-header .group-title i {
            width: 20px;
            text-align: center;
            font-size: 13px;
            color: #7a96b8;
        }
        .group-header .group-arrow {
            font-size: 12px;
            color: #8aa5c4;
            transition: transform 0.25s ease;
        }
        .group-header .group-arrow.collapsed {
            transform: rotate(-90deg);
        }
        .sub-menu {
            list-style: none;
            padding-left: 20px;
            margin: 0;
            overflow: hidden;
            max-height: 600px;
            transition: max-height 0.3s ease, opacity 0.25s ease;
            opacity: 1;
        }
        .sub-menu.collapsed {
            max-height: 0;
            opacity: 0;
            padding-top: 0;
            padding-bottom: 0;
        }
        .sub-menu li a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 14px;
            font-size: 13px;
            color: #4a5e7a;
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.15s ease;
            cursor: pointer;
        }
        .sub-menu li a i {
            font-size: 8px;
            width: 16px;
            color: #8aa5c4;
        }
        .sub-menu li a:hover {
            background: #f0f6fe;
            color: #1a3a5a;
        }
        .sub-menu li a.active {
            background: #e8f0fe;
            color: #1a4a7a;
            font-weight: 500;
        }
        .sub-menu li a.active i {
            color: #2b7be4;
        }

        .recent-section {
            border-top: 1px solid #eef4fa;
            padding-top: 16px;
            margin-top: 8px;
            flex-shrink: 0;
        }
        .recent-section .recent-title {
            font-size: 12px;
            font-weight: 600;
            color: #7a96b8;
            padding: 0 14px 10px;
            letter-spacing: 0.3px;
        }
        .recent-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: default;
            transition: background 0.15s;
        }
        .recent-item:hover {
            background: #f0f6fe;
        }
        .recent-item .recent-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: #e8f0fe;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2b7be4;
            font-size: 12px;
            flex-shrink: 0;
        }
        .recent-item .recent-info {
            flex: 1;
            min-width: 0;
        }
        .recent-item .recent-name {
            font-size: 13px;
            color: #1a2639;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .recent-item .recent-meta {
            font-size: 11px;
            color: #8aa5c4;
        }
        .recent-item .recent-tag {
            font-size: 10px;
            background: #eef4fa;
            color: #5a7a9a;
            padding: 0 8px;
            border-radius: 10px;
            line-height: 18px;
            flex-shrink: 0;
        }

        /* ============================================================ */
        /* 右侧主内容 */
        /* ============================================================ */
        .main-content {
            flex: 1;
            padding: 20px 32px 32px;
            min-width: 0;
            overflow-y: auto;
            height: calc(100vh - 60px);
        }

        /* ===== 页面容器 ===== */
        .page-container {
            display: none;
            flex-direction: column;
            animation: fadeIn 0.25s ease;
        }
        .page-container.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(6px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ===== 页面标题 ===== */
        .page-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .page-header .title h1 {
            font-size: 22px;
            font-weight: 600;
            color: #0b1e3a;
        }
        .page-header .title .sub {
            font-size: 14px;
            color: #7a96b8;
            margin-top: 2px;
        }
        .page-header .actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .page-header .actions .btn {
            padding: 8px 20px;
            border-radius: 30px;
            border: none;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
            background: #f0f6fe;
            color: #1a4a7a;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .page-header .actions .btn:hover {
            background: #e0ebf9;
        }
        .page-header .actions .btn.primary {
            background: #2b7be4;
            color: #fff;
        }
        .page-header .actions .btn.primary:hover {
            background: #1a6ac8;
        }

        /* ===== 筛选栏 ===== */
        .filter-section {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid #eaf1fa;
            padding: 14px 20px;
            box-shadow: 0 2px 12px rgba(0, 20, 40, 0.02);
            margin-bottom: 18px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
        }
        .filter-section .search-box {
            flex: 0 1 220px;
            min-width: 140px;
            position: relative;
        }
        .filter-section .search-box input {
            width: 100%;
            padding: 7px 14px 7px 34px;
            border: 1px solid #e2edf7;
            border-radius: 30px;
            font-size: 13px;
            background: #f9fcff;
            transition: all 0.25s ease;
            outline: none;
            color: #1a2639;
        }
        .filter-section .search-box input:focus {
            border-color: #2b7be4;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(43, 123, 228, 0.06);
        }
        .filter-section .search-box i {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #8ba9cc;
        }
        .filter-section .filter-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .filter-section .filter-group label {
            font-size: 13px;
            color: #5a7a9a;
            font-weight: 500;
            white-space: nowrap;
        }
        .filter-section .filter-group select {
            padding: 6px 28px 6px 12px;
            border-radius: 30px;
            border: 1px solid #e2edf7;
            background: #f9fcff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a96b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
            font-size: 13px;
            color: #1a2639;
            outline: none;
            cursor: pointer;
            appearance: none;
            min-width: 110px;
            transition: 0.2s;
        }
        .filter-section .filter-group select:focus {
            border-color: #2b7be4;
            background-color: #ffffff;
        }
        .filter-section .filter-actions {
            display: flex;
            gap: 6px;
            margin-left: auto;
        }
        .filter-section .filter-actions button {
            padding: 6px 18px;
            border-radius: 30px;
            border: none;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
            background: #f0f6fe;
            color: #1a4a7a;
        }
        .filter-section .filter-actions button:hover {
            background: #e0ebf9;
        }
        .filter-section .filter-actions button.primary {
            background: #2b7be4;
            color: #fff;
        }
        .filter-section .filter-actions button.primary:hover {
            background: #1a6ac8;
        }
        .filter-section .filter-stats {
            font-size: 13px;
            color: #7a96b8;
            padding: 0 4px;
            margin-left: 4px;
        }
        .filter-section .filter-stats strong {
            color: #0b1e3a;
        }

        /* ============================================================ */
        /* 文件列表 — 浅色类别风格 */
        /* ============================================================ */
        .file-panel {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid #eaf1fa;
            box-shadow: 0 2px 12px rgba(0, 20, 40, 0.02);
            overflow: hidden;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .file-list-header {
            display: grid;
            grid-template-columns: 2.6fr 1.2fr 1.2fr 0.8fr 0.8fr;
            padding: 12px 20px;
            border-bottom: 1px solid #eef4fa;
            font-size: 12px;
            font-weight: 600;
            color: #7a96b8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            background: #fafcff;
            flex-shrink: 0;
        }
        @media (max-width: 820px) {
            .file-list-header {
                grid-template-columns: 2fr 1fr 1fr 0.7fr 0.7fr;
                padding: 10px 14px;
                font-size: 11px;
            }
        }
        @media (max-width: 640px) {
            .file-list-header {
                grid-template-columns: 2fr 0.8fr 0.7fr 0.6fr;
                padding: 10px 12px;
                font-size: 10px;
            }
            .file-list-header .col-size {
                display: none;
            }
        }

        .file-list {
            padding: 2px 0;
            flex: 1;
            overflow-y: auto;
        }

        .file-item {
            display: grid;
            grid-template-columns: 2.6fr 1.2fr 1.2fr 0.8fr 0.8fr;
            padding: 10px 20px;
            border-bottom: 1px solid #f4f8fc;
            transition: background 0.1s;
            align-items: center;
        }
        .file-item:hover {
            background: #f8fbff;
        }
        @media (max-width: 820px) {
            .file-item {
                grid-template-columns: 2fr 1fr 1fr 0.7fr 0.7fr;
                padding: 10px 14px;
            }
        }
        @media (max-width: 640px) {
            .file-item {
                grid-template-columns: 2fr 0.8fr 0.7fr 0.6fr;
                padding: 10px 12px;
            }
            .file-item .col-size {
                display: none;
            }
        }

        .file-item .col-name {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }
        .file-item .col-name .file-icon {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
            background: #f0f6fe;
            color: #2b7be4;
        }
        .file-item .col-name .file-icon.txt {
            background: #e8f0fe;
            color: #5a7a9a;
        }
        .file-item .col-name .file-icon.word {
            background: #e3f0fd;
            color: #2b7be4;
        }
        .file-item .col-name .file-icon.excel {
            background: #e8f5e9;
            color: #2a7a4a;
        }
        .file-item .col-name .file-icon.pdf {
            background: #fde8ec;
            color: #d94a5a;
        }
        .file-item .col-name .file-icon.image {
            background: #fef6e6;
            color: #d98c2a;
        }
        .file-item .col-name .file-icon.psd {
            background: #f0e6fe;
            color: #7a4ad9;
        }
        .file-item .col-name .file-icon.archive {
            background: #eef4fa;
            color: #7a96b8;
        }
        .file-item .col-name .file-icon.code {
            background: #e8f0fe;
            color: #2b7be4;
        }

        .file-item .col-name .file-title-wrap {
            display: flex;
            flex-direction: column;
            min-width: 0;
            flex: 1;
        }
        .file-item .col-name .file-name-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 8px;
        }
        .file-item .col-name .file-name {
            font-size: 14px;
            color: #1a2639;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 180px;
            cursor: default;
        }
        .file-item .col-name .heat-badge {
            font-size: 12px;
            font-weight: 600;
            color: #f5a623;
            background: #fef6e6;
            padding: 0 8px;
            border-radius: 12px;
            line-height: 20px;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }
        .file-item .col-name .heat-badge i {
            font-size: 10px;
            color: #f5a623;
        }
        .file-item .col-name .heat-badge.hot {
            color: #e85c6a;
            background: #fde8ec;
        }
        .file-item .col-name .heat-badge.hot i {
            color: #e85c6a;
        }
        .file-item .col-name .tag-label {
            font-size: 10px;
            background: #eef4fa;
            color: #5a7a9a;
            padding: 0 10px;
            border-radius: 12px;
            line-height: 18px;
            white-space: nowrap;
            display: inline-block;
        }

        /* 类别列 — 浅色风格（如附件二） */
        .file-item .col-category {
            background: #f0f6fc;
            color: #1a4a7a;
            border: 1px solid #e5eefa;
            padding: 2px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 450;
            display: inline-block;
            white-space: nowrap;
        }

        .file-item .col-time {
            font-size: 13px;
            color: #5a7a9a;
        }
        .file-item .col-size {
            font-size: 13px;
            color: #5a7a9a;
        }

        .file-item .col-action {
            display: flex;
            gap: 4px;
            justify-content: flex-end;
        }
        .file-item .col-action button {
            border: none;
            background: transparent;
            color: #8aa5c4;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
            transition: 0.15s;
            font-size: 14px;
        }
        .file-item .col-action button:hover {
            background: #eef4fa;
            color: #2b7be4;
        }

        /* ============================================================ */
        /* 其他页面通用样式 */
        /* ============================================================ */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 28px;
        }
        .stat-card {
            background: #ffffff;
            border-radius: 18px;
            padding: 20px 22px;
            border: 1px solid #eaf1fa;
            transition: all 0.2s ease;
            box-shadow: 0 2px 12px rgba(0, 20, 40, 0.02);
        }
        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(43, 123, 228, 0.06);
            border-color: #d4e4fc;
        }
        .stat-card .stat-label {
            font-size: 13px;
            font-weight: 500;
            color: #7a96b8;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .stat-card .stat-number {
            font-size: 32px;
            font-weight: 600;
            color: #0b1e3a;
            margin-top: 6px;
            letter-spacing: -0.5px;
        }
        .stat-card .stat-icon {
            float: right;
            font-size: 28px;
            color: #d4e4fc;
            opacity: 0.6;
        }

        .main-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 24px;
            margin-bottom: 28px;
        }
        @media (max-width: 960px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }
        .panel {
            background: #ffffff;
            border-radius: 20px;
            border: 1px solid #eaf1fa;
            padding: 22px 24px 26px;
            box-shadow: 0 2px 12px rgba(0, 20, 40, 0.02);
        }
        .panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }
        .panel-header h3 {
            font-size: 16px;
            font-weight: 600;
            color: #0b1e3a;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .panel-header h3 i {
            color: #2b7be4;
            font-size: 18px;
        }
        .panel-header .more-link {
            font-size: 13px;
            color: #6a8db0;
            text-decoration: none;
            font-weight: 450;
            transition: color 0.2s;
            cursor: pointer;
        }
        .panel-header .more-link:hover {
            color: #2b7be4;
        }
        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 12px;
        }
        .category-item {
            background: #f7faff;
            border-radius: 14px;
            padding: 14px 12px;
            text-align: center;
            border: 1px solid #eaf1fa;
            transition: all 0.2s ease;
            cursor: default;
        }
        .category-item:hover {
            background: #eef5fe;
            border-color: #c5daf5;
            transform: translateY(-2px);
        }
        .category-item .cat-icon {
            font-size: 26px;
            color: #2b7be4;
            margin-bottom: 4px;
            display: block;
        }
        .category-item .cat-name {
            font-size: 13px;
            font-weight: 500;
            color: #1a2a44;
        }
        .category-item .cat-count {
            font-size: 11px;
            color: #7a96b8;
            margin-top: 2px;
        }

        .tag-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 4px;
        }
        .tag-cloud .tag {
            background: #f0f6fe;
            color: #1f4a7a;
            padding: 4px 14px;
            border-radius: 30px;
            font-size: 12px;
            font-weight: 450;
            border: 1px solid #e5eefa;
            transition: all 0.15s;
            cursor: default;
        }
        .tag-cloud .tag:hover {
            background: #e3eefa;
            border-color: #b8d0e8;
        }
        .tag-cloud .tag .tag-count {
            color: #7a96b8;
            font-weight: 400;
            margin-left: 3px;
        }

        .quick-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 6px;
        }
        .quick-action {
            background: #f7faff;
            border-radius: 14px;
            padding: 14px 12px;
            text-align: center;
            border: 1px solid #eaf1fa;
            transition: 0.2s;
            cursor: default;
            font-size: 13px;
            font-weight: 500;
            color: #1a2a44;
        }
        .quick-action i {
            display: block;
            font-size: 22px;
            color: #2b7be4;
            margin-bottom: 4px;
        }
        .quick-action:hover {
            background: #eef5fe;
            border-color: #c5daf5;
            transform: translateY(-2px);
        }

        .activity-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .activity-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 12px;
            border-radius: 14px;
            background: #f9fcff;
            border: 1px solid #eef4fa;
            transition: 0.15s ease;
        }
        .activity-item:hover {
            background: #f2f8ff;
            border-color: #d4e4fc;
        }
        .activity-item .act-icon {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            background: #e8f0fe;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2b7be4;
            font-size: 16px;
            flex-shrink: 0;
        }
        .activity-item .act-content {
            flex: 1;
            min-width: 0;
        }
        .activity-item .act-title {
            font-size: 14px;
            font-weight: 500;
            color: #0f2846;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .activity-item .act-meta {
            font-size: 12px;
            color: #7a96b8;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }
        .activity-item .act-tag {
            background: #e8f0fe;
            color: #2b7be4;
            font-size: 10px;
            font-weight: 500;
            padding: 2px 10px;
            border-radius: 20px;
            letter-spacing: 0.2px;
            flex-shrink: 0;
        }

        /* ===== 表格 ===== */
        .table-wrap {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid #eaf1fa;
            overflow: hidden;
            flex: 1;
            display: flex;
            flex-direction: column;
            box-shadow: 0 2px 12px rgba(0, 20, 40, 0.02);
        }
        .table-wrap .table-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0;
        }
        .table-wrap table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }
        .table-wrap table thead {
            background: #fafcff;
            border-bottom: 1px solid #eef4fa;
        }
        .table-wrap table thead th {
            padding: 12px 18px;
            text-align: left;
            font-size: 12px;
            font-weight: 600;
            color: #7a96b8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            position: sticky;
            top: 0;
            background: #fafcff;
            z-index: 2;
        }
        .table-wrap table tbody td {
            padding: 11px 18px;
            border-bottom: 1px solid #f4f8fc;
            color: #1a2639;
            vertical-align: middle;
        }
        .table-wrap table tbody tr:hover {
            background: #f8fbff;
        }
        .table-wrap table tbody tr:last-child td {
            border-bottom: none;
        }

        .status-badge {
            font-size: 12px;
            padding: 2px 14px;
            border-radius: 30px;
            display: inline-block;
            font-weight: 450;
        }
        .status-badge.success {
            background: #e8f5e9;
            color: #2a7a4a;
        }
        .status-badge.fail {
            background: #fde8ec;
            color: #b33a4a;
        }
        .status-badge.pending {
            background: #fef6e6;
            color: #d98c2a;
        }

        .action-btns {
            display: flex;
            gap: 4px;
            justify-content: flex-end;
        }
        .action-btns button {
            border: none;
            background: transparent;
            color: #8aa5c4;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
            transition: 0.15s;
            font-size: 14px;
        }
        .action-btns button:hover {
            background: #eef4fa;
            color: #2b7be4;
        }

        .tag-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #f0f6fe;
            color: #1a4a7a;
            padding: 4px 14px 4px 16px;
            border-radius: 30px;
            font-size: 13px;
            font-weight: 450;
            border: 1px solid #e5eefa;
        }
        .tag-item .tag-count {
            font-size: 11px;
            color: #7a96b8;
            font-weight: 400;
            background: #eef4fa;
            padding: 0 8px;
            border-radius: 30px;
            line-height: 18px;
        }

        /* ===== 资产库 ===== */
        .asset-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 16px;
            padding: 8px 0;
        }
        .asset-card {
            background: #ffffff;
            border-radius: 16px;
            border: 1px solid #eaf1fa;
            overflow: hidden;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
        }
        .asset-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 28px rgba(43, 123, 228, 0.06);
            border-color: #d4e4fc;
        }
        .asset-card .asset-thumb {
            height: 140px;
            background: #f5f9fe;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            color: #d4e4fc;
            border-bottom: 1px solid #eef4fa;
        }
        .asset-card .asset-info {
            padding: 12px 14px 14px;
        }
        .asset-card .asset-info .asset-name {
            font-size: 13px;
            font-weight: 500;
            color: #0b1e3a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .asset-card .asset-info .asset-meta {
            font-size: 12px;
            color: #7a96b8;
            margin-top: 4px;
            display: flex;
            justify-content: space-between;
        }
        .asset-card .asset-info .asset-tag {
            font-size: 10px;
            background: #eef4fa;
            color: #5a7a9a;
            padding: 0 10px;
            border-radius: 12px;
            line-height: 18px;
            display: inline-block;
            margin-top: 4px;
        }

        /* ===== 统计卡片 ===== */
        .stat-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 16px;
            margin-bottom: 20px;
        }
        .stat-card-mini {
            background: #ffffff;
            border-radius: 16px;
            border: 1px solid #eaf1fa;
            padding: 16px 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
        }
        .stat-card-mini .stat-label {
            font-size: 13px;
            color: #7a96b8;
            font-weight: 500;
        }
        .stat-card-mini .stat-number {
            font-size: 28px;
            font-weight: 600;
            color: #0b1e3a;
            margin-top: 4px;
        }
        .stat-card-mini .stat-number .unit {
            font-size: 14px;
            font-weight: 400;
            color: #7a96b8;
            margin-left: 4px;
        }

        .hotword-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 6px 0;
        }
        .hotword-item {
            background: #f7faff;
            border: 1px solid #eaf1fa;
            border-radius: 30px;
            padding: 6px 18px;
            font-size: 14px;
            color: #1a2639;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: 0.15s;
        }
        .hotword-item:hover {
            background: #eef5fe;
            border-color: #c5daf5;
        }
        .hotword-item .hotword-count {
            font-size: 12px;
            color: #7a96b8;
            background: #eef4fa;
            padding: 0 10px;
            border-radius: 30px;
            line-height: 20px;
        }
        .hotword-item .hotword-rank {
            font-size: 11px;
            font-weight: 600;
            color: #2b7be4;
            min-width: 20px;
        }

        /* ===== 权限管理 ===== */
        .permission-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
            padding: 4px 0;
        }
        .permission-card {
            background: #ffffff;
            border-radius: 16px;
            border: 1px solid #eaf1fa;
            padding: 18px 20px 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
            transition: 0.2s;
        }
        .permission-card:hover {
            border-color: #d4e4fc;
            box-shadow: 0 4px 16px rgba(43, 123, 228, 0.04);
        }
        .permission-card .role-title {
            font-size: 16px;
            font-weight: 600;
            color: #0b1e3a;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .permission-card .role-title .role-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #fff;
        }
        .permission-card .role-title .role-icon.admin {
            background: #8b6bcf;
        }
        .permission-card .role-title .role-icon.sales {
            background: #f5a623;
        }
        .permission-card .role-title .role-icon.tech {
            background: #2b7be4;
        }
        .permission-card .role-desc {
            font-size: 13px;
            color: #5a7a9a;
            margin: 6px 0 12px;
        }
        .permission-card .perm-list {
            list-style: none;
            padding: 0;
        }
        .permission-card .perm-list li {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 0;
            font-size: 13px;
            color: #2a3e5a;
        }
        .permission-card .perm-list li i {
            font-size: 14px;
            width: 20px;
        }
        .permission-card .perm-list li .fa-check-circle {
            color: #3aaa5e;
        }
        .permission-card .perm-list li .fa-times-circle {
            color: #b8c8d8;
        }

        /* ===== 系统设置 ===== */
        .settings-group {
            background: #ffffff;
            border-radius: 18px;
            border: 1px solid #eaf1fa;
            padding: 20px 24px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
        }
        .settings-group .settings-title {
            font-size: 15px;
            font-weight: 600;
            color: #0b1e3a;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .settings-group .settings-title i {
            color: #2b7be4;
        }
        .settings-row {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #f4f8fc;
        }
        .settings-row:last-child {
            border-bottom: none;
        }
        .settings-row .settings-label {
            width: 140px;
            font-size: 14px;
            color: #3a5a7a;
            font-weight: 450;
            flex-shrink: 0;
        }
        .settings-row .settings-value {
            flex: 1;
            font-size: 14px;
            color: #1a2639;
        }
        .settings-row .settings-value input,
        .settings-row .settings-value select {
            padding: 6px 14px;
            border-radius: 30px;
            border: 1px solid #e2edf7;
            background: #f9fcff;
            font-size: 13px;
            color: #1a2639;
            outline: none;
            transition: 0.2s;
            width: 100%;
            max-width: 360px;
        }
        .settings-row .settings-value input:focus,
        .settings-row .settings-value select:focus {
            border-color: #2b7be4;
            background: #fff;
        }
        .settings-row .settings-value .toggle {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }
        .settings-row .settings-value .toggle .toggle-track {
            width: 42px;
            height: 24px;
            border-radius: 30px;
            background: #d4e4fc;
            transition: 0.25s;
            position: relative;
        }
        .settings-row .settings-value .toggle .toggle-track .toggle-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            position: absolute;
            top: 3px;
            left: 3px;
            transition: 0.25s;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        .settings-row .settings-value .toggle .toggle-track.active {
            background: #2b7be4;
        }
        .settings-row .settings-value .toggle .toggle-track.active .toggle-thumb {
            left: 21px;
        }

        /* ============================================================ */
        /* 响应式 */
        /* ============================================================ */
        @media (max-width: 768px) {
            .top-nav {
                padding: 8px 16px;
                gap: 10px;
                justify-content: space-between;
            }
            .top-nav .brand {
                position: static;
            }
            .user-profile {
                position: static;
            }
            .global-search {
                flex: 1 1 100%;
                min-width: 140px;
                order: 10;
            }
            .hot-keywords {
                order: 11;
                flex-wrap: wrap;
            }
            .hot-keywords .hot-tag {
                font-size: 11px;
                padding: 2px 8px;
            }

            .sidebar {
                width: 100%;
                height: auto;
                position: static;
                border-right: none;
                border-bottom: 1px solid #eaf1fa;
                padding: 12px;
                max-height: 280px;
                overflow-y: auto;
            }
            .sidebar-menu {
                display: flex;
                flex-wrap: wrap;
                gap: 2px;
            }
            .sidebar-menu>li {
                flex: 0 0 auto;
            }
            .sidebar-menu>li>a {
                padding: 6px 12px;
                font-size: 13px;
            }
            .collapsible-group {
                flex: 0 0 100%;
            }
            .group-header {
                padding: 6px 12px;
                font-size: 13px;
            }
            .sub-menu {
                padding-left: 12px;
            }
            .sub-menu li a {
                padding: 4px 12px;
                font-size: 12px;
            }
            .recent-section {
                display: none;
            }
            .main-content {
                padding: 16px;
                height: auto;
            }
            .app-body {
                flex-direction: column;
            }
            .filter-section {
                flex-direction: column;
                align-items: stretch;
                padding: 14px 16px;
            }
            .filter-section .filter-stats {
                margin-left: 0;
            }
            .filter-section .filter-actions {
                margin-left: 0;
            }
            .file-list-header {
                padding: 10px 12px;
                font-size: 10px;
            }
            .file-item {
                padding: 10px 12px;
            }
            .file-item .col-name .file-name {
                max-width: 100px;
            }
            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }
            .main-grid {
                grid-template-columns: 1fr;
            }
            .settings-row {
                flex-direction: column;
                align-items: stretch;
                gap: 4px;
            }
            .settings-row .settings-label {
                width: auto;
            }
            .settings-row .settings-value input {
                max-width: 100%;
            }
            .asset-grid {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            }
            .permission-grid {
                grid-template-columns: 1fr;
            }
            .stat-cards {
                grid-template-columns: 1fr 1fr;
            }
        }
        @media (max-width: 480px) {
            .top-nav .brand span {
                display: none;
            }
            .hot-keywords .hot-tag {
                display: none;
            }
            .hot-keywords .hot-tag:first-of-type {
                display: inline-block;
            }
            .file-item .col-name .tag-label {
                display: none;
            }
            .file-item .col-name .file-name {
                max-width: 70px;
            }
            .stats-grid {
                grid-template-columns: 1fr;
            }
            .stat-cards {
                grid-template-columns: 1fr;
            }
            .asset-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* ===== 滚动条 ===== */
        .sidebar::-webkit-scrollbar,
        .file-list::-webkit-scrollbar,
        .main-content::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }
        .sidebar::-webkit-scrollbar-track,
        .file-list::-webkit-scrollbar-track,
        .main-content::-webkit-scrollbar-track {
            background: transparent;
        }
        .sidebar::-webkit-scrollbar-thumb,
        .file-list::-webkit-scrollbar-thumb,
        .main-content::-webkit-scrollbar-thumb {
            background: #d4e4fc;
            border-radius: 10px;
        }
        .sidebar::-webkit-scrollbar-thumb:hover,
        .file-list::-webkit-scrollbar-thumb:hover,
        .main-content::-webkit-scrollbar-thumb:hover {
            background: #b8d0e8;
        }
    
/* ===== 预览模态 ===== */
.preview-overlay {
    position: fixed; inset: 0; background: rgba(10,25,50,.55); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
.preview-overlay.active { opacity: 1; pointer-events: auto; }
.preview-modal {
    background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(10,25,50,.4);
    width: min(900px, 92vw); max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
}
.preview-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px; border-bottom: 1px solid #e6ecf4;
}
.preview-title { font-size: 15px; font-weight: 600; color: #1a2639; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80%; }
.preview-close {
    width: 32px; height: 32px; border: none; background: #f0f4f9; border-radius: 8px;
    cursor: pointer; color: #8aa0bd; font-size: 15px;
}
.preview-close:hover { background: #e2e8f0; color: #1a2639; }
.preview-body { padding: 0; overflow-y: auto; flex: 1; }
.preview-text { padding: 18px 22px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; color: #3a4f6e; background: #f8fbfe; min-height: 300px; margin: 0; }
.preview-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }

/* 删除按鈕悬停红色 */
.file-item .col-action button.delete-btn:hover { color: #e5484d; }

/* ===== 内容区背景(用户指定渐变, 追加不改原规则) ===== */
.main-content {
    background:
        linear-gradient(90deg, #f8fafc 8%, rgba(248,250,252,0) 22%, rgba(248,250,252,0) 77%, #f8fafc 91%),
        radial-gradient(30% 100% at 70% -10%, #e0e7ff 0%, rgba(248,250,252,0) 100%),
        radial-gradient(30% 100% at 20% 120%, #f1f5f9 0%, rgba(248,250,252,0) 100%),
        #f8fafc;
}

/* ===== 自定义下拉 (Element风格, 独立组件类, 不改原 select) ===== */
.wiki-select { position: relative; display: inline-block; vertical-align: middle; }
.wiki-trigger {
    appearance: none; display: inline-flex; align-items: center; justify-content: space-between;
    gap: 16px; min-width: 132px;
    padding: 6px 8px 6px 12px;
    background: #fff; border: 1px solid #dcdfe6; border-radius: 6px;
    font-size: 13px; color: #1a2639; line-height: 1.5; cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}
.wiki-trigger:hover { border-color: #c0c4cc; }
.wiki-trigger .wiki-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiki-trigger .wiki-value.placeholder { color: #a3b1c4; }
.wiki-trigger .wiki-caret {
    display: inline-flex; color: #8aa0bd; flex: none;
    transition: transform .18s;
}
.wiki-select.open .wiki-trigger {
    border-color: #2b7be4;
    box-shadow: 0 0 0 3px rgba(43,123,228,.12);
}
.wiki-select.open .wiki-caret { transform: rotate(180deg); color: #2b7be4; }
.wiki-menu {
    position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 800;
    min-width: 100%; background: #fff;
    border: 1px solid #e4e7ed; border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
    padding: 4px; max-height: 260px; overflow-y: auto;
    opacity: 0; transform: translateY(-4px); pointer-events: none;
    transition: opacity .16s, transform .16s;
}
.wiki-select.open .wiki-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.wiki-opt {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    padding: 7px 12px; border-radius: 4px; cursor: pointer;
    font-size: 13px; color: #303133; line-height: 1.4;
    transition: background .12s, color .12s;
}
.wiki-opt:hover { background: #f5f7fa; }
.wiki-opt.selected { background: #ecf5ff; color: #409eff; font-weight: 500; }
.wiki-opt-check { display: inline-flex; color: #409eff; }
.wiki-menu::-webkit-scrollbar { width: 8px; }
.wiki-menu::-webkit-scrollbar-thumb { background: #d9dee6; border-radius: 4px; }
