:root {
  --blue: #0C447C;
  --blue-2: #185FA5;
  --blue-soft: #E6F1FB;
  --blue-sel: #C7DDF5; /* 左栏会话选中态底色：纯背景色区分 */
  --blue-sel-border: #6FB1E8; /* 选中态描边：比 --blue-2 更亮的蓝，配纯背景色形成边框 */
  --ink: #222;
  --muted: #6b7686;
  --line: #dde4ec;
  --bg: #f5f8fc;
  --amber: #E0A100;
  --green: #27AE60;
  --red: #E0533D;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(12,68,124,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
}
a { color: var(--blue-2); text-decoration: none; }
.topbar {
  height: 54px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
/* 教育版年级切换器样式已迁移至 .wb-grade-select（顶栏内下拉） */
/* 教育版年级切换下拉：顶栏内紧凑式 select（替代原独占一行的 grade-bar，避免覆盖搜索框） */
.wb-grade-select-wrap { display: flex; align-items: center; gap: 6px; }
.wb-track-label { font-size: 12px; color: var(--muted, #8a90a2); font-weight: 600; white-space: nowrap; }
.wb-track-select { font-weight: 500; }
.wb-grade-select {
  height: 32px; border: 1px solid var(--line); background-color: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 0 28px 0 10px; border-radius: 8px; cursor: pointer;
  outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238a90a2' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.wb-grade-select:hover { border-color: var(--blue); }
.wb-grade-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,108,255,.12); }
.topbar .logo { font-weight: 800; color: var(--blue); font-size: 16px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }
.topbar .who b { color: var(--ink); }
/* 顶栏左侧：头像 + 用户名 + 版本标签，对齐桌面端布局 */
.topbar .wb-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .wb-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.topbar .wb-username { font-size: 15px; font-weight: 600; color: var(--ink); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .wb-edition { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* 接待态顶栏：返回键 + 官网接待标题 + 未读计数（参照 IM 客服消息/折叠的消息 二级列表） */
.topbar .wb-top-back {
  flex: none; width: 30px; height: 30px; border: none; background: transparent;
  color: var(--blue-2); font-size: 24px; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.topbar .wb-top-back:hover { background: var(--blue-soft); }
.topbar .wb-top-title { font-weight: 800; color: var(--blue); font-size: 16px; }
.topbar .wb-top-count {
  flex: none; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 6px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
/* 顶栏「本机客户端」设备徽标（随顶栏按钮排列，不浮层重叠审批/事件） */
.device-badge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 5px 9px 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); cursor: pointer; user-select: none; white-space: nowrap;
  background: rgba(148,163,184,.14); color: #94a3b8;
}
.device-badge .db-cloud { flex: none; display: block; }
.device-badge .db-chevron { flex: none; display: block; opacity: .65; margin-left: -1px; }
.device-badge .db-text { line-height: 1; }
.device-badge.online { background: rgba(22,163,74,.12); color: #16a34a; }
.device-badge.offline { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.device-badge.offline:hover { filter: none; background: #e2e8f0; }
.device-row.offline { opacity: .6; }
.device-row.offline .db-name { color: #94a3b8; }
.db-offline { color: #94a3b8; font-size: 11px; margin-left: auto; }
.device-badge.cloud { background: #fff; color: #334155; border: 1px solid #e2e8f0; }
.device-badge.cloud:hover { filter: none; background: #f8fafc; }
.device-badge:hover { filter: brightness(.97); }
.device-popup {
  position: fixed; z-index: 9999; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 8px; min-width: 210px; font-size: 13px;
}
.device-popup-title { font-weight: 700; padding: 4px 8px 8px; color: #334155; font-size: 13px; }
.device-empty { padding: 6px 8px; color: #94a3b8; }
.device-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.device-row:hover { background: #f1f5f9; }
.device-row.selected { background: rgba(22,163,74,.1); cursor: default; }
.device-row .db-name { font-weight: 600; color: #0f172a; }
.device-row.selected .db-name { color: #16a34a; }
.device-row .db-state { color: #16a34a; font-size: 11px; margin-left: auto; }
.device-row .db-switch { color: #94a3b8; font-size: 11px; margin-left: auto; }
.btn {
  border: 1px solid var(--blue); background: var(--blue); color: #fff; padding: 8px 16px;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.btn:hover { background: var(--blue-2); }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.danger { border-color: var(--red); background: #fff; color: var(--red); }
.btn.amber { border-color: var(--amber); background: #fff; color: #9a6b00; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); }
/* OPC 漏斗升级横幅：体验包临期/过期、试用临期时提示升级标准版 */
.plan-banner {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 16px; background: linear-gradient(135deg, #fff7e6, #fff1d6);
  border-bottom: 1px solid #ffe0a3; color: #8a5a00; font-size: 13px; font-weight: 500;
}
/* 工作台页自适应高度：顶栏 + 升级横幅 + .wb 三段拼满一屏。
   .wb 原写死 calc(100vh - 54px)，横幅显示时总高溢出一屏、底部输入框被挤出视口；
   改为 flex 列布局让 .wb 自动吃剩余空间，横幅显隐/换行均自适应（仅作用工作台页，不影响 admin/登录页）。 */
body.wb-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.wb-page .topbar { flex: none; }
body.wb-page .plan-banner { flex: none; }
body.wb-page .wb { flex: 1 1 auto; min-height: 0; height: auto; }
.input, textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue-2); }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .pad { padding: 18px; }

/* 居中认证页 */
.auth-wrap { max-width: 420px; margin: 8vh auto; }
.auth-wrap .brand { text-align: center; margin-bottom: 18px; }
.auth-wrap .brand .big { font-size: 22px; font-weight: 800; color: var(--blue); }
.auth-wrap .brand .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.err { color: var(--red); font-size: 12.5px; margin-top: 8px; min-height: 16px; }

/* 管理后台布局 */
.admin-layout { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 54px); }
.admin-side { background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; }
.admin-side .navitem {
  padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 13.5px; margin-bottom: 4px;
}
.admin-side .navitem:hover { background: var(--blue-soft); color: var(--blue); }
.admin-side .navitem.active { background: var(--blue); color: #fff; font-weight: 600; }
.admin-main { padding: 22px 26px; overflow: auto; }
.admin-main h2 { margin: 0 0 4px; color: var(--blue); font-size: 18px; }
.admin-main .desc { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 220px; }
.row2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row2 > * { flex: 1; min-width: 160px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.audit-detail { margin: 0; max-width: 420px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.5; background: #f7f9fc; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.audit-detail-full { margin: 4px 0; max-height: 52vh; overflow: auto; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.demo-box { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--blue); border-radius: 10px; background: var(--blue-soft); text-align: center; }
.demo-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.demo-cred { font-size: 12.5px; color: var(--muted); }
.demo-cred b { color: var(--text); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.tag.green { background: #E7F6EE; color: var(--green); }
.tag.red { background: #FBEAE6; color: var(--red); }
.tag.amber { background: #FBF1DA; color: #9a6b00; }
.tag.gray { background: #eef1f5; color: var(--muted); }
.tag.sm { padding: 1px 6px; font-size: 11px; font-weight: 500; }
.modal-mask { position: fixed; inset: 0; background: rgba(20,40,70,.35); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius); width: min(560px, 92vw); max-height: 88vh; overflow: auto; }
.modal .pad { padding: 20px; }
.modal h3 { margin: 0 0 12px; color: var(--blue); }

/* 工作台（员工端，复杂度隐藏） */
.wb { display: grid; grid-template-columns: 240px 1fr; height: calc(100vh - 54px); overflow: hidden; }
.wb-list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.wb-list .list-pane { flex: 1; overflow: auto; padding: 12px; }
.wb-list .list-switcher {
  display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none;
}
.wb-list .list-switcher .ls-btn {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: 7px 0; font-size: 13px; font-weight: 600; cursor: pointer;
}
.wb-list .list-switcher .ls-btn:hover { border-color: var(--blue-2); color: var(--blue-2); }
.wb-list .list-switcher .ls-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
/* 左栏多屏：主屏(0) + 官网接待(1) + 同事(2) + 群(3)；进入子视图整体左滑切换（App 式滑动效果） */
.wb-screens { display: flex; width: 400%; height: 100%; flex: 1; min-height: 0; transition: transform .25s ease; transform: translateX(0); }
.wb-screen { width: 25%; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.wb-screen > .list-pane { min-height: 0; }
/* 子视图屏（官网接待/同事/群）面板占满，去掉主屏内边距叠加 */
.wb-list .wb-pane-reception,
.wb-list .wb-pane-colleagues,
.wb-list .wb-pane-groups { padding: 8px 0; }
/* 进入子视图：整体左滑露出对应屏（主屏为第 0 屏，无需切换条） */
.wb-list.in-reception .wb-screens { transform: translateX(-25%); }
.wb-list.in-colleagues .wb-screens { transform: translateX(-50%); }
.wb-list.in-groups .wb-screens { transform: translateX(-75%); }
.wb-list .nav-head { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin: 2px 2px 6px; }
.wb-list .nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 10px; cursor: pointer; margin-bottom: 6px;
  font-size: 13.5px; color: var(--ink); font-weight: 600; background: #fff; border: 1px solid var(--line);
}
.wb-list .nav-item:hover { background: var(--blue-soft); border-color: var(--blue-2); }
.wb-list .nav-item .nav-ico { font-size: 16px; }
.wb-list .nav-item .nav-txt { flex: 1; }
.wb-list .nav-item .ap-badge { position: static; transform: none; margin-left: auto; }
.wb-list .de {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; margin-bottom: 6px;
}
.wb-list .de:hover { background: var(--blue-soft); }
.wb-list .de.active { background: var(--blue-sel); box-shadow: inset 0 0 0 2px var(--blue-sel-border); }
.wb-list .de.active .nm { color: var(--blue); }
.wb-list .de .emoji {
  font-size: 20px; flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.wb-list .de .de-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.wb-list .de .de-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wb-list .de .de-name-wrap { display: flex; align-items: center; flex: 1; min-width: 0; gap: 3px; }
.wb-list .de .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.wb-list .de .de-owner { font-size: 11px; font-weight: 400; color: var(--muted); flex: none; }
.wb-list .de .role { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; min-height: 1.35em; line-height: 1.35; }
.wb-list .de .de-badge { flex: none; margin-left: 0; }
/* 左栏：数字员工 1-on-1 流式进行中——齿轮旋转动画（表达"正在生成/运转中"，避免像网络卡住） */
.wb-list .de .de-spinner {
  width: 15px; height: 15px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue); animation: de-gear-spin 1.2s linear infinite;
}
.wb-list .de .de-spinner svg { width: 15px; height: 15px; display: block; }
@keyframes de-gear-spin { to { transform: rotate(360deg); } }
/* 平台助手在列表中的特殊样式：避免名称被 badge 挤成"平..."，并把身份标放在描述行前 */
.wb-list .de.platform-assistant {
  background: #f8f9ff;
  border-left: 3px solid #3b5bdb;
}
.wb-list .de.platform-assistant:hover { background: #eef2ff; }
.wb-list .de.platform-assistant.active { background: var(--blue-sel); box-shadow: inset 0 0 0 2px var(--blue-sel-border); }
.wb-list .de.platform-assistant .pa-badge {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  margin-right: 6px; padding: 1px 6px; border-radius: 10px;
  background: #eef2ff; color: #3b5bdb; border: 1px solid #d0d8ff;
  font-size: 11px; font-weight: 600;
}
.wb-list .de.platform-assistant .pa-badge::before { content: '🛠️'; }
.wb-chat { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.wb-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 26px; }
.msg { max-width: 76%; padding: 10px 13px; border-radius: 14px; margin-bottom: 12px; font-size: 13.5px; white-space: pre-wrap; }
.msg.user { margin-left: auto; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.assistant.streaming::after { content: '▋'; display: inline-block; margin-left: 1px; color: var(--blue); animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* 流式进行中「停止生成」按钮 + 已停止标注 */
.msg.assistant.streaming { position: relative; }
.stream-stop {
  position: absolute; top: 6px; right: 8px;
  width: 22px; height: 22px; line-height: 1; padding: 0;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--blue); cursor: pointer; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stream-stop:hover { background: #f3f6fb; }
.stream-stop:disabled { opacity: .5; cursor: default; }
.cancelled-note {
  margin-top: 8px; font-size: 12px; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 6px;
}
.partial-note {
  margin-top: 8px; font-size: 12px; color: #8a5a00;
  border-top: 1px dashed #e8c97a; padding-top: 6px;
}
.msg.peer { background: #eef2f7; border: 1px solid #dde4ec; border-bottom-left-radius: 4px; color: #344; }
.msg.system { max-width: 100%; background: #FBF1DA; border: 1px solid #E8C97A; color: #7a5a00; font-size: 12.5px; border-radius: 10px; }
.msg.card-approval { background: #FFF7E8; border: 1px solid var(--amber); border-radius: 12px; max-width: 80%; }
.msg.card-approval .title { font-weight: 700; color: #7a5a00; margin-bottom: 6px; }
.msg.card-approval .kv { font-size: 12.5px; color: #5b4a2a; margin: 2px 0; }
.msg.card-status { background: #E7F6EE; border: 1px solid #B9E3CC; border-radius: 12px; max-width: 80%; color: #1d6b43; }

/* Markdown 渲染内容（数字员工 / 同事气泡内） */
.msg.md { white-space: normal; word-break: break-word; }
.msg.md > :first-child { margin-top: 0; }
.msg.md > :last-child { margin-bottom: 0; }
.msg.md h1, .msg.md h2, .msg.md h3, .msg.md h4, .msg.md h5, .msg.md h6 { margin: 10px 0 6px; line-height: 1.3; color: var(--ink); }
.msg.md h1 { font-size: 17px; }
.msg.md h2 { font-size: 15.5px; }
.msg.md h3 { font-size: 14.5px; }
.msg.md h4, .msg.md h5, .msg.md h6 { font-size: 13.5px; }
.msg.md p { margin: 6px 0; }
.msg.md ul, .msg.md ol { margin: 6px 0; padding-left: 22px; }
.msg.md li { margin: 3px 0; }
.msg.md a { color: var(--blue-2); text-decoration: underline; }
.msg.md code { background: #f0f3f8; border-radius: 4px; padding: 1px 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: #c0392b; }
.msg.md pre { background: #f5f7fa; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 8px 0; }
.msg.md pre code { background: none; padding: 0; color: #2c3e50; white-space: pre; }
.msg.md .md-table, .msg.report .md-table { border-collapse: collapse; margin: 8px 0; font-size: 12.5px; }
.msg.md .md-table th, .msg.report .md-table th, .msg.md .md-table td, .msg.report .md-table td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.msg.md .md-table th, .msg.report .md-table th { background: var(--blue-soft); color: var(--blue); font-weight: 600; white-space: nowrap; }
.msg.md .peer-name { color: var(--blue); font-weight: 600; }
.msg.user .peer-name { color: #fff; }
/* AI 生成内容弱标识（拟人化互动服务合规：可识别、不打扰） */
.ai-tag { display: inline-block; margin: 0 4px; padding: 0 5px; border-radius: 6px; font-size: 10px; line-height: 15px; vertical-align: 1.5px; background: rgba(103, 80, 222, .10); color: #6750de; font-weight: 600; letter-spacing: .5px; }
.msg.user .ai-tag { background: rgba(255,255,255,.25); color: #fff; }
.wb-input { position: relative; border-top: 1px solid var(--line); background: #fff; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.wb-input-row { display: flex; gap: 10px; align-items: flex-end; flex: none; }
.wb-input textarea { resize: none; height: 44px; flex: 1 1 auto; min-width: 0; border-radius: 22px; }
.wb-input textarea:focus { border-color: var(--blue); }
/* 发送 / 停止 按钮：对齐 App 端——发送为靛蓝药丸，停止为同底色的圆形按钮 + 白色方块图标 */
#sendBtn, #stopBtn {
  flex: none; height: 44px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
#sendBtn {
  min-width: 64px; padding: 0 18px; border-radius: 22px;
  background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 600;
}
#sendBtn:hover { background: var(--blue-2); }
#stopBtn {
  width: 44px; min-width: 44px; padding: 0; border-radius: 50%;
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(63,81,181,0.35);
}
#stopBtn:hover { background: var(--blue-2); }
#stopBtn svg { display: block; }
.chips { display: flex; gap: 8px; padding: 8px 18px 0; flex-wrap: wrap; flex: none; }
.chip { background: var(--blue-soft); color: var(--blue); border-radius: 20px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.chip:hover { background: #d6e8fa; }
.chip.on { background: var(--blue); color: #fff; }
.chipbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.empty { color: var(--muted); text-align: center; margin-top: 18vh; }
.history-loading { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 0; }

/* 附件按钮提醒动画 */
@keyframes pulse-attach {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.pulse { animation: pulse-attach 1.2s ease-out; }

/* 行业模板卡片 */
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tpl-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(24,95,165,.12); }
.tpl-industry { display: inline-block; font-size: 11px; color: var(--blue); background: var(--blue-soft); padding: 1px 8px; border-radius: 20px; margin-bottom: 6px; }
.tpl-name { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.tpl-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.tpl-card .btn { pointer-events: auto; }

/* ============ 工作流编排器（拖拽画布） ============ */
.wf-editor { display: flex; flex-direction: column; height: calc(100vh - 54px); }
.wf-topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.wf-topbar .ttl { font-weight: 800; color: var(--blue); font-size: 15px; }
.wf-topbar input, .wf-topbar select { width: auto; min-width: 120px; }
.wf-topbar input#wf_name { width: 200px; font-weight: 600; }
.wf-topbar .spacer { flex: 1; }
.wf-body { flex: 1; display: grid; grid-template-columns: 200px 1fr 280px; min-height: 0; }
.wf-palette { background: #fff; border-right: 1px solid var(--line); padding: 14px 12px; overflow: auto; }
.wf-palette .ph { font-size: 12px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.pal-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: #fafcff; cursor: pointer; margin-bottom: 8px; font-size: 13px;
}
.pal-item:hover { border-color: var(--blue-2); background: var(--blue-soft); }
.pal-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wf-canvas-wrap { position: relative; overflow: auto; background:
  linear-gradient(rgba(12,68,124,.045) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(12,68,124,.045) 1px, transparent 1px) 0 0 / 22px 22px,
  #fbfdff; }
.wf-canvas { position: relative; width: 2200px; height: 1500px; }
.wf-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.wf-edges path.hit { stroke: transparent; stroke-width: 14px; pointer-events: stroke; cursor: pointer; }
.wf-edges path.line { fill: none; stroke: #9fb4c9; stroke-width: 2px; }
.wf-edges path.temp { fill: none; stroke: var(--blue-2); stroke-width: 2px; stroke-dasharray: 5 4; }
.wf-edges path.branch-edge { stroke: #8E44AD; stroke-width: 2.4px; }
.wf-edges text.edge-label {
  fill: #8E44AD; font-size: 11px; font-weight: 700; pointer-events: none;
  paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round;
}
/* 条件分支出边选择浮层 */
.branch-chooser { position: fixed; inset: 0; background: rgba(20,32,48,.32); display: flex; align-items: center; justify-content: center; z-index: 999; }
.branch-chooser .bc-box { background: #fff; border-radius: 14px; padding: 20px 22px; width: 320px; box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.branch-chooser .bc-title { font-weight: 700; margin: 0 0 14px; color: var(--ink); }
.branch-chooser .bc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.branch-chooser .bc-btns .btn { flex: 1 1 auto; }
.wf-node {
  position: absolute; width: 196px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow); z-index: 2; user-select: none; cursor: grab; font-size: 12.5px;
}
.wf-node.selected { border-color: var(--blue-2); box-shadow: 0 0 0 3px var(--blue-soft); }
.wf-node .nh { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; font-weight: 700; }
.wf-node .nh .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.wf-node .nb { padding: 7px 10px; color: var(--muted); font-size: 11.5px; line-height: 1.5; min-height: 20px; word-break: break-word; }
.wf-node .port {
  position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #fff;
  border: 2px solid #9fb4c9; top: 50%; transform: translateY(-50%); cursor: crosshair; z-index: 3;
}
.wf-node .port.in { left: -7px; }
.wf-node .port.out { right: -7px; }
.wf-node .port:hover { border-color: var(--blue-2); background: var(--blue-soft); }
.wf-props { background: #fff; border-left: 1px solid var(--line); padding: 16px 14px; overflow: auto; }
.wf-props .ph { font-size: 12px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.wf-props .ptype { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; margin-bottom: 12px; }
.wf-props .empty-hint { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.wf-props textarea { min-height: 70px; }
.wf-props .del { margin-top: 16px; }
.wf-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 22px; font-size: 13px; opacity: 0;
  transition: opacity .25s; z-index: 80; pointer-events: none;
}
.wf-toast.show { opacity: .94; }

/* 审批：单人 / 双人会签徽标 */
.ap-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; vertical-align: middle; }
.ap-badge.dual { background: #FBEEE3; color: #C8741A; border: 1px solid #F0C89A; }
.ap-badge.single { background: #EAF1F8; color: #2C6CB0; border: 1px solid #BBD3EC; }

/* 群聊 @ 成员选择器 */
.group-mention-pop {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 100%;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 -4px 16px rgba(12,68,124,.12);
  max-height: 220px;
  overflow: auto;
  z-index: 30;
  display: none;
}
.group-mention-pop.show { display: block; }
.group-mention-pop .gmi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; }
.group-mention-pop .gmi:hover { background: var(--blue-soft); }
.group-mention-pop .gmi.active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.group-mention-pop .gmi .emoji {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none;
}
.group-mention-pop .gmi .main { flex: 1; min-width: 0; }
.group-mention-pop .gmi .nm { font-weight: 600; font-size: 13px; }
.group-mention-pop .gmi .kind { font-size: 11px; color: var(--muted); }
.group-mention-pop .empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* 同事面板：会话列表 + 搜索 */
.dm-search { padding-bottom: 8px; }
.dm-search .input { padding: 7px 10px; font-size: 13px; }

/* 搜索框清空按钮：输入非空时右侧显示 ×（桌面/手机/网页三端统一） */
.search-wrap { position: relative; display: block; }
.search-wrap .input { padding-right: 30px; }
.search-clear {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 20px; height: 20px; line-height: 18px; text-align: center;
  margin: 0; padding: 0; border: none; background: transparent; cursor: pointer;
  color: #9aa7b8; font-size: 18px; border-radius: 50%; display: none;
}
.search-clear:hover { color: #5b6675; background: rgba(0,0,0,.06); }
.search-wrap .input:not(:placeholder-shown) ~ .search-clear { display: block; }
/* 情报页搜索框：wrapper 作为 flex item 推到最右 */
.intel-tabs .search-wrap { margin-left: auto; }
/* 同事/群 列表面板共用 peer 卡片样式 */
.wb-list .peer {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; margin-bottom: 6px;
}
.wb-list .peer:hover { background: var(--blue-soft); }
.wb-list .peer.active { background: var(--blue-sel); box-shadow: inset 0 0 0 2px var(--blue-sel-border); }
.wb-list .peer.active .pnm { color: var(--blue); }
.wb-list .peer .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none;
}
.wb-list .peer .pmain { flex: 1; min-width: 0; }
.wb-list .peer .pnm { font-weight: 600; font-size: 13.5px; }
.wb-list .peer .plast { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-list .peer .pbadge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.wb-list .peer .ptime { color: var(--muted); font-size: 10.5px; flex: none; }

/* 平台运营控制台 */
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tenant-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.tenant-card .tc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tenant-card .tc-meta { margin: 8px 0; line-height: 1.7; }
.tenant-card .tc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 平台控制台表单/弹窗 */
.modal .form-section { margin-bottom: 18px; }
.modal .form-section-title {
  font-size: 12.5px; font-weight: 700; color: var(--blue);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.modal .form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.modal .form-row.two-col > .form-group { flex: 1 1 calc(50% - 7px); min-width: 180px; }
.modal .form-group { flex: 1 1 100%; }
.modal .form-group label { margin-top: 0; font-size: 12.5px; }
.modal .form-group label .required { color: var(--red); }
.modal .form-group .input { margin-top: 4px; }
.modal .form-group select.input { padding-right: 30px; }
.modal h3 { margin: 0 0 18px; color: var(--blue); }

/* 操作列下拉菜单 */
.dropdown-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  padding: 6px 0;
  overflow: hidden;
}
.dropdown-menu .btn {
  width: 100%;
  border-radius: 0;
  border: none;
  padding: 8px 14px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.dropdown-menu .btn:hover { background: var(--bg); }
.dropdown-menu .btn.danger { color: var(--red); }

/* 聊天里的文件下载卡片 */
.file-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; min-width: 180px; max-width: 260px;
}
.file-card:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgba(31,78,121,.12); }
.fc-ico { font-size: 22px; line-height: 1; }
.file-card .att-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.fc-meta { display: flex; flex-direction: column; overflow: hidden; }
.fc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-size { font-size: 12px; color: var(--muted); }

/* 语音气泡：与 App 端 VoiceBubble 对齐（播放按钮 + 波形 + 时长 + 转文字） */
.voice-bubble {
  display: inline-flex; flex-direction: column;
  max-width: 62%; min-width: 180px;
  padding: 10px 12px; margin: 4px 0 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.msg.user .voice-bubble { background: var(--blue); color: #fff; }
.vb-row { display: flex; align-items: center; gap: 8px; }
.vb-play {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: #E8EEF7; color: var(--blue); font-size: 13px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.msg.user .vb-play { background: rgba(255,255,255,.2); color: #fff; }
.vb-play:disabled { opacity: .6; cursor: default; }
.vb-wave {
  flex: 1; display: flex; align-items: center; gap: 2px;
  height: 30px; min-width: 80px;
}
.vb-bar {
  flex: 1; min-width: 3px; border-radius: 2px;
  background: #D0D8E2; transition: background .2s;
}
.msg.user .vb-bar { background: rgba(255,255,255,.4); }
.vb-bar.played { background: var(--blue); }
.msg.user .vb-bar.played { background: #fff; }
.vb-dur {
  flex: none; font-size: 13px; color: #8a96a8;
  font-variant-numeric: tabular-nums;
}
.msg.user .vb-dur { color: rgba(255,255,255,.75); }
.vb-audio { display: none; }

.dropdown-menu .btn.danger:hover { background: #FBEAE6; }
.more-wrap { position: relative; }
.dropdown-divider { height: 1px; background: var(--line); margin: 6px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-actions .btn { min-width: 88px; justify-content: center; }

/* 学情看板（education 版） */
.lp-hero { border:1px solid #eef0f5; border-radius:12px; padding:14px 16px; background:linear-gradient(180deg,#f7f9ff,#fff); margin-bottom:4px; }
.lp-hero-pct { font-size:34px; font-weight:700; line-height:1.1; margin:2px 0; }
.lp-rec, .lp-review { border:1px solid #eef0f5; border-radius:10px; padding:10px 12px; background:#fafbfc; }
.lp-rec-tag { display:inline-block; font-size:11px; color:#fff; background:#183e8f; border-radius:6px; padding:1px 6px; margin-left:6px; vertical-align:middle; }
.lp-opt { display:block; margin:4px 0; font-size:13px; }
.form-err { color: var(--red); font-size: 12.5px; margin-top: 10px; }
.form-group { margin-top: 12px; }
.form-group > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.form-group .required { color: var(--red); }

/* 审批分页标签 */
.ap-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.ap-tab {
  padding: 6px 14px; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; cursor: pointer; font-size: 13px; transition: all .15s;
}
.ap-tab:hover { border-color: var(--blue); color: var(--blue); }
.ap-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 统一收件箱 / Feed */
.inbox-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative; transition: background .12s;
}
.inbox-item:hover { background: var(--blue-soft); }
/* 无站内落点的事件（AI 主动汇报/提醒等）：整条不可点击，去掉手型与 hover 高亮 */
.inbox-item.static { cursor: default; }
.inbox-item.static:hover { background: none; }
.inbox-item.static.unread:hover { background: #FBFCFE; }
.inbox-item.unread { background: #FBFCFE; }
.inbox-item.blk { border-left: 3px solid var(--amber); }
.inbox-item.blk .ii-title { color: #B3541E; }
.inbox-item.blk.unread .ii-title { color: #B3541E; }
.inbox-item.overdue { border-left: 4px solid var(--red); background: #FFF5F5; }
.inbox-item.overdue .ii-title { color: #C0392B; font-weight: 700; }
.inbox-item.overdue.unread { background: #FFF0F0; }
.inbox-item .dot { position: absolute; left: 2px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.inbox-item .ii-ico { font-size: 18px; line-height: 1.4; }
.inbox-item .ii-main { flex: 1; min-width: 0; }
.inbox-item .ii-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.inbox-item.unread .ii-title { color: var(--blue); }
.inbox-item .ii-body { font-size: 12.5px; color: var(--muted); margin: 2px 0; line-height: 1.5; }
.inbox-item .ii-time { font-size: 11.5px; color: #9aa4b2; }
.inbox-item.alert { border-left: 4px solid #8E44AD; background: #F7F0FB; }
.inbox-item.alert .ii-title { color: #6C3483; font-weight: 700; }
.inbox-item.alert.unread { background: #F3E8FA; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inbox-head h3 { margin: 0; font-size: 16px; }
.inbox-tabs { display: inline-flex; gap: 6px; background: #f1f4f9; border-radius: 9px; padding: 3px; }
.inbox-tabs .itab { border: 0; background: transparent; color: var(--muted); font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.inbox-tabs .itab.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(20,40,80,.12); }
.inbox-list { margin-top: 12px; max-height: 56vh; overflow: auto; }

/* 用量 / Token 进度条 */
.usage-bar { height: 6px; border-radius: 4px; background: #ECEFF3; overflow: hidden; }
.usage-bar.sm { width: 100%; max-width: 160px; }
.usage-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.usage-pct { font-size: 11px; margin-top: 2px; font-weight: 600; }

/* 工作项评论线程 */
.reject-reason { background: #FBEAE6; border: 1px solid #F0C89A; color: #9a3b22; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 8px 0; }
.return-reason { background: #FFF3E6; border: 1px solid #F0C89A; color: #9a5a00; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 8px 0; }
.attach-list { margin: 8px 0; }
.attach-list .file-card { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; margin: 4px 6px 0 0; text-decoration: none; color: var(--ink); background: #fff; }
.attach-list .file-card:hover { background: var(--blue-soft); }
.attach-list .fc-ico { font-size: 16px; }
.attach-list .fc-meta { display: flex; flex-direction: column; line-height: 1.3; }
.attach-list .fc-name { font-size: 12.5px; font-weight: 600; }
.attach-list .fc-size { font-size: 11px; color: var(--muted); }
/* 聊天框本地附件 */
.btn.icon { padding: 8px 11px; font-size: 15px; }
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--blue); border-radius: 20px; padding: 3px 10px; font-size: 12px; }
.att-chip .att-x { border: none; background: transparent; color: var(--blue); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.att-chip .att-x:hover { color: var(--red); }
.att-chip .att-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; vertical-align: middle; }
/* 智能归档：发送框开关 + 气泡徽标 */
.kb-archive-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted, #888); cursor: pointer; user-select: none; padding: 2px 0; }
.kb-archive-toggle input { width: 14px; height: 14px; accent-color: var(--blue, #2b6cff); cursor: pointer; }
.kb-archive-toggle input:disabled { cursor: not-allowed; }
.kb-badge { display: inline-block; margin-top: 4px; font-size: 11px; color: #1a7f37; background: #e8f6ee; border: 1px solid #b7e3c6; border-radius: 12px; padding: 1px 8px; }
.kb-badge.green { color: #1a7f37; background: #e8f6ee; border-color: #b7e3c6; }
.kb-badge.amber { color: #9a6b00; background: #FBF1DA; border-color: #E8C97A; }
.kb-badge.red { color: #b42318; background: #FBEAE6; border-color: #f0c4ba; }
/* 图片附件 hover 放大预览浮层 */
.img-preview { position: fixed; display: none; z-index: 9999; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); max-width: 360px; }
.img-preview img { display: block; max-width: 340px; max-height: 340px; border-radius: 4px; }
.file-card.img-att { cursor: zoom-in; }
.cmt-list { max-height: 280px; overflow: auto; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.cmt { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.cmt-head { display: flex; justify-content: space-between; align-items: baseline; }
.cmt-head b { font-size: 13px; }
.cmt-time { font-size: 11.5px; color: #9aa4b2; }
.cmt-body { font-size: 13px; color: var(--ink); margin-top: 3px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.th-foot { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; position: relative; }
.claim-box { background: #FFFBEF; border: 1px solid #E8C97A; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.claim-box b { color: #7a5a00; font-size: 13.5px; }
/* @提及 自动补全班 */
.mention-pop {
  position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20,40,80,.14); max-height: 220px; overflow: auto; z-index: 30;
}
.mention-pop .mp-item { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; cursor: pointer; }
.mention-pop .mp-item:hover, .mention-pop .mp-item.active { background: #EEF4FF; }
.mention-pop .mp-item b { font-size: 13px; color: var(--ink); }
.mention-pop .mp-sub { font-size: 11.5px; color: var(--muted); }
.cmt-mention { font-size: 11px; color: #6C3483; background: #F3E8FA; border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.cmt-body .mention { color: var(--blue); font-weight: 600; }

/* 数字员工卡片「主动」徽标 */
.de-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; line-height: 1.6;
  border-radius: 999px; background: #E7F0FF; color: var(--blue); border: 1px solid #C9DDFC;
  vertical-align: middle; font-weight: 600;
}
/* 表单分区（主动模式 / 目标） */
.form-section { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; background: #FBFCFE; }
.goal-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.goal-row:last-child { border-bottom: none; }
.goal-done { color: var(--muted); text-decoration: line-through; }
#goalList { margin: 4px 0; }

/* 委派协作回显（对话控制台） */
.collab-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.collab-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.5;
  padding: 2px 9px; border-radius: 999px; background: #EAF3FF; color: #1F6FEB;
  border: 1px solid #C9DDFC; font-weight: 600;
}
.collab-chip.amber { background: #FBF1DA; color: #7a5a00; border-color: #E8C97A; }
.collab-body { }
.collab-sub {
  margin-top: 8px; border-left: 3px solid #C9DDFC; background: #F7FAFF;
  border-radius: 0 10px 10px 0; padding: 8px 10px;
}
.collab-sub-head { font-size: 12px; color: #1F6FEB; font-weight: 700; margin-bottom: 4px; }
.collab-sub-body { font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.collab-sub-body p { margin: 4px 0; }

/* ===== 会话列表最后时间 + 对话页日期分隔/消息时间（IM 风） ===== */
.wb-list .peer .ptime,
.wb-list .de .ptime {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.wb-list .peer .ptime { align-self: flex-start; margin-left: 8px; padding-top: 2px; }
.day-divider { display: flex; justify-content: center; margin: 16px 0 10px; }
.day-pill {
  background: rgba(0,0,0,.06);
  color: #9aa0a6;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
}
.msg-time {
  width: 76%;
  font-size: 11px;
  color: #aab;
  margin-bottom: 12px;
}
.msg-time.user { margin-left: auto; text-align: right; }
.msg-time.assistant,
.msg-time.peer { text-align: left; }

/* 数字员工主动汇报卡片（区别于普通对话气泡：左色条 + 标签，可折叠） */
.msg.report { display: flex; gap: 8px; margin: 10px 0; align-items: stretch; }
.msg.report .report-bar { width: 4px; border-radius: 4px; background: var(--blue-2); flex: 0 0 auto; }
.msg.report .report-body { background: var(--blue-soft); border: 1px solid #cfe1f4; border-radius: 10px; padding: 8px 12px; max-width: 78%; }
.msg.report .report-head { font-size: 12px; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
.msg.report .report-text { font-size: 14px; color: var(--ink); line-height: 1.55; word-break: break-word; }
.msg.report .report-text p { margin: 0 0 6px; }
.msg.report .report-text ul, .msg.report .report-text ol { margin: 4px 0 6px; padding-left: 22px; }
.msg.report .report-text li { margin: 3px 0; }
.msg.report .report-text h1, .msg.report .report-text h2, .msg.report .report-text h3,
.msg.report .report-text h4, .msg.report .report-text h5, .msg.report .report-text h6 { font-size: 14px; margin: 8px 0 4px; }
.msg.report .report-text code { background: #e9eff7; border-radius: 4px; padding: 1px 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: #c0392b; }
.msg.report .report-text pre { background: #f5f7fa; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 8px 0; }
.msg.report .report-text pre code { background: none; padding: 0; color: #2c3e50; white-space: pre; }
.msg.report .report-text a { color: var(--blue-2); text-decoration: underline; }
.report-fold { font-size: 12px; color: var(--muted); background: #eef3f8; border: 1px dashed var(--line); border-radius: 8px; padding: 5px 10px; margin: 8px 0; cursor: pointer; user-select: none; }
.report-fold:hover { background: #e6eef6; }
.report-fold .rf-toggle { display: inline-block; margin-right: 4px; color: var(--blue-2); font-weight: 700; }

/* ===================== 工作台 › 官网接待（二级会话） ===================== */
/* 数字员工列表顶部常驻「工作台」入口卡片（与数字员工卡片同款，仅多一个未读红点） */
.wb-list .de.workbench-entry { border: 1px solid #cfe1f4; background: #F5F9FF; }
.wb-list .de.workbench-entry:hover { background: #EAF2FF; }
.wb-list .de.workbench-entry.active { background: var(--blue-sel); box-shadow: inset 0 0 0 2px var(--blue-sel-border); }
/* 未读红点（替代事件箱角标，避免冲淡真实事件） */
.wb-unread-dot {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18);
  align-self: center;
}
.wb-unread-dot.has-count { width: auto; min-width: 16px; height: 16px; border-radius: 999px; padding: 0 5px;
  color: #fff; font-size: 11px; line-height: 16px; text-align: center; box-shadow: none;
  font-weight: 700; display: inline-block; }
/* 二级导航面板（工作台 › 二级列表 / 官网接待 › 接待队列） */
.wb-nav-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2;
}
.wb-nav-back { cursor: pointer; color: var(--blue-2); font-size: 14px; font-weight: 600; flex: none; }
.wb-nav-back:hover { color: var(--blue); }
.wb-nav-title { font-weight: 600; font-size: 14px; color: var(--ink); flex: 1; }
.wb-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  cursor: pointer; margin: 6px 8px; background: #fff; border: 1px solid var(--line);
}
.wb-nav-item:hover { background: var(--blue-soft); border-color: var(--blue-2); }
.wb-nav-item.active { background: var(--blue-sel); box-shadow: inset 0 0 0 2px var(--blue-sel-border); border-color: var(--blue-sel-border); }
.wb-nav-item .nav-ico { font-size: 18px; flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: #EEF4FF; color: #1F6FEB; display: flex; align-items: center; justify-content: center; }
.wb-nav-item .nav-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wb-nav-item .nav-name { font-weight: 600; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.wb-nav-item .nav-name .nav-sub { flex: none; }
.wb-nav-item .nav-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-nav-item .nav-time { font-size: 11px; color: var(--muted); flex: none; }
.wb-nav-item .nav-unread { flex: none; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 5px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.wb-nav-placeholder { margin: 6px 8px; padding: 11px 12px; border-radius: 10px; background: #FAFBFC;
  border: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; }
/* 顶栏「当前对话名」：与右侧「审批」同一行，顶部居左，不再单独占一行 */
.topbar .wb-top-conv {
  flex: 0 1 auto; min-width: 0; max-width: 320px;
  padding-left: 13px; border-left: 1px solid var(--line);
  font-weight: 700; font-size: 15px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .wb-top-conv .wb-ch-sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
/* 「标记解决」随对话名一起落在顶栏（仅接待会话显示），避免在会话区再占一行 */
.topbar .wb-top-resolve { flex: none; }
/* 接待消息：访客（左）/ 人工（右）对齐沿用 .msg.assistant / .msg.user，加署名小标 */
.msg .msg-signer { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.msg.user .msg-signer { text-align: right; color: #cfe1f4; }

/* ===== 数字员工列表卡片：定时任务按钮 ===== */
.de { position: relative; }
.de-sched-btn {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; line-height: 1; padding: 0;
  border: none; border-radius: 8px; cursor: pointer;
  background: rgba(59,79,216,0.08); color: #3b4fd8; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.de-sched-btn:hover { background: rgba(59,79,216,0.18); }

/* ===== 定时任务弹窗 ===== */
.sched-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sched-list { display: flex; flex-direction: column; gap: 10px; }
.sched-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fafbff; }
.sched-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sched-title { font-weight: 600; color: var(--ink); font-size: 14px; }
.sched-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sched-meta.hint { color: #9aa3b2; }
.sched-prompt { font-size: 13px; color: #45506a; margin-top: 6px; white-space: pre-wrap; word-break: break-word;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-height: 120px; overflow: auto; }
.sched-actions { display: flex; gap: 8px; margin-top: 10px; }
.sched-form { display: flex; flex-direction: column; gap: 12px; }
.sched-form .form-group { flex: 1; min-width: 0; }

/* 会话「回到最新消息」浮动按钮：向上翻历史时浮现，点击回到底部（对齐手机 App） */
#wbBackToBottom {
  position: fixed; right: 18px; bottom: 84px; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  background: #fff; color: #334155; border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(31, 52, 98, .18);
  transition: background .15s, transform .15s;
}
#wbBackToBottom:hover { background: #f8fafc; transform: translateY(-1px); }
#wbBackToBottom svg { width: 22px; height: 22px; }

/* ===== 数字员工任务流看板（P0） ===== */
/* 弹窗改 flex 纵向布局：顶部工具条 + 中间看板（每列独立滚动）+ 底部关闭栏，对齐 Mac 端 TaskBoardDialog */
.task-modal { display: flex; flex-direction: column; overflow: hidden; }
.task-modal .pad { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 16px 20px; }
.task-board-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.task-board-head { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.task-board-head .tb-title { display: flex; align-items: center; gap: 8px; }
.task-board-head .count-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 10px; background: #eaf1ff; color: #2f6df6; font-size: 12px; font-weight: 600; }
.task-board-head .tb-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-board-head .input.sm { height: 36px; max-width: 220px; background: #f5f6fa; border: none; border-radius: 10px; }

/* 看板：固定高度四列并排，每列内部独立纵向滚动（对齐 Mac 端 ListView.builder 独立滚动态） */
.task-board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; overflow: hidden; }
@media (max-width: 860px) { .task-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 列（对齐桌面 .Expanded + Container bg #f5f6fa radius12） */
.task-col { background: #f5f6fa; border-radius: 12px; padding: 0; display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.task-col-head { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 10px 12px 8px; }
.task-col-count { color: #7a8aa0; font-size: 12px; font-weight: 600; }
.task-col-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0; padding: 0 8px 8px; }
.task-col-body .empty { color: #9aa7b8; font-size: 12px; text-align: center; padding: 14px 6px; }

/* 底部关闭栏（对齐 Mac 端 AlertDialog.actions 置于底部） */
.task-board-foot { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

/* 窄屏（≤520px）退化为整页滚动：看板不再固定高度，单列纵向排布、由弹窗统一滚动 */
@media (max-width: 520px) {
  .task-modal { overflow: auto; }
  .task-board { display: grid; grid-template-columns: 1fr; height: auto; min-height: 0; overflow: visible; }
  .task-col { max-height: none; }
  .task-col-body { overflow: visible; }
}

/* 状态标签（精确对齐桌面 _statusColors） */
.task-status { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1.4; }
.task-status.s-running           { color: #2f6df6; background: #eaf1ff; }
.task-status.s-waiting_approval  { color: #9a6700; background: #fff3c4; }
.task-status.s-done              { color: #1c7c4d; background: #e2f5ea; }
.task-status.s-failed            { color: #c02626; background: #fdeaea; }
.task-status.s-cancelled         { color: #5b6b7b; background: #eef1f5; }

/* 优先级 chip（对齐桌面 _priorityChip：bg #f0f3f7 radius8，高=红/低=灰/普通=灰蓝） */
.task-prio { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 8px; background: #f0f3f7; font-size: 11px; font-weight: 600; }
.task-prio.p-high   { color: #c02626; }
.task-prio.p-low    { color: #7a8aa0; }
.task-prio.p-normal { color: #5b6b7b; }

/* 卡片（对齐桌面 _cardTile：白底 + #eef1f5 细边 + radius12 + padding12） */
.task-card { background: #fff; border: 1px solid #eef1f5; border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.task-card:hover { box-shadow: 0 2px 10px rgba(20,30,60,.08); transform: translateY(-1px); }
.task-card .tc-title { font-size: 13px; font-weight: 700; color: #1f2d3d; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card .tc-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.task-card .tc-src { margin-top: 6px; font-size: 11px; color: #7a8aa0; }
.task-prog { height: 4px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin: 8px 0 2px; }
.task-prog-bar { height: 100%; background: #2f6df6; border-radius: 4px; }
.task-payload { background: #f7f8fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.task-payload .kv { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; }
.task-payload .kv .k { color: #8a93a6; min-width: 80px; flex-shrink: 0; }
.task-payload .kv .v { color: #2c3344; word-break: break-all; }

/* ===== 通用弹窗结构（modal-head / modal-body：仅教育版学情/纠错弹窗使用） ===== */
.modal-head { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #eef1f5; }
.modal-head > b { font-size: 15px; color: #1f2d3d; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 16px 18px 20px; overflow-y: auto; }

/* ===== 学情看板（教育版） ===== */
.lp-modal { width: min(680px, 94vw); display: flex; flex-direction: column; }
.lp-modal .modal-body { max-height: calc(88vh - 56px); }
.lp-section-title { font-size: 13.5px; font-weight: 700; color: #1f2d3d; margin: 20px 0 10px; display: flex; align-items: center; gap: 6px; }
.lp-section-title:first-child { margin-top: 0; }
.lp-section-title .lp-sub-hint { font-size: 11px; font-weight: 400; color: #9aa7b8; }

/* 总览统计卡 */
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .lp-stats { grid-template-columns: repeat(2, 1fr); } }
.lp-stat { background: linear-gradient(180deg, #f8faff, #f1f5fc); border: 1px solid #e3e9f4; border-radius: 12px; padding: 13px 8px 11px; text-align: center; }
.lp-stat b { display: block; font-size: 22px; line-height: 1.2; color: #183e8f; font-variant-numeric: tabular-nums; }
.lp-stat span { display: block; margin-top: 4px; font-size: 11.5px; color: #7a8aa0; }

/* 分科掌握度卡（以学科为主轴，老师名作副标题） */
.lp-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.lp-subject { background: #fff; border: 1px solid #eef1f5; border-radius: 12px; padding: 14px 12px 12px; text-align: center; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.lp-subject:hover { box-shadow: 0 2px 10px rgba(20, 30, 60, .1); transform: translateY(-1px); }
.lp-subject .lp-emoji { font-size: 26px; line-height: 1; }
.lp-subject .lp-subj-name { margin-top: 7px; font-size: 14px; font-weight: 700; color: #1f2d3d; }
.lp-subject .lp-subj-teacher { margin-top: 2px; font-size: 11px; color: #8a90a2; }
.lp-subject .lp-subj-att { margin-top: 4px; font-size: 11px; color: #9aa7b8; }
.lp-bar { height: 7px; border-radius: 6px; background: #eef0f5; overflow: hidden; margin-top: 8px; }
.lp-bar > i { display: block; height: 100%; border-radius: 6px; }
.lp-bar-label { margin-top: 4px; font-size: 11px; color: #8a90a2; }
.lp-norec { margin-top: 8px; font-size: 11px; color: #9aa7b8; }

/* 薄弱点 chips */
.lp-weaks { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-weak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 18px; background: #fdf1ef; border: 1px solid #f7dcd7; color: #c02626; font-size: 12.5px; }
.lp-weak b { font-variant-numeric: tabular-nums; }
.lp-empty-hint { font-size: 12px; color: #8a90a2; }

/* 推荐练习行 */
.lp-recs { display: flex; flex-direction: column; gap: 8px; }
.lp-rec { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid #e3e8ef; border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.lp-rec .lp-rec-reason { font-weight: 600; }
.lp-rec .ex-ask { flex-shrink: 0; }

/* 最近练习行 */
.lp-recents { display: flex; flex-direction: column; gap: 8px; }
.lp-recent { border: 1px solid #eef1f5; border-radius: 10px; padding: 9px 12px; background: #fff; }
.lp-recent .lp-rc-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.lp-recent .lp-rc-prompt { margin-top: 3px; font-size: 12px; color: #8a90a2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


