/* ==================== 全局基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    font-size: 14px;
}

/* ==================== 顶部导航栏 Banner ==================== */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 100px;
    height: 40px;
    object-fit: contain;
}

.product-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #1890ff;
}

.product-name::before {
    content: '◇';
    font-size: 20px;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-right .nav-item {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.banner-right .nav-item:hover {
    color: #1890ff;
}

#username-display {
    color: #333;
    font-size: 13px;
}

#logout-btn {
    background: transparent;
    border: 1px solid #d9d9d9;
    color: #666;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
}

#logout-btn:hover {
    color: #1890ff;
    border-color: #1890ff;
    background: #e6f7ff;
}

/* ==================== 登录页面 ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 50px);
    background: #f5f7fa;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
    border: 1px solid #e8e8e8;
}

.login-box h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 20px;
    font-weight: 500;
}

/* ==================== 主容器布局 ==================== */
.main-container {
    display: flex;
    height: calc(100vh - 50px);
    overflow: hidden;
}

/* ==================== 左侧边栏 ==================== */
.sidebar {
    width: 180px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 12px 0;
    overflow-y: auto;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
    padding: 12px 0;
    overflow: visible;
}

/* 收起状态下隐藏菜单文字，只显示图标 */
.sidebar.collapsed .menu-item {
    font-size: 0;
    padding: 12px 0;
    justify-content: center;
    position: relative;
}

.sidebar.collapsed .menu-item::before {
    font-size: 18px;
}

/* 收起状态下悬浮显示菜单名称 - tooltip */
.sidebar.collapsed .menu-item::after {
    content: attr(data-title);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.sidebar.collapsed .menu-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #f5f7fa;
    color: #1890ff;
}

.menu-item.active {
    background: #e6f7ff;
    border-left-color: #1890ff;
    color: #1890ff;
    font-weight: 500;
}

/* 菜单图标 */
.menu-item::before {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item[data-page="dashboard"]::before { content: '📊'; }
.menu-item[data-page="outlines"]::before { content: '📋'; }
.menu-item[data-page="documents"]::before { content: '📄'; }
.menu-item[data-page="editor"]::before { content: '✏️'; }
.menu-item[data-page="account"]::before { content: '👤'; }
.menu-item[data-page="storage"]::before { content: '💾'; }
.menu-item[data-page="users"]::before { content: '👥'; }
.menu-item[data-page="roles"]::before { content: '🔐'; }
.menu-item[data-page="config"]::before { content: '⚙️'; }
.menu-item[data-page="register-config"]::before { content: '📝'; }
.menu-item[data-page="plans"]::before { content: '💎'; }
.menu-item[data-page="logs"]::before { content: '📜'; }

/* ==================== 侧边栏切换按钮 ==================== */
.sidebar-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 4px;
}

.sidebar-toggle-item:hover {
    background: #f5f7fa;
    color: #1890ff;
}

.sidebar-toggle-item #sidebar-toggle-icon {
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.3s ease;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-toggle-item .toggle-text {
    flex: 1;
}

.sidebar.collapsed .sidebar-toggle-item {
    justify-content: center;
    padding: 12px 0;
    border-left: 3px solid transparent;
}

.sidebar.collapsed .sidebar-toggle-item .toggle-text {
    display: none;
}

.sidebar.collapsed .sidebar-toggle-item #sidebar-toggle-icon {
    transform: rotate(180deg);
    font-size: 18px;
    width: auto;
}

.sidebar.collapsed .sidebar-toggle-item #sidebar-toggle-icon {
    transform: rotate(180deg);
    font-size: 18px;
}

/* ==================== 内容区域 ==================== */
.content-area {
    flex: 1;
    background: #fafafa;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 13px;
    transition: padding-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.main-container.sidebar-collapsed .content-area {
    /* 侧边栏收起时不需要额外padding，因为侧边栏仍有50px宽度 */
}

#content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* ==================== 仪表盘卡片 ==================== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding: 4px;
}

.dashboard-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    position: relative;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.12);
    border-color: #1890ff;
}

.dashboard-card .card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.dashboard-card h3 {
    font-size: 13px;
    margin-bottom: 8px;
    color: #666;
    font-weight: 400;
}

