/* ============ 文档中心 ============ */
.doc-page .doc-side { width: 280px; display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start; height: calc(100vh - 126px); }
.doc-space-opt { display: inline-flex; align-items: center; gap: 6px; }
.doc-space-info { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; min-width: 0; }
.doc-tree-head { margin: 2px 0 6px; }
.doc-tree { background: transparent; flex: 1; overflow: auto; }
.doc-tree .el-tree-node__content { height: 32px; border-radius: 6px; }
.doc-tree .tree-node { min-width: 0; }
.doc-tree-title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.doc-tree-icon { color: #8a94a6; flex-shrink: 0; }
.doc-tree .el-tree-node.is-current > .el-tree-node__content { background: var(--el-color-primary-light-9); color: var(--el-color-primary); font-weight: 500; }
.doc-tree .tree-ops .el-button + .el-button { margin-left: 2px; }

.doc-search { flex: 1; overflow: auto; }
.doc-search-item { padding: 8px 8px; border-radius: 6px; cursor: pointer; border-bottom: 1px dashed var(--to-border); }
.doc-search-item:hover { background: var(--el-fill-color-light); }
.doc-search-title { font-weight: 500; margin-bottom: 2px; }
.doc-search-snippet { font-size: 12.5px; color: var(--el-text-color-regular); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-all; }
.doc-search-meta { font-size: 12px; color: var(--to-muted); margin-top: 2px; }
.doc-search mark { background: #ffe58f; color: inherit; padding: 0 1px; border-radius: 2px; }
html.dark .doc-search mark { background: #806a00; }

.doc-home-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--to-border); }
.doc-home-head h2 { margin: 0 0 4px; font-size: 20px; }
.doc-home-icon { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg, #2f6bff, #6b9bff); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-section-title { font-weight: 600; margin: 18px 0 8px; font-size: 14px; }
.doc-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.doc-recent-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--to-border); border-radius: 8px; cursor: pointer; transition: border-color .2s, box-shadow .2s; min-width: 0; margin-bottom: 8px; }
.doc-recent .doc-recent-item { margin-bottom: 0; }
.doc-recent-item:hover { border-color: var(--el-color-primary-light-5); box-shadow: 0 4px 12px rgba(31, 56, 108, .08); }
.doc-recent-icon { font-size: 20px; color: var(--el-color-primary); flex-shrink: 0; }
.doc-recent-title { font-weight: 500; }

/* 阅读 */
.doc-page .doc-reader { overflow: visible; }
.doc-reader > .el-card__body { padding: 0; }
.doc-reader-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--to-border); flex-wrap: wrap; position: sticky; top: 0; background: var(--to-card); z-index: 5; border-radius: 8px 8px 0 0; }
.doc-reader-bar .el-button + .el-button { margin-left: 0; }
.doc-reader-bar .el-breadcrumb a { cursor: pointer; font-weight: normal; color: var(--to-muted); }
.doc-reader-bar .el-breadcrumb a:hover { color: var(--el-color-primary); }
.doc-reader-wrap { display: flex; gap: 24px; padding: 20px 32px 32px; }
.doc-reader-main { flex: 1; min-width: 0; max-width: 960px; }
.doc-title { font-size: 28px; margin: 4px 0 8px; line-height: 1.35; word-break: break-word; }
.doc-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--to-muted); font-size: 13px; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--to-border); }
.doc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.doc-children { margin-top: 24px; border-top: 1px dashed var(--to-border); }
.doc-outline { width: 200px; flex-shrink: 0; position: sticky; top: 64px; align-self: flex-start; max-height: calc(100vh - 198px); overflow: auto; border-left: 2px solid var(--to-border); padding-left: 10px; }
.doc-outline-title { font-weight: 600; font-size: 13px; color: var(--to-muted); margin-bottom: 6px; }
.doc-outline-item { font-size: 13px; line-height: 1.9; cursor: pointer; color: var(--el-text-color-regular); }
.doc-outline-item:hover { color: var(--el-color-primary); }

