/* 全流程智能审计系统Agent · 前端样式
   设计取向：浅色、克制、信息密度高，面向审计专业人员，不花哨。 */

:root {
  --bg: #f8fafa;
  --panel: #ffffff;
  --panel-2: #eef4f3;
  --border: #e6ecec;
  --border-strong: #d0dedc;
  --text: #263238;
  --muted: #607d8b;
  --primary: #357b70;        /* 原版蓝绿主色（用户认可版本） */
  --primary-weak: #e8f3f1;
  --primary-hover: #2c6a60;
  --ok: #2e8b6e;
  --ok-bg: #e6f5ef;
  --warn: #c08a2e;
  --warn-bg: #fdf5e6;
  --danger: #c05040;
  --danger-bg: #fbeae6;
  --shadow: 0 2px 8px rgba(53, 123, 112, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

/* P3-B: 数字员工名片样式 */
.employee-card {
  background: linear-gradient(135deg, #ffffff 0%, #eef6f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(53, 123, 112, 0.15);
}
.employee-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #357b70, #2c6a60);
  display: grid; place-items: center;
  color: white; font-size: 24px; font-weight: 600;
  margin-bottom: 12px;
}
.employee-badge {
  display: inline-block;
  background: var(--primary-weak);
  color: var(--primary-hover);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 ---------- */
/* 顶栏拥挤修复（2026-10-18）：
   旧实现里 brand / nav / client-box 三个兄弟同处一行 flex，nav 不可压缩
   （flex-shrink:0），15 个条目一多就把右侧「提建议 / 退出登录」顶出可视区，
   只能横向滚动整条顶栏才够得着。
   新规则：
     · .nav 变成可压缩的独立滚动区（flex:1 + min-width:0），条目再多也只在区内滚；
     · .client-box 用 flex:0 0 auto + margin-left:auto 钉在最右，永远可见可点；
     · .topbar 自身 overflow:hidden，滚动条不再出现在整条顶栏上。 */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: nowrap;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
}
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: .5px; }

/* 窄屏优先保住右侧操作区：先收起品牌全称（图标保留），再让 nav 滚动 */
@media (max-width: 1400px) {
  .brand-name { display: none; }
}

.nav {
  flex: 1 1 auto;
  min-width: 0;                 /* 关键：允许压缩，否则会把右侧挤出屏幕 */
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
.nav::-webkit-scrollbar { height: 4px; }
.nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}
.nav a.active { background: var(--primary-weak); color: var(--primary); }
.nav a:hover { text-decoration: none; background: var(--panel-2); color: var(--text); }
/* 分组分隔线：15 项按语义分段，不再糊成一条 */
.nav .nav-sep {
  flex: 0 0 auto;
  width: 1px; height: 18px;
  background: var(--border);
  margin: 0 6px;
}
.client-box {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
  white-space: nowrap;
}
/* 右上操作区按钮：轻底 chip，比纯文字更好点，也和左侧导航入口区分开 */
.client-box .btn-link {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}
.client-box .btn-link:hover {
  background: var(--primary-weak);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.client-box .account-user { font-weight: 600; color: var(--text); }
.client-box input {
  width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
}
.client-box input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-weak);
}

/* ---------- 布局 ---------- */
.app-main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