.dashboard-card .number {
    font-size: 36px;
    font-weight: 600;
    color: #1890ff;
    line-height: 1.2;
}

.dashboard-card .card-label {
    font-size: 12px;
    margin-top: 8px;
    color: #999;
}

.dashboard-card .recent-item {
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-card .recent-time {
    font-size: 12px;
    margin-top: 4px;
    color: #999;
}

/* ==================== 图表区域 ==================== */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding: 4px;
}

.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.chart-container h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
    font-weight: 500;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* ==================== 表格样式 ==================== */
.table-container {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    font-size: 13px;
}

.table thead {
    background: #fafafa;
}

.table thead th {
    border-bottom: 1px solid #e8e8e8;
    font-weight: 500;
    color: #333;
    padding: 12px;
    font-size: 13px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.table-hover tbody tr:hover {
    background-color: #e6f7ff;
}

.action-buttons {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

/* ==================== 编辑器页面 ==================== */
.editor-container {
    display: flex;
    gap: 0;
    height: 100%;
    flex: 1;
    position: relative;
    overflow-x: hidden;
}

.editor-left {
    flex: 1;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    overflow-y: hidden;
    overflow-x: hidden;
    min-width: 300px;
    height: 100%;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.editor-right {
    width: 600px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    height: 100%;
    overflow: hidden;
    font-size: 13px;
    background: #fff;
}

/* 拖动分隔条 */
.editor-resizer {
    width: 8px;
    background: #f0f0f0;
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
}

.editor-resizer:hover {
    background: #1890ff;
}

.editor-resizer::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: #d9d9d9;
}

/* ==================== 聊天区域 ==================== */
.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #fafafa;
    min-height: 0;
    font-size: 13px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input-row textarea {
    flex: 1;
    resize: none;
}

#chat-send-btn {
    min-width: 60px;
    height: 80px;
    font-weight: 500;
    transition: all 0.2s;
}

#chat-send-btn.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

#chat-send-btn.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
}

.message-bubble {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 90%;
    position: relative;
    font-size: 13px;
    line-height: 1.6;
}

.message-bubble.user {
    background: #f0f5ff;
    color: #333;
    margin-left: auto;
    border: 1px solid #d6e4ff;
    border-bottom-right-radius: 4px;
}

.message-bubble.assistant {
    background: #fff;
    color: #333;
    border: 1px solid #e8e8e8;
    border-bottom-left-radius: 4px;
}


/* ==================== Think部分样式 ==================== */
.message-think {
    background: #fffbe6;
    border-left: 3px solid #faad14;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.think-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.think-header h6 {
    margin: 0;
    font-size: 12px;
    color: #d48806;
    font-weight: 500;
}

.think-toggle {
    font-size: 11px;
    color: #d48806;
}

.think-content {
    margin-top: 8px;
    font-size: 12px;
    color: #874d00;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.think-content.collapsed {
    display: none;
}

/* ==================== Markdown内容样式 ==================== */
.message-content {
    word-wrap: break-word;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin-top: 12px;
    margin-bottom: 8px;
    color: #333;
}

.message-content p {
    margin: 8px 0;
}

.message-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    color: #c41d7f;
}

.message-content pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #e8e8e8;
}

.message-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.message-content ul,
.message-content ol {
    margin: 4px 0;
    padding-left: 24px;
    margin-bottom: 0 !important;
}

