/* ============ 工作台全局样式 ============ */
:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --sidebar-bg: #0F6E56;                    /* 侧边栏：品牌墨绿（原为深蓝灰 #1E293B） */
  --sidebar-text: rgba(255, 255, 255, 0.78);
  --green: #22C55E;
  --green-bg: #F0FDF4;
  --red: #EF4444;
  --red-bg: #FEF2F2;
  --blue: #3B82F6;
  --blue-bg: #EFF6FF;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;
  --gray: #94A3B8;
  --gray-bg: #F1F5F9;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.10);
}

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

/* 带 hidden 标记的元素一律不显示。
   为什么必须显式写（2026-09-15 修）：浏览器默认的 [hidden]{display:none} 优先级低于本站任何一条
   作者样式，所以像 .btn{display:inline-block} 这类规则会把 hidden 顶掉 —— 元素明明被 JS 置为
   hidden，页面上却还在（典型：AI 记忆面板「显示更早的 N 条」按钮点完后不消失、文案卡在旧值）。
   !important 用于压过内联 style.display；已全站核对，不存在「带 hidden 又想显示」的用法。 */
[hidden] { display: none !important; }

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

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

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 192px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px 10px;
}
.brand-logo {
  width: 34px; height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.brand-logo.big { width: 48px; height: 48px; font-size: 24px; border-radius: 13px; }
.brand-name { color: #fff; font-weight: 600; font-size: 16px; }

/* 侧栏里的品牌块：绿底上改白底绿字（登录页的 .brand-logo 不受影响） */
.sidebar .brand-logo { background: #fff; color: var(--sidebar-bg); }

.sidebar-nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: block; padding: 7px 14px; border-radius: 9px;
  color: var(--sidebar-text); font-size: 14px;
  transition: background 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.14); color: #fff; opacity: 1; }
/* 当前页：白雾底 + 左侧金色竖条（与管理员金色徽章呼应） */
.nav-item.active {
  background: rgba(255,255,255,0.16); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 #FBBF24;
}

.sidebar-footer { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.16); }
.user-card { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
/* 单行省略号：编号/昵称过长时截断，保住右侧「设置」按钮不被挤走（悬浮可见全文） */
.user-name { color: #fff; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 管理员徽章：金底深棕字 —— 侧栏已是墨绿，徽章换金色最跳、也像「特权标识」 */
.admin-badge {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 10px;
  background: #FBBF24; color: #7C2D12; font-size: 11px; font-weight: 600; vertical-align: 1px;
}
/* 文字块撑满剩余宽度，右侧给「设置」按钮腾位（min-width:0 是 flex 子项能收缩的前提）
   用户卡片这一行 = 编号/昵称 + 配额 ｜ 设置按钮，见 templates/base.html */
.user-meta { flex: 1; min-width: 0; }
/* 侧边栏「设置」入口（2026-09-17 定）：从 AI 助理页底部按钮搬来，皮肤同 .logout-btn 但更紧凑 */
.user-set {
  flex: 0 0 auto; padding: 5px 9px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.24);
  color: var(--sidebar-text); font-size: 12px; line-height: 1.45;
  transition: background 0.15s;
}
.user-set:hover { background: rgba(255,255,255,0.14); color: #fff; opacity: 1; }
/* 当前就在设置页：白雾底 + 金边，与 .nav-item.active 的金色竖条呼应 */
.user-set.on { background: rgba(255,255,255,0.16); color: #fff; border-color: #FBBF24; font-weight: 600; }
/* 「设置」入口的红色数字角标（2026-09-17 定）：有系统公告时显示活跃条数 */
.set-badge {
  display: inline-block; min-width: 16px; height: 16px; padding: 0 4px;
  margin-left: 4px; border-radius: 8px; background: #E5484D; color: #fff;
  font-size: 11px; line-height: 16px; text-align: center; font-weight: 700;
  vertical-align: 1px;
}
/* 退出按钮改小（2026-09-17 兵哥定）：原 9px padding + 13px 字 = 高约 40.8px，占位太重。
   ⚠️ line-height 必须显式写：全局是 1.6，光改 padding/字号只能降到 33.2px（比目标 29 高一截），
   设成 1.3 后 = 6+6 + 12×1.3 + 2(边框) ≈ 29.6px，才是"矮约三成"的效果。
   ⚠️ 「🔓 退出查看」共用这个类，会一起变小 —— 同一区域两个按钮尺寸不一致反而更难看，
   故有意保持统一样式；确认弹窗只加在「退出登录」上。 */
.logout-btn {
  display: block; text-align: center; padding: 6px; line-height: 1.3;
  border: 1px solid rgba(255,255,255,0.24); border-radius: 8px;
  color: var(--sidebar-text); font-size: 12px;
}
.logout-btn:hover { background: rgba(255,255,255,0.08); color: #fff; opacity: 1; }

.sidebar-mask {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 99;
}

.main { flex: 1; margin-left: 192px; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 60px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.menu-btn {
  display: none; background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text);
}
.topbar-title { font-size: 17px; font-weight: 600; flex: 0 1 auto; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; min-width: 0; }
/* 顶栏中区：天气问候居中，右侧留给到期信息 */
.topbar-center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 0; }
/* 顶栏右侧：**到期时间 + 剩余次数**（2026-09-17 兵哥定：剩余次数从 AI 助理页搬来，
   顶栏全站可见）。剩余次数那个 span 的 id 仍是 chatQuota —— 助理页 JS 靠它刷新数字，
   见 templates/base.html 顶部注释。
   配色（2026-09-18 兵哥定）：两者统一**淡灰 var(--gray)**，与左侧问候语同一档 ——
   这三个都是"看一眼就走"的信息，不该比页面主内容更抢眼。
   ⚠️ 原「剩余次数」是 var(--primary-dark) 加粗（深蓝紫），是本行的视觉重心，已改为淡灰 + 500 字重。
   ⚠️ 到期时间前面的 📅 已从模板删除（同一个决定），别再加回来。 */
.topbar-quota { font-size: 13px; color: var(--gray); white-space: nowrap; flex-shrink: 0; margin-left: auto; }
.topbar-quota .tq-dot { margin: 0 5px; opacity: .5; }
.topbar-quota .tq-left { color: var(--gray); font-weight: 500; }
/* 问候语（2026-09-18 兵哥定）：文字转淡灰、**去掉淡蓝胶囊底色**（灰字压淡底会显脏），
   padding 归零避免空壳留白。天气图标（.topbar-weather-icon）保留。 */
.topbar-weather {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; line-height: 1.5; color: var(--gray);
  background: transparent; padding: 3px 0;
  max-width: 100%; white-space: nowrap;
}
.topbar-weather-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }
.topbar-weather-text { overflow: hidden; text-overflow: ellipsis; }
.topbar-weather .tw-mini { display: none; } /* 精简天气默认隐藏，仅移动端显示 */

.content { padding: 24px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ============ 卡片 ============ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-link { font-size: 13px; }
.muted { color: var(--text-muted); font-size: 13px; }

/* ============ AI 助理设置：顶部三项桌面并排（2026-09-19） ============ */
.ai-top-row { display: flex; align-items: stretch; gap: 18px; }
.ai-top-row .card { flex: 1 1 0; min-width: 0; }
@media (max-width: 768px) {
  .ai-top-row { display: block; }
}

/* 「设置AI助理」卡：侧边栏同款墨绿底（2026-09-19 兵哥定）——标题/说明反白，性格小卡垫白底保可读 */
.ai-persona-card { background: var(--sidebar-bg); border-color: var(--sidebar-bg); }
.ai-persona-card .card-header h3 { color: #fff; }
.ai-persona-card .card-header .muted, .ai-persona-card .muted { color: rgba(255,255,255,0.78); }
.ai-persona-card .persona-item { background: #fff; }

/* ============ 对话工具栏待办提醒（问候语已上移顶栏，胶囊保留此处） ============ */
.toolbar-reminders {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 5px 8px; max-width: 100%;
}
.weather-remind-chip {
  display: inline-block; font-size: 11px; line-height: 1.5; white-space: nowrap;
  color: var(--primary); background: #fff;
  border: 1px solid var(--primary); border-radius: 20px;
  padding: 0 9px; text-decoration: none;
}
.weather-remind-chip:hover { background: var(--primary-light); }

/* ============ 网格 ============ */
.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.two-col { grid-template-columns: 1fr 1fr; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }

.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; text-align: center;
}
.stat-icon { font-size: 24px; margin-bottom: 6px; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-muted); font-size: 13px; }

/* ============ 徽章 ============ */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge-type { background: var(--primary-light); color: var(--primary); }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 9px;
  border: 1px solid transparent; font-size: 14px; cursor: pointer;
  transition: all 0.15s; text-align: center; line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-primary:disabled { background: var(--gray); cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); opacity: 1; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); opacity: 1; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ============ 表单 ============ */
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: border 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }

/* 下拉的「灰色示例」占位（2026-09-16）：年龄「≥18岁」这类提示文字——
   未填时以灰色显示（.is-empty 由 JS 切换），展开列表里的真实选项仍是正常色。 */
select.sel-placeholder.is-empty { color: #9aa0a6; }
select.sel-placeholder option { color: var(--text); }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 140px; }
.inline-label { font-size: 13px; color: var(--text-muted); align-self: center; }
.form-actions { text-align: right; margin-top: 4px; }

/* ============ Flash 消息 ============ */
.flash { padding: 12px 16px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }
.flash-success { background: var(--green-bg); color: #15803D; border: 1px solid #BBF7D0; }
.flash-error { background: var(--red-bg); color: #B91C1C; border: 1px solid #FECACA; }
/* 一次性新密码（后台重置密码后显示一次，刷新即消失） */
.pw-once {
  background: #FFF8E1; border: 1px solid #FFE082; border-left: 4px solid #F5A623;
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.pw-once-title { font-weight: 600; color: #8A5A00; margin-bottom: 10px; line-height: 1.5; }
.pw-once-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pw-once code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px; letter-spacing: 1px; color: #7A4C00;
  background: #fff; border: 1px dashed #E0B44A; border-radius: 8px; padding: 6px 12px;
}
@media (max-width: 768px) {
  .pw-once code { font-size: 16px; }
  /* 卡片标题行小屏改上下堆叠：标题长折行后不再与右侧灰字左右交错（2026-09-14 反馈） */
  .card-header { flex-wrap: wrap; row-gap: 2px; }
  .card-header .muted { flex-basis: 100%; font-size: 12.5px; }
}

/* ============ 列表 ============ */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px; border-bottom: 1px solid var(--border); color: var(--text);
}
.list-item:last-child { border-bottom: none; }
.list-title { font-weight: 500; }
.list-desc { color: var(--text-muted); font-size: 13px; }
.empty { text-align: center; color: var(--text-muted); padding: 30px 10px; font-size: 14px; }

/* 复选胶囊（2026-09-14 反馈：iOS 原生 checkbox 间距不可控，与性别胶囊同思路自绘） */
.check-pill { display: inline-block; position: relative; cursor: pointer; margin: 4px 6px 4px 0; max-width: 100%; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span:first-of-type { display: inline-block; padding: 7px 14px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 13px; color: var(--text-muted); user-select: none; transition: all .15s; }
.check-pill input:checked + span:first-of-type { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-pill.danger span:first-of-type { border-color: #c0392b; color: #c0392b; }
.check-pill.danger input:checked + span:first-of-type { background: #c0392b; border-color: #c0392b; color: #fff; }
.check-pill input:focus-visible + span:first-of-type { outline: 2px solid var(--primary); outline-offset: 2px; }

/* AI 性别胶囊点选（2026-09-14 反馈：iOS 原生 radio 与文字错位，改自绘胶囊，选中变实底） */
.gender-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gender-pill { position: relative; cursor: pointer; }
.gender-pill input { position: absolute; opacity: 0; pointer-events: none; }
.gender-pill span { display: inline-block; padding: 7px 18px; border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 14px; color: var(--text); user-select: none; transition: all .15s; }
.gender-pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.gender-pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ============ 订阅状态 ============ */
.sub-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sub-row:last-child { border-bottom: none; }
.sub-label { color: var(--text-muted); font-size: 14px; }
.sub-value { font-weight: 500; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-item {
  padding: 14px; border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); text-align: center; font-size: 14px;
  transition: all 0.15s;
}
.quick-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); opacity: 1; }

/* ============ 项目 ============ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { display: block; color: var(--text); transition: all 0.15s; }
.project-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); opacity: 1; }
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.project-name { font-size: 16px; font-weight: 600; }
.project-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.project-meta { display: flex; gap: 10px; align-items: center; }
.project-actions { display: flex; gap: 8px; align-items: center; }

.idea-form textarea { margin-bottom: 10px; }
.idea-form-row { display: flex; gap: 10px; align-items: center; }
.idea-form-row select { width: auto; min-width: 100px; }

.idea-list { display: flex; flex-direction: column; gap: 12px; }
.idea-item {
  border: 1px solid var(--border); border-radius: 9px; padding: 13px;
  display: flex; flex-direction: column; gap: 8px;
}
.idea-top { display: flex; justify-content: space-between; align-items: center; }
.idea-time { font-size: 12px; }
.idea-content { font-size: 14.5px; white-space: pre-wrap; }
.idea-status { align-self: flex-end; }
.idea-status select { width: auto; min-width: 90px; padding: 5px 8px; font-size: 13px; }

/* ============ 聊天 ============ */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 140px); }
.chat-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.chat-toolbar-left {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 10px; flex: 1 1 auto; min-width: 0;
}
/* 项目下拉的 .chat-project 样式已随功能移除（2026-09）：AI 自动识别项目，不再需要手动指定 */
.chat-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.persona-switch { position: relative; display: inline-flex; }
/* 性格胶囊底色（2026-09-18 兵哥定 P1「品牌墨绿实心」）：原为淡蓝紫 #D9E1FF，
   与全站墨绿/绿色系主调不在一个色系。改为侧边栏同色 #0F6E56 实心 + 白字，
   与"凸起三件套"配合后质感最明确。
   ⚠️ 另有两版未选：P2 淡绿内凹（与对话区凹槽语言统一、更轻）、P3 白瓷细描边（最中性）。
      对比图 _shots/性格胶囊质感_三方案_20260918.png；试算 tests/_shot_rust3_20260918.js。 */
.chat-persona {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-family: inherit; line-height: 1.5;
  color: #FFFFFF;
  background: #0F6E56; border: 1px solid #0B5A46;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
  cursor: pointer;
  /* 立体感三件套：顶部内高光 + 底部实色「厚度」+ 外投影（按下时整体下沉）。
     刻意不使用渐变 —— 符合项目「禁渐变」的约定，用纯色 + 阴影做出凸起。 */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 0 #094A3A, 0 4px 10px rgba(15, 110, 86, .28);
  transition: background .15s, box-shadow .12s, transform .12s;
}
.chat-persona:hover {
  background: #0C6149;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 3px 0 #073D30, 0 6px 14px rgba(15, 110, 86, .34);
  transform: translateY(-1px);
}
.chat-persona:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .30), 0 1px 0 #0B5A46;
}
.persona-caret { font-size: 10px; opacity: .75; }
.persona-cap-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0; overflow: hidden;
  font-size: 12px; line-height: 1; color: #FFFFFF; border-radius: 50%;
}
/* P1 深绿底上给头像一圈浅白描边，避免深底上的头像发闷、边界糊掉
   （无自定义头像时头像本身是 pa-* 亮色圆底，加环后层次更清楚） */
.chat-persona .persona-cap-ava { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .45); }
.persona-cap-ava img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.persona-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 216px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px;
}
.persona-pop-title { font-size: 12px; color: var(--text-muted); padding: 2px 6px 8px; }
.persona-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; font-family: inherit; font-size: 14px; text-align: left;
  background: none; border: none; border-radius: 8px; padding: 7px 10px;
  cursor: pointer; color: var(--text); transition: background .12s;
}
.persona-opt:hover { background: var(--gray-bg); }
.persona-opt.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.persona-opt-ava {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; background: var(--gray-bg); overflow: hidden;
}
.persona-opt-ava img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.persona-opt-name { flex: 1; text-align: left; }
.persona-opt-check { color: var(--primary); font-weight: 700; }
/* 剩余次数已移到顶栏（2026-09-17）：原 .chat-quota 随元素一起下线，样式删除避免死代码 */

