/* DS-AI助手 · 360 浅色绿风格 V2 */
:root {
  --primary: #2fa860;
  --primary-dark: #26904f;
  --primary-light: #e8f5ee;
  --bg: #f4f6f4;
  --card: #ffffff;
  --text: #2b2f2b;
  --text-muted: #8a938c;
  --border: #e2e8e2;
  --user-bubble: #e8f5ee;
  --ai-bubble: #ffffff;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.app { display: flex; flex-direction: column; height: 100vh; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(47,168,96,.5);
}
.logo-img { height: 30px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-text { font-size: 18px; font-weight: 700; }

/* 导航（0915-04：图标+文字两行 / 锁宽 88px / 溢出左右三角滚动 + 右侧渐隐遮罩） */
.topnav-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.topnav {
  display: flex; align-items: center; gap: 4px;
  flex: 1; min-width: 0; justify-content: center;
  padding: 5px 3px 0 3px;
  overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;          /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;
}
.topnav::-webkit-scrollbar { display: none; width: 0; height: 0; }
.nav-btn {
  position: relative;
  /* 0915-04 收尾：88→80px（原 88 时 9 键总宽 830 > 1280 可用 787 仍溢出）；文字 10→13px（用户实测 10px 太小） */
  flex: 0 0 80px; width: 80px; height: 46px;
  padding: 2px 4px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
  line-height: 1.15;
  background: transparent;
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-btn .nav-ico { font-size: 14px; line-height: 1; }
.nav-btn .nav-txt { font-size: 13px; line-height: 1.15; white-space: nowrap; }
.nav-btn:not(.active) { background: #eefaf3; color: #3a7d4f; }
.nav-btn:not(.active):hover { background: #ddf4e6; }
.nav-btn:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-btn.active { background: var(--primary); color: #fff; }
.nav-btn:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }

/* 0915-04：溢出时的左右三角滚动按钮 + 右侧渐隐遮罩（绝对定位贴 .topnav 边缘） */
.nav-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 20px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255,255,255,.97);
  color: var(--primary-dark);
  font-size: 11px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
}
.nav-scroll-btn:hover { background: var(--primary-light); }
.nav-scroll-btn:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 1px; }
.nav-scroll-left { left: 0; }
.nav-scroll-right { right: 0; }
.nav-fade-right {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 26px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 70%, #ffffff 100%);
}

/* 0915-04：窄窗口让位——logo 先缩小、再隐藏，优先保证导航键可见 */
@media (max-width: 1100px) {
  .logo-img { height: 22px; }
}
@media (max-width: 950px) {
  .logo-img { display: none; }
}

/* 0915-03：主导航按钮右上角角标（📨 新消息 = 未读消息 + 待办）；0915-04 随两行按钮重定位 */
.nav-btn .nav-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  z-index: 7;
  background: #c8d4cc;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  border-radius: 8px;
  padding: 0 4px;
  line-height: 14px;
  min-width: 14px;
  text-align: center;
  pointer-events: none;
}


.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

#sessionSelect {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 13px;
  color: var(--text);
  min-width: 160px;
  max-width: 260px;
  cursor: pointer;
}

.btn-new {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-new:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }

.btn-ghost {
  padding: 8px 14px;
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--primary-light); }