.message-content li {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.message-content li p {
    margin: 0;
}

.message-content li + li {
    margin-top: 0;
}

.message-content blockquote {
    border-left: 3px solid #1890ff;
    padding-left: 12px;
    margin: 12px 0;
    color: #666;
    background: #f5f7fa;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
}

.message-actions span {
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.message-actions span:hover {
    color: #1890ff;
    background: #e6f7ff;
}

/* ==================== 工具调用信息样式 ==================== */
.tool-info {
    color: #666;
    font-size: 12px;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f5f7fa;
    border-left: 3px solid #1890ff;
    border-radius: 4px;
    font-style: normal;
}

.tool-info.completed {
    border-left-color: #52c41a;
    background: #f6ffed;
    color: #389e0d;
}

/* ==================== 文档章节样式 ==================== */
.document-sections-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.document-section {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
    transition: all 0.2s;
    cursor: pointer;
}

.document-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: #d9d9d9;
}

/* 选中状态 */
.document-section.selected {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    background: #f0f7ff;
}

/* 不同深度的章节样式 */
.document-section.depth-1 {
    border-left: 3px solid #1890ff;
}

.document-section.depth-2 {
    border-left: 3px solid #52c41a;
}

.document-section.depth-3 {
    border-left: 3px solid #faad14;
}

.document-section.level-4 {
    border-left: 3px solid #722ed1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: nowrap;
}

/* 章节头部按钮样式 */
.section-header .btn {
    padding: 2px 8px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 章节图标按钮样式 */
.section-icon-btn {
    padding: 2px 6px !important;
    font-size: 14px !important;
    line-height: 1;
    min-width: 28px;
    border-radius: 4px;
}

.section-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 章节折叠按钮 */
.section-collapse-btn {
    cursor: pointer;
    font-size: 16px;
    color: #1890ff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.section-collapse-btn:hover {
    background: #e6f7ff;
    color: #096dd9;
}

/* 折叠状态的章节 */
.document-section.collapsed > .section-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.document-section.collapsed > .section-content {
    display: none;
}

/* 被父章节隐藏的子章节 */
.document-section.hidden-by-parent {
    display: none;
}

.section-number {
    font-weight: 600;
    font-size: 13px;
    color: #000000;
    min-width: 40px;
    text-align: right;
}

.section-title-input {
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 4px 8px;
    transition: all 0.2s;
}

.section-title-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.section-title-input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.section-content {
    margin-top: 8px;
}

/* 编辑框收缩样式 */
.section-editor-wrapper {
    margin-top: 8px;
}

.section-editor-toggle {
    cursor: pointer;
    padding: 4px 10px;
    background: #f5f7fa;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-editor-toggle:hover {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.section-editor-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.2s;
}

.section-editor-content {
    display: none;
    margin-top: 8px;
}

.section-editor-content.expanded {
    display: block;
}

.section-content-textarea {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    min-height: 300px;
    resize: vertical;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px;
}

.section-content-textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.markdown-preview {
    border: none;
    border-radius: 4px;
    padding: 12px;
    background: #fafafa;
    min-height: 40px;
    font-size: 13px;
    line-height: 1.8;
    width: 100%;
}

/* ==================== 树形大纲样式 ==================== */
.tree-outline-container {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
    background: #fff;
}

.tree-list {
    list-style: none;
    padding-left: 0;
}

.tree-node {
    margin: 4px 0;
}

.tree-node-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f5f7fa;
    border-radius: 4px;
    transition: all 0.2s;
}

.tree-node-content:hover {
    background: #e6f7ff;
}

.tree-node-toggle {
    cursor: pointer;
    width: 20px;
    text-align: center;
    user-select: none;
    color: #999;
}

.tree-node-input {
    flex: 1;
}

.tree-list .tree-list {
    padding-left: 24px;
    margin-top: 4px;
}

/* ==================== 平行大纲样式 ==================== */
.flat-outline-container {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
    background: #fff;
}

.flat-list {
    list-style: none;
    padding-left: 0;
}

.flat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin: 4px 0;
    background: #f5f7fa;
    border-radius: 4px;
    transition: all 0.2s;
}

.flat-item:hover {
    background: #e6f7ff;
}

.flat-item-number {
    font-weight: 600;
    min-width: 30px;
    color: #1890ff;
}

.flat-item-input {
    flex: 1;
}


