
/* 2026-10-13 首页拆轻：从 chat_ui.html 提出，24h 缓存（版本号 ?v=1013a） */

:root{
  /* 2026-11-15 A·企微工作台（细项见 ui_theme_wecom.css） */
  --primary:#2b5aed; --primary-hover:#1f4ed8; --primary-soft:#eef2ff;
  --ink:#1f2329; --ink-secondary:#646a73; --ink-subtle:#8f959e;
  --canvas:#f5f6f7; --surface:#ffffff; --surface-hover:#f0f1f2;
  --hairline:#e5e6ea; --hairline-strong:#d0d3d9;
  --success:#2fbf5f; --warning:#f5a623; --danger:#f54a45; --info:#2b5aed;
  --radius-sm:4px; --radius-md:8px; --radius-lg:12px;
  --shadow-card:0 1px 2px rgba(31,35,41,.06);
  --shadow-popover:0 var(--radius-sm) 16px rgba(31,35,41,.12);
  --font-stack:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei UI','Helvetica Neue',sans-serif;
  --sidebar-w: 0px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--canvas);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ===== 1.0.67 整窗 flex：窗口伸缩整页跟着变，主壳不再 position:fixed 截取 ===== */
html, body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
html { height: 100%; height: 100dvh; }
body {
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  background: var(--canvas);
}
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.app-shell .desktop-sidebar {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  flex: 0 0 var(--sidebar-w, 280px);
  width: var(--sidebar-w, 280px) !important;
  max-width: 48vw;
  height: 100% !important;
  align-self: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 5;
}
.app-shell .topbar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  flex: 0 0 auto;
  width: 100% !important;
  z-index: 4;
}
.app-shell .chat-area {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  height: auto !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-shell .chat-area .messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.app-shell .input-area {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 0 0 auto;
  width: 100% !important;
  max-height: min(42vh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 4;
}
body.sidebar-collapsed .app-shell .desktop-sidebar,
.app-shell .desktop-sidebar[hidden] {
  display: none !important;
}
@media (max-width: 899px) {
  .app-shell .desktop-sidebar { display: none !important; }
}
@media (min-width: 900px) {
  .app-shell .desktop-sidebar { display: flex !important; }
  body.sidebar-collapsed .app-shell .desktop-sidebar { display: none !important; }
}

/* 顶栏（2026-10-17 统一浅色 Linear 风：白底发丝线，与桌面端一致） */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--radius-md);
  padding: 10px var(--radius-md);
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.topbar .picker {
  display: flex;
  align-items: center;
  gap: var(--radius-md);
  flex: 3;
  min-width: 150px;  /* ⚠️ 2026-08-22 老板要求：切换对象做宽一些 */
  padding: 6px var(--radius-md);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.topbar .picker:active { background: var(--surface-hover); }
/* 同事只读显示授权 bot，点击不可选（左上角不弹选择，只显示当前智能体） */
.topbar .picker.picker-readonly { pointer-events: none; cursor: default; }
.topbar .picker .avatar {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.topbar .picker .avatar svg path { fill: var(--primary); }
.topbar .picker .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .picker .chevron {
  font-size: var(--radius-md);
  color: var(--ink-subtle);
  margin-left: auto;
  flex-shrink: 0;
  padding: var(--radius-sm) var(--radius-md);
  border-radius: 6px;
  font-weight: 500;
}
.topbar .title-badge {
  font-size: var(--radius-md);
  color: var(--ink-secondary);
  white-space: nowrap;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  padding: 6px 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--radius-sm);
  transition: background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.topbar .title-badge:active { background: var(--surface-hover); }
.topbar .title-badge.icon-only {
  /* 2026-09-29 老板令「三个按钮均匀分布」：等分右侧空间，各自格子里居中，
     正方形尺寸不变，间距自然均匀 */
  width: 32px; height: 32px;
  padding: 0;
  justify-content: center;
  font-size: 15px;
  flex: 1 0 32px;
  max-width: 64px;
}
/* ⚠️ 2026-08-22 老板要求：手机打开时顶部显示品牌「智能助手」。
   桌面端已有侧边栏品牌(ds-brand)，顶栏品牌在 ≥900px 隐藏避免重复。 */
.topbar .brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
/* ⚠️ 2026-08-22 老板要求：「智能助手」在手机端独占第一排，
   下面的聊天对象选择/按钮自动换到第二行（桌面端品牌隐藏，布局不变）。 */
@media (max-width: 899px) {
  /* 手机顶栏只留一行：对象选择占剩余宽度，设置/管理/身份是固定方按钮。
     品牌在侧栏或桌面显示，这里不再独占一排，避免把项目条顶出一段空白。 */
  .topbar { flex-wrap: nowrap; gap: 8px; align-items: center; }
  .topbar .brand { display: none; }
  .topbar .picker { flex: 1 1 auto; max-width: none; min-width: 0; }
  .topbar .title-badge.icon-only {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    max-width: 40px;
    min-width: 40px;
    padding: 0;
  }
}
/* ⚠️ 2026-08-19 修复：仪表板/管理只有老板账号可见。
   去掉 !important（否则会覆盖 JS 的 style.display，别人登录也能看到）。
   默认隐藏，JS updateAdminVisibility 控制显隐（老板才显示）。 */
/* ⚠️ 2026-08-22 修复：老板登录时手机端顶栏也要显示仪表板/管理入口。
   去掉 media 限制，admin-visible 时各尺寸一律显示（老板要求入口排在前面）。 */
#settingsBtn, #dashBtn, #adminBtn, #qaDashBtn { display: none; }
#dashBtn.admin-visible, #adminBtn.admin-visible, #qaDashBtn.admin-visible { display: flex; }
#settingsBtn.login-visible { display: flex; }
/* 选择对象弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
}
.overlay.show { display: flex; }
/* ── 员工登录区（2026-08-30 老板要求：手机登录框太小点不进去，改响应式 + 16px 防缩放） ── */
.login-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}
.login-row input {
  padding: 11px var(--radius-md);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  font-size: 16px;   /* ≥16px 防 iOS 聚焦自动缩放页面 */
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
}
#staffName { flex: 1; }
#staffCode { flex: 1.5; }
.login-row button {
  padding: 0 16px;
  height: 44px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
/* 手机（≤600px）：登录三个控件纵向堆叠，各占整行，好点好输入 */
@media (max-width: 600px) {
  .login-row { flex-direction: column; align-items: stretch; }
  .login-row input, .login-row button { width: 100%; }
  .login-row button { height: 46px; }
}
/* 文件查看弹层盖在仪表板之上（仪表板打开时点文件要能看） */
#fileViewOverlay { z-index: 300; }
/* 2026-10-18 修「Word 预览看不全」：弹层改成阅读窗，只让正文滚。
   2026-10-18 再修手机：必须留退出钮 + 看得见的滑条，禁止盖死全屏没出口。 */
#fileViewOverlay.overlay {
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  box-sizing: border-box;
}
#fileViewOverlay .picker-panel {
  max-width: min(960px, 96vw);
  width: min(960px, 96vw);
  max-height: 96vh;
  height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  padding-bottom: 10px;
}
.file-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}
#fileViewTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 160px;
  min-width: 0;
}
.file-view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
#fileViewOpenWith, #fileViewOpenApp {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  display: none;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
#fileViewOpenWith { color: var(--primary); background: var(--primary-soft); }
#fileViewOpenApp { color: #00a882; background: #e8f7f2; }
.file-view-close {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.file-view-close:active { opacity: 0.85; }
/* 真·划词共写 */
.file-coedit-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #c9d4e3;
  border-radius: 8px;
  background: #f4f7fb;
  color: #1f4e9e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.file-coedit-btn.has-sel {
  background: #1f4e9e;
  color: #fff;
  border-color: #1f4e9e;
  box-shadow: 0 0 0 2px rgba(31, 78, 158, 0.18);
}
.file-coedit-btn:active { opacity: 0.88; }
.coedit-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: #3b5b8c;
  font-size: 12px;
  line-height: 1.5;
}
.coedit-able { user-select: text; -webkit-user-select: text; }
.coedit-mark {
  background: #ffe08a;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}
.file-view-body-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.file-scroll-rail {
  position: absolute;
  top: 8px;
  right: 4px;
  bottom: 8px;
  width: 8px;
  background: #d8dce3;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
  display: none;
}
.file-scroll-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  background: #5a6472;
  border-radius: 6px;
}
.file-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  background: rgba(32, 42, 54, 0.78);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  pointer-events: none;
  z-index: 3;
  display: none;
}
@media (max-width: 899px) {
  #fileViewOverlay.overlay {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }
  #fileViewOverlay .picker-panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    flex: 1;
  }
  .file-view-close {
    min-height: 44px;
    min-width: 80px;
    font-size: 16px;
  }
}
.picker-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 0 0 16px 16px;
  padding: var(--radius-md) var(--radius-md) 20px;
  max-height: 82vh;
  overflow-y: auto;
  animation: slideDown 0.18s ease-out;
}
/* 插件面板：可拖外框 + 全屏 */
#pluginPanelBox.plugin-panel-box {
  overflow: hidden;
  padding-bottom: 12px;
  box-sizing: border-box;
}
.plugin-panel-box.plugin-panel-fs,
#pluginPanelBox.plugin-panel-fs,
.kw-panel-resizable.plugin-panel-fs {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0;
  margin: 0;
  inset: 0;
  position: relative;
}
.overlay:has(.plugin-panel-box.plugin-panel-fs),
#pluginPanelOverlay.overlay:has(#pluginPanelBox.plugin-panel-fs) {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.kw-panel-resizable {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}
.plugin-panel-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 3;
  background:
    linear-gradient(135deg, transparent 0 55%, var(--ink-subtle) 55% 62%, transparent 62% 72%, var(--ink-subtle) 72% 79%, transparent 79%);
  opacity: 0.7;
}
.plugin-panel-resize:hover { opacity: 1; }
body.plugin-panel-resizing { cursor: nwse-resize !important; user-select: none !important; }
body.plugin-panel-resizing iframe { pointer-events: none !important; }
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.picker-panel .panel-title {
  font-size: 14px;
  color: #8f959e;
  padding: 10px 6px var(--radius-md);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 6px;
}
/* 仪表板标题：品牌蓝渐变大字 */
.picker-panel .dash-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-hover);
  background: linear-gradient(90deg, var(--primary-hover), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid var(--hairline);
  padding: var(--radius-md) 6px 10px;
}
/* 仪表板日期切换（看历史趋势） */
.dash-date-nav { display: flex; align-items: center; gap: var(--radius-sm); flex-shrink: 0; }
/* ⚠️ 2026-08-22 老板要求：仪表板标题「仪表板」不能换行，日期导航手机端换到下一行 */
.dash-title > span:first-child { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 899px) {
  .dash-title { flex-wrap: wrap; }
  .dash-date-nav { width: 100%; flex-wrap: wrap; }
}
.dash-date-btn {
  -webkit-text-fill-color: var(--primary-hover);
  color: var(--primary-hover);
  font-size: var(--radius-md);
  font-weight: 700;
  padding: var(--radius-sm) var(--radius-md);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--primary-soft);
  cursor: pointer;
  white-space: nowrap;
}
.dash-date-btn:active { background: #e8f0ff; }
/* ⚠️ 2026-08-22 老板要求：仪表板/管理退出按钮用红色醒目 */
.dash-date-btn.danger { color: var(--danger); border-color: #f6c9c7; background: #fff5f5; }
.dash-date-btn.danger:active { background: #ffe4e2; }
.dash-date-label {
  -webkit-text-fill-color: var(--primary-hover);
  color: var(--primary-hover);
  font-size: 14px;
  font-weight: 700;
  min-width: 70px;
  text-align: center;
}
.conv-section-title {
  font-size: var(--radius-md);
  color: #8f959e;
  padding: 10px 6px 6px;
  font-weight: 600;
}
.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--radius-md);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.conv-item:hover, .conv-item:active { background: var(--surface-hover); }
.conv-item.active { background: var(--primary-soft); }
.conv-item .avatar {
  width: 36px; height: 36px;
  border-radius: 10px; /* A·企微：方圆角，非正圆 */
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
.conv-item .conv-main { flex: 1; min-width: 0; }
.conv-item .conv-name { font-size: 15px; color: #1f2329; font-weight: 600; }
.conv-item .conv-preview {
  font-size: 14px; color: #8f959e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.conv-item .conv-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--radius-sm); }
.conv-item .conv-time { font-size: 11px; color: #b0b6bd; }
.conv-empty { font-size: 14px; color: #b0b6bd; padding: var(--radius-md) 6px; }
/* A·企微：协作成员改列表行（不再 3 列圆头像宫格） */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-cell {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.contact-cell:active, .contact-cell:hover { background: rgba(0,0,0,.04); }
.contact-cell.active {
  background: var(--primary-soft);
  outline: none;
}
.contact-cell .avatar {
  grid-row: 1 / span 2;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.contact-cell .name {
  grid-column: 2;
  font-size: 13px;
  font-weight: 600;
  color: #1f2329;
  text-align: left;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-cell .preview {
  grid-column: 2;
  font-size: 11px;
  color: #8f959e;
  line-height: 1.3;
}
.contact-cell .avatar { position: relative; }
.conv-item .avatar { position: relative; }
.need-human-dot {
  /* 兼容旧类名；2026-10-27 起统一用 bot-status-dot */
  position: absolute; top: -2px; left: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff7d00; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(255, 125, 0, 0.35);
  pointer-events: none;
}
/* 2026-10-27：智能体图标旁状态色点（右下） */
.bot-status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 2;
}
.bot-status-dot.st-idle { background: #00b42a; }   /* 绿：待命 */
.bot-status-dot.st-busy { background: #f5a623; }   /* 黄：工作 */
.bot-status-dot.st-learn { background: #7c5cff; }  /* 紫：学习中 */
.bot-status-dot.st-wait { background: #ff7d00; }   /* 橙：后台任务/待处理 */
.bot-status-dot.st-bad { background: #f53f3f; }    /* 红：异常 */
.unread-dot {
  position: absolute;
  top: -var(--radius-sm); right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--radius-sm);
  font-weight: 600;
  animation: unreadPulse 2s ease-in-out infinite;
}
@keyframes unreadPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,74,69,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(245,74,69,0); }
}
/* 聊天区 */
.chat-area {
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 72px;
  display: flex;
  flex-direction: column;
}
/* ── 桌面端左侧边栏（≥900px 显示，微信电脑版式：会话列表常驻）── */
.desktop-sidebar {
  display: none;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w, 280px);
  background: #ededed; /* A·企微灰侧栏 */
  border-right: 1px solid #e5e6eb;
  z-index: 90;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 8px 16px;
  flex-direction: column;
}
.desktop-sidebar .ds-brand {
  display: flex;
  align-items: center;
  gap: var(--radius-md);
  padding: 4px 8px 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.desktop-sidebar .ds-brand svg { flex-shrink: 0; }
.desktop-sidebar .ds-identity {
  font-size: 12px;
  color: #646a73;
  margin: 0 6px 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
}
.workspace-personal-entry {
  display:flex; flex-direction:column; width:calc(100% - 20px); margin:10px; padding:10px 12px;
  border:1px solid #cfe1f4; border-radius:12px; background:linear-gradient(135deg,#f0f7ff,#f7fbff);
  color:var(--primary); text-align:left; font-size:13px; font-weight:700; cursor:pointer;
}
.workspace-personal-entry small { margin-top:3px; color:#7c8a9b; font-size:11px; font-weight:400; }
.desktop-sidebar .ds-section-title {
  font-size: var(--radius-md);
  color: #8f959e;
  padding: 10px 6px 6px;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #f5f6f7; /* 企微聊天区浅灰，和侧栏区分 */
  /* 2026-10-17 老板报「输入框上方蓝色横条」：消息区横向溢出会出横向滚动条，
     滚动条 thumb 是蓝色 rgba(51,112,255,0.25)，叠在灰底上正是那条蓝条。
     禁横向溢出 + 长串强制换行，从根上消灭它 */
  overflow-x: hidden;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
  padding: var(--radius-lg) var(--radius-md) 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* ⚠️ 2026-08-24 老板要求电脑可拖选文字：消息区整体允许选择 */
  -webkit-user-select: text;
  user-select: text;
}
.msg-row { display: flex; align-items: flex-start; gap: var(--radius-md); -webkit-user-select: text; user-select: text; }
/* 多选引用勾选框（2026-08-27） */
.msg-select-cb {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary); border-radius: 50%;
  cursor: pointer; font-size: 14px; color: var(--primary);
  margin-top: var(--radius-sm);
  -webkit-user-select: none; user-select: none;
}
.msg-select-cb.checked { background: var(--primary); color: #fff; }
.msg-row.mine { flex-direction: row-reverse; }
/* 新消息入场动画（仅新到达的消息，历史加载不播） */
.msg-row.anim { animation: msgIn 0.18s ease-out; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
/* 微信式时间分组条 */
.time-divider {
  align-self: center;
  font-size: 11px;
  color: #8f959e;
  background: rgba(31,78,158,0.07);
  border-radius: 10px;
  padding: var(--radius-sm) 10px;
  margin: var(--radius-sm) 0;
  animation: msgIn 0.18s ease-out;
}
.msg-avatar {
  width: 36px; height: 36px;
  border-radius: 10px; /* A·企微方圆角 */
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
/* 人类员工人像头像：跟气泡头像同方角 */
.human-avatar { border-radius: 10px; display: block; }
.msg-row.mine .msg-avatar { background: var(--primary); }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 4px 12px 12px 12px; /* 企微：左上尖角 */
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 14px;
  line-height: 1.65;
  color: #1f2329;
  box-shadow: none;
  word-break: break-word;
  white-space: pre-wrap;
  min-width: 56px;   /* 极短消息（如「收到」「好的」）也有个像样的气泡 */
  transition: box-shadow 0.2s ease;
  /* ⚠️ 2026-08-24 老板要求「复制可以选择」：明确允许文字选择，
     iOS 上 -webkit-touch-callout: default 让长按弹系统「复制/选择」菜单 */
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.msg-bubble:hover { box-shadow: 0 1px 3px rgba(31,35,41,0.08); }
/* 2026-10-08 经验闭环①：bot 回复下 👍/👎 */
.msg-fb { margin-left: 8px; display: inline-flex; gap: 2px; vertical-align: middle; }
.msg-fb button { border: 0; background: transparent; cursor: pointer; font-size: 13px; padding: 0 3px; opacity: .45; }
.msg-fb button:hover, .msg-fb button.on { opacity: 1; }
.msg-fb .fb-done { font-size: 11px; color: var(--primary); margin-left: 4px; }
/* 操作按钮（2026-08-24 🔧生产）：消息内嵌「🔍 搜」「✏️ 更改」等可点击按钮 */
.msg-actions {
  display: flex;
  gap: var(--radius-md);
  flex-wrap: wrap;
  margin-top: 9px;
}
.msg-action-btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: opacity 0.15s;
}
.msg-action-btn:hover { opacity: 0.88; }
.msg-action-btn:active { transform: scale(0.97); }
.msg-action-btn:disabled { opacity: 0.55; cursor: not-allowed; }
/* ⚠️ 2026-08-23 老板反馈修复：气泡布局——销售消息窄、自己的消息离头像远。
   根因：三层 max-width 叠加（气泡 78% × 内容容器 78% × 桌面 72% ≈ 44%），
   气泡被压得极窄；且气泡在容器内左对齐，自己消息（头像在右）气泡就远离头像。
   修法：宽度只在「内容容器」一层控制（max-width 78%），气泡填满容器不再叠加；
   短消息时容器 shrink-to-fit 到内容宽，紧贴头像。 */
.msg-row > div:last-child {
  /* A·企微：偏窄聊天泡，避免宽屏铺成文档卡 */
  max-width: min(520px, 78%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* 自己的消息：内容靠右，紧贴右侧头像 */
.msg-row.mine > div:last-child {
  align-items: flex-end;
}
.msg-row.mine .msg-bubble {
  /* A·企微：己方浅蓝底 + 深色字（不再用蓝渐变白字） */
  background: #c9e7ff;
  color: #1f2329;
  border: 1px solid transparent;
  border-radius: 12px 4px 12px 12px;
  box-shadow: none;
  transition: box-shadow 0.2s ease;
}
.msg-row.mine .msg-bubble:hover { box-shadow: 0 1px 3px rgba(43,90,237,0.14); }
.msg-sender { font-size: 11px; color: #8f959e; margin-bottom: 2px; }
/* ⚠️ 2026-09-23 老板令：群消息头一行显示 谁发→谁收·已读·任务状态 */
.msg-sender.g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--radius-sm); }
.msg-sender.g-meta .g-arrow { color: #b8bcc4; }
.msg-sender.g-meta .g-read { color: #67c23a; }
.msg-sender.g-meta .g-task { color: #303133; font-size: 10px; padding: 0 6px; line-height: 18px; border-radius: 9px; background: #f2f3f5; }  /* 2026-09-23 老板令：状态一律黑色 */
  .msg-sender.g-meta .g-task.done { color: #00b42a; background: #e8f8ee; font-weight: 600; }  /* 完成了才绿色 */
  .msg-sender.g-meta .g-task.warn { color: #d93025; background: #fdecea; font-weight: 600; }  /* 2026-10-18 老板令：不合格/超时/冻结/已退回红色警示 */
.msg-time { font-size: 10px; color: #8f959e; margin-top: var(--radius-sm); text-align: center; }
.load-more {
  text-align: center;
  padding: var(--radius-md) 10px;
  margin-top: 6px;
  min-height: 44px;
  line-height: 1.4;
  overflow: visible;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  background: #f5f6f7;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 5;
  -webkit-tap-highlight-color: rgba(51,112,255,0.15);
}
/* AgentHub 式长消息折叠 */
.long-msg .long-preview, .long-msg .long-full {
  white-space: pre-wrap;
  word-break: break-word;
}
/* ⚠️ 2026-08-21 修复：展开全文后，超长内容在气泡内滚动，不把整页撑爆、不横向跳出 */
.long-msg .long-full {
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  user-select: text;
}
.long-toggle {
  display: block;
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: var(--radius-md);
  cursor: pointer;
  padding: 0;
}
/* ── markdown 渲染排版（bot 回复的粗体/标题/列表/表格/引用）── */
.md-body { white-space: normal; }
.md-h1 { font-size: 17px; font-weight: 700; margin: var(--radius-md) 0 var(--radius-sm); color: var(--primary-hover); }
.md-h2 { font-size: 15px; font-weight: 700; margin: 6px 0 var(--radius-sm); color: var(--primary-hover); }
.md-h3 { font-size: 14px; font-weight: 600; margin: 5px 0 2px; }
.md-h4 { font-size: 14px; font-weight: 600; margin: var(--radius-sm) 0 2px; }
.md-list { margin: var(--radius-sm) 0 var(--radius-sm) 18px; padding: 0; }
.md-list li { margin: 2px 0; }
.md-quote {
  border-left: var(--radius-sm) solid var(--primary-hover);
  background: #eef3fb;
  padding: var(--radius-sm) 10px;
  margin: var(--radius-sm) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #5a6472;
  font-size: 14px;
}
.md-code {
  background: var(--hairline);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
}
.md-br { height: 6px; }
/* 2026-08-22 聊天排版优化：代码块 / 表格滚动 / docx / xlsx / 长消息 */
.md-pre {
  background: #0f1115; color: #e6e8eb; padding: var(--radius-md) 14px; border-radius: var(--radius-md);
  overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 6px 0;
  white-space: pre-wrap; word-break: break-word;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.msg-row.mine .msg-bubble .md-pre { background: #eef2ff; color: #1f2329; }
.md-table-wrap { overflow-x: auto; margin: 6px 0; border-radius: var(--radius-md); }
.docx-view {
  max-height: none; overflow: visible; padding: 8px 4px 40px; line-height: 1.8;
  font-size: 15px; background: #fff; color: #1f2329; border-radius: var(--radius-md);
}
.docx-view h1, .docx-view h2, .docx-view h3 { margin: .8em 0 .35em; color: #2E86C1; }
.docx-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
.docx-view table { border-collapse: collapse; margin: 0; width: 100%; min-width: 420px; }
.docx-view td, .docx-view th { border: 1px solid var(--hairline-strong); padding: 6px 10px; font-size: 14px; }
.docx-view tr:first-child td, .docx-view tr:first-child th {
  background: #2E86C1; color: #fff; font-weight: 700;
}
.xlsx-wrap { max-height: 72vh; overflow: auto; border-radius: var(--radius-md); }
.xlsx-table { border-collapse: collapse; width: 100%; font-size: var(--radius-md); background: var(--surface); color: #1f2329; }
.xlsx-th { background: var(--surface-hover); padding: 6px 10px; border: 1px solid var(--hairline-strong); font-weight: 600; text-align: left; position: sticky; top: 0; }
.xlsx-td { padding: 5px 10px; border: 1px solid var(--hairline-strong); white-space: nowrap; }
.xlsx-td:first-child { white-space: normal; word-break: break-word; }
.long-msg .long-toggle {
  margin-top: 6px; width: 100%; padding: 7px 0; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); color: #9aa3af; border-radius: 6px;
  font-size: var(--radius-md); cursor: pointer;
}
.long-msg .long-toggle:hover { background: rgba(255,255,255,.12); }
.msg-row.mine .msg-bubble .long-msg .long-toggle { background: #eef2ff; border-color: #c9d4f0; color: #1f4ed8; }
.msg-row.mine .msg-bubble .docx-view, .msg-row.mine .msg-bubble .xlsx-wrap { background: var(--surface); }
.md-table {
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 14px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.md-table td {
  border: 1px solid #e3e6eb;
  padding: 5px 9px;
  word-break: break-word;
}
.md-table tr:first-child td {
  background: #eef3fb;
  font-weight: 600;
  color: var(--primary-hover);
}
/* 我方浅蓝气泡里的 markdown 适配（深色字） */
.msg-row.mine .msg-bubble .md-h1,
.msg-row.mine .msg-bubble .md-h2,
.msg-row.mine .msg-bubble .md-h3,
.msg-row.mine .msg-bubble .md-h4 { color: #1f4ed8; }
.msg-row.mine .msg-bubble .md-quote {
  border-left-color: #2b5aed;
  background: rgba(43,90,237,0.06);
  color: #646a73;
}
.msg-row.mine .msg-bubble .md-code { background: rgba(43,90,237,0.08); color: #1f2329; }
.msg-row.mine .msg-bubble .md-table td { border-color: #e5e6eb; }
.msg-row.mine .msg-bubble .md-table tr:first-child td {
  background: #eef2ff;
  color: #1f2329;
}
.msg-row.mine .msg-bubble .long-toggle { color: #1f4ed8; }
/* AgentHub 式训练任务卡看板 */
.task-board {
  padding: 10px var(--radius-md);
  background: #fafbfc;
  border-bottom: 1px solid var(--hairline);
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.task-board .tb-period {
  display: inline-block;
  font-size: var(--radius-md);
  font-weight: 700;
  padding: var(--radius-sm) 14px;
  border-radius: 999px;
  margin-bottom: var(--radius-md);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.task-board .tb-period.peak { color: #c0392b; background: linear-gradient(90deg,#ffece8,#fff5f0); }
.task-board .tb-period.idle { color: #27ae60; background: linear-gradient(90deg,#e8f9ed,#f0fbf4); }
/* 今日总览头部卡片 */
.task-board .tb-overview {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  color: #fff;
  box-shadow: 0 var(--radius-sm) 16px rgba(31,78,158,0.25);
}
.task-board .tb-overview .ov-title { font-size: 14px; opacity: 0.9; margin-bottom: 6px; }
/* 2026-08-20 看板微调：去掉交卷/运维百分比大卡，删除 ov-dual 相关样式 */
.task-board .tb-overview .ov-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.task-board .tb-overview .ov-stat {
  flex: 1;
  min-width: 90px;
  background: rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: var(--radius-md) 10px;
}
.task-board .tb-overview .ov-stat .num { font-size: 24px; font-weight: 800; }
.task-board .tb-overview .ov-stat .lbl { font-size: 11px; opacity: 0.85; }
/* 2026-08-20 需求B4：今日花费 + 时段分布（高峰/低谷 条状占比） */
.task-board .tb-overview .ov-cost {
  margin-top: 10px;
  padding: var(--radius-md) 10px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
}
.task-board .tb-overview .ov-cost-title {
  font-size: var(--radius-md);
  font-weight: 800;
  margin-bottom: 6px;
  color: #1f2329;
}
.task-board .sp-row { display: flex; align-items: center; gap: 6px; margin-top: var(--radius-sm); }
.task-board .sp-lbl { width: 104px; flex-shrink: 0; font-size: 11px; color: #1f2329; opacity: 0.9; white-space: nowrap; text-align: right; }
.task-board .sp-bar {
  flex: 1;
  height: var(--radius-md);
  background: rgba(31,35,41,0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.task-board .sp-bar-fill { height: 100%; border-radius: var(--radius-sm); transition: width 0.4s ease; }
.task-board .sp-val { font-size: 11px; font-weight: 700; color: #1f2329; white-space: nowrap; }
.task-board .sp-calls { font-size: 10px; color: #8f959e; margin-left: 2px; font-weight: 400; }
/* 2026-08-20 需求B5：Bot 卡片内今日产出/自学/花费 区块 */
.task-board .tb-bot-today {
  margin-top: var(--radius-sm);
  padding-top: 6px;
  border-top: 1px dashed var(--hairline);
}
.task-board .tb-bot-today .tb-files { margin-top: 2px; }
.task-board .tb-title {
  font-size: 14px;
  color: #1f2329;
  margin: 16px 0 var(--radius-md);
  font-weight: 700;
  padding-left: var(--radius-md);
  border-left: var(--radius-sm) solid var(--primary-hover);
  line-height: 1.4;
}
.task-board .tb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.task-board .tb-card {
  display: flex;
  flex-direction: column;
  gap: var(--radius-sm);
  padding: 10px 11px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: var(--radius-sm) solid #c0c4cc;
  border-radius: 10px;
  box-shadow: 0 2px var(--radius-md) rgba(31,78,158,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.task-board .tb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 var(--radius-sm) 14px rgba(31,78,158,0.12);
}
.task-board .tb-card.done { border-left-color: var(--success); background: #f0fff4; }
.task-board .tb-card.pending { border-left-color: #e6a23c; background: #fffaf0; }
.task-board .tb-card.partial { border-left-color: var(--primary); background: var(--primary-soft); }
.task-board .tb-name {
  font-size: 14px;
  color: #1f2329;
  font-weight: 600;
  line-height: 1.3;
}
/* 卡通人物头像（马维斯式：干活晃动=搬砖，空闲打盹，掉线变灰） */
.task-board .tb-card-head { display: flex; align-items: center; gap: 7px; }
.task-board .tb-bot-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(31,78,158,0.15);
}
.task-board .tb-bot-avatar.working { opacity: 1; }
.task-board .tb-bot-avatar.offline { filter: grayscale(1); opacity: 0.45; }
.task-board .tb-desc { font-size: 11px; color: #8f959e; }
/* ⚠️ 2026-10-12 界面优化：长文案卡（如 GitHub 卡）曾把整行卡撑到 400+px、两侧大片死区 */
.task-board .tb-desc.tb-clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.task-board .tb-more { font-size: 11px; color: var(--primary); cursor: pointer; margin-top: 2px; display: inline-block; }
.task-board .tb-focus { font-size: 11px; color: var(--primary); margin-top: var(--radius-sm); word-break: break-all; }
.task-board .tb-status {
  align-self: flex-start;
  font-size: 11px;
  padding: 2px var(--radius-md);
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: 0 1px var(--radius-sm) rgba(0,0,0,0.06);
}
.task-board .tb-status.done { color: var(--success); background: #e8f9ed; }
.task-board .tb-status.pending { color: #e6a23c; background: #fff2d9; }
.task-board .tb-status.partial { color: var(--primary); background: var(--primary-soft); }
/* 活跃绿点：30分钟内动过的 bot 亮起，可视化「谁在干活」 */
.task-board .tb-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-left: 5px;
  box-shadow: 0 0 0 var(--radius-sm) rgba(52,199,89,0.2);
  animation: livePulse 1.6s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 var(--radius-sm) rgba(52,199,89,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(52,199,89,0.08); }
}
/* 健康状态点：绿=正常，红=异常（进程卡死/调用失败/未启动） */
.task-board .tb-health-dot {
  display: inline-block;
  width: var(--radius-md); height: var(--radius-md);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.task-board .tb-health-dot.ok { background: var(--success); box-shadow: 0 0 0 2px rgba(52,199,89,0.25); }
/* 2026-10-16 4-E 配置来源按钮：卡片右上角小齿轮，点开看哪层规则在生效 */
.task-board .tb-cfg-btn {
  margin-left: auto;
  font-size: 13px;
  color: #b3b8c0;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.task-board .tb-cfg-btn:hover { color: #4e5969; background: #f2f3f5; }
.task-board .tb-health-dot.bad { background: var(--danger); box-shadow: 0 0 0 2px rgba(245,74,69,0.3); animation: badBlink 1.2s ease-in-out infinite; }
@keyframes badBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
/* Bot 异常告警横幅：总览顶部醒目提示 */
.task-board .tb-alert-banner {
  display: flex;
  align-items: center;
  gap: var(--radius-md);
  background: linear-gradient(90deg, #fff0ee, #fff7f5);
  color: #c0392b;
  font-size: var(--radius-md);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #f5c6c0;
  margin-bottom: var(--radius-md);
  box-shadow: 0 2px var(--radius-md) rgba(192,57,43,0.08);
  cursor: pointer;
}
.task-board .tb-alert-banner .bad-num {
  background: #c0392b;
  color: #fff;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--radius-md);
  flex-shrink: 0;
}
/* 卡片点开：文件列表 */
.task-board .tb-card { cursor: pointer; }
.task-board .tb-card:hover { border-color: var(--primary); }
.task-board .tb-files {
  margin-top: var(--radius-sm);
  display: none;
  flex-direction: column;
  gap: 2px;
  max-height: 180px;
  overflow-y: auto;
}
.task-board .tb-files.open { display: flex; }
.task-board .tb-file-item {
  font-size: 11px;
  color: var(--primary);
  padding: var(--radius-sm) 6px;
  border-radius: 5px;
  background: var(--primary-soft);
  cursor: pointer;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: var(--radius-sm);
}
.task-board .tb-file-item:hover { background: var(--primary-soft); text-decoration: underline; }
.task-board .tb-hint { font-size: 10px; color: #b0b6bd; margin-top: var(--radius-sm); }
/* ⚠️ 2026-10-12 仪表板视觉升级 v2（老板令·可见升级；DESIGN.md 令牌；备份 chat_ui.html.bak_20261012_dashboard_v2） */
.task-board .tb-overview { background: #fff; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-card); padding: 16px 18px; }
.task-board .ov-title { font-size: 12px; font-weight: 600; color: var(--ink-secondary); letter-spacing: .05em; margin-bottom: 10px; }
.task-board .tb-title { font-size: 13px; font-weight: 600; color: var(--ink); border-left: 3px solid var(--primary); padding-left: 9px; margin: 20px 0 10px; line-height: 1.35; display: flex; align-items: center; gap: 6px; }
.task-board .tb-title::after { content: ""; flex: 1; height: 1px; background: var(--hairline); margin-left: 6px; }
.task-board .tb-card { border-radius: 10px; padding: 12px 14px; }
.dash-date-btn { border-radius: 999px; padding: 4px 12px; background: #fff; border: 1px solid var(--hairline); font-weight: 500; transition: all .15s ease; }
.dash-date-btn:hover { background: var(--primary-soft); border-color: #c7d8ff; color: var(--primary-hover); }
.tb-peak-pill-wrap > span { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(103,194,58,.10); }
.tb-peak-pill-wrap > span[style*="e6a23c"] { background: rgba(230,162,60,.12); }
.task-board .tb-cron-block { border-top: 1px solid var(--hairline); }
.task-board .tb-cron-row { padding: 4px 0; border-bottom: 1px solid #f2f3f5; }
.task-board .tb-cron-row:last-child { border-bottom: none; }
.task-board .tb-cron-row span:last-child { font-variant-numeric: tabular-nums; color: var(--ink); }
/* ⚠️ 2026-10-12 老板令：大弹窗可拖动（按住标题条空白处；触摸端禁用默认手势保拖动顺滑）；
   后补：登录(身份与设备)/员工管理 一并支持 */
#dashOverlay .panel-title, #learnOverlay .panel-title, #twinOverlay .panel-title, #voteOverlay .panel-title,
#syncOverlay .panel-title, #adminOverlay .panel-title { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
#dashOverlay .panel-title button, #dashOverlay .panel-title [onclick],
#learnOverlay .panel-title button, #learnOverlay .panel-title [onclick],
#twinOverlay .panel-title button,
#voteOverlay .panel-title button,
#syncOverlay .panel-title button, #syncOverlay .panel-title [onclick],
#adminOverlay .panel-title button, #adminOverlay .panel-title [onclick] { cursor: pointer; touch-action: auto; }
/* 重做按钮：<9分必须重做 */
.task-board .tb-redo-btn {
  display: block; width: 100%; margin-top: 6px; padding: 5px var(--radius-md);
  background: linear-gradient(135deg, var(--danger), #ff6b6b); color: #fff;
  border: none; border-radius: 6px; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.task-board .tb-redo-btn:hover { transform: translateY(-1px); box-shadow: 0 2px var(--radius-md) rgba(245,74,69,0.4); }
.task-board .tb-redo-btn:active { transform: translateY(0); }
/* 重做汇总横幅 */
.task-board .tb-redo-banner {
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
  color: #fff; padding: 10px 14px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; margin-bottom: var(--radius-md);
  box-shadow: 0 2px var(--radius-md) rgba(245,74,69,0.3);
  animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 2px var(--radius-md) rgba(245,74,69,0.3); }
  50% { box-shadow: 0 2px 20px rgba(245,74,69,0.6); }
}
/* 文件查看弹层 */
.file-view-body {
  max-height: 75vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  white-space: normal;
  word-break: break-word;
  background: #fafbfc;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: var(--radius-md);
}
#fileViewOverlay .file-view-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: scroll;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: normal;
  padding-right: 20px;
  scrollbar-width: auto;
  scrollbar-color: #5a6472 #d8dce3;
}
#fileViewOverlay .file-view-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  -webkit-appearance: none;
  display: block;
}
#fileViewOverlay .file-view-body::-webkit-scrollbar-track { background: #d8dce3; border-radius: 6px; }
#fileViewOverlay .file-view-body::-webkit-scrollbar-thumb { background: #5a6472; border-radius: 6px; }
.file-view-body img { max-width: 100%; border-radius: 6px; display: block; margin: 0 auto; }
.file-view-body iframe { width: 100%; min-height: 60vh; border: none; border-radius: var(--radius-md); }
/* ===== 对话图片查看器（2026-08-20 老板要求：放大/翻页/关闭/编辑/旋转）===== */
.img-viewer {
  display: flex; flex-direction: column; gap: var(--radius-md); padding: 0;
  /* 2026-09-05 修「条纹」：overlay 半透明层透出 body 渐变背景，给查看器不透明纯色底盖住 */
  background: #14181f; border-radius: var(--radius-md); padding: var(--radius-md);
}
.img-viewer-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px; background: var(--surface-hover); border-radius: var(--radius-md); font-size: var(--radius-md);
}
.img-viewer-bar .vg-group { display: flex; align-items: center; gap: var(--radius-sm); }
.vg-btn {
  border: 1px solid var(--hairline); background: var(--surface); color: #202A36; font-size: var(--radius-md);
  padding: 5px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.vg-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.vg-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.vg-btn.primary:hover { background: #2560e0; color: #fff; }
.vg-btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.vg-btn.danger:hover { background: #e0443f; color: #fff; }
.vg-btn:disabled { opacity: .4; cursor: not-allowed; }
.vg-pos { min-width: 52px; text-align: center; font-weight: 600; color: var(--primary); }
.img-viewer-stage {
  position: relative; width: 100%; height: 70vh; min-height: 240px;
  background: #14181f; border-radius: var(--radius-md); overflow: hidden;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
#imgViewerImg {
  max-width: 100%; max-height: 100%;
  transform-origin: center center; transition: transform .12s ease;
  user-select: none; -webkit-user-drag: none; cursor: grab;
  touch-action: none;  /* 2026-09-05：图片手势全交 JS，浏览器别接管，否则原生缩放/滚动会跟 JS 打架产生条纹 */
}
#imgViewerImg.dragging { cursor: grabbing; }
#imgEditCanvas {
  position: absolute; inset: 0; cursor: crosshair; display: none; touch-action: none;
}
.img-viewer-stage.editing #imgViewerImg { display: none; }
.img-viewer-stage.editing #imgEditCanvas { display: block; }
.vg-edit-bar input[type=color] { width: 28px; height: 28px; border: none; padding: 0; background: none; cursor: pointer; }
.vg-edit-bar select { border: 1px solid var(--hairline); border-radius: 6px; font-size: var(--radius-md); padding: var(--radius-sm); background: var(--surface); }
.vg-hint { color: #8f959e; font-size: 11px; text-align: center; }
/* AgentHub 式产物卡片 */
/* 多图一次显示（2026-08-27 老板令）：横排缩略图，每张可点开预览 */
.file-list {
  margin-top: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--radius-md);
}
.file-list .file-card {
  margin-top: 0;
  width: calc(33.33% - 6px);
  min-width: 90px;
  flex-direction: column;
  align-items: stretch;
  padding: 6px;
}
.file-list .file-card-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.file-card {
  margin-top: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(51,112,255,0.06);
  border: 1px solid rgba(51,112,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  max-width: 260px;
  transition: all 0.2s ease;
}
.file-card:hover {
  background: rgba(51,112,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 var(--radius-sm) var(--radius-md) rgba(51,112,255,0.15);
}
.file-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.file-card-img {
  width: 100%;
  max-width: 240px;
  max-height: 180px;
  border-radius: 6px;
  display: block;
}
.file-card-info {
  flex: 1;
  min-width: 0;
}
.file-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-card-type {
  font-size: 11px;
  color: #8f959e;
  margin-top: 2px;
}
.file-card-btn {
  flex-shrink: 0;
  padding: var(--radius-sm) 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: var(--radius-md);
  text-decoration: none;
}
.file-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #646a73;
  padding-top: var(--radius-sm);
}
/* 🎙 音频卡片：纵向排，播放器 + 下载按钮同一行（2026-09-01 老板令） */
.file-card.audio-card {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
  gap: 0;
}
.audio-card .audio-row {
  display: flex;
  align-items: center;
  gap: var(--radius-md);
}
.audio-card .audio-row audio {
  flex: 1;
  min-width: 0;
  height: 36px;
}
.audio-card .audio-dl {
  flex-shrink: 0;
  white-space: nowrap;
}
/* @成员选择面板（微信样式，输入@弹出） */
.at-panel {
  position: fixed;
  bottom: 130px;
  left: var(--radius-md);
  right: var(--radius-md);
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 var(--radius-sm) 20px rgba(0,0,0,0.15);
  z-index: 300;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(55vh, 480px);
  display: none;
}
.at-panel.show { display: block; }
.at-panel .at-title {
  font-size: var(--radius-md);
  color: #8f959e;
  padding: var(--radius-md) 14px;
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.at-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 15px;
  color: #1f2329;
}
.at-item:active { background: #f0f4ff; }
.at-item .a-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
/* 微信式消息操作菜单（右键/长按） */
.msg-menu {
  position: fixed;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 var(--radius-sm) 20px rgba(0,0,0,0.18);
  z-index: 10050;
  overflow: hidden;
  min-width: 120px;
  display: none;
  user-select: none;
  -webkit-user-select: none;
}
.msg-menu.show { display: block; }
.msg-menu .menu-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #1f2329;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.msg-menu .menu-item:active { background: #f0f4ff; }
.msg-menu .menu-item.danger { color: var(--danger); }
/* 引用回复条 */
.quote-bar {
  position: absolute;
  top: -34px;
  left: var(--radius-md);
  right: var(--radius-md);
  display: none;
  align-items: center;
  gap: var(--radius-md);
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: var(--radius-sm) solid var(--primary);
  border-radius: var(--radius-md);
  font-size: var(--radius-md);
  color: #646a73;
  box-shadow: 0 2px var(--radius-md) rgba(0,0,0,0.1);
  /* 2026-10-17 加固：安卓 WebView 点击高亮可能卡成蓝色残留条 */
  -webkit-tap-highlight-color: transparent;
}
.quote-bar.show { display: flex; }
.quote-bar .quote-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quote-bar .quote-cancel {
  cursor: pointer;
  color: #8f959e;
  padding: 0 var(--radius-sm);
}
/* 🎙 录音纪要条（2026-09-01 老板令：输入框上方一行，时间+暂停/继续/发送/取消） */
.record-bar {
  display: none;
  align-items: center;
  gap: 10px;
  position: absolute;
  top: -1px;
  left: 0; right: 0;
  transform: translateY(-100%);
  padding: var(--radius-md) var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: var(--radius-sm) solid var(--danger);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px var(--radius-md) rgba(0,0,0,0.08);
  /* 2026-10-17 加固：防安卓 WebView 点击高亮卡成蓝色残留条 */
  -webkit-tap-highlight-color: transparent;
}
.record-bar.show { display: flex; }
.record-bar .rec-dot {
  width: var(--radius-md); height: var(--radius-md); border-radius: 50%;
  background: var(--danger); flex-shrink: 0;
  animation: recBlink 1s infinite;
}
@keyframes recBlink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.record-bar .rec-time {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--danger);
  font-variant-numeric: tabular-nums;
}
.record-bar .rec-btn {
  flex-shrink: 0; padding: 5px var(--radius-md); font-size: 14px; border: none;
  border-radius: 6px; cursor: pointer; background: var(--surface-hover); color: var(--ink);
}
.record-bar .rec-btn.rec-send { background: var(--primary); color: #fff; }
.record-bar .rec-btn.rec-cancel { background: var(--surface); color: #8f959e; border: 1px solid var(--hairline); }
/* 气泡内的引用预览 */
.msg-quote {
  font-size: var(--radius-md);
  color: #646a73;
  background: rgba(0,0,0,0.04);
  border-left: 2px solid var(--primary);
  padding: var(--radius-sm) var(--radius-md);
  margin-bottom: var(--radius-sm);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
}
/* 输入区 */
.input-area {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 120;
  padding: 10px var(--radius-md) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--hairline);
  /* 2026-10-17 老板报「输入框上方蓝色横条」：此投影是该位置唯一蓝色来源，
     安卓 WebView 可能渲染成可见蓝条，改中性灰 */
  box-shadow: 0 -2px var(--radius-md) rgba(16,24,40,0.05);
  display: flex;
  flex-wrap: wrap;
  gap: var(--radius-md);
  align-items: flex-end;
  max-height: min(42vh, 280px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
/* 2026-10-26：输入框上方任务控制条（改方向/转人工一触即达） */
.task-ctrl-bar {
  flex: 1 0 100%;
  order: -2;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 0 2px;
  background: #f7f8fa;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  box-sizing: border-box;
}
.task-ctrl-bar.show { display: flex; }
.task-ctrl-main { min-width: 0; flex: 1; }
.task-ctrl-label { font-size: 11px; color: #8f959e; font-weight: 600; }
.task-ctrl-title {
  font-size: 13px; font-weight: 650; color: #1f2329;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.task-ctrl-btns { display: flex; flex-shrink: 0; gap: 6px; }
.task-ctrl-btn {
  border-radius: 8px; font-size: 13px; font-weight: 700;
  padding: 8px 12px; cursor: pointer; border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.task-ctrl-btn.redirect {
  background: #fff; color: #1677ff; border-color: #1677ff;
}
.task-ctrl-btn.escalate {
  background: #ff7d00; color: #fff; border-color: #ff7d00;
}
.task-ctrl-btn.resume {
  background: #00b42a; color: #fff; border-color: #00b42a;
}
.task-ctrl-btn:active { transform: scale(0.96); opacity: 0.92; }
.task-ctrl-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.group-meet-hint {
  flex: 1 0 100%;
  order: -2;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 0 0 4px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  box-sizing: border-box;
  background: #fff8e6;
  border: 1px solid #f5d48a;
  color: #8a5a00;
  cursor: pointer;
  user-select: none;
}
.group-meet-hint.show { display: flex; }
.group-meet-hint .gmh-tag {
  flex-shrink: 0; font-weight: 800; font-size: 11px;
  padding: 1px 7px; border-radius: 999px;
  background: #e6a23c; color: #fff;
}
.group-meet-hint .gmh-body { flex: 1; min-width: 0; }
.group-meet-hint .gmh-body b { font-weight: 700; color: #6b4400; }
.group-meet-hint .gmh-act {
  flex-shrink: 0; border: 1px solid #e6a23c; background: #fff;
  border-radius: 8px; padding: 2px 8px; font-size: 12px; color: #8a5a00;
}
.group-meet-hint:hover .gmh-act { background: #fff3d6; }
.stakes-hint {
  flex: 1 0 100%;
  order: -1;
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 0 2px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  box-sizing: border-box;
}
.stakes-hint.show { display: flex; }
.stakes-hint.high {
  background: #fff7e8; border: 1px solid #ffd591; color: #ad6800;
}
.stakes-hint.critical {
  background: #fff1f0; border: 1px solid #ffa39e; color: #a8071a;
}
.stakes-hint .sh-tag {
  flex-shrink: 0; font-weight: 800; font-size: 11px;
  padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.06);
}
.stakes-hint .sh-body { flex: 1; min-width: 0; }
.stakes-hint .sh-act {
  flex-shrink: 0; border: 1px solid rgba(0,0,0,.12); background: #fff;
  border-radius: 8px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: inherit;
}
.stakes-hint .sh-act:hover { background: #fafafa; }
.stakes-hint .sh-x {
  flex-shrink: 0; cursor: pointer; opacity: .55; font-weight: 700; padding: 0 2px;
}
.stakes-hint .sh-x:hover { opacity: 1; }
.nh-chat-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 10px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7e8;
  border: 1px solid #ffd591;
  box-sizing: border-box;
}
.nh-chat-banner.show { display: flex; }

/* 2026-11-02：试用中对话区顶部说明 + 跳转授权状态 */
.lic-trial-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 10px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7e8;
  border: 1px solid #ffd591;
  box-sizing: border-box;
}
.lic-trial-banner[hidden] { display: none !important; }
.lic-trial-main {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  color: #ad6800;
  line-height: 1.45;
}
.lic-trial-main b { color: #1f2329; margin-right: 6px; }
.lic-trial-exp { margin-right: 8px; color: #8c6d1f; }
.lic-trial-hint { color: #8c6d1f; }
.lic-trial-link {
  flex-shrink: 0;
  border: 1px solid #d48806;
  background: #fff;
  color: #d48806;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 650;
}
.lic-trial-link:hover { background: #fff1b8; }

.nh-chat-main { min-width: 0; flex: 1; font-size: 12px; color: #ad6800; line-height: 1.4; }
.nh-chat-main b { margin-right: 6px; font-size: 12px; }
.nh-chat-main span {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; color: #1f2329; font-weight: 650;
}
.nh-chat-btns { display: flex; flex-shrink: 0; gap: 6px; }
.nh-chat-btns .task-ctrl-btn { padding: 6px 10px; font-size: 12px; }
.bg-task-title.jump {
  cursor: pointer;
}
.bg-task-title.jump:hover { color: #1677ff; }
.redirect-original {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f8fa;
  border: 1px solid #e5e6eb;
  box-sizing: border-box;
}
.redirect-original .ro-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.redirect-original .ro-label {
  font-size: 11px; font-weight: 700; color: #8f959e;
}
.redirect-original .ro-reuse {
  border: 1px solid #1677ff; background: #fff; color: #1677ff;
  border-radius: 6px; font-size: 11px; font-weight: 700;
  padding: 3px 8px; cursor: pointer; white-space: nowrap;
}
.redirect-original .ro-reuse:active { opacity: 0.85; }
.redirect-original .ro-title {
  font-size: 13px; font-weight: 700; color: #1f2329; line-height: 1.4;
  word-break: break-word;
}
.redirect-original .ro-detail {
  margin-top: 4px; font-size: 12px; color: #4e5969; line-height: 1.45;
  word-break: break-word; white-space: pre-wrap;
}
.redirect-original .ro-detail:empty { display: none; }
.arch-playbook {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #f7f8fa; border: 1px solid #e5e6eb; font-size: 12px; color: #4e5969;
}
.arch-playbook b { color: #1f2329; }
.arch-playbook .ap-note {
  margin: 0 0 8px; padding: 4px 8px; border-radius: 8px;
  background: #e8f3ff; color: #1677ff; font-size: 11px; font-weight: 600;
}
.arch-playbook .ap-row {
  margin: 4px 0; line-height: 1.45;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
}
.arch-playbook .ap-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; margin-right: 2px;
  background: #e8f3ff; color: #1677ff;
}
.arch-playbook .ap-tag.collab { background: #fff7e8; color: #ff7d00; }
.arch-playbook .ap-apply {
  margin-left: auto; flex-shrink: 0;
  border: 1px solid #d0d3d9; background: #fff; color: #1677ff;
  border-radius: 8px; padding: 1px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.arch-playbook .ap-apply:hover { background: #e8f3ff; }
/* 待发送文件标签：选中后显示在输入框上方，可单个取消 */
.input-area .pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: absolute;
  top: -1px;
  left: 0; right: 0;
  transform: translateY(-100%);
  padding: 6px var(--radius-md);
  background: #ffffff;
  border-top: 1px solid var(--hairline);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px var(--radius-md) rgba(0,0,0,0.06);
  /* 2026-10-17 加固：背景不用变量（防旧 WebView 变量失效渲染异常）+ 点击高亮残留 */
  -webkit-tap-highlight-color: transparent;
}
.input-area .pending-file-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  padding: var(--radius-sm) var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid #cfe0ff;
  border-radius: 6px;
  font-size: var(--radius-md);
  color: var(--primary);
}
.input-area .pending-file-tag .pf-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
/* 2026-10-17 老板令「学 Claude 的输入方式」：图片待发卡片显示大缩略图（像
   Claude 输入框：粘图即见图、纯图不带文件名、右上角 ✕ 取消） */
.input-area .pending-file-tag.pf-img-tag {
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 118px;
  padding: 4px;
  position: relative;
  background: #fff;
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
}
.input-area .pf-img-tag .pf-img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #fff;
}
.input-area .pf-img-tag .pf-name {
  display: none;  /* 图片不带文件名，更接近 Claude 输入框 */
}
.input-area .pf-img-tag .pf-del {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  padding: 0;
}
.input-area .pending-file-tag .pf-del {
  cursor: pointer;
  color: #8f959e;
  font-weight: 700;
  padding: 0 2px;
  flex-shrink: 0;
}
.input-area .pending-file-tag .pf-del:active { color: var(--danger); }
.input-area textarea {
  flex: 1;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  padding: 11px 16px;
  font-size: 15px;
  resize: none;
  height: 44px;
  max-height: 200px;
  overflow-y: auto;
  font-family: inherit;
  -webkit-appearance: none;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 var(--radius-sm) rgba(51,112,255,0.12);
}
.input-area button {
  padding: 0 18px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(51,112,255,0.30);
  transition: all 0.2s ease;
}
.input-area button:hover { box-shadow: 0 var(--radius-sm) var(--radius-md) rgba(51,112,255,0.40); }
.input-area button:active { transform: scale(0.96); }
.input-area button.attach {
  padding: 0 var(--radius-md);
  background: var(--surface);
  color: var(--primary-hover);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  font-size: 18px;
  box-shadow: none;
}
.input-area button:disabled { background: #b3c7ff; box-shadow: none; cursor: not-allowed; }
.empty-chat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8f959e;
  font-size: 14px;
}
/* 2026-10-21 P0：空会话三入口 */
.empty-chat--entries {
  flex-direction: column;
  gap: 14px;
  padding: 24px 16px;
  text-align: center;
}
.empty-chat-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-secondary, #646a73);
}
.empty-chat-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 360px);
}
.empty-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--hairline, #e5e6eb);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.empty-entry:hover { border-color: var(--primary, #3370ff); background: var(--primary-soft, #f0f5ff); }
.empty-entry-k { font-size: 15px; font-weight: 650; color: var(--ink, #1f2329); }
.empty-entry-d { font-size: 12px; color: var(--ink-subtle, #8f959e); line-height: 1.4; }
.empty-chat-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  justify-content: center;
}
.empty-link {
  border: none;
  background: none;
  color: var(--primary, #3370ff);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.file-partial-edit {
  background: #f0f5ff !important;
  color: #3370ff !important;
  border: 1px solid #adc6ff !important;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}
.tpl-panel, .multiend-panel { max-width: 560px; width: 92%; max-height: 80vh; overflow: auto; }
.tpl-hint, .multiend-note { font-size: 12px; color: var(--ink-subtle, #8f959e); padding: 0 12px 10px; line-height: 1.5; }
.tpl-grid { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 16px; }
.tpl-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 12px 14px; border: 1px solid var(--hairline, #e5e6eb);
  border-radius: 10px; background: #fff; cursor: pointer; font: inherit; width: 100%;
}
.tpl-card:hover { border-color: var(--primary, #3370ff); background: var(--primary-soft, #f0f5ff); }
.tpl-k { font-size: 15px; font-weight: 650; }
.tpl-d { font-size: 12px; color: var(--ink-subtle, #8f959e); }
.tpl-note { font-size: 11px; color: #ad6800; }
.multiend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px 16px; }
@media (max-width: 600px) { .multiend-grid { grid-template-columns: 1fr; } }
.multiend-col h4 { margin: 0 0 8px; font-size: 14px; }
.multiend-col ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--ink, #1f2329); }
.bg-task-resume {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #f5a524;
  background: #fff7e8;
  color: #ad6800;
  cursor: pointer;
}
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 0;
  background: transparent;
  align-items: center;
  flex-shrink: 0;
}
#typingDock:empty { display: none; }
#typingDock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 6;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
#typingDock .msg-row { align-items: center; margin: 0; width: 100%; }
#typingDock .typing-line {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;  /* 2026-10-20 窄屏长文案裁掉尾部，不溢出压到别的元素 */
}
#typingDock .bot-status-text {
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
#typingDock .typing-elapsed { flex: 0 0 auto; }
#typingDock .typing-indicator { flex: 0 0 auto; }
#typingDock .msg-avatar { font-size: 14px; font-weight: 700; color: #fff; }
/* Bot 处理状态文字（收到消息/思考中/回复了） */
.bot-status-text {
  font-size: var(--radius-md);
  color: #8f959e;
  padding: var(--radius-sm) var(--radius-md);
  margin-bottom: 2px;
  /* ⚠️ 2026-08-22 老板要求：状态文案变长（含取消/停止提示），改为允许折行完整显示 */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-all;
  line-height: 1.5;
}
.bot-status-text.processing { color: var(--primary); }
.stop-mid-btn {
  display: inline-block;
  margin: 0 0 0 10px;
  padding: 1px 9px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}
.typing-elapsed { display: inline-block; margin-left: 8px; font-size: 13px; color: #8f959e; font-variant-numeric: tabular-nums; min-width: 5.5em; }
.typing-hint { color: #8f959e; font-size: 11px; }
.typing-dots { display: flex; gap: 4px; margin-top: 6px; height: 10px; align-items: center; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: typingDot 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
/* 2026-11-06 老板令「三个点状态和程序运行保持一致」：空闲冻结、异常红点 */
.typing-dots.frozen span { animation: none; transform: translateY(0); opacity: .5; }
.typing-dots.stuck span { animation: none; transform: translateY(0); background: #dc2626; opacity: 1; }
.bot-status-text.idle-truth { color: #d48806; }
.bot-status-text.stuck-truth { color: #dc2626; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}
#typing-indicator .msg-avatar,
#typing-indicator .msg-sender,
#typing-indicator .bot-status-text { animation: none; }
.msg-mini { border: 0; background: transparent; color: var(--primary); font-size: 12px; cursor: pointer; margin-left: 6px; padding: 0; }
/* 2026-10-20 老板令「@全体像飞书群反应」：老板@消息下的智能体回应条 */
.g-react-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  justify-content: flex-end;
  -webkit-tap-highlight-color: transparent;
}
.g-react {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f2f3f5;
  color: #8f959e;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.g-react i { display: none; font-style: normal; font-weight: 700; }
.g-react.done { background: #e8f9ed; color: #16a34a; }
.g-react.done i { display: inline; }
/* 2026-10-20 老板令「类似马维斯调用智能体」：协作时间线步骤条 */
.collab-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  width: 100%;
}
.collab-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: #f2f3f5;
  color: #8f959e;
  max-width: 100%;
}
.collab-step.pending { background: #f2f3f5; color: #6b7280; }
.collab-step.done { background: #e8f9ed; color: #16a34a; }
.collab-step .cs-icon { flex-shrink: 0; }
.collab-step .cs-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collab-wrap .cs-time { font-size: 10px; color: #b8bcc4; flex-shrink: 0; }
.msg-incomplete .bot-status-text { color: #d48806; }
.local-note { color: #4e5969; font-size: 13px; background: #f7f8fa; }
.slash-panel {
  position: fixed; left: 12px; right: 12px; bottom: 72px; z-index: 80;
  background: #fff; border: 1px solid #dcdfe6; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12); display: flex; flex-direction: column;
}
.slash-panel button {
  text-align: left; border: 0; background: #fff; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
#planBtn.on { background: var(--primary); color: #fff; }
.msg-steps { font-size: 12px; color: #4e5969; margin-top: 4px; padding: 6px 8px; background: #f7f8fa; border-radius: 8px; max-width: 420px; }
.msg-steps[hidden] { display: none !important; }
.msg-step { padding: 3px 0; border-bottom: 1px dashed #eee; word-break: break-all; }
.msg-steps-btn {
  border: 0; background: transparent; color: #1677ff;
  font-size: 11px; padding: 0 4px; cursor: pointer; margin-left: 4px;
}
.msg-steps-btn:hover { text-decoration: underline; }
.bot-quick-acts { display: inline-flex; gap: 2px; margin-left: 2px; vertical-align: middle; }
.msg-usage { font-size: 11px; color: #8f959e; margin-right: 4px; }
#riskBtn.on { background: #d48806; color: #fff; }
.coach-hint { font-size: 12px; color: #4e5969; padding: 6px 10px; }
/* 计划卡片：智能体动手前发的理解和步骤 */
.plan-card { min-width: 220px; max-width: 520px; line-height: 1.6; }
.plan-card .pc-head { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.plan-card .pc-label { font-size: 12px; color: #8f959e; margin: 8px 0 2px; }
.plan-card .pc-steps { margin: 0; padding-left: 22px; }
.plan-card .pc-steps li { margin: 2px 0; }
.plan-card .pc-steps label { cursor: pointer; }
.plan-card .pc-steps input { margin: 0 6px 0 0; vertical-align: -2px; cursor: pointer; }
.plan-card .pc-steps input:disabled { cursor: default; }
.plan-card .pc-steps input:not(:checked) + span { text-decoration: line-through; color: #b8bcc4; }
.plan-card .pc-note { margin-top: 8px; font-size: 12px; color: #ad6800; }
.plan-card .plan-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.plan-card .pc-tip { font-size: 11px; color: #8f959e; }
.send-tag {
  display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px; margin: 0 6px 2px 0;
  border-radius: 999px; background: rgba(255,255,255,.7); color: #1f4ed8; vertical-align: 1px;
}
.input-area button.attach.mode-btn { font-size: 13px; padding: 0 10px; min-width: 0; }
.input-area button.attach.mode-btn.on { background: var(--primary-soft); border-color: #c7d2fe; }
.send-mode-menu {
  position: fixed; z-index: 90; width: 250px; padding: 4px;
  background: #fff; border: 1px solid #dcdfe6; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.send-mode-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; color: #1f2329;
}
.send-mode-menu button:hover { background: #f2f3f5; }
.send-mode-menu button.on { background: var(--primary-soft); }
.send-mode-menu button b { display: block; font-size: 13px; }
.send-mode-menu button span { display: block; font-size: 12px; color: #8f959e; margin-top: 1px; }
.msg-step-gate { color: #ad6800; font-weight: 650; }
.ux-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10002; display: flex; align-items: center; justify-content: center; }
.ux-panel { background: #fff; border-radius: 14px; padding: 14px; width: min(88vw, 360px); max-height: 70vh; overflow: auto; }
.ux-title { font-weight: 700; margin: 8px 0 4px; }
.ux-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #eee; font-size: 13px; }
.ux-panel button { margin-top: 6px; border: 1px solid #dcdfe6; background: #fff; border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.ux-note, .ux-diff { font-size: 12px; color: #8f959e; margin: 6px 0; }
.typing-indicator span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* 侧栏右缘拖宽 + 最近对话/协作成员上下分隔 */
.sidebar-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  bottom: 0;
  cursor: col-resize;
  z-index: 230;
  touch-action: none;
  background: transparent;
}
.sidebar-resize:hover,
body.sidebar-resizing .sidebar-resize {
  background: linear-gradient(90deg, transparent 3px, var(--primary, #2b5aed) 3px, var(--primary, #2b5aed) 5px, transparent 5px);
}
.ds-split {
  flex: 0 0 8px;
  width: 100%;
  cursor: ns-resize;
  touch-action: none;
  position: relative;
  z-index: 2;
  background: transparent;
  border: 0;
}
.ds-split::before {
  content: "";
  position: absolute;
  left: 8px; right: 8px; top: 3px; height: 2px;
  border-radius: 1px;
  background: var(--hairline-strong, #d0d3d9);
  opacity: 0.9;
}
.ds-split:hover::before,
body.ds-splitting .ds-split::before {
  background: var(--primary, #2b5aed);
}
body.sidebar-resizing, body.ds-splitting { cursor: col-resize; user-select: none !important; }
body.ds-splitting { cursor: ns-resize; }
body.sidebar-resizing iframe, body.ds-splitting iframe { pointer-events: none !important; }
#desktopConvList {
  flex: 0 0 auto;
  height: var(--ds-conv-h, 240px);
  max-height: none;
  min-height: 72px;
  overflow: auto;
}
body.sidebar-collapsed .desktop-sidebar { display: none !important; }
body.sidebar-collapsed #adminOverlay.overlay {
  left: 0 !important;
}


/* 矮窗：压紧顶栏/输入，输入区始终贴底可见 */
@media (max-height: 700px) {
  .topbar { min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
  .input-area {
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom)) !important;
    max-height: min(36vh, 200px) !important;
    gap: 6px !important;
  }
  .input-area textarea { min-height: 36px !important; max-height: 72px !important; }
  .input-area button, .input-area .attach { min-height: 36px !important; height: 36px !important; }
}
@media (max-height: 520px) {
  .input-area { max-height: min(42vh, 160px) !important; }
  .desktop-sidebar .workspace-sidebar-note { display: none !important; }
}

/* ── 桌面端适配（必须放 CSS 最后，保证覆盖基础 left:0 等定义）── */
@media (min-width: 900px) {
  :root { --sidebar-w: 280px; }
  .desktop-sidebar { display: flex; z-index: 210; width: var(--sidebar-w); }
  /* 员工管理等遮罩从侧栏右边起，点左边对话可直接切走 */
  #adminOverlay.overlay { left: var(--sidebar-w); }
  .topbar .brand { display: none; }
  /* 1.0.67：主壳 flex，不再用 left 偏移 */
  .app-shell .topbar, .app-shell .chat-area, .app-shell .input-area { left: auto; right: auto; }
  .topbar { right: 0; }
  .chat-area { right: 0; }
  .input-area { right: 0; }
  /* @成员选择面板：居中基准改为聊天区（不含侧栏） */
  .at-panel { left: 38px; }
  /* A·企微：桌面气泡收窄，贴近预览短聊泡 */
  .msg-row > div:last-child { max-width: min(520px, 72%); }
}
@media (min-width: 900px) and (max-width: 1100px) {
  :root { --sidebar-w: 240px; }
}
/* 手机端：仪表板卡片单列，数字字号放大，扫一眼更清楚 */
@media (max-width: 600px) {
  .task-board .tb-grid { grid-template-columns: 1fr; }
  .task-board .tb-overview .ov-rate { font-size: 30px; }
  .task-board .tb-overview .ov-stat .num { font-size: 18px; }
  .dash-date-btn { font-size: 11px; padding: var(--radius-sm) 6px; }
  .dash-date-label { min-width: 56px; font-size: var(--radius-md); }
}
/* ── 美化增强：自定义滚动条 ── */
.messages::-webkit-scrollbar,
.task-board::-webkit-scrollbar,
.picker-panel::-webkit-scrollbar,
.at-panel::-webkit-scrollbar {
  width: 5px;
}
.messages::-webkit-scrollbar-thumb,
.task-board::-webkit-scrollbar-thumb,
.picker-panel::-webkit-scrollbar-thumb,
.at-panel::-webkit-scrollbar-thumb {
  /* 2026-10-17 老板报「蓝色横条」：滚动条 thumb 原为蓝色，任何设备上冒出
     横/竖滚动条都会显蓝。改中性灰，滚动条永不再显蓝 */
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
}
.messages::-webkit-scrollbar-track,
.task-board::-webkit-scrollbar-track,
.picker-panel::-webkit-scrollbar-track,
.at-panel::-webkit-scrollbar-track {
  background: transparent;
}
/* ── 美化增强：全局按钮过渡 ── */
.login-row button,
.msg-action-btn,
.dash-date-btn,
.vg-btn,
.tb-redo-btn,
.record-bar .rec-btn {
  transition: all 0.2s ease;
}
.login-row button:active,
.msg-action-btn:active,
.dash-date-btn:active,
.vg-btn:active,
.tb-redo-btn:active,
.record-bar .rec-btn:active {
  transform: scale(0.97);
}

/* 2026-10-22 老板令：去掉「跨端同步」横幅样式（只留悬浮球） */

/* ═══ 2026-09-23 后台任务悬浮球（老板令：中部侧面、平时缩着、点开放大）═══ */
/* 2026-09-24 老板令「不能挡住人的图像」：球缩到 34px 贴边 + 平时半透明 70%，
   按住/点开恢复不透明；详情面板点开才出现，不常驻 */
.bg-float {
  position: fixed;
  right: var(--radius-sm);
  top: 44%;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  /* 容器空白不挡发送键；仅球/面板可点（2026-10-26 任务条落地后） */
  pointer-events: none;
}
.bg-float-ball,
.bg-float-panel { pointer-events: auto; }
.bg-float-ball {
  position: relative;
  min-width: 34px;
  height: 34px;
  border-radius: 17px;
  background: #1677ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 var(--radius-md);
  cursor: pointer;
  box-shadow: 0 var(--radius-sm) 10px rgba(22, 119, 255, 0.4);
  user-select: none;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.bg-float-ball:active { transform: scale(0.94); opacity: 1; }
.bg-float-ball:hover { opacity: 1; }
/* 2026-10-27：未完成后台任务数红点 */
.bg-float-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f53f3f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.bg-float-panel {
  width: 250px;
  max-height: 48vh;
  /* 2026-10-04 修「拉到最后显示不全」：球在屏幕44%处，面板55vh会顶出屏底，
     超出部分滚不到；48vh 保证面板完整落在视口内，overflow-y 滚动才有效 */
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(22, 119, 255, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 10px var(--radius-md);
}
.bg-float-panel-head {
  font-size: var(--radius-md);
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--radius-md);
}
.bg-float-close { cursor: pointer; color: #999; font-size: 14px; padding: 0 2px; }
.bg-task-item { margin-bottom: 10px; }
.bg-task-item:last-child { margin-bottom: 0; }
.bg-task-title { font-size: var(--radius-md); color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-task-bar { height: 5px; background: rgba(22, 119, 255, 0.15); border-radius: var(--radius-sm); margin: var(--radius-sm) 0 2px; overflow: hidden; }
.bg-task-fill { height: 100%; width: 0; border-radius: var(--radius-sm); background: #1677ff; transition: width 0.8s ease; }
.bg-task-detail { font-size: 11px; color: #888; overflow: hidden; white-space: normal; word-break: break-all; line-height: 1.5; }
.bg-task-pct { font-size: 11px; color: #1677ff; font-weight: 700; float: right; font-variant-numeric: tabular-nums; }
/* 🔴 2026-10-06 老板令「观察到工作过程和结果」：群顶今日工作流时间线 */
#groupMeetTop,.group-meet-top{display:flex;align-items:center;gap:8px;margin:8px 10px 0;padding:8px 10px;border-radius:10px;background:#fff8e6;border:1px solid #f5d48a;color:#8a5a00;font-size:12px;line-height:1.45;cursor:pointer;user-select:none;box-sizing:border-box}
#groupMeetTop .gmh-tag,.group-meet-top .gmh-tag{flex-shrink:0;font-weight:800;font-size:11px;padding:1px 7px;border-radius:999px;background:#e6a23c;color:#fff}
#groupMeetTop .gmh-body,.group-meet-top .gmh-body{flex:1;min-width:0}
#groupMeetTop .gmh-body b,.group-meet-top .gmh-body b{font-weight:700;color:#6b4400}
#groupMeetTop .gmh-act,.group-meet-top .gmh-act{flex-shrink:0;border:1px solid #e6a23c;background:#fff;border-radius:8px;padding:2px 8px;font-size:12px;color:#8a5a00}
#groupMeetTop:hover .gmh-act,.group-meet-top:hover .gmh-act{background:#fff3d6}
#workflowBar{margin:8px 10px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden;font-size:12px;max-height:42vh;overflow-y:auto}
.wf-title{padding:8px 12px;font-weight:600;cursor:pointer;color:#202A36;position:sticky;top:0;background:#fff;z-index:1}
.wf-row-click{cursor:pointer;transition:background .12s}
.wf-row-click:hover{background:#f5f7fa}
.wf-word{margin-left:auto;font-size:11px;color:#1677ff;background:#e8f3ff;padding:1px 6px;border-radius:4px;flex-shrink:0}
.file-card-open{color:#00a882;background:#e8f7f2;border:none;cursor:pointer;font:inherit}
.file-card-share{color:#8a5a00;background:#fff8e6;border:1px solid #f5d48a;cursor:pointer;font:inherit;border-radius:8px;padding:2px 8px}
.file-card-share:hover{background:#fff3d6}
.file-card-share.shared,.file-card-share:disabled{opacity:.7;cursor:default}
.wf-row{padding:4px 12px;border-top:1px solid #f0f2f5;display:flex;gap:6px;align-items:baseline;color:#4b5563}
.wf-t{color:#9ca3af;flex-shrink:0;font-size:11px}
.wf-n{font-weight:600;color:#202A36;flex-shrink:0}


  .twin-card{border:1px solid #ece9f5;border-radius:12px;padding:12px 14px;margin-bottom:10px;background:#fff;box-shadow:0 1px 3px rgba(31,35,41,.04);}
  .twin-card h4{margin:0 0 6px;font-size:14px;font-weight:600;color:#1f2329;line-height:1.5;}
  .twin-card .ev{color:#646a73;font-size:12px;line-height:1.6;}
  .twin-btns{display:flex;gap:8px;margin-top:8px;align-items:center;flex-wrap:wrap;}
  .twin-btns button{padding:5px 14px;border:1px solid #e0ddf0;border-radius:16px;background:#fff;font-size:12px;cursor:pointer;color:#4e5969;}
  .twin-btns button:hover{border-color:#7c5cff;color:#7c5cff;}
  .twin-btns button.on{background:#7c5cff;color:#fff;border-color:#7c5cff;}
  .twin-sec{font-weight:700;margin:16px 0 8px;font-size:13px;color:#1f2329;}
  .twin-opt{display:block;width:100%;text-align:left;padding:10px 12px;margin:6px 0;border:1px solid #ece9f5;border-radius:10px;background:#fff;cursor:pointer;font-size:13px;color:#1f2329;transition:all .15s;}
  .twin-opt:hover{border-color:#7c5cff;background:#f8f6ff;}
  .twin-group{display:flex;align-items:baseline;gap:8px;margin:14px 0 8px;background:#f6f3ff;border-radius:10px;padding:9px 14px;border:1px solid #ece4ff;}
  .twin-group b{font-size:14px;color:#5b3df5;}
  .twin-group span{font-weight:400;font-size:11px;color:#8f959e;}
  .twin-now{border-left:3px solid #7c5cff;background:#fbfaff;}
  .twin-opt:hover{background:#f6f0ff;}
  .twin-bar{height:8px;background:#eee;border-radius:4px;overflow:hidden;}
  .twin-bar i{display:block;height:100%;background:linear-gradient(90deg,#7c5cff,#c084fc);}
  /* 2026-10-25：人物画像排版——短句分层，别挤成一团 */
  .twin-portrait{display:flex;flex-direction:column;gap:12px;margin-top:4px;}
  .twin-lead{font-size:14px;line-height:1.65;color:#1f2329;font-weight:500;padding:8px 12px;background:#f8f6ff;border-radius:10px;border-left:3px solid #7c5cff;}
  .twin-spirit{display:flex;gap:10px;align-items:flex-start;padding:8px 0 2px;}
  .twin-spirit .em{font-size:28px;line-height:1;}
  .twin-spirit .nm{font-size:14px;font-weight:600;color:#1f2329;}
  .twin-spirit .why{font-size:12px;color:#646a73;line-height:1.55;margin-top:2px;}
  .twin-sec-label{font-size:12px;font-weight:600;color:#5b3df5;letter-spacing:.02em;margin:2px 0 6px;}
  .twin-point{padding:8px 10px;border:1px solid #eeeaf8;border-radius:10px;background:#fff;margin-bottom:6px;}
  .twin-point:last-child{margin-bottom:0;}
  .twin-point-hd{font-size:13px;font-weight:600;color:#1f2329;display:flex;flex-wrap:wrap;gap:6px;align-items:baseline;}
  .twin-point-ev{font-size:12px;color:#4e5969;line-height:1.55;margin-top:4px;}
  .twin-point-tip{font-size:12px;color:#5b3df5;line-height:1.55;margin-top:4px;}
  .twin-proof{font-size:11px;color:#8f959e;line-height:1.45;margin-top:4px;padding-left:8px;border-left:2px solid #ece4ff;}
  .twin-proof time{color:#a1a7b3;margin-left:4px;}
  .twin-block{font-size:13px;line-height:1.6;color:#1f2329;}
  .twin-block .lab{font-size:12px;font-weight:600;color:#5b3df5;margin-bottom:4px;}
  .twin-block .body{color:#4e5969;font-size:12px;line-height:1.55;}
  .twin-chips{display:flex;flex-wrap:wrap;gap:6px;}
  .twin-chip{font-size:12px;padding:4px 10px;border-radius:999px;background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;}
  .twin-catch{font-size:13px;line-height:1.6;color:#1f2329;font-style:italic;padding:6px 0;}
  .twin-growth{font-size:12px;line-height:1.55;color:#166534;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:8px 10px;}

/* 2026-10-14 修「数字人没有输入框/选项/按钮」：上一版误加的全局隐藏规则
   #twinBody button,textarea,input{display:none!important} 把答题控件全藏了，已删。 */
/* 2026-10-13 检查项③：未登录收起输入栏 */
.input-area.login-hidden { display: none !important; }
/* 2026-10-15 深度优化①：新消息分隔线（微信式） */
.new-msg-sep { text-align: center; color: #8f959e; font-size: 11px; margin: 10px 0 6px; user-select: none; }

/* ── 2026-10-23 会话壳产品级改皮（与登录页同定调） ── */
.topbar {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar .picker {
  border-radius: 12px;
  border-color: var(--hairline);
  background: #fafbfc;
  min-height: 40px;
}
.topbar .title-badge {
  border-radius: 10px;
  background: #fafbfc;
}
.topbar .title-badge.icon-only {
  width: 36px; height: 36px;
  max-width: 56px;
  font-size: 15px;
}
.picker-panel {
  border-radius: 0 0 18px 18px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  border: 1px solid var(--hairline);
  border-top: none;
}
.picker-panel .panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}
.conv-item, .contact-cell {
  border-radius: 8px;
}
.messages {
  padding: 18px 22px 100px;
  gap: 14px;
  background: #f5f6f7; /* A·企微：纯灰，去掉蓝光晕 */
}
.msg-bubble {
  border-radius: 4px 12px 12px 12px;
  border: 1px solid #e5e6eb;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.msg-row.mine .msg-bubble {
  border-radius: 12px 4px 12px 12px;
  background: #c9e7ff;
  color: #1f2329;
  border-color: transparent;
  box-shadow: none;
}
.input-area {
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e5e6eb;
  gap: 8px;
}
.input-area textarea {
  border-radius: 8px;
  font-size: 16px; /* 防 iOS 缩放 */
  min-height: 44px;
  background: #fff;
  border: 1px solid #e5e6eb;
}
.input-area button {
  border-radius: 8px;
  height: 44px;
  background: #2b5aed;
  box-shadow: none;
}
.input-area button.attach {
  border-radius: 8px;
  background: #fff;
}
.time-divider {
  background: rgba(16, 24, 40, 0.05);
  color: var(--ink-subtle);
  border-radius: 10px;
}
@media (max-width: 600px) {
  .overlay {
    padding: 0;
    align-items: flex-end;
  }
  #pickerOverlay .picker-panel,
  #adminOverlay .picker-panel,
  #dashOverlay .picker-panel,
  #learnOverlay .picker-panel,
  #twinOverlay .picker-panel,
  #voteOverlay .picker-panel,
  #profilesOverlay .picker-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 88dvh;
    animation: sheetUp 0.2s ease-out;
  }
  @keyframes sheetUp {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }
  .messages { padding: 14px 12px 110px; }
}

/* 2026-10-25 全局优化：活动台筛选 + 人格三态/技能 */
.bg-act-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 10px 4px; border-bottom: 1px solid rgba(0,0,0,.06);
}
.bg-act-tab {
  border: 1px solid #d0d5dd; background: #fff; color: #475467;
  border-radius: 999px; padding: 2px 8px; font-size: 11px; cursor: pointer;
}
.bg-act-tab.on { background: #1677ff; color: #fff; border-color: #1677ff; }
.bg-task-redirect {
  margin-top: 4px; margin-right: 6px; font-size: 11px; padding: 2px 8px;
  border: 1px solid #1677ff; color: #1677ff; background: #fff;
  border-radius: 6px; cursor: pointer;
}
/* 2026-10-26：转人工确认 —— 橙色实心，避免「没样式像没按钮」 */
.bg-task-escalate {
  display: inline-block;
  margin-top: 4px; margin-right: 6px;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px;
  border: 1px solid #ff7d00; color: #fff; background: #ff7d00;
  border-radius: 6px; cursor: pointer;
}
.bg-task-escalate:hover { background: #e56f00; border-color: #e56f00; }
.bg-task-stop-learn {
  display: inline-block;
  margin-top: 4px; margin-right: 6px;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px;
  border: 1px solid #1677ff; color: #1677ff; background: #fff;
  border-radius: 6px; cursor: pointer;
}
.bg-task-stop-learn:hover { background: #e8f3ff; }
.bg-task-human-resume {
  font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
  background: #00b42a; color: #fff; border: 1px solid #00b42a; cursor: pointer;
}
.bg-task-human-resume:hover { background: #009a29; border-color: #009a29; }
.bg-task-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bg-gate-bar {
  font-size: 11px; line-height: 1.45; font-weight: 650;
  color: #ad6800; background: #fff7e8; border: 1px solid #ffe7ba;
  border-radius: 8px; padding: 6px 8px; margin: 0 0 8px;
}
.pa-opt-box { font-size: 12px; line-height: 1.6; margin-top: 6px; }
.pa-opt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; }
.pa-opt-row select { font-size: 12px; max-width: 110px; }
.pa-opt-list { font-size: 12px; color: #475467; margin-top: 4px; }
.pa-opt-list .pa-opt-item {
  display: flex; justify-content: space-between; gap: 6px;
  padding: 4px 0; border-bottom: 1px dashed #eaecf0;
}

/* 2026-10-28 老板令：侧栏状态圆点图例 */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #8f959e;
  border-top: 1px dashed #e4e7ec;
}
.status-legend span { display: inline-flex; align-items: center; gap: 4px; }
.status-legend .dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-legend .dot.st-idle { background: #00b42a; }
.status-legend .dot.st-busy { background: #f5a623; }
.status-legend .dot.st-learn { background: #7c5cff; }
.status-legend .dot.st-wait { background: #ff7d00; }
.status-legend .dot.st-bad { background: #f53f3f; }

/* 2026-10-28 老板令：圆点悬停即显气泡（原生 title 太慢看不见） */
.bot-status-dot {
  pointer-events: auto;
  cursor: help;
}
.bot-status-dot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 41, 55, 0.95);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 60;
}
.bot-status-dot:hover::after { opacity: 1; }

/* 2026-10-29 设置页六块 */
.settings-sec { margin-bottom: 14px; }
.settings-cost-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px dashed var(--hairline,#e5e6eb); font-size:13px; }
.settings-cost-row b { font-variant-numeric: tabular-nums; color:#f54a45; }
.settings-cost-total { font-size:14px; margin-bottom:8px; }
.settings-cost-total b { color:#f54a45; font-size:22px; font-variant-numeric:tabular-nums; }
.settings-muted { font-size:12px; color:#8f959e; line-height:1.5; margin:4px 0; }
.settings-label { display:block; font-size:12px; font-weight:600; margin:8px 0 4px; color:#646a73; }
.settings-input { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid #e5e6eb; border-radius:8px; font:inherit; font-size:13px; margin:4px 0; }
.settings-btn-row { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
/* 插件中心：官网下载 / 安装 ZIP 主按钮加大 */
.settings-plugin-store-row { gap:12px; margin:12px 0 14px; }
.settings-plugin-store-btn {
  font-size: 15px !important;
  font-weight: 650 !important;
  padding: 12px 18px !important;
  border-radius: 10px !important;
  min-height: 44px;
  line-height: 1.3;
  flex: 1 1 160px;
}
.settings-subhead { font-size:13px; font-weight:700; margin:12px 0 4px; }
.settings-plugin-row { padding:10px 0; border-bottom:1px solid var(--hairline,#e5e6eb); }

/* 2026-10-29 设置栏目默认折叠 */
.settings-fold { border: 1px solid var(--hairline,#e5e6eb); border-radius: 12px; background: #fff; overflow: hidden; }
.settings-fold-sum {
  list-style: none; cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 700;
  color: var(--ink,#1a1d21); display: flex; align-items: center; gap: 8px; user-select: none;
}
.settings-fold-sum::-webkit-details-marker { display: none; }
.settings-fold-sum::before { content: "▸"; color: #8f959e; font-size: 12px; width: 12px; }
.settings-fold[open] > .settings-fold-sum::before { content: "▾"; }
.settings-fold-body { padding: 0 14px 14px; }
.settings-online-bar { margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.settings-online-bar.hot { background: #f0f9eb; color: #67c23a; }
.settings-online-bar.warm { background: #fdf6ec; color: #e6a23c; }
.settings-online-bar.cold { background: #f5f7fa; color: #909399; }
.tb-bot-avatar .bot-status-dot { right: -2px; bottom: -2px; width: 10px; height: 10px; }

/* 用户创意多轮对话（设置·插件中心） */
.settings-idea-chat {
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid var(--hairline, #e5e6eb);
  border-radius: 8px;
  background: #f5f6f7;
}
.settings-idea-chat .idea-msg { margin: 0 0 8px; }
.settings-idea-chat .idea-msg b { font-size: 12px; color: #646a73; }
.settings-idea-chat .idea-msg pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e6eb;
}
.settings-idea-chat .idea-msg.user pre { background: #c9e7ff; border-color: transparent; }
.settings-idea-chat .idea-msg.bot pre { background: #fff; }

/* ── 2026-11-07 手机端优化（客户上线后老板令：手机远程打开要适合手机使用）──
   1) 聊天区底边跟随输入区真实高度（多行输入/待发文件时消息不再被输入区压住）
   2) 触屏设备点击区 ≥ 36px：✏️ 人格、👍👎 评价、引导条 ×、会话切换 ▼
   3) 五句话引导条手机上更紧凑
   4) 消息气泡手机上占满可用宽度 */
.chat-area { bottom: var(--composer-h, 72px) !important; right: 0; }
@media (max-width: 600px) {
  .chat-area { bottom: var(--composer-h, 82px); }
  .chat-guide { padding: 8px 10px !important; font-size: 12.5px; line-height: 1.55; }
  .chat-guide b { font-size: 12.5px !important; }
  .msg .bubble, .message .bubble { max-width: 88% !important; }
  .topbar .title-badge.icon-only { flex: 0 0 40px; width: 40px; max-width: 40px; min-width: 40px; min-height: 40px; height: 40px; padding: 0; }
}
@media (hover: none) and (pointer: coarse) {
  #botAliasBtn { min-width: 36px; min-height: 36px; font-size: 15px !important; }
  .msg-fb button { min-width: 36px; min-height: 36px; font-size: 16px; }
  .chat-guide span[onclick] { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; font-size: 20px !important; margin: -8px -8px -8px 0; }
  .topbar .picker .chevron { font-size: 13px; padding: 8px; }
  .input-area .attach { min-width: 44px; }
}

/* ── 2026-11-07 老板令：设置·插件中心按钮/布局、文件卡片按钮 ──────────────────
   1) 插件中心：筛选分段按钮带高亮；每个插件一张卡（名称+状态 / 说明 / 底部动作栏）
      可见范围下拉不再占整行；打开=主按钮、开启/关闭=开关色、删除=危险色
   2) 文件卡片：按钮字号修正（原 font-size 误用 --radius-md=10px）、底部一排动作、
      手机上 ≥40px 可点，卡片占满气泡宽度 */
.settings-divider { height: 1px; background: var(--hairline, #e4e6ea); margin: 14px 0 6px; }
.settings-idea-actions { align-items: center; }
.settings-act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--hairline, #e4e6ea); background: #fff; color: #1f2329;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.settings-act-btn:hover { background: var(--primary-soft, #eef4ff); border-color: #c7d8ff; color: var(--primary, #3370ff); }
.settings-act-btn:disabled { opacity: .45; cursor: not-allowed; }
.settings-act-btn.primary { background: var(--primary, #3370ff); border-color: var(--primary, #3370ff); color: #fff; }
.settings-act-btn.primary:hover { background: var(--primary-hover, #1F4E9E); border-color: var(--primary-hover, #1F4E9E); color: #fff; }
.settings-act-btn.success { background: #eafaf0; border-color: #bfe8cf; color: #178a46; }
.settings-act-btn.success:hover { background: #d9f4e3; }
.settings-act-btn.toggle-on { background: #eafaf0; border-color: #bfe8cf; color: #178a46; }
.settings-act-btn.toggle-off { background: #f5f6f8; border-color: var(--hairline, #e4e6ea); color: #646a73; }
.settings-act-btn.toggle-off:hover { background: #fff5f5; border-color: #f6c9c7; color: var(--danger, #f54a45); }
.settings-act-btn.danger { background: #fff; border-color: #f6c9c7; color: var(--danger, #f54a45); }
.settings-act-btn.danger:hover { background: #fff5f5; }

.settings-seg { display: inline-flex; align-items: center; gap: 0; margin: 4px 0 10px; }
.settings-seg-label { font-size: 12px; color: #8f959e; margin-right: 8px; }
.settings-seg-btn {
  min-height: 32px; padding: 0 14px; border: 1px solid var(--hairline, #e4e6ea); background: #fff;
  color: #4e5969; font: inherit; font-size: 13px; cursor: pointer; margin-left: -1px;
}
.settings-seg-btn:first-of-type { border-radius: 8px 0 0 8px; margin-left: 0; }
.settings-seg-btn:last-of-type { border-radius: 0 8px 8px 0; }
.settings-seg-btn.active { background: var(--primary, #3370ff); border-color: var(--primary, #3370ff); color: #fff; font-weight: 600; position: relative; z-index: 1; }

.settings-plugin-row {
  padding: 12px 14px; margin: 8px 0; border: 1px solid var(--hairline, #e4e6ea);
  border-radius: 12px; background: #fff; border-bottom: 1px solid var(--hairline, #e4e6ea);
}
.settings-plugin-row.is-off { background: #fafbfc; }
.settings-plugin-row.is-off .settings-plugin-name { color: #646a73; }
.settings-plugin-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.settings-plugin-name { font-size: 14px; color: #1f2329; }
.settings-plugin-state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.settings-plugin-state.on { background: #eafaf0; color: #178a46; }
.settings-plugin-state.off { background: #f2f3f5; color: #8f959e; }
.settings-plugin-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: #f2f3f5; color: #646a73; }
.settings-plugin-desc { margin: 6px 0 0; }
.settings-plugin-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hairline, #e4e6ea);
}
.settings-vis-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.settings-vis-row .settings-label { margin: 0; white-space: nowrap; }
.settings-vis-select.settings-input { width: auto; min-width: 88px; margin: 0; padding: 5px 28px 5px 10px; min-height: 32px; border-radius: 8px; }
.settings-vis-picked { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.settings-plugin-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }

/* 文件卡片 */
.file-card-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; line-height: 1; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.file-card-btn:hover { filter: brightness(0.96); }
.file-card-preview { color: var(--primary, #3370ff); background: #fff; border-color: #c7d8ff; }
.file-card-open { color: #00a882; background: #e8f7f2; border-color: #bfe8d8; }
.file-card-share { color: #8a5a00; background: #fff8e6; border-color: #f5d48a; border-radius: 8px; padding: 0 12px; }
.file-card-private { color: #8a5a00; background: #fff8e6; border-color: #f5d48a; font-weight: 600; }
.file-card-private.is-private {
  color: #fff; background: #475467; border-color: #344054; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(71,84,103,.25);
}
.file-card.is-private-file {
  border: 2px solid #475467 !important;
  background: linear-gradient(180deg, #f4f6f8 0%, #fff 48%);
  position: relative;
}
.file-card.is-private-file::after {
  content: "仅自己";
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: #475467; border-radius: 999px;
  padding: 2px 8px; line-height: 1.4; pointer-events: none;
}
.file-card.file-card-image.is-private-file::after { top: 6px; right: 6px; }
.file-card { white-space: normal; }   /* 气泡是 pre-wrap，模板里的换行会被当成空行撑高卡片 */
.file-card.file-card-doc { flex-direction: column; align-items: stretch; gap: 8px; max-width: 360px; width: 100%; padding: 10px 12px; }
.file-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.file-card-image .file-card-bar { flex-wrap: wrap; gap: 6px; }
.file-card-image .file-card-actions { margin-left: auto; }
.file-list .file-card.file-card-doc { width: calc(50% - 5px); min-width: 150px; }
@media (max-width: 600px) {
  .file-card.file-card-doc { max-width: none; }
  .file-card-name { white-space: normal; word-break: break-all; line-height: 1.35; }
  .file-card-actions { gap: 6px 8px; }
  .file-card-doc .file-card-actions .file-card-btn { flex: 1 1 calc(50% - 8px); }
  .file-list .file-card.file-card-doc { width: 100%; }
  .settings-plugin-row { padding: 10px 12px; }
  .settings-plugin-actions { margin-left: 0; width: 100%; }
  .settings-plugin-actions .settings-act-btn { flex: 1 1 auto; }
  .settings-plugin-actions .settings-act-btn.danger { flex: 0 0 auto; margin-left: auto; }
}
@media (hover: none) and (pointer: coarse) {
  .file-card-btn { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
  .settings-act-btn, .settings-seg-btn { min-height: 40px; font-size: 14px; }
  .settings-vis-select.settings-input { min-height: 40px; font-size: 14px; }
  #fileViewOpenWith, #fileViewOpenApp { min-height: 40px; }
}

/* 2026-11-07 新手上手引导条 */
.chat-guide-steps > div { margin: 3px 0; }
.chat-guide-steps b, .chat-guide-tips b { color: var(--ink); }
@media (max-width: 600px) {
  .chat-guide .chat-guide-steps > div, .chat-guide .chat-guide-tips, .chat-guide .chat-guide-can { font-size: 12px; }
}

/* 2026-11-13 私聊项目条：紧贴顶栏下沿，高度随内容，不再写死 56/96/104 */
.project-bar {
  position: fixed;
  top: var(--topbar-h, 56px);
  left: 0;
  right: 0;
  z-index: 99;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border, #e5e6eb);
  background: var(--surface, #fff);
  flex-wrap: nowrap;
  box-sizing: border-box;
}
.project-bar.is-open { display: flex; }
.chat-area { top: var(--topbar-h, 56px); }
body.project-bar-open .chat-area {
  top: calc(var(--topbar-h, 56px) + var(--project-bar-h, 44px));
}
@media (min-width: 900px) {
  .app-shell .project-bar { left: auto; right: auto; position: static; }
}
.project-bar .project-select {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  height: 36px;
  border: 1px solid var(--border, #e5e6eb);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink, #1d2129);
  font-size: 14px;
}
.project-bar-btn {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e6eb);
  background: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink, #1d2129);
  white-space: nowrap;
  flex: 0 0 auto;
}
.project-bar-btn.primary {
  background: var(--primary, #3370ff);
  border-color: var(--primary, #3370ff);
  color: #fff;
  font-weight: 600;
}
.project-bar-btn.ghost { color: var(--ink-secondary, #5c636d); background: #fff; }
.project-bar-btn.danger { color: var(--danger, #f54a45); }
.project-bar-btn:disabled { opacity: 0.4; cursor: default; }
.project-archived-toggle {
  font-size: 13px;
  color: var(--ink-secondary, #5c636d);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
  height: 36px;
}
.project-btn-short, .project-arch-short { display: none; }
@media (max-width: 720px) {
  .project-bar { padding: 4px 8px; gap: 4px; overflow-x: auto; }
  .project-bar .project-select { max-width: 42vw; }
  .project-bar-btn, .project-bar .project-select, .project-archived-toggle { height: 40px; }
  .project-bar-btn { padding: 0 8px; font-size: 13px; }
  .project-btn-full, .project-arch-full { display: none; }
  .project-btn-short, .project-arch-short { display: inline; }
}
@media (hover: none) and (pointer: coarse) {
  .project-bar-btn, .project-bar .project-select { min-height: 40px; }
}

/* 侧栏插件文件夹拖放高亮 */
.contact-folder.sidebar-folder-drop,
.contact-cell.sidebar-plugin-drop {
  outline: 2px dashed #d97706;
  outline-offset: -2px;
  background: #fffbeb !important;
}
.contact-folder-head { touch-action: manipulation; }
