/* 人机协同模块基础布局样式（补全 style.css 未覆盖的顶栏/导航类）
   仅定义 collab_* 页面共用的骨架类，不覆盖原 style.css 既有规则。 */
.topbar {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 18px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}
.brand {
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    margin-right: 22px;
    white-space: nowrap;
}
.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.nav-link:hover {
    background: #f1f5f9;
    color: #1f2937;
}
.nav-link.active {
    color: #2b6cb0;
    border-bottom: 2px solid #2b6cb0;
    font-weight: 600;
    background: transparent;
    border-radius: 0;
}
.spacer { flex: 1; }
.muted { color: #999; }

/* 非部门类页面的内容留白（部门页用内联 .hc-wrap 自行布局） */
.page { padding: 18px; }
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.page-head h2 { margin: 0; font-size: 18px; color: #1f2937; }

/* ===== 表单统一控件（弹窗/独立页共用） ===== */
.fld { margin-bottom: 14px; }
.fld > label { display: block; font-weight: 600; font-size: 14px; color: #374151; margin-bottom: 6px; }
.ipt,
.fld input,
.fld select,
.fld textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.ipt:focus,
.fld input:focus,
.fld select:focus,
.fld textarea:focus {
    outline: none;
    border-color: #3370ff;
    box-shadow: 0 0 0 3px rgba(51,112,255,.15);
}
select.ipt, .fld select { cursor: pointer; }
.layer-content textarea { resize: vertical; min-height: 96px; }
.field-hint { font-size: 12px; color: #9aa4b2; margin-top: 5px; line-height: 1.45; }
.layer-content .row-2 { display: flex; gap: 12px; }
.layer-content .row-2 .fld { flex: 1; }

/* ===== 按钮（原 style.css 未覆盖 .btn，导致按钮无样式） ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #f3f4f6; }
.btn.primary { background: #3370ff; border-color: #3370ff; color: #fff; }
.btn.primary:hover { background: #245bdb; }
.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.danger-link { color: #dc2626; margin-left: 10px; }
.danger-link:hover { color: #b91c1c; }

/* ===== 工作卡片：状态小图标 + 状态徽章 + 工作名按钮 ===== */
.status-dot {
    display: inline-block; flex: 0 0 auto;
    width: 10px; height: 10px; border-radius: 50%;
    vertical-align: middle;
}
.status-dot.st-pending { background: #94a3b8; }   /* 待处理（人工）灰 */
.status-dot.st-working { background: #2563eb; }   /* 工作中（数字员工处理中）蓝 */
.status-dot.st-review  { background: #f59e0b; }   /* 待审核（数字员工已处理完）橙 */
.status-dot.st-error   { background: #dc2626; }   /* 异常（数字员工处理出错）红 */
.status-dot.st-done    { background: #16a34a; }   /* 已完成 绿 */
.badge.st-pending { background: #e2e8f0; color: #475569; }
.badge.st-working { background: #dbeafe; color: #1d4ed8; }
.badge.st-review  { background: #fef3c7; color: #b45309; }
.badge.st-error   { background: #fee2e2; color: #b91c1c; }
.badge.st-done    { background: #dcfce7; color: #16a34a; }
/* 详情页错误状态徽章：与列表 .status-dot.st-error 同一错误红(#dc2626)，并加脉冲高亮 */
.state-badge.st-error {
    background: #dc2626; color: #fff; font-weight: 600;
    box-shadow: 0 0 0 3px rgba(220,38,38,.18);
    animation: stErrorPulse 1.6s ease-in-out infinite;
}
@keyframes stErrorPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
    50%      { box-shadow: 0 0 0 6px rgba(220,38,38,.30); }
}
.job-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.job-open {
    font-size: 13px; font-weight: 600; color: #1d4ed8;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px;
    padding: 3px 10px; margin-right: 8px; cursor: pointer;
}
.job-open:hover { background: #dbeafe; }

/* ===== 工作管理：按工作分组行（左 标题/code/状态，右 流程按钮） ===== */
.work-row {
    display: flex; align-items: flex-start; gap: 16px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 12px 16px; margin-bottom: 12px;
}
.work-row.err { border-color: #fca5a5; background: #fff7f7; }
.work-info { flex: 0 0 248px; min-width: 200px; }
.work-top { display: flex; align-items: center; gap: 8px; }
.work-title { font-size: 15px; font-weight: 600; color: #1f2937; }
.work-meta { margin-top: 7px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; }
.badge.code { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.work-status { font-weight: 600; }
.work-status.st-pending { color: #6b7280; }
.work-status.st-working { color: #2563eb; }
.work-status.st-review  { color: #ea580c; }
.work-status.st-error   { color: #dc2626; }
.work-status.st-done    { color: #16a34a; }
/* 工作行操作按钮（编辑 / 封存）美化 */
.work-ops { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.work-ops .btn { padding: 4px 12px; font-size: 12.5px; font-weight: 600; border-radius: 7px; line-height: 1.4; }
.work-ops .btn-edit { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.work-ops .btn-edit:hover { background: #dbeafe; border-color: #93c5fd; }
.work-ops .btn-arch { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.work-ops .btn-arch:hover { background: #eef2f7; border-color: #cbd5e1; color: #475569; }
.work-empty { font-size: 12.5px; color: #94a3b8; font-style: italic; }
.work-btns { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding-top: 2px; }

/* ===== 待显示流程：流程按钮（节点名） ===== */
.node-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff;
    padding: 8px 12px; cursor: pointer; color: #1d4ed8;
    font-size: 13px; font-weight: 600; max-width: 100%;
    transition: background .15s, border-color .15s;
}
.node-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.node-btn.err { border-color: #fca5a5; background: #fef2f2; color: #dc2626; }
.nb-name { white-space: nowrap; }
.nb-dept { font-size: 11px; font-weight: 400; color: #6b7280; background: #f3f4f6; border-radius: 4px; padding: 1px 5px; }
.node-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #64748b; margin: 0 0 12px; }
.node-legend .li { display: flex; align-items: center; gap: 5px; }
.node-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ===== 原生弹窗（替代 layer） ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.modal-panel {
    background: #fff;
    border-radius: 12px;
    width: 460px; max-width: 100%;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    overflow: hidden;
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #eef0f3;
}
.modal-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.modal-x {
    border: none; background: transparent; font-size: 22px; line-height: 1;
    color: #9aa4b2; cursor: pointer; padding: 0 4px;
}
.modal-x:hover { color: #374151; }
.modal-body { padding: 18px; overflow: auto; font-size: 14px; color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
.modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 18px; border-top: 1px solid #eef0f3;
}

/* ===== 流程关系图（查看）：点击节点高亮直接关联 ===== */
.gv-tip { font-size: 13px; color: #667; background: #f1f5f9; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.gv-info { font-size: 13px; color: #1f2937; padding: 8px 18px 4px; min-height: 20px; }
.gv-info b { color: #3370ff; }
.gv-reset { padding: 4px 12px; font-size: 13px; }
.gNode, .gEdge { transition: opacity .15s, stroke-width .15s; }
.gNode.hl rect { stroke-width: 3; filter: drop-shadow(0 0 4px rgba(51,112,255,.55)); }
.gNode.hl text { font-weight: 700; }
.gNode.dim, .gEdge.dim { opacity: .18; }
.gEdge.hl { stroke: #ea580c !important; stroke-width: 3 !important; }

/* ===== 人工审核面板：左右分栏（左=前置内容，右=生成内容可编辑） ===== */
/* 底部操作栏：左组(驳回) 与 右组(重新生成/保存/已审核) 两端对齐 */
/* !important 用于覆盖 36002(debug=False) 模板缓存中的旧内联 .rv-foot 规则，硬刷新即可生效 */
.rv-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between !important; margin-top: 18px; padding-top: 14px; border-top: 1px solid #eee; }
.rv-foot-group { display: flex; gap: 10px; flex-wrap: wrap; }
.rv-layout { display: flex; gap: 18px; align-items: stretch; min-height: 64vh; }
.rv-left, .rv-right {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column;
}
.rv-left  { max-width: 46%; }
.rv-right { max-width: 54%; }
.rv-left-head, .rv-right-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-weight: 700; font-size: 14px; color: #374151;
    margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 1px solid #eef0f3; flex: 0 0 auto;
}
.rv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; flex: 0 0 auto; }
.rv-tab {
    font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
    background: #f1f5f9; color: #475569; border: 1px solid transparent; user-select: none;
}
.rv-tab.active { background: #3370ff; color: #fff; }
.rv-tab:hover:not(.active) { background: #e2e8f0; }
.rv-pred {
    flex: 1 1 auto; overflow: auto; min-height: 0;
    border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 12px 14px; background: #f8fafc;
    font-size: 13.5px; line-height: 1.7; color: #334155;
}
.rv-right textarea {
    flex: 1 1 auto; min-height: 48vh; width: 100%;
    font-family: monospace; box-sizing: border-box;
}
.rv-preview { flex: 1 1 auto; min-height: 48vh; }
.pred-title { font-weight: 700; color: #1f2937; margin-bottom: 6px; }

/* WXML → HTML 线框预览样式（微信小程序代码在普通浏览器中的近似渲染） */
.ch-html-render .wx-root { display: block; }
.ch-html-render .wx-view, .ch-html-render .wx-scroll { display: block; padding: 6px 8px; margin: 4px 0; border: 1px dashed #cbd5e1; border-radius: 6px; background: #fff; }
.ch-html-render .wx-text { display: inline; }
.ch-html-render .wx-input, .ch-html-render .wx-textarea { display: block; width: 100%; box-sizing: border-box; padding: 5px 8px; margin: 4px 0; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; background: #fff; }
.ch-html-render .wx-textarea { min-height: 56px; }
.ch-html-render .wx-btn { display: inline-block; padding: 6px 14px; margin: 4px 0; border: 1px solid #3370ff; background: #3370ff; color: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; }
.ch-html-render .wx-img-ph { display: flex; align-items: center; justify-content: center; min-height: 64px; margin: 6px 0; padding: 8px; border: 1px dashed #94a3b8; border-radius: 8px; background: #f1f5f9; color: #64748b; font-size: 12px; text-align: center; word-break: break-all; }

/* ===== 人工审核-章节视图（JSON 数组：title/intro/html）===== */
.rv-chapters { flex: 1 1 auto; min-height: 48vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.rv-chapters:empty::after { content: '（空）'; color: #9aa4b2; font-size: 13px; }
.ch { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; background: #fff; }
.ch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ch-idx { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #3370ff; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ch-title { flex: 1 1 auto; font-weight: 700; font-size: 15px; }
.ch-intro { width: 100%; box-sizing: border-box; margin-bottom: 10px; font-size: 13.5px; line-height: 1.6; resize: vertical; }
.ch-html { border-top: 1px dashed #e5e7eb; padding-top: 8px; }
.ch-html-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ch-html-label { font-size: 12px; font-weight: 700; color: #64748b; letter-spacing: .04em; }
.ch-html-toggle { border: 1px solid #d0d7de; background: #fff; color: #3370ff; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.ch-html-toggle:hover { background: #f1f5f9; }
.ch-html-render { border: 1px solid #eef0f3; border-radius: 8px; padding: 0; background: #fcfdff; font-size: 13.5px; line-height: 1.7; overflow: auto; max-height: 46vh; }
.ch-iframe { border-radius: 8px; display: block; }
.ch-html-src { width: 100%; box-sizing: border-box; margin-top: 8px; font-size: 12.5px; line-height: 1.5; }


/* 窄屏时上下堆叠 */
@media (max-width: 860px) {
    .rv-layout { flex-direction: column; min-height: 0; }
    .rv-left, .rv-right { max-width: 100%; }
    .rv-right textarea { min-height: 220px; }
}

/* 弹窗内表单（.modal-body 与 .layer-content 通用） */
.modal-body .fld, .layer-content .fld { margin-bottom: 14px; }
.modal-body .fld > label, .layer-content .fld > label {
    display: block; font-weight: 600; font-size: 14px; color: #374151; margin-bottom: 6px;
}
.modal-body .ipt, .modal-body input, .modal-body select, .modal-body textarea,
.layer-content .ipt, .layer-content input, .layer-content select, .layer-content textarea {
    width: 100%; box-sizing: border-box; padding: 9px 11px; font-size: 14px; line-height: 1.5;
    color: #1f2937; background: #fff; border: 1px solid #d0d7de; border-radius: 8px; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.modal-body textarea, .layer-content textarea { resize: vertical; min-height: 96px; }

/* ===== 文档模板弹窗：编辑/预览切换 + 预览区 ===== */
.tpl-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid #d0d7de; border-radius: 8px; overflow: hidden; }
.seg-btn { border: none; background: #fff; padding: 6px 16px; font-size: 13px; cursor: pointer; color: #374151; }
.seg-btn + .seg-btn { border-left: 1px solid #d0d7de; }
.seg-btn.active { background: #3370ff; color: #fff; }
.seg-btn:hover:not(.active) { background: #f1f5f9; }
.tpl-preview {
    border: 1px solid #d0d7de; border-radius: 8px; padding: 14px 18px;
    min-height: 260px; max-height: 56vh; overflow: auto; background: #fff;
    font-size: 14px; line-height: 1.7; color: #1f2937;
}
.tpl-preview h1, .tpl-preview h2, .tpl-preview h3 { margin: .6em 0 .4em; }
.tpl-preview pre { background: #f6f8fa; padding: 10px 12px; border-radius: 6px; overflow: auto; }
.tpl-preview code { background: #f6f8fa; padding: 1px 4px; border-radius: 4px; }
.modal-body select, .layer-content select { cursor: pointer; }
.modal-body .ipt:focus, .modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus,
.layer-content .ipt:focus, .layer-content input:focus, .layer-content textarea:focus, .layer-content select:focus {
    outline: none; border-color: #3370ff; box-shadow: 0 0 0 3px rgba(51,112,255,.15);
}
.modal-body .field-hint, .layer-content .field-hint { font-size: 12px; color: #9aa4b2; margin-top: 5px; line-height: 1.45; }
.modal-body .row-2, .layer-content .row-2 { display: flex; gap: 12px; }
.modal-body .row-2 .fld, .layer-content .row-2 .fld { flex: 1; }

/* ===== jsonarray 卡片（AI 生成的多章节 HTML 内容） ===== */
.ja-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 12px;
}
.ja-card h4 { margin: 0 0 6px; font-size: 16px; color: #1f2937; }
.ja-intro {
    font-size: 13.5px; color: #64748b; line-height: 1.6;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}
.ja-iframe {
    border-radius: 8px;
    box-shadow: 0 0 0 1px #eef0f3;
    transition: height .15s;
}

/* ===== 只读字段（编辑工作弹窗中不可改的字段） ===== */
.layer-content .fld.ro { margin-bottom: 10px; }
.layer-content .fld.ro > label { color: #6b7280; font-weight: 500; }
.layer-content .ro-val { padding: 8px 11px; background: #f5f7fa; border: 1px solid #e5e7eb; border-radius: 8px; color: #4b5563; font-size: 13px; word-break: break-all; }
.layer-content .ro-tip { font-size: 12px; color: #9aa4b2; margin-top: 10px; line-height: 1.5; }

/* 工作标题可双击编辑 */
.work-title { cursor: pointer; }
.work-title:hover { color: #3370ff; text-decoration: underline dotted; }

/* ===== 全局加载遮罩（防止重复点击） ===== */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(255, 255, 255, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 2100;
    pointer-events: all;           /* 拦截所有点击 */
    cursor: wait;
}
.loading-spinner {
    width: 44px; height: 44px;
    border: 3px solid #e5e7eb;
    border-top-color: #2b6cb0;
    border-radius: 50%;
    animation: hc-spin .65s linear infinite;
}
@keyframes hc-spin {
    to { transform: rotate(360deg); }
}

/* ===== Toast 提示 ===== */
.hc-toast {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.hc-toast-item {
    background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px;
    font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2);
    opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s;
}
.hc-toast-item.show { opacity: 1; transform: translateY(0); }
.hc-toast-item.ok { background: #16a34a; }
.hc-toast-item.err { background: #dc2626; }

/* 实时任务完成通知（右上角，WebSocket 推送；与顶部居中的 hc-toast 区分） */
#wc-toast-wrap {
    position: fixed; top: 16px; right: 16px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; max-width: 320px;
}
.wc-toast {
    background: #fff; border-radius: 10px; padding: 12px 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,.16); border-left: 4px solid #2b6cb0;
    cursor: pointer; transform: translateX(120%); opacity: 0;
    transition: transform .28s ease, opacity .28s ease; font-size: 13px;
}
.wc-toast-show { transform: translateX(0); opacity: 1; }
.wc-toast-ok { border-left-color: #16a34a; }
.wc-toast-err { border-left-color: #dc2626; }
/* 批量汇总条：多任务同时完成时合并显示，避免刷屏 */
.wc-toast-sum { border-left-color: #2b6cb0; background: #f8fafc; }

/* WebSocket 断线角标（左下角常驻，重连成功后自动移除） */
#wc-offline-tip {
    position: fixed; left: 16px; bottom: 16px; z-index: 9998;
    background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
    border-radius: 8px; padding: 7px 12px; font-size: 12.5px;
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
    opacity: 0; transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}
#wc-offline-tip.wc-offline-show { opacity: 1; transform: translateY(0); }

/* ===== 技能管理页：是否需要工作机 ===== */
.sk-chk-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border: 1px solid #d0d7de; border-radius: 8px;
    background: #fff; cursor: pointer; font-weight: 500; color: #374151;
    transition: border-color .15s, background .15s;
}
.sk-chk-card:hover { border-color: #93c5fd; background: #f8fafc; }
.sk-chk-card input[type="checkbox"] {
    width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: #3370ff;
}

/* 工作字典(jobdict) 多选列表 */
.jd-list { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-chk {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 11px; border: 1px solid #d0d7de; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 13px; color: #374151;
    transition: border-color .15s, background .15s;
}
.jd-chk:hover { border-color: #93c5fd; background: #f8fafc; }
.jd-chk input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #3370ff; }
.jd-group {
    border: 1px solid #eef0f3; border-left: 3px solid #3370ff;
    border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: #fcfdff;
}
.jd-group-h { font-size: 13px; font-weight: 600; color: #1f2d3d; margin-bottom: 4px; }

/* AI 任务出参结构展示（result_msg_structure） */
.sk-result {
    margin: 0; padding: 12px 14px; background: #0f172a; color: #e2e8f0;
    border-radius: 8px; font-size: 12.5px; line-height: 1.6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    overflow: auto; max-height: 220px; white-space: pre; word-break: normal;
}

/* ===== 部门页：员工卡片网格 ===== */
.emp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.emp-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px; transition: box-shadow .15s, border-color .15s, transform .12s;
}
.emp-card:hover { box-shadow: 0 4px 16px rgba(31,41,55,.10); border-color: #c7d2fe; }
.emp-card-ava { flex: 0 0 auto; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.emp-card-body { flex: 1 1 auto; min-width: 0; }
.emp-card-title {
    font-size: 16px; font-weight: 700; color: #1f2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px;
}
.emp-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.emp-type, .emp-fmt {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.6;
}
.emp-fmt { background: #f1f5f9; color: #475569; }
.emp-card-prompt {
    margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: #64748b;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.emp-card-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.emp-card-actions a { color: #3370ff; font-size: 13px; cursor: pointer; text-decoration: none; }
.emp-card-actions a:hover { text-decoration: underline; }
.emp-card-actions a[data-act="del"] { color: #dc2626; }

/* ===== 泳道：数字员工头像 ===== */
.nc-emp { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; color: #475569; }
.nc-emp img.emp-ava, .nc-emp .emp-ava-fallback { border-radius: 8px; }
.nc-emp-none { color: #9aa4b2; font-style: italic; }
.nc-emp-miss { color: #dc2626; }

/* ===== 工作页：节点按钮头像 ===== */
.node-btn { display: inline-flex; align-items: center; gap: 8px; }
.nb-ava { flex: 0 0 auto; border-radius: 8px; }
.nb-ava-human {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    background: #e2e8f0; color: #475569; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ===== 审核右栏：jsonarray 目录(TOC) + 单章查看 ===== */
.rv-collapse-btn {
    border: 1px solid #d0d7de; background: #fff; color: #475569;
    border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; margin-left: auto;
}
.rv-collapse-btn:hover { background: #f1f5f9; }
.rv-layout.collapsed .rv-left { display: none; }
.rv-layout.collapsed .rv-right { max-width: 100%; }

/* 左边缘悬浮竖条把手：仅收起状态显示，点击展开前置内容 */
.rv-expand-handle { display: none; }
.rv-layout.collapsed .rv-expand-handle {
    display: flex; flex: 0 0 26px; align-self: stretch;
    align-items: flex-start; justify-content: center;
    border: 1px solid #d0d7de; border-radius: 8px; background: #f8fafc;
    color: #64748b; cursor: pointer; user-select: none; padding: 0;
    transition: background .15s, color .15s, border-color .15s;
}
.rv-layout.collapsed .rv-expand-handle:hover { background: #eef2ff; color: #1d4ed8; border-color: #b9c6e4; }
.rv-eh-inner {
    position: sticky; top: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0;
}
.rv-eh-arrow { font-size: 13px; line-height: 1; }
.rv-eh-text { writing-mode: vertical-rl; letter-spacing: .22em; font-size: 12px; font-weight: 600; }

/* 目录改为左侧竖栏：目录 | 章节内容
   overflow 必须为 visible：否则 .rv-chapters 会成为 sticky 的滚动容器，目录无法随页面吸顶 */
.rv-chapters { flex-direction: row; gap: 14px; align-items: flex-start; overflow: visible; }
.rv-toc {
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
    overflow: auto; flex: 0 0 200px; min-width: 0;
    align-self: flex-start; position: sticky; top: 0; max-height: 72vh;
}
.rv-chapter-view.rv-chapter-view { flex: 1 1 auto; min-width: 0; }

/* 收起前置后：目录 | (标题+intro) | html 三栏并排 */
.rv-layout.collapsed .rv-chapter-view { display: flex; gap: 16px; align-items: flex-start; }
.rv-layout.collapsed .rv-ch-meta { flex: 0 0 320px; min-width: 0; }
.rv-layout.collapsed .rv-ch-meta .ch-intro { min-height: 200px; }
.rv-layout.collapsed .ch-html {
    flex: 1 1 auto; min-width: 0;
    border-top: none; padding-top: 0;
    border-left: 1px dashed #e5e7eb; padding-left: 16px;
}
.rv-layout.collapsed .ch-html-render { max-height: 70vh; }
/* jsonarray-markdown（html 为空）：不强撑三栏，intro 占满剩余宽度 */
.rv-layout.collapsed .rv-chapter-view.no-html { display: block; }
.rv-layout.collapsed .rv-chapter-view.no-html .ch-html {
    border-top: 1px dashed #e5e7eb; padding-top: 8px;
    border-left: none; padding-left: 0;
}

/* 窄屏回退为上下堆叠（覆盖上方 row 规则） */
@media (max-width: 1100px) {
    .rv-chapters { flex-direction: column; align-items: stretch; }
    .rv-toc { flex: 0 0 auto; position: static; max-height: none; margin-bottom: 12px; }
    .rv-layout.collapsed .rv-chapter-view { display: block; }
    .rv-layout.collapsed .ch-html {
        border-top: 1px dashed #e5e7eb; padding-top: 8px;
        border-left: none; padding-left: 0;
    }
}
.rv-toc-head {
    padding: 8px 12px; font-size: 12px; font-weight: 700; color: #64748b;
    background: #f8fafc; border-bottom: 1px solid #e5e7eb;
}
.rv-toc-item {
    padding: 9px 12px; cursor: pointer; border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; gap: 8px; font-size: 14px; color: #334155;
}
.rv-toc-item:last-child { border-bottom: none; }
.rv-toc-item:hover { background: #f1f5ff; }
.rv-toc-item.active { background: #eef2ff; color: #1d4ed8; font-weight: 600; }
.rv-toc-idx {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
    background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.rv-toc-item.active .rv-toc-idx { background: #1d4ed8; color: #fff; }
.rv-chapter-view {
    border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; background: #fff;
    min-height: 120px;
}
.rv-chapter-view h4 { margin: 0 0 6px; font-size: 16px; color: #1f2937; }
.rv-chapter-intro { font-size: 13.5px; color: #64748b; line-height: 1.6; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #e5e7eb; }
.rv-chapter-html { min-height: 80px; }
.wc-toast-title { font-weight: 600; color: #1f2937; }
.wc-toast-sub { color: #6b7280; margin-top: 2px; font-size: 12px; word-break: break-all; }
.wc-toast-link { display: inline-block; margin-top: 6px; color: #2b6cb0; font-size: 12px; }