/* ==================== 按钮样式 (参考 huadiancss) ==================== */
.btn {
    border-radius: 4px;
    font-weight: 400;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.5;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* 主要按钮 - 蓝色 */
.btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-primary:active {
    background: #096dd9;
    border-color: #096dd9;
}

/* 危险按钮 - 改为白底红字 */
.btn-danger {
    background: #fff;
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.btn-danger:hover {
    background: #fff1f0;
    border-color: #ff7875;
    color: #ff7875;
}

/* 成功按钮 - 改为白底绿字 */
.btn-success {
    background: #fff;
    border-color: #52c41a;
    color: #52c41a;
}

.btn-success:hover {
    background: #f6ffed;
    border-color: #73d13d;
    color: #73d13d;
}

/* 警告按钮 */
.btn-warning {
    background: #fff;
    border-color: #faad14;
    color: #faad14;
}

.btn-warning:hover {
    background: #fffbe6;
    border-color: #ffc53d;
    color: #ffc53d;
}

/* 信息按钮 */
.btn-info {
    background: #fff;
    border-color: #13c2c2;
    color: #13c2c2;
}

.btn-info:hover {
    background: #e6fffb;
    border-color: #36cfc9;
    color: #36cfc9;
}

/* 默认按钮 - 白底灰边 */
.btn-secondary {
    background: #fff;
    border-color: #d9d9d9;
    color: #333;
}

.btn-secondary:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 轮廓按钮 */
.btn-outline-primary {
    background: transparent;
    border-color: #1890ff;
    color: #1890ff;
}

.btn-outline-primary:hover {
    background: #e6f7ff;
}

.btn-outline-secondary {
    background: #fff;
    border-color: #d9d9d9;
    color: #666;
}

.btn-outline-secondary:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-outline-warning {
    background: transparent;
    border: none;
    color: #d48806;
}

.btn-outline-warning:hover {
    background: #fffbe6;
    color: #ad6800;
}

/* ==================== 徽章样式 ==================== */
.badge {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
}

.badge-outline-tree {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-outline-flat {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.badge-doc-normal {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

.badge-doc-presentation {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

/* ==================== 分页样式 ==================== */
.pagination {
    margin: 16px 0;
}

.pagination .page-link {
    color: #1890ff;
    border: 1px solid #d9d9d9;
    padding: 6px 12px;
    font-size: 13px;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.pagination .page-item.active .page-link {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #d9d9d9;
    background-color: #fff;
    border-color: #d9d9d9;
}

/* ==================== 表单控件 ==================== */
.form-control, .form-select {
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    transition: all 0.2s;
}

/* 下拉框增加右侧内边距，避免文字和箭头重叠 */
.form-select {
    padding-right: 32px;
    background-position: right 8px center;
}

.form-control:focus, .form-select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.form-label {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.mb-3 {
    margin-bottom: 12px !important;
}

/* ==================== 加载动画 ==================== */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.2em;
    color: #1890ff;
}

.spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 0.15em;
}

/* ==================== Quill编辑器 ==================== */
.ql-toolbar {
    border: 1px solid #d9d9d9 !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 6px !important;
    background: #fafafa !important;
}

.ql-container {
    border: 1px solid #d9d9d9 !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    font-size: 13px !important;
}

.ql-editor {
    min-height: 60px;
    padding: 10px !important;
}

.ql-toolbar button {
    width: 26px !important;
    height: 26px !important;
}

.ql-toolbar .ql-stroke {
    stroke: #666 !important;
}

.ql-toolbar .ql-fill {
    fill: #666 !important;
}

.ql-toolbar button:hover .ql-stroke {
    stroke: #1890ff !important;
}

.ql-toolbar button:hover .ql-fill {
    fill: #1890ff !important;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==================== 卡片通用样式 ==================== */
.card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 16px;
    font-weight: 500;
}

.card-body {
    padding: 16px;
}

/* ==================== 模态框样式 ==================== */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 20px;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e8e8e8;
    padding: 12px 20px;
}

/* ==================== 警告提示样式 ==================== */
.alert {
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 13px;
    border: none;
}

.alert-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.alert-danger {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.alert-warning {
    background: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.alert-info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}


/* ==================== 功能卡片样式（欢迎区域） ==================== */
.welcome-section {
    text-align: center;
    padding: 40px 20px;
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.bot-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1890ff, #52c41a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.welcome-header h1 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
}

.welcome-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 30px;
}

.feature-cards {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.feature-card {
    width: 140px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transform: translateY(-2px);
}

.feature-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-card .card-title {
    font-size: 14px;
    color: #333;
}

/* ==================== 输入区域样式 ==================== */
.input-area {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s;
}

.input-area:focus-within {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.input-toolbar {
    display: flex;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid #e8e8e8;
    margin-right: 12px;
}

.toolbar-icon {
    cursor: pointer;
    color: #999;
    font-size: 16px;
    transition: color 0.2s;
}

.toolbar-icon:hover {
    color: #1890ff;
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
}

.chat-input::placeholder {
    color: #bfbfbf;
}

.send-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #1890ff;
    color: #fff;
}

.disclaimer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* ==================== Mermaid图表样式 ==================== */
.mermaid-diagram {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    text-align: center;
    transition: all 0.3s ease;
}

.mermaid-diagram:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #1890ff;
}

/* 流程图 */
.mermaid-flowchart {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    border-color: #1890ff;
}

.mermaid-flowchart::before {
    content: '📊 流程图';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    color: #1890ff;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 序列图 */
.mermaid-sequence {
    background: linear-gradient(135deg, #f9f0ff 0%, #efdbff 100%);
    border-color: #722ed1;
}

/* 类图 */
.mermaid-classDiagram {
    background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
    border-color: #52c41a;
}

/* 状态图 */
.mermaid-stateDiagram {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
    border-color: #fa8c16;
}

/* 甘特图 */
.mermaid-gantt {
    background: linear-gradient(135deg, #e6fffb 0%, #b5f5ec 100%);
    border-color: #13c2c2;
}

/* 饼图 */
.mermaid-pie {
    background: linear-gradient(135deg, #fffbe6 0%, #fff1b8 100%);
    border-color: #faad14;
}

/* ER图 */
.mermaid-erDiagram {
    background: linear-gradient(135deg, #e6f7ff 0%, #91d5ff 100%);
    border-color: #1890ff;
}

/* 用户旅程图 */
.mermaid-journey {
    background: linear-gradient(135deg, #fff0f6 0%, #ffd6e7 100%);
    border-color: #eb2f96;
}

.mermaid-diagram svg {
    max-width: 100%;
    height: auto;
}

.mermaid {
    text-align: center;
    margin: 16px 0;
}

/* 隐藏图表类型标签 */
.mermaid-flowchart::before,
.mermaid::before {
    display: none !important;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .menu {
        display: flex;
        flex-wrap: wrap;
    }
    
    .menu-item {
        padding: 8px 12px;
    }
    
    .editor-container {
        flex-direction: column;
    }
    
    .editor-right {
        width: 100%;
        height: 400px;
    }
    
    .editor-resizer {
        display: none;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .feature-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar-toggle-item {
        display: none;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .sidebar,
    .banner,
    .sidebar-toggle-item,
    .chat-input-area {
        display: none !important;
    }
    
    .content-area {
        padding: 0 !important;
    }
    
    .mermaid-diagram {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ==================== 配置页面滚动条 ==================== */
.card-body::-webkit-scrollbar,
div[style*="overflow-y: auto"]::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.card-body::-webkit-scrollbar-track,
div[style*="overflow-y: auto"]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.card-body::-webkit-scrollbar-thumb,
div[style*="overflow-y: auto"]::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.card-body::-webkit-scrollbar-thumb:hover,
div[style*="overflow-y: auto"]::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Firefox滚动条 */
.card-body,
div[style*="overflow-y: auto"] {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* ==================== 空状态样式 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
}

/* ==================== 标签页样式 ==================== */
.nav-tabs {
    border-bottom: 1px solid #e8e8e8;
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: 13px;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    color: #1890ff;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    background: transparent;
}

/* ==================== 下拉菜单样式 ==================== */
.dropdown-menu {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 4px 0;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #e6f7ff;
    color: #1890ff;
}

.dropdown-divider {
    margin: 4px 0;
    border-color: #f0f0f0;
}

/* ==================== 工具提示样式 ==================== */
.tooltip {
    font-size: 12px;
}

.tooltip-inner {
    background: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    padding: 6px 10px;
}

/* ==================== 进度条样式 ==================== */
.progress {
    height: 8px;
    border-radius: 4px;
    background: #f5f5f5;
}

.progress-bar {
    background: #1890ff;
    border-radius: 4px;
}

/* ==================== 面包屑样式 ==================== */
.breadcrumb {
    padding: 8px 0;
    margin-bottom: 16px;
    background: transparent;
    font-size: 12px;
}

.breadcrumb-item {
    color: #666;
}

.breadcrumb-item.active {
    color: #333;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: #d9d9d9;
}

.breadcrumb-item a {
    color: #1890ff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #40a9ff;
}


/* ==================== Quill 编辑器样式 ==================== */
.quill-editor-container {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
}

.quill-editor-container .ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #e8e8e8 !important;
    border-radius: 4px 4px 0 0 !important;
    background: #fafafa !important;
    padding: 8px !important;
}

.quill-editor-container .ql-container {
    border: none !important;
    font-size: 14px !important;
}

.quill-editor-container .ql-editor {
    min-height: 80px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 12px !important;
    line-height: 1.6;
}

.quill-editor-container .ql-editor p {
    margin-bottom: 6px;
}

.quill-editor-container .ql-editor h1,
.quill-editor-container .ql-editor h2,
.quill-editor-container .ql-editor h3,
.quill-editor-container .ql-editor h4 {
    margin-top: 16px;
    margin-bottom: 8px;
}

.quill-editor-container .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.quill-editor-container .ql-editor blockquote {
    border-left: 3px solid #1890ff;
    padding-left: 12px;
    margin: 12px 0;
    color: #666;
    background: #f5f7fa;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
}

.quill-editor-container .ql-editor pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
}

.quill-editor-container .ql-editor code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

/* 工具栏按钮悬停效果 */
.quill-editor-container .ql-toolbar button:hover {
    color: #1890ff;
}

.quill-editor-container .ql-toolbar button:hover .ql-stroke {
    stroke: #1890ff !important;
}

.quill-editor-container .ql-toolbar button:hover .ql-fill {
    fill: #1890ff !important;
}

.quill-editor-container .ql-toolbar button.ql-active {
    color: #1890ff;
}

.quill-editor-container .ql-toolbar button.ql-active .ql-stroke {
    stroke: #1890ff !important;
}

.quill-editor-container .ql-toolbar button.ql-active .ql-fill {
    fill: #1890ff !important;
}

/* ==================== Vditor 编辑器样式 ==================== */
.vditor-editor-container {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.vditor-editor-container .vditor {
    border: none !important;
    width: 100% !important;
}

.vditor-editor-container .vditor-toolbar {
    border-bottom: 1px solid #e8e8e8 !important;
    padding: 4px 8px !important;
}

.vditor-editor-container .vditor-content {
    min-height: 100px;
    max-height: none !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
}

.vditor-editor-container .vditor-wysiwyg {
    padding: 12px !important;
    width: 100% !important;
    min-height: 100px;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 13px !important;
}

.vditor-editor-container .vditor-wysiwyg .vditor-reset {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 80px;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.8 !important;
    white-space: pre-wrap !important;  /* 保留空格和换行 */
}

/* 保留段落开头的空格 */
.vditor-editor-container .vditor-wysiwyg .vditor-reset p,
.vditor-editor-container .vditor-wysiwyg .vditor-reset div {
    white-space: pre-wrap !important;
}

.vditor-editor-container .vditor-wysiwyg [data-block="0"] {
    width: 100% !important;
    max-width: 100% !important;
}

.vditor-editor-container .vditor-ir {
    padding: 12px !important;
    width: 100% !important;
    min-height: 100px;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 13px !important;
}

.vditor-editor-container .vditor-ir .vditor-reset {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 80px;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.8 !important;
    white-space: pre-wrap !important;  /* 保留空格和换行 */
}

/* 保留段落开头的空格 - IR 模式 */
.vditor-editor-container .vditor-ir .vditor-reset p,
.vditor-editor-container .vditor-ir .vditor-reset div {
    white-space: pre-wrap !important;
}

/* Vditor 表格样式增强 */
.vditor-editor-container table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
}

.vditor-editor-container th,
.vditor-editor-container td {
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
}

.vditor-editor-container th {
    background: #fafafa;
    font-weight: 600;
}

/* Markdown 表格样式 */
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.markdown-table th,
.markdown-table td {
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
    min-height: 20px;
}

/* 空单元格也显示边框 */
.markdown-table td:empty,
.markdown-table th:empty {
    min-width: 40px;
    height: 36px;
}

.markdown-table td:empty::after,
.markdown-table th:empty::after {
    content: '\00a0';  /* 不间断空格，保持单元格高度 */
}

.markdown-table th {
    background: #fafafa;
    font-weight: 600;
}

.markdown-table tr:hover {
    background: #f5f5f5;
}

/* 章节预览样式 */
.section-preview {
    padding: 12px;
    background: #fafafa;
    border-radius: 4px;
    min-height: 40px;
    line-height: 1.8;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.section-preview:hover {
    background: #f0f0f0;
    box-shadow: inset 0 0 0 1px #d9d9d9;
}

.section-preview .markdown-table {
    margin: 8px 0;
}

/* 预览区普通表格样式 */
.section-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.section-preview table th,
.section-preview table td {
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
}

.section-preview table th {
    background: #fafafa;
    font-weight: 600;
}

.section-preview table td:empty::after,
.section-preview table th:empty::after {
    content: '\00a0';
}

.section-preview p {
    margin-bottom: 8px;
}

.section-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.section-preview h1,
.section-preview h2,
.section-preview h3,
.section-preview h4 {
    margin-top: 12px;
    margin-bottom: 8px;
    color: #333;
}

.section-preview blockquote {
    border-left: 3px solid #1890ff;
    padding-left: 12px;
    margin: 12px 0;
    color: #666;
    background: #f5f7fa;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
}

.section-preview pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
}

.section-preview code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
}

.section-preview ul,
.section-preview ol {
    padding-left: 24px;
    margin: 4px 0;
    margin-bottom: 0 !important;
}

.section-preview li {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.section-preview li p {
    margin: 0;
}

.section-preview li + li {
    margin-top: 0;
}

.section-preview a {
    color: #1890ff;
    text-decoration: none;
}

.section-preview a:hover {
    text-decoration: underline;
}

/* Mermaid代码块在预览中的样式 */
.section-preview .mermaid-code {
    background: #f0f5ff;
    border: 1px solid #d6e4ff;
    border-radius: 4px;
    padding: 12px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
    white-space: pre-wrap;
}


/* ==================== Quill Better Table 样式 ==================== */
.quill-better-table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

.quill-better-table td {
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
    min-width: 50px;
}

.quill-better-table-wrapper {
    overflow-x: auto;
}

/* 表格操作菜单样式 */
.qlbt-operation-menu {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

.qlbt-operation-menu .qlbt-operation-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

.qlbt-operation-menu .qlbt-operation-menu-item:hover {
    background: #f5f5f5;
    color: #1890ff;
}

/* 表格选择高亮 */
.qlbt-selection-line {
    background: rgba(24, 144, 255, 0.1);
}

.qlbt-selection-line.qlbt-selection-line-left,
.qlbt-selection-line.qlbt-selection-line-right,
.qlbt-selection-line.qlbt-selection-line-top,
.qlbt-selection-line.qlbt-selection-line-bottom {
    background: #1890ff;
}


/* Quill 表格包装器样式 */
.ql-table-wrapper {
    margin: 12px 0;
    overflow-x: auto;
}

.ql-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.ql-table-wrapper th,
.ql-table-wrapper td {
    border: 1px solid #d9d9d9;
    padding: 8px 12px;
    text-align: left;
}

.ql-table-wrapper th {
    background: #fafafa;
    font-weight: 600;
}

.ql-table-wrapper tr:hover {
    background: #f5f5f5;
}

.ql-editor .ql-table-wrapper {
    cursor: default;
}


/* ==================== 文件夹管理样式 ==================== */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 6px 0;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-item:hover {
    background: #e3f2fd;
    border-color: #1890ff;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15);
}

.folder-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.folder-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-actions {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.folder-item:hover .folder-actions {
    opacity: 1;
}

.folder-actions .btn {
    padding: 1px 4px;
    font-size: 10px;
}

/* 面包屑导航增强 */
#folder-breadcrumb {
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

#folder-breadcrumb .breadcrumb-item a {
    color: #1890ff;
    text-decoration: none;
}

#folder-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

#folder-breadcrumb .breadcrumb-item.active {
    color: #666;
    font-weight: 500;
}