/* 编辑 */
.doc-editor-card > .el-card__body { padding: 12px 16px 16px; }
.doc-editor-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.doc-editor-bar .el-button + .el-button { margin-left: 0; }
.doc-title-input { flex: 1; min-width: 220px; }
.doc-title-input .el-input__inner { font-size: 18px; font-weight: 600; }
.doc-save-state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--to-muted); white-space: nowrap; }
.doc-save-state.s-saved { color: #67c23a; }
.doc-save-state.s-unsaved, .doc-save-state.s-saving { color: #e6a23c; }
.doc-save-state.s-conflict, .doc-save-state.s-error { color: #f56c6c; }
.doc-help { cursor: help; font-size: 16px; }

/* 模板 */
.doc-tpl-scroll { max-height: 420px; overflow: auto; padding-right: 4px; }
.doc-tpl-cat { font-weight: 600; font-size: 13px; color: var(--to-muted); margin: 10px 0 8px; }
.doc-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.doc-tpl-card { border: 1px solid var(--to-border); border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: all .15s; min-width: 0; }
.doc-tpl-card:hover { border-color: var(--el-color-primary-light-5); }
.doc-tpl-card.active { border-color: var(--el-color-primary); background: var(--el-color-primary-light-9); box-shadow: 0 0 0 1px var(--el-color-primary) inset; }
.doc-tpl-name { display: flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 4px; min-width: 0; }
.doc-tpl-desc { font-size: 12px; color: var(--to-muted); line-height: 1.5; height: 36px; overflow: hidden; }

/* 历史版本 */
.doc-ver { display: flex; gap: 16px; height: 100%; }
.doc-ver-list { width: 240px; flex-shrink: 0; overflow: auto; border-right: 1px solid var(--to-border); padding-right: 12px; }
.doc-ver-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; margin-bottom: 4px; border: 1px solid transparent; }
.doc-ver-item:hover { background: var(--el-fill-color-light); }
.doc-ver-item.active { background: var(--el-color-primary-light-9); border-color: var(--el-color-primary-light-7); }
.doc-ver-view { flex: 1; min-width: 0; overflow: auto; }
.doc-ver-title { font-size: 16px; }

/* 评论 */
.doc-cmt { display: flex; flex-direction: column; height: 100%; }
.doc-cmt-list { flex: 1; overflow: auto; }
.doc-cmt-item { padding: 10px 12px; border: 1px solid var(--to-border); border-radius: 8px; margin-bottom: 10px; }
.doc-cmt-item.resolved { opacity: .65; }
.doc-cmt-quote { margin: 8px 0 4px; padding: 4px 10px; border-left: 3px solid #c9d4ea; background: var(--el-fill-color-lighter); color: var(--to-muted); font-size: 12.5px; white-space: pre-wrap; max-height: 80px; overflow: auto; }
.doc-cmt-content { margin-top: 6px; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.doc-cmt-ops { text-align: right; margin-top: 2px; }
.doc-cmt-form { border-top: 1px solid var(--to-border); padding-top: 12px; margin-top: 8px; }

/* API 文档 */
.apidoc-page .apidoc-toc { position: sticky; top: 0; align-self: flex-start; height: calc(100vh - 126px); }
.apidoc-toc .doc-outline-item.lv1 { font-weight: 600; }
.apidoc-toc .doc-outline-item.lv2 { font-weight: 500; }
.apidoc-body { min-height: 300px; }

@media (max-width: 1100px) {
  .doc-outline { display: none; }
  .doc-reader-wrap { padding: 16px; }
}
@media (max-width: 800px) {
  .doc-page.split-page, .apidoc-page.split-page { flex-direction: column; }
  .doc-page .doc-side, .apidoc-page .apidoc-toc { width: 100%; position: static; height: auto; max-height: 360px; }
}

/* 空间归属项目 */
.doc-space-scope { margin-left: 6px; }
.doc-space-info .el-tag { flex-shrink: 0; }

/* ---------- 表格文档 ---------- */
.doc-tree-icon.is-sheet, .doc-recent-icon.is-sheet, .doc-sheet-mini { color: #1f9d55; }
.doc-sheet-mini { margin-right: 4px; vertical-align: -2px; }
.doc-sheet-card .doc-sheet-body { padding: 12px 16px 16px; }
.doc-sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.doc-sheet-icon { font-size: 24px; color: #1f9d55; flex-shrink: 0; }
.doc-sheet-title .el-input__wrapper { box-shadow: none; padding-left: 4px; }
.doc-sheet-title .el-input__wrapper:hover, .doc-sheet-title .el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--el-input-hover-border-color) inset; }
.doc-sheet-title-ro { font-size: 22px; margin: 0; flex: 1; min-width: 200px; }

.sheet-grid { display: flex; flex-direction: column; min-width: 0; }
.sheet-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sheet-toolbar .el-button + .el-button { margin-left: 0; }
.sheet-search { width: 200px; }
.sheet-sort { width: 170px; }
.sheet-scroll { overflow: auto; border: 1px solid var(--to-border); border-radius: 6px; background: var(--to-card); position: relative; min-height: 120px; }
.sheet-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sheet-table th, .sheet-table td { border-right: 1px solid var(--to-border); border-bottom: 1px solid var(--to-border); height: 34px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box; background: var(--to-card); }
.sheet-table thead th { position: sticky; top: 0; z-index: 3; background: var(--el-fill-color-light); font-weight: 500; color: var(--el-text-color-regular); text-align: left; }
.sheet-table .sheet-rn { position: sticky; left: 0; z-index: 2; background: var(--el-fill-color-lighter); text-align: center; color: var(--to-muted); padding: 0 2px; font-size: 12px; }
.sheet-table thead .sheet-rn { z-index: 4; background: var(--el-fill-color-light); }
.sheet-tr:hover td { background: var(--el-fill-color-lighter); }
.sheet-tr:hover td.sheet-rn { background: var(--el-fill-color); }
.sheet-grid:not(.is-readonly) .sheet-td { cursor: pointer; }
.sheet-td.is-active { padding: 0 2px; box-shadow: inset 0 0 0 2px var(--el-color-primary); overflow: visible; }
.sheet-td.ct-NUMBER { text-align: right; }
.sheet-td.ct-CHECKBOX { text-align: center; }
.sheet-td-pad { background: transparent; }
.sheet-rn-ops { display: flex; justify-content: center; gap: 1px; }
.sheet-rn-ops span { cursor: pointer; padding: 2px; border-radius: 3px; display: inline-flex; color: var(--to-muted); font-size: 13px; }
.sheet-rn-ops span:hover { color: var(--el-color-primary); background: var(--el-fill-color-dark); }
.sheet-rn-ops span.danger:hover { color: #f56c6c; }

.sheet-th-inner { display: flex; align-items: center; gap: 4px; min-width: 0; }
.sheet-th-icon { color: var(--to-muted); flex-shrink: 0; }
.sheet-th-name { flex: 1; min-width: 0; }
.sheet-sort-ind { color: var(--el-color-primary); flex-shrink: 0; }
.sheet-th-more { cursor: pointer; color: var(--to-muted); display: inline-flex; padding: 3px; border-radius: 4px; outline: none; }
.sheet-th-more:hover { background: var(--el-fill-color-dark); color: var(--el-color-primary); }
.sheet-resizer { position: absolute; right: 0; top: 0; bottom: 0; width: 5px; cursor: col-resize; z-index: 5; }
.sheet-resizer:hover { background: var(--el-color-primary-light-5); }
.sheet-th-add { text-align: center !important; cursor: pointer; color: var(--to-muted) !important; }
.sheet-th-add:hover { color: var(--el-color-primary) !important; }
.sheet-empty { text-align: center; color: var(--to-muted); height: 80px !important; }
.sheet-add-row td { color: var(--to-muted); cursor: pointer; padding-left: 16px; }
.sheet-add-row td:hover { color: var(--el-color-primary); background: var(--el-fill-color-lighter); }

.sheet-cell-flex { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sheet-link-text { color: var(--el-color-primary); }
.sheet-link-open { color: var(--el-color-primary); display: inline-flex; flex-shrink: 0; }
.sheet-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--el-color-primary-light-7); color: var(--el-color-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.sheet-check { height: auto; margin-right: 0; vertical-align: middle; }
.sheet-check .el-checkbox__input { cursor: inherit; }
.sheet-editor { width: 100%; }
.sheet-editor .el-input-number, .sheet-editor .el-select, .sheet-editor .el-date-editor.el-input { width: 100%; }
.sheet-num-input .el-input__inner { text-align: right; }
.sheet-col-opt { display: inline-flex; align-items: center; gap: 6px; }
.sheet-col-opt .muted { font-size: 12px; margin-left: 4px; }
.sheet-opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sheet-opt-row .sheet-tag { width: 90px; flex-shrink: 0; text-align: center; }

/* 单选标签颜色 */
.sheet-tag { display: inline-block; padding: 0 8px; line-height: 20px; border-radius: 10px; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.sheet-tag.t0 { background: #e8f0ff; color: #2f6bff; }
.sheet-tag.t1 { background: #e3f6eb; color: #1f9d55; }
.sheet-tag.t2 { background: #fff3dc; color: #c27c00; }
.sheet-tag.t3 { background: #fdeaea; color: #e5484d; }
.sheet-tag.t4 { background: #f0eaff; color: #7c4dff; }
.sheet-tag.t5 { background: #e2f6f8; color: #0f8fa3; }
.sheet-tag.t6 { background: #fdebf5; color: #c92a7a; }
.sheet-tag.t7 { background: #eef1f5; color: #4a5a78; }
.sheet-tag.tx { background: var(--el-fill-color); color: var(--to-muted); }
html.dark .sheet-tag.t0 { background: rgba(47, 107, 255, .22); color: #8fb0ff; }
html.dark .sheet-tag.t1 { background: rgba(31, 157, 85, .22); color: #74d39b; }
html.dark .sheet-tag.t2 { background: rgba(230, 162, 60, .22); color: #f0c274; }
html.dark .sheet-tag.t3 { background: rgba(229, 72, 77, .22); color: #f59a9d; }
html.dark .sheet-tag.t4 { background: rgba(124, 77, 255, .24); color: #b8a0ff; }
html.dark .sheet-tag.t5 { background: rgba(15, 143, 163, .24); color: #6fd2e0; }
html.dark .sheet-tag.t6 { background: rgba(201, 42, 122, .24); color: #f08cbf; }
html.dark .sheet-tag.t7 { background: rgba(140, 150, 170, .2); color: #b5bfd0; }

/* 通知规则 */
.sheet-rule-tip { line-height: 1.5; margin-top: 4px; font-size: 12px; width: 100%; }
.sheet-cond { display: flex; align-items: center; gap: 8px; width: 100%; }
.sheet-cond-col { width: 180px; flex-shrink: 0; }
.sheet-cond-op { width: 130px; flex-shrink: 0; }
.sheet-ph-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sheet-ph-btns .el-button + .el-button { margin-left: 0; }

@media (max-width: 800px) {
  .sheet-search, .sheet-sort { width: 140px; }
  .sheet-cond { flex-wrap: wrap; }
}

/* ============ 告警中心 ============ */
.el-table .alert-row-firing td.el-table__cell:first-child { box-shadow: inset 3px 0 0 #f56c6c; }
.alert-cond { font-weight: 500; }
.alert-op { display: inline-block; min-width: 32px; text-align: center; font-size: 16px; font-weight: 600; color: var(--el-color-primary); }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.channel-card { border: 1px solid var(--to-border); border-radius: 10px; padding: 14px; background: var(--to-card); transition: box-shadow .2s; }
.channel-card:hover { box-shadow: 0 6px 18px rgba(31, 56, 108, .08); }
.channel-card.disabled { opacity: .6; }
.channel-head { display: flex; align-items: center; gap: 12px; }
.channel-icon { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.channel-name { font-weight: 600; font-size: 15px; }
.channel-summary { margin: 12px 0 10px; font-size: 12.5px; color: var(--el-text-color-regular); background: var(--to-code-bg); border-radius: 6px; padding: 6px 10px; }
.channel-ops { display: flex; align-items: center; gap: 4px; }
.channel-ops .spacer { flex: 1; }

/* ---------- 附件预览（文档空间与分享页共用，见 js/file-preview.js） ---------- */
.fp { display: flex; flex-direction: column; min-width: 0; }
.fp-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 0 10px; min-width: 0; flex-wrap: wrap; }
.fp-toolbar .el-button + .el-button { margin-left: 0; }
.fp-badge { display: inline-block; padding: 0 6px; line-height: 20px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .3px; flex-shrink: 0; }
.fp-info { color: var(--to-muted, #8a94a6); font-size: 13px; min-width: 0; }
.fp-grow { flex: 1; }
.fp-seg { display: inline-flex; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px; overflow: hidden; }
.fp-seg button { border: 0; background: transparent; padding: 2px 10px; font-size: 12px; cursor: pointer; color: var(--el-text-color-regular, #606266); }
.fp-seg button.on { background: var(--el-color-primary, #2f6bff); color: #fff; }
.fp-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--to-muted, #8a94a6); }
.fp-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--el-color-primary-light-8, #d5e1ff); border-top-color: var(--el-color-primary, #2f6bff); animation: fp-spin .8s linear infinite; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
.fp-card { border: 1px dashed var(--to-border, #e7eaf0); border-radius: 10px; background: var(--el-fill-color-lighter, #fafbfc); padding: 48px 16px; text-align: center; }
.fp-file-icon { display: inline-flex; }
.fp-file-icon svg path:first-child { fill: var(--to-card, #fff); }
.fp-card-title { font-size: 16px; font-weight: 600; color: var(--el-text-color-primary, #1f2d3d); word-break: break-all; }
.fp-card-sub { font-size: 13px; }
.fp-card-tip { font-size: 13.5px; color: var(--el-text-color-regular, #606266); margin-bottom: 6px; }
.fp-card-err { font-size: 13px; color: #f56c6c; max-width: 560px; word-break: break-word; }
.fp-card-ops { display: flex; gap: 8px; }
.fp-card-ops .el-button + .el-button { margin-left: 0; }
.fp-notice { font-size: 12.5px; color: #c27c00; background: #fff8e6; border: 1px solid #f5dfa8; border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; }
html.dark .fp-notice { background: #3a2f12; border-color: #6b5520; color: #e6b450; }
.fp-frame { width: 100%; min-height: 420px; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px; background: #525659; display: block; }
.fp-image { display: flex; flex-direction: column; align-items: center; gap: 6px; overflow: auto; padding: 12px; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px;
  background-color: #fff; background-image: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #f3f4f6 75%), linear-gradient(-45deg, transparent 75%, #f3f4f6 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.fp-img { max-width: 100%; cursor: zoom-in; }
.fp-img img { max-width: 100%; max-height: calc(100vh - 340px); object-fit: contain; }
.fp-hint { font-size: 12px; color: #8a94a6; }
.fp-media { display: flex; justify-content: center; background: #000; border-radius: 6px; overflow: hidden; }
.fp-media video { max-width: 100%; display: block; }
.fp-media.fp-audio { background: var(--el-fill-color-lighter, #fafbfc); border: 1px solid var(--to-border, #e7eaf0); padding: 36px 16px; }
.fp-media.fp-audio audio { width: min(640px, 100%); }
.fp-code { display: flex; overflow: auto; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px; background: var(--to-code-bg, #f7f8fa); }
.fp-code pre { margin: 0; padding: 10px 12px; font-family: Consolas, 'SFMono-Regular', Menlo, monospace; font-size: 13px; line-height: 1.6; white-space: pre; tab-size: 4;
  background: transparent; border: 0; border-radius: 0; overflow: visible; }
.fp-gutter { position: sticky; left: 0; flex-shrink: 0; text-align: right; color: #a0a8b8; user-select: none; background: var(--el-fill-color-light, #f0f2f5) !important;
  border-right: 1px solid var(--to-border, #e7eaf0) !important; min-width: 44px; z-index: 1; }
.fp-text { flex: 1; color: var(--el-text-color-primary, #1f2d3d); }
.fp-md { overflow: auto; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px; padding: 16px 24px; }
.fp-sheet { overflow: auto; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px 6px 0 0; background: var(--to-card, #fff); }
.fp-sheet-table { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.fp-sheet-table td, .fp-sheet-table th { border-right: 1px solid var(--to-border, #e7eaf0); border-bottom: 1px solid var(--to-border, #e7eaf0); padding: 4px 8px;
  white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; text-align: left; vertical-align: top; }
.fp-sheet-table td[data-t="n"] { text-align: right; }
.fp-sheet-table thead th { position: sticky; top: 0; z-index: 2; background: var(--el-fill-color-light, #f5f7fa); color: #8a94a6; font-weight: 500; text-align: center; min-width: 64px; }
.fp-sheet-table .fp-rn { position: sticky; left: 0; z-index: 1; background: var(--el-fill-color-light, #f5f7fa); color: #8a94a6; font-weight: normal; text-align: center; min-width: 44px; width: 44px; }
.fp-sheet-table thead .fp-corner { z-index: 3; }
.fp-sheet-table tbody tr:hover td { background: var(--el-fill-color-lighter, #f7f9fc); }
.fp-sheet-tabs { display: flex; gap: 2px; overflow-x: auto; border: 1px solid var(--to-border, #e7eaf0); border-top: 0; border-radius: 0 0 6px 6px; padding: 0 6px; background: var(--el-fill-color-lighter, #fafbfc); }
.fp-sheet-tabs button { border: 0; background: transparent; padding: 6px 14px; font-size: 12.5px; cursor: pointer; color: var(--el-text-color-regular, #606266); white-space: nowrap; border-bottom: 2px solid transparent; }
.fp-sheet-tabs button.on { color: #1f9d55; border-bottom-color: #1f9d55; background: var(--to-card, #fff); font-weight: 500; }
.fp-empty { padding: 32px; text-align: center; color: #8a94a6; }
.fp-box { overflow: auto; border: 1px solid var(--to-border, #e7eaf0); border-radius: 6px; }
.fp-box.fp-docx { background: #eef0f3; }
.fp-box.fp-docx .docx-wrapper { background: #eef0f3; padding: 20px 12px; }
.fp-box.fp-docx .docx-wrapper > section.docx { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); margin-bottom: 20px; }
.fp-box.fp-pptx { background: #e9ebef; padding: 12px; }
.fp-box.fp-pptx .pptx-preview-wrapper { margin: 0 auto; }
html.dark .fp-box.fp-docx, html.dark .fp-box.fp-docx .docx-wrapper, html.dark .fp-box.fp-pptx { background: #2a2b2d; }

/* ---------- 附件文档 ---------- */
.doc-file-body { padding: 14px 20px 20px; }
.doc-file-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; min-width: 0; }
.doc-file-head .doc-title { margin: 0; font-size: 22px; flex: 1; min-width: 0; }
.doc-file-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--to-muted); font-size: 13px; }
.doc-file-meta span { display: inline-flex; align-items: center; gap: 4px; }
.doc-file-icon { font-size: 30px; flex-shrink: 0; }
.doc-ver-file { display: flex; align-items: center; gap: 14px; padding: 24px; border: 1px dashed var(--to-border); border-radius: 10px; }
.doc-ver-file .el-icon { font-size: 36px; }
.doc-search-file { font-size: 12.5px; color: var(--to-muted); }
.doc-ext-tag { font-size: 10.5px; font-weight: 600; color: #fff; border-radius: 3px; padding: 0 4px; line-height: 16px; margin-left: 4px; flex-shrink: 0; }

/* ---------- 空间成员 / 访问权限 ---------- */
.doc-space-badges { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.doc-space-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--to-muted); }
.doc-space-badge.is-lock { color: #e6a23c; }
.doc-space-badge.is-ro { color: #909399; border: 1px solid var(--to-border); border-radius: 3px; padding: 0 3px; line-height: 16px; }
.doc-ro-hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #909399; background: var(--el-fill-color-light); border-radius: 6px; padding: 5px 8px; margin-bottom: 8px; }
.doc-member-owner { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--to-border); border-radius: 8px; margin-bottom: 10px; }
.doc-member-add { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.doc-member-add .el-button + .el-button { margin-left: 0; }
.doc-member-rules { font-size: 12.5px; line-height: 1.75; color: var(--el-text-color-regular); }
.doc-member-rules ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- 导入文件 ---------- */
.doc-import-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed var(--el-border-color); border-radius: 10px;
  cursor: pointer; color: var(--el-text-color-regular); transition: border-color .15s, background .15s; text-align: center; }
.doc-import-drop:hover, .doc-import-drop.is-over { border-color: var(--el-color-primary); background: var(--el-color-primary-light-9); }
.doc-import-drop > .el-icon { color: var(--el-color-primary); }
.doc-import-drop b { color: var(--el-color-primary); font-weight: 500; }
.doc-import-list { margin-top: 10px; max-height: 220px; overflow: auto; }
.doc-import-item { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; font-size: 13px; }
.doc-import-item:hover { background: var(--el-fill-color-light); }
.doc-space-members { padding: 0 2px; height: 20px; flex-shrink: 0; }
.doc-file-card .doc-children { margin-top: 16px; }

/* 窄屏时文档顶部的面包屑单行显示，超出部分省略 */
.doc-reader-bar .el-breadcrumb { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.doc-reader-bar .el-breadcrumb__item { float: none; display: inline; }