/* ===== 页面容器 ===== */
.main-wrap { flex: none; display: flex; height: calc(100vh - 56px); }
.page { display: none; flex-direction: column; flex: 1; min-width: 0; }
.page-active { display: flex; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.page-header h3 { font-size: 15px; }

/* ===== 聊天区 ===== */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 44px 0 16px;
  scroll-behavior: smooth;
}
.chat-area::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('watermark.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 80vh;
  opacity: 0.03;  /* 3% 水印透明度（0804-02） */
  pointer-events: none;
  z-index: 0;
}
.chat-area > * { position: relative; z-index: 1; }
.chat-area::-webkit-scrollbar { width: 6px; }
.chat-area::-webkit-scrollbar-thumb { background: #d5ddd5; border-radius: 3px; }

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60%;
  color: var(--text-muted);
  text-align: center;
}
.welcome-icon {
  width: 36vh; height: auto;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  overflow: visible;
}
.welcome-icon img { width: 100%; height: auto; object-fit: contain; }
.welcome h2 { color: var(--text); font-size: 24px; margin-bottom: 10px; }
.welcome-company { color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.welcome-url { color: var(--primary-dark); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.welcome p { font-size: 14px; margin-bottom: 4px; }
.welcome-hint { color: var(--primary); font-weight: 600; margin-top: 8px; }

.msg-row {
  display: flex;
  align-items: flex-start;
  margin: 14px 24px;
  animation: fadeIn .2s ease;
  max-width: 100%;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* 微信风格：AI 在左，用户（我）在右，对称面对面 */
.msg-ai { justify-content: flex-start; }
.msg-user { justify-content: flex-end; }

.msg-avatar {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-user .msg-avatar { background: var(--primary); color: #fff; margin-left: 10px; }
.msg-ai .msg-avatar { background: #e8edf2; color: #5a6b7a; margin-right: 10px; }

.msg-right, .msg-left { display: flex; flex-direction: column; min-width: 0; max-width: 80%; }
/* 子元素宽度按内容，不压缩：避免 max-width 百分比循环 */
.msg-left > .msg-body, .msg-right > .msg-body { max-width: 100%; }
.msg-right { align-items: flex-start; }
.msg-left { align-items: flex-end; }
.msg-right { align-items: flex-start; }
.msg-left { align-items: flex-end; }

.msg-name {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 0 4px;
}

.msg-body {
  width: fit-content;
  max-width: 100%;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { background: var(--user-bubble); border-top-right-radius: 4px; }
.msg-ai { justify-content: flex-start; }
.msg-ai .msg-body { background: var(--ai-bubble); border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg-ai .msg-body.streaming::after { content: "▋"; color: var(--primary); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.msg-error .msg-body { background: #fff0f0; border-color: #f5c6c6; color: #c0392b; }

/* 工具事件卡片 */
.tool-event {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 24px 10px 68px;
  padding: 8px 12px;
  background: #f0f4f1;
  border: 1px solid #dde5de;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  animation: fadeIn .2s ease;
}
.tool-icon { flex-shrink: 0; }
.tool-label { font-weight: 700; color: var(--primary-dark); flex-shrink: 0; }
.tool-cmd {
  background: #fff; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; font-size: 11px; color: #555;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px;
}
.tool-out { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tool-error { color: #c0392b; }
.tool-denied { color: #e67e22; font-weight: 600; }

/* 审批弹窗 */
.approval-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.approval-box {
  width: 520px; max-width: 90vw;
  background: #fff; border-radius: 14px; padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  animation: fadeIn .2s ease;
}
.approval-title { font-size: 16px; font-weight: 700; color: #c0392b; margin-bottom: 10px; }
.approval-reason { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.approval-cmd {
  display: block; background: #f8f8f8; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; font-family: Consolas, monospace;
  color: #333; word-break: break-all; max-height: 120px; overflow-y: auto; margin-bottom: 18px;
}
.approval-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-approve { padding: 9px 22px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.btn-approve:hover { opacity: .85; }
.btn-allow { background: var(--primary); color: #fff; }
.btn-deny { background: #e74c3c; color: #fff; }

/* ===== 输入区 ===== */
.input-bar { padding: 10px 24px 16px; background: var(--bg); }

.input-box {
  display: flex; flex-direction: column; gap: 6px;
  max-width: 860px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 8px 12px 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s;
}
.input-box:focus-within { border-color: var(--primary); box-shadow: 0 2px 16px rgba(47,168,96,.18); }

/* 上区：文字输入（占输入框 4/5） */
.input-main { display: flex; align-items: flex-end; gap: 10px; width: 100%; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-bottom: 2px; }
.attach-list:empty { display: none; }
/* 下区：快捷图标（占输入框 1/5，一行小图标） */
.send-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0;
}
.btn-voice {
  width: 32px; height: 24px;
  border: none; border-radius: 8px;
  background: #e8f5ec; color: #2fa860;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.btn-voice:hover { background: #d7efe0; }
.input-tools {
  display: flex; gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.tool-btn {
  width: 24px; height: 24px;
  border: none; background: transparent;
  font-size: 14px; cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.tool-btn:hover { background: var(--primary-light); }

.attach-list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); border: 1px solid var(--primary);
  color: var(--primary-dark); border-radius: 20px;
  padding: 3px 10px; font-size: 12px;
}
.attach-x { cursor: pointer; font-weight: 700; }
.attach-x:hover { color: #c0392b; }

#msgInput {
  flex: 1; min-width: 200px;
  border: none; outline: none; resize: none;
  font-size: 14px; font-family: inherit; line-height: 24px;
  padding: 2px 0;
  height: 72px; min-height: 72px;
  max-height: 160px; color: var(--text); background: transparent;
  cursor: text;
}

.btn-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, opacity .15s; flex-shrink: 0;
}
.btn-send:hover { background: var(--primary-dark); }
.btn-send:disabled { opacity: .5; cursor: not-allowed; }
/* 0907-11：发送键工作态变身（圆环+中止，点击=中止；参照 Hermes 本体交互） */
.btn-ring { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn-send.working { background: #5aa87c; }   /* 0919-04：工作态=「排队」（红底让位给 ⏹ 停止） */
.btn-send.working:hover { background: #468e66; }
.btn-send.working .btn-ring { display: inline-block; }
.btn-send.working:disabled { opacity: 1; cursor: pointer; }

/* 0907-11：输入框下方状态行 = 当前模型 · 思考中/工作中… */
/* 0918-13：独立「停止生成」按钮（对齐 Hermes——生成中随时可停，不再只藏在发送键里） */
.btn-stop { align-items: center; gap: 5px; padding: 8px 14px; border: none; border-radius: 10px; background: #e74c3c;
  color: #fff; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn-stop:hover { background: #c0392b; }
/* 0918-13：过程块（工具轮说明文字 + 工具调用行）——浅色小字，位于回复气泡上方 */
.msg-progress { margin: 2px 0 6px; padding: 2px 0 2px 9px; border-left: 2px solid #d8dee6; color: var(--text-muted);
  font-size: 12px; line-height: 1.7; max-width: 860px; }
.msg-progress-line { white-space: pre-wrap; word-break: break-word; }
.cm-progress { margin: 4px 0 6px; font-size: 12px; }   /* 0918-13：常用模型工作台的过程行 */
/* 0918-13：产物文件卡（打开/下载） */
.file-cards { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.file-card { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #dfe5ec;
  border-radius: 10px; background: #f8fafc; max-width: 480px; }
.file-card .fc-icon { font-size: 18px; }
.file-card .fc-body { display: flex; flex-direction: column; min-width: 0; }
.file-card .fc-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 300px; }
.file-card .fc-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 300px; }
.file-card .fc-btn { font-size: 12px; color: var(--primary); text-decoration: none; padding: 3px 8px;
  border: 1px solid var(--primary); border-radius: 6px; flex: 0 0 auto; }
.file-card .fc-btn:hover { background: var(--primary); color: #fff; }
/* 0918-13：结构化提问弹窗（clarify） */
.clarify-box { max-width: 560px; }
.clarify-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.btn-choose { background: #eef4fb; color: var(--primary-dark); border: 1px solid var(--primary); }
.btn-choose:hover { background: var(--primary); color: #fff; }
.clarify-input { width: 100%; padding: 8px 10px; border: 1px solid #dfe5ec; border-radius: 8px;
  font-size: 13px; box-sizing: border-box; }
.input-status { max-width: 860px; margin: 8px auto 0; font-size: 11px; color: var(--text-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.is-model { color: var(--text-muted); }
.is-state { color: var(--text-muted); transition: color .2s; }
.is-state.busy { color: var(--primary-dark); font-weight: 600; }
.is-state.done { color: var(--primary); font-weight: 600; }
.is-state.error { color: #e74c3c; font-weight: 600; }
.voice-hint {
  max-width: 860px; margin: 6px auto 0; font-size: 12px;
  color: #e74c3c; text-align: center; font-weight: 600;
}
.hidden { display: none !important; }

/* ===== 对话历史页 ===== */
.history-list { flex: 1; overflow-y: auto; padding: 12px 24px; }
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 8px;
}
.history-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-date { font-size: 11px; color: var(--text-muted); }
.history-actions { display: flex; gap: 8px; flex-shrink: 0; }
.history-actions button {
  font-size: 12px; padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
}
.history-actions .hist-open:hover { border-color: var(--primary); color: var(--primary-dark); }
.history-actions .hist-del:hover { border-color: #e74c3c; color: #e74c3c; }

/* ===== 工作台页 ===== */
.ws-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: auto 24px 5px;
  padding: 12px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.ws-grid-title {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  margin-right: 6px;
  flex-shrink: 0;
  gap: 14px; padding: 20px 24px;
}
.ws-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; text-align: center;
  transition: box-shadow .15s, border-color .15s;
  font-family: inherit;
  min-width: 88px;
}
.ws-card:hover { box-shadow: 0 4px 16px rgba(47,168,96,.15); border-color: var(--primary); }
.ws-icon { font-size: 18px; flex-shrink: 0; }
.ws-info { display: flex; flex-direction: column; min-width: 0; }
.ws-title { font-size: 13px; font-weight: 700; }
.ws-desc { font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 76px; }

/* ===== 配置页 ===== */
.settings-form {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
  align-content: start;
}
.setting-row { margin-bottom: 0; }
.settings-layout {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.settings-nav {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  align-self: flex-start;
}
.settings-nav-item {
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #3c4a5d;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-nav-item:hover {
  background: #f0f6f2;
}
.settings-nav-item.active {
  background: #2fa860;
  color: #fff;
  font-weight: 600;
}
.settings-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-y: auto;
}
.settings-content h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #1f2d3d;
}
.settings-panel-hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: #8a97a8;
}
.model-picker {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 6px 0;
}
.model-item {
  display: flex; flex-direction: column; align-items: center;
  width: 68px; padding: 8px 4px 6px;
  background: #fff; border: 1px solid #e3e8ee; border-radius: 12px;
  cursor: pointer; transition: all .15s;
}
.model-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(47,168,96,.12); transform: translateY(-1px); }
.model-item.selected { border-color: var(--primary); background: #eefaf3; box-shadow: 0 0 0 2px rgba(47,168,96,.25); }
.model-item img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.model-item span { font-size: 11px; color: #5a6b7a; margin-top: 4px; white-space: nowrap; }

.setting-section-title {
  font-size: 13px; font-weight: 700; color: #5a6b7a;
  margin: 18px 0 8px; padding-top: 14px; border-top: 1px dashed #e3e8ee;
}
.backup-scope-row { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 0; }
.scope-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #3a4a5a; cursor: pointer; }
.backup-actions { display: flex; gap: 10px; }

.dir-edit-row { display: flex; gap: 8px; align-items: center; }
.dir-edit-row input { flex: 1; }
.skill-cats { display: flex; gap: 10px; flex-wrap: wrap; }
.skill-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1px solid #e3e8ee; border-radius: 20px;
  background: #fff; font-size: 13px; cursor: pointer; transition: all .15s;
}
.skill-cat:hover { border-color: var(--primary); }
.skill-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-count {
  background: #eef1f5; color: #5a6b7a; border-radius: 10px;
  padding: 0 7px; font-size: 11px;
}
.skill-cat.active .cat-count { background: rgba(255,255,255,.25); color: #fff; }
.skill-search { width: 100%; padding: 8px 12px; border: 1px solid #e3e8ee; border-radius: 8px; font-size: 13px; }
.skill-browser { display: flex; gap: 12px; margin-top: 6px; min-height: 260px; }
.skill-list {
  width: 38%; border: 1px solid #e3e8ee; border-radius: 10px; overflow-y: auto; max-height: 380px;
}
.skill-list-item {
  padding: 10px 12px; border-bottom: 1px solid #f0f2f5; cursor: pointer; transition: background .1s;
}
.skill-list-item:hover { background: #f5f8f6; }
.skill-list-item.active { background: #eefaf3; border-left: 3px solid var(--primary); }
.skill-list-item .sl-name { font-size: 13px; font-weight: 700; color: #2c3e50; }
.skill-list-item .sl-name .sl-del {
  float: right; width: 20px; height: 20px; line-height: 18px; text-align: center;
  border: 1px solid #e3e8ee; border-radius: 6px; color: #9aa7b4; font-size: 12px;
  cursor: pointer; background: #fff; font-weight: 400;
}
.skill-list-item .sl-name .sl-del:hover { border-color: #e74c3c; color: #e74c3c; }
.skill-list-item .sl-name .sl-tier {
  margin-left: 6px; font-weight: 400; font-size: 11px; padding: 1px 6px;
  border-radius: 8px; border: 1px solid #e3e8ee; color: #7a8699; background: #f6f8fa;
}
.skill-list-item .sl-name .sl-tier.hot { color: #1f7a4d; border-color: #b9e3cd; background: #eefaf3; }
.skill-list-item .sl-name .sl-tier.cold { color: #7a8699; border-color: #e3e8ee; background: #f5f6f8; }
.skill-list-item .sl-name .sl-move {
  float: right; width: 20px; height: 20px; line-height: 18px; text-align: center;
  border: 1px solid #e3e8ee; border-radius: 6px; color: #7a8699; font-size: 12px;
  cursor: pointer; background: #fff; font-weight: 400; margin-left: 4px;
}
.skill-list-item .sl-name .sl-move:hover { border-color: var(--primary); color: var(--primary); }
.skill-list-item .sl-desc { font-size: 12px; color: #7a8699; margin-top: 3px; line-height: 1.4; }
.skill-detail {
  flex: 1; border: 1px solid #e3e8ee; border-radius: 10px; padding: 14px;
  overflow-y: auto; max-height: 380px; font-size: 13px; background: #fff;
}
.skill-detail pre { white-space: pre-wrap; font-size: 12px; background: #f7f9f8; padding: 10px; border-radius: 8px; }

.hc-group { margin: 10px 0; }
.hc-title { font-size: 12px; font-weight: 700; color: #5a6b7a; margin-bottom: 6px; }
.hc-items { display: flex; flex-direction: column; gap: 5px; }
.hc-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  padding: 6px 10px; background: #f7f9f8; border-radius: 8px;
}
.hc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hc-dot.ok { background: #2fa860; }
.hc-dot.bad { background: #e74c3c; }
.hc-item .hc-name { font-weight: 600; color: #2c3e50; min-width: 90px; }
.hc-item .hc-val { color: #5a6b7a; flex: 1; }
.hc-item .hc-req { color: #9aa7b4; font-size: 11px; }
.hc-act { font-size: 11px; padding: 2px 8px; border: 1px solid var(--primary); color: var(--primary); border-radius: 6px; background: #fff; cursor: pointer; }
.hc-act:hover { background: var(--primary); color: #fff; }

.session-select {
  padding: 4px 10px; border: 1px solid #e3e8ee; border-radius: 8px;
  font-size: 12px; background: #fff; max-width: 180px;
}
.btn-new-sm { padding: 5px 12px; font-size: 12px; }
.ws-customs { display: contents; }
.ws-card.ws-add { border-style: dashed; }

.proj-list { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.proj-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px;
}
.proj-row.pinned { border-left: 4px solid var(--primary); }
.proj-code { font-weight: 700; color: var(--primary); font-family: monospace; min-width: 110px; }
.proj-desc { flex: 1; font-size: 14px; color: #2c3e50; }
.proj-time { font-size: 12px; color: #9aa7b4; display: flex; flex-direction: column; gap: 3px; text-align: right; }
.proj-actions { display: flex; flex-direction: column; gap: 6px; }
.proj-actions .btn-ghost, .proj-actions .btn-new { padding: 3px 10px; font-size: 12px; line-height: 1.3; height: auto; min-height: 0; }
.proj-empty { text-align: center; color: #9aa7b4; padding: 40px; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: #fff; border-radius: 14px; padding: 22px 26px; width: 440px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.modal-box h4 { margin: 0 0 14px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.ws-custom-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.ws-custom-opt {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid #e3e8ee; border-radius: 10px; background: #fff;
  cursor: pointer; transition: all .15s; font-size: 13px;
}
.ws-custom-opt:hover { border-color: var(--primary); background: #f5faf7; }
.wco-icon { font-size: 16px; }

.mem-store-sub { font-size: 11px; color: #8a94a6; font-weight: normal; margin-left: 8px; }
.mem-store-usage { background: #f6f8fa; border: 1px solid #e8edf3; border-radius: 10px; padding: 10px 14px; margin: 10px 0 12px; }
.mem-usage-row { display: flex; justify-content: space-between; font-size: 12px; color: #556; margin-bottom: 6px; }
.mem-usage-row #memTotalPct { font-weight: 600; color: var(--primary); }
.mem-usage-bar { height: 6px; background: #e4e9f0; border-radius: 3px; overflow: hidden; }
.mem-usage-fill { height: 100%; background: var(--primary); border-radius: 3px; width: 0%; transition: width .3s; }
.mem-section-title { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; color: #334; padding: 6px 0; }
.mem-count-row { display: flex; gap: 18px; margin-top: 8px; font-size: 12px; color: #556; }
.mem-count-item b { color: var(--primary); font-size: 14px; margin: 0 2px; }
.mem-tabs { display: flex; gap: 6px; margin: 12px 0 10px; border-bottom: 2px solid #eef1f6; }
.mem-tab {
  border: none; background: transparent; padding: 8px 18px; font-size: 13px;
  cursor: pointer; color: #6b7586; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
}
.mem-tab:hover { color: var(--primary); }
.mem-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.mem-tab-page { min-height: 120px; }
.mem-actions-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mem-act { padding: 4px 12px; font-size: 12px; }
.mem-act-danger { color: #d9534f; border-color: #f0c4c2; }
.mem-act-danger:hover { background: #fdf0f0; border-color: #d9534f; }
.mem-use { font-size: 11px; color: #8a94a6; background: #f0f4f8; border-radius: 10px; padding: 1px 8px; white-space: nowrap; margin-right: 2px; }
.fab {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(47, 168, 96, 0.4);
  cursor: pointer;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(47, 168, 96, 0.5); }
.fab:active { transform: scale(0.96); }
.avatar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-preview-text {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 600; color: var(--primary);
  background: #eaf6ef; border: 2px dashed #b5dfc8;
  width: 56px; height: 56px; border-radius: 50%;
}
.msg-time { font-size: 10px; color: #a3adba; margin-left: 8px; font-weight: 400; }
.msg-meta { display: flex; gap: 10px; font-size: 11px; color: #8a94a6; margin-top: 4px; }
.msg-body.streaming { opacity: 0.92; }
.msg-body h1, .msg-body h2, .msg-body h3, .msg-body h4 { margin: 8px 0 4px; font-size: 1.1em; color: var(--primary-dark); }
.msg-body h1 { font-size: 1.3em; }
.msg-body p { margin: 6px 0; line-height: 1.6; }
.msg-body ul, .msg-body ol { margin: 6px 0 6px 20px; padding: 0; }
.msg-body li { margin: 3px 0; }
.msg-body code { background: #f0f4f8; padding: 1px 5px; border-radius: 4px; font-family: Consolas, monospace; font-size: 0.92em; }
.msg-body pre { background: #282c34; color: #e6e6e6; padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }
.msg-body pre code { background: transparent; color: inherit; padding: 0; }
.msg-body table { border-collapse: collapse; margin: 8px 0; max-width: 100%; display: block; overflow-x: auto; }
.msg-body th, .msg-body td { border: 1px solid #dde3ea; padding: 5px 10px; font-size: 0.95em; }
.msg-body th { background: #eef4f0; }
.msg-body blockquote { border-left: 3px solid var(--primary); margin: 8px 0; padding: 2px 12px; color: #5a6570; background: #f6faf7; border-radius: 0 6px 6px 0; }
.msg-body img { max-width: 100%; border-radius: 6px; }
.msg-body a { color: var(--primary); }
.msg-body hr { border: none; border-top: 1px solid #e3e8ee; margin: 10px 0; }
.msg-body strong { font-weight: 600; }
.mem-cat { font-weight: normal; color: #8a94a6; font-size: 12px; }
.mem-used { font-size: 11px; color: #8a94a6; margin-left: auto; }
.mem-entries { display: flex; flex-direction: column; gap: 8px; }
.mem-entry {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8fafc; border: 1px solid #e8edf3; border-radius: 8px;
  padding: 10px 12px; font-size: 13px;
}
.mem-entry .mem-text { flex: 1; white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.mem-entry .mem-actions { display: flex; gap: 4px; }
.mem-entry .mem-actions button {
  border: 1px solid #e0e6ee; background: #fff; border-radius: 6px;
  padding: 2px 8px; font-size: 11px; cursor: pointer; color: #556;
}
.mem-entry .mem-actions button:hover { border-color: var(--primary); color: var(--primary); }
.mem-add-row { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.mem-add-row textarea { flex: 1; }
.mem-empty { color: #9aa4b5; font-size: 12px; padding: 8px 2px; }

.collapse-header {
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  transition: color .15s;
}
.collapse-header:hover { color: var(--primary); }
.collapse-tri { font-size: 10px; transition: transform .2s; display: inline-block; }
.collapse-header.open .collapse-tri { transform: rotate(90deg); }

.setting-actions { grid-column: 1 / -1; }
.setting-row {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 12px;
}
.setting-row label { font-size: 13px; font-weight: 700; }
.setting-row input[type="text"] {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; outline: none;
}
.setting-row input[type="text"]:focus { border-color: var(--primary); }
.setting-hint { font-size: 11px; color: var(--text-muted); }
/* 261009-006：模块编辑弹窗里的多行框要撑满整行。
   此前这些行用了 style="align-items:flex-start" → 子元素不再 stretch → textarea 只剩内容宽度，
   缩成左侧一条、右边大片空白（用户 10-10 报「各行的输入框宽度不是自适应的」）。 */
.setting-row textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}
.setting-row textarea:focus { border-color: var(--primary); }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-preview {
  width: 64px; height: 64px; border-radius: 16px;
  border: 2px solid var(--border); object-fit: cover;
}
.setting-actions { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.settings-msg { font-size: 13px; }

/* 隐私模式开关 */
.switch-row { display: flex; align-items: center; gap: 12px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #ccc; border-radius: 24px;
  transition: background .2s;
}
.slider::before {
  content: ""; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ===== 定时任务（保留 V1 侧栏样式以备复用） ===== */
.cron-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px 0; }


/* ===== 工作台欢迎区 + 健康状态（V3） ===== */
#page-chat { position: relative; }
#page-workspace { overflow: hidden; }   /* flex 布局，margin:auto 推底生效 */
#page-workspace .welcome {
  height: 60%;
  min-height: 260px;
  padding: 20px 20px 4px;
}
#page-workspace .welcome-icon {
  width: 32vh;
  max-width: 300px;
  margin-bottom: 10px;
}
#page-workspace .page-header { flex-shrink: 0; }

.health-panel {
  margin: 5px 24px 4px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}
.health-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.health-title { font-size: 14px; font-weight: 700; }
.health-refresh { padding: 4px 12px; font-size: 12px; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.health-item {
  display: flex; align-items: center; gap: 8px;
  background: #f8faf8; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px;
}
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.health-dot.ok { background: #2fa860; box-shadow: 0 0 6px rgba(47,168,96,.5); }
.health-dot.bad { background: #e74c3c; box-shadow: 0 0 6px rgba(231,76,60,.4); }
.health-dot.loading { background: #f0b429; animation: blink 1s infinite; }
.health-label { font-weight: 600; }
.health-detail { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 大模型测试按钮 */
.llm-test-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.llm-test-msg { font-size: 12px; }


/* ===== 对话悬浮标题栏（V3.1） ===== */
.chat-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 36px;
  padding: 0 18px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,226,.6);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  flex-shrink: 0;
}
.titlebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}
.titlebar-tools { display: flex; align-items: center; gap: 10px; }
.font-preview {
  font-size: 16px; font-weight: 700;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 1px 8px;
  line-height: 1.4;
  cursor: default;
}
.font-group { display: flex; gap: 2px; }
.font-btn {
  width: 30px; height: 28px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.font-btn[data-size="sm"] { font-size: 11px; }
.font-btn[data-size="lg"] { font-size: 16px; }
.font-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.font-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 字号方案：作用于对话区 */
.chat-area.font-sm .msg-body { font-size: 13px; }
.chat-area.font-sm .tool-event { font-size: 11px; }
.chat-area.font-md .msg-body { font-size: 14px; }
.chat-area.font-lg .msg-body { font-size: 16px; }
.chat-area.font-lg .tool-event { font-size: 13px; }


/* ===== 看板页（V3.2） ===== */
#page-dashboard { overflow-y: auto; }
.dash-grid {
  display: grid; grid-template-columns: 1fr;
  grid-auto-rows: auto;
  gap: 8px; padding: 4px;
}
.dash-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; font-size: 12px;
}
.dash-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dash-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.dash-stat:last-child { border-bottom: none; }
.dash-stat b { color: var(--primary-dark); }

/* ===== 工作进程指示（输入区） ===== */
.work-indicator { display: flex; align-items: center; gap: 8px; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.work-indicator.working .spinner { display: block; }
.work-indicator.working .work-text { color: var(--primary-dark); font-weight: 600; }
.stop-btn {
  display: none;
  padding: 3px 12px;
  background: #e74c3c; color: #fff;
  border: none; border-radius: 6px;
  font-size: 12px; cursor: pointer;
}
.work-indicator.working .stop-btn { display: inline-block; }
.work-text { font-size: 12px; color: var(--text-muted); }


.setting-select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; outline: none;
  background: var(--card); color: var(--text); cursor: pointer;
}
.setting-select:focus { border-color: var(--primary); }

/* 拖放高亮（0804-09） */
.input-box.drag-over {
  border-color: #2fa860 !important;
  box-shadow: 0 0 0 2px rgba(47, 168, 96, 0.25);
}

/* 右键复制菜单（0804-10） */
.ctx-menu {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e3e8e3;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 4px;
  min-width: 150px;
}
.ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: none;
  font-size: 13px;
  color: #333;
  border-radius: 5px;
  cursor: pointer;
}
.ctx-menu button:hover { background: #f0f6f1; color: #2fa860; }

/* ===== 对话页左侧栏（0805-02 Hermes 式） ===== */
.chat-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 210px;
  background: #f7f9f7;
  border-right: 1px solid #e3e8e3;
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  overflow-y: auto;
  z-index: 5;
}
.page-chat-layout { display: flex; }
.sidebar-new {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #2fa860;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  transition: opacity .15s;
}
.sidebar-new:hover { opacity: .88; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.sidebar-nav-item {
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}
.sidebar-nav-item:hover { background: #eef4ef; color: #2fa860; }
.sidebar-section { margin-bottom: 10px; }
.sidebar-section-title {
  font-size: 12px;
  color: #8a938c;
  padding: 4px 6px;
  font-weight: 600;
}
.sidebar-list { display: flex; flex-direction: column; gap: 1px; }
.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-item:hover { background: #eef4ef; }
.sidebar-item.active { background: #e2f1e7; color: #2fa860; font-weight: 600; }
.sidebar-item .sb-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.sidebar-item .sb-pin {
  opacity: 0;
  font-size: 12px;
  border: none;
  background: none;
  cursor: pointer;
  color: #8a938c;
}
.sidebar-item:hover .sb-pin { opacity: 1; }
.sidebar-item .sb-pin.pinned { opacity: 1; color: #f0a020; }
.sidebar-empty { font-size: 12px; color: #b0b6b1; padding: 4px 8px; }

/* 对话页左侧栏让位 */
#page-chat .chat-titlebar, #page-chat .chat-area, #page-chat .input-bar { margin-left: 210px; }

/* 对话页右侧历史面板（0805-002） */
.chat-hist-panel {
  position: absolute;
  top: 0;
  left: 210px;
  right: 0;
  bottom: 0;
  background: #f7f9f7;
  border-left: 1px solid #e3e8e3;
  flex-direction: column;
  z-index: 6;
  padding: 10px;
}
.chp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 4px 10px;
}
.chp-close {
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
  color: #8a938c;
}
.chp-close:hover { color: #e74c3c; }
.chp-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

/* 常用模型工作台（0905-09）：左300px目录（0907-07 由200加大100） + 右对话工作区 */
#chatProjPanel { padding: 10px 0 10px; }
#chatProjPanel .chp-header { padding: 0 14px 10px; }
/* 0907-11：常用模型对话状态行（挂 chatProjPanel 层底部，不参与 cm-ws 内部挤压） */
#chatProjPanel .cm-ws-status {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px 13px; font-size: 11px; line-height: 1.4; color: #8a938c;
  border-top: 1px solid #e3e8e3;
  min-height: 40px; box-sizing: border-box;
}
#chatProjPanel .cm-ws-status .is-state.busy { color: #1e6b3c; }
.cm-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.cm-dir {
  width: 300px; flex-shrink: 0; display: flex; flex-direction: column;
  border-right: 1px solid #e3e8e3; min-height: 0;
}
.cm-dir-title {
  padding: 10px 14px 8px; font-size: 12px; font-weight: 700; color: #55665c;
  background: #eef4ef; border-bottom: 1px solid #e3e8e3; flex-shrink: 0;
}
/* 1004-03b：搜索区总高锁定 50px（原先被撑到 116px，用户要求压缩到 50） */
.cm-dir-search-wrap {
  height: 50px; max-height: 50px; box-sizing: border-box;
  display: flex; align-items: center;
  padding: 0 8px; border-bottom: 1px solid #e3e8e3; background: #eef4ef; flex-shrink: 0; overflow: hidden;
}
#cmDirSearch {
  width: 100%; box-sizing: border-box; height: 32px; padding: 0 10px; font-size: 12px; line-height: 30px;
  border: 1px solid #d8e2da; border-radius: 8px; outline: none; background: #fff;
  font-family: inherit; color: #33423a;
}
#cmDirSearch:focus { border-color: #2fa860; }
.cm-dir-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cm-dir-item {
  display: flex; align-items: flex-start; gap: 6px; width: 100%;
  padding: 8px 8px; border: 1px solid transparent;
  border-radius: 8px; background: transparent; cursor: default; font-size: 13px; color: #33423a;
}
.cm-dir-item:hover { background: #f0f6f1; }
.cm-dir-item.active { background: #e3f1e8; border-color: #bfe0cc; color: #1e6b3c; font-weight: 600; }
.cm-dir-item .cm-dir-ck {
  margin-top: 3px; width: 15px; height: 15px; flex: 0 0 auto;
  accent-color: #2fa860; cursor: pointer;
}
.cm-dir-main {
  flex: 1; min-width: 0; text-align: left; background: transparent;
  border: none; padding: 0; font-family: inherit; cursor: pointer; color: inherit;
}
.cm-dir-item .cm-di-name { display: block; font-size: 13px; font-weight: 600; }
.cm-dir-item .cm-di-desc {
  display: block; font-size: 11px; color: #8a938c; margin-top: 2px; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* 1004-03：AI能力 六大分区（分区头可折叠/展开；子条目缩进一档） */
.cm-sec-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; margin-top: 6px; border-radius: 8px;
  background: #f2f7f3; border: 1px solid #e3ece5;
  font-size: 12.5px; font-weight: 700; color: #2c5c3e; cursor: pointer; user-select: none;
}
.cm-sec-head:hover { background: #e9f2ec; }
.cm-sec-head:active { background: #dceade; }
.cm-sec-head.collapsed { background: #f7faf8; border-color: #eaf0ec; color: #7d8f85; }
.cm-sec-head.collapsed .cm-sec-name::after { content: " （已收起）"; font-weight: 400; font-size: 11px; color: #a9b6ae; }
.cm-sec-head .cm-sec-caret { font-size: 14px; font-weight: 700; color: #3f7a55; width: 14px; text-align: center; flex: 0 0 auto; }
.cm-sec-head .cm-sec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-sec-body { display: block; padding: 2px 0 0 10px; }
.cm-sec-empty {
  padding: 8px 10px; font-size: 12px; color: #9aa79f; font-style: italic;
  background: #fafcfa; border: 1px dashed #dfe8e2; border-radius: 8px;
}
.cm-ws { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.cm-ws-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 6px 16px 8px; border-bottom: 1px solid #e3e8e3; flex-shrink: 0;
}
.cm-ws-head #cmWsTitle { font-size: 14px; font-weight: 700; color: #2b3a30; }
.cm-ws-head .cm-ws-sub { font-size: 11px; color: #8a938c; }
.cm-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cm-msg { max-width: 86%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.cm-msg.user { align-self: flex-end; background: #2fa860; color: #fff; border-bottom-right-radius: 3px; }
.cm-msg.ai { align-self: flex-start; background: #fff; border: 1px solid #e3e8e3; border-bottom-left-radius: 3px; color: #333; }
.cm-msg.ai .cm-msg-body { white-space: pre-wrap; }
.cm-msg.ai .cm-msg-body table { border-collapse: collapse; margin: 6px 0; }
.cm-msg.ai .cm-msg-body th, .cm-msg.ai .cm-msg-body td { border: 1px solid #d5e0d8; padding: 4px 8px; font-size: 12px; }
.cm-msg.ai.streaming .cm-msg-body::after { content: "▍"; animation: cmBlink 1s infinite; }
@keyframes cmBlink { 50% { opacity: 0; } }
.cm-file-card {
  margin-top: 8px; display: inline-flex; flex-direction: column; gap: 6px;
  background: #f0f7f2; border: 1px solid #bfe0cc; border-radius: 8px; padding: 8px 12px;
  max-width: 100%; box-sizing: border-box;
}
.cm-file-card .cm-file-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-file-card .cm-file-name { color: #1e6b3c; font-weight: 600; word-break: break-all; }
.cm-file-card .cm-file-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-file-card .cm-file-actions button {
  padding: 3px 12px; border: 1px solid #2fa860; background: #fff; color: #1e6b3c;
  border-radius: 6px; font-size: 12px; cursor: pointer;
}
.cm-file-card .cm-file-actions button:hover { background: #e8f5ec; }
.cm-file-card .cm-file-path {
  font-size: 11px; color: #7d8f83; word-break: break-all; user-select: all;
  background: rgba(255,255,255,.6); border-radius: 5px; padding: 3px 6px;
}
.cm-file-card a { color: #1e6b3c; font-weight: 600; text-decoration: none; }
.cm-file-card a:hover { text-decoration: underline; }
.cm-input-bar {
  flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 14px 12px; border-top: 1px solid #e3e8e3; background: #fbfdfc;
}
.cm-input-bar textarea {
  flex: 1; resize: none; border: 1px solid #d8e2da; border-radius: 10px; padding: 8px 12px;
  font-size: 13px; font-family: inherit; min-height: 62px; max-height: 110px; outline: none;
  line-height: 1.5;
}
.cm-input-bar textarea:focus { border-color: #2fa860; }
.cm-input-bar .btn-send { padding: 8px 22px; border-radius: 10px; }
/* 0907-03：右侧按键区 = 上行「发起新需求+确认」同排、下行「发送」加宽独占一行 */
.cm-input-side { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; width: 200px; }
.cm-side-row { display: flex; gap: 6px; }
.cm-side-row button { flex: 1; min-width: 0; }
.cm-newreq, .cm-confirm {
  padding: 8px 4px; border: 1px solid #2fa860; background: #fff; color: #2fa860;
  border-radius: 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: background .15s; line-height: 1.2;
}
.cm-newreq:hover, .cm-confirm:hover { background: #e8f5ec; }
.cm-send-wide { width: 100%; }
#cmSendBtn.cm-send-wide.btn-send { padding: 8px 0; }

/* 信息收集卡（0906 一键发起：填空+下拉） */
.cm-form {
  flex-shrink: 0; margin: 0 14px 10px; padding: 10px 14px 12px;
  background: #f0f7f2; border: 1px solid #cfe3d6; border-radius: 12px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 52vh;                       /* 0907-04：组合多模块收集卡超高时表单内部滚动，输入栏常驻 */
}
/* 0907-08：收集卡行标题（如「模组灯板建议规格」） */
.cm-row-label {
  font-size: 11px; font-weight: 700; color: #1e6b3c;
  background: #e3f1e8; border-radius: 5px; padding: 2px 8px;
  align-self: flex-start; margin-bottom: -4px;
}
/* 0907-10：屏体组可增删行（预算报价表等 repeat_rows） */
.cm-screen-box { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.cm-srow { flex-wrap: wrap;
  display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap;
  background: #f6faf7; border: 1px solid #d6e4da; border-radius: 6px; padding: 6px 8px;
}
.cm-sf { display: flex; flex-direction: column; gap: 2px; width: 78px; }
/* 0918-3：屏体行里的勾选项——框与文字同一行；屏体行允许换行 */
.cm-sf-ck { flex-direction: row; align-items: center; gap: 4px; width: auto; min-width: 104px; flex: 0 0 auto; }
.cm-sf-ck > label { margin: 0; padding: 0; }
.cm-sf-ck label { white-space: normal; }
.cm-sf label { font-size: 10px; color: #55725f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-sf select, .cm-sf input { width: 100%; box-sizing: border-box; }
.cm-sf-wide { flex: 1 1 200px; min-width: 180px; }
.cm-srow-del { background: transparent; border: none; color: #c0392b; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.cm-srow-btns { display: flex; gap: 8px; }
.cm-srow-add, .cm-srow-delb {
  font-size: 11px; border: 1px solid #2fa860; color: #2fa860; background: #fff;
  border-radius: 5px; padding: 2px 10px; cursor: pointer;
}
.cm-srow-add:hover, .cm-srow-delb:hover { background: #eef8f1; }
.cm-form-grid { overflow-y: auto; min-height: 0; padding-right: 2px; }
.cm-form-head, .cm-form-foot { flex-shrink: 0; }
/* 0907-05：概况类（行11）字段窄排，尽量同一行 */
.cm-form-row[data-row="11"] .cm-field { min-width: 118px; }
.cm-form-row[data-row="11"] .cm-field > input, .cm-form-row[data-row="11"] .cm-field > select { min-width: 60px; max-width: 120px; }
.cm-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-form-title { font-size: 13px; font-weight: 700; color: #1e6b3c; }
.cm-form-sub { font-size: 11px; color: #7d8f83; flex: 1; min-width: 0; }
.cm-form-close {
  border: none; background: none; font-size: 14px; cursor: pointer; color: #7d8f83;
  padding: 0 2px; flex-shrink: 0; line-height: 1;
}
.cm-form-close:hover { color: #e05555; }
.cm-form-grid { display: flex; flex-direction: column; gap: 6px; }
.cm-form-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cm-field { display: flex; align-items: center; gap: 6px; min-width: 150px; }
.cm-field-ck { min-width: auto; flex-direction: row; align-items: center; gap: 4px; flex: 0 0 auto; }
.cm-field-ck > label { margin: 0; padding: 0; }
/* 0918-3：普通字段区勾选框——框在前、文字在后、强制同一行。
   加 .cm-form-grid 前缀提高优先级，压过文件后面 .cm-field{flex-direction:column}（同级选择器后者胜） */
.cm-form-grid .cm-field-ck { flex-direction: row; align-items: center; }
/* 0918-4 用户要求（对着截图整改）：收集卡内「多项并排一行」——字段横排、label 在左、控件在右 */
.cm-form-grid .cm-form-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: flex-start; }
.cm-form-grid .cm-form-row > .cm-field:first-child { margin-left: 0; }
.cm-form-grid .cm-field { flex-direction: row; align-items: center; min-width: 0; }
.cm-form-grid .cm-field > label { white-space: nowrap; }
.cm-form-grid .cm-field > input, .cm-form-grid .cm-field > select { min-width: 96px; }
/* 0918-10 用户实测：勾选框被上面这条撑成 96px 宽 → 方框↔文字视觉间距≈100px ✗
   勾选框/勾选格必须按内容宽度（14px），否则标签被推出很远 */
.cm-form-grid .cm-field.cm-field-ck > input[type="checkbox"] { min-width: 0; width: 14px; flex: 0 0 14px; }
.cm-form-grid .cm-sf.cm-sf-ck > input[type="checkbox"] { min-width: 0; width: 14px; flex: 0 0 14px; }
.cm-form-grid .cm-field-ck, .cm-form-grid .cm-sf-ck { width: auto; }
.cm-form-grid .cm-field.cm-field-wide > input, .cm-form-grid .cm-field.cm-field-wide > textarea { min-width: 260px; }
/* 0918-6：收集卡分组框（深绿圆角框 + 左侧竖排组标题） */
.cm-group-box {
  display: flex; align-items: stretch; gap: 10px;
  border: 2px solid #1e6b3c; border-radius: 10px;
  padding: 8px 10px; margin: 2px 0; background: #fbfdfb;
}
.cm-group-title {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 3px;
  font-size: 12px; font-weight: 700; color: #1e6b3c;
  background: #eaf6ee; border-right: 2px solid #1e6b3c; border-radius: 6px;
  padding: 8px 4px; min-width: 26px;
}
.cm-group-box > .cm-form-row, .cm-group-box > .cm-row-label { width: 100%; }
.cm-group-box-inner { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }

/* 0918-4：屏体行勾选格 label 不被 .cm-sf label 的 nowrap+ellipsis 截断（特异性 2 类 + 元素） */
.cm-sf.cm-sf-ck label { white-space: normal; overflow: visible; text-overflow: clip; }
.cm-sf.cm-sf-ck { min-width: 132px; }
.cm-form-grid .cm-field-ck > label { white-space: normal; }
.cm-field-ck > label { cursor: pointer; }
.cm-field-ck > input[type="checkbox"] { width: 14px; height: 14px; accent-color: #2fa860; cursor: pointer; }
.cm-field > label {
  font-size: 12px; color: #4a5a4f; white-space: nowrap; flex-shrink: 0;
}
.cm-field > label.req::after { content: " *"; color: #e05555; }
.cm-field > input, .cm-field > select {
  flex: 1; min-width: 74px; max-width: 150px;
  border: 1px solid #cfe3d6; border-radius: 6px; padding: 4px 8px;
  font-size: 12px; background: #fff; outline: none;
}
.cm-field > input:focus, .cm-field > select:focus { border-color: #2fa860; }
.cm-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.cm-form-err { font-size: 12px; color: #e05555; flex: 1; text-align: right; }
.cm-form-foot .btn-send { padding: 7px 24px; border-radius: 9px; }

/* 设置页（0805-005）：绝对定位于 header 下方（body 层末尾，脱离文档流防止偏移） */
#page-settings2 { position: absolute; top: 68px; left: 0; right: 0; bottom: 0; overflow-y: auto; }

/* OA 登录弹窗 */
#loginMask:focus-within { outline: none; }
#loginMask input:focus { border-color: #2fa860 !important; }
#ouList tr:hover { background: #f7faf8; }

/* OA 后台多分页 */
.oa-nav {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; margin-bottom: 4px;
  border: none; border-radius: 8px; background: transparent;
  font-size: 13px; color: #4a5a4f; cursor: pointer;
  transition: background .15s;
}
.oa-nav:hover { background: #eef4ef; }
.oa-nav.active { background: #e3f1e8; color: #2fa860; font-weight: 600; }

/* 0806-001：OA 子分区 + 组织架构 */
/* 0928-002（用户定）：左栏目录「分区-子分区」层级可视化 ——
   · 子分区左起点比分区文字再空两格（2 个汉字宽 ≈ 24px）；
   · 用竖直连线 + 短横把子分区挂到上属分区，一眼看出归属；
   覆盖范围：所有带 .oa-subnav / .oa-subnav-item 的左栏（OA系统 / 管理后台 / 服务器配置-组织管理）。*/
.oa-subnav { position: relative; padding-left: 0 !important; }
.oa-subnav-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  position: relative;
  padding: 7px 10px 7px 40px;      /* 左起点 = 分区文字左起点 + 两格 */
  cursor: pointer; font-size: 12px; color: #5a6b5f; border-left: 3px solid transparent;
}
.oa-subnav-item::before {   /* 竖直连线（每条子项各画一段 → 上下相连成一条） */
  content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 1px; background: #cbdcd2;
}
.oa-subnav-item:last-child::before { bottom: auto; height: 50%; }   /* 末条止于中点（树形收口） */
.oa-subnav-item::after {    /* 短横（连到子分区文字） */
  content: ""; position: absolute; left: 25px; top: 50%; width: 11px; height: 1px; background: #cbdcd2;
}
.oa-subnav-item:hover { background: #f5f8f6; }
.oa-subnav-item.active { background: #e8f4ee; color: #2fa860; border-left-color: #2fa860; font-weight: 600; }
.oa-caret { font-size: 10px; margin-left: 2px; transition: transform .15s; display: inline-block; }
.oa-caret.collapsed { transform: rotate(-90deg); }
.oa-org-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
.oa-org-row-label {
  width: 52px; flex-shrink: 0; padding-top: 14px; font-size: 13px; font-weight: 700; color: #2b3a30;
  writing-mode: vertical-lr; letter-spacing: 6px; text-align: center;
}
.oa-org-row-label.l1 { color: #2fa860; }
.oa-org-row-label.l2 { color: #2e7dd1; }
.oa-org-row-label.l3 { color: #e0a12f; }
.oa-org-box {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); flex-shrink: 0;
}
.oa-org-box.l12 { width: 92px; }
.oa-org-box.l3 { width: 78px; }
.oa-org-name {
  width: 100%; border: none; border-bottom: 1px solid var(--border); text-align: center;
  padding: 7px 4px; font-size: 13px; font-weight: 700; background: #f5f8f6; color: #2b3a30;
  box-sizing: border-box; outline: none;
}
.oa-org-name:focus { background: #e8f4ee; }
.oa-org-persons {
  padding: 6px 5px; min-height: 30px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  align-content: flex-start;
}
.oa-org-person {
  background: #e8f4ee; color: #2fa860; border-radius: 6px; padding: 1px 6px; font-size: 11px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.oa-org-person:hover { background: #d9ede2; text-decoration: line-through; }
.oa-org-addp {
  width: 20px; height: 20px; border: 1px dashed #8a938c; border-radius: 50%; background: none;
  cursor: pointer; font-size: 12px; line-height: 1; color: #8a938c; padding: 0;
}
.oa-org-addp:hover { border-color: #2fa860; color: #2fa860; }
.oa-org-addsub {
  width: 100%; border: none; background: #fafbfa; color: #8a938c; font-size: 11px; padding: 4px;
  cursor: pointer; border-top: 1px dashed var(--border);
}
.oa-org-addsub:hover { color: #2fa860; background: #f0f8f3; }
.oa-org-adddept {
  width: 44px; height: 44px; margin-top: 26px; border: 1px dashed #8a938c; border-radius: 10px;
  background: none; cursor: pointer; font-size: 20px; color: #8a938c; flex-shrink: 0;
}
.oa-org-adddept:hover { border-color: #2fa860; color: #2fa860; }

/* 0907-05：对话内容必须可选中/复制（用户要求同 Hermes）——覆盖一切可能的继承禁选 */
#chatArea, #chatArea .msg-row, #chatArea .msg-body, #chatArea .tool-event,
.chp-list, .chp-list .msg-row, .chp-list .msg-body,
.cm-msgs, .cm-msgs .cm-msg, .cm-msgs .cm-msg-body, .cm-msgs .cm-file-card,
.cm-msg-body table, .cm-msg-body pre, .cm-msg-body code {
  user-select: text !important;
  -webkit-user-select: text !important;
}
.chp-list .cron-empty, .cm-dir-list .cron-empty { user-select: text; }


/* ===== AI模型 页（0908-01：常用模型升级主导航页——300px目录+350px历史(可折叠)+工作区） ===== */
#page-aimodels { overflow: hidden; }
.cm-panel-page {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: #f7f9f7;
}
/* 覆盖旧 .chat-hist-panel 时代的 #chatProjPanel padding（面板已迁独立页） */
#chatProjPanel.cm-panel-page { padding: 0; }
.aim-hist {
  width: 350px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid #e3e8e3; background: #fbfcfb; overflow: hidden;
  transition: width .15s ease;
}
.aim-hist.collapsed { width: 0; min-width: 0; border-right: none; }
.cm-body { position: relative; }
.aim-grip {
  position: absolute; top: 50%; left: calc(300px + 350px - 14px);
  transform: translateY(-50%); z-index: 9;
  width: 27px; min-height: 126px; padding: 12px 0; border: 1px solid #d8e2da; background: #fff; color: #55665c;
  border-radius: 8px; cursor: pointer; font-size: 12px; line-height: 1; letter-spacing: 3px;
  /* 0919-10：竖排文字「历史对话」 */
  writing-mode: vertical-rl; text-orientation: upright;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  transition: left .15s ease, background .12s ease;
}
.aim-grip:hover { background: #e8f5ec; color: #1e6b3c; border-color: #2fa860; }
.cm-body.hist-off .aim-grip { left: calc(300px - 14px); }

/* 0919-10：信息收集卡「上传」字段（按钮 + 右侧 100×100 预览位） */
.cm-field-upload { align-items: center; }
.cm-upload-box { display: inline-flex; align-items: center; gap: 10px; }
.cm-upload-btn {
  height: 32px; padding: 0 14px; border: 1px solid #2fa860; background: #f2fbf5; color: #1e6b3c;
  border-radius: 8px; cursor: pointer; font-size: 13px; white-space: nowrap; flex: 0 0 auto;
}
.cm-upload-btn:hover { background: #e3f6ea; }
.cm-upload-btn:disabled { opacity: .6; cursor: default; }
.cm-upload-thumb {
  position: relative; width: 100px; height: 100px; flex: 0 0 100px; display: inline-block;
  border: 1px dashed #c8d4cc; border-radius: 8px; background: #fafcfb center/cover no-repeat;
  cursor: pointer;
}
.cm-upload-thumb.has-img { border-style: solid; border-color: #2fa860; }
.cm-upload-clear {
  position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid #fff; background: #e74c3c; color: #fff; font-size: 11px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.aim-hist-head {
  display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 14px;
  border-bottom: 1px solid #e3e8e3; flex-shrink: 0;
}
.aim-hist-title { font-size: 13px; font-weight: 700; color: #2b3a30; white-space: nowrap; }
.aim-hist-sub { font-size: 11px; color: #8a938c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; flex-shrink: 0; }
.aim-hist-sp { flex: 1; }
.aim-hist-fold, .aim-hist-clear {
  border: 1px solid #dfe7e0; background: #fff; color: #55665c; border-radius: 6px;
  font-size: 11px; cursor: pointer; padding: 2px 8px; white-space: nowrap; flex-shrink: 0;
  transition: transform .15s ease;
}
.aim-hist-fold:hover, .aim-hist-clear:hover { background: #e8f5ec; color: #1e6b3c; }
.aim-hist-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.aim-hist-item {
  display: block; text-align: left; width: 100%; border: 1px solid #e6ece7; background: #fff;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; position: relative;
}
.aim-hist-item:hover { border-color: #bfe0cc; background: #f0f6f1; }
.aim-hist-item.active { border-color: #2fa860; background: #e3f1e8; }
.aim-hist-item .ahi-title { font-size: 12px; font-weight: 600; color: #2b3a30; line-height: 1.45; padding-right: 34px; word-break: break-all; }
.aim-hist-item .ahi-meta { font-size: 11px; color: #8a938c; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.aim-hist-item .ahi-del {
  position: absolute; top: 6px; right: 6px; border: none; background: none; color: #b9c2ba;
  cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 4px; display: none; line-height: 1;
}
.aim-hist-item:hover .ahi-del { display: block; }
.aim-hist-item .ahi-del:hover { color: #e05555; background: #fdeeee; }
.aim-hist-empty { padding: 20px 14px; font-size: 12px; color: #8a938c; text-align: center; line-height: 1.8; }

/* ===== 0915-03：新消息页（待办面板搬迁） / AI同事占位页 ===== */
#page-inbox { overflow: hidden; }
#page-inbox > #oa2-task { flex: 1; min-height: 0; }
#page-inbox #inboxExtra { flex-shrink: 0; }


/* ===== 0915-07：AI同事 页（市场调研员 🧭 / 供应链调研员 🔗 + 周报阅读） ===== */
#page-colleague { overflow: hidden; padding: 14px 18px 16px; gap: 12px; }
.col-head { flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.col-title { font-size: 18px; font-weight: 700; color: #2c5c3e; line-height: 1.3; }
.col-sub { font-size: 12px; color: #8a938c; margin-top: 3px; }
.col-head-right { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.col-week-label { font-size: 12px; color: #8a938c; }
.col-week {
  font-size: 12px; font-weight: 600; color: var(--primary-dark); background: var(--primary-light);
  border: 1px solid #bfe0cc; border-radius: 999px; padding: 3px 10px;
}
.col-icon-btn {
  border: 1px solid #d5e5da; background: #fff; color: #3a7a58; border-radius: 8px;
  padding: 3px 9px; font-size: 14px; line-height: 1.2; cursor: pointer; font-family: inherit;
}
.col-icon-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.col-msg {
  flex-shrink: 0; font-size: 12px; color: #3a7a58; background: #f4faf6;
  border: 1px solid #cfe8da; border-radius: 8px; padding: 7px 11px; line-height: 1.6;
}
.col-msg.err { color: #c0392b; background: #fdf2f0; border-color: #f0cfc9; }
.col-msg.ok { color: #26794c; background: #eaf7ef; border-color: #bfe0cc; }
.col-cards { flex-shrink: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.col-card {
  border: 1px solid #e6ece7; background: #fff; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(44, 92, 62, .05); cursor: pointer;
}
.col-card:hover { border-color: #bfe0cc; }
.col-card.active { border-color: var(--primary); box-shadow: 0 2px 10px rgba(47, 168, 96, .14); }
.col-card-top { display: flex; align-items: center; gap: 10px; }
.col-avatar {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--primary-light);
  border: 1px solid #d7ecdf; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.col-name { font-size: 14px; font-weight: 700; color: #2b3a30; line-height: 1.35; }
.col-post { font-size: 11px; color: #8a938c; margin-top: 2px; }
.col-duty {
  font-size: 12px; color: #55665c; line-height: 1.6; margin-top: 9px; min-height: 34px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.col-topics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.col-chip {
  font-size: 11px; color: #3a7a58; background: #f1f8f3; border: 1px solid #dcece2;
  border-radius: 999px; padding: 2px 8px;
}
.col-status { font-size: 12px; color: #55665c; margin-top: 9px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.col-st-done { color: #26794c; font-weight: 600; }
.col-st-wait { color: #b3752a; font-weight: 600; }
.col-status-meta { font-size: 11px; color: #8a938c; }
.col-card-actions { display: flex; gap: 8px; margin-top: 11px; }
.col-btn {
  border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  border: 1px solid transparent; line-height: 1.5; font-family: inherit;
}
.col-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.col-btn-primary:hover:enabled { background: var(--primary-dark); }
.col-btn-ghost { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.col-btn-ghost:hover:enabled { background: var(--primary-light); }
.col-btn:disabled { opacity: .65; cursor: default; background: #9dc7ae; border-color: #9dc7ae; color: #fff; }
.col-reader { flex: 1; min-height: 0; display: flex; gap: 12px; }
.col-reader-list {
  width: 236px; flex-shrink: 0; min-height: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e6ece7; border-radius: 12px;
}
.col-reader-list-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 9px 11px; border-bottom: 1px solid #eef3ef; font-size: 12px; color: #2b3a30; font-weight: 600;
}
.col-reader-count { font-size: 11px; color: #8a938c; font-weight: 400; }
.col-reader-list-title { font-size: 12px; font-weight: 600; color: #2b3a30; }
.col-report-list { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.col-report-item {
  display: block; width: 100%; text-align: left; font-family: inherit; border: 1px solid #eef3ef;
  background: #fff; border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; cursor: pointer;
}
.col-report-item:hover { border-color: #bfe0cc; background: #f6fbf7; }
.col-report-item.active { border-color: var(--primary); background: #eaf6ef; }
.col-report-item .cri-title { display: block; font-size: 12px; font-weight: 600; color: #2b3a30; line-height: 1.45; word-break: break-all; }
.col-report-item .cri-meta { display: block; font-size: 11px; color: #8a938c; margin-top: 3px; }
.col-reader-body {
  flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e6ece7; border-radius: 12px;
}
.col-report-head { flex-shrink: 0; padding: 11px 14px; border-bottom: 1px solid #eef3ef; }
.col-report-head .crh-title { font-size: 14px; font-weight: 700; color: #2b3a30; line-height: 1.5; }
.col-report-head .crh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.col-report-head .crh-tag {
  font-size: 11px; color: #55665c; background: #f5f8f6; border: 1px solid #e6ece7;
  border-radius: 999px; padding: 2px 8px;
}
.col-report-body {
  flex: 1; min-height: 0; overflow: auto; padding: 13px 16px 24px;
  white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.75; color: #2b3a30;
}
.col-empty { padding: 22px 16px; text-align: center; font-size: 12px; color: #8a938c; line-height: 1.9; }
.col-empty-sm { padding: 14px 10px; text-align: center; font-size: 12px; color: #8a938c; line-height: 1.8; }
@media (max-width: 900px) {
  #page-colleague { overflow: auto; }
  .col-cards { grid-template-columns: minmax(0, 1fr); }
  .col-reader { flex-direction: column; }
  .col-reader-list { width: 100%; max-height: 190px; }
}


/* ===== 0916-01：AI同事 页改版（左栏团队列表 + 右侧形象横幅 + 工作流/工作日历/任务列表/工作成果） ===== */
#page-colleague { overflow: hidden; padding: 14px 18px 16px; gap: 12px; }
.colteam { flex: 1; min-height: 0; display: flex; gap: 12px; }

/* —— 左栏：我的团队 + 同事列表 —— */
.colteam-side {
  width: 238px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px 6px;
}
.colteam-team {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  background: #f4f8f5; border: 1px solid #e3ece5; border-radius: 10px; padding: 9px 10px;
}
.colteam-team.active { background: var(--primary-light); border-color: #bfe0cc; }
.colteam-team-ico { font-size: 18px; }
.colteam-team-txt { display: flex; flex-direction: column; line-height: 1.35; }
.colteam-team-txt b { font-size: 13px; color: #2b3a30; }
.colteam-team-txt i { font-size: 11px; color: #8a938c; font-style: normal; }
.colteam-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.colteam-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid transparent; border-radius: 10px; padding: 8px 9px; font: inherit;
}
.colteam-item:hover { background: #f7faf8; }
.colteam-item.active { background: var(--primary-light); border-color: #cfe8d8; }
.colteam-ava {
  width: 36px; height: 36px; border-radius: 9px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: linear-gradient(135deg, #eaf6ee, #d8ecdf);
}
.colteam-ava img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.colteam-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.colteam-name { font-size: 13px; font-weight: 600; color: #2b3a30; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colteam-post { font-size: 11px; color: #8a938c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colteam-st { font-size: 10.5px; color: #98a49b; margin-top: 1px; }
.colteam-st b { color: #26794c; font-weight: 600; }
.colteam-st b.wait { color: #b3752a; }
.colteam-side-foot { flex-shrink: 0; font-size: 11px; color: #98a49b; text-align: center; padding: 7px 0 2px; border-top: 1px solid #eef3ef; }

/* —— 右区：形象横幅 —— */
.colteam-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.colbanner {
  flex-shrink: 0; display: flex; gap: 16px; align-items: stretch;
  background: linear-gradient(120deg, #eef7f1 0%, #e3f1e9 48%, #dcefe6 100%);
  border: 1px solid #d8eadf; border-radius: 14px; padding: 12px 14px;
}
.colbanner-photo {
  width: 96px; height: 122px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: #fff;
  box-shadow: 0 2px 10px rgba(38, 121, 76, .12); display: flex; align-items: center; justify-content: center;
}
.colbanner-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.colbanner-ph-ico { font-size: 44px; }
.colbanner-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.colbanner-hi { font-size: 17px; font-weight: 700; color: #24503a; line-height: 1.4; }
.colbanner-sub { font-size: 11.5px; color: #6b7d72; margin-top: 4px; line-height: 1.65; }
.colbanner-stats { display: flex; gap: 26px; margin-top: 10px; flex-wrap: wrap; }
.colstat { display: flex; flex-direction: column; line-height: 1.3; }
.colstat-n { font-size: 19px; font-weight: 700; color: #24503a; }
.colstat-l { font-size: 11px; color: #7b8b81; margin-top: 1px; }
.colbanner-acts { display: flex; flex-direction: column; gap: 8px; justify-content: center; width: 186px; flex-shrink: 0; }
.colact {
  display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer; text-align: left; font: inherit;
  background: #fff; border: 1px solid #d8eadf; border-radius: 10px; padding: 9px 11px;
  box-shadow: 0 1px 4px rgba(38, 121, 76, .06);
}
.colact:hover { border-color: var(--primary); background: #fbfffc; }
.colact-ico { font-size: 17px; }
.colact-txt { font-size: 12.5px; font-weight: 600; color: #2b5c42; flex: 1; }
.colact-go { color: #9db3a6; font-size: 14px; }
.colact[disabled] { opacity: .5; cursor: not-allowed; }

/* —— 四个标签 —— */
.coltabs { flex-shrink: 0; display: flex; gap: 22px; border-bottom: 1px solid #e6eee9; padding: 0 4px; }
.coltab {
  background: none; border: none; cursor: pointer; padding: 8px 2px 9px; font-size: 13px; color: #55665c;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit;
}
.coltab:hover { color: var(--primary-dark); }
.coltab.active { color: var(--primary-dark); font-weight: 600; border-bottom-color: var(--primary); }
.colpanes { flex: 1; min-height: 0; display: flex; }
.colpane { display: none; flex: 1; min-width: 0; min-height: 0; flex-direction: column; gap: 8px; }
.colpane.active { display: flex; }
.colbar { flex-shrink: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 2px 6px; }
.col-bar-spacer { flex: 1; }
.col-bar-dash { color: #b9c2ba; font-size: 12px; }
.col-select, .col-date {
  font-size: 12px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #2b3a30;
}
.col-select { max-width: 150px; }
.col-date { width: 132px; }
.col-check { font-size: 12px; color: #55665c; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.col-pane-hint { font-size: 12px; color: #8a938c; }
.col-subtabs { display: flex; gap: 14px; }
.col-subtab { background: none; border: none; cursor: pointer; font-size: 12.5px; color: #55665c; padding: 4px 0; font-family: inherit; }
.col-subtab.active { color: var(--primary-dark); font-weight: 600; }

/* —— 工作流时间轴 —— */
.colfeed { flex: 1; min-height: 0; overflow: auto; padding: 2px 4px 14px 2px; }
.cf-day { font-size: 12.5px; font-weight: 700; color: #2b5c42; margin: 12px 0 6px 24px; }
.cf-item { position: relative; padding-left: 24px; padding-bottom: 10px; }
.cf-item::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -4px; width: 1px; background: #dfeae4; }
.cf-item:last-child::before { display: none; }
.cf-dot { position: absolute; left: 1px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.cf-item.kind-task .cf-dot { border-color: #d9a03a; }
.cf-item.kind-colleague .cf-dot { border-color: #4a8fd8; }
.cf-item.kind-note .cf-dot { border-color: #b9c2ba; }
.cf-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.cf-head { display: flex; align-items: center; gap: 8px; }
.cf-ico { font-size: 14px; }
.cf-title { font-size: 12.5px; font-weight: 700; color: #2b3a30; }
.cf-time { font-size: 11px; color: #9aa79e; margin-left: auto; white-space: nowrap; }
.cf-body { font-size: 12px; color: #55665c; line-height: 1.7; margin-top: 5px; white-space: pre-wrap; word-break: break-word; }
.cf-link { font-size: 11.5px; color: var(--primary-dark); background: none; border: none; cursor: pointer; padding: 0; margin-top: 5px; font-family: inherit; }
.cf-link:hover { text-decoration: underline; }

/* —— 工作日历 —— */
.colcal { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px 12px; }
.colcal-title, .col-cal-title { font-size: 13px; font-weight: 700; color: #2b5c42; }
.colcal-hd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 2px 0 6px; }
.colcal-hd span { font-size: 11.5px; color: #8a938c; text-align: center; }
.colcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.colcal-cell { min-height: 86px; border: 1px solid #eef3ef; border-radius: 8px; padding: 5px 6px; background: #fdfefd; }
.colcal-cell.out { background: #fafbfa; border-color: #f4f7f5; }
.colcal-d { font-size: 11.5px; color: #55665c; }
.colcal-cell.today .colcal-d {
  background: var(--primary); color: #fff; border-radius: 50%; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.colcal-ev {
  margin-top: 4px; font-size: 10.5px; color: #2b5c42; background: #eaf6ee; border-radius: 5px; padding: 3px 5px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.colcal-ev:hover { background: #ddf0e5; }
.colcal-ev.plan { background: #f4f6f4; color: #7b8b81; cursor: default; }
.colcal-ev.plan:hover { background: #f4f6f4; }

/* —— 任务列表 —— */
.coltasks { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 4px 14px 2px; }
.coltask-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ct-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f4f8f5; border-bottom: 1px solid #eef3ef; flex-wrap: wrap; }
.ct-tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 6px; padding: 2px 7px; }
.ct-title { font-size: 13px; font-weight: 700; color: #2b3a30; }
.ct-badge { font-size: 11px; border-radius: 999px; padding: 2px 8px; background: #eaf6ee; color: #26794c; }
.ct-badge.paused { background: #fdf3e3; color: #b3752a; }
.ct-badge.done { background: #eef1f6; color: #5a6b7f; }
.ct-cnt { font-size: 11px; color: #9aa79e; margin-left: auto; }
.ct-body { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 6px; }
.ct-row { display: flex; gap: 7px; font-size: 12px; color: #55665c; line-height: 1.65; }
.ct-row .ct-k { color: #8a938c; flex-shrink: 0; width: 62px; }
.ct-row .ct-v { flex: 1; min-width: 0; word-break: break-word; }
.ct-stat {
  display: flex; gap: 18px; flex-wrap: wrap; margin: 0 12px 10px; background: #fafcfa;
  border-radius: 8px; padding: 7px 12px; font-size: 11.5px; color: #55665c;
}
.ct-stat b { color: #24503a; }
.ct-acts { display: flex; gap: 8px; padding: 0 12px 11px; }

/* —— 工作成果 —— */
.colres { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.colres table { width: 100%; border-collapse: collapse; font-size: 12px; }
.colres th {
  position: sticky; top: 0; background: #f4f8f5; color: #5a6b5f; font-weight: 600; text-align: left;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
}
.colres td { padding: 9px 12px; border-bottom: 1px solid #f2f6f3; color: #3c4b42; vertical-align: top; }
.colres tr:hover td { background: #fbfdfb; }
.colres a { color: var(--primary-dark); text-decoration: none; }
.colres a:hover { text-decoration: underline; }
.colres .col-btn { padding: 3px 9px; font-size: 11.5px; }

/* —— 弹层（周报阅读 / 任务编辑） —— */
.col-modal {
  position: fixed; inset: 0; background: rgba(20, 34, 26, .38); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 28px;
}
.col-modal-box {
  background: #fff; border-radius: 14px; width: min(880px, 100%); max-height: 100%;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 50px rgba(20, 34, 26, .22);
}
.cm-head { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #eef3ef; }
.cm-title { font-size: 14px; font-weight: 700; color: #2b3a30; flex: 1; min-width: 0; }
.cm-close { background: none; border: none; font-size: 18px; color: #9aa79e; cursor: pointer; line-height: 1; }
.cm-close:hover { color: #e05555; }
.cm-meta { flex-shrink: 0; display: flex; gap: 8px; flex-wrap: wrap; padding: 9px 16px 2px; }
.cm-tag { font-size: 11px; color: #55665c; background: #f4f8f5; border-radius: 6px; padding: 2px 8px; }
.cm-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px 18px; font-size: 12.5px; color: #3c4b42; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.cm-form { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.cm-field { display: flex; flex-direction: column; gap: 5px; }
.cm-field label { font-size: 12px; color: #55665c; font-weight: 600; }
.cm-field input, .cm-field textarea, .cm-field select {
  font-size: 12.5px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: #2b3a30; font-family: inherit;
}
.cm-field textarea { min-height: 66px; resize: vertical; }
.cm-hint { font-size: 11px; color: #9aa79e; }
.cm-foot { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 9px; padding: 11px 16px 14px; border-top: 1px solid #eef3ef; }
@media (max-width: 1080px) {
  .colteam { flex-direction: column; }
  .colteam-side { width: auto; }
  .colbanner-acts { width: 160px; }
}

/* 0916-02：素材库 / 产物状态徽标 */
.cm-assets { max-height: 190px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fbfdfb; }
.cm-asset { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; color: #55665c; }
.cm-asset:hover { background: #f1f7f3; }
.cm-asset input, .cm-asset-ck { flex-shrink: 0; margin: 0; }
.cm-asset-ico { font-size: 14px; }
.cm-asset-name { color: #2b3a30; font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-asset-meta { color: #9aa79e; font-size: 11px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.cm-file { font-size: 12px; padding: 6px; border: 1px dashed var(--border); border-radius: 8px; background: #fbfdfb; width: 100%; }
.out-badge { display: inline-block; font-size: 11px; border-radius: 999px; padding: 2px 8px; background: #eef1f6; color: #5a6b7f; }
.out-badge.pending { background: #fdf3e3; color: #b3752a; }
.out-badge.approved { background: #eaf6ee; color: #26794c; }
.out-badge.rejected { background: #fdeeee; color: #c04545; }
.out-badge.published { background: #e9f1fb; color: #2f6bb0; }

/* ============ 0917-03：前台助理（打印中心 / 访客记录 / 人脸底库 / 打印日志） ============ */
.rcp-bar-box { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fbfdfb; margin-bottom: 10px; }
.rcp-bar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; font-size: 12px; }
.rcp-bar-row.rcp-last { color: #66766c; }
.rcp-k { color: #5c6b61; font-weight: 600; flex-shrink: 0; }
.rcp-v { color: #2b3a30; }
.rcp-v.ok { color: #26794c; }
.rcp-v.bad { color: #c04545; }
.rcp-v.idle { color: #99a59b; }
.rcp-mini { border: 1px solid var(--border); background: #fff; color: #40524a; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.rcp-mini:hover { background: #f1f7f3; }
.rcp-mini.danger { color: #c04545; border-color: #f0cccc; }
.rcp-mini:disabled { opacity: .5; cursor: default; }
.rcp-sel { border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; font-size: 12px; color: #2b3a30; background: #fff; max-width: 260px; }
.rcp-sel-lg { max-width: 320px; }
.rcp-num { width: 64px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.rcp-in { border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; font-size: 12px; min-width: 130px; }
.rcp-date { border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.rcp-go { border: 0; background: var(--primary, #2fa860); color: #fff; border-radius: 7px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; }
.rcp-go:hover { filter: brightness(1.06); }
.rcp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; }
.rcp-row-end { justify-content: flex-end; border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 9px; }
.rcp-hint { font-size: 11.5px; color: #98a49a; }
.rcp-dim { color: #98a49a; font-size: 11.5px; }
.rcp-msg { font-size: 12.5px; padding: 7px 9px; border-radius: 8px; margin: 6px 0; background: #f4f7f5; color: #40524a; }
.rcp-msg.ok { background: #eaf6ee; color: #26794c; }
.rcp-msg.bad { background: #fdeeee; color: #b93f3f; }
.rcp-msg.busy { background: #f1f6fb; color: #2f6bb0; }
.rcp-receipt { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fbfdfb; font-size: 12px; color: #40524a; line-height: 1.8; }
.rcp-warn { color: #b3752a; }
.rcp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 4px 0 8px; }
.rcp-tab { border: 0; background: transparent; color: #66766c; font-size: 12.5px; padding: 7px 11px; cursor: pointer; border-bottom: 2px solid transparent; }
.rcp-tab.active { color: var(--primary, #2fa860); border-bottom-color: var(--primary, #2fa860); font-weight: 600; }
.rcp-pane { min-height: 120px; }
.rcp-foot { margin-top: 4px; }
.rcp-tip { margin-top: 10px; font-size: 11.5px; color: #98a49a; line-height: 1.7; border-top: 1px dashed var(--border); padding-top: 8px; }
.rcp-files { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.rcp-frow { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f0f4f1; background: #fff; padding: 7px 10px; cursor: pointer; font-size: 12px; }
.rcp-frow:hover { background: #f7fbf8; }
.rcp-frow.picked { background: #eaf6ee; }
.rcp-fico { flex-shrink: 0; }
.rcp-fname { color: #2b3a30; font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcp-fmeta { margin-left: auto; color: #98a49a; font-size: 11px; white-space: nowrap; }
.rcp-frame { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.rcp-vis { max-height: 380px; overflow: auto; }
.rcp-vrow { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; margin-bottom: 7px; background: #fff; }
.rcp-vph { width: 64px; height: 64px; flex-shrink: 0; border-radius: 7px; overflow: hidden; background: #f2f5f3; display: flex; align-items: center; justify-content: center; }
.rcp-vph img { width: 100%; height: 100%; object-fit: cover; }
.rcp-vno { font-size: 10.5px; color: #a8b2aa; }
.rcp-vmain { flex: 1; min-width: 0; font-size: 12px; color: #40524a; }
.rcp-vt { font-weight: 600; color: #2b3a30; margin-bottom: 3px; }
.rcp-vd { line-height: 1.7; }
.rcp-tag2 { font-size: 10.5px; background: #e9f1fb; color: #2f6bb0; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.rcp-vact { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.rcp-vedit { margin: -4px 0 7px; }
.rcp-eform { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding: 8px 10px; background: #f7fbf8; border: 1px dashed var(--border); border-radius: 8px; }
.rcp-faces { max-height: 320px; overflow: auto; }
.rcp-frow2 { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f4f1; padding: 7px 4px; }
.rcp-fph { width: 48px; height: 48px; border-radius: 7px; overflow: hidden; background: #f2f5f3; flex-shrink: 0; }
.rcp-fph img { width: 100%; height: 100%; object-fit: cover; }
.rcp-fmain { flex: 1; min-width: 0; font-size: 12px; color: #40524a; display: flex; flex-direction: column; gap: 2px; }
.rcp-addbox { border: 1px dashed var(--border); border-radius: 9px; padding: 8px 10px; background: #fbfdfb; margin-bottom: 10px; }
.rcp-filelbl { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; color: #40524a; }
.rcp-filelbl:hover { background: #f1f7f3; }
.rcp-logs { max-height: 400px; overflow: auto; }
.rcp-lrow { display: grid; grid-template-columns: 130px 70px 1fr 62px 150px 52px 60px; gap: 6px; align-items: center; font-size: 11.5px; color: #40524a; padding: 5px 4px; border-bottom: 1px solid #f2f5f3; }
.rcp-lhead { font-weight: 600; color: #5c6b61; background: #f7fbf8; position: sticky; top: 0; }
.rcp-lerr { grid-column: 1 / -1; color: #b93f3f; font-size: 11px; padding: 2px 4px 6px; }
.rcp-ok { color: #26794c; }
.rcp-bad { color: #c04545; }
.rcp-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 0919-02：对话后台任务（A级·输入框上方任务区 / B级·项目级面板 / 0919-01 版本信息）===== */
.bg-task-bar { max-width: 860px; margin: 0 auto 8px; display: flex; flex-direction: column; gap: 6px; }
.bg-task-item {
  background: #f4faf5; border: 1px solid #cfe8d6; border-left: 3px solid var(--primary);
  border-radius: 10px; padding: 8px 12px;
}
.bg-task-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #2b3a30; font-weight: 600; }
.bg-task-k { background: var(--primary); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 6px; }
.bg-task-meta { margin-left: auto; font-weight: 400; color: #6a7a6f; font-size: 11px; }
.bg-task-bar-inner { height: 5px; background: #e2eee6; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bg-task-fill { height: 100%; background: var(--primary); width: 0; transition: width .4s; }
.bg-task-msg { font-size: 11px; color: #7b8a80; margin-top: 4px; }
.btn-tobg {
  padding: 8px 12px; border: 1px solid #cfe0d3; background: #fff; color: var(--primary);
  border-radius: 10px; font-size: 12px; cursor: pointer;
}
.btn-tobg:hover { background: #f2f9f4; }
.chat-task-card {
  background: #fff; border: 1px solid #e2e9e3; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.chat-task-card .ct-title { font-size: 13px; font-weight: 600; color: #2b3a30; }
.chat-task-card .ct-meta { font-size: 11px; color: #7b8a80; }
.chat-task-card .ct-result {
  font-size: 11px; color: #4a5c50; background: #f6f8fa; border-radius: 6px; padding: 6px 8px;
  white-space: pre-wrap; max-height: 140px; overflow: auto;
}
.chat-task-card .ct-error { font-size: 11px; color: #c0392b; }
.chat-task-card .ct-actions { display: flex; gap: 8px; margin-top: 2px; }
.ct-btn {
  border: 1px solid #d5e5da; background: #fff; color: #4a5c50; border-radius: 6px;
  font-size: 11px; padding: 3px 10px; cursor: pointer;
}
.ct-btn:hover { border-color: var(--primary); color: var(--primary); }
.ct-btn.danger:hover { border-color: #e74c3c; color: #e74c3c; }
.ct-status { font-size: 10px; border-radius: 6px; padding: 1px 6px; }
.ct-status.running { background: #eaf6ee; color: #2fa860; }
.ct-status.done { background: #eef2f7; color: #4a6fa5; }
.ct-status.error { background: #fdeeee; color: #c0392b; }
.bg-cfg { background: #f7faf8; border: 1px solid #e2ebe5; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.bg-cfg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.bg-cfg-row label { color: #55665c; min-width: 150px; }
.bg-cfg-unit { color: #7b8a80; font-size: 11px; }
/* 0919-01：关于软件 → 版本信息块 */
.about-ver { background: #f7faf8; border: 1px solid #e2ebe5; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.about-ver-row { display: flex; gap: 10px; font-size: 12px; padding: 3px 0; }
.about-ver-k { color: #7b8a80; min-width: 92px; }
.about-ver-v { color: #2b3a30; font-weight: 600; }
.about-ver-tag { display: inline-block; background: var(--primary); color: #fff; border-radius: 6px; font-size: 10px; padding: 1px 7px; margin-left: 4px; }
.about-ver-tag.warn { background: #d98a1f; }
/* 任务标题（gate 覆盖检查要求：JS 用到的类都要有样式） */
.bg-task-title { font-weight: 600; color: #2b3a30; }
.ct-danger { border-color: #f0c8c8; color: #c0392b; }

/* ===== 0919-15：AI 内容主编 · 创作会话（对话式需求确认）===== */
/* 左栏：部门分组 */
.colteam-dept { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 4px; font-size: 11px; letter-spacing: .5px; color: #9aa8a0; }
.colteam-dept-name { font-weight: 700; color: #55665c; }
.colteam-item.lead { background: linear-gradient(90deg, rgba(47, 168, 96, .10), transparent); border-left: 2px solid var(--primary); }
.colteam-lead-tag { display: inline-block; background: var(--primary); color: #fff; border-radius: 5px; font-size: 9px; padding: 0 5px; margin-left: 4px; font-weight: 600; vertical-align: 1px; }
/* 主区：创作会话 */
.coleditor { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.col-ed-title { font-weight: 600; color: #2b3a30; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-ed-round { color: #9aa8a0; font-size: 11px; }
.coleditor-chat { flex: 1; min-height: 240px; overflow-y: auto; background: #f7faf8; border: 1px solid #e2ebe5; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.coled-msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.coled-msg.me { align-self: flex-end; align-items: flex-end; }
.coled-who { font-size: 10.5px; color: #9aa8a0; }
.coled-text { background: #fff; border: 1px solid #e2ebe5; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.65; color: #2b3a30; word-break: break-word; }
.coled-msg.me .coled-text { background: var(--primary); border-color: var(--primary); color: #fff; white-space: pre-wrap; }
.coled-text p { margin: 0 0 6px; }
.coled-text p:last-child { margin-bottom: 0; }
.coled-notice { font-size: 11.5px; color: #7b8a80; padding: 2px 4px; }
.coled-notice.ok { color: var(--primary); font-weight: 600; }
.coled-notice.err { color: #c0392b; font-weight: 600; }
.coleditor-brief { background: #fff; border: 1px solid #e2ebe5; border-radius: 10px; padding: 12px 14px; max-height: 300px; overflow-y: auto; }
/* 0920-02：资料清单（主编列候选 / 用户勾选 / 未确认不得进入制作） */
.coleditor-mat { background: #fff; border: 1px solid #e2ebe5; border-radius: 10px; padding: 12px 14px; max-height: 250px; overflow-y: auto; margin-top: 8px; }
.coled-mat-hint { font-weight: 400; color: #7b8a80; font-size: 11.5px; margin-left: 6px; }
.coled-mat-bar { display: flex; gap: 8px; margin-bottom: 8px; }
.coled-mat-bar input { flex: 1; border: 1px solid #dfe7e2; border-radius: 7px; padding: 5px 9px; font-size: 12.5px; font-family: inherit; box-sizing: border-box; }
.coled-mat-list { display: flex; flex-direction: column; gap: 3px; }
.coled-mat-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; cursor: pointer; font-size: 12.5px; margin: 0; }
.coled-mat-row:hover { background: #f6faf7; }
.coled-mat-row.on { background: var(--primary-light); }
.coled-mat-nm { flex: 1; word-break: break-all; }
.coled-mat-st { font-size: 11px; color: #7b8a80; flex-shrink: 0; }
.coled-mat-row.on .coled-mat-st { color: var(--primary-dark); font-weight: 600; }
.coled-mat-empty { font-size: 12px; color: #7b8a80; padding: 4px 2px; }
.coled-brief-head { font-weight: 700; color: #2b3a30; font-size: 13px; margin-bottom: 8px; }
.coled-brief-head .warn { color: #d98a1f; font-weight: 600; }
.coled-brief-tb { width: 100%; border-collapse: collapse; font-size: 12px; }
.coled-brief-tb th { text-align: left; color: #7b8a80; font-weight: 500; width: 88px; padding: 3px 6px 3px 0; vertical-align: top; }
.coled-brief-tb td { color: #2b3a30; padding: 3px 0; word-break: break-word; }
.coled-null { color: #c3cdc6; }
.coled-brief-sub { font-weight: 600; color: #55665c; font-size: 12px; margin: 10px 0 4px; }
.coleditor-brief ol { margin: 0; padding-left: 20px; font-size: 12px; color: #2b3a30; line-height: 1.7; }
.coleditor-input { display: flex; gap: 8px; align-items: flex-end; }
.coleditor-input textarea { flex: 1; resize: vertical; min-height: 46px; max-height: 140px; border: 1px solid #e2ebe5; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; font-family: inherit; color: #2b3a30; background: #fff; }
.coleditor-input textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(47, 168, 96, .12); }

/* 0920-07：主编工具过程行（对齐 AI 助手「过程可见」） */
.coled-tool { margin: 3px 14px; font-size: 11.5px; color: #8a9a91; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════════════════
   0921：上传素材弹窗（AI 素材管理员）—— 四行表单
   ⚠️ 一律用主题变量（--card/--border/--text/--primary…），勿硬编码颜色：
      本项目为浅色主题，写死深色会变成"黑底输入框"。
   ══════════════════════════════════════════════════════════════════════════ */
.au-form { display: flex; flex-direction: column; gap: 10px; }
.au-row { display: flex; gap: 10px; flex-wrap: wrap; }
.au-row-full { display: block; }
.au-f { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; position: relative; min-width: 0; }
.au-f-wide { flex: 2 1 260px; }
.au-f > span { font-size: 12px; color: var(--text-muted); }
.au-f input, .au-f select, .au-f textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.au-f input::placeholder, .au-f textarea::placeholder { color: var(--text-muted); }
.au-f input:focus, .au-f select:focus, .au-f textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.au-f textarea { resize: vertical; min-height: 64px; max-height: 220px; line-height: 1.55; }
.au-sug {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  max-height: 220px; overflow: auto; margin-top: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.au-sug-item { padding: 7px 10px; font-size: 13px; cursor: pointer; color: var(--text); }
.au-sug-item:hover { background: var(--primary-light); }
.au-sug-sub { color: var(--text-muted); font-size: 11px; margin-left: 6px; }
.au-hint { font-size: 12px; color: var(--text-muted); padding: 6px 2px; line-height: 1.6; }
/* 0921-5：社媒发布记录 —— 分区小标题 */
.pr-sec { font-size: 13px; font-weight: 700; color: var(--text); margin: 12px 0 6px; }
.pr-sec:first-child { margin-top: 0; }
.au-pre {
  white-space: pre-wrap; word-break: break-all; font-size: 12.5px;
  line-height: 1.65; color: var(--text); margin: 0;
  font-family: Consolas, 'Microsoft YaHei', monospace;
}

/* ══════════════════════════════════════════════════════════════════════════
   0921-4：左栏 —— 主管卡片 + 下属折叠（右下角倒三角，默认折叠）
   口径：只对接主编一人；下属仅"看工作状态"，点倒三角才展开
   ══════════════════════════════════════════════════════════════════════════ */
.colteam-leadwrap { position: relative; }
.colteam-leadwrap .colteam-item { position: relative; }
/* 0921-5：倒三角 —— 移到**头像正下方**，放大；展开时旋转 180° 变上三角 */
.colteam-fold {
  position: absolute; left: 15px; top: 46px;
  width: 30px; height: 20px; line-height: 19px; text-align: center;
  border-radius: 6px; cursor: pointer;
  color: var(--text-muted); font-size: 17px; font-weight: 700;
  user-select: none; z-index: 3;
  transition: transform .18s, background .15s, color .15s;
}
.colteam-fold:hover { background: var(--primary-light); color: var(--primary); }
.colteam-fold.open { transform: rotate(180deg); }
.colteam-subs { display: none; }
.colteam-subs.open { display: block; }

/* 0921-5b：社媒发布记录 —— 可编辑登记表 */
.pr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pr-table th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; }
.pr-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.pr-table tr.pr-blank td { height: 30px; color: var(--text-muted); }
.pr-table tr.pr-editing { background: var(--primary-light); }
.pr-in { width: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 5px 7px; font-size: 13px; font-family: inherit; outline: none; }
.pr-in:focus { border-color: var(--primary); }
.pr-ops { white-space: nowrap; }
.pr-sub { color: var(--text-muted); font-size: 11px; margin-left: 4px; }
.pr-lock { color: var(--text-muted); font-size: 12px; cursor: not-allowed; }
.pr-foot { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.pr-tip { color: var(--text-muted); font-size: 12px; }
/* 0921-6：发布记录 —— 右上角「新增记录」+ 末行「新增一行」 */
.pr-addtop { margin-left: auto; margin-right: 8px; }
.pr-addrow td { padding: 6px 8px; }
.pr-addrow .col-btn { opacity: .85; }
.pr-addrow .col-btn:hover { opacity: 1; }
/* ═══ 0930-03（用户定）：录入记账弹窗 右上角三件套 + 边沿拖拽改尺寸 ═══ */
#finLedgerDlg { position: relative; }
#finLedgerDlg .flg-wbtn { width: 28px; height: 24px; line-height: 22px; padding: 0;
  border: 1px solid var(--border); background: var(--card); color: var(--text-muted);
  border-radius: 6px; cursor: pointer; font-size: 13px; font-family: inherit; }
#finLedgerDlg .flg-wbtn:hover { border-color: var(--primary); color: var(--primary); }
#finLedgerDlg .flg-wbtn.flg-close:hover { border-color: #d64541; color: #d64541; }
.flg-hdl { position: absolute; z-index: 5; }
.flg-n { left: 8px; right: 8px; top: -3px; height: 7px; cursor: ns-resize; }
.flg-s { left: 8px; right: 8px; bottom: -3px; height: 7px; cursor: ns-resize; }
.flg-w { top: 8px; bottom: 8px; left: -3px; width: 7px; cursor: ew-resize; }
.flg-e { top: 8px; bottom: 8px; right: -3px; width: 7px; cursor: ew-resize; }
.flg-nw { left: -3px; top: -3px; width: 14px; height: 14px; cursor: nwse-resize; }
.flg-ne { right: -3px; top: -3px; width: 14px; height: 14px; cursor: nesw-resize; }
.flg-sw { left: -3px; bottom: -3px; width: 14px; height: 14px; cursor: nesw-resize; }
.flg-se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: nwse-resize; }
/* ═══ 1004-05：权限矩阵 —— 角色表头竖排（列宽 16px）+ 点击弹人员气泡 ═══ */
#pmTable { table-layout: fixed; }
#pmTable th:first-child, #pmTable td:first-child { overflow: hidden; }
#pmTable th.pm-role-th { transition: background .12s, color .12s; }
#pmTable th.pm-role-th:hover { background: #e6f0e9 !important; color: #1e7a3c; }
.pm-role-tip {
  position: fixed; z-index: 99999; min-width: 110px; max-width: 300px;
  background: #fff; border: 1px solid #cfe0d5; border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .16); padding: 8px 10px;
}
.pm-role-tip-h { font-size: 12px; font-weight: 700; color: #2c5c3e; margin-bottom: 4px; }
.pm-role-tip-b { font-size: 12px; color: #4a5550; line-height: 1.7; word-break: break-all; }

/* 261010：信息收集卡多选字段（type="multi"）—— 勾选组平铺换行 */
.cm-multi-box { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.cm-multi-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.4; cursor: pointer; user-select: none; }
.cm-multi-item input[type="checkbox"] { margin: 0; flex: 0 0 auto; }
.cm-multi-item:hover { color: var(--accent, #2a5caa); }


/* ══ 261011-06 BS0101 全链路合同编制及审定 ══ */
.cm-field-items{width:100%;flex-direction:column !important;align-items:stretch !important}
.cm-items-box{display:block;width:100%}
.cm-items-table{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}
.cm-items-table th,.cm-items-table td{border:1px solid #d5e5da;padding:2px 4px;text-align:left}
.cm-items-table th{background:#f2f9f5;font-weight:600;white-space:nowrap}
.cm-items-table input{width:100%;border:none;outline:none;font-size:12px;padding:2px;box-sizing:border-box}
.cm-items-del{border:none;background:#fff;color:#c0392b;cursor:pointer;font-size:12px}
.cm-items-btns{display:flex;gap:8px;margin-top:4px}
.cm-items-btns button{border:1px solid #2fa860;background:#fff;color:#2fa860;border-radius:6px;padding:2px 10px;font-size:12px;cursor:pointer}
.cm-upload-thumb{display:flex;align-items:center;justify-content:center;text-align:center;word-break:break-all;font-size:11px;color:#2fa860;padding:2px;overflow:hidden}

/* 261011-09：可搜索组合框（客户下拉 → 输入关键字自动补全 + 点击选中） */
.cm-combo { position: relative; width: 100%; }
.cm-combo-inp { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d8e2da;
  border-radius: 6px; font-size: 12px; color: #2b3a30; background: #fff; }
.cm-combo-inp:focus { border-color: #2fa860; outline: none; box-shadow: 0 0 0 2px rgba(47,168,96,.12); }
.cm-combo-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin-top: 2px;
  max-height: 260px; overflow: auto; background: #fff; border: 1px solid #cfe0d6; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.cm-combo-item { padding: 6px 10px; font-size: 12px; color: #2b3a30; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-combo-item:hover, .cm-combo-active { background: #eef7f1; }
.cm-combo-more, .cm-combo-empty { padding: 6px 10px; font-size: 11px; color: #8a938c; background: #fafdfb; }

/* 261011-09：组合框「档案中无此客户」提示与建档入口、失焦校验提示 */
.cm-combo-nohit { padding: 7px 10px; font-size: 12px; color: #b07f1b; background: #fdf6ec; }
.cm-combo-nohit .cm-combo-addlink { color: #2a5caa; text-decoration: underline; cursor: pointer; margin-left: 2px; }
.cm-combo-tip { margin-top: 4px; padding: 5px 8px; font-size: 11px; color: #b07f1b; background: #fdf6ec;
  border: 1px solid #f2dfc0; border-radius: 6px; }
.cm-combo-tip .cm-combo-addlink { color: #2a5caa; text-decoration: underline; cursor: pointer; }