.page-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 20px; margin: 0; }
.page-head .spacer { flex: 1; }

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-weight: 600; font-size: 15px; margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.btn:hover { background: var(--panel-2); }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger-bg); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 13px; color: var(--muted);
  margin-bottom: 5px; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-weak);
}
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- K0-C：行业/业务树形多选（存 code） ---------- */
.tag-picker {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card, #fff);
  padding: 6px 0;
}
.tag-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}
.tag-picker-item:hover { background: #f3f6fb; }
.tag-picker-item input[type="checkbox"] {
  width: 14px; height: 14px; margin: 0; padding: 0; flex: 0 0 auto;
}
.tag-picker-item .tp-code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 auto;
  min-width: 46px;
}
.tag-picker-item .tp-name { color: var(--text, #1f2937); }
.tag-picker-item input[type="checkbox"]:disabled + .tp-code,
.tag-picker-item input[type="checkbox"]:disabled ~ .tp-name { opacity: .55; }

/* ---------- 编辑项目弹窗：左右对称分栏（2026-11-09 确认版） ----------
   左半区 = 项目完整信息（标题/元信息/核心字段/背景/底部按钮），
   右半区 = 整面标签区：单位性质+行业属性置顶不滚，行业与业务并列两列、各自独立滚动。 */
.ms-wrap {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.ms-left, .ms-right {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}
.ms-left { border-right: 1px solid var(--border); overflow: auto; }
.ms-right { overflow: hidden; }
.ms-title { margin: 0 0 6px; }
.ms-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.ms-grow { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ms-grow textarea { flex: 1 1 auto; min-height: 120px; resize: none; }
.ms-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ms-hint {
  flex: 0 0 auto;
  font-size: 12px; line-height: 1.6; color: var(--muted);
  background: #f7f9fc; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 12px;
}
.ms-groups { flex: 0 0 auto; max-height: 34%; overflow: auto; }
.ms-trees {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  flex: 1 1 auto; min-height: 0; margin-top: 4px;
}
.ms-trees .field { display: flex; flex-direction: column; min-height: 0; }
.ms-tree { flex: 1 1 auto; min-height: 0; display: flex; }
.ms-trees .tag-picker { flex: 1 1 auto; min-height: 0; max-height: none; }

@media (max-width: 960px) {
  .ms-wrap { flex-direction: column; overflow: auto; }
  .ms-left { border-right: none; border-bottom: 1px solid var(--border); overflow: visible; }
  .ms-right { overflow: visible; }
  .ms-groups { max-height: none; }
  .ms-trees { display: block; }
  .ms-trees .tag-picker { max-height: 260px; }
}

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th {
  color: var(--muted); font-weight: 600;
  background: var(--panel-2);
  position: sticky; top: 0;
  white-space: nowrap;
}
.table tbody tr:hover { background: var(--panel-2); }
.table td .sub { color: var(--muted); font-size: 12px; }
.table.compact th, .table.compact td { padding: 6px 8px; font-size: 12px; }

/* 三栏并列（消耗明细：按场景 / 按项目 / 按模型） */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border);
}
.badge.primary { background: var(--primary-weak); color: var(--primary); border-color: transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.muted { color: var(--muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  padding: 9px 16px; cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 拖拽上传 ---------- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 26px; text-align: center;
  color: var(--muted);
  background: var(--panel-2);
  cursor: pointer;
  transition: .15s;
}
.dropzone.drag { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.dropzone strong { color: var(--text); }

/* ---------- 问答布局 ---------- */
.qa-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.qa-left .card, .qa-right .card { margin-top: 0; }
.qa-right .card + .card { margin-top: 16px; }
.answer-text { white-space: pre-wrap; line-height: 1.75; }
.ref-item, .issue-item {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--panel-2);
}
.ref-item .ref-head, .issue-item .issue-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-weight: 600; font-size: 13px;
}
.ref-snippet { color: var(--muted); font-size: 12.5px; white-space: pre-wrap; }
.meta-line { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ---------- 进度条 ---------- */
.bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; background: var(--primary); }
.bar.warn > span { background: var(--warn); }
.bar.danger > span { background: var(--danger); }
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- 统计小卡 ---------- */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 120px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat .num { font-size: 22px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 12px; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 8px; z-index: 50;
}
.toast {
  min-width: 220px; max-width: 360px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-size: 13px;
  animation: toast-in .18s ease;
}
.toast.ok { border-left: 3px solid var(--ok); }
.toast.warn { border-left: 3px solid var(--warn); }
.toast.err { border-left: 3px solid var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- 杂项 ---------- */
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tag { display: inline-block; padding: 1px 7px; margin: 2px 4px 2px 0; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* 临时授权弹窗（阶段 6） */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; z-index: 80; padding: 20px; }
.modal { width: 440px; max-width: 92vw; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-warn { background: #fff7e6; border-color: #ffd591; color: #ad6800; }
.grant-banner:empty { display: none; }
.grant-banner { margin-top: 10px; }
.notif-bell { position: relative; cursor: pointer; }
.notif-bell .badge { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; background: #e34d2e; color: #fff; border-radius: 9px; font-size: 11px; padding: 0 4px; }
.notif-panel { position: fixed; right: 14px; top: 56px; width: 360px; max-width: 92vw; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); z-index: 90; padding: 10px; }
.notif-item { padding: 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notif-item.unread { background: #fffbe6; }
.notif-item .t { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- 顶栏用户区 ---------- */
.client-box { display: flex; align-items: center; gap: 10px; }
.user-info { font-size: 13px; color: var(--text); }
.dev-badge { font-size: 12px; color: var(--muted); padding: 2px 8px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--border); }
.btn-link { color: var(--primary); text-decoration: none; font-size: 13px; cursor: pointer; background: none; border: none; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ---------- 登录页 ---------- */
.login-wrap { max-width: 360px; margin: 60px auto; padding: 28px 30px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-wrap h2 { margin: 0 0 18px; font-size: 18px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-form input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--text); }
.login-form .btn-primary { margin-top: 4px; }

/* ---------- 专家体系页（#108） ---------- */
.kv-row { display: flex; gap: 8px; margin-bottom: 6px; }
.kv-row .pp-k { flex: 0 0 140px; }
.kv-row .pp-v { flex: 1; }
.md-out {
  white-space: pre-wrap; word-break: break-word;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.6; max-height: 420px; overflow: auto;
}
.form-err { color: var(--danger); font-size: 13px; min-height: 18px; }
.hint { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ---------- 历史问答页 ---------- */
/* 分页条：留痕是长列表，没有分页会一次性拉全量，慢且看不过来 */
.pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 14px; }
.pager .muted { font-size: 13px; }

/* ---------- 弹层（详情查看） ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; z-index: 60; padding: 20px; }
.overlay-card {
  position: relative;  /* 弹窗右上角 X 关闭按钮的定位基准（2026-10-21 真机反馈：弹窗关不掉） */
  width: 96vw;
  max-width: none;
  height: 92vh;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

/* 审核专用全屏弹窗兜底：knowledge.js 里用内联样式，以下防止缓存/旧 CSS 导致卡片变窄 */
.review-overlay {
  padding: 16px;
}
.review-card {
  /* 宽高由内联样式 + 遮罩层 flex 拉伸决定，这里不再写死，避免与 inset/flex 方案打架 */
  max-width: none !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  box-sizing: border-box;
}

/* ---------- 登录页版权 / 关于弹窗 ---------- */
.login-hint { text-align: center; }
.login-copyright { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); text-align: center; }
.login-designer { display: block; margin-top: 3px; }
.about-list { display: grid; grid-template-columns: 84px 1fr; gap: 8px 14px; font-size: 13px; margin: 12px 0 16px; }
.about-list dt { color: var(--muted); }
.about-list dd { margin: 0; }
.about-page { max-width: 420px; margin: 40px auto; }

/* ---------- 界面水印（防截屏追溯） ---------- */
/* z-index 9999 高于弹层(60)/toast(50)：弹窗、对话框同样盖水印；
   pointer-events:none 保证不挡任何点击与输入。 */
.wm-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background-repeat: repeat; }

/* ---------- 二期：标签 chip / 模型选择器 / 结果 ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; cursor: pointer; background: var(--bg-soft);
}
.chip input { margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 14px; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.model-selector {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft);
  margin: 8px 0 12px;
}
.model-selector .field { margin: 0; }
.model-hint { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.model-card {
  margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px;
  background: var(--bg-soft); font-size: 13px;
}
.model-card h4 { margin: 0 0 8px; }
.model-card ul { margin: 0; padding-left: 18px; }
.model-card li { margin: 4px 0; }
.result-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--ok-bg); }
.btn-ok { color: var(--ok); border-color: var(--ok-bg); }
.btn-ok:hover { background: var(--ok-bg); }
/* 批量审核入库：大号醒目按钮 */
.btn-batch {
  padding: 10px 26px; font-size: 15px; font-weight: 600;
  color: #fff; background: #16a34a; border: 1px solid #16a34a;
  border-radius: 8px; cursor: pointer; box-shadow: 0 2px 6px rgba(22,163,74,.25);
}
.btn-batch:hover:not(:disabled) { background: #15803d; }
.btn-batch:disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; box-shadow: none; }
/* 批量驳回 / 批量删除 */
.btn-reject2 {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  color: #fff; background: #ea580c; border: 1px solid #ea580c;
  border-radius: 8px; cursor: pointer;
}
.btn-reject2:hover:not(:disabled) { background: #c2410c; }
.btn-reject2:disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; }
.btn-del {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  color: #fff; background: #b91c1c; border: 1px solid #b91c1c;
  border-radius: 8px; cursor: pointer;
}
.btn-del:hover:not(:disabled) { background: #7f1d1d; }
.btn-del:disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; }
/* 标签树紧凑节点：小行高、无边框胶囊，hover 高亮
   S4-1：inline-flex + nowrap 会让长标签名撑出横向滚动条，改成块级 flex + 允许折行 */
.tree-node {
  display: flex; align-items: flex-start; gap: 5px; min-width: 0;
  padding: 2px 6px; margin: 0; border-radius: 6px;
  font-size: 12.5px; line-height: 1.5; cursor: pointer; white-space: normal; word-break: break-word;
}
.tree-node:hover { background: #eef2f7; }
.tree-node input { margin: 1px 0 0; flex: 0 0 auto; width: 14px; height: 14px; cursor: pointer; }
.tree-node b { font-weight: 600; color: #334155; }

/* ---------- 二期·审计底稿AI助手（变更清单模式） ---------- */
.item-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  margin: 8px 0; background: var(--bg-soft);
}
.item-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.item-title { font-weight: 600; }
.item-target { color: var(--muted); font-size: 13px; margin: 6px 0 4px 24px; }
.item-change { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 24px; }
.item-reason { color: var(--muted); font-size: 12px; margin: 4px 0 0 24px; }
.chip-before { background: #fdecec; border-color: #f5c2c2; color: #b42318; }
.chip-after { background: #e9f7ef; border-color: #b7e4c7; color: #1f7a4d; }
.arrow { color: var(--muted); font-weight: 700; }
.risk-low { color: #1f7a4d; font-weight: 600; }
.risk-mid { color: #b58105; font-weight: 600; }
.risk-high { color: #b42318; font-weight: 600; }
.detail-row { padding: 4px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.detail-row.ok { color: #1f7a4d; }
.detail-row.skip { color: #b58105; }
.log-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }


/* ---------- N2/N3：知识库入库审核卡片式列表 ---------- */
.kb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kb-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background .12s, border-color .12s;
  cursor: pointer;
}
.kb-row:hover {
  background: var(--panel-2);
  border-color: var(--border-strong);
}
.kb-row.recommended {
  border-left: 4px solid var(--primary);
  background: var(--primary-weak);
}
.kb-row-main {
  flex: 1;
  min-width: 0;           /* 关键：让 flex 子项可以被压缩，避免撑出滚动条 */
}
.kb-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word; /* 长标题正常换行，不挤在一列 */
  white-space: normal;
  margin-bottom: 6px;
}
.kb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 12px;
  margin-bottom: 6px;
}
.kb-tags {
  font-size: 12px;
  color: var(--muted);
}
.kb-rec-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 999px;
}
.kb-row-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 审核弹窗：正文预览 */
.review-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin: 8px 0 12px;
}
.review-preview-col,
.review-tags-col {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.review-tags-col {
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.md-preview-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}
.md-preview-header {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.md-preview {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  max-height: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: transparent;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  flex: 0 0 auto;
}
.review-head h3 { margin: 0; font-size: 17px; }
.review-hint {
  padding: 10px 12px;
  background: var(--primary-weak);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.6;
  flex: 0 0 auto;
}
.review-hint b { color: var(--primary); }
.review-actions {
  flex: 0 0 auto;
  background: var(--panel);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}


@media (max-width: 900px) {
  .review-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    overflow: auto;
  }
  .review-tags-col {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 12px;
  }
  .review-preview-col { max-height: 55vh; }
}

@media (max-width: 720px) {
  .kb-row {
    flex-direction: column;
    gap: 10px;
  }
  .kb-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- 推进状态：13 节点横向进度条 ---------- */
.wf-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 6px;
  align-items: flex-start;
  padding: 4px 2px 6px;
}
.wf-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  transition: background .12s, border-color .12s;
  font-size: 13px;
}
.wf-node:hover { border-color: var(--border-strong); background: var(--panel-2); }
.wf-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: #fff;
  flex: 0 0 auto;
}
.wf-node.done .wf-dot { background: var(--primary); border-color: var(--primary); }
.wf-node.done { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
.wf-node.current .wf-dot {
  width: 16px; height: 16px;
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-weak);
}
.wf-node.current {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-weak);
  font-weight: 600;
}
.wf-node.todo { color: var(--muted); }
.wf-label { white-space: nowrap; }

/* ---------- 推进状态：两个交互面板 ---------- */
.wf-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 8px 0 12px;
}
.wf-col { min-width: 0; }
.wf-col .kb-list { max-height: 46vh; overflow: auto; }
.wf-plan-max { width: 99vw !important; height: 99vh !important; }
.wf-col textarea { width: 100%; min-height: 96px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; font-family: inherit; font-size: 14px; resize: vertical; }
.wf-col textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-weak); }
.wf-col select { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 14px; background: #fff; }
.wf-col input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 14px; background: #fff; }

@media (max-width: 900px) {
  .wf-panel { grid-template-columns: 1fr; }
}

/* === plan panel A块改造 === */
.plan-req-wrap { margin: 10px 0; }
.plan-req { width: 100%; min-height: 64px; resize: vertical; padding: 8px 10px; border: 1px solid #d0d7e2; border-radius: 8px; font-size: 13px; line-height: 1.5; box-sizing: border-box; font-family: inherit; }
.plan-att { margin-top: 8px; }
.plan-drop { border: 1.5px dashed #b9c2d0; border-radius: 8px; padding: 10px; text-align: center; color: #667; background: #fafbfc; }
.plan-drop.over { border-color: #3b82f6; background: #eef4ff; }
.att-list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef1f6; border: 1px solid #dde3ec; border-radius: 14px; padding: 3px 10px; font-size: 12px; }
.att-chip b { cursor: pointer; color: #c0392b; font-weight: bold; }
.warn-banner { margin-top: 8px; padding: 8px 10px; background: #fff4e5; border: 1px solid #ffd591; border-radius: 8px; color: #a05a00; font-size: 12px; }
.placeholder-box { padding: 8px 10px; background: #f6f7f9; border: 1px dashed #ccd; border-radius: 8px; color: #889; font-size: 12px; }
.result-preview { margin-top: 10px; border: 1px solid #e3e3e3; border-radius: 8px; padding: 12px; background: #fff; max-height: 380px; overflow: auto; }
.result-preview h2, .result-preview h3, .result-preview h4 { margin: 10px 0 4px; }
.result-preview ul { margin: 4px 0 4px 18px; }
.result-preview p { margin: 4px 0; white-space: pre-wrap; }
.rev-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed #eee; flex-wrap: wrap; }
.rev-row .rev-status { color: #2e7d32; font-size: 12px; }
.check-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.check-table th, .check-table td { border: 1px solid #e3e3e3; padding: 4px 6px; text-align: left; vertical-align: top; }
.check-table th { background: #f3f5f8; }

/* ---------- 块三：提建议弹窗 ---------- */
.sug-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  display: grid; place-items: center;
  z-index: 60; padding: 20px;
}
.sug-modal {
  width: 560px; max-width: 96vw; max-height: 92vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px;
}
.sug-modal h2 { margin: 0 0 14px; font-size: 17px; }
.sug-modal .field textarea { min-height: 140px; }
/* 管理后台详情里的图片（建议内容内嵌 base64） */
.sug-content { line-height: 1.7; word-break: break-word; }
.sug-content .sug-img {
  display: block; max-width: 100%; max-height: 360px;
  border: 1px solid var(--border); border-radius: 8px; margin: 8px 0;
}

/* ===== V2.5 批次三：项目资料 IMA 式文件夹树 ===== */
.kb-tree { border: 1px solid #e3e8f0; border-radius: 8px; padding: 6px; background: #fff; }
.kb-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; }
.kb-dir { cursor: pointer; font-weight: 600; }
.kb-row:hover { background: #f5f7fb; }
.kb-caret { width: 14px; color: #6b7686; flex: none; }
.kb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-file .kb-name { font-weight: 400; }
.kb-cnt { flex: none; font-size: 12px; }
.kb-act { flex: none; }
.kb-children { margin-left: 20px; border-left: 1px dashed #d6dee9; }


/* ================= P4-B 手机端 M1（2026-10-22） =================
   目标：手机浏览器（375/390px）核心页面排版不破、可点可判断。
   原则：全部走 CSS 变量，内部浅青绿 / 外部藏蓝两套主题自动跟随，不硬编码色值。 */

/* 汉堡按钮（仅 ≤900px 显示）+ 抽屉遮罩 */
.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  border-radius: 6px;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  color: var(--text);
  align-items: center; justify-content: center;
}
.side-backdrop { display: none; }

/* ---- 手机待办页（桌面/手机共用卡片样式） ---- */
.todo-list { display: flex; flex-direction: column; gap: 12px; }
.todo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.todo-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-proj { font-size: 13px; color: var(--text); margin-top: 6px; word-break: break-word; }
.todo-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.todo-hint {
  font-size: 13px; color: var(--muted);
  background: var(--panel-2); border-radius: 6px;
  padding: 8px 10px; margin: 10px 0; line-height: 1.6;
}
.todo-form { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 10px; }
.todo-form-actions { display: flex; gap: 10px; }
.todo-form-actions .btn { flex: 1; justify-content: center; }

/* ---- ≤900px：侧栏收进抽屉 ---- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  #sideToggle { display: none; }

  .topbar { padding: 0 10px; gap: 10px; height: 52px; }
  .sidebar {
    position: fixed !important;
    left: 0; top: 52px; bottom: 0;
    width: 260px !important;
    height: auto;
    z-index: 45;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, .18);
  }
  .sidebar.open { transform: translateX(0); }
  /* 抽屉内强制全量展开（忽略桌面折叠态） */
  .sidebar .nav.side-nav a .lb { display: inline !important; }
  .sidebar .nav.side-nav a { justify-content: flex-start !important; padding: 10px 12px; }
  .sidebar .t9-glabel, .sidebar .t9-gsep {
    font-size: 12px !important; height: auto !important;
    padding: 3px 8px !important; margin: 8px 0 2px !important;
    border-radius: 3px !important;
  }
  .side-backdrop {
    display: none;
    position: fixed; inset: 0; top: 52px;
    background: rgba(15, 23, 42, .42);
    z-index: 44;
  }
  .side-backdrop.show { display: block; }

  .app-main { padding: 14px 12px 48px; max-width: none; }
  .page-head h1 { font-size: 18px; }
  .card { padding: 14px; }

  /* 表格横向滚动（页面内宽表不撑破版面） */
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table thead, .table tbody { display: table; width: 100%; }

  .login-wrap { margin: 24px auto; padding: 22px 18px; }
  .toast-host { left: 10px; right: 10px; align-items: stretch; bottom: 10px; }
  .toast { max-width: none; min-width: 0; }
  .notif-panel { left: 10px; right: 10px; width: auto; top: 60px; }
}

/* ---- ≤480px：真手机断点（按钮≥44 / 字号≥14） ---- */
@media (max-width: 480px) {
  body { font-size: 14px; }
  .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .btn-sm { min-height: 38px; padding: 6px 12px; }
  .field input, .field select, .field textarea { min-height: 44px; font-size: 14px; }
  .client-box .account-user { display: none; }
  .client-box { gap: 6px; padding-left: 8px; }
  .stat { min-width: 0; }
  .page-head { flex-wrap: wrap; }
}


/* ============ 前端改造批次（2026-10-22）：18数字员工卡片/筛选/详情弹窗 + 底座规范文档 ============ */
.emp-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.emp-filter input, .emp-filter .emp-cat {
  padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14px; background: var(--panel); color: var(--text); font-family: inherit;
}
.emp-filter .emp-cat { cursor: pointer; max-width: 200px; }
.emp-filter input:focus, .emp-filter .emp-cat:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-weak); }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.emp-card {
  background: linear-gradient(135deg, #ffffff 0%, #eef6f4 100%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.emp-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(53,123,112,.16); }
.emp-avatar {
  position: relative; overflow: hidden;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #357b70, #2c6a60);
  color: #fff; display: grid; place-items: center;
  font-size: 20px; font-weight: 600; margin-bottom: 10px;
}
.emp-avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.emp-avatar-ch { position: relative; z-index: 1; }
.emp-avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.emp-card-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.emp-card-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.emp-card-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.emp-cap {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  background: var(--primary-weak); color: var(--primary);
}
.emp-card-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.emp-card-more { margin-left: auto; color: var(--primary); font-weight: 500; }
/* 名片详情弹窗 */
.emp-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 560px; width: 92vw; max-height: 86vh; height: auto; padding: 22px 24px; }
/* 标题字重层级（2026-10-22 批次）：h2 22/600、h3 17/600，内联 margin 可覆盖 */
.card h2, .overlay-card h2 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.card h3, .overlay-card h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.emp-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.emp-modal-close {
  margin-left: auto; border: none; background: var(--panel-2); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.emp-modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.emp-modal-body { border-top: 1px solid var(--border); padding-top: 14px; }
.emp-sec-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.emp-desc { font-size: 14px; line-height: 1.7; color: var(--text); margin: 0; }
.emp-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emp-conn {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
}
/* 系统底座规范文档 */
.sysbase-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sysbase-tab {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--muted); font-size: 13px; cursor: pointer; font-weight: 500;
}
.sysbase-tab.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.sysbase-sec { margin-bottom: 12px; }
.sysbase-sec h4 { margin: 14px 0 6px; font-size: 14px; color: var(--text); }
.sysbase-sec p, .sysbase-sec li { font-size: 13px; line-height: 1.75; color: var(--text); }
.sysbase-sec ul { margin: 4px 0 0; padding-left: 20px; }
.sysbase-sec .ok-item { color: #1f7a4d; }
@media (max-width: 720px) {
  .emp-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 480px) {
  .emp-grid { grid-template-columns: 1fr; }
  .emp-modal { padding: 16px; }
}

/* ============ 智能跟随 Agent「小伴」F1-F12（2026-10-23 追加，勿改上方已有规则） ============ */
.agent-ball {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  z-index: 9999; cursor: grab; background: #fff;
  box-shadow: 0 2px 12px rgba(53,123,112,.25);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
  animation: agent-breathe 3s ease-in-out infinite;
}
.agent-ball.dragging { cursor: grabbing; animation: none; }
.agent-ball img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; pointer-events: none; }
.agent-ball .agent-badge {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #e74c3c; display: none; border: 2px solid #fff;
}
.agent-ball.has-unread .agent-badge { display: block; animation: agent-bounce 1.2s ease-in-out infinite; }
.agent-ball.drag-over {
  border: 2px dashed #e8913a; background: #fff3e6;
  transform: scale(1.08); animation-duration: 1s;
}
@keyframes agent-breathe { 0%,100% { opacity: .95; } 50% { opacity: 1; } }
@keyframes agent-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.agent-panel {
  position: fixed; top: 0; right: 0;
  width: 380px; max-width: 92vw; height: 100vh;
  background: #fff; border-left: 1px solid #e0e6e8;
  z-index: 9998; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,.08);
}
.agent-panel.open { transform: translateX(0); }

.agent-panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #e0e6e8; flex-shrink: 0;
}
.agent-panel-avatar { width: 36px; height: 36px; border-radius: 50%; }
.agent-panel-title { flex: 1; line-height: 1.3; }
.agent-name { font-size: 15px; font-weight: 600; color: #2c3e50; }
.agent-status { font-size: 12px; color: #1f7a4d; }
.agent-panel-close {
  border: none; background: transparent; font-size: 22px;
  color: #8a9ba8; cursor: pointer; line-height: 1; padding: 4px 8px;
}
.agent-panel-close:hover { color: #2c3e50; }
.agent-feedback-tab-btn {
  border: 1px solid #e0e6e8; background: #f7f9fa; border-radius: 6px;
  font-size: 12px; padding: 4px 8px; cursor: pointer; color: #5a6b7b;
}
.agent-feedback-tab-btn:hover { background: #eef3f8; }

/* B6+-T2：底座数字员工切换条（通用+专属） */
.agent-employee-bar {
  display: flex; align-items: center; gap: 6px; overflow-x: auto;
  padding: 8px 12px; border-bottom: 1px solid #e0e6e8; flex-shrink: 0;
  background: #f7f9fa; scrollbar-width: thin;
}
.agent-emp-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1px solid #d6dee4; background: #fff; border-radius: 16px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: #4a5b6b;
  font-family: inherit; transition: all .15s ease;
}
.agent-emp-chip:hover { border-color: #7fb3a3; background: #f2faf8; }
.agent-emp-chip.active {
  border-color: #1f7a4d; background: #e8f3f1; color: #1f7a4d; font-weight: 600;
}
.agent-emp-chip-name { white-space: nowrap; }
.agent-emp-chip-role { font-size: 11px; color: #8a9ba8; white-space: nowrap; }
.agent-emp-chip.active .agent-emp-chip-role { color: #5a9e82; }
.agent-emp-empty { font-size: 12px; color: #8a9ba8; padding: 2px 4px; }

.agent-chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.agent-panel-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.agent-msg-row { display: flex; }
.agent-msg-row.user { justify-content: flex-end; }
.agent-bubble {
  max-width: 85%; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; line-height: 1.6; word-break: break-word; white-space: pre-wrap;
}
.agent-msg-row.assistant .agent-bubble { background: #e8f3f1; color: #24433d; }
.agent-msg-row.user .agent-bubble { background: #fff; border: 1px solid #e0e6e8; color: #2c3e50; }
.agent-msg-imgs { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.agent-msg-imgs img { max-width: 120px; max-height: 90px; border-radius: 4px; border: 1px solid #e0e6e8; }

.agent-typing { display: inline-flex; gap: 4px; padding: 10px 12px; background: #e8f3f1; border-radius: 8px; }
.agent-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #5b9a8c;
  animation: agent-dot 1.2s infinite;
}
.agent-typing span:nth-child(2) { animation-delay: .2s; }
.agent-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes agent-dot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.agent-panel-quick {
  display: flex; gap: 6px; padding: 8px 12px;
  border-top: 1px solid #eef2f4; flex-wrap: wrap; flex-shrink: 0;
}
.agent-panel-quick button {
  border: 1px solid #cfe3de; background: #f2f8f6; color: #2f7a6c;
  border-radius: 14px; font-size: 12px; padding: 5px 10px; cursor: pointer;
}
.agent-panel-quick button:hover { background: #e3f1ee; }
.agent-panel-quick button.active { background: #357b70; color: #fff; border-color: #357b70; }

.agent-panel-input { border-top: 1px solid #e0e6e8; padding: 10px 12px 8px; flex-shrink: 0; }
.agent-attachments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.agent-attach-item {
  display: flex; align-items: center; gap: 8px;
  background: #fff8e6; border: 1px dashed #e8c87a; border-radius: 6px;
  padding: 4px 8px; font-size: 12px;
}
.agent-attach-item img { width: 40px; height: 32px; object-fit: cover; border-radius: 3px; }
.agent-attach-meta { flex: 1; color: #8a6d3b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-attach-del { border: none; background: transparent; color: #c0392b; cursor: pointer; font-size: 14px; }
#agentInput {
  width: 100%; box-sizing: border-box; resize: none;
  border: 1px solid #d8e0e3; border-radius: 8px;
  padding: 8px; font-size: 13.5px; min-height: 44px; max-height: 120px;
  font-family: inherit; outline: none;
}
#agentInput:focus { border-color: #357b70; }
.agent-input-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.agent-context-hint { flex: 1; font-size: 11px; color: #9aa7b1; }
#agentAttachBtn {
  border: 1px solid #e0e6e8; background: #f7f9fa; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; font-size: 15px;
}
#agentSendBtn {
  background: #357b70; color: #fff; border: none; border-radius: 6px;
  padding: 7px 16px; font-size: 13px; cursor: pointer;
}
#agentSendBtn:disabled { background: #a8c4bf; cursor: not-allowed; }

.agent-mode-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.agent-mode-mask.hidden { display: none; }
.agent-mode-box {
  background: #fff; border-radius: 10px; padding: 16px; width: 80%;
  box-shadow: 0 6px 24px rgba(0,0,0,.15); text-align: center;
}
.agent-mode-title { font-size: 14px; color: #2c3e50; margin-bottom: 12px; }
.agent-mode-btn {
  display: block; width: 100%; box-sizing: border-box;
  margin-bottom: 8px; padding: 10px; border-radius: 8px;
  font-size: 13.5px; cursor: pointer; border: 1px solid transparent;
}
.agent-mode-btn.primary { background: #357b70; color: #fff; }
.agent-mode-btn.warn { background: #fff3e6; color: #c8781a; border-color: #e8c87a; }
.agent-mode-cancel { background: transparent; border: none; color: #8a9ba8; cursor: pointer; font-size: 12px; }

.agent-feedback-view {
  flex: 1; overflow-y: auto; padding: 12px;
  display: none; flex-direction: column; gap: 8px;
}
.agent-feedback-view.open { display: flex; }
.agent-feedback-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.agent-feedback-back {
  border: none; background: transparent; color: #357b70;
  cursor: pointer; font-size: 13px; padding: 4px 0;
}
.agent-feedback-count { font-size: 12px; color: #9aa7b1; }
.agent-feedback-list { display: flex; flex-direction: column; gap: 8px; }
.agent-feedback-item {
  border: 1px solid #e8ecee; border-radius: 8px; padding: 10px;
  background: #fafcfc; font-size: 13px;
}
.agent-feedback-item .fb-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.agent-feedback-type {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #eef3f8; color: #4a6a8a;
}
.agent-feedback-type.suggestion { background: #e8f3f1; color: #2f7a6c; }
.agent-feedback-type.complaint { background: #fdecea; color: #c0392b; }
.agent-feedback-type.bug { background: #fff3e6; color: #c8781a; }
.agent-feedback-item .fb-content { color: #2c3e50; line-height: 1.5; word-break: break-word; }
.agent-feedback-item .fb-meta {
  font-size: 11px; color: #9aa7b1; margin-top: 6px;
  display: flex; justify-content: space-between;
}
.agent-feedback-del {
  border: none; background: transparent; color: #c0392b; cursor: pointer; font-size: 12px;
}
.agent-feedback-empty { text-align: center; color: #9aa7b1; padding: 30px 0; font-size: 13px; }

/* ============================================================
 * P1 追加样式（只追加，不修改上方已有规则）
 * ============================================================ */

/* ---- 情绪安抚小图标（P1 功能4） ---- */
.agent-emo-care {
  align-self: flex-end; margin: 0 4px 6px 0; font-size: 13px;
  animation: agent-emo-pulse 2s ease-in-out infinite;
}
@keyframes agent-emo-pulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

/* ---- OCR 识别结果块（P1 功能2） ---- */
.agent-ocr-block {
  grid-column: 1 / -1;
  background: #f4faf8; border: 1px dashed #9cc9bf; border-radius: 6px;
  padding: 6px 8px; font-size: 12px;
}
.agent-ocr-hint { display: block; color: #2f7a6c; margin-bottom: 4px; font-size: 11px; }
.agent-ocr-hint.err { color: #c8781a; }
.agent-ocr-block textarea.agent-ocr-edit {
  width: 100%; box-sizing: border-box; border: 1px solid #d4e4e0; border-radius: 4px;
  padding: 4px 6px; font-size: 12px; resize: vertical; background: #fff; color: #2c3e50;
}
.agent-attach-item { display: flex; align-items: center; gap: 6px; }
.agent-attach-mask {
  border: 1px solid #9cc9bf; background: #e8f3f1; color: #2f7a6c;
  border-radius: 4px; cursor: pointer; font-size: 11px; padding: 2px 6px;
}
.agent-attach-mask:hover { background: #d8ebe6; }

/* ---- 打码编辑器（P1 功能5） ---- */
.agent-mask-overlay {
  position: fixed; inset: 0; background: rgba(20,35,32,.55); z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.agent-mask-box {
  background: #fff; border-radius: 10px; padding: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.3); max-width: 92vw;
}
.agent-mask-title { font-size: 13px; color: #2c3e50; margin-bottom: 8px; }
.agent-mask-canvas {
  border: 1px solid #dfe8e6; border-radius: 6px; cursor: crosshair;
  max-width: 100%; display: block;
}
.agent-mask-btns { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.agent-mask-tip { font-size: 11px; color: #9aa7b1; flex: 1; }
.agent-mask-btn {
  border: 1px solid #d0dedc; background: #fff; color: #357b70;
  border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.agent-mask-btn.primary { background: #357b70; color: #fff; border-color: #357b70; }
.agent-mask-btn.ghost { color: #8a9ba8; }
.agent-mask-btn:hover { filter: brightness(.96); }

/* ---- 主动提示气泡（P1 功能3） ---- */
.agent-proactive {
  position: fixed; right: 20px; bottom: 92px; width: 260px; z-index: 9000;
  background: #fff; border: 1px solid #dfe8e6; border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,.16);
  font-size: 12px; color: #2c3e50; animation: ap-in .25s ease-out;
}
.agent-proactive.fade { opacity: 0; transition: opacity 1.5s; }
@keyframes ap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.agent-proactive .ap-text { line-height: 1.5; margin-bottom: 8px; }
.agent-proactive .ap-btns { display: flex; gap: 6px; justify-content: flex-end; }
.agent-proactive .ap-ok {
  background: #357b70; color: #fff; border: none; border-radius: 4px;
  padding: 3px 10px; font-size: 11px; cursor: pointer;
}
.agent-proactive .ap-no {
  background: transparent; border: none; color: #8a9ba8; font-size: 11px; cursor: pointer;
}

/* ---- 反馈看板（P1 功能1，易舟云紧凑风格） ---- */
.agfb-page { padding: 12px 16px 32px; font-size: 12px; color: #2c3e50; }
.agfb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.agfb-title { font-size: 16px; margin: 0; font-weight: 600; }
.agfb-mock-badge {
  font-size: 11px; color: #8a6d3b; background: #fff6e0;
  border: 1px solid #ecd9a0; border-radius: 10px; padding: 2px 8px;
}
.agfb-tabs { display: flex; gap: 4px; margin-left: auto; }
.agfb-tab {
  border: 1px solid #d0dedc; background: #fff; color: #357b70;
  border-radius: 4px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.agfb-tab.active { background: #357b70; color: #fff; border-color: #357b70; }
.agfb-tab-count { font-size: 11px; opacity: .8; }

.agfb-filter {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f6f9f9; border: 1px solid #e3ecec; border-radius: 6px;
  padding: 8px 10px; margin-bottom: 12px;
}
.agfb-filter label { font-size: 12px; color: #4a5a68; display: flex; align-items: center; gap: 4px; }
.agfb-filter select, .agfb-filter input {
  border: 1px solid #d0dedc; border-radius: 4px; padding: 3px 6px; font-size: 12px; background: #fff;
}
.agfb-btn {
  border: 1px solid #d0dedc; background: #fff; color: #357b70;
  border-radius: 4px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.agfb-btn.primary { background: #357b70; color: #fff; border-color: #357b70; }
.agfb-btn.sm { padding: 2px 8px; font-size: 11px; }

.agfb-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.agfb-card {
  background: #fff; border: 1px solid #e3ecec; border-radius: 8px;
  padding: 10px 12px; text-align: center;
}
.agfb-card-num { font-size: 22px; font-weight: 700; color: #357b70; }
.agfb-card-label { font-size: 11px; color: #7a8a98; margin-top: 2px; }
.agfb-card.question .agfb-card-num { color: #5b8def; }
.agfb-card.suggestion .agfb-card-num { color: #357b70; }
.agfb-card.complaint .agfb-card-num { color: #d96b5f; }
.agfb-card.bug .agfb-card-num { color: #c8781a; }

.agfb-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.agfb-chart-box { background: #fff; border: 1px solid #e3ecec; border-radius: 8px; padding: 10px; }
.agfb-chart-title { font-size: 12px; color: #4a5a68; margin-bottom: 6px; font-weight: 600; }
.agfb-chart { height: 220px; }
.agfb-cssrow { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 11px; }
.agfb-cssrow .lbl { width: 60px; color: #6a7a88; }
.agfb-cssrow .bar { height: 10px; background: #357b70; border-radius: 2px; min-width: 2px; }
.agfb-cssrow .num { color: #2c3e50; }

.agfb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agfb-panel { background: #fff; border: 1px solid #e3ecec; border-radius: 8px; padding: 10px; }
.agfb-panel-title { font-size: 12px; font-weight: 600; color: #4a5a68; margin-bottom: 8px; }
.agfb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.agfb-table th, .agfb-table td {
  border-bottom: 1px solid #eef3f3; padding: 5px 6px; text-align: left;
}
.agfb-table th { color: #7a8a98; font-weight: 500; background: #f8fbfa; }
.agfb-table .nowrap { white-space: nowrap; }
.agfb-table .agfb-content { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agfb-type { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #eef3f8; color: #4a6a8a; }
.agfb-type.t-suggestion { background: #e8f3f1; color: #2f7a6c; }
.agfb-type.t-complaint { background: #fdecea; color: #c0392b; }
.agfb-type.t-bug { background: #fff3e6; color: #c8781a; }
.agfb-st { font-size: 11px; color: #6a7a88; }
.agfb-st.s-resolved { color: #2f7a6c; }
.agfb-st.s-pending { color: #c8781a; }
.agfb-st.s-dismissed { color: #9aa7b1; }
.agfb-empty { color: #9aa7b1; text-align: center; padding: 18px 0; font-size: 12px; }

.agfb-pend-list { display: flex; flex-direction: column; gap: 8px; }
.agfb-pend-item {
  border: 1px solid #e3ecec; border-radius: 8px; padding: 10px; background: #fafcfc;
}
.agfb-pend-q { font-weight: 600; color: #2c3e50; margin-bottom: 4px; }
.agfb-pend-a { color: #4a5a68; line-height: 1.5; font-size: 12px; }
.agfb-pend-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11px; color: #8a9ba8; }
.agfb-pend-actions { margin-left: auto; display: flex; gap: 6px; }

.agfb-modal-mask {
  position: fixed; inset: 0; background: rgba(20,35,32,.45); z-index: 9500;
  display: flex; align-items: center; justify-content: center;
}
.agfb-modal {
  background: #fff; border-radius: 10px; padding: 16px; width: 460px; max-width: 92vw;
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
}
.agfb-modal h3 { margin: 0 0 12px; font-size: 14px; }
.agfb-field { margin-bottom: 8px; }
.agfb-field label { display: block; font-size: 11px; color: #7a8a98; margin-bottom: 3px; }
.agfb-field input, .agfb-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #d0dedc; border-radius: 4px;
  padding: 5px 8px; font-size: 12px; font-family: inherit;
}
.agfb-err { color: #c0392b; font-size: 12px; min-height: 16px; margin: 4px 0; }
.agfb-modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.hidden { display: none !important; }

/* ===== P2：agent action 跳转卡片 / 已识图标记 / 系统配置表（仅追加） ===== */
.agent-action-list { margin-top: 4px; }
.agent-action-card {
  background:#e8f3f1; border:1px solid #c5ddd8; border-radius:6px;
  padding:10px 14px; margin-top:8px; cursor:pointer; transition:background .15s;
}
.agent-action-card:hover { background:#d4ebe6; }
.agent-action-card .act-title { color:#357b70; font-weight:600; font-size:13px; }
.agent-action-card .act-desc { color:#5a7a72; font-size:11px; margin-top:2px; }
.agent-img-mark {
  display:inline-block; margin-top:6px; font-size:11px; color:#357b70;
  background:#e8f3f1; border:1px solid #c5ddd8; border-radius:4px; padding:1px 6px;
}
.agfb-cfg-table code {
  background:#f0f4f3; padding:1px 5px; border-radius:3px; font-size:11px; color:#357b70;
}
.agfb-cfg-value {
  width:100%; box-sizing:border-box; font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:12px; border:1px solid #d4e4e0; border-radius:4px; padding:6px 8px;
}
.agfb-cfg-value:focus { outline:none; border-color:#4FAEAE; }

/* ============================================================
 * P3 前端样式追加（不修改现有规则）
 * 用户健康看板 / 反馈工单 / 推送管理 / 悬浮球红点 / 自动带教
 * ============================================================ */

/* Tab 按钮（与现有 .agfb-tab 风格一致，激活态 #4FAEAE） */
.p3-tab-btn,
.agfb-tab { transition: background .15s, color .15s; }
.agfb-tab.active { background: #4FAEAE; color: #fff; border-color: #4FAEAE; }

/* --- 用户健康看板 --- */
.p3-health-cards { display: flex; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.p3-hc-card { flex: 1; min-width: 140px; border-radius: 8px; padding: 14px 16px; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.p3-hc-card.healthy { background: #52c41a; }
.p3-hc-card.attention { background: #faad14; }
.p3-hc-card.churn { background: #ff4d4f; }
.p3-hc-num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.p3-hc-label { font-size: 12px; opacity: .92; margin-top: 2px; }

.p3-health-score { position: relative; width: 120px; height: 14px; background: #f0f0f0; border-radius: 7px; overflow: hidden; }
.p3-hs-bar { height: 100%; border-radius: 7px; transition: width .3s; }
.p3-hs-num { position: absolute; right: 6px; top: 0; line-height: 14px; font-size: 10px; color: #333; font-weight: 600; }

.p3-risk-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; color: #fff; }
.p3-risk-healthy { background: #52c41a; }
.p3-risk-attention { background: #faad14; }
.p3-risk-churn { background: #ff4d4f; }

.p3-health-detail td { background: #fafafa; padding: 10px 12px !important; }
.p3-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.p3-detail-item { background: #fff; border: 1px solid #e8e8e8; border-radius: 6px; padding: 8px 10px; }
.p3-detail-item label { display: block; font-size: 11px; color: #888; margin-bottom: 2px; }
.p3-detail-item span { font-size: 12px; color: #333; }

/* --- 反馈工单 --- */
.p3-ticket-stats { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.p3-ts-card { flex: 1; min-width: 110px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 12px 14px; text-align: center; }
.p3-ts-num { font-size: 24px; font-weight: 700; color: #333; }
.p3-ts-label { font-size: 11px; color: #888; margin-top: 2px; }
.p3-ts-card.pending { border-top: 3px solid #faad14; }
.p3-ts-card.processing { border-top: 3px solid #4FAEAE; }
.p3-ts-card.resolved { border-top: 3px solid #52c41a; }
.p3-ts-card.rejected { border-top: 3px solid #bfbfbf; }

.p3-ticket-cat { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; color: #fff; }
.cat-bug { background: #ff4d4f; }
.cat-suggestion { background: #1890ff; }
.cat-question { background: #8c8c8c; }
.cat-complaint { background: #fa8c16; }

.p3-pri { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.pri-high { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.pri-medium { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.pri-low { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }

.p3-ticket-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; color: #fff; }
.st-pending { background: #faad14; }
.st-processing { background: #4FAEAE; }
.st-resolved { background: #52c41a; }
.st-rejected { background: #bfbfbf; }

/* 工单侧边抽屉 */
.p3-ticket-drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10000; }
.p3-ticket-drawer {
  position: absolute; top: 0; right: 0; width: 440px; max-width: 92vw; height: 100%;
  background: #fff; box-shadow: -4px 0 16px rgba(0,0,0,.12); display: flex; flex-direction: column;
}
.p3-td-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e8e8e8; }
.p3-td-head h3 { margin: 0; font-size: 15px; color: #333; }
.p3-td-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; padding: 0 6px; }
.p3-td-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.p3-td-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.p3-td-info > div { background: #fafafa; padding: 8px 10px; border-radius: 6px; }
.p3-td-info label { display: block; font-size: 11px; color: #888; }
.p3-td-info span { font-size: 13px; color: #333; }
.p3-td-section { margin-bottom: 16px; }
.p3-td-section h4 { margin: 0 0 8px; font-size: 13px; color: #4FAEAE; border-left: 3px solid #4FAEAE; padding-left: 8px; }
.p3-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.p3-row input { flex: 1; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.p3-td-section textarea { width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; }

/* 操作日志时间线 */
.p3-ticket-log-timeline { border-left: 2px solid #e8e8e8; padding-left: 14px; margin-left: 6px; }
.p3-log-item { position: relative; padding-bottom: 12px; }
.p3-log-item::before { content: ''; position: absolute; left: -19px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #4FAEAE; }
.p3-log-action { font-size: 13px; font-weight: 600; color: #333; }
.p3-log-meta { font-size: 11px; color: #999; margin-top: 2px; }
.p3-log-comment { font-size: 12px; color: #555; background: #f5f5f5; padding: 6px 8px; border-radius: 4px; margin-top: 4px; }

/* --- 推送管理 --- */
.p3-notif-type { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; color: #fff; }
.type-update { background: #4FAEAE; }
.type-new_feature { background: #722ed1; }
.type-recall { background: #fa8c16; }

.p3-read-rate { position: relative; width: 100px; height: 12px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.p3-rr-bar { height: 100%; background: #4FAEAE; border-radius: 6px; }
.p3-rr-num { position: absolute; right: 4px; top: 0; line-height: 12px; font-size: 9px; color: #333; }

/* --- 悬浮球红点（在现有 .agent-badge 基础上增强） --- */
.p3-notification-badge { /* 兼容名，实际用 .agent-ball.has-unread .agent-badge */ }

/* 对话抽屉内推送列表 */
.p3-panel-notifs { margin: 0 8px 8px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.p3-pn-title { font-size: 12px; color: #4FAEAE; font-weight: 600; padding: 6px 0; }
.p3-notification-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px; background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 6px; margin-bottom: 6px; }
.p3-ni-icon { font-size: 18px; flex-shrink: 0; }
.p3-ni-body { flex: 1; min-width: 0; }
.p3-ni-title { font-size: 13px; font-weight: 600; color: #333; }
.p3-ni-content { font-size: 12px; color: #666; margin-top: 2px; }
.p3-ni-act { margin-top: 4px; padding: 3px 10px; background: #4FAEAE; color: #fff; border: none; border-radius: 4px; font-size: 11px; cursor: pointer; }
.p3-ni-read { background: none; border: 1px solid #d9d9d9; border-radius: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer; color: #666; flex-shrink: 0; }

/* 召回/新功能气泡 */
.p3-recall-bubble, .p3-nf-bubble {
  position: fixed; bottom: 90px; right: 24px; width: 280px;
  background: #fff; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.15);
  padding: 12px 14px; z-index: 9998; border-left: 4px solid #4FAEAE;
}
.p3-rb-icon, .p3-nf-icon { font-size: 22px; margin-bottom: 4px; }
.p3-rb-text, .p3-nf-text { font-size: 13px; color: #333; line-height: 1.5; }
.p3-rb-text span, .p3-nf-text span { font-size: 12px; color: #666; }
.p3-rb-btns, .p3-nf-btns { margin-top: 8px; text-align: right; }
.p3-rb-ok, .p3-nf-ok, .p3-nf-no {
  padding: 4px 12px; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; margin-left: 6px;
}
.p3-rb-ok, .p3-nf-ok { background: #4FAEAE; color: #fff; }
.p3-nf-no { background: #f5f5f5; color: #666; }

/* --- 自动带教 --- */
.p3-onboarding-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 10001;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px;
}
.p3-onboarding-highlight {
  outline: 3px solid #4FAEAE !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5), 0 0 24px rgba(79,174,174,.6) !important;
  position: relative; z-index: 10002;
  border-radius: 4px;
}
.p3-onboarding-card {
  background: #fff; border-radius: 10px; padding: 18px 22px;
  width: 420px; max-width: 92vw; box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.p3-ob-stepno { font-size: 11px; color: #4FAEAE; font-weight: 600; }
.p3-ob-title { font-size: 16px; font-weight: 700; color: #333; margin: 6px 0; }
.p3-ob-desc { font-size: 13px; color: #666; line-height: 1.6; }
.p3-ob-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.p3-ob-btn { padding: 6px 16px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; font-size: 13px; cursor: pointer; }
.p3-ob-btn.primary { background: #4FAEAE; color: #fff; border-color: #4FAEAE; }
.p3-ob-btn:disabled { opacity: .5; cursor: not-allowed; }
.p3-ob-ask { text-align: center; }
.p3-ob-ask .p3-ob-btns { justify-content: center; }

/* --- 我的反馈工单进度 --- */
.p3-fb-ticket { margin-top: 6px; font-size: 11px; }
.p3-fbt-loading { color: #999; }
.p3-fbt-none { color: #bbb; }
.p3-fbt-link { color: #4FAEAE; cursor: pointer; text-decoration: underline; }

/* --- 手机端响应式 --- */
@media (max-width: 768px) {
  .p3-health-cards { gap: 8px; }
  .p3-hc-card { min-width: 100px; padding: 10px; }
  .p3-hc-num { font-size: 20px; }
  .p3-ticket-stats { gap: 6px; }
  .p3-ts-card { min-width: 70px; padding: 8px; }
  .p3-ts-num { font-size: 18px; }
  .p3-ticket-drawer { width: 100%; max-width: 100%; }
  .p3-td-info { grid-template-columns: 1fr; }
  .p3-onboarding-card { width: 94vw; padding: 14px; }
  .p3-recall-bubble, .p3-nf-bubble { width: 240px; right: 12px; bottom: 80px; }
  .p3-health-score { width: 80px; }
  .agfb-filter { flex-wrap: wrap; gap: 6px; }
  .agfb-filter label { font-size: 12px; }
  .agfb-filter select, .agfb-filter input { font-size: 12px; padding: 4px 6px; }
}


/* ============================================================
 * M 手机端适配（2026-10-23 追加，勿改上方已有规则）
 * 覆盖：底部 Tab 导航 / 全局表格横滚 / 卡片单列 / Agent 全屏面板 /
 *      项目卡片化 / 登录页 / 待办页 / 我的页
 * ============================================================ */

/* ---------- 底部 Tab 导航（桌面默认隐藏，手机显示） ---------- */
.mobile-tabbar { display: none; }

@media (max-width: 480px) {
  .mobile-tabbar {
    display: flex !important;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 56px; background: #fff;
    border-top: 1px solid var(--border, #e0e6e8);
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  }
  .mobile-tabbar.hidden-mobile { display: none !important; }
  .mobile-tabbar a.m-tab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    font-size: 10px; color: var(--muted, #6b7c8d);
    text-decoration: none; min-height: 44px;
  }
  .mobile-tabbar a.m-tab.active { color: var(--primary, #357b70); font-weight: 600; }
  .mobile-tabbar .tab-icon { font-size: 20px; line-height: 1; }
  .mobile-tabbar .tab-label { font-size: 10px; }

  /* 主体内容区让出底部导航高度 */
  .app-main, #app { padding-bottom: 64px; }

  /* 顶栏导航在手机端隐藏（汉堡菜单已替代） */
  #topNav { display: none !important; }
  .brand-name { display: none !important; }

  /* 全局表格横滚 */
  .table-wrap, .card > .table-wrap, .data-table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  table.data-table, .data-table { min-width: 480px; }
  .card, .overlay-card { overflow-x: auto; }

  /* 卡片网格单列 */
  .grid, .card-grid, .emp-grid, .mh-projects {
    grid-template-columns: 1fr !important;
  }

  /* 表单纵向 */
  .form-row, .field-row { flex-direction: column !important; align-items: stretch !important; }
  .form-row > *, .field-row > { width: 100%; }
  input, select, textarea { max-width: 100%; }

  /* 按钮组纵向 */
  .btn-group, .actions, .toolbar { flex-direction: column; align-items: stretch; }
  .btn-group .btn, .actions .btn, .toolbar .btn { width: 100%; }

  /* 统计卡片 2 列 */
  .stat-grid, .stats { grid-template-columns: 1fr 1fr !important; gap: 8px; }

  /* 页头纵向 */
  .page-head { flex-direction: column; align-items: stretch !important; gap: 8px; }
  .page-head .spacer { display: none; }

  /* ===== Agent 悬浮球手机适配 ===== */
  #agent-ball, .agent-ball {
    width: 40px !important; height: 40px !important;
    bottom: 70px !important; right: 12px !important;
    left: auto !important; top: auto !important;
  }
  #agent-ball img, .agent-ball img { width: 34px !important; height: 34px !important; }

  /* Agent 对话面板手机端全屏 */
  .agent-panel {
    position: fixed !important; inset: 0 !important;
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; max-height: 100% !important;
    border-radius: 0 !important; border-left: none !important;
    transform: translateX(100%) !important;
    z-index: 1000 !important;
  }
  .agent-panel.open { transform: translateX(0) !important; }
  .agent-panel-input { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0)); }

  /* 手机端面板返回按钮（仅手机显示） */
  .agent-panel-back { display: inline-flex !important; }

  /* ===== 项目列表表格 → 卡片 ===== */
  .project-list table, .plist-table { display: block; }
  .project-list thead, .plist-table thead { display: none; }
  .project-list tbody tr, .plist-table tbody tr {
    display: block; margin-bottom: 12px; padding: 12px;
    border: 1px solid var(--border, #e0e6e8); border-radius: 8px;
    background: #fff;
  }
  .project-list tbody td, .plist-table tbody td {
    display: block; border: none; padding: 4px 0;
  }

  /* ===== 登录页 ===== */
  .login-container, .login-box, .auth-card {
    width: 100% !important; max-width: 100% !important;
    padding: 20px !important; margin: 0 !important;
  }
  .login-container .btn, .login-box .btn, .auth-card .btn {
    width: 100%; min-height: 48px;
  }

  /* ===== 待办页 ===== */
  .todo-card { padding: 14px !important; margin-bottom: 10px !important; }
  .todo-actions { flex-direction: column; }
  .todo-actions .btn { width: 100%; }

  /* ===== 我的页 ===== */
  .my-card { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; }
  .my-avatar {
    width: 48px; height: 48px; border-radius: 50%; background: #357b70; color: #fff;
    display: grid; place-items: center; font-size: 22px; font-weight: 600; flex-shrink: 0;
  }
  .my-name { font-size: 17px; font-weight: 600; }
  .my-role { font-size: 12px; margin-top: 2px; }
  .my-menu { background: #fff; border: 1px solid var(--border, #e0e6e8); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
  .my-menu-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0; text-decoration: none; color: inherit;
  }
  .my-menu-item:last-child { border-bottom: none; }
  .mm-icon { font-size: 18px; width: 24px; text-align: center; }
  .mm-arrow { margin-left: auto; color: #bbb; font-size: 18px; }
  .my-sec-title { font-size: 14px; margin: 16px 0 8px; color: var(--muted, #6b7c8d); }
  .my-notif-list { background: #fff; border: 1px solid var(--border, #e0e6e8); border-radius: 8px; }
  .my-notif-item { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
  .my-notif-item:last-child { border-bottom: none; }
  .my-notif-item.unread .mn-title { font-weight: 600; color: var(--primary, #357b70); }
  .mn-title { font-size: 14px; }
  .mn-sub { font-size: 11px; margin-top: 2px; }

  /* ===== 手机首页仪表盘 ===== */
  .mh-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
  .mh-stat { background: #fff; border: 1px solid var(--border, #e0e6e8); border-radius: 8px; padding: 12px; text-align: center; }
  .mh-num { font-size: 22px; font-weight: 700; color: var(--primary, #357b70); }
  .mh-label { font-size: 11px; color: var(--muted, #6b7c8d); margin-top: 2px; }
  .mh-proj-card {
    display: block; background: #fff; border: 1px solid var(--border, #e0e6e8);
    border-radius: 8px; padding: 12px; margin-bottom: 8px; text-decoration: none; color: inherit;
  }
  .mp-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
  .mp-bar { height: 4px; background: #eef3f8; border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
  .mp-bar-fill { height: 100%; background: var(--primary, #357b70); }
  .mp-foot { font-size: 11px; }
  .mh-todo-row {
    display: block; background: #fff; border: 1px solid var(--border, #e0e6e8);
    border-radius: 8px; padding: 12px; margin-bottom: 8px; text-decoration: none; color: inherit;
  }
  .mt-title { font-size: 14px; font-weight: 500; }
  .mt-sub { font-size: 11px; margin-top: 2px; }
}

/* 桌面端：返回按钮不显示 */
.agent-panel-back { display: none; }


/* M 手机端：拍照/相册按钮仅手机显示 */
.mobile-only-btn { display: none !important; }
@media (max-width: 480px) {
  .mobile-only-btn { display: inline-flex !important; }
  .agent-panel-back { display: inline-flex !important; align-items:center; }
  .agent-panel-close { display: none !important; }
}


/* M 手机端修复：登录按钮高度达标（>=44px 拇指点按区） */
@media (max-width: 480px) {
  #loginForm .btn-primary { min-height: 44px; padding: 12px 16px; font-size: 15px; }
}

/* ============================================================
   M2 二期：深色模式 / 审批面板 / 语音输入 / 推送横幅 /
            分段选择器 / 项目FAB / 手机操作栏 / 开关
   ============================================================ */

/* ---------- 深色模式：变量覆盖（浅青绿主色保持，适当调亮） ---------- */
[data-theme="dark"] {
  --bg: #1a1f1e;
  --panel: #242b2a;
  --panel-2: #2d3635;
  --border: #33403e;
  --border-strong: #445653;
  --text: #e0e8e6;
  --muted: #8ba39e;
  --primary: #4FAEAE;
  --primary-weak: #23433f;
  --primary-hover: #63c2c2;
  --ok: #4ec9a0;
  --ok-bg: #1d3a30;
  --warn: #d9a441;
  --warn-bg: #3a3220;
  --danger: #e07a6b;
  --danger-bg: #442823;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}
/* 深色模式下第一期硬编码 #fff 背景的手机组件统一接管 */
[data-theme="dark"] .mobile-tabbar,
[data-theme="dark"] .my-menu,
[data-theme="dark"] .my-card,
[data-theme="dark"] .my-notif-list,
[data-theme="dark"] .mh-stat,
[data-theme="dark"] .mh-proj-card,
[data-theme="dark"] .mh-todo-row,
[data-theme="dark"] .todo-card {
  background: var(--panel);
}
[data-theme="dark"] .my-menu-item,
[data-theme="dark"] .my-notif-item { border-bottom-color: var(--border); }
[data-theme="dark"] .agent-panel,
[data-theme="dark"] .overlay-card { background: var(--panel); color: var(--text); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: var(--panel-2); color: var(--text); border-color: var(--border-strong);
}
[data-theme="dark"] .employee-card,
[data-theme="dark"] .emp-card {
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text);
}

/* ---------- 审批面板（todo.js M2） ---------- */
.ap-section { margin: 10px 0; }
.ap-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.ap-summary {
  background: var(--panel-2); border-radius: 6px; padding: 8px 10px;
  font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  max-height: 180px; overflow: auto;
}
.ap-issues { margin: 4px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.todo-form-actions .todo-approve {
  flex: 1; min-height: 44px; background: var(--ok); color: #fff;
  border: none; justify-content: center; font-weight: 600;
}
.todo-form-actions .todo-approve:hover { background: #27a07c; }
.todo-form-actions .todo-reject {
  flex: 1; min-height: 44px; background: var(--danger); color: #fff;
  border: none; justify-content: center; font-weight: 600;
}
.todo-form-actions .todo-reject:hover { background: #a83e30; }
.todo-history { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.todo-history-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ah-row { font-size: 12px; padding: 4px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ah-actor { font-weight: 600; }
.ah-action { font-weight: 600; }
.ah-time { font-size: 11px; }
.ah-comment { flex-basis: 100%; color: var(--muted); padding-left: 0; margin-top: 2px; }

/* ---------- 语音输入麦克风按钮 ---------- */
.agent-mic-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--panel); font-size: 20px; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.agent-mic-btn.recording {
  background: var(--danger); color: #fff; border-color: var(--danger);
  animation: micPulse 1.2s infinite;
}
.agent-mic-btn.mic-disabled { opacity: .4; cursor: not-allowed; }
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 80, 64, .5); }
  70% { box-shadow: 0 0 0 10px rgba(192, 80, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 80, 64, 0); }
}

/* ---------- Web Push 授权横幅（非阻塞，底部） ---------- */
.push-banner {
  position: fixed; left: 12px; right: 12px; bottom: 70px; z-index: 950;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  animation: pbIn .25s ease;
}
.push-banner.pb-done { opacity: .6; }
@keyframes pbIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pb-text { flex: 1; font-size: 13px; }
.pb-actions { display: flex; gap: 8px; }
.pb-actions .btn { min-height: 40px; padding: 8px 14px; }

/* ---------- 分段选择器 segmented control ---------- */
.seg-group { display: flex; background: var(--panel-2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg-group button {
  flex: 1; border: none; background: transparent; padding: 9px 6px;
  border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--muted);
  min-height: 40px; font-family: inherit;
}
.seg-group button.active {
  background: var(--panel); color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ---------- 项目列表右下角浮动 + 按钮 ---------- */
.fab-fab {
  display: none; position: fixed; right: 16px; bottom: 120px; z-index: 890;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 26px; line-height: 1;
  box-shadow: 0 4px 14px rgba(53,123,112,.4); cursor: pointer; align-items: center; justify-content: center;
}
@media (max-width: 480px) {
  .fab-fab { display: inline-flex; }
  /* P2 修复：项目详情等多 Tab 条横向滚动，不撑破 375px 视口 */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; white-space: nowrap; }
}

/* ---------- 项目详情手机端底部操作栏 ---------- */
.m-action-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 56px; z-index: 880;
  background: var(--panel); border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0));
  gap: 8px;
}
.m-action-bar button {
  flex: 1; min-height: 44px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.m-action-bar .mab-cam {
  flex: 1.4; background: var(--primary); color: #fff; border: none; font-weight: 600;
}
@media (max-width: 480px) {
  .m-action-bar { display: flex; }
  /* 仅项目详情页让出操作栏高度 */
  body.has-mab .app-main, body.has-mab #app { padding-bottom: 120px; }
}

/* ---------- 推送开关 toggle ---------- */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 28px; cursor: pointer;
  background: var(--border-strong); transition: .2s;
}
.toggle-slider::before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--ok); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-slider { opacity: .5; cursor: not-allowed; }

/* ===== 8-5 工作台面板 ===== */
.qa-wb-panel{position:fixed;inset:0;background:rgba(20,30,40,.45);z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center}
.qa-wb-panel>*{background:#fff;border-radius:14px;width:min(640px,92vw);max-height:82vh;overflow:auto;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.qa-wb-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid #e6eaef;border-radius:14px 14px 0 0;font-size:16px}
.qa-wb-x{cursor:pointer;color:#888;font-size:16px}
.qa-wb-tabs{display:flex;gap:6px;padding:10px 18px 0;background:#fff}
.qa-wb-tab{border:1px solid #dfe5ea;background:#fff;border-radius:8px;padding:6px 14px;font-size:13px;cursor:pointer;color:#555}
.qa-wb-tab.on{background:#357b70;border-color:#357b70;color:#fff}
.qa-wb-body{padding:14px 18px 18px;background:#fff;min-height:200px}
.qa-wb-loading,.qa-wb-empty{color:#999;text-align:center;padding:40px 0}
.qa-wb-item{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e6eaef;border-radius:10px;margin-bottom:8px;cursor:pointer;flex-wrap:wrap}
.qa-wb-item:hover{border-color:#357b70}
.qa-wb-item-ic{font-size:18px}
.qa-wb-item-name{font-weight:600;flex:0 0 auto}
.qa-wb-item-tag{font-size:11px;padding:2px 8px;border-radius:10px;background:#eef1f4;color:#666}
.qa-wb-item-tag.approved{background:#e2f5e2;color:#2a7a2a}
.qa-wb-item-tag.rejected{background:#fde8e8;color:#b02a2a}
.qa-wb-item-tag.pending{background:#fff3cd;color:#8a6d00}
.qa-wb-item-desc{color:#999;font-size:12px;flex-basis:100%;padding-left:28px}
.qa-wb-form label{display:block;margin-bottom:10px;font-size:13px;color:#444}
.qa-wb-form input,.qa-wb-form select{width:100%;margin-top:4px;padding:8px 10px;border:1px solid #d7dee3;border-radius:8px;font-size:13px;box-sizing:border-box}
.qa-wb-submit{background:#357b70;color:#fff;border:none;border-radius:8px;padding:9px 18px;font-size:14px;cursor:pointer}
.qa-wb-hint{color:#999;font-size:12px;margin-top:8px}
.qa-wb-withdraw{border:1px solid #d9534f;color:#d9534f;background:#fff;border-radius:6px;padding:3px 10px;font-size:12px;cursor:pointer;margin-left:auto}