.chat-box {
  flex: 1; overflow-y: auto; overflow-x: hidden; background: #D6E7CE;
  border: 1px solid #C3D2BF; border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  /* 内凹（下陷式）立体感 —— 上重 + 四边暗环（2026-09-18 兵哥定，V4 加深档；V4 是落盘版本号，
     与试算序号 V0~V3 不是一套，别混）：
     光源在上方 → 上沿最重、左右次之、下沿最轻；四边都出暗带，才读得出"凹"。
     刻意不使用渐变 —— 符合项目「禁渐变」约定，用纯色 + 内阴影做出凹槽。
     ⚠️ 四条硬约束，改之前务必先读：
       1. 绝不能加外投影 —— 外投影会让它重新"浮起"，凹陷感立刻消失；
       2. 底色比页面背景（#F5F7FA，lum 247）暗约 24 阶，是"下沉"的底子，别随手改回浅色；
       3. 四边都要有暗带，判据「暗于槽底 ≥ 25 阶 且 暗带 ≥ 7 CSS px」，
          且上沿必须保持最重（约 85 阶 / 13px），以保住"光在上方"的方位感；
       4. ⛔ 下沿绝不能再改回白色受光带。底色 #D6E7CE 亮度 223：往"暗"有 223 阶余量，
          往"亮"只剩 21 阶 —— 白线不但弱，还是"凸起"的语言（凸起才有高光）。
          实测下沿只要留白线，暗带立刻掉到 29 阶 / 4px，凹感归零。
          （2026-09-18 兵哥先反馈"下底边没什么变化"→促使加白线；又反馈"左右下都不像"
            →证明白线与凹感互斥，最终撤掉白线。改这处前先跑 tests/_prof_recess4.py 量四边。）
       5. 以上是**桌面端**。手机端另有覆盖（见下方 @media (max-width:768px) 的
          .chat-box-wrap::after 段落）—— 窄屏滚到底时上沿暗带会被消息盖住，
          手机上会读成"凸"。改桌面这几层前先看那段注释，别单边改。 */
  box-shadow:
    inset 0 12px 15px -1px rgba(31, 54, 36, 0.24),  /* 上沿：最重，暗带约 13px */
    inset 0 1px 0 rgba(31, 54, 36, 0.12),           /* 上沿硬边线，切口感 */
    inset 7px 0 10px -1px rgba(31, 54, 36, 0.19),   /* 左壁 */
    inset -7px 0 10px -1px rgba(31, 54, 36, 0.19),  /* 右壁：必须与左壁成对，缺一即不对称 */
    inset 0 -11px 14px -1px rgba(31, 54, 36, 0.19), /* 下沿：暗带（不是白线） */
    inset 0 0 0 1px rgba(31, 54, 36, 0.09);         /* 一圈内描边（槽壁过渡） */
}
.history-expand {
  align-self: center; flex-shrink: 0; cursor: pointer;
  font-family: inherit; font-size: 12.5px; color: rgba(45, 61, 42, 0.62);
  background: #F4F8F2; border: 1px dashed #CFDCD2;
  border-radius: 20px; padding: 5px 16px; transition: all .15s;
}
.history-expand:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
/* ---- AI 回复：头像 + 状态台词行 + 气泡 ---- */
.msg.assistant .msg-body { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
/* 头像右侧「小名 + 签名」一行（2026-09-14 定）——
   小名实（深字重、正文字色）、签名虚（11px 浅灰），两者间隔 8px；
   签名过长在移动端省略号收尾，不挤坏气泡区。 */
.msg-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 0 2px 2px; min-width: 0; max-width: 100%;
}
.msg-nick {
  flex: none; font-size: 13px; font-weight: 600; line-height: 1.35;
  letter-spacing: .02em; color: var(--text); user-select: none;
}
.msg-status {
  flex: 1 1 auto; min-width: 0;
  font-size: 11px; line-height: 1.5; letter-spacing: .03em;
  color: rgba(45, 61, 42, 0.55); user-select: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 768px) {
  .msg-head { gap: 6px; }
  .msg-nick { font-size: 12.5px; }
}
/* ---- 顶部工具栏图标按钮（删除入口） ---- */
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--text-muted); transition: all .15s;
}
.icon-btn:hover { background: var(--gray-bg); color: var(--primary); }
.icon-btn.active { background: var(--primary); color: #fff; }
/* ---- 删除管理模式：勾选钮 + 选中高亮 ---- */
.msg-pick {
  display: none; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  align-items: center; justify-content: center; cursor: pointer;
  border: 1.5px solid #C4CDDA; color: transparent; font-size: 13px; line-height: 1;
  user-select: none; transition: all .12s;
}
#chatBox.manage-on .msg-pick { display: inline-flex; }
#chatBox.manage-on .msg.user .msg-avatar { display: none; }
.msg-pick:hover { border-color: var(--primary); }
.msg-pick.picked { background: var(--primary); border-color: var(--primary); color: #fff; }
#chatBox.manage-on .msg { padding: 4px 2px; border-radius: 12px; transition: background .12s; }
#chatBox.manage-on .msg.group-picked { background: var(--primary-light); }
/* ---- 删除管理操作条 ---- */
.manage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; flex-shrink: 0;
}
.manage-bar .manage-count { font-size: 13px; color: var(--text-muted); }
.manage-bar .manage-actions { display: flex; gap: 8px; }
.manage-bar .btn { padding: 6px 16px; font-size: 13.5px; }
.msg { display: flex; gap: 10px; max-width: 85%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.msg.user .msg-avatar { background: var(--gray); color: #fff; }
.msg.assistant .msg-avatar { background: var(--primary); color: #fff; font-size: 15px; line-height: 1; }
/* 气泡无内容时不显示（如等待 AI 首字期间），避免留下空白小方框 */
.msg-bubble:empty { display: none; }
.msg-bubble {
  padding: 11px 14px; border-radius: 8px; font-size: 14.5px;
  white-space: pre-wrap; word-break: break-word;
  min-width: 0; /* 移动端防宽内容(表格/代码)把气泡撑出 chat 区(触发内部横向滚动) */
}
/* 微信风格：我的消息 = 微信绿底深字，AI = 白底深字 */
.msg.user .msg-bubble { background: #95EC69; color: #17300B; border-top-right-radius: 2px; }
.msg.assistant .msg-bubble { background: #FFFFFF; color: #1F2A1B; border: 1px solid #E3EDDF; border-top-left-radius: 2px; }
/* 我的头像兜底：暖绿渐变 + 「我」字（2026-09-13 定，替代纯灰底） */
.msg.user .msg-avatar { background: linear-gradient(135deg, #8fd6a2, #4ba06a); }
/* ---- 气泡内 Markdown 渲染样式（.md 由 JS 添加） ---- */
.msg-bubble.md { white-space: normal; line-height: 1.6; }
.msg-bubble.md > :first-child { margin-top: 0; }
.msg-bubble.md > :last-child { margin-bottom: 0; }
.msg-bubble.md p { margin: .3em 0; }
.msg-bubble.md ul, .msg-bubble.md ol { margin: .35em 0 .35em 1.5em; padding: 0; }
.msg-bubble.md li { margin: .18em 0; }
.msg-bubble.md h1, .msg-bubble.md h2, .msg-bubble.md h3,
.msg-bubble.md h4, .msg-bubble.md h5, .msg-bubble.md h6 { margin: .7em 0 .3em; font-weight: 600; line-height: 1.4; }
.msg-bubble.md h1 { font-size: 1.16em; } .msg-bubble.md h2 { font-size: 1.1em; }
.msg-bubble.md h3, .msg-bubble.md h4 { font-size: 1.04em; }
.msg-bubble.md code {
  background: rgba(45, 61, 42, 0.13); padding: 1px 5px; border-radius: 4px;
  font-size: .9em; font-family: Consolas, Monaco, "Courier New", monospace;
  word-break: break-all;
}
.msg-bubble.md pre {
  background: rgba(45, 61, 42, 0.08); padding: 10px 12px; border-radius: 8px;
  overflow-x: auto; margin: .55em 0; font-size: 13px; line-height: 1.55;
}
.msg-bubble.md pre code { background: transparent; padding: 0; }
.msg-bubble.md a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.msg-bubble.md blockquote {
  margin: .5em 0; padding: .15em .8em; border-left: 3px solid #D6E2D4;
  color: rgba(45, 61, 42, 0.62);
}
.msg-bubble.md hr { border: none; border-top: 1px solid #E0E8DC; margin: .7em 0; }
.msg-bubble.md table {
  border-collapse: collapse; margin: .55em 0; font-size: .93em;
  display: block; width: 100%; max-width: 100%; overflow-x: auto;
}
.msg-bubble.md th, .msg-bubble.md td {
  border: 1px solid rgba(45, 61, 42, 0.26); padding: 5px 10px; text-align: left;
  white-space: nowrap;
}
.msg-bubble.md th { background: rgba(45, 61, 42, 0.10); font-weight: 600; }
/* 2026-09-13：不再 wrap —— wrap 会让长消息的 msg-body 整块掉到头像下一行（按钮早已挪进 msg-body，wrap 已无用途） */
.msg.assistant { flex-wrap: nowrap; }
/* AI 头像加大到 48px（约原 32px 的 1.5 倍，2026-09-13 定） */
.msg.assistant .msg-avatar { width: 48px; height: 48px; font-size: 20px; }
.msg-actions { flex: 1 1 100%; display: flex; gap: 6px; padding-left: 42px; margin-top: -4px; }
.msg-body .msg-actions { flex: none; padding-left: 0; margin-top: 3px; }
.mini-btn {
  font-size: 11.5px; padding: 2px 10px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); border-radius: 20px;
  cursor: pointer; line-height: 1.6;
}
.mini-btn:hover { color: var(--primary); border-color: var(--primary); }
.mini-btn:disabled { opacity: 0.45; cursor: default; }
/* 消息时间戳（2026-09-12）：库里存 UTC，展示时由 models 统一转本地。
   order:99 保证它永远排在操作栏最右 —— 即使"✓ 已存"标记是后来 append 进去的。 */
.msg-time {
  font-size: 11.5px; color: var(--text-muted); white-space: nowrap;
  align-self: flex-end; padding-bottom: 3px;
}
.msg-actions .msg-time { order: 99; margin-left: auto; align-self: center; padding-bottom: 0; }
@media (max-width: 768px) { .msg-time { font-size: 11px; } }
.mini-ok { font-size: 11.5px; color: var(--green); padding: 2px 2px; }
.mini-tip {
  font-size: 11.5px; color: var(--text-muted); padding: 2px 8px;
  background: var(--bg); border: 1px dashed var(--border); border-radius: 20px;
}

/* ===== AI 识别待办：确认弹窗内的条目编辑（多条可增删） ===== */
.todo-x-list { display: flex; flex-direction: column; gap: 10px; }
.todo-x-item {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: var(--bg);
}
.todo-x-content {
  width: 100%; border: none; background: transparent; resize: vertical;
  font-size: 14px; line-height: 1.6; color: var(--text); padding: 0;
}
.todo-x-content:focus { outline: none; }
.todo-x-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.todo-x-meta select { flex: 0 0 120px; width: auto; }
.todo-x-meta input[type="date"] { flex: 1 1 auto; width: auto; min-width: 0; }
.todo-x-meta select,
.todo-x-meta input[type="date"] {
  font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--text);
}
.todo-x-del {
  margin-left: auto; font-size: 12px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-muted); cursor: pointer;
}
.todo-x-del:hover { color: var(--danger); border-color: var(--danger); }

.chat-empty { text-align: center; color: var(--text-muted); margin: auto; }
/* 新用户空状态（2026-09-17 改版）：品牌 LOGO + 主句 + 3 条编号 + 两个直达按钮。
   LOGO 是 160×160 **白底方图**（不是透明 PNG）→ 必须圆形裁切 + 细边，
   否则在浅灰底上会显出一个白方块；圆形裁切后既是头像观感，也适配将来可能加的深色底。 */
.chat-empty-logo {
  width: 72px; height: 72px; display: block; margin: 0 auto 14px;
  border-radius: 50%; background: #fff; border: 1px solid var(--border);
  object-fit: contain;
}
/* 主句收在 560px 内 —— 不限宽的话桌面 1440px 会拉成一条超长的单行，读起来很累。 */
.chat-empty-hello { color: var(--text); line-height: 1.8; max-width: 560px; margin: 0 auto 12px; }
/* 3 条编号：居中窄块 + 内部左对齐。若每条各自居中，桌面端三行左边缘参差不齐，
   看着像缩进错乱；左对齐才是编号列表正常的读法。 */
.chat-empty-lines { max-width: 430px; margin: 0 auto; text-align: left; }
.chat-empty-line { margin: 0; line-height: 1.7; }
/* 窄屏（390×844 实测）下第 2、3 条的**行尾「~」会被单独挤到下一行** ——
   CJK 与紧随其后的 ASCII「~」之间存在断行机会，整行刚好差一个字符的宽度时
   就只剩一个波浪号孤零零居中，看着像渲染坏了。
   把末尾两字与「~」绑成不可断块，机身宽度再变也不会出现单字符孤行。 */
.chat-empty-line .nb { white-space: nowrap; }
.chat-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 768px) {
  /* 移动端（390×844 实测）：LOGO 收一档、主句降 0.5px，避免空状态一屏塞不下、
     把下面两个快捷按钮顶出首屏。 */
  .chat-empty-logo { width: 60px; height: 60px; margin-bottom: 12px; }
  .chat-empty-hello { font-size: 13.5px; }
}

.chat-input-wrap { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; flex-wrap: wrap; }
.chat-input-wrap textarea { flex: 1; resize: none; height: 44px; }
.chat-input-wrap .btn { height: 44px; }
/* 对话输入框的灰色提示词：比浏览器默认再淡一档（2026-09-14 要求）
   只作用于对话输入框，不影响登录页/后台等其他表单 */
.chat-input-wrap textarea::placeholder { color: #BCC5D0; opacity: 1; }
.chat-input-wrap textarea::-webkit-input-placeholder { color: #BCC5D0; }
/* 对话框内左下角固定 🔔/🗑️（2026-09-17 兵哥定）：左右排列、间距 10px 防误触。
   .chat-box-wrap 定位壳包住 .chat-box，按钮绝对定位框内左下角 —— 消息滚动时不动；
   半透明底 + 细边 + 投影：消息从按钮下方滚过仍可读。
   尺寸 22px（30 缩 1/4，兵哥 18:22 定）+ bottom:22px：按钮中心线距框底 33px，
   与最新一条 AI 消息「＋ 存待办」操作条的中心线齐平（实测 actions 中心距底 33px）。 */
.chat-box-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.chat-tools {
  position: absolute; left: 12px; bottom: 22px; z-index: 5;
  display: flex; gap: 9px;
}
.chat-tools .icon-btn {
  width: 22px; height: 22px; font-size: 11px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.88); border-color: var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

/* 手机端凹感修正 —— 把内阴影挪到内容**之上**（2026-09-18 兵哥反馈"手机端看着像凸"）：
   成因：内阴影绘制在内容之下，而窄屏可视高度小、默认（滚到底）时上沿暗带被最后几条
     消息整个盖住 → 屏幕上只剩"左右暗 + 下暗"，这恰好是「凸起」的视觉语言
     （凸起物体的厚边/投影就在下方）。桌面窗口高、上沿能露出来，所以桌面一直是凹的。
   解法：手机上改用不滚动的定位壳 .chat-box-wrap 的 ::after 承载同一套 inset 阴影，
     盖在内容之上，于是上下两条暗带在任何滚动位置都可见；上下带收窄到 9/8px、
     左右壁减到 0.12，既保住"上暗下暗"，又压掉窄屏上的"圆柱感"。
   ⚠️ 四条硬约束：
     1. inset 阴影必须挂在 .chat-box-wrap 上 —— 挂 .chat-box 会随消息一起滚走；
     2. .chat-box 自己的 box-shadow 必须置 none，否则两套阴影叠在一起、深一倍；
     3. ::after 必须 pointer-events:none，否则会挡住滚动与点击（后果很严重）；
     4. z-index:4 要低于 .chat-tools 的 5 —— 左下角 🔔/🗑️ 必须在阴影之上。
   已知代价：最边缘约 5.5px 宽的一条文字会被轻微罩暗（观感是"提示上方还有内容"，
     多数 App 的长列表都这么做，非缺陷）。桌面端一个字节都不受影响。 */
@media (max-width: 768px) {
  .chat-box { box-shadow: none; }
  .chat-box-wrap::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4;
    border-radius: var(--radius);
    box-shadow:
      inset 0 9px 11px -2px rgba(31, 54, 36, 0.27),   /* 上沿：收窄到 ~9px，任何时候都可见 */
      inset 0 1px 0 rgba(31, 54, 36, 0.13),           /* 上沿硬边线，切口感 */
      inset 4px 0 6px -1px rgba(31, 54, 36, 0.12),    /* 左壁：减弱，防窄屏"圆柱感" */
      inset -4px 0 6px -1px rgba(31, 54, 36, 0.12),   /* 右壁：必须与左壁成对，缺一即不对称 */
      inset 0 -8px 10px -2px rgba(31, 54, 36, 0.25),  /* 下沿 */
      inset 0 0 0 1px rgba(31, 54, 36, 0.09);         /* 一圈内描边（槽壁过渡） */
  }
}

/* ============ 附件上传（图片 / 文档：选择 · 粘贴 · 拖拽） ============ */
.att-wrap { margin-top: 12px; }
.att-wrap .chat-input-wrap { margin-top: 0; }
.att-btn {
  flex: 0 0 auto; height: 44px; width: 44px; padding: 0; font-size: 22px; line-height: 1;
  background: var(--gray-bg); border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; color: var(--text-muted); transition: all .15s;
}
.att-btn:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
/* 待发送附件条 */
.att-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.att-cell {
  position: relative; display: flex; align-items: center; padding: 4px;
  border-radius: 10px; background: var(--gray-bg); border: 1px solid var(--border);
  max-width: 100%;
}
.att-cell-image { padding: 3px; }
.att-cell img { width: 62px; height: 62px; object-fit: cover; border-radius: 7px; display: block; background: #fff; }
.att-cell .att-card { background: #fff; border: none; padding: 4px 4px 4px 2px; }
.att-del {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 50%; background: rgba(15, 23, 42, .62); color: #fff;
  font-size: 13px; line-height: 18px; text-align: center; cursor: pointer;
}
.att-del:hover { background: rgba(15, 23, 42, .85); }
.att-long {
  position: absolute; left: 4px; bottom: -10px; font-size: 10px; line-height: 15px;
  padding: 0 6px; border-radius: 7px; background: #FEF3C7; color: #92400E;
  border: 1px solid #FDE68A; white-space: nowrap;
}
.att-tip {
  margin-bottom: 8px; padding: 7px 10px; border-radius: 8px; font-size: 12px;
  background: #FEF3C7; border: 1px solid #FDE68A; color: #92400E;
}
/* 文件卡片：待发送区 / 气泡内 / 知识库条目 共用 */
.att-card {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
  text-decoration: none; color: inherit; max-width: 260px; box-sizing: border-box;
}
a.att-card:hover { border-color: var(--primary); }
.att-badge {
  flex: 0 0 auto; min-width: 34px; height: 34px; padding: 0 5px; border-radius: 7px;
  background: #EEF2FF; color: #4338CA; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; letter-spacing: .3px;
}
.att-info { display: flex; flex-direction: column; min-width: 0; }
.att-info b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-info i { font-size: 11px; font-style: normal; color: var(--text-muted); }
.drop-active { outline: 2px dashed var(--primary); outline-offset: -4px; }
/* 消息里的图片（微信风格：圆角贴气泡） */
.msg-img {
  display: block; margin-top: 6px; max-width: 220px; max-height: 220px;
  border-radius: 8px; border: 1px solid rgba(31, 54, 36, .08); cursor: zoom-in;
  background: #fff;
}
.msg.user .msg-img { margin-left: auto; }
.msg.user a.msg-img-link { display: block; margin-left: auto; width: fit-content; }
/* 气泡内的文件卡片 */
.msg.user .msg-bubble .att-card { margin-left: auto; margin-top: 6px; background: rgba(255, 255, 255, .78); }
.msg.assistant .msg-bubble .att-card { margin-top: 6px; }

/* 知识库附件（收藏表单 + 条目卡片） */
/* 2026-09-20 兵哥定：录入区改成「＋ 在输入框左边」的横排。
   ⚠️ .kb-img-bar / .kb-img-hint 已停用（原来 ＋ 单独一行、右边跟一句
   「图片 / 文档由 AI 读取内容提炼（最多 5 个）」的说明，该说明整行删除）。
   textarea 的全局规则是 width:100%，横排里必须改回 auto，否则会把 ＋ 挤出去。 */
.kb-compose { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; }
.kb-compose .att-btn { height: 40px; width: 40px; font-size: 20px; flex: 0 0 auto; }
.kb-compose textarea { flex: 1 1 0; width: auto; min-width: 0; margin: 0; }
.kb-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kb-img {
  width: 96px; height: 96px; object-fit: cover; border-radius: 9px;
  border: 1px solid var(--border); background: #fff; cursor: zoom-in;
}
.kb-docs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; align-items: flex-start; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-muted); font-weight: 500; font-size: 13px; background: var(--gray-bg); }
/* 可点击排序的表头（点一下在升/降序之间切换） */
.admin-table th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-table th.th-sort:hover { color: var(--primary); }
.admin-table td.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
/* 临期提醒（7 天内到期）：暖色，和"已过期/停用"的红色区分开 */
.badge-warn { background: #fff4e5; color: #b45309; }

/* 用户专属编号（2026-09-16）：列表里挂在手机号下方的小字 */
.uid-mini {
  margin-top: 2px; font-size: 11.5px; letter-spacing: 0.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  color: var(--primary);
}
/* 后台用户搜索（按编号 / 手机号 / 昵称） */
.admin-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-search input, .admin-search select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; width: 210px; max-width: 100%;
}
/* 筛选下拉（2026-09-21）：宽度跟着内容走，不占满 210px —— 它只是"范围"选择器，
   抢的宽度本该留给搜索框。 */
.admin-search select { width: auto; flex: 0 0 auto; cursor: pointer; background: #fff; }
@media (max-width: 768px) {
  .admin-search { width: 100%; margin-top: 8px; }
  .admin-search input { flex: 1 1 auto; width: auto; }
  .admin-search select { flex: 1 1 auto; width: auto; }
}

/* KEY 池「编号 从–到」小段（2026-09-21 修 bug）：原先是内联 white-space:nowrap，
   360px 下这一段宽 330px、把卡片撑破（实测横向溢出 3px）。
   桌面仍保持一行不折（读起来是"编号 3 – 8"一个整体），小屏放宽换行并收窄输入框。 */
.key-range { white-space: nowrap; }
@media (max-width: 768px) {
  .key-range { white-space: normal; }
  .key-range input { width: 58px; }
}

/* 批量操作条（2026-09-21）：用户列表多选后的批量入口（延期 / 停用启用）。
   浅底 + 细边，视觉上属于"工具条"，不与用户卡片抢注意力。 */
.batch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--gray-bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px; margin-bottom: 12px; }
.admin-table .th-check, .admin-table .td-check { width: 34px; text-align: center; }
.admin-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
@media (max-width: 768px) {
  .batch-bar { gap: 6px; padding: 8px 10px; }
  .batch-bar .btn { flex: 1 1 auto; }   /* 手机上按钮平分一行，手指好点 */
}

/* 后台收款统计（本月 / 本年 / 累计） */
.pay-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.pay-stat { flex: 1 1 150px; background: var(--gray-bg); border-radius: 10px; padding: 12px 14px; }
.pay-stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.pay-stat-num { font-size: 22px; font-weight: 600; }
@media (max-width: 768px) {
  .pay-stat { flex: 1 1 100%; }
}

/* ============ 认证页 ============ */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EEF2FF 0%, #F5F7FA 100%);
  padding: 20px;
}
.auth-card {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 36px; width: 100%; max-width: 400px;
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-logo { margin: 0 auto 12px; }
.auth-brand h1 { font-size: 22px; margin-bottom: 4px; }
.auth-brand p { color: var(--text-muted); font-size: 13px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form input { margin-bottom: 8px; }
@media (max-width: 768px) {
  /* iOS Safari：输入框字号 <16px 时聚焦会自动放大整页，撑破布局 */
  .auth-form input { font-size: 16px; }
}
/* 图形验证码（注册页，自研 SVG 算术题；点击图片换一张） */
.captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.captcha-row input { flex: 1; min-width: 0; margin-bottom: 0; }
.captcha-img {
  flex: 0 0 auto; width: 138px; height: 44px; display: block;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* 找回密码链路（2026-09-16）：注册页邮箱「选填」小标 + 字段说明 + 登录页「忘记密码」入口 */
.label-opt { font-weight: 400; font-size: 12px; color: var(--text-muted); }
.field-tip { margin: 6px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); }

/* ===== 注册页性别卡片单选（2026-09-17）=====
   原生圆点**隐藏但保留可达性** —— 用 opacity/1px 而不是 display:none：
   那样键盘仍能聚焦、读屏仍能识别 radio 组，视觉则完全交给旁边的 .gender-box。
   选中态走 :checked + 兄弟选择器，不需要 JS。 */
.gender-row { display: flex; gap: 10px; margin-bottom: 8px; }
.gender-opt { flex: 1; position: relative; cursor: pointer; }
.gender-opt input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.gender-box {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; font-size: 15px; color: var(--text);
  transition: border-color .15s, background .15s, color .15s; user-select: none;
}
.gender-box .g-mark { font-size: 17px; line-height: 1; }
.gender-opt input:checked + .gender-box {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary); font-weight: 600;
}
.gender-opt input:focus-visible + .gender-box { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-forgot { text-align: right; margin: -2px 0 10px; font-size: 13px; }
.auth-forgot a { color: var(--primary); text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }
/* 专属编号（2026-09-16，设置页「账号安全」）：一眼能读、方便手抄或口头转达 */
.uid-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.uid-label { font-size: 13px; color: var(--text-muted); }
.uid-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 1.5px;
  padding: 3px 10px; border-radius: 6px;
  background: var(--gray-bg); color: var(--text); border: 1px solid var(--border);
}
@media (max-width: 768px) {
  /* 窄屏下邮箱说明较长，缩一点行距避免卡片被撑得过高 */
  .field-tip { font-size: 11.5px; line-height: 1.55; }
  .uid-code { font-size: 15px; letter-spacing: 1px; }
}

/* ============ 新增模块通用 ============ */
.progress-bar {
  height: 8px; background: var(--gray-bg); border-radius: 20px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--primary); border-radius: 20px;
  transition: width 0.3s ease;
}
.ai-comment {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; margin-top: 8px;
}
.intel-form textarea { resize: vertical; }

/* ============ AI 助理设置 ============ */
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.persona-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all 0.15s;
}
.persona-item:hover { border-color: var(--primary); }
.persona-item.selected { border-color: var(--primary); background: var(--primary-light); }
.persona-item input[type="radio"] { display: none; }
.persona-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-bg); overflow: hidden; font-size: 23px; line-height: 1;
}
.persona-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.persona-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.persona-name { font-weight: 600; font-size: 16px; letter-spacing: .3px; }
.persona-item.selected .persona-name { color: var(--primary); }
.persona-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.persona-card-actions .btn { padding: 3px 10px; font-size: 12px; }
/* 设置页「我的头像」行（2026-09-13 定，方案A：可上传，未传显示暖绿「我」字） */
.me-avatar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.me-avatar { width: 56px; height: 56px; font-size: 18px; background: linear-gradient(135deg, #8fd6a2, #4ba06a); }

.memory-list { display: flex; flex-direction: column; gap: 14px; }
/* 按钮放右侧（2026-09-12）：每条少占一行，展开后整体更短、更好扫读 */
.memory-item { display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.memory-main { flex: 1 1 auto; min-width: 0; }
.memory-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.memory-label { font-weight: 600; font-size: 14px; }
.memory-time { color: var(--text-muted); font-size: 12px; }
.memory-content { font-size: 14px; white-space: pre-wrap; margin-bottom: 0; }
/* 历史记忆：可查、弱化展示 */
.memory-item-dim { opacity: 0.72; }
/* 档位标记：只有「长期重要」会显示 */
.mem-tier { font-size: 12px; color: #5b4bb8; background: #eeedfe; border: 1px solid #cecbf6;
  border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
@media (max-width: 768px) {
  .mem-tier { font-size: 11px; padding: 0 6px; }
}
.memory-retired { margin-top: 14px; }
.memory-retired > summary { cursor: pointer; font-size: 14px; color: var(--text-muted); }
/* 数据管理区块：不可逆操作行（左侧说明 + 右侧按钮，窄屏自动换行） */
.danger-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.danger-info { flex: 1 1 320px; min-width: 0; }
.danger-title { font-weight: 600; margin-bottom: 6px; }
.danger-row form { flex: 0 0 auto; }
/* AI 记忆分组（2026-09-14 定）：子项标题横排成胶囊签（自动换行 2~3 行），
   点击在签下方交错展开对应面板——手风琴式：开新的关旧的，再点同一签收起。分批看 10 条由 JS 控制 */
.mem-tabs, .kb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mem-tab, .kb-tab { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface, #fff); color: var(--text); font-size: 13.5px; font-family: inherit; }
.mem-tab:hover, .kb-tab:hover { border-color: var(--primary, #0F6E56); color: var(--primary, #0F6E56); }
.mem-tab.on, .kb-tab.on { background: var(--primary, #0F6E56); border-color: var(--primary, #0F6E56); color: #fff; }
.mem-tab.on .mem-count, .kb-tab.on .kb-tab-count { color: #fff; border-color: rgba(255,255,255,.55); }
.mem-panel, .kb-panel { border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px 14px; margin-bottom: 10px; }
.mem-panel > .memory-list { padding: 2px 0 0; }
/* 记忆列表分页条（2026-09-16：由"点按钮加载更多"改为每页 10 条、上下页翻页） */
.mem-panel > .mem-pager, .kb-pager { display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 12px 0 0; }
.mem-pager .pg-btn, .kb-pager .pg-btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface, #fff); color: var(--text); font-size: 13px; font-family: inherit; }
.mem-pager .pg-btn:hover:not(:disabled), .kb-pager .pg-btn:hover:not(:disabled) { border-color: var(--primary, #0F6E56); color: var(--primary, #0F6E56); }
.mem-pager .pg-btn:disabled, .kb-pager .pg-btn:disabled { opacity: .42; cursor: not-allowed; }
.mem-pager .pg-info, .kb-pager .pg-info { font-size: 13px; color: var(--text-muted); text-align: center; }
.mem-panel[hidden], .kb-panel[hidden] { display: none; }
.mem-count, .kb-tab-count { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 8px; flex: 0 0 auto; }
/* 分批隐藏：用类而非 hidden 属性，避免被 .memory-item 的 display 覆盖 */
.mem-item-hidden { display: none !important; }
.mem-group-retired .mem-group-title { color: var(--text-muted); }
.memory-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.memory-actions .inline { margin: 0; }
/* 窄屏：按钮竖排（比横排省横向空间），卡片内边距略微收紧 */
@media (max-width: 768px) {
  .memory-item { gap: 8px; padding: 12px; }
  .memory-actions { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* 我的现状弹窗顶部引导提示条 */
.profile-tip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px; padding: 9px 13px; margin-bottom: 10px;
  background: var(--primary-light); border: 1px solid var(--border);
  border-radius: 9px; font-size: 13.5px; color: var(--primary-dark);
}
.profile-tip-cta { background: #fef9e7; border-color: #f5e3a0; color: #8a6d1a; }
.profile-tip-muted { color: var(--text-muted); font-size: 12.5px; }
.memory-edit { margin-top: 10px; }
.memory-edit textarea { margin-bottom: 8px; }

/* ============ AI 助理整合页 ============ */
.assistant-wrap { display: flex; flex-direction: column; height: calc(100vh - 140px); gap: 12px; }
.assistant-wrap .chat-box { flex: 1; min-height: 0; }

/* AI 助理固定状态条：计数横排胶囊，常显（含 0），与工具栏同一行。
   质感（2026-09-18 兵哥定 R2「实心凸起」）：顶部内高光 + 底部实色厚边 + 外投影，
   使其从"平铺色块"变成有厚度的凸起 —— 与性格胶囊、对话区同属项目「禁渐变，纯色 + 阴影」体系。
   配色（2026-09-18 兵哥第三次定）：**胭脂红底 + 白字** `#EF475D`
      （轨迹：R2 红底白字 #F4787A → 乳白底黑字 #FBF8F0 → 胭脂红底白字 #EF475D。
        乳白版兵哥反馈"不好看"；胭脂红比原 #F4787A 更深更饱和，白字对比度也从 ~2.8:1 升到 ~3.7:1）。
   ⚠️⚠️ **底色深浅决定 `@keyframes tdGlow` 的光晕色**（见文件下方 tdGlow 定义处，已按此规律来回切过两次）：
      **深底 → 白光晕；浅底 → 红光晕**。当前是深底（胭脂红）→ 白色光晕。
      搞反 = 「数字非 0 呼吸」这个提醒信号**静默失效**（看不见，且没有报错）。
      三版质感对比图：_shots/状态条质感_三方案_20260918.png；试算脚本 tests/_shot_rust3_20260918.js。 */
.assist-status {
  display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 3px 16px;
  /* 容器自身也写 12px（与 .chat-persona 对称）：真正排版的是 .assist-status-item，
     但容器不写就会继承全站 15px —— 将来往条里塞个不带 class 的裸文字就会突然变大，
     且「同字号」在结构上不成立。安全：盒高由 item 的行盒决定，不受容器字号影响。 */
  font-size: 12px;
  background: #EF475D; border: 1px solid #DE3C52; border-radius: 20px;
  padding: 4px 12px; flex-shrink: 0;
  /* ⛔ 楷体已取消（2026-09-18 兵哥定，当天早些时候刚加上的）：状态条要与右侧性格胶囊
     「同高度 + 同字体 + 同字号」，所以这里不再写 font-family —— 不写即继承全站字体，
     与 .chat-persona 的 `font-family: inherit` 完全一致。
     ⚠️⚠️ 等高算式（改任一项都要同步核对另一边）：
        桌面 = 行盒 12×1.5(18px) + padding 4×2 + border 1×2 = **28px**
               .chat-persona 同为 18 + 4×2 + 1×2 = **28px**
        移动端 = 两者 padding 同步降为 3px → **26px**（见 @media max-width:768px 处）
        字号/行高只在 .assist-status-item 上定义一次，桌面与移动端共用，避免两处数值漂移。 */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 2px 0 #C9324A,
              0 4px 10px rgba(190, 45, 65, .30);
}
/* 字号/行高与 .chat-persona 一致（12px / 1.5）—— 这是等高的一半来源，别单独改这里。 */
.assist-status-item { position: relative; color: #FFFFFF; font-size: 12px; line-height: 1.5; text-decoration: none; }
/* ⛔ 分隔点已取消（2026-09-18 兵哥定）：item 之间只靠 .assist-status 的 gap 留白，
   原来这里有一条 `content:'·'` 的 ::before（含移动端 left 覆盖）——已整条删除，别再恢复。
   组内分隔改用模板里写死的「/」（"今 1/ 周待办 4"）。 */
/* 数字字号与标签相同（12px）—— 兵哥要求「同样大小」；强调靠 font-weight:700 + 呼吸放大，
   ⚠️ 不能再把 b 单独调大：b 参与行盒高度计算（inline-block），一旦大于 12×1.5 会把状态条顶高，
      与右侧性格胶囊不再等高。 */
.assist-status-item b { font-size: 12px; font-weight: 700; margin: 0 1px; }
.assist-status-item:hover { text-decoration: underline; }
.assistant-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.assistant-btn { min-width: 150px; padding: 13px 22px; font-size: 15px; }

/* 桌面端：快捷按钮纵向排在左侧，对话区在右侧（移动端仍为底部横排） */
@media (min-width: 769px) {
  /* 页面更贴侧栏、更宽更高：去掉 1100px 上限，左右留白压到最小 */
  .main-assistant .content { max-width: none; padding: 8px 14px 6px 8px; }
  .main-assistant .assistant-wrap { height: calc(100vh - 74px); gap: 8px; }
  .assistant-wrap {
    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas:
      "actions toolbar"
      "actions chatbox"
      "actions managebar"
      "actions input";
    gap: 8px 10px;
  }
  .assistant-actions {
    grid-area: actions;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
  }
  .assistant-btn { min-width: 0; width: 100%; padding: 11px 8px; font-size: 14px; }
  .chat-toolbar { grid-area: toolbar; }
  .chat-box-wrap { grid-area: chatbox; }
  .manage-bar { grid-area: managebar; }
  .chat-input-wrap { grid-area: input; margin-top: 0; }
  .chat-input-wrap textarea { padding: 7px 10px; height: 40px; }
  .main-assistant .chat-input-wrap .btn { height: 40px; }
  .att-btn { height: 40px; width: 40px; font-size: 20px; }
  .att-cell img { width: 52px; height: 52px; }
  .att-card { max-width: 100%; }
  .att-info b { font-size: 12px; }
  .kb-img { width: 76px; height: 76px; }
  .msg-img { max-width: 150px; max-height: 150px; }
}

/* ============ 弹窗（模态框） ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; padding: 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h3 { font-size: 17px; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 26px; line-height: 1;
  cursor: pointer; color: var(--text-muted); padding: 0 4px;
}
.modal-close:hover { color: var(--text); opacity: 1; }
.modal-card label { margin-top: 10px; }
.modal-card .form-actions { margin-top: 14px; }

/* 待办确认卡：从小到大柔和呼出（2026-09-20 兵哥定）——
   scale 0.6→1 + 轻微上浮 + 回弹曲线，避免"猛然弹出吓到用户"。
   display:none→flex 切换时动画自动重放，无需 JS 参与。 */
@keyframes todoPopIn {
  from { transform: scale(0.6) translateY(16px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
#todoModal .modal-card {
  animation: todoPopIn 0.38s cubic-bezier(0.34, 1.35, 0.64, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  #todoModal .modal-card { animation: none; }
}
.modal-divider {
  margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.assistant-projects { display: flex; flex-direction: column; gap: 8px; }
.assistant-project-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: 14px; transition: all 0.15s;
}
.assistant-project-item:hover { border-color: var(--primary); background: var(--primary-light); opacity: 1; }
.assistant-project-arrow { color: var(--text-muted); flex-shrink: 0; margin-left: 10px; }
.assistant-project-desc { display: block; color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.assistant-project-item .badge { margin-left: 8px; vertical-align: 1px; }

/* ============ 折叠卡片（点击展开/收起） ============ */
.fold-card { padding: 0; }
.fold-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 15px 20px; cursor: pointer; user-select: none;
  list-style: none;
}
.fold-summary::-webkit-details-marker { display: none; }
.fold-summary h3 { font-size: 16px; font-weight: 600; }
.fold-summary:hover .fold-hint { color: var(--primary); }
.fold-hint {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-size: 13px; white-space: nowrap;
}
.fold-caret {
  display: inline-block; font-style: normal; font-size: 11px;
  transition: transform 0.2s ease; color: var(--gray);
}
details[open] .fold-caret { transform: rotate(180deg); }
.fold-body { border-top: 1px solid var(--border); padding: 16px 20px 20px; }

/* ============ 资讯定制（intel） ============ */
.intel-list { margin-top: 6px; }
.intel-group { margin-bottom: 18px; }
.intel-group-title {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin: 6px 0 10px; letter-spacing: .3px;
}
.intel-item {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--surface); transition: box-shadow .15s;
}
.intel-item:hover { box-shadow: 0 2px 10px rgba(30, 41, 59, .06); }
.intel-item-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; flex-wrap: wrap;
}
.intel-title-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.intel-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none; word-break: break-word;
}
a.intel-title:hover { color: var(--primary); }
.intel-star { font-size: 13px; letter-spacing: 1px; flex-shrink: 0; }
.star-3 { color: #EAB308; }
.star-2 { color: #3B82F6; }
.star-1 { color: #94A3B8; }
.intel-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.intel-item-actions .btn.saved { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.intel-summary {
  font-size: 14px; color: #475569; line-height: 1.6;
  margin-top: 4px; white-space: pre-wrap; word-break: break-word;
}
.rel-chip {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  border-radius: 20px; padding: 1px 8px; font-size: 12px; margin: 0 2px;
}
.intel-status {
  display: flex; align-items: center; gap: 8px;
  background: var(--blue-bg); color: #1D4ED8;
  border-radius: 10px; padding: 10px 14px; margin: 12px 0;
  font-size: 14px;
}
/* 订阅已更新的过期横幅 */
.intel-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: 10px; padding: 10px 14px; margin: 12px 0;
  color: #92400E; font-size: 13.5px;
}
.intel-banner strong { color: var(--amber); }
.intel-banner .btn { white-space: nowrap; }
.intel-banner-close {
  border: none; background: transparent; color: var(--amber);
  font-size: 18px; line-height: 1; cursor: pointer;
  padding: 2px 8px; border-radius: 6px;
}
.intel-banner-close:hover { background: rgba(180, 83, 9, .12); }
/* 订阅设置 */
.industry-check-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.checkbox-pill { display: inline-flex; align-items: center; cursor: pointer; }
.checkbox-pill input { display: none; }
.checkbox-pill span {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 13px;
  border-radius: 20px; padding: 5px 13px; transition: all .15s;
  user-select: none;
}
.checkbox-pill input:checked + span {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary); font-weight: 500;
}
.sub-chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 6px 5px 13px; font-size: 13px;
  background: var(--gray-bg); color: var(--text);
}
.sub-company { background: var(--green-bg); border-color: var(--green); color: #166534; }
.sub-industry { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.sub-chip-del {
  border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--gray); padding: 0 4px;
}
.sub-chip-del:hover { color: var(--red); }

/* ============ 响应式（768px 以下） ============ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .topbar { padding: 0 16px; }

  .content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr; }

  .msg { max-width: 92%; }
  .chat-wrap { height: calc(100vh - 130px); }

  .inline-form input, .inline-form select { flex: 1 1 100%; width: 100%; }
  .update-data-form { margin-left: 0; flex-wrap: wrap; }

  /* AI 助理页 flex 撑满（2026-09-17 排查后修复）：main 占满视口，顶栏 auto、
     content flex:1 —— 公告出现时对话区自动让位，空闲态文档恒 ≤ 视口（0 滚动）。
     100dvh 渐进增强：iOS Safari / 新 Chrome 动态跟随地址栏；旧浏览器回退 100vh。
     ⚠️ 纯 CSS、无 JS、不碰键盘行为（安卓/iOS 键盘均为浏览器原生）。 */
  .main-assistant { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  /* 109 节的 `.main-assistant.kb-fit`（打字态切屏幕高）经真机复测**无效**，已回退移除。
     结论：Safari 浏览器模式下键盘态的位移由 Safari 自己接管，页面改高度改不动它。见部署清单 110 节。 */
  .main-assistant .content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .assistant-wrap { flex: 1; min-height: 0; height: auto; }
  /* 状态条紧凑化（2026-09-17 兵哥定）：文案已改短（今/周待办/生日/待联/打卡），
     配合「🔔🗑️ 搬去输入框」把移动端「计数 + 性格」压回同一行。
     9-18 兵哥再定两条「同高度 + 同字体 + 同字号」：字号/行高**跟随桌面**（12 / 1.5，此处不再单独覆盖），
     只保留 padding 收缩 —— 且与 .chat-persona 的 3px 同步 → 两边同为 18+6+2 = **26px** 高。
     ⚠️ 因此本条只调 padding：一旦这里和 .chat-persona 的 padding 不一致，两条就会一高一矮。 */
  .assist-status { padding: 3px 8px; gap: 2px 8px; }
  .chat-persona { padding: 3px 9px; }
  .todo-x-item { padding: 9px 10px; }
  .todo-x-meta { gap: 6px; }
  .todo-x-meta select,
  .todo-x-meta input[type="date"] { flex: 1 1 100%; width: 100%; font-size: 12px; padding: 3px 6px; }
  .todo-x-del { margin-left: 0; width: 100%; }
  /* 移动端顶栏：宽度不足时让天气胶囊自动换到第二行（占满宽、完整显示「城市+图标+天气+温度」），首行保留菜单/标题/到期信息 */
  .topbar { flex-wrap: wrap; row-gap: 4px; height: auto; min-height: 60px; padding: 8px 16px; }
  .topbar-title { font-size: 16px; min-width: 0; }
  .topbar-quota { font-size: 12px; }
  /* 移动端：问候整行下沉到第二行并**靠右**（2026-09-18 兵哥改，原为靠左），首行保留标题与到期信息。
     ⚠️ "靠右"必须**同时**把胶囊宽度从 100% 改成 auto —— 否则胶囊仍占满整行，
        靠右只体现在"满行胶囊内部的文字对齐"，观感还是一条横贯整行的色带（已实测对比过）。 */
  .topbar-center { order: 3; width: 100%; justify-content: flex-end; }
  .topbar-weather {
    width: auto; max-width: 100%; font-size: 11.5px; padding: 3px 0;
  }
  .topbar-weather .tw-full { display: none; }
  .topbar-weather .tw-mini { display: inline; }
  .topbar-weather-text { overflow: hidden; text-overflow: ellipsis; }
  .weather-remind-chip { padding: 0 7px; }
  .chat-toolbar { margin-bottom: 8px; }
  /* 移动端 .chat-meta 现在只剩（提醒 chip + 性格胶囊）—— 🔔/🗑️ 已搬进输入框（2026-09-17）。
     margin-left:auto 让它贴工具栏最右。 */
  .chat-meta { margin-left: auto; justify-content: flex-end; }
  /* ⚠️ 浮层必须与胶囊**右边缘**对齐、向左展开（2026-09-17 修）：
     这行原为 `left: 0; right: auto`（左对齐、向右展开），前提是"性格胶囊在左侧"。
     但同批 .chat-meta 已加 margin-left:auto 把胶囊推到工具栏最右 —— 前提没了，
     浮层仍从胶囊左边缘向右铺 216px，**5 种手机宽度实测一律冲出屏幕右侧 92px**
     （390px 下浮层 266~482，还把整页带出横向滚动）。改回右对齐后左边缘约 158px，安全。
     max-width 只是兜底：将来胶囊位置或字号再变，浮层也不会超出视口。 */
  .persona-pop { left: auto; right: 0; max-width: calc(100vw - 24px); }
  /* 快捷入口 4 个横排一行（2026-09-17 兵哥定）：入口已搬到对话区上方，
     原 3 列会把第 4 个挤到第二行 → 改 4 列；尺寸同步缩小（高 41→33.5px），一行排开不换行 */
  .assistant-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; justify-content: stretch; }
  .assistant-btn { width: 100%; min-width: 0; padding: 7px 3px; font-size: 12.5px; white-space: nowrap; }
  /* 记忆类别签小屏更紧凑：隐藏 emoji、缩字号与徽章，8 签排进 3 行 */
  .mem-tabs { gap: 6px; }
  .mem-tab { font-size: 12px; padding: 5px 8px; gap: 4px; }
  .mem-tab .mem-count { font-size: 11px; padding: 0 6px; }
  .mem-ico { display: none; }

  .intel-item-top { flex-direction: column; }
  .intel-item-actions { width: 100%; justify-content: flex-end; }
}

/* 极窄屏（≤374px，基线 360）：再挤一步保住「计数 + 性格」同一行 ——
   胶囊只留文字（隐藏小头像和 ▾）。360px 实测 240+72+8=320 ≤ 328 可用宽。 */
@media (max-width: 374px) {
  .chat-toolbar { gap: 8px; }
  .chat-persona .persona-cap-ava,
  .chat-persona .persona-caret { display: none; }
}

/* ===== 资讯定制：三槽 Tab ===== */
.intel-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.intel-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 14px; border: 0; border-top: 3px solid transparent; border-radius: 10px;
  background: var(--surface); cursor: pointer; text-align: left;
  transition: box-shadow .22s ease, transform .22s ease, background .2s ease;
  /* 桌面：各槽等分铺满整行（2026-09-20 兵哥定「横排宽度铺满」）；≤768px 另配 2×2 两排 */
  flex: 1 1 0; min-width: 0;
  /* 立体（2026-09-20 兵哥定「选重 · 去除灰框」）：与财务顶部数据卡同一套 adv-card 参数。
     这是可点元素，所以 hover 给「上浮 2px + 阴影加深」当反馈（原先是 border-color 变色，去框后没了）。
     顶条 3px 透明占位 → 选中时只换色不改高度，三个 tab 的内容不会错位。 */
  box-shadow: 0 1px 0 rgba(79,70,229,.06), 0 2px 0 rgba(0,0,0,.10),
              0 5px 0 rgba(0,0,0,.07), 0 8px 0 rgba(0,0,0,.04),
              0 8px 16px rgba(0,0,0,.12), 0 16px 40px rgba(0,0,0,.09);
}
.intel-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(79,70,229,.06), 0 3px 0 rgba(0,0,0,.10),
              0 6px 0 rgba(0,0,0,.07), 0 10px 0 rgba(0,0,0,.04),
              0 10px 16px rgba(0,0,0,.12), 0 20px 40px rgba(0,0,0,.09);
}
/* 去灰框后选中态只剩浅紫底，区分度不够 → 补 3px 主色顶条（与财务数据卡顶条同一套语言） */
.intel-tab.active { background: var(--primary-light); border-top-color: var(--primary); }
.intel-tab-name { font-weight: 600; font-size: 14px; color: var(--text); }
.intel-tab-label { font-size: 12px; color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intel-tab.active .intel-tab-label { color: var(--primary); }
.intel-tab-state { font-size: 11.5px; color: var(--gray); }
.intel-tab.active .intel-tab-state { color: var(--primary-dark); }

.intel-zone { min-height: 60px; }
.slot-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

/* ===== 模型设置页 ===== */
.model-row { display: flex; gap: 12px; padding: 7px 0; align-items: baseline; flex-wrap: wrap; }
.model-label { min-width: 92px; color: var(--text-muted); font-size: 13.5px; flex-shrink: 0; }
.model-key-mask { font-family: Consolas, Menlo, monospace; font-size: 13px; color: var(--text); }
.model-tip {
  margin: 10px 0 4px; padding: 10px 12px; background: var(--primary-light);
  border-radius: 8px; font-size: 13px; color: #3730A3; line-height: 1.7;
}
.balance-total { font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.balance-note {
  margin: 12px 0 2px; padding: 9px 12px; background: var(--amber-bg);
  border: 1px solid var(--amber-border); border-radius: 8px;
  font-size: 13px; color: var(--amber);
}
.usage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0; }
.usage-cell {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 6px; text-align: center;
}
.usage-num { font-size: 15px; font-weight: 700; color: var(--text); word-break: break-all; }
.usage-lab { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ===== 订阅设置：各槽表单（桌面 4 列铺满一行，≤768px 收为一列） ===== */
.slot-form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 6px; }
.slot-form-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  background: var(--surface);
}
.slot-form-title { font-weight: 600; font-size: 14.5px; margin-bottom: 10px; color: var(--text); }
.slot-form-card label { display: block; font-size: 12.5px; color: var(--text-muted); margin: 8px 0 4px; }
.slot-form-card input, .slot-form-card select { width: 100%; }

@media (max-width: 768px) {
  .slot-form-grid { grid-template-columns: 1fr; }
  .usage-grid { grid-template-columns: repeat(2, 1fr); }
  .intel-tab { min-width: 0; flex: 1 1 45%; }
  .intel-tab-label { max-width: 100%; }
}

/* ===== 订阅设置：行业动态追踪对象 ===== */
.track-title {
  margin: 12px 0 4px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.track-dim {
  display: block; margin: 8px 0 4px; font-size: 12.5px; color: var(--text-muted);
}
.track-empty {
  margin-top: 10px; padding: 8px 10px; background: var(--bg);
  border: 1px dashed var(--border); border-radius: 8px;
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
}

/* ===== 人脉管理改版：生日横幅 + ABC 分组卡片 + 关系多选 ===== */
.bd-banner {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; margin-bottom: 14px;
  background: #FFF8ED; border: 1px solid #F5DFAE; border-radius: 10px;
  font-size: 13.5px; line-height: 1.9;
}
.bd-banner-title { font-weight: 600; color: #8A5B00; }
.bd-banner-list { display: inline; }
.bd-chip {
  display: inline-block; margin: 2px 8px 2px 0; padding: 2px 10px;
  background: #fff; border: 1px solid #F0DCA8; border-radius: 14px;
  color: #6B4E00; font-size: 12.5px;
}
.bd-chip b { color: #C0392B; }

.rel-picker { position: relative; margin-bottom: 10px; }
.rel-toggle {
  width: 100%; text-align: left; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; color: var(--text); cursor: pointer;
}
.rel-summary-empty { color: var(--text-muted); }
.rel-panel {
  display: none; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
}
.rel-opt {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); font-size: 13px; color: var(--text);
  user-select: none; transition: background .15s, border-color .15s;
}
.rel-opt:hover { border-color: var(--primary); }
.rel-opt:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.rel-opt input { display: none; }

.contact-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden;
}
.cg-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600;
}
.g-a .cg-head { background: #FCEBEB; color: #A32D2D; }
.g-b .cg-head { background: #E6F1FB; color: #0C447C; }
.g-c .cg-head { background: var(--gray-bg); color: var(--text); }
.cg-stat { margin-left: auto; font-size: 12.5px; font-weight: 400; }
.cg-od { color: #C0392B; }
.cg-empty { padding: 14px 16px; font-size: 13px; color: var(--text-muted); }

.contact-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: none; }
.contact-item.od { background: #FFF7F7; }
.ci-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ci-name { font-size: 15px; font-weight: 600; }
.contact-item.od .ci-name { color: #DC2626; }
.ci-rel {
  font-size: 11.5px; padding: 2px 9px; border-radius: 10px;
  background: var(--gray-bg); color: var(--text-muted); white-space: nowrap;
}
.ci-badge {
  margin-left: auto; font-size: 11.5px; padding: 2px 10px; border-radius: 10px; white-space: nowrap;
}
.ci-badge.b-od { background: #FCEBEB; color: #A32D2D; font-weight: 600; }
.ci-badge.b-ok { background: var(--green-bg); color: var(--green); }
.ci-badge.b-gray { background: var(--gray-bg); color: var(--text-muted); }
.ci-sub { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.ci-sub b { color: #C0392B; }
.ci-notes { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.ci-actions { display: flex; gap: 8px; margin-top: 9px; }
.btn-ghost { opacity: .72; }

@media (max-width: 768px) {
  .bd-banner { font-size: 12.5px; }
  .ci-badge { margin-left: 0; }
  .ci-top { padding-right: 0; }
  .ci-actions { flex-wrap: wrap; }
  .rel-panel { max-height: 200px; overflow-y: auto; }
}

/* ===== AI 对话内系统提示（自动标注已联等） ===== */
.sys-tip {
  margin: 6px auto; padding: 5px 14px; max-width: 88%;
  background: var(--green-bg); color: var(--green);
  border: 1px solid #BBF7D0; border-radius: 14px;
  font-size: 12px; text-align: center; line-height: 1.6;
}

/* ===== 人脉管理：已联标记态 ===== */
.btn-marked,
.btn-marked:hover {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
  opacity: 1;
}
/* 打卡按钮初始态：灰底（点击后由 .btn-marked 转为绿底） */
.btn-check {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-check:hover { background: #E9ECEF; }
.ci-auto {
  margin-top: 6px; display: inline-block; padding: 3px 10px;
  background: var(--green-bg); color: var(--green);
  border: 1px solid #BBF7D0; border-radius: 12px;
  font-size: 11.5px;
}

/* ===== 习惯打卡：未达标提示 + 5 行添加槽位 + 卡片列表 ===== */
.hk-banner {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: #FCEBEB; border: 1px solid #F7C1C1; border-radius: 10px;
  font-size: 13.5px; color: #111; line-height: 1.7;
}
.hk-banner b { font-size: 16px; }
.hk-tip { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 9px; }
.hk-add-row {
  display: grid; grid-template-columns: 1fr 128px 92px auto;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.hk-add-row input, .hk-add-row select { width: 100%; min-width: 0; }
.hk-list { display: flex; flex-direction: column; gap: 10px; }
.hk-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
}
.hk-item.od { background: #FFF7F7; border-color: #F7C1C1; }
.hk-item.off { opacity: .62; }
.hk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-name { font-size: 15px; font-weight: 600; }
.hk-item.od .hk-name { color: #DC2626; }
.hk-freq {
  font-size: 11.5px; padding: 2px 9px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary); white-space: nowrap;
}
.hk-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.hk-stats b { color: var(--text); font-size: 13.5px; }

@media (max-width: 768px) {
  .hk-add-row { grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .hk-add-row input[type="text"], .hk-add-row button { grid-column: 1 / -1; }
  .hk-banner { font-size: 12.5px; }
  .hk-item { padding: 10px 12px; }
  .hk-stats { gap: 10px; }
}

/* ===== 健康档案：摘要卡 + 分组弹窗表单 ===== */
.health-progress { margin: 2px 0 14px; }
.health-progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 12.5px; margin-bottom: 7px;
}
.health-progress-head .muted { font-size: 12px; }
.health-summary { display: flex; flex-direction: column; }
.health-summary-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.health-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.health-summary-name { flex: 0 0 68px; color: var(--text-muted); font-size: 13px; }
.health-summary-text { flex: 1; min-width: 0; word-break: break-word; line-height: 1.6; }
.health-summary-empty { flex: 1; color: var(--text-muted); opacity: .7; }

.health-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.health-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.health-field label { margin-top: 0; font-size: 12.5px; color: var(--text-muted); }
.health-field input, .health-field select { width: 100%; min-width: 0; }
.health-field-hint { font-size: 12px; color: var(--text-muted); margin: -2px 0 9px; line-height: 1.6; }

@media (max-width: 768px) {
  .health-form-grid { grid-template-columns: 1fr; }
  .health-summary-row { flex-direction: column; gap: 3px; }
  .health-summary-name { flex: none; font-size: 12px; }
  #healthModal { padding: 0; align-items: flex-end; }
  #healthModal .modal-card { max-height: 92vh; border-radius: 16px 16px 0 0; padding: 20px 16px; }
}

/* ============ 待办提醒（2026-09 改造） ============ */

/* ---- 添加区 ---- */
.td-add { display: flex; gap: 10px; margin-bottom: 10px; }
.td-add-input {
  flex: 1; min-width: 0; padding: 11px 14px; font-size: 14.5px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font-family: inherit;
}
.td-add-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.td-add-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.td-mode-btn {
  background: none; border: none; padding: 4px 0; cursor: pointer; font-family: inherit;
  color: var(--text-muted); font-size: 12.5px; text-align: left;
}
.td-mode-btn:hover { color: var(--primary); }
.td-mode-btn.active { color: var(--primary); font-weight: 600; }
.td-manual-toggle { color: var(--primary); font-size: 13px; cursor: pointer; white-space: nowrap; }
.td-ai-msg {
  margin-top: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13px;
  background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(59, 130, 246, .25);
}
.td-ai-msg.is-err { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }

.td-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.td-form > input[type="text"] { width: 100%; margin-bottom: 10px; }
.td-form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.td-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.td-field span { font-size: 12.5px; color: var(--text-muted); }
.td-field input, .td-field select { width: 100%; min-width: 0; }
.td-note {
  margin-top: 12px; font-size: 12.5px; color: var(--text-muted); line-height: 1.65;
  padding-top: 10px; border-top: 1px dashed var(--border);
}

/* ---- 列表 ---- */
.td-list { display: flex; flex-direction: column; }
.td-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.td-item:last-child { border-bottom: none; }
.td-item.is-now { background: var(--amber-bg); border-radius: 9px; padding-left: 12px; padding-right: 8px; }
.td-item.is-late { background: #FCFCFD; border-radius: 9px; padding-left: 12px; padding-right: 8px; }
.td-item.is-done .td-content, .td-item.is-givenup .td-content { opacity: .55; }
.td-main { flex: 1; min-width: 0; }
.td-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-content { font-weight: 500; word-break: break-word; }
.td-content-done { text-decoration: line-through; }
.td-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.td-tag {
  font-size: 12px; color: var(--text-muted); background: var(--gray-bg);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.td-tag-now { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.td-tag-late { background: #FFF7ED; color: #C2410C; }
.td-tag-rep { background: var(--primary-light); color: var(--primary); }
.td-tag-week { background: var(--green-bg); color: #15803D; }
.td-tag-far { background: #F1F5F9; color: #64748B; }

/* 三色三组：分组标题前的圆点（红=今日 绿=一周 灰=远期） */
.td-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.td-dot-today { background: var(--red); }
.td-dot-week { background: var(--green); }
.td-dot-far { background: #9AA5B1; }

/* ---- 操作区：完成常驻 + 「⋯」展开 ---- */
.td-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.td-more { position: relative; }
.td-more-btn {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: 17px; line-height: 1; background: transparent;
}
.td-more-btn::-webkit-details-marker { display: none; }
.td-more-btn:hover { border-color: var(--primary); color: var(--primary); }
.td-more[open] .td-more-btn { border-color: var(--primary); color: var(--primary); }
.td-more-pop {
  position: absolute; right: 0; top: 36px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px;
}
.td-more-pop form { display: block; margin: 0; }
.td-more-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--text);
  cursor: pointer; font-family: inherit;
}
.td-more-item:hover { background: var(--gray-bg); }
.td-more-item:disabled { opacity: .6; cursor: default; }
.td-more-del:hover { background: var(--red-bg); color: var(--red); }
.td-more-label { font-size: 12px; color: var(--text-muted); padding: 6px 10px 4px; }
.td-resched { border-top: 1px solid var(--border); margin-top: 5px; padding: 6px 8px 2px; }
.td-resched-row { display: flex; gap: 6px; margin: 4px 0 8px; }
.td-resched-row input { flex: 1; min-width: 0; font-size: 12.5px; padding: 5px 7px; }

/* ---- AI 确认弹窗 ---- */
.td-confirm-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-height: 52vh; overflow-y: auto; }
.td-confirm-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.td-ci-content { width: 100%; margin-bottom: 8px; }
.td-ci-row { display: grid; grid-template-columns: 1.1fr .9fr .7fr .8fr auto; gap: 6px; align-items: center; }
.td-ci-row input, .td-ci-row select { width: 100%; min-width: 0; font-size: 12.5px; padding: 5px 7px; }
.td-ci-del {
  background: none; border: none; cursor: pointer; font-size: 19px; line-height: 1;
  color: var(--text-muted); padding: 0 4px; font-family: inherit;
}
.td-ci-del:hover { color: var(--red); }
.td-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---- 助手页状态条：待办紧急时呼吸放大 ----
   幅度（2026-09-19 兵哥定）：**0.85 ⇄ 1.05**（轨迹：1 ⇄ 1.18 → 0.85 ⇄ 1.1 → 本值）。 */
@keyframes tdBreath {
  0%, 100% { transform: scale(0.85); }
  50%      { transform: scale(1.05); }
}
/* ⚠️ 光晕色**必须与状态条底色反差**，规律：**深底 → 白光晕；浅底 → 红光晕**（已来回切过两次）。
   状态条 9-18 第三次定为「胭脂红底 + 白字」= 深底 → 用**白光晕**（同 R2 原始值）。
   若哪天底色再改浅（乳白/白瓷等），这里必须同步换成红色系，否则呼吸信号在黑字上看不见 —— 反之亦然。
   只被 .assist-status-item（is-urgent / has-num）使用，无其他引用点。 */
@keyframes tdGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  50%      { text-shadow: 0 0 9px rgba(255, 255, 255, .95); }
}
.assist-status-item.is-urgent { animation: tdBreath 1.7s ease-in-out infinite; transform-origin: left center; }
.assist-status-item.is-urgent b { animation: tdGlow 1.7s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .assist-status-item.is-urgent,
  .assist-status-item.is-urgent b { animation: none; text-decoration: underline; }
}

/* ---- 助手页状态条：非 0 数字呼吸放大（2026-09-14，只作用于数字本身）----
   今日/周待办、生日、待联、打卡 —— 只要数值非 0 就「由小变大 + 白光呼吸」（底深用白晕；底浅须换红晕），为 0 则静止。
   幅度（2026-09-19 兵哥定）：**0.85 ⇄ 1.2**（轨迹：1 ⇄ 1.35 → 0.85 ⇄ 1.15 → 0.85 ⇄ 1.25 → 0.85 ⇄ 1.15 → 本值）。
   ⚠️ 下限 <1 是刻意的 —— 变成「先缩后胀」的对称脉动，峰值不再一直往外撑。
   1.2 峰值下数字视觉约 14.4px（基准 12px），仍小于改版前 16px 的静态尺寸 → 不会顶到相邻标签。
   ⚠️ transform 不参与布局 → 任何幅度都**不会**改变状态条高度、也不会把它撑宽（等高不受影响）。
   与上面的 is-urgent（整行呼吸，表示"已到点"，是更强的信号）叠加共存：整行 1.1 × 数字 1.2。 */
@keyframes numBreath {
  0%, 100% { transform: scale(0.85); }
  50%      { transform: scale(1.2); }
}
/* ⚠️ b 默认是 inline，transform 对 inline 元素不生效，必须 inline-block */
.assist-status-item b.has-num {
  display: inline-block;
  transform-origin: center center;
  animation: numBreath 1.7s ease-in-out infinite, tdGlow 1.7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .assist-status-item b.has-num { animation: none; text-shadow: none; text-decoration: underline; }
}

@media (max-width: 768px) {
  .td-add { flex-direction: column; }
  .td-add .btn { width: 100%; }
  .td-form-row { grid-template-columns: 1fr 1fr; }
  .td-item { align-items: flex-start; padding: 11px 2px; }
  .td-item.is-now, .td-item.is-late { padding-left: 10px; padding-right: 6px; }
  .td-content { font-size: 14px; }
  .td-more-pop { min-width: 0; width: calc(100vw - 64px); max-width: 280px; right: -2px; }
  .td-ci-row { grid-template-columns: 1fr 1fr; }
  .td-ci-row .td-ci-del { grid-column: 2; justify-self: end; }
  .td-modal-actions { flex-direction: column-reverse; }
  .td-modal-actions .btn { width: 100%; }
  #tdModal { padding: 0; align-items: flex-end; }
  #tdModal .modal-card { max-height: 92vh; border-radius: 16px 16px 0 0; padding: 20px 16px; }
}

/* ============ 健康：每日状态速记 + 趋势 + 方案打卡（2026-09 阶段二） ============ */

/* ---- 顶栏一行：左侧周报按钮 + 中间说明（与首页天气问候同层） ---- */
.health-topbar {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 0;
}
/* 按钮脱离文档流贴左，这样文案居中的基准是整行，不会被按钮推偏 */
.health-topbar .btn { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.health-topbar-tip {
  min-width: 0; padding: 0 132px;    /* 两侧等距留白 = 按钮宽度，避免长句压到按钮 */
  text-align: center; font-size: 12.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.hl-hint { font-size: 12px; color: var(--text-muted); }

/* ---- 速记条：四格，三项全可选 ---- */
.hl-cells {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-bottom: 12px;
}
.hl-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hl-label { font-size: 12.5px; color: var(--text-muted); }
.hl-input {
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
.hl-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.hl-input input {
  border: none; background: none; padding: 9px 0; width: 100%; min-width: 0;
  font-size: 15px; color: var(--text); font-family: inherit;
}
.hl-input input:focus { outline: none; }
.hl-input em { font-style: normal; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* 精力打分：5 格平分宽度，窄屏也不会溢出 */
.hl-energy { display: flex; gap: 5px; }
.hl-dot {
  flex: 1; min-width: 0; height: 37px; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--text-muted); font-size: 13px; font-family: inherit; transition: all .12s;
}
.hl-dot:hover { border-color: var(--primary); color: var(--primary); }
.hl-dot.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.hl-check { display: flex; align-items: center; gap: 7px; padding: 9px 0; font-size: 13px; color: var(--text-muted); }
.hl-check input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

.hl-foot { display: flex; gap: 10px; align-items: center; }
.hl-foot input {
  flex: 1; min-width: 0; padding: 10px 13px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--text); font-family: inherit;
}
.hl-foot input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* ---- 趋势图（手写 SVG，随容器拉伸但描边不变形） ---- */
.hl-trends {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.hl-trend-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.hl-trend-name { font-size: 13.5px; font-weight: 600; }
.hl-trend-meta { font-size: 12px; color: var(--text-muted); }
.tr-svg { width: 100%; height: 118px; display: block; }
.tr-axis { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tr-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tr-line-weight { stroke: var(--primary); }
.tr-line-energy { stroke: #0D9488; }
.tr-dot { stroke: var(--surface); stroke-width: 1.2; }
.tr-dot-weight { fill: var(--primary); }
.tr-dot-energy { fill: #0D9488; }
.tr-bar { fill: var(--primary); opacity: .5; }
.tr-bar-exercise { fill: var(--green); opacity: .78; }  /* 运动：绿柱，与体重/睡眠区分 */

/* ---- 趋势切换：图的右上方胶囊，默认体重（纯前端显隐，零请求） ---- */
.tr-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tr-range { font-size: 12px; color: var(--text-muted); }
.tr-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
}
.tr-tab {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 12.5px; line-height: 1.6; color: var(--text-muted);
  padding: 3px 13px; border-radius: 999px; transition: background .15s, color .15s;
}
.tr-tab:hover { color: var(--primary); }
.tr-tab.is-on { background: var(--primary); color: #fff; font-weight: 600; }
.tr-panel { display: none; }
.tr-panel.is-on { display: flex; flex-direction: column; gap: 3px; }
.tr-none { font-size: 12.5px; color: var(--text-muted); text-align: center; padding: 30px 0 34px; }
.hl-trend-note { font-size: 11.5px; color: var(--text-muted); }

.hl-empty {
  margin-top: 14px; padding: 18px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
}
.hl-empty b { font-size: 14px; font-weight: 600; }
.hl-empty span { font-size: 12.5px; color: var(--text-muted); }

/* ---- 方案 → 打卡建议 ---- */
.hp-suggest { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.hp-suggest-head { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.hp-habits { display: flex; flex-direction: column; gap: 8px; }
.hp-habit {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.hp-habit.is-added { background: var(--green-bg); border-color: rgba(34, 197, 94, .3); }
.hp-habit-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.hp-habit-name { font-size: 14px; font-weight: 500; }
.hp-habit-freq {
  font-size: 11.5px; color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.hp-habit-done { font-size: 12.5px; color: var(--green); font-weight: 600; white-space: nowrap; }
/* .hp-suggest-note 已于 2026-09-20 删除（兵哥要求去掉「加入后到习惯打卡每天勾一次…」整句，
   该说明条随之没有使用者，样式一并清掉，避免留死代码）。 */


/* AI 方案的轻 markdown 渲染（## 标题 / **粗体** / - 列表） */
.plan-body { white-space: normal; }
.plan-body .plan-h {
  font-size: 14.5px; font-weight: 600; color: var(--primary);
  margin: 16px 0 6px;
}
.plan-body .plan-h:first-child { margin-top: 0; }
.plan-body .plan-p { margin: 4px 0; }
.plan-body .plan-li { position: relative; padding-left: 15px; margin: 4px 0; }
.plan-body .plan-li::before {
  content: '·'; position: absolute; left: 4px; color: var(--text-muted); font-weight: 700;
}
.plan-body strong { font-weight: 600; }

@media (max-width: 768px) {
  /* 顶栏放不下长句：只留周报按钮（靠左），说明文字隐藏 */
  .health-topbar { justify-content: flex-start; gap: 8px; }
  .health-topbar-tip { display: none; }
  /* 移动端顶栏是两行布局，按钮须回到正常流，否则第二行高度塌成 0、按钮会被裁掉 */
  .health-topbar .btn { position: static; transform: none; }
  .tr-tab { padding: 3px 10px; font-size: 12px; }
  .hl-cells { grid-template-columns: 1fr 1fr; }
  .hl-foot { flex-direction: column; align-items: stretch; }
  .hl-foot .btn { width: 100%; }
  .tr-svg { height: 92px; }
  .hp-habit { flex-direction: column; align-items: flex-start; }
  .hp-habit form { width: 100%; }
  .hp-habit .btn { width: 100%; }
}

/* ============ 体检报告识别（档案弹窗内的上传条 + 冲突确认） ============ */
.hr-upload {
  margin: 6px 0 4px; padding: 12px 14px; border-radius: 10px;
  background: var(--primary-light); border: 1px solid #DDD6FE;
}
.hr-upload-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hr-upload-head b { font-size: 13.5px; }
.hr-upload-head > span { font-size: 12.5px; color: var(--text-muted); }
.hr-upload-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.hr-upload-actions .btn { margin: 0; }
.hr-upload-hint { font-size: 11.5px; color: var(--text-muted); }
.hr-status { display: none; margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
.hr-status.show { display: block; }
.hr-status.is-busy { color: var(--primary); }
.hr-status.is-ok { color: var(--green); }
.hr-status.is-err { color: var(--red); }

/* AI 回填过的字段：黄底提醒「这是识别出来的，请核对」 */
.health-field.is-ai > label { color: var(--amber); }
.health-field.is-ai > input,
.health-field.is-ai > select,
.health-field.is-ai > textarea { background: var(--amber-bg); border-color: var(--amber-border); }
.health-field textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.ai-flag {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; color: #fff; background: var(--amber);
  vertical-align: 1.5px; letter-spacing: .5px;
}

/* 冲突确认弹窗（叠在档案弹窗之上） */
.modal-mask.is-top { z-index: 260; }
.modal-card.is-sm { max-width: 430px; }
.hr-conflict-list { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 2px; }
.hr-conflict-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); font-size: 13px;
}
.hr-conflict-label { flex: 0 0 90px; color: var(--text-muted); }
.hr-conflict-old { color: var(--text-muted); text-decoration: line-through; }
.hr-conflict-arrow { color: var(--text-muted); }
.hr-conflict-new { color: var(--primary); font-weight: 600; }

/* ============ 上周健康周报 ============ */
.wk-loading { padding: 26px 0; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wk-range { font-size: 15px; font-weight: 600; }
.wk-stamp { font-size: 11.5px; color: var(--text-muted); }
.wk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 2px; }
.wk-cell {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg); display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.wk-cell span { font-size: 11.5px; color: var(--text-muted); }
.wk-cell b { font-size: 15px; font-weight: 600; word-break: break-word; }
.wk-cell b em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
.wk-ai { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.wk-ai-title { font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.wk-ai p { font-size: 13.5px; line-height: 1.75; margin-bottom: 8px; }
.wk-ai p:last-child { margin-bottom: 0; }
.wk-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 768px) {
  .wk-grid { grid-template-columns: 1fr 1fr; }
  .hr-conflict-label { flex: none; }
  .hr-upload-actions { align-items: stretch; }
  .hr-upload-actions .btn { width: 100%; }
}

/* ============ 知识库改版：星空图 + 版块 + 录入预览（2026-09） ============ */

.kb-search-card { padding: 10px 12px; }
.kb-search {
  flex: 1 1 auto; min-width: 0; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; background: var(--surface); outline: none;
}
.kb-search:focus { border-color: var(--primary); }

.kb-map-hint { font-size: 11.5px; }
#kbMap { width: 100%; height: 360px; display: block; cursor: default; }
.kb-legend { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.kb-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.kb-tooltip {
  position: absolute; max-width: 180px; padding: 4px 9px; border-radius: 7px;
  background: rgba(15, 23, 42, .88); color: #fff; font-size: 12px; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 5;
}
.kb-map-card { position: relative; }

.kb-input-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kb-input-row select { flex: 1 1 140px; min-width: 0; }
.kb-input-row .btn { flex: none; }
/* ⚙️ 版块管理按钮（2026-09-20）：贴在下拉旁的小方钮。
   ⚠️ 必须用 0-3-0 压过 ≤768px 那条 `.kb-input-row .btn { flex: 1 1 100% }`，
   否则手机上它会独占一行、把版块下拉挤到下一行去。 */
.kb-input-row .btn.kb-sec-mgr { flex: 0 0 auto; padding: 6px 10px; }

/* 版块管理弹窗（2026-09-20）：预置行无按钮（浅底），自定义行带「改名 / 删除」。
   ⚠️ 不给预置行加任何文字标签（「预置 / 兜底桶」字样一律不上界面）。 */
.kb-sec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.kb-sec-row.is-preset { background: #F5F7F6; }
.kb-sec-nm { font-size: 14px; font-weight: 600; }
.kb-sec-cnt { font-size: 12px; }
.kb-sec-acts { margin-left: auto; display: flex; gap: 6px; }
@media (max-width: 768px) {
  .kb-sec-acts { margin-left: 0; width: 100%; }
  .kb-sec-acts .btn { flex: 1 1 0; }
}

.kb-msg { margin-top: 8px; font-size: 12.5px; color: var(--primary); }
.kb-msg.is-err { color: var(--danger, #dc2626); }

.kb-preview { margin-top: 14px; padding: 14px; border: 1px dashed var(--border); border-radius: 11px; background: var(--bg); }
.kb-pv-head { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.kb-pv-row { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.kb-pv-row.kb-pv-top { align-items: flex-start; }
.kb-pv-row > label { width: 36px; flex: none; font-size: 12.5px; color: var(--text-muted); }
.kb-pv-row input, .kb-pv-row select { flex: 1 1 180px; min-width: 0; }
.kb-pv-row textarea { flex: 1 1 100%; }
.kb-pv-tip { font-size: 11.5px; }
.kb-pv-src { margin-bottom: 8px; font-size: 12px; word-break: break-all; }

.kb-list-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.kb-list-title { font-size: 15px; font-weight: 600; }
.kb-sec { margin-bottom: 18px; }
.kb-sec-name { font-size: 14px; margin-bottom: 10px; }
.kb-item .kb-points { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.kbm-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; }

@media (max-width: 768px) {
  #kbMap { height: 270px; }
  .kb-map-hint { display: none; }
  .kb-input-row .btn { flex: 1 1 100%; }
  .kb-pv-row > label { width: 100%; }
}

/* ============ 知识库 2026-09-16：标题 / 关键词输入 + 「与 AI 讨论」入口 ============ */

/* 录入卡头部：标题 + 两个关键词位（放在「✍️ 收藏 / 记录」右侧，手机上换行通栏） */
.kb-add-head { flex-wrap: wrap; }
.kb-fields { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto;
              justify-content: flex-end; min-width: 0; }
.kb-fields-inline { justify-content: flex-start; flex: 1 1 100%; }
.kb-fld {
  flex: 0 1 150px; min-width: 0; padding: 7px 11px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; background: var(--bg); outline: none;
}
.kb-add-head .kb-fields .kb-fld:first-child { flex: 0 1 180px; }
.kb-fld:focus { border-color: var(--primary); }

/* 正文字数：纯文字原样保存上限 5000 字，超限变红 */
.kb-chars { text-align: right; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.kb-chars.is-over { color: var(--danger, #dc2626); font-weight: 600; }

/* 关键词小签（列表卡 / 详情弹窗共用） */
.kb-kws { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.kb-kw {
  font-size: 11.5px; padding: 1px 8px; border-radius: 999px;
  background: #E8F7F5; color: #0FA8A0; border: 1px solid #BFE9E4;
}
.kbm-kws { margin: 2px 0 10px; font-size: 12.5px; color: var(--text-muted); align-items: center; }

/* 搜索框 + 「与 AI 讨论」：搜索在左、讨论在右。
   2026-09-16 兵哥定：左右两项各铺一层浅底色，把两件事从视觉上分开 ——
   左（站内查自己的条目）= 淡靛蓝，主色系；右（会触发 AI 联动）= 品牌蒂芙尼淡绿。
   两色同属低饱和，互不抢眼；输入框统一白底，从底色上浮起来。 */
.kb-search-row { display: flex; gap: 10px; align-items: center; }
.kb-find, .kb-ask {
  display: flex; gap: 8px; align-items: center; min-width: 0;
  padding: 8px; border-radius: 12px; border: 1px solid transparent;
}
.kb-find { flex: 1 1 50%; background: var(--primary-light, #EEF2FF); border-color: #E0E7FF; }
.kb-ask { flex: 1 1 46%; background: #E8F7F5; border-color: #BFE9E4; }
.kb-ask-in {
  flex: 1 1 auto; min-width: 0; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; background: var(--surface); outline: none;
}
.kb-ask-in:focus { border-color: var(--primary); }
.kb-find-btn, .kb-ask-btn { flex: none; white-space: nowrap; }
/* 搜索按钮：跟左组同族的柔和靛蓝（低饱和，不与右侧主色按钮抢焦点） */
.kb-find-btn { background: #E0E7FF; color: #4338CA; border-color: #C7D2FE; }
.kb-find-btn:hover { background: #C7D2FE; opacity: 1; }

/* 详情弹窗的修改态 */
.kbm-edit { margin-bottom: 10px; }
.kbm-edit .kb-pv-row { margin-bottom: 10px; }
/* 「关键词」是三个字，默认 36px 的 label 宽会把它折成两行。
   只在桌面生效 —— 移动端 label 本来就独占一行（媒体查询里的 width:100%）。 */
@media (min-width: 769px) {
  .kbm-edit .kb-pv-row > label { width: 48px; }
}

@media (max-width: 768px) {
  /* 三个输入框各占一行，免得在手机上挤成一团 */
  .kb-fields { flex: 1 1 100%; }
  .kb-add-head .kb-fields .kb-fld,
  .kb-add-head .kb-fields .kb-fld:first-child { flex: 1 1 100%; }
  .kb-search-row { flex-direction: column; align-items: stretch; }
  /* 讨论框的提示语已缩短（「💬 与 AI 讨论正事」），手机上输入框 + 按钮能并排放下了，
     不必再拆成两行 —— 与左边的「输入框 + 搜索」保持同样的排布。 */
  .kb-find, .kb-ask { flex: 1 1 auto; }
  .kb-find .kb-search, .kb-ask .kb-ask-in { flex: 1 1 auto; min-width: 0; }
}

/* ============ 知识库 2026-09 二次改版：黑底星空 + 智能连线 + 列表折叠 ============ */

/* 顶部说明条 */
.kb-intro {
  padding: 13px 16px; margin-bottom: 14px; border-radius: 12px;
  background: var(--card, #fff); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.kb-intro-t { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.kb-intro-p { font-size: 12.5px; line-height: 1.75; color: var(--text-muted); }
.kb-intro-p b { color: var(--primary); font-weight: 600; }

/* 星空图：黑底高对比 */
#kbMap {
  width: 100%; height: 380px; display: block; cursor: default;
  background: #05070C; border-radius: 11px;
}
.kb-map-card .card-header { align-items: flex-start; }
.kb-tooltip {
  background: rgba(15, 23, 42, .94); border: 1px solid rgba(148, 163, 184, .35);
}
.kb-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* 列表（2026-09-16 改横排胶囊签后：折叠头 .kb-sec-head / .kb-caret / .kb-more 已废弃删除） */
.kb-count { font-size: 12px; margin-left: auto; }
.kb-sec-name { font-size: 14.5px; font-weight: 600; }

/* 详情卡：相关条目 */
.kbm-rel { margin: 12px 0 4px; }
.kbm-rel-t { font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.kbm-rel-chip {
  display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; cursor: pointer;
  font-size: 12.5px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg); transition: all .15s;
}
.kbm-rel-chip:hover { border-color: var(--primary); color: var(--primary); }
.kbm-rel-chip i { font-style: normal; font-size: 11px; }

@media (max-width: 768px) {
  #kbMap { height: 300px; }
  .kb-map-hint { display: none; }
  .kb-intro-p { font-size: 12px; }
}

/* 条数预警（2026-09；原「仅显示最近 20 条」提示已随分页改版删除） */
.kb-quota {
  padding: 11px 14px; margin-bottom: 14px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.7;
  background: #FEF9C3; border: 1px solid #FDE68A; color: #854D0E;
}
.kb-quota.is-full { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }
.kb-quota b { font-weight: 700; }
@media (max-width: 768px) {
  .kb-quota { font-size: 12px; }
}

/* ===== 知识库：全部下载条（2026-09-21 兵哥定）=====
   位置在条目列表**下方**；顶部一条虚线把它与条目分开 ——
   它是"整库操作"，不属于任何一条。 */
.kb-download {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 20px 0 6px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.kb-dl-btn { flex: none; }
.kb-dl-hint { font-size: 12px; color: var(--text-muted); }
@media (max-width: 768px) {
  .kb-download { flex-direction: column; align-items: stretch; gap: 8px; }
  .kb-dl-btn { width: 100%; }
  .kb-dl-hint { text-align: center; }
}

/* ===== 待办页：来自愿望清单的子计划标签（2026-09） ===== */
.td-tag-wish {
  background: #FFF7ED; border: 1px solid #FDE3CF; color: #C2410C !important;
  text-decoration: none; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.td-tag-wish:hover { border-color: #FB923C; }

/* ===== 待办页：来自往来账的到期待办标签（2026-09-20） =====
   与财务页「往来」的蓝色系一致（借出/收回同色），点一下回财务页的「往来」Tab。 */
.td-tag-debt {
  background: #F0F9FF; border: 1px solid #BAE6FD; color: #0369A1 !important;
  text-decoration: none; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.td-tag-debt:hover { border-color: #38BDF8; }

/* ===== AI 回复提示音开关（2026-09）：静音时图标淡一点，一眼看出当前状态 ===== */
.icon-btn.is-off { opacity: .42; }
.icon-btn.is-off:hover { opacity: 1; }

/* ==========================================================================
   公开落地页（2026-09）—— 未登录访客看到的首页，兼作搜索引擎收录入口。
   设计原则：**不给带宽添负担** —— 全部用文字与 CSS 排版，零图片、零外部资源。
   ========================================================================== */
/* 落地页专属配色（2026-09）：**只三种颜色** —— 绿（与软件侧边栏同色）+ 白 + 橙（点缀）。
   做法是**局部覆盖 CSS 变量**，作用范围仅限落地页子树，应用内部配色不动。
   · 绿 #0F6E56  → 主色：按钮、链接、小标题、CTA 底色（与侧边栏同色，品牌一致）
   · 白 #FFFFFF  → 页面底、卡片
   · 橙 #C2410C  → **只用于细节**（hero 小抬头、序号），面积越小越像点睛
   中间那些浅绿/绿灰都是「绿」的深浅层次，不引入第四种色相。 */
.lp-body {
  --primary: #0F6E56;
  --primary-dark: #0B5642;
  --primary-light: #E4F0EA;     /* 绿系最浅：CTA 底、强调块 */
  --accent: #C2410C;            /* 第三色·橙：细节点睛专用 */
  --surface: #FFFFFF;           /* 白：卡片 */
  --bg: #FFFFFF;                /* 白：页面底 */
  --bg-alt: #F4F9F6;            /* 绿的最浅：交替区块（区分区块用） */
  --text: #1F2A26;              /* 带绿调的近黑（属于绿的深层次，不算新色相） */
  --text-muted: #6B7C74;        /* 绿灰：属于绿的淡化 */
  --border: #E3EBE6;
  --gray-bg: #F4F9F6;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15, 60, 45, .06), 0 1px 2px rgba(15, 60, 45, .04);
  --shadow-lg: 0 10px 30px rgba(15, 60, 45, .10);
  background: var(--bg); color: var(--text); margin: 0; line-height: 1.7;
}
.lp-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.lp-nav { background: var(--surface, #fff); border-bottom: 1px solid var(--border, #E5E7EB); position: sticky; top: 0; z-index: 20; }
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.lp-brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap; }
.lp-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: 0 0 auto; }
.lp-nav-links { display: flex; align-items: center; gap: 18px; }
.lp-nav-links a:not(.btn) { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.lp-nav-links a:not(.btn):hover { color: var(--primary); }

.lp-hero { padding: 72px 0 56px; text-align: center; background: var(--surface, #fff); }
.lp-hero h1 { font-size: 38px; line-height: 1.3; margin: 0 0 18px; letter-spacing: -.5px; }
/* H1 里品牌名作小字抬头（SEO 上品牌词仍在 H1 最前），卖点作大字标题 */
.lp-h1-eyebrow {
  display: block; font-size: 15px; font-weight: 600; letter-spacing: 2.5px;
  color: var(--accent, #C2410C); margin-bottom: 12px;
}
/* 660px 时首行「…账务管理等；」会把「等；」两个字挤到第二行（孤字），放到 780px 刚好一行放下 */
.lp-hero-sub { font-size: 16px; color: var(--text-muted); margin: 0 auto 28px; max-width: 780px; }
.lp-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-hero-note { margin: 18px 0 0; font-size: 13px; color: var(--text-muted); }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 10px; }

.lp-section { padding: 56px 0; }
.lp-section-alt { background: var(--bg-alt, #F4F9F6); }
.lp-section h2 { font-size: 24px; margin: 0 0 10px; text-align: center; }
.lp-section-sub { text-align: center; color: var(--text-muted); margin: 0 0 28px; font-size: 14px; }

/* 对照表占满内容宽度（原 800px 会把两侧文字挤成两行） */
.lp-compare { display: flex; flex-direction: column; gap: 14px; max-width: 100%; margin: 24px auto 0; }
.lp-compare-item { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border, #E5E7EB); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.lp-compare-bad, .lp-compare-good { padding: 16px 18px; font-size: 14px; }
.lp-compare-bad { color: #94A39C; background: #F7F9F8; border-right: 1px solid var(--border, #E5E7EB); }
.lp-compare-good { color: #0B5642; background: #E4F0EA; }

/* 「为什么叫守候」——三大卖点：越用越懂你 / 不会离开你 / 陪你往前走 */
.lp-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 30px; }
.lp-why-item { background: var(--surface, #fff); border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius, 16px); padding: 24px 22px; }
.lp-why-num { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--accent, #C2410C); margin-bottom: 10px; }
.lp-why-item h3 { font-size: 17px; margin: 0 0 10px; }
.lp-why-item p { font-size: 14px; color: var(--text-muted); margin: 0; }

.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.lp-card { background: var(--bg-alt, #F4F9F6); border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius, 12px); padding: 20px; }
/* 交替：白底区块用浅绿卡片，浅绿区块用白卡片 —— 靠绿的深浅分层次，不引入新颜色相 */
.lp-section-alt .lp-card { background: var(--surface, #fff); }
/* 常见问题现在落在浅绿区块上，条目默认底色也是浅绿 → 会糊成一片，一并反转 */
.lp-section-alt .lp-faq details { background: var(--surface, #fff); }
.lp-card-icon { font-size: 22px; line-height: 1; margin-bottom: 8px; }
.lp-card h3 { font-size: 15px; margin: 0 0 6px; }
.lp-card p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* 四项要排在同一行 —— minmax 上限必须 ≤ (容器 1000px − 3×间距 20px) / 4 = 235px，
   290px 时第 4 项会被挤到第二行 */
.lp-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 26px; }
.lp-point { border-left: 3px solid var(--primary); padding: 2px 0 2px 16px; }
.lp-point h3 { font-size: 16px; margin: 0 0 6px; }
.lp-point p { font-size: 14px; color: var(--text-muted); margin: 0; }

.lp-scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 26px; }
.lp-scene { background: var(--bg-alt, #F4F9F6); border: 1px solid var(--border, #E5E7EB); border-radius: var(--radius, 12px); padding: 20px; }
.lp-scene h3 { font-size: 15px; margin: 0 0 8px; }
.lp-scene p { font-size: 14px; color: var(--text-muted); margin: 0; }

.lp-faq { max-width: 780px; margin: 22px auto 0; }
.lp-faq details { background: var(--bg-alt, #F4F9F6); border: 1px solid var(--border, #E5E7EB); border-radius: 14px; padding: 15px 18px; margin-bottom: 10px; }
.lp-faq summary { cursor: pointer; font-size: 15px; font-weight: 500; }
.lp-faq p { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }

/* 「关于守候工作台」区块 2026-09-21 按兵哥要求整段移除，此处原样式一并去掉 */

/* CTA + 客服二维码同排（2026-09：原独立「联系我们」区块并入此处，二维码放右侧） */
.lp-cta { padding: 52px 0; text-align: center; background: var(--primary); }
.lp-cta-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 60px; }
.lp-cta-main { flex: 0 1 auto; }
.lp-cta h2 { font-size: 22px; margin: 0 0 22px; color: #fff; }
/* 反色按钮：绿底上放白按钮，避免「绿底绿按钮」看不见 */
.lp-cta .btn-primary { background: #fff; color: var(--primary); border: 1px solid #fff; }
.lp-cta .btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--primary-dark); }
.lp-cta-contact { flex: 0 0 auto; }
.lp-cta-contact-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .5px; color: #fff; }
.lp-cta-contact img { width: 132px; height: 132px; border-radius: 10px; display: block; background: #fff; }

.lp-footer { padding: 26px 0 32px; text-align: center; color: var(--text-muted); font-size: 13px; background: var(--surface, #fff); border-top: 1px solid var(--border, #E5E7EB); }
.lp-footer p { margin: 0; }
/* 只剩备案一行（品牌行与登录/注册行已删），灰度再压淡一档，不抢正文视线 */
.lp-footer-copy { font-size: 12.5px; color: #A6B3AC; }
/* 页脚两行之间的间距（2026-09-14：加协议/隐私入口后拆成两行，默认 margin:0 会贴在一起） */
.lp-footer-copy + .lp-footer-copy { margin-top: 7px; }
.lp-footer-sep { margin: 0 7px; color: #CBD5CF; }
.lp-footer a { color: #A6B3AC; }
.lp-footer a:hover { color: var(--text-muted); }

@media (max-width: 768px) {
  .lp-hero { padding: 44px 0 36px; }
  .lp-hero h1 { font-size: 26px; letter-spacing: 0; }
  .lp-hero-sub { font-size: 14.5px; }
  /* 窄屏把强制换行取消：留着会让第一段折行后剩余的零星字单独占一行 */
  .lp-hero-sub br { display: none; }
  .lp-section { padding: 38px 0; }
  .lp-section h2 { font-size: 20px; }
  /* 导航里只剩「登录 / 免费注册」两个按钮（2026-09 去掉五个锚点链接），
     原先隐藏 .lp-nav-links a:not(.btn) 的规则已无用 */
  .lp-nav-links { gap: 10px; }
  .lp-compare-item { grid-template-columns: 1fr; }
  .lp-compare-bad { border-right: none; border-bottom: 1px solid var(--border, #E5E7EB); }
  .lp-cards { grid-template-columns: 1fr 1fr; }
  .lp-card { padding: 14px; }
  .btn-lg { padding: 12px 20px; font-size: 14.5px; }
  .lp-cta h2 { font-size: 18px; }
  .lp-h1-eyebrow { font-size: 13px; letter-spacing: 1.5px; margin-bottom: 8px; }
  .lp-why { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .lp-why-item { padding: 18px 16px; }
  /* 桌面上四项同排（auto-fit 自己算够），窄屏主动降到两列，别让 auto-fit 排成三列细长条 */
  .lp-points { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ===== 落地页改版（2026-09-21 兵哥定）：免费试用红色呼吸 CTA + 首屏数字条 + AI 公司街区 =====
   ⚠️ 红色用 **胭脂红 #EF475D** —— 与工作台内「待办状态条 / 前 N 计数」同一个红，
      不引入新色相；整页仍保持「墨绿主色 + 橙点缀 + 白/浅绿底」。
   ⚠️ 呼吸动效只动 transform 与 box-shadow（不进布局，不会顶动旁边按钮），
      并在 prefers-reduced-motion 下整段关闭（沿本文件已有的无障碍惯例）。 */

/* 首屏主标题再放大一档（桌面），衬出视觉重心 */
.lp-hero h1 { font-size: 42px; letter-spacing: -.6px; }
.lp-hero-sub { font-size: 16.5px; line-height: 1.85; }

/* 促销标语（兵哥原话：4+1=1？少喝 1 杯奶茶……）——胶囊形，与红色 CTA 同色系 */
.lp-promo {
  display: inline-block; margin: 0 0 22px; padding: 9px 18px;
  border-radius: 999px; background: #FFF1F2; border: 1px solid #FBD5DA;
  color: #B4293E; font-size: 15px; font-weight: 600; line-height: 1.5;
}
.lp-promo b { color: #D62A44; }

/* 「免费试用」红色按钮 + 呼吸光晕 */
.btn-free {
  background: #EF475D; color: #fff; border: 1px solid #EF475D; font-weight: 600;
  animation: freeBreath 2.4s ease-in-out infinite;
}
.btn-free:hover { background: #D93A50; border-color: #D93A50; color: #fff; opacity: 1; }
@keyframes freeBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 71, 93, .55); transform: scale(1); }
  50%      { box-shadow: 0 0 0 14px rgba(239, 71, 93, 0); transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) { .btn-free { animation: none; } }

/* 首屏数字条：第一眼就给量化的说服力 */
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 720px; margin: 34px auto 0; }
.lp-stat { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px; padding: 14px 10px; text-align: center; }
.lp-stat b { display: block; font-size: 24px; line-height: 1.15; color: var(--primary); }
.lp-stat span { font-size: 12.5px; color: var(--text-muted); }

/* 区块标题：标题下加一条短绿线，把层级拉开（只作用于 .lp-section，不影响绿底 CTA） */
.lp-section h2::after {
  content: ''; display: block; width: 42px; height: 3px; border-radius: 2px;
  background: var(--primary); margin: 14px auto 0; opacity: .85;
}

/* 卡片微交互：hover 轻微上浮（只动 transform/box-shadow，无布局抖动） */
.lp-card, .lp-why-item, .lp-scene { transition: transform .18s ease, box-shadow .18s ease; }
.lp-card:hover, .lp-why-item:hover, .lp-scene:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
/* 图标加浅绿圆角底，卡片不再只有一行 emoji */
.lp-card-icon {
  width: 38px; height: 38px; border-radius: 11px; background: #E4F0EA;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; margin-bottom: 10px;
}
/* AI 公司卡：浅绿描边 + 「新」标，在 12 张卡里第一眼被看到 */
.lp-card-hot { background: #fff; border-color: #BFDCCF; box-shadow: 0 2px 10px rgba(15, 110, 86, .07); }
.lp-tag-new {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #EF475D; color: #fff; font-size: 11px; font-weight: 600; vertical-align: 2px;
}

/* AI 公司独立街区：整块做成一张浅绿面板，与上下白色区块区分开 */
.lp-section-company { background: var(--surface); padding: 8px 0 56px; }
.lp-section-company .lp-wrap {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 22px;
  padding: 34px 26px; max-width: 988px;
}
.lp-section-company .lp-points { margin-top: 0; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 22px 0 28px; }
.lp-chip {
  padding: 7px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); font-size: 13.5px; color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
}
.lp-chip:hover { transform: translateY(-2px); border-color: var(--primary); }
.lp-chip-fun { background: #FFF7ED; border-color: #FBE3C8; color: var(--accent); }

@media (max-width: 768px) {
  .lp-hero h1 { font-size: 27px; letter-spacing: 0; }
  .lp-hero-sub { font-size: 14.5px; line-height: 1.8; }
  .lp-promo { font-size: 13.5px; padding: 8px 14px; margin-bottom: 18px; }
  /* 手机上主 CTA 占满整行，红色按钮更好点 */
  .lp-hero-actions { flex-direction: column; align-items: center; }
  .lp-hero-actions .btn-free { width: 100%; }
  .lp-stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
  .lp-stat { padding: 12px 8px; }
  .lp-stat b { font-size: 21px; }
  .lp-section-company { padding: 0 0 40px; }
  .lp-section-company .lp-wrap { padding: 24px 16px; border-radius: 18px; }
  .lp-chips { gap: 7px; margin: 18px 0 22px; }
  .lp-chip { padding: 6px 12px; font-size: 12.5px; }
}

/* ===== 品牌 LOGO 图片（2026-09）：容器本身已有圆角与底色，图片铺满即可 =====
   注意 object-fit: cover + border-radius: inherit —— 这样深色侧边栏上的白底 logo
   会被裁进圆角容器里，不会露出直角白边。 */
.brand-logo img, .lp-logo img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; border-radius: inherit;
}

/* 原「联系我们」独立区块已并入 .lp-cta（2026-09，二维码移到 CTA 右侧），
   .lp-contact* 那套样式随之作废；这里只留窄屏下的排布微调 */
@media (max-width: 768px) {
  .lp-cta { padding: 40px 0; }
  .lp-cta-inner { flex-direction: column; gap: 30px; }
  .lp-cta-contact img { width: 150px; height: 150px; }
}
@media (max-width: 480px) {
  .lp-cards { grid-template-columns: 1fr; }
  .lp-points { grid-template-columns: 1fr; }
}

/* ===== 添加到桌面（PWA，2026-09）=====
   走品牌墨绿系（与侧边栏、落地页同色），**不用**页面内的靛蓝 --primary ——
   这是面向用户的「品牌动作」，不是页面内的普通操作。
   ⚠️ 顶部提示条已于 2026-09-17 下线（移动端占 134px 挤压对话区、转化无意义），
      安装入口只剩左侧导航的「📲 下载本地」。 */

/* 侧边栏入口：沿用 .nav-item 皮肤，加一条分隔线示意「工具类」 */
.nav-install { margin-top: 6px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,0.14); }

/* 引导弹窗 */
.pwa-steps { display: flex; flex-direction: column; gap: 13px; margin-top: 8px; }
.pwa-step { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.65; color: var(--text); }
.pwa-step-n {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: #0F6E56; color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.pwa-share { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin: 0 2px; }
.pwa-share svg { display: block; }
/* 电脑版 Edge / Chrome：拿不到系统安装事件时（首次访问常见）给的操作说明 */
.pwa-guide-lead {
  font-size: 13.5px; line-height: 1.65; color: var(--text);
  background: var(--bg-alt, #F4F9F6); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
}
.pwa-guide-note {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.6; color: var(--text-muted);
}

/* ===== 性格专属兜底头像色（2026-09-13 定：冷静绿 / 暖心橙 / 幽默红 / 犀利蓝）=====
   仅在【未上传自定义头像】时由模板/JS 挂上 pa-{key} 类；有自定义头像时挂 img，不挂类。
   旧消息（persona 为空）不挂类 → 仍用默认主色，符合"旧消息不管"的既定策略。 */
.msg.assistant .msg-avatar.pa-rational, .persona-avatar.pa-rational,
.persona-cap-ava.pa-rational, .persona-opt-ava.pa-rational {
  background: #47a26b; color: #fff;
}
.msg.assistant .msg-avatar.pa-healing, .persona-avatar.pa-healing,
.persona-cap-ava.pa-healing, .persona-opt-ava.pa-healing {
  background: #f2913d; color: #fff;
}
.msg.assistant .msg-avatar.pa-humorous, .persona-avatar.pa-humorous,
.persona-cap-ava.pa-humorous, .persona-opt-ava.pa-humorous {
  background: #e25c5c; color: #fff;
}
.msg.assistant .msg-avatar.pa-sharp, .persona-avatar.pa-sharp,
.persona-cap-ava.pa-sharp, .persona-opt-ava.pa-sharp {
  background: #4d8fd6; color: #fff;
}

/* ===== 性格切换"上线提示"（2026-09-13 定）：对话框内浅灰居中一行，仅前端展示不入库 ===== */
.chat-arrive {
  text-align: center;
  color: #9aa3ad;
  font-size: 12.5px;
  margin: 10px 0 6px;
  animation: arriveFade .5s ease;
}
@keyframes arriveFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* 侧边栏版本号（2026-09-13 定：下载本地下方灰色小字） */
.sidebar-version { font-size: 11px; color: var(--text-muted, #9aa79c); padding: 6px 18px 2px; letter-spacing: .3px; user-select: text; }
/* 联系客服二维码（2026-09-13 定：助理设置底部右侧） */
.kefu-card { margin: 20px 0 4px auto; width: 148px; text-align: center; }
.kefu-card img { width: 148px; height: 148px; border-radius: 10px; border: 1px solid #E3EDDF; display: block; background: #fff; }
.kefu-note { margin-top: 6px; font-size: 12px; color: var(--text-muted, #8a9a8e); }
@media (max-width: 768px) { .kefu-card { margin-right: auto; } }

/* ============ 注册页：协议与年龄确认（2026-09-14 新增） ============ */
.agree-box { margin: 2px 0 14px; padding: 12px 14px; background: var(--bg-alt, #F8FAFC);
  border: 1px solid var(--border); border-radius: 10px; }
.agree-row { display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.agree-row + .agree-row { margin-top: 9px; }
.agree-row input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px;
  accent-color: var(--primary); cursor: pointer; }
.agree-row b { color: var(--primary); font-weight: 600; }
.agree-row a { color: var(--primary); text-decoration: none; }
.agree-row a:hover { text-decoration: underline; }
@media (max-width: 768px) { .agree-row { font-size: 12.5px; } }

/* ============ 协议 / 隐私政策页面（2026-09-14 新增） ============ */
.legal-body { background: var(--surface); color: var(--text); }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.legal-nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.legal-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; }
.legal-brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600;
  color: var(--text); text-decoration: none; }
.legal-logo { width: 28px; height: 28px; border-radius: 9px; background: var(--sidebar-bg, #0F6E56);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.legal-back { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.legal-back:hover { color: var(--primary); }

.legal-main { padding: 34px 20px 8px; }
.legal-h1 { font-size: 26px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -.3px; }
.legal-meta { font-size: 12.5px; color: var(--text-muted); margin: 0 0 26px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border); }

.legal-doc { font-size: 14.5px; line-height: 1.85; color: #334155; }
.legal-doc h2 { font-size: 16px; color: var(--text); margin: 28px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--sidebar-bg, #0F6E56); line-height: 1.5; }
.legal-doc h3 { font-size: 14.5px; color: var(--text); margin: 18px 0 8px; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc strong { color: #0F172A; font-weight: 600; }
.legal-doc ol, .legal-doc ul { margin: 0 0 12px; padding-left: 22px; }
.legal-doc li { margin-bottom: 7px; }
.legal-lead { background: var(--primary-light, #EEF2FF); border-radius: 10px; padding: 14px 16px;
  font-size: 13.5px; line-height: 1.8; color: #334155; }
.legal-table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 13px; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 9px 11px;
  text-align: left; vertical-align: top; line-height: 1.65; }
.legal-table th { background: var(--gray-bg, #F1F5F9); font-weight: 600; color: var(--text); white-space: nowrap; }
.legal-table strong { color: #0F172A; }

.legal-foot { display: flex; align-items: center; gap: 20px; justify-content: space-between;
  background: var(--bg-alt, #F8FAFC); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin: 34px 0 10px; font-size: 13px; color: var(--text-muted); }
.legal-foot-text p { margin: 0 0 5px; }
.legal-foot-text p:last-child { margin-bottom: 0; }
.legal-foot-links a { color: var(--primary); text-decoration: none; }
.legal-foot-links a:hover { text-decoration: underline; }
.legal-qr { width: 92px; height: 92px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; display: block; flex: 0 0 auto; }

.legal-bottom { border-top: 1px solid var(--border); margin-top: 18px; padding: 18px 0 30px;
  font-size: 12.5px; color: var(--text-muted); text-align: center; }
.legal-bottom a { color: var(--text-muted); }

@media (max-width: 768px) {
  .legal-main { padding: 24px 16px 6px; }
  .legal-h1 { font-size: 21px; }
  .legal-doc { font-size: 14px; }
  .legal-doc h2 { font-size: 15.5px; margin-top: 24px; }
  /* 表格在窄屏横向滚动，不挤压内容 */
  .legal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .legal-table td { white-space: normal; min-width: 130px; }
  .legal-foot { flex-direction: column; align-items: flex-start; }
  .legal-qr { width: 84px; height: 84px; }
}

/* ============ 项目详情：内联编辑（2026-09-15 新增） ============ */
.edit-panel {
  margin-top: 14px; padding: 14px 15px; text-align: left;
  background: var(--bg-alt, #F8FAFC);
  border: 1px solid var(--border); border-radius: 10px;
}
.edit-panel .edit-field { margin-bottom: 10px; }
.edit-panel .edit-field:last-child { margin-bottom: 0; }
/* 想法项内的编辑面板与上面的内容区分开，减少误读 */
.idea-item .edit-panel { margin-top: 4px; }
.edit-req { color: var(--danger, #DC2626); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.edit-grid .edit-field { margin-bottom: 0; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* 想法：状态下拉 + 编辑/删除 同一行右对齐 */
.idea-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.idea-foot .idea-status { align-self: center; }
.idea-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
  /* 头部两个按钮（编辑/删除）在窄屏换行，避免挤压项目名 */
  .project-head { flex-wrap: wrap; }
  .project-actions { width: 100%; justify-content: flex-end; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-actions { justify-content: stretch; }
  .edit-actions .btn { flex: 1; }
  .idea-foot { justify-content: space-between; }
  .idea-actions { gap: 6px; }
}

/* ============ 蒂芙尼蓝「录入区」版块（2026-09-16 立，2026-09-20 加深） ============
   给各模块的「添加 / 记录」类卡片统一底色，把「操作区」和「数据区」在视觉上分开。
   配色：底色 #7ED4CE（蒂芙尼蓝）· 按钮 #0FA8A0（同色系实心）· 深一档文字 #0B4F4B。
   为什么单独起 .tif-card 而不改各页自己的类：6 个模块分属 6 个模板 + 财务另有独立
   finance.css，统一挂一个类最省维护，日后调色只改这一段。

   ⚠️ 2026-09-20 兵哥定：底色由浅薄荷 #E8F7F5 加深到 #7ED4CE（「其它版块同款浅蓝区域一起改」）。
      **底色一加深，卡内三样必须连带改**，只改底色＝白改：
      ① 边框 / 虚线 #B7E5DF、#CDEBE6、#9FDCD6 → **#5FBDB6**（旧色落新底只剩 1.0~1.25，等于没边框）
      ② 卡内次要文字 var(--text-muted) → **#0B4F4B**（灰字在 #7ED4CE 上只有 2.76，远低于 4.5）。
         六个页面的标签类名各不相同，见下方「卡内次要文字」那条合并规则。
         ⚠️ 别把 `--text-muted` 当成 #6B7C74 —— 那个值只属于**落地页 `.lp-body`**（2239 行），
             应用内部用的仍是 :root 的 **#64748B**（两个值都糊，但改色前必须以应用内的为准）
      ③ 主按钮 #0FA8A0 **保留**：对新底对比 1.71，仍分得开。
         （若日后底色再深到标准蒂芙尼蓝 #0ABAB5，对比只剩 1.22 会"隐身"，那时按钮换 #0C8D86）
   ⚠️ 财务「记一笔」另有 `.fin-add.tif-card` 一组同名值规则 —— **不是冗余，别删**：
      `.fin-add`（0-1-0）在 finance.css 里是白底，必须靠 `.fin-add.tif-card`（0-2-0）
      抬特异性才压得住它。 */
.tif-card { background: #7ED4CE; border-color: #5FBDB6; }
.tif-card .card-header { border-bottom-color: #5FBDB6; }
.tif-card input, .tif-card select, .tif-card textarea { background: #fff; }
/* 卡片内按钮：主按钮换成蒂芙尼蓝，描边按钮换同色系描边。
   特异性高于 .btn-* / .fin-btn，所以即使 finance.css 在 style.css 之后加载也能覆盖。 */
.tif-card .btn-primary { background: #0FA8A0; border-color: #0FA8A0; color: #fff; }
.tif-card .btn-primary:hover { background: #0C8D86; border-color: #0C8D86; }
.tif-card .btn-primary:disabled { background: var(--gray); border-color: var(--gray); }
.tif-card .btn-outline { background: rgba(255, 255, 255, .72); border-color: #5FBDB6; color: #0B7F79; }
.tif-card .btn-outline:hover { background: #fff; border-color: #0FA8A0; color: #0C8D86; }
/* 知识库录入区那颗「添加」按钮（2026-09-20 兵哥定）：文案由「✨+我的知识库」改为「添加」，
   底色换成与「搜索」按钮同款淡蓝（#E0E7FF / 字 #4338CA）。
   ⚠️ 必须写 3 个类（.tif-card .btn.kb-add-btn = 0-3-0）才压得住上面 `.tif-card .btn-primary`
      那条蒂芙尼蓝（0-2-0）；hover / disabled 一并接管，避免按下时又回青色。 */
.tif-card .btn.kb-add-btn,
.tif-card .btn.kb-add-btn:disabled { background: #E0E7FF; border-color: #C7D2FE; color: #4338CA; opacity: 1; }
.tif-card .btn.kb-add-btn:hover { background: #C7D2FE; border-color: #C7D2FE; color: #4338CA; }
.tif-card .att-btn { background: rgba(255, 255, 255, .72); border-color: #5FBDB6; color: #0B7F79; }
.tif-card .att-btn:hover { background: #fff; border-color: #0FA8A0; color: #0C8D86; }
.tif-card .td-manual-toggle { color: #0B4F4B; }
.tif-card .td-form { border-top-color: #5FBDB6; }
.tif-card .td-add-input:focus { border-color: #0FA8A0; box-shadow: 0 0 0 3px rgba(15, 168, 160, .14); }
/* 卡内次要文字：底色加深到 #7ED4CE 后，var(--text-muted)（应用内 = #64748B）只剩 2.76 对比度
   （远低于 4.5），六个页面的标签/说明会一起糊。这里按「各页实际用到的类」合并压深到 #0B4F4B（5.46，达标）。
   ⚠️ 三处必须带 :not()，否则会顶掉它们自己的状态色（同特异性、本段在后面加载）：
      .kb-chars.is-over（超字数变红）· .kb-msg.is-err（报错变红）
      .td-mode-btn 的 hover/.active（变主色）—— 已在下面显式补回。
   ⚠️ 日后新增录入卡，若卡内直接躺在底色上的文字用了 var(--text-muted)，记得加进这条列表；
      改完请跑探针自检（会扫出对比度 <4.5 的残留）。 */
.tif-card .muted,
.tif-card .kb-chars:not(.is-over),
.tif-card .kb-msg:not(.is-err),
.tif-card .rel-summary-empty,
.tif-card .hk-tip,
.tif-card .td-mode-btn,
.tif-card .td-field span,
.tif-card .td-note,
.tif-card .hl-hint,
.tif-card .hl-label,
.tif-card .hl-check,
.tif-card .hl-empty span,
.tif-card .fin-fl > span,
.tif-card .fin-check,
.tif-card .fin-hint { color: #0B4F4B; }
.tif-card .td-mode-btn:hover,
.tif-card .td-mode-btn.active { color: var(--primary); }
/* 待办：手动表单现在排在首位，去掉多余的顶部分隔线 */
.td-add-card #tdManualForm { margin-top: 4px; padding-top: 0; border-top: none; }
/* 财务「记一笔」：它本身不是 .card，是一行工具条。
   2026-09-20 兵哥定：底色加深到蒂芙尼蓝 #7ED4CE；同日「其它版块同款浅蓝区域一起改」，
   **全局 `.tif-card` 已同步为同值**（见上方那段），所以这里不再是"只有财务才深"。
   那为什么还留着这几条？—— 唯一的理由就是**抬特异性**：
     finance.css 的 `.fin-add`（0-1-0）是白底，与本段的 `.tif-card`（0-1-0）同特异性，
     谁生效取决于加载顺序；写成 `.fin-add.tif-card`（0-2-0）才能稳定压住它。**别删。**
   三套账共用 .fin-add，改此即三处生效；作用域都带 .fin-add，不会外溢到其它页面。 */
.fin-add.tif-card { background: #7ED4CE; border-color: #5FBDB6; }
.fin-add.tif-card .fin-add-more { border-top-color: #5FBDB6; }
.fin-add.tif-card .fin-fl > span,
.fin-add.tif-card .fin-check,
.fin-add.tif-card .fin-hint { color: #0B4F4B; }
.fin-add.tif-card .fin-btn { background: #0FA8A0; border-color: #0FA8A0; color: #fff; }
.fin-add.tif-card .fin-btn:hover { background: #0C8D86; border-color: #0C8D86; }
.fin-add.tif-card .fin-btn-ghost { background: rgba(255, 255, 255, .72); border-color: #5FBDB6; color: #0B7F79; }
.fin-add.tif-card .fin-btn-ghost:hover { background: #fff; border-color: #0FA8A0; color: #0C8D86; }
/* 知识库：空间占用行 */
/* ⚠️ .kb-space 已停用（2026-09-20 兵哥定）：空间占用搬去顶栏（.kb-topbar），
   原内容区顶部那条「📚 你的第二大脑」说明条（.kb-intro / .kb-intro-t / .kb-intro-p）
   整块删除。这几条规则留着只为万一回退，当前模板已不再引用。 */
.kb-space {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-muted);
}
.kb-space b { color: var(--primary); font-weight: 600; }

/* ============ 知识库：顶栏说明 + 空间占用（2026-09-20 兵哥定） ============
   这两项原先在内容区顶部一条说明条里，现搬到**顶栏中区** —— 与「到期 / 剩余次数」
   同一档：淡灰 13px、"看一眼就走"，不跟正文主内容抢注意力。
   空间占用去掉了「空间占用」四个字（顶栏窄），只留「💾 已用 / 配额」。
   ⚠️ 窄屏（≤768px）顶栏中区独占一行（.topbar-center 在 1318 行的媒体查询里
      order:3 / width:100%），此时允许文字换行 —— 别改成 nowrap，会被截成省略号。 */
.kb-topbar {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; line-height: 1.5; color: var(--gray);
  max-width: 100%; min-width: 0; white-space: nowrap;
}
.kb-topbar .kbt-text { overflow: hidden; text-overflow: ellipsis; }
.kb-topbar .kbt-space { flex: none; white-space: nowrap; opacity: .9; }
@media (max-width: 768px) {
  .kb-topbar { width: 100%; justify-content: flex-end; flex-wrap: wrap;
               gap: 2px 8px; white-space: normal; }
  .kb-topbar .kbt-text { white-space: normal; }
}

/* 知识库「收藏 / 记录」卡（#kbAddCard）：底色统一走 .tif-card 蒂芙尼蓝 #7ED4CE
   —— 与待办页「📝 添加待办」卡同款（定义见上方 `.tif-card` 那段）。
   墨绿底的来回：2026-09-20 先按兵哥要求试过左侧导航同款 #0F6E56，他反馈「太亮、跟导航
   看着不一致」；但实测两处 computed 色值**完全相同**（都是 rgb(15,110,86)），
   属大面积平铺饱和绿 + 满屏白输入框造成的视觉膨胀 ⇒ 已废除。原那组 `.kb-add-card`
   规则（绿底/白字/主按钮反转/预览浮层反色，共 42 行）同日删除；日后若要做墨绿卡，
   照抄仍在用的 `.ai-persona-card`（绿底 + 白字 + 内控件白底深字）即可。 */

/* ===== 知识库版块（2026-09-16 兵哥定）：标题横排胶囊签 + 每页 10 条上下页翻页 =====
   签/翻页的视觉主体直接复用上面 .mem-tabs / .mem-tab / .mem-pager 那一组规则，
   这里只补知识库独有的两处，日后调色改上面那一处即可全局生效。 */
.kb-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
@media (max-width: 768px) {
  .kb-tabs { gap: 6px; }
  .kb-tab { font-size: 13px; padding: 6px 10px; }
  .kb-pager { gap: 8px; }
  .kb-pager .pg-info { font-size: 12.5px; }
}

/* ============ 系统设置页：我的订阅 + 收费标准（2026-09-17 新增） ============ */
.sub-grid { display: flex; gap: 12px; margin: 4px 0 14px; }
.sub-cell {
  flex: 1 1 0; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.sub-num { font-size: 26px; font-weight: 700; color: #0E9C93; line-height: 1.2; }
.sub-unit { font-size: 14px; font-weight: 600; margin-left: 3px; color: var(--text-muted); }
.sub-lab { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
.sub-bar { height: 8px; border-radius: 999px; background: #E9EEF5; overflow: hidden; }
.sub-bar-in { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0FA8A0, #17BCB0); }
.sub-meta { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.sub-alert {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px; font-size: 13.5px;
  background: var(--red-bg); border: 1px solid #FBD5D5; color: #B42318;
}
.sub-note { margin-top: 12px; font-size: 13px; line-height: 1.8; color: var(--text-muted); }
/* 试用期「资讯定制」免计说明（2026-09-17 兵哥定）：浅底高亮单独一条，
   目标是让新用户一眼看到「这条不扣次数」，不会误以为被偷了 1 次。 */
.sub-gift {
  margin-top: 8px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.8;
  background: var(--primary-light); color: var(--primary-dark);
}
/* 订阅规则里必须被看见的两句（兵哥 2026-09-17 定：加粗 + 略加大 + 标红） */
.warn-strong { color: #D93025; font-weight: 700; font-size: 1.08em; }

/* 价格卡 · 样式 C：年付主推横条 + 三副卡 */
.price-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #0E9C93 0%, #17BCB0 100%);
  box-shadow: 0 8px 22px rgba(15, 168, 160, 0.22);
}
.price-hero-tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  background: rgba(255, 255, 255, 0.22); margin-bottom: 7px;
}
.price-hero-name { font-size: 15px; font-weight: 600; opacity: 0.95; }
.price-hero-price { margin-top: 2px; line-height: 1.1; }
.price-hero-price .price-cur { font-size: 18px; font-weight: 600; vertical-align: 8px; }
.price-hero-price .price-num { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.price-hero-price .price-per { font-size: 13.5px; opacity: 0.85; margin-left: 4px; }
.price-hero-sub { margin-top: 6px; font-size: 12.5px; opacity: 0.9; }
.price-hero-right { text-align: right; flex: 0 0 auto; }
.price-hero-quota { font-size: 30px; font-weight: 800; line-height: 1.1; }
.price-hero-quota-lab { font-size: 12.5px; opacity: 0.85; }
.price-hero-save {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #fff; color: #0E9C93;
}
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.price-card {
  border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px;
  background: var(--surface); transition: border-color 0.15s ease, transform 0.15s ease;
}
.price-card:hover { border-color: #9FDDD6; transform: translateY(-1px); }
.price-card-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.price-card-price { margin-top: 4px; font-size: 25px; font-weight: 800; color: var(--text); line-height: 1.15; }
.price-card-price .price-cur { font-size: 14px; font-weight: 600; margin-right: 1px; }
.price-card-per { font-size: 12.5px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.price-card-quota { margin-top: 4px; font-size: 13.5px; color: #0E9C93; }
.price-card-quota b { font-size: 15px; }
.price-card-sub { margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.price-rules { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.price-rule {
  font-size: 13px; line-height: 1.7; color: var(--text-muted);
  background: var(--bg); border-radius: 10px; padding: 9px 13px;
}
.price-rule-k { color: var(--text); font-weight: 600; margin-right: 6px; }
/* 客服二维码居中版（系统设置页收尾用；助理设置页那份是右下角，保留原样） */
.kefu-card.kefu-center { margin: 20px auto 4px; }

@media (max-width: 768px) {
  .sub-num { font-size: 23px; }
  .sub-note { font-size: 12.5px; }
  .sub-gift { font-size: 12.5px; padding: 8px 10px; }
  .price-hero { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 18px; }
  .price-hero-right { text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 10px; }
  .price-hero-price .price-num { font-size: 32px; }
  .price-hero-quota { font-size: 24px; }
  .price-grid { grid-template-columns: 1fr; }
}

/* ============ 设置页：客服二维码 + 建议反馈并排（2026-09-17 新增） ============ */
/* 二维码在左、反馈框在右，整体居中。移动端改为上下堆叠且**保持原顺序**
   （二维码在上）—— 它是订阅转化的入口，不该被表单挤到下面去。 */
.kefu-row { display: flex; gap: 18px; align-items: flex-start; justify-content: center;
  margin: 20px 0 4px; flex-wrap: wrap; }
.kefu-row .kefu-card { margin: 0; }
.feedback-card { flex: 1 1 320px; max-width: 470px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; }
.feedback-head { font-size: 15px; font-weight: 600; }
.feedback-sub { margin: 3px 0 10px; font-size: 12.5px; color: var(--text-muted); }
.feedback-card textarea { min-height: 92px; resize: vertical; font-size: 14px; }
.feedback-card input[type="text"] { margin-top: 8px; }
.feedback-foot { display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 10px; }
.feedback-hint { font-size: 12px; color: var(--text-muted); }

@media (max-width: 768px) {
  .kefu-row { flex-direction: column; align-items: center; }
  .feedback-card { width: 100%; max-width: none; }
}

/* ============ 后台独立布局（2026-09-17 定：顶部 tab → 左侧导航，蒂芙尼蓝） ============ */
/* 配色为兵哥选定的方案 B。⚠️ 底色取 #0B7F7B 而非 #0E8E8A：两者同一色相、观感几乎一致，
   但白色文字的对比度从 3.99:1 提到 4.84:1 —— 跨过 WCAG AA 的 4.5:1 门槛，
   手机小屏上不发虚。要严格回到 #0E8E8A，只改下面 .admin-side 这一个值即可。
   在 .admin-layout 作用域内覆盖 --primary 系：后台的按钮/链接跟着变蒂芙尼蓝，
   **工作台前端完全不受影响**（变量作用域仅限本容器）。 */
.admin-layout {
  --primary: #0B7F7B; --primary-dark: #096A67; --primary-light: #E6F5F4;
  min-height: 100vh; background: var(--bg);
}
.admin-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 216px;
  background: #0B7F7B; color: #fff; display: flex; flex-direction: column; z-index: 60;
}
.admin-brand { padding: 17px 18px 14px; color: #fff; font-size: 16px; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.18); }
.admin-brand small { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 400;
  letter-spacing: 1px; color: rgba(255,255,255,0.7); }

.admin-nav { flex: 1; overflow-y: auto; padding: 10px 10px 14px; }
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  margin-bottom: 3px; border-radius: 9px; color: rgba(255,255,255,0.92);
  font-size: 14px; text-decoration: none; transition: background 0.15s; }
.admin-nav a:hover { background: rgba(255,255,255,0.14); color: #fff; opacity: 1; }
.admin-nav a.on { background: #fff; color: #0B7F7B; font-weight: 600; }
/* 导航分组标题（2026-09-21 起**暂无使用者**）：原「售后管理」分组已按兵哥要求去掉、
   其下唯一子项「意见反馈」升为平级。这条样式刻意保留 —— 以后再出现"一组挂多项"
   的场景（如客诉/退款跟进）可直接复用，不必重调间距与配色。
   ⚠️ 若确认长期不用，可连同 .admin-badge 之外的部分一起删；删前先 grep 模板。 */
.admin-nav-group { margin: 15px 12px 7px; font-size: 11.5px; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.58); }
.admin-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: #EF4444; color: #fff; font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; }

.admin-side-foot { padding: 12px 14px 14px; border-top: 1px solid rgba(255,255,255,0.18); }
.admin-logout { display: block; text-align: center; padding: 8px; margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; color: #fff;
  font-size: 13px; text-decoration: none; transition: background 0.15s; }
.admin-logout:first-child { margin-top: 0; }
.admin-logout:hover { background: rgba(255,255,255,0.16); color: #fff; opacity: 1; }
.admin-logout-warn { background: rgba(255,255,255,0.14); }

.admin-main { min-width: 0; margin-left: 216px; padding: 20px 22px 60px; }
.admin-main-inner { max-width: 1240px; margin: 0 auto; }
.admin-mask { display: none; position: fixed; inset: 0; z-index: 55;
  background: rgba(0,0,0,0.4); }
.admin-topbar { display: none; }

/* 后台「意见反馈」列表（2026-09-17 新增） */
.fb-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  margin-top: 10px; background: var(--surface); }
.fb-item.fb-new { background: #F3FBFA; border-color: #B9E5E2; }
.fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.fb-who { font-weight: 600; }
.fb-time { color: var(--text-muted); font-size: 12px; }
.fb-tag { background: #EF4444; color: #fff; font-size: 11px; padding: 1px 7px;
  border-radius: 8px; }
/* pre-wrap：保住用户自己敲的换行（textarea 里的回车在 HTML 里默认会被吞掉） */
.fb-body { margin-top: 8px; font-size: 14px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; }
.fb-contact { margin-top: 8px; font-size: 13px; color: var(--text-muted);
  background: var(--gray-bg); border-radius: 7px; padding: 6px 10px; display: inline-block; }
.fb-acts { display: flex; gap: 8px; margin-top: 11px; }
.fb-acts form { margin: 0; }
.fb-del { color: #C0392B; border-color: #F0B9B2; }
.fb-del:hover { background: #FEF2F2; border-color: #C0392B; color: #C0392B; }

@media (max-width: 768px) {
  /* 侧栏改抽屉：默认滑出屏幕外，点 ☰ 或遮罩切换（见 admin_base.html 的 adminToggleSide） */
  .admin-side { transform: translateX(-100%); transition: transform 0.22s ease; }
  .admin-side.open { transform: none; box-shadow: 0 0 26px rgba(0,0,0,0.35); }
  .admin-main { margin-left: 0; padding: 0 12px 44px; }
  .admin-topbar { display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 40; background: #0B7F7B; color: #fff;
    padding: 11px 14px; margin: 0 -12px 14px; }
  .admin-menu-btn { background: none; border: 0; color: #fff; font-size: 21px;
    line-height: 1; padding: 0 4px; cursor: pointer; }
  .admin-topbar .t { font-size: 15px; font-weight: 600; }
  .admin-mask.show { display: block; }
  .fb-acts { flex-wrap: wrap; }
}

/* ============ 系统公告弹窗（2026-09-17 定，多条逐条翻页） ============ */
/* 复用 .modal-mask / .modal-card 骨架，只补公告专属的列表与翻页 */
.notice-card { max-width: 460px; }
.notice-stage { min-height: 90px; }
.notice-item { }
.notice-meta { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; }
.notice-idx { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.notice-time { font-size: 12px; color: var(--text-muted); }
.notice-body { font-size: 14px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word; max-height: 46vh; overflow-y: auto; }
.notice-foot { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.notice-foot .btn { min-width: 84px; }
.notice-foot .btn-ghost { flex: 0 0 auto; }

/* ============ 后台系统设置：公告管理列表（2026-09-17 定） ============ */
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg, #fff); }
.ann-row.ann-off { opacity: 0.62; }
.ann-main { flex: 1; min-width: 0; }
.ann-content { font-size: 14px; line-height: 1.6; word-break: break-word; }
/* 公告 meta 现在有多项（状态/发布/生效/到期/已读数）→ 窄屏必须能折行，否则撑破卡片 */
.ann-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
            margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.ann-state { padding: 1px 8px; border-radius: 9px; font-weight: 600; }
.ann-state.on { background: #E6F6F4; color: #0B7F7B; }
.ann-state.off { background: #F1F3F2; color: #8A9690; }
/* 定时发布（2026-09-21）：未到点用琥珀色 —— 别和下架的灰混为一谈，
   "还没出去"和"手动关了"是两回事 */
.ann-state.wait { background: #FDF4E3; color: #9A6B1A; }
/* 到期自动失效：文案与"已下架"不同，兵哥能一眼分清是时间到了还是自己关的 */
.ann-state.expired { background: #EEF2F7; color: #6B7A8C; }
/* 发布 / 到期两个时间框（2026-09-21）：一行两个，窄屏自动各占一行（basis 220 触发换行） */
.ann-when-row { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.ann-when { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0;
            font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.ann-when input { flex: 1 1 auto; width: auto; min-width: 0; font-weight: 400; }
.ann-acts { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }
.ann-del { color: #C0392B; border-color: #F0B9B2; }
.ann-del:hover { background: #FEF2F2; border-color: #C0392B; color: #C0392B; }

/* ═════════════════ AI公司 · AI 办公室场景（2026-09-19 兵哥定稿 v3）═════════════════
   纯色 + 阴影立体感（禁渐变）；深蓝办公底、白机器人、琥珀点缀；
   动画只动 transform / opacity（零 JS 逐帧）；prefers-reduced-motion 全关；
   桌面（≥769px）zoom 1.2 整体放大铺满；移动端（≤768px）房间堆叠 + 工位 2×2，
   并整体压竖向高度（安卓 360×740 一屏放下，兵哥 9-19 反馈超长 81px）。
   Batch 1 = 演示版：派单/交付由前端脚本驱动（templates/office.html 底部）。 */
.office-page { max-width: 1500px; margin: 0 auto; }
/* AI公司页放开 content 宽度上限（9-19 兵哥：桌面左右空白太多） */
.office-wide .content { max-width: 1500px; }
@media (min-width: 769px) {
  /* zoom 整体缩放（内部绝对定位相对尺寸不变形），桌面元素放大 35%；
     min-height 除以 zoom 换算回局部坐标，让场景竖向铺满一屏 */
  .office-scene { zoom: 1.35; min-height: calc((100dvh - 108px) / 1.35); }
}

/* ---- 场景底盘：深海青（2026-09-19 兵哥选 B 方案，替换原深蓝 #0F4176）---- */
.office-scene {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "boss tea" "floor floor";
  gap: 10px;
  background: #0C3B4C;                 /* 办公场景深海青（B 方案） */
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 18px rgba(12,59,76,.25);
}
.room-boss  { grid-area: boss; }
.room-tea   { grid-area: tea; }
.room-floor { grid-area: floor; }

/* ---- 房间：立体凹陷（2026-09-19 兵哥定「较深的凹陷」）----
   内凹铁律：四边暗带、上沿最重；⛔不加外投影、⛔下沿不用白色受光带。
   底色比场景底盘 #0C3B4C 压深一档，靠暗带拉开深度。 */
.office-room {
  position: relative;
  display: flex; flex-direction: column;
  background: #093240;
  border: 1px solid rgba(3,22,30,.9);
  border-radius: 12px;
  padding: 30px 12px 12px;
  min-height: 168px;
  box-shadow:
    inset 0 5px 12px rgba(3,16,32,.60),
    inset 3px 0 9px rgba(3,16,32,.38),
    inset -3px 0 9px rgba(3,16,32,.38),
    inset 0 -3px 7px rgba(3,16,32,.30);
}

/* ---- 房间标签 ---- */
.office-tag {
  position: absolute; top: 8px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: #fff; padding: 2px 8px; border-radius: 999px;
}
.tag-amber { background: #C77F1B; }
.tag-blue  { background: #2E8CA8; }

/* ---- 名牌（工位/经理） ---- */
.office-plate {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.94); color: #0F3E50;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  position: relative; z-index: 5;
}
.office-plate b { font-size: 12px; }
.np-dot { width: 7px; height: 7px; border-radius: 50%; background: #37B26C; flex: 0 0 auto; }
.is-busy .np-dot { background: #E85D5D; animation: busyDot 1.1s ease-in-out infinite; }
@keyframes busyDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- 机器人（v3 造型：天线 + 圆头五官 + 身体 + 搭桌手臂）----
   配色走 CSS 变量：is-busy 时整体换浅红 + 转身（兵哥定：接单转身变红） */
.robot {
  --rb-fill: #F4F7FB; --rb-line: #C9D8E8; --rb-eye: #29465E;
  position: relative; display: inline-block;
  width: 46px; text-align: center;
  transform-origin: 50% 85%;
  transition: transform .6s ease;
  animation: robotBob 2.6s ease-in-out infinite;
  z-index: 2;
}
@keyframes robotBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.rb-antenna { display: block; width: 2px; height: 7px; margin: 0 auto; background: var(--rb-line); position: relative; }
.rb-antenna::after {
  content: ""; position: absolute; top: -5px; left: 50%; margin-left: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: #F5A623;
  animation: antBlink 2.6s ease-in-out infinite;
}
@keyframes antBlink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.rb-head {
  display: block; width: 34px; height: 26px; margin: 0 auto;
  background: var(--rb-fill); border: 1.5px solid var(--rb-line);
  border-radius: 11px 11px 8px 8px; position: relative;
}
.rb-eye { position: absolute; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: var(--rb-eye); }
.rb-eye:nth-of-type(1) { left: 9px; } .rb-eye:nth-of-type(2) { right: 9px; }
.rb-mouth { position: absolute; bottom: 5px; left: 50%; margin-left: -5px; width: 10px; height: 2px; border-radius: 2px; background: var(--rb-eye); opacity: .75; }
.rb-body {
  display: block; width: 40px; height: 26px; margin: 1px auto 0;
  background: var(--rb-fill); border: 1.5px solid var(--rb-line);
  border-radius: 7px 7px 9px 9px; position: relative;
}
/* ---- A总 专属（造型二 · 耳机款，2026-09-19 兵哥三选一拍板）----
   头带拱梁 + 两侧琥珀耳机罩 + 胸口小屏（替代原红领带）；
   员工机保持 v3 造型（天线+圆头）不动。 */
.robot-boss .rb-head { border-radius: 9px; }
.rb-band {
  position: absolute; top: -7px; left: -3px; right: -3px; height: 12px;
  border: 3px solid #F5A623; border-bottom: 0;
  border-radius: 14px 14px 0 0; pointer-events: none;
}
.rb-ear {
  position: absolute; top: 9px; width: 7px; height: 14px;
  border-radius: 3.5px; background: #F5A623;
}
.rb-ear.ear-l { left: -6px; } .rb-ear.ear-r { right: -6px; }
/* A总眼睛专用定位：头的 nth-of-type 被头带/耳机罩占位（nth-of-type 按 <i> 排序，
   9-19 换装后 .rb-eye 变成第 4/5 个 <i> 导致原选择器全部落空、眼睛消失——兵哥发现） */
.robot-boss .rb-eye { top: 10px; }
.rb-eye.pos-l { left: 11px; } .rb-eye.pos-r { right: 11px; }
.rb-screen::after {                   /* 胸口小屏 */
  content: ""; position: absolute; top: 8px; left: 50%; margin-left: -10px;
  width: 20px; height: 11px; border-radius: 3px; background: var(--rb-eye);
}
.rb-screen::before {                  /* 屏上琥珀进度线（压在小屏上层） */
  content: ""; position: absolute; top: 12px; left: 50%; margin-left: -6px;
  width: 12px; height: 2.5px; border-radius: 2px; background: #F5A623; z-index: 1;
}
.rb-arm { position: absolute; bottom: 2px; width: 9px; height: 16px; background: var(--rb-fill); border: 1.5px solid var(--rb-line); border-radius: 5px; }
/* ---- 员工红领带（2026-09-19 兵哥定：四员工=经理领带款、A总=耳机款）----
   ⚠️ v5 换装时此规则被连带误删、员工领带消失（兵哥 9-19 发现），现补回。
   只挂 .rb-tie（员工 rb-body 专用类）；A总 rb-body 是 .rb-screen，不受影响。 */
.rb-tie::after {
  content: ""; position: absolute; top: 3px; left: 50%; margin-left: -3px;
  width: 6px; height: 12px; background: #C0392B;
  clip-path: polygon(50% 0, 100% 22%, 72% 100%, 28% 100%, 0 22%);
}
.rb-arm.arm-l { left: 0; transform: rotate(14deg); }
.rb-arm.arm-r { right: 0; transform: rotate(-14deg); }

/* ---- busy（已派单）：转身背对 + 整体浅红 + 后脑中缝 ---- */
.is-busy .robot {
  --rb-fill: #F3B7B2; --rb-line: #DE918B; --rb-eye: #7A3B36;
  transform: rotateY(180deg);
  animation-play-state: paused;
}
.is-busy .rb-eye, .is-busy .rb-mouth { opacity: 0; }
.is-busy .rb-head::after {            /* 后脑中缝线：一眼看出"背对着你" */
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 50%;
  width: 1.5px; margin-left: -1px; background: var(--rb-line); border-radius: 2px;
}

/* ---- 显示器（屏 + 支架 + 底座）---- */
.monitor { display: block; width: 58px; margin: 0 auto; position: relative; z-index: 1; }
.mo-screen {
  display: block; height: 38px; background: #07293A;
  border: 2px solid #1F6B84; border-radius: 5px;
  padding: 5px 6px; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.45);
}
.mo-line { display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.38); width: 88%; }
.mo-line.l2 { width: 62%; margin-top: 4px; }
.mo-cursor { position: absolute; top: 6px; left: 8px; width: 5px; height: 8px; background: #63D68F; animation: cursorBlink 1s steps(1) infinite; }
@keyframes cursorBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.mo-stand { display: block; width: 8px; height: 9px; margin: 0 auto; background: #1F6B84; }
.mo-base  { display: block; width: 30px; height: 4px; margin: 0 auto; background: #1F6B84; border-radius: 2px; }
.mon-boss { width: 144px; }                        /* 9-19 兵哥定：双倍加大（原 72） */
.mon-boss .mo-screen { height: 92px; padding: 10px 12px; border-radius: 8px; }
.mon-boss .mo-line { height: 6px; border-radius: 3px; }
.mon-boss .mo-line.l2 { margin-top: 8px; }
.mon-boss .mo-cursor { top: 12px; left: 16px; width: 10px; height: 16px; }
.mon-boss .mo-stand { width: 16px; height: 18px; }
.mon-boss .mo-base { width: 60px; height: 8px; border-radius: 3px; }

/* busy 时屏幕换红色进度条（执行中） */
.mo-progress { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.14); opacity: 0; }
.mo-progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 42%; border-radius: 3px; background: #E85D5D; }
.is-busy .mo-progress { opacity: 1; animation: progressSlide 1.6s ease-in-out infinite; }
.is-busy .mo-cursor { display: none; }
@keyframes progressSlide { 0% { transform: translateX(-30%); } 100% { transform: translateX(140%); } }

/* ---- 桌面（工位桌板 / 经理大班台）---- */
.desk-top {
  display: block; height: 8px; width: 72px; margin: -6px auto 0;
  background: #1A7A96; border-radius: 3px;
  box-shadow: 0 3px 0 #10596F, 0 5px 8px rgba(0,0,0,.28);
  position: relative; z-index: 3;
}

/* ---- 总经理室布局：电脑 | 机器人+名牌 两列网格（9-19 兵哥定：
   机器人正居中、名牌在机器人下方；flex:1 让房间拉伸时内容垂直居中。
   09-21 兵哥定：上传入口移入 A总 对话订单卡，第三列留空保持居中） ---- */
.boss-zone {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; padding: 6px 0 8px; flex: 1;
}
.boss-center { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.boss-zone .mon-boss, .boss-zone .boss-side { justify-self: center; }
/* ---- A总 右侧：文件柜+绿植（2026-09-21 兵哥选方案B，填补三列网格空位）---- */
.boss-side { display: flex; align-items: flex-end; gap: 9px; padding-bottom: 4px; }
.boss-cabinet {
  width: 42px; height: 62px; background: #2E5B6E; border: 1.5px solid #4A8299;
  border-radius: 4px; padding: 4px; display: flex; flex-direction: column; gap: 3px;
}
.boss-cabinet i { flex: 1; background: #27505F; border-radius: 2px; position: relative; }
.boss-cabinet i::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  margin: -1px 0 0 -6px; background: #7FB2C6; border-radius: 1px;
}
.boss-plant { position: relative; width: 30px; height: 54px; transform-origin: 50% 100%; animation: plantSway 5.5s ease-in-out infinite; }
.boss-leaf { position: absolute; bottom: 19px; left: 50%; width: 13px; height: 24px; border-radius: 50%/62% 62% 38% 38%; }
.boss-leaf.lf-c { margin-left: -6.5px; background: #2A8F55; }
.boss-leaf.lf-l { margin-left: -15px; background: #37B26C; transform: rotate(-30deg); transform-origin: 50% 100%; }
.boss-leaf.lf-r { margin-left: 2px; background: #37B26C; transform: rotate(28deg); transform-origin: 50% 100%; }
.boss-rim { position: absolute; bottom: 15px; left: 50%; width: 28px; height: 6px; margin-left: -14px; background: #9C5F33; border-radius: 2px; }
.boss-pot { position: absolute; bottom: 0; left: 50%; width: 22px; height: 16px; margin-left: -11px; background: #B4713F; clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%); }
@keyframes plantSway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(2.2deg); } }
.boss-spot { background: none; border: 0; padding: 4px; cursor: pointer; position: relative; border-radius: 12px; }
.boss-spot:focus-visible { outline: 2px solid #F5A623; outline-offset: 2px; }
.robot-boss { width: 56px; animation-delay: .4s; }
.robot-boss .rb-head { width: 42px; height: 31px; }
.robot-boss .rb-body { width: 48px; height: 32px; }
.robot-boss .mo-line { width: 92%; }
.boss-ring { display: none; }   /* 2026-09-19 兵哥定：黄色虚线外框（原呼吸圈）去除 */
.boss-bubble {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  background: #0ABAB5; color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 9px; max-width: 86%;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); z-index: 8;
  animation: popIn .25s ease;
}
.boss-bubble::after {
  content: ""; position: absolute; bottom: -5px; left: 50%; margin-left: -5px;
  width: 10px; height: 10px; background: #0ABAB5; transform: rotate(45deg);
}
@keyframes popIn { from { opacity: 0; transform: translateX(-50%) translateY(4px) scale(.92); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }

/* ---- 茶室 · 交付区 ---- */
.room-tea { display: flex; flex-direction: column; }
.tea-table { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 4px 0 8px; }

/* 报价区（9-19 兵哥定：茶室右上方；确认下单后亮出扣除次数） */
.office-quote {
  position: absolute; top: 8px; right: 10px; z-index: 6;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  background: rgba(4,24,32,.72); border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; padding: 6px 10px 7px;
}
.oq-title { font-size: 10px; color: rgba(255,255,255,.75); letter-spacing: .5px; }
.oq-num { font-size: 20px; line-height: 1.15; color: #FFD98A; font-weight: 800; }
.oq-num::after { content: " 次"; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85); }
.oq-task { font-size: 10.5px; color: rgba(255,255,255,.85); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teapot {
  width: 34px; height: 22px; background: #E8EEF5; border: 1.5px solid #C9D8E8;
  border-radius: 6px 14px 8px 8px; position: relative;
}
.teapot::before { content: ""; position: absolute; right: -7px; top: 4px; width: 9px; height: 7px; border: 1.5px solid #C9D8E8; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.teapot::after { content: ""; position: absolute; left: 6px; top: -5px; width: 12px; height: 4px; background: #C9D8E8; border-radius: 3px; }
.teacup { width: 16px; height: 11px; background: #fff; border: 1.5px solid #C9D8E8; border-radius: 2px 2px 5px 5px; }
.steam { position: absolute; top: -12px; left: 50%; width: 2.5px; height: 9px; border-radius: 2px; background: rgba(255,255,255,.65); opacity: 0; animation: steamRise 2.4s ease-in-out infinite; }
.steam.s1 { margin-left: -6px; } .steam.s2 { margin-left: 3px; animation-delay: 1.2s; }
@keyframes steamRise { 0% { opacity: 0; transform: translateY(3px) scaleY(.7); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-9px) scaleY(1.15); } }

/* 交付货架「搞定请查收」 */
.office-shelf {
  margin-top: auto;
  background: rgba(4,24,32,.55);
  border: 1.5px dashed rgba(255,255,255,.35);
  border-radius: 9px; padding: 8px 10px; min-height: 64px;
}
.shelf-title { display: block; font-size: 11.5px; font-weight: 700; color: #FFD98A; letter-spacing: 1px; margin-bottom: 6px; }
.shelf-items { display: flex; flex-direction: column; gap: 6px; }
.shelf-item {
  display: flex; align-items: center; gap: 7px;
  background: #fff; border-radius: 7px; padding: 5px 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,.22);
  animation: itemPop .3s ease;
}
@keyframes itemPop { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
.si-name { flex: 1; font-size: 11px; color: #0F3E50; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-dl {
  flex: 0 0 auto; border: 0; cursor: pointer;
  background: #37B26C; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(55,178,108,.45);
  animation: dlGlow 1.8s ease-in-out infinite;
}
@keyframes dlGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(55,178,108,.45); } 50% { box-shadow: 0 0 0 5px rgba(55,178,108,0); } }

/* ---- AI办公区：4 工位 ---- */
.office-desks { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-content: center; }
.office-desk { text-align: center; padding-top: 18px; position: relative; cursor: pointer; }
.op-order {
  border: 0; cursor: pointer; background: #0F6E56; color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.op-order:active { transform: scale(.95); }
.op-empty { color: #8A97A5; text-align: center; }
.op-box-sm { max-width: 300px; }
.wk-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; border-bottom: 1px dashed #D5E0EB; font-size: 13px; }
.wk-row:last-child { border-bottom: 0; }
.wk-row span { color: #5F6E7E; }
.wk-row b { color: #0F3E50; font-weight: 600; }
/* 心理状态（9-19 兵哥定：名片底部一行私房话，浅红底） */
.wk-psy {
  margin-top: 8px; padding: 9px 10px;
  background: #FDECEC; border-bottom: 0; border-radius: 9px;
  align-items: flex-start;
}
.wk-psy span { flex: none; color: #B4555A; font-weight: 600; }
.wk-psy b { color: #8A4649; font-weight: 500; text-align: right; line-height: 1.6; }
.office-desk .robot { animation-delay: 0s; }
.office-desk:nth-child(2) .robot { animation-delay: .55s; }
.office-desk:nth-child(3) .robot { animation-delay: 1.1s; }
.office-desk:nth-child(4) .robot { animation-delay: 1.65s; }
.desk-bubble {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: #fff; color: #0F3E50; font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px; white-space: nowrap; z-index: 8;
  box-shadow: 0 2px 8px rgba(0,0,0,.3); animation: dPop .22s ease;
}
.desk-bubble::after { content: ""; position: absolute; bottom: -4px; left: 50%; margin-left: -4px; width: 8px; height: 8px; background: #fff; transform: rotate(45deg); }
@keyframes dPop { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---- 员工小动作（2026-09-19 兵哥定：四人各不同、避免重复枯燥）----
   只动 transform（合成器线程零卡）；挂在头/身体局部，与机器人整体浮动错开。 */
.office-desk:nth-child(1) .rb-body { animation: typeJitter 1.1s steps(2, end) infinite; }   /* 9527 打字抖动 */
@keyframes typeJitter { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-.8px); } }
.office-desk:nth-child(2) .rb-head { animation: thinkTilt 5.2s ease-in-out infinite; transform-origin: 50% 100%; }  /* 1900 歪头构思 */
@keyframes thinkTilt { 0%,55%,100% { transform: rotate(0); } 70%,85% { transform: rotate(-6deg); } }
.office-desk:nth-child(3) .rb-head { animation: lookAround 4.4s ease-in-out infinite; transform-origin: 50% 100%; } /* 007 张望查资料 */
@keyframes lookAround { 0%,30%,100% { transform: rotate(0); } 45% { transform: rotate(5deg); } 62% { transform: rotate(-5deg); } 78% { transform: rotate(0); } }
.office-desk:nth-child(4) .rb-body { animation: stretchUp 6s ease-in-out infinite; transform-origin: 50% 100%; }    /* 1096 久坐伸腰 */
@keyframes stretchUp { 0%,70%,100% { transform: scaleY(1); } 80%,90% { transform: scaleY(1.05); } }

/* ---- A总 洽谈弹窗（浅色系，沿用助理页凹陷输入风格）---- */
.office-modal {
  position: fixed; inset: 0; z-index: 105;   /* 9-19 提到侧边栏(100)之上：遮罩全屏可点关，仍低于全站模态 200 */
  background: rgba(4,20,28,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.om-box {
  width: 100%; max-width: 420px; max-height: 78vh;
  display: flex; flex-direction: column;
  background: #F6F9FC; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  animation: omIn .22s ease;
}
@keyframes omIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.om-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #0F6E56; color: #fff; }
.om-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.om-ava {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: #F5A623; color: #fff; font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.om-close { background: none; border: 0; color: rgba(255,255,255,.85); font-size: 15px; cursor: pointer; padding: 4px 6px; }
.om-close:hover { color: #fff; }
.om-msgs { flex: 1; min-height: 180px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.om-msg { display: flex; align-items: flex-end; gap: 7px; }
.om-msg .om-ava { width: 22px; height: 22px; font-size: 11px; }
.om-bubble { max-width: 78%; padding: 8px 11px; border-radius: 11px; font-size: 13px; line-height: 1.55; }
.om-ai .om-bubble { background: #fff; color: #1F3A56; border: 1px solid #E3EDF5; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(31,58,86,.08); }
.om-me { justify-content: flex-end; }
.om-me .om-bubble { background: #0F6E56; color: #fff; border-bottom-right-radius: 4px; }
.om-input-row { display: flex; gap: 8px; padding: 10px 12px 12px; background: #EFF4F9; }
.om-input-row input {
  flex: 1; min-width: 0; border: 1px solid #D5E0EB; border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; background: #fff; color: #1F3A56;
  box-shadow: inset 0 1px 3px rgba(31,58,86,.07);
}
.om-input-row input:focus { outline: none; border-color: #0F6E56; }
.om-send {
  flex: 0 0 auto; border: 0; cursor: pointer;
  background: #0F6E56; color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 9px;
}
.om-send:active { transform: scale(.96); }

/* ---- A总 下单卡/确认卡（2026-09-21 兵哥定：三回合脚本化的卡片载体）---- */
.om-card {
  align-self: stretch; max-width: 100%;
  background: #fff; border: 1px solid #DCE8F0; border-radius: 12px;
  padding: 11px 12px; font-size: 13px; color: #1F3A56;
  box-shadow: 0 2px 8px rgba(31,58,86,.08);
  display: flex; flex-direction: column; gap: 9px;
}
.oc-spec { background: #EEF4EF; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; color: #0F6E56; }
.oc-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.oc-field label i { color: #C2410C; font-style: normal; }
.oc-field.oc-miss { animation: ocMiss 1.6s ease; }
@keyframes ocMiss { 0%,60% { background: #FDECEC; border-radius: 8px; } 100% { background: transparent; } }
.oc-input {
  width: 100%; box-sizing: border-box; border: 1px solid #D5E0EB; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; background: #FAFCFE; color: #1F3A56;
}
.oc-input:focus { outline: none; border-color: #0F6E56; background: #fff; }
.oc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-pill {
  border: 1px solid #C9D8E4; background: #F6F9FC; color: #1F3A56;
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.oc-pill.on { background: #0F6E56; border-color: #0F6E56; color: #fff; font-weight: 700; }
.oc-files { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-file { background: #EEF4EF; color: #0F6E56; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 订单卡内上传按钮（09-21 兵哥定：入口移入 A总 对话；复用 .oc-pill 胶囊样式） */
.om-card .oc-up { margin-top: 8px; }
.om-card .oc-up:disabled { opacity: .5; cursor: default; }
.oc-file.none { background: #F1F3F5; color: #98A2AD; }
/* ---- 觉察三件套抽牌机（09-21 兵哥定：卡面上下滚动，点击抽取一张，替代固定规格行） ---- */
.oc-draw { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 2px; }
.oc-draw-win {
  position: relative; width: 96px; height: 144px; border-radius: 12px; overflow: hidden;
  border: 2px solid #E3E8E4; background: #F6F8F7; cursor: pointer;
  box-shadow: inset 0 6px 10px -8px rgba(15,110,86,.35), inset 0 -6px 10px -8px rgba(15,110,86,.35);
}
.oc-draw-win:active { transform: scale(.97); }
.oc-draw-reel { display: flex; flex-direction: column; will-change: transform; animation: ocReel 2.6s linear infinite; }
.oc-draw-reel img { width: 100%; height: 144px; object-fit: cover; display: block; }
@keyframes ocReel { from { transform: translateY(0); } to { transform: translateY(-144px); } }
.oc-draw-mk { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(15,110,86,.4); pointer-events: none; }
.oc-draw-mk.mk-t { top: 6px; } .oc-draw-mk.mk-b { bottom: 6px; }
.oc-draw.done .oc-draw-win { border-color: #0F6E56; box-shadow: 0 0 0 3px rgba(15,110,86,.18); }
.oc-draw.done .oc-draw-mk { opacity: 0; }
.oc-draw-heart {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 36px; line-height: 1; opacity: 0; transform: scale(.25); pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
  transition: opacity .3s ease, transform .38s cubic-bezier(.3,1.6,.55,1);
}
.oc-draw.done .oc-draw-heart { opacity: 1; transform: scale(1); }
.oc-draw-btn { margin-top: 2px; font-size: 12.5px; font-weight: 700; color: #0F6E56;
  background: #EEF4EF; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.oc-draw-btn:hover { background: #E2EEE9; }
.oc-draw-btn:active { transform: scale(.96); }
.oc-btns { display: flex; gap: 8px; justify-content: flex-end; }
.oc-btns button { border: 0; cursor: pointer; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 9px; }
.oc-btns button:disabled { opacity: .55; cursor: default; }
.oc-go { background: #0F6E56; color: #fff; }
.oc-go:active { transform: scale(.97); }
.oc-go-main { background: #F5A623; }
.oc-back { background: #EFF4F9; color: #1F3A56; }
.oc-sum { background: #F6F9FC; border: 1px dashed #C9D8E4; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.7; }
.oc-cost { margin-top: 6px; padding-top: 6px; border-top: 1px solid #E3EDF5; font-weight: 700; }
.oc-cost b { color: #C2410C; font-size: 15px; }
.op-st { font-weight: 700; white-space: nowrap; }
.op-st.st-making { color: #C77F1B; }
.op-st.st-done { color: #0F6E56; }
.op-st.st-failed { color: #C0392B; }
.op-nd { color: #B6C2CD; }

/* ---- 顶栏入口（公司介绍/业务范围）与说明弹窗（9-19 兵哥定）---- */
.office-top-actions { display: inline-flex; gap: 6px; }
.office-top-btn {
  /* 09-21 兵哥定：与性格切换胶囊同款墨绿实心（.chat-persona 同款凸起三件套） */
  border: 1px solid #0B5A46; background: #0F6E56;
  color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 0 #094A3A, 0 4px 10px rgba(15,110,86,.28);
  transition: background .15s, box-shadow .12s, transform .12s;
}
.office-top-btn:hover { background: #0C6149; transform: translateY(-1px); }
.office-top-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.30), 0 1px 0 #0B5A46;
}
/* A总叫卖气泡里的「业务说明」四个字：黑色加粗加大（09-21 兵哥定） */
.boss-bubble .bb-hot { color: #000; font-weight: 800; font-size: 15px; }
.office-pop {
  position: fixed; inset: 0; z-index: 105;   /* 9-19 同上：盖过侧边栏，点遮罩任意处都能关 */
  background: rgba(4,20,28,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.op-box {
  width: 100%; max-width: 400px; max-height: 80vh; overflow-y: auto;
  background: #F6F9FC; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  animation: omIn .22s ease;
}
.op-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px;
  padding: 10px 14px; background: #0F6E56; color: #fff;   /* 9-19 兵哥：标题改绿（站内 P1 墨绿） */
  font-weight: 700; font-size: 13.5px;
}
/* 业务说明标题旁的费用说明（09-20 晚兵哥定）；窄屏自动折到第二行 */
.op-policy { margin: 10px 2px 0; font-size: 11px; color: #8A8F99; line-height: 1.6; }
.op-close { background: none; border: 0; color: rgba(255,255,255,.85); font-size: 15px; cursor: pointer; padding: 4px 6px; }
.op-close:hover { color: #fff; }
.op-body { padding: 14px 16px 16px; font-size: 13px; line-height: 1.85; color: #1F3A56; }
.op-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.op-table th, .op-table td { border: 1px solid #D5E0EB; padding: 7px 9px; text-align: left; }
.op-table th { background: #E8F0F7; font-weight: 700; }
.op-table th:first-child, .op-table td:first-child { width: 52px; text-align: center; }
.op-cost { color: #C77F1B; font-weight: 700; white-space: nowrap; }

/* ---- 移动端（≤768px）：房间堆叠 + 工位 2×2（基线 360px）----
    9-19 兵哥反馈安卓超出屏幕：改前内容总高 821px（iPhone 844 恰好装下、安卓 740 装不下）。
    压竖高（房间 min-height 归零、工位/显示器缩小、padding 收紧）后约 610px，
    再用 min-height 铺满一屏（房间拉伸、内容垂直居中）——安卓不出屏、苹果不剩大空白。 */
@media (max-width: 768px) {
  .office-scene { grid-template-columns: 1fr; grid-template-areas: "boss" "tea" "floor"; padding: 8px; gap: 8px; min-height: calc(100dvh - 108px); }
  .office-room { padding: 24px 8px 8px; min-height: 0; }
  .office-tag { top: 6px; left: 8px; }
  .boss-zone { gap: 8px; padding: 2px 0 4px; }
  .office-desk { padding-top: 6px; }
  .office-desks { grid-template-columns: repeat(2, 1fr); gap: 8px 6px; }
  .monitor { width: 50px; }
  .mo-screen { height: 30px; padding: 4px 5px; }
  .mo-line.l2 { margin-top: 3px; }
  .mo-stand { height: 7px; }
  .mon-boss { width: 88px; }                          /* 双倍桌面的移动端折中（全双倍太挤） */
  .mon-boss .mo-screen { height: 56px; padding: 6px 8px; border-radius: 6px; }
  .mon-boss .mo-line { height: 4px; }
  .mon-boss .mo-line.l2 { margin-top: 5px; }
  .mon-boss .mo-cursor { top: 8px; left: 10px; width: 7px; height: 11px; }
  .mon-boss .mo-stand { width: 10px; height: 11px; }
  .mon-boss .mo-base { width: 38px; height: 5px; }
  .boss-bubble { font-size: 11px; top: 22px; }
  /* 报价区贴右上、茶几靠左，避免重叠 */
  .office-quote { top: 6px; right: 8px; padding: 4px 8px 5px; }
  .oq-num { font-size: 16px; }
  .tea-table { justify-content: flex-start; padding-left: 10px; }
  .office-shelf { min-height: 52px; padding: 7px 9px; }
  .om-box { max-height: 84vh; }
  .om-msgs { min-height: 150px; }
}

/* ---- 弱动效偏好：全关 ---- */
@media (prefers-reduced-motion: reduce) {
  .robot, .robot-boss, .rb-antenna::after, .np-dot, .is-busy .np-dot,
  .mo-cursor, .is-busy .mo-progress, .boss-ring, .steam, .shelf-dl,
  .boss-bubble, .desk-bubble, .shelf-item, .om-box { animation: none !important; }
  .is-busy .robot { transform: rotateY(180deg); }
}

/* ===== AI 用量明细（2026-09-20 兵哥定）：我的订阅 → 点「剩余 AI 调用次数」弹窗 ===== */
.sub-cell-usg { cursor: pointer; transition: background .15s ease; border-radius: 10px; }
.sub-cell-usg:hover { background: rgba(79, 70, 229, .06); }
.sub-cell-usg:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.usg-more { font-size: 11px; color: var(--primary); margin-left: 4px; }
.usg-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.usg-modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 360px;
  max-height: 78vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
}
.usg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.usg-head h4 {
  margin: 0; font-size: 15px;
  background: var(--primary-light); color: var(--primary);
  padding: 6px 12px; border-radius: 8px;
}
.usg-close {
  border: 0; background: none; font-size: 15px; color: var(--text-muted);
  cursor: pointer; padding: 4px 6px; border-radius: 8px;
}
.usg-close:hover { background: var(--surface); color: var(--text); }
.usg-hint { margin: 0; padding: 0 16px 10px; font-size: 12px; color: var(--text-muted); }
.usg-body { padding: 0 16px 16px; overflow-y: auto; }
.usg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.usg-table td { padding: 8px 2px; border-bottom: 1px solid var(--border); }
.usg-table .usg-n { text-align: right; white-space: nowrap; color: var(--text-muted); }
.usg-table tfoot td { border-bottom: 0; border-top: 2px solid var(--border); font-weight: 600; color: var(--text); padding-top: 10px; }
.usg-table tfoot .usg-n { color: var(--primary); }
.usg-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 26px 0; }
