/* ============================================================
   企服人员工作伴侣 — 全局统一样式（UI 单源规范）
   - 三套完整主题：blue 追效蓝（默认，与追效办公伴侣同色系）
     / green 翡翠绿 / gray 石板灰
   - 同类控件位置统一：下拉三角统一右侧、按钮/输入框/弹窗样式全局一致
   - 所有颜色走 CSS 变量，主题切换只换 data-theme，不动组件代码
   ============================================================ */

:root {
  --primary: #1F3864;
  --primary-hover: #2E75B6;
  --primary-active: #16294B;
  --primary-light: #EAF1F9;
  --primary-border: #C5D6EA;
  --bg: #F4F6FA;
  --panel: #FFFFFF;
  --panel-2: #F8FAFC;
  --panel-3: #EEF1F6;
  --border: #E3E8F0;
  --border-strong: #CBD5E1;
  --text: #1F2937;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --success: #15803D;
  --success-light: #ECFDF3;
  --warning: #B45309;
  --warning-light: #FEF3C7;
  --danger: #C0392B;
  --danger-light: #FDF2F0;
  --info-light: #EAF1F9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --accent: #2E75B6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 微软雅黑, sans-serif;
}
[data-theme="green"] {
  --primary: #047857;
  --primary-hover: #059669;
  --primary-active: #064E3B;
  --primary-light: #ECFDF5;
  --primary-border: #A7F3D0;
  --bg: #F2F8F5;
  --panel-3: #EDF5F1;
  --info-light: #ECFDF5;
  --panel-2: #F7FBF9; --border: #E0ECE7;
}
/* ============================================================
   v0.27.4（用户第 10.1 / 10.3 条）：主题从 3 套扩到 8 套
   ------------------------------------------------------------
   每套都给全 9 个变量（主色 / 悬停 / 按下 / 浅底 / 边框 / 页面底 / 三级面 / 信息底 / 强调色），
   所以换主题时不会再出现「某处颜色没跟着变」的割裂感。
   新增：琥珀橙 / 玫瑰红 / 靛蓝 / 青碧 / 紫罗兰（加上原有 追效蓝 / 翡翠绿 / 石板灰）。
   想再调深浅，直接改这里的 9 个值即可，组件不用动。
   ============================================================ */
[data-theme="amber"] {
  --primary: #B45309; --primary-hover: #D97706; --primary-active: #78350F;
  --primary-light: #FFFBEB; --primary-border: #FDE68A;
  --bg: #FDF9F1; --panel-3: #F7F0E2; --info-light: #FFFBEB; --accent: #EA580C;
  --panel-2: #FDFAF4; --border: #F0E6D6;
}
[data-theme="rose"] {
  --primary: #BE123C; --primary-hover: #E11D48; --primary-active: #881337;
  --primary-light: #FFF1F2; --primary-border: #FECDD3;
  --bg: #FDF5F6; --panel-3: #F8E9EC; --info-light: #FFF1F2; --accent: #DB2777;
  --panel-2: #FEF8F9; --border: #F3E2E5;
}
[data-theme="indigo"] {
  --primary: #4338CA; --primary-hover: #4F46E5; --primary-active: #312E81;
  --primary-light: #EEF2FF; --primary-border: #C7D2FE;
  --bg: #F5F6FD; --panel-3: #EAEDFA; --info-light: #EEF2FF; --accent: #7C3AED;
  --panel-2: #F8F9FE; --border: #E4E8F8;
}
[data-theme="teal"] {
  --primary: #0F766E; --primary-hover: #0D9488; --primary-active: #134E4A;
  --primary-light: #F0FDFA; --primary-border: #99F6E4;
  --bg: #F2FAF9; --panel-3: #E5F5F2; --info-light: #F0FDFA; --accent: #0891B2;
  --panel-2: #F6FBFA; --border: #DDEEEA;
}
[data-theme="violet"] {
  --primary: #6D28D9; --primary-hover: #7C3AED; --primary-active: #4C1D95;
  --primary-light: #F5F3FF; --primary-border: #DDD6FE;
  --bg: #F8F6FE; --panel-3: #EEEBFB; --info-light: #F5F3FF; --accent: #A855F7;
  --panel-2: #FAF8FE; --border: #EAE4F8;
}

/* v0.27.9（用户第 2 条）：再加 6 套，共 14 套 */
[data-theme="sky"] {
  --primary: #0369A1; --primary-hover: #0284C7; --primary-active: #075985;
  --primary-light: #F0F9FF; --primary-border: #BAE6FD;
  --bg: #F3FAFE; --panel-3: #E6F4FB; --info-light: #F0F9FF; --accent: #06B6D4;
  --panel-2: #F7FCFE; --border: #DCEFF8;
}
[data-theme="forest"] {
  --primary: #14532D; --primary-hover: #166534; --primary-active: #052E16;
  --primary-light: #F0FDF4; --primary-border: #BBF7D0;
  --bg: #F4FAF6; --panel-3: #E9F5ED; --info-light: #F0FDF4; --accent: #22C55E;
  --panel-2: #F8FCF9; --border: #E0EDE4;
}
[data-theme="navy"] {
  --primary: #1E3A8A; --primary-hover: #1D4ED8; --primary-active: #172554;
  --primary-light: #EFF6FF; --primary-border: #BFDBFE;
  --bg: #F3F7FE; --panel-3: #E8EFFB; --info-light: #EFF6FF; --accent: #3B82F6;
  --panel-2: #F7FAFE; --border: #E1EAF8;
}
[data-theme="mocha"] {
  --primary: #6B4226; --primary-hover: #8B5E3C; --primary-active: #4A2C17;
  --primary-light: #FBF7F2; --primary-border: #E7D6C4;
  --bg: #FAF7F3; --panel-3: #F3ECE3; --info-light: #FBF7F2; --accent: #A16207;
  --panel-2: #FCFAF7; --border: #EDE3D6;
}
[data-theme="lime"] {
  --primary: #4D7C0F; --primary-hover: #65A30D; --primary-active: #365314;
  --primary-light: #F7FEE7; --primary-border: #D9F99D;
  --bg: #F9FCF2; --panel-3: #F1F7E4; --info-light: #F7FEE7; --accent: #84CC16;
  --panel-2: #FBFDF7; --border: #E7F0D2;
}
[data-theme="graphite"] {
  --primary: #1F2937; --primary-hover: #374151; --primary-active: #111827;
  --primary-light: #F3F4F6; --primary-border: #D1D5DB;
  --bg: #F6F7F8; --panel-3: #ECEEF1; --info-light: #F3F4F6; --accent: #4B5563;
  --panel-2: #F9FAFB; --border: #E3E6EA;
}
/* v0.28.0（用户第 1 条）：主题再补 2 套（共 16 套）——
   珊瑚（偏暖的通告感）/ 钢蓝（比追效蓝更冷、更灰，长时间看不跳） */
[data-theme="coral"] {
  --primary: #BE3A2B; --primary-hover: #E15241; --primary-active: #8C2A1F;
  --primary-light: #FFF3F1; --primary-border: #F7C9C1;
  --bg: #FDF7F6; --panel-3: #F8EAE7; --info-light: #FFF3F1; --accent: #F97316;
  --panel-2: #FEFAF9; --border: #F3E2DE;
}
/* v0.29.5（用户第 15 条）：修「鎏金预览是金黄、实际是钢蓝」——
   THEMES 里 steel 已改名为「鎏金」（#8A6A1F 金棕），但 CSS 这块还留着旧的钢蓝，
   所以点色卡看到的是金黄、切完之后整站还是蓝灰。这里按 THEMES 的 9 个色值补齐。
   ⚠️ 以后改主题色，shell.js 的 THEMES 与这里必须同时改，否则预览和实际就分家了。 */
[data-theme="steel"] {
  --primary: #8A6A1F; --primary-hover: #A8842A; --primary-active: #6B5014;
  --primary-light: #FDF8EC; --primary-border: #EBD9AE;
  --bg: #FCFAF4; --panel-3: #F7F1E3; --info-light: #FDF8EC; --accent: #C99A2E;
  --panel-2: #FEFCF7; --border: #F0E6D2;
}

[data-theme="gray"] {
  --primary: #475569;
  --primary-hover: #64748B;
  --primary-active: #1E293B;
  --primary-light: #F1F5F9;
  --primary-border: #CBD5E1;
  --bg: #F5F6F8;
  --info-light: #F1F5F9;
  --panel-2: #F8F9FA; --border: #E5E9ED;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
.boot { display: flex; height: 100vh; align-items: center; justify-content: center; color: var(--text-2); }

/* ============ 布局骨架 ============ */
.layout { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: 56px; flex: none; display: flex; align-items: center; gap: 12px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 0 16px; position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; cursor: pointer; }
/* v0.3.0 版本号标签（仅平台管理身份显示） */
.ver-tag {
  font-size: 11px; color: var(--text-3); background: var(--panel-3);
  border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; letter-spacing: .2px;
}
.topbar .spacer { flex: 1; }
.role-switch {
  display: flex; align-items: center; gap: 6px; background: var(--panel-3);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 3px;
}
.role-switch button {
  border: none; background: transparent; padding: 5px 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); cursor: pointer; font-family: var(--font);
}
.role-switch button.active { background: var(--primary); color: #fff; font-weight: 600; }
/* v0.72.0（用户第 6 条 / 标准 AI0015）：保存状态栏 ——
   自动保存信息 + 恢复上一步 / 撤销恢复 / 手动保存 都装在一个浅主题色胶囊里，
   和角色切换同一个形状，位置固定在版本号右侧（对话框里在标题右侧）。 */
.save-bar {
  display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 12px;
  background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 999px;
}
.save-bar .save-bar-txt { color: var(--primary); font-weight: 600; }
.save-bar .btn { background: var(--panel); }
.save-bar .save-bar-err { color: var(--danger); font-weight: 700; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
/* v0.25.0（用户第 7 条）：顶栏全站刷新图标 —— 点了转一圈，给个 feedback */
.topbar-refresh { transition: transform .6s ease; }
.topbar-refresh.spinning { transform: rotate(360deg); }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.user-chip:hover { border-color: var(--primary-border); }
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.user-chip .name { font-size: 13px; font-weight: 500; }

.main { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 216px; flex: none; background: var(--panel); border-right: 1px solid var(--border);
  padding: 12px 10px; overflow-y: auto;
}
.nav-group { margin-bottom: 18px; }
.nav-group .nav-title {
  font-size: 12px; color: var(--text-3); padding: 4px 10px 6px; letter-spacing: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); cursor: pointer; font-size: 13.5px; margin-bottom: 2px; border: none;
  background: transparent; width: 100%; text-align: left; font-family: var(--font);
}
.nav-item:hover { background: var(--panel-3); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item .nav-ico { width: 20px; text-align: center; }
/* v1.8.0 导航数量徽标（分类提醒等待处理数） */
.nav-item .nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--danger);
  border-radius: 9px; padding: 0 5px;
}
.nav-item .todo-dot {
  margin-left: auto; font-size: 10px; color: var(--warning);
  background: var(--warning-light); border: 1px solid #fde68a; border-radius: 4px; padding: 0 4px;
}
.content { flex: 1; overflow-y: auto; padding: 20px 24px 48px; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-desc { color: var(--text-2); font-size: 13px; margin-bottom: 18px; }

/* ============ 登录 / 注册（与追效办公伴侣同款结构） ============ */
.auth-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 36px 32px; text-align: center;
}
.auth-logo {
  width: 56px; height: 56px; border-radius: 14px; background: var(--primary);
  color: #fff; font-size: 28px; font-weight: 700; line-height: 56px;
  margin: 0 auto 14px; text-align: center; user-select: none;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.auth-card h1 { font-size: 21px; margin-bottom: 8px; }
.auth-sub { color: var(--text-2); font-size: 13px; margin-bottom: 22px; }
.auth-tabs { display: flex; background: var(--panel-3); border-radius: 9px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; border: none; background: transparent; padding: 9px; border-radius: 7px;
  font-size: 14px; cursor: pointer; color: var(--text-2); font-family: var(--font);
  transition: color .15s, background .15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--panel); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.auth-tip { margin-top: 14px; font-size: 12px; color: var(--text-2); line-height: 1.8; }
.auth-version { font-size: 11px; color: var(--text-2); opacity: .75; letter-spacing: .3px; }
.auth-foot {
  margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.auth-foot .admin-link { padding: 2px 6px; }
.admin-link {
  border: none; background: transparent; color: var(--primary-hover); font-size: 12px;
  cursor: pointer; font-family: var(--font); text-decoration: none;
}
.admin-link:hover { color: var(--primary); text-decoration: underline; }

/* v0.104.0（用户 2）：点格子复制后的提示 */
.copy-tip {
  position: fixed; z-index: 99999; background: rgba(18, 22, 30, .92); color: #fff;
  font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 7px;
  pointer-events: none; transition: opacity .3s ease; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
/* v0.105.0（用户 2）：复制格子用默认鼠标指针，不显示带加号的 copy 指针 */
.table td.copy-cell { cursor: default; }

/* v0.105.0（用户 9.4）：顶栏「到期日」小胶囊 */
.topbar-plan {
  display: inline-flex; align-items: center; height: 26px; padding: 0 9px; margin-right: 8px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text-2); font-size: 12px; cursor: pointer; white-space: nowrap;
}
.topbar-plan:hover { border-color: var(--primary-border); color: var(--primary); }
.topbar-plan.free { color: var(--success); border-color: #bbf7d0; background: var(--success-light); }
.topbar-plan.soon { color: var(--warning); border-color: #fde68a; background: var(--warning-light); }
.topbar-plan.expired { color: var(--danger); border-color: #fecaca; background: var(--danger-light); }

/* ============ 全局 Logo 标识（登录页 / 顶栏 / 超管后台共用） ============ */
.logo-mark {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  color: #fff; font-weight: 700; font-size: 28px; line-height: 1;
  box-shadow: 0 8px 20px rgba(31, 56, 100, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif; user-select: none;
}
.logo-mark.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; box-shadow: none; }
/* v0.102.0（用户 1）：汉字标不换行 —— 2 个字也在同一行；字多了自动变长方形 */
.logo-mark { white-space: nowrap; overflow: hidden; letter-spacing: 0; }
.logo-mark.wide { width: auto; min-width: 56px; padding: 0 14px; border-radius: 14px; }
.logo-mark.sm.wide { width: auto; min-width: 28px; padding: 0 7px; border-radius: 8px; }
.brand-preview .logo-mark { flex: 0 0 auto; }

/* ============ 表单控件（全局统一） ============ */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.input, .textarea, .select-trigger {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font-size: 14px; font-family: var(--font);
  padding: 8px 12px; outline: none; transition: border-color .15s;
}
.input:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.input:disabled, .textarea:disabled { background: var(--panel-3); color: var(--text-3); }

/* 自定义下拉：三角统一在右侧 */
.select { position: relative; }
.select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; min-height: 36px; text-align: left;
}
.select-trigger:hover { border-color: var(--primary); }
.select-trigger .arrow { color: var(--text-3); font-size: 11px; flex: none; }
.select-trigger .value { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .value.placeholder { color: var(--text-3); }
.select-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; padding: 4px;
}
.select-menu .option {
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  white-space: nowrap;   /* v0.12.4：下拉选项里的长公司名不折行 */
}
.select-menu .option .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-menu .option:hover { background: var(--primary-light); }
.select-menu .option.selected { color: var(--primary); font-weight: 600; background: var(--primary-light); }
.select-menu .option .check { font-size: 12px; }
/* v0.29.0：下拉分组标题（图谱「先选页面再选字段」） */
.select-menu .opt-group {
  padding: 6px 10px 3px; font-size: 11px; color: var(--text-3);
  background: var(--panel-2); font-weight: 600; letter-spacing: .3px;
  position: sticky; top: 0; z-index: 1;
}
.select-menu .opt-group:first-child { border-radius: 9px 9px 0 0; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 16px; font-size: 13.5px; cursor: pointer;
  font-family: var(--font); transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-block { width: 100%; padding: 11px 16px; font-size: 14px; border-radius: 10px; }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.btn-success { color: var(--success); border-color: #bbf7d0; }
.btn-success:hover { background: var(--success-light); border-color: var(--success); color: var(--success); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-link { border: none; background: none; color: var(--primary); padding: 4px 6px; cursor: pointer; font-size: 13px; font-family: var(--font); }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* ============ 卡片 / 面板 / 工作台板块 ============ */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head .title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .extra { display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

/* ============ 折叠面板（设置页 v0.2.0：只显标题，点击展开） ============ */
.fold-card { margin-bottom: 14px; overflow: hidden; }
.fold-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 15px 18px; background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text-1); text-align: left;
  font-family: inherit;
}
.fold-head:hover { background: var(--panel-2); }
.fold-head .fold-arrow { margin-left: auto; color: var(--text-3); font-size: 12px; transition: transform .15s; }
.fold-head.open .fold-arrow { transform: rotate(180deg); }
.fold-body { padding: 4px 18px 18px; border-top: 1px solid var(--border); }
.fold-body > .section-title:first-child { margin-top: 12px; }

.panel-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.panel-slot { grid-column: span 4; min-height: 120px; }
/* v0.28.1（用户第 5 条）：工作台板块 —— 标题可点进页面、右上角一个小齿轮单独调这个板块 */
.card-head .title.panel-go { cursor: pointer; }
.card-head .title.panel-go:hover { color: var(--primary); }
.card-head .extra { flex-wrap: wrap; justify-content: flex-end; }
.panel-set { width: 26px; height: 26px; opacity: .55; }
.panel-set:hover { opacity: 1; }
.panel-set .ico-svg { width: 15px; height: 15px; }

/* 我的提醒（工作台预览）：一行一条，点一条看全部，右边直接处理 */
.panel-sum { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.panel-sum b { color: var(--text); }
.rm-mini {
  display: flex; align-items: center; gap: 9px; padding: 8px 2px;
  border-bottom: 1px dashed var(--border); cursor: pointer;
}
.rm-mini:hover { background: var(--panel-2); }
.rm-mini:last-of-type { border-bottom: 0; }
.rm-mini-ico { flex: none; font-size: 15px; }
.rm-mini-main { flex: 1 1 auto; min-width: 0; }
.rm-mini-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.rm-mini-t b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-mini-cat { font-size: 11.5px; color: var(--text-3); flex: none; }
.rm-mini-d { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.panel-foot { margin-top: 8px; }

/* 数据总览（漏斗）：一层一层往下收，右边是数，中间标转化率 */
.wfunnel { padding: 2px 0 4px; }
.wf-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; cursor: pointer; }
.wf-k { flex: none; width: 104px; font-size: 13px; color: var(--text-2); text-align: right; }
.wf-bar { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.wf-bar i { display: block; height: 22px; border-radius: 6px; opacity: .9; min-width: 0; }
.wf-bar b { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); }
.wf-rate { font-size: 11.5px; color: var(--text-3); padding-left: 118px; line-height: 1.5; }

/* 工作台设置里的「占多宽」小分段 */
.lab-item .seg-row { flex: none; }
.lab-item .seg-row .seg { height: 26px; padding: 0 9px; font-size: 11.5px; }
.lab-item .info { min-width: 0; }
.panel-slot.w6 { grid-column: span 6; }
.panel-slot.w8 { grid-column: span 8; }
.panel-slot.w12 { grid-column: span 12; }
.panel-slot.w4 { grid-column: span 4; }
@media (max-width: 1100px) { .panel-slot, .panel-slot.w4, .panel-slot.w6, .panel-slot.w8 { grid-column: span 6; } }
@media (max-width: 720px) { .panel-slot, .panel-slot.w4, .panel-slot.w6, .panel-slot.w8 { grid-column: span 12; } }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-box {
  flex: 1; min-width: 110px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.stat-box .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-box .label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
/* v0.45.0（用户第 2 条）：记账页统计卡与下面表头拉开距离（跟客户关系图谱一屏一致） */
.lg-stat-row { margin-bottom: 20px; }
.lg-stat-row .stat-box { background: var(--panel); }

/* ============ 徽章 / 标签 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500;
  padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.badge.gray { background: var(--panel-3); color: var(--text-2); border-color: var(--border); }
.badge.blue { background: var(--info-light); color: var(--primary); border-color: var(--primary-border); }
.badge.green { background: var(--success-light); color: var(--success); border-color: #bbf7d0; }
.badge.orange { background: var(--warning-light); color: var(--warning); border-color: #fde68a; }
.badge.red { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }
.badge.todo { background: var(--warning-light); color: var(--warning); border-color: #fde68a; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
/* v0.91.0（用户第 5.1 条）：给了列宽的表格用固定布局 —— 以前 auto 布局会按内容把「窄」列撑回去，
   看着就是「选了窄没生效」；固定布局下窄就是窄，超出用省略号。 */
.table.table-fixed { table-layout: fixed; width: 100%; }
.table.table-fixed th, .table.table-fixed td {
  /* v0.105.0（用户 4）：锁定列宽后内容不许压到隔壁列 */
  overflow: hidden; text-overflow: clip; white-space: normal;
  overflow-wrap: anywhere; word-break: break-word;
}
/* v0.92.0（用户第 4.1 条）：列宽拖拽手柄 */
.table th { position: relative; }
.table th .col-grip {
  position: absolute; top: 0; right: -3px; width: 6px; height: 100%;
  cursor: col-resize; z-index: 4;
}
.table th .col-grip:hover, .table th .col-grip:active { background: var(--primary-light); }
.table.table-fixed th.col-ops, .table.table-fixed td.col-ops,
.table th.col-ops, .table td.col-ops {
  width: 96px; min-width: 96px; white-space: nowrap;
  position: sticky; right: 0; z-index: 2; background: var(--panel);
}
/* v0.94.0（用户第 2 条）：操作列表头也要和别的表头一样有底色，不能是白的 */
.table th.col-ops { z-index: 3; background: var(--panel-2); }
/* v0.94.0（用户第 2 条）：字段标签的表头排版 ——
   inline = 字段和标签在同一行；auto = 标签另起一行。
   换行后可以选上对齐（默认）或上下居中。 */
.table th .ftag, .table th .ftag-wrap { margin-left: 6px; }
body.ft-head-auto .table th .ftag,
body.ft-head-auto .table th .ftag-wrap {
  display: block; margin-left: 0; margin-top: 3px;
}
body.ft-head-auto .table th { vertical-align: top; }
/* v0.105.0（用户 4）：标题换行一律上对齐，不再提供上下居中 */
body.ft-head-auto.ft-head-center .table th { vertical-align: top; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 14px; color: var(--text-2); font-weight: 500; font-size: 12.5px;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  /* v0.93.0（用户第 4 条）：标题也自动换行（不再省略、不再强制不换行） */
  white-space: normal; overflow-wrap: anywhere;
  /* v0.105.0（用户 4）：标题换行时一律上对齐 —— 一行文字 + 一行标签，居中会错位 */
  vertical-align: top;
}
/* v0.93.0（用户第 4 条）：所有列表格子自动换行，不出现省略号；
   列窄了就换行变高，想一行显示就拖宽这一列。 */
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--panel-2); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .strong { font-weight: 600; }
/* v0.29.4（用户第 2 条）：列表「加粗」关掉的列，连格子里自带的 .strong 一起恢复正常粗细
   （以前只把 td 设成 400，里面的 .strong 还是 600，看起来像「取消加粗没生效」） */
.table td.f-normal, .table td.f-normal .strong { font-weight: 400; }
.table .muted { color: var(--text-2); }
.table .money { font-weight: 600; color: var(--danger); font-variant-numeric: tabular-nums; }

/* ============ 弹窗 ============ */
/* v0.22.0（用户第 1 条）：全站弹窗只有一个「宽度档位」，在「设置 → 弹框宽度」里挑。
   只存档位名（html[data-modalw]），尺寸全在这里定义：
     --modal-w       居中弹框的基准宽
     --modal-side-w  右侧抽屉的基准宽（默认 = 客户档案设置现在的宽度）
   wide / xl 也都在基准上加，所以换档位时全站一起变，不会有的宽有的窄。 */
:root {
  --modal-w: 620px;
  --modal-side-w: 640px;
  --modal-wide-add: 160px;
}
html[data-modalw="xs"] { --modal-w: 440px; --modal-side-w: 460px; }
html[data-modalw="sm"] { --modal-w: 540px; --modal-side-w: 560px; }
html[data-modalw="md"] { --modal-w: 620px; --modal-side-w: 640px; }
html[data-modalw="lg"] { --modal-w: 720px; --modal-side-w: 800px; }
html[data-modalw="xl"] { --modal-w: 840px; --modal-side-w: 920px; }
html[data-modalw="full"] { --modal-w: 96vw; --modal-side-w: 96vw; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px;
  animation: fadeIn .15s;
}
.modal {
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: var(--modal-w, 620px); max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column;
  animation: slideUp .18s;
}
/* 居中的确认类弹窗：跟着档位走，但别把一句确认拉到满屏 */
.modal-mask:not(.side-mask) .modal { max-width: min(96vw, 680px); }
.modal.wide { width: calc(var(--modal-w, 620px) + var(--modal-wide-add)); }
/* v0.12.2：右侧抽屉式弹窗（页面设置用），不再居中挡住列表内容 */
.modal-mask.side-mask { padding: 0; align-items: stretch; justify-content: flex-end; }
.modal.side {
  width: var(--modal-side-w, 640px); max-width: 96vw; height: 100%; max-height: 100%;
  border-radius: 14px 0 0 14px; animation: slideInRight .18s;
}
.modal.side .modal-body { flex: 1; }
/* v0.12.4：抽屉里放宽表单 / 宽表格时给更宽的档位（也是在基准上加，不写死） */
.modal.side.wide { width: calc(var(--modal-side-w, 640px) + var(--modal-wide-add)); }
.modal.side.xl { width: calc(var(--modal-side-w, 640px) + 300px); max-width: 96vw; }
/* v0.58.0（用户第 2 / 3 条）：新建服务 = 整个屏幕的全屏编辑器，不再是一张浮在上面的弹框 */
.modal-mask.full-mask { padding: 0; align-items: stretch; justify-content: stretch; background: var(--bg, #f4f6fa); }
/* 特异性要压过上面的 :not(.side-mask) 那条 680px 限制 */
.modal-mask.full-mask .modal.full {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; box-shadow: none; animation: none;
}
.modal.full .modal-body { flex: 1; overflow: auto; padding: 20px 26px; }
.modal.full .modal-head { padding: 12px 26px; border-bottom: 1px solid var(--border); }
.modal.full .modal-foot { padding: 12px 26px; border-top: 1px solid var(--border); }
@keyframes slideInRight { from { transform: translateX(30px); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.modal-head .title { font-size: 16px; font-weight: 700; }
/* v0.94.0（用户第 4.4 条）：标题 + 保存状态栏靠在一起，放在标题栏左侧 */
.modal-head .mh-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.modal-head .mh-left .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .mh-left .save-bar { flex: none; }
.modal-body { padding: 22px; overflow-y: auto; }
/* v0.90.0（用户第 3 条）：弹窗内容区自己控制滚动，别让浏览器的「滚动锚定」在展开 / 折叠时偷偷调 scrollTop，
   否则看起来整个弹窗在上下跳。 */
.modal-body { overflow-anchor: none; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px;
  border-top: 1px solid var(--border);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }

/* v0.22.0（用户第 1 条）：平板 / 手机上的弹窗 —— 宽档位在小屏上没有意义，
   统一改成「铺满可见宽度」，抽屉上滑铺满，居中弹框上下留一点边。 */
@media (max-width: 1100px) {
  .modal.side,
  .modal.side.wide,
  .modal.side.xl { width: min(88vw, var(--modal-side-w, 640px)); }
}
@media (max-width: 820px) {          /* 平板竖屏 / 小笔记本 */
  .modal-mask { padding: 3vh 10px 10px; }
  .modal,
  .modal.wide,
  .modal.xl { width: min(96vw, var(--modal-w, 620px)); max-height: 92vh; }
  .modal.side,
  .modal.side.wide,
  .modal.side.xl { width: 94vw; max-width: 94vw; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
}
@media (max-width: 560px) {          /* 手机：全屏，底部按钮贴安全区 */
  .modal-mask { padding: 0; }
  .modal-mask:not(.side-mask) { align-items: stretch; }
  .modal,
  .modal.wide,
  .modal.xl,
  .modal.side,
  .modal.side.wide,
  .modal.side.xl {
    width: 100vw; max-width: 100vw; height: 100%; max-height: 100%;
    border-radius: 0;
  }
  .modal-head { padding: 12px 14px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* ============ Toast ============ */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; }
.toast {
  background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 10px 18px;
  font-size: 13.5px; margin-bottom: 8px; animation: slideDown .2s; max-width: 420px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } }

/* ============ 首页功能图标面板 ============ */
.icon-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.app-icon {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 12px 16px; text-align: center; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.app-icon:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.app-icon .ico {
  width: 52px; height: 52px; border-radius: 14px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.app-icon .t { font-weight: 600; font-size: 14px; }
.app-icon .d { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.app-icon .todo-flag { font-size: 10.5px; color: var(--warning); }

.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }

/* ============ 空状态 / 加载 ============ */
.empty { text-align: center; padding: 42px 20px; color: var(--text-3); }
.empty .ico { font-size: 38px; margin-bottom: 8px; }
.empty .t { font-size: 14px; }
.empty .hint { font-size: 12px; margin-top: 4px; }
.loading { text-align: center; padding: 36px; color: var(--text-3); font-size: 13px; }

/* ============ 帮助文档 ============ */
.help-doc { max-width: 860px; line-height: 1.8; font-size: 14px; }
.help-doc h1 { font-size: 22px; margin: 18px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.help-doc h2 { font-size: 17px; margin: 22px 0 10px; color: var(--primary); }
.help-doc h3 { font-size: 15px; margin: 16px 0 8px; }
.help-doc p { margin: 8px 0; }
.help-doc ul, .help-doc ol { margin: 8px 0 8px 22px; }
.help-doc li { margin: 4px 0; }
.help-doc code { background: var(--panel-3); border-radius: 4px; padding: 1px 6px; font-size: 13px; }
.help-doc pre { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.help-doc pre code { background: none; padding: 0; }
.help-doc blockquote { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 8px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; color: var(--text-2); }
.help-doc table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.help-doc th, .help-doc td { border: 1px solid var(--border); padding: 7px 12px; font-size: 13px; }
.help-doc th { background: var(--panel-2); }
.help-doc .ver-line { color: var(--primary); font-weight: 600; }

/* ============ 其他 ============ */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
/* v0.42.0：`.grow` 以前只在 .toolbar 里生效 —— 自己拼的 flex 行（字段行、弹窗里的标题行）
   放一个「撑开」的 div 完全没反应，按钮挤在左边。这里补成全局规则。 */
.grow { flex: 1 1 auto; min-width: 0; }
.filter-chip {
  border: 1px solid var(--border); background: var(--panel); border-radius: 999px;
  padding: 5px 14px; font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: var(--font);
}
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.filter-chip:hover { border-color: var(--primary); }
/* 角色多选按钮（字段框架的填写/可见角色配置） */
.role-pick {
  border: 1px solid var(--border-strong); background: var(--panel); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: var(--font);
}
.role-pick:hover { border-color: var(--primary); color: var(--primary); }
.role-pick.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.role-pick.on:hover { color: #fff; }
.kv { display: grid; grid-template-columns: var(--kv-label-w, 110px) 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv .k { position: relative; cursor: col-resize; }
.kv .k::after { content: ''; position: absolute; right: -7px; top: 0; bottom: 0; width: 12px; cursor: col-resize; }
.kv .k { color: var(--text-2); }
.kv .v { word-break: break-all; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline .tl-item { position: relative; padding: 0 0 18px 8px; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary); border: 2px solid var(--panel);
}
.timeline .tl-item.pending::before { background: var(--warning); }
.timeline .tl-title { font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline .tl-time { font-size: 12px; color: var(--text-3); }
.timeline .tl-content { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: pre-wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
.price-tag { font-size: 18px; font-weight: 700; color: var(--danger); }
.price-tag small { font-size: 12px; font-weight: 400; color: var(--text-2); }
.prod-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: all .15s; }
.prod-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.prod-card .name { font-weight: 700; font-size: 15px; line-height: 1.4; }
.prod-card .meta { font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.prod-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.folder-entries { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.folder-entries .fe {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.folder-entries .fe:last-child { border-bottom: none; }
.folder-entries .fe .ico { flex: none; }
.folder-entries .fe .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-entries .fe.match { background: var(--success-light); }
.folder-entries .fe.unmatch { color: var(--text-2); }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.theme-card {
  border: 2px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; text-align: center;
}
.theme-card.active { border-color: var(--primary); background: var(--primary-light); }
.theme-card .swatches { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.theme-card .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: var(--shadow); }
.theme-card .t { font-weight: 600; font-size: 13.5px; }
/* ============ 功能实验室（图标卡片式开关） ============ */
.lab-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.lab-card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); padding: 18px 16px 16px; cursor: pointer; text-align: center;
  transition: border-color .15s, box-shadow .15s, transform .12s, opacity .15s;
  filter: grayscale(1); opacity: .62;
}
.lab-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow); transform: translateY(-1px); opacity: .8; }
.lab-card.on { filter: none; opacity: 1; border-color: var(--primary-border); box-shadow: var(--shadow); }
.lab-card .lab-ico { font-size: 34px; line-height: 1.2; margin-bottom: 8px; }
.lab-card .lab-t { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.lab-card .lab-d { font-size: 12px; color: var(--text-2); line-height: 1.5; min-height: 36px; }
.lab-card .lab-state { margin-top: 10px; }
.lab-card.on .lab-t { color: var(--primary); }
.lab-list { display: flex; flex-direction: column; gap: 10px; }
.lab-item {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; background: var(--panel);
}
.lab-item .info { flex: 1; }
.lab-item .t { font-weight: 600; font-size: 13.5px; }
.lab-item .d { font-size: 12px; color: var(--text-2); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px;
  cursor: pointer; transition: .2s;
}
.switch .sl::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow);
}
.switch input:checked + .sl { background: var(--primary); }
.switch input:checked + .sl::before { transform: translateX(18px); }

/* ============ CRM（线索 / 商机 / 客户管理） ============ */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 16px; }
/* v0.28.6（用户第 14 条）：一行放几个由字段宽度决定 —— 默认半行（3/6），
   整行 = 6/6，「三分之一」= 2/6，所以三个字段能并在一行 */
.form-grid > * { grid-column: span 3; min-width: 0; }
.form-grid > .full, .form-grid .full { grid-column: 1 / -1; }
.form-grid > .third { grid-column: span 2; }
.form-grid > .half { grid-column: span 3; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* 三种导入方式入口 */
.import-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 860px) { .import-row { grid-template-columns: 1fr; } }
.import-card {
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--panel-2);
  padding: 14px 16px; cursor: pointer; transition: all .15s;
}
.import-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.import-card .ico { font-size: 22px; margin-bottom: 6px; }
.import-card .t { font-weight: 600; font-size: 13.5px; }
.import-card .d { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }

/* 增强功能清单 */
.extra-row {
  display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; background: var(--panel);
  transition: border-color .15s, background .15s;
}
.extra-row.on { border-color: var(--primary-border); background: var(--primary-light); }
.extra-row input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
.extra-ico { font-size: 20px; line-height: 1.3; width: 26px; text-align: center; flex: none; }
.extra-info { flex: 1; }
.extra-info .t { font-weight: 600; font-size: 13.5px; }
.extra-info .d { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin-top: 2px; }
.extra-info .v { font-size: 12px; color: var(--primary); margin-top: 3px; }

/* 按月到期柱状图 */
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 10px 4px 0;
  border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow-x: auto;
}
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 34px; flex: 1; height: 100%; }
.bar-col .bar {
  width: 70%; max-width: 34px; background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 4px 4px 0 0; transition: opacity .15s;
}
.bar-col .bar:hover { opacity: .8; }
.bar-col .bar-label { font-size: 11px; color: var(--text-2); margin-top: 4px; white-space: nowrap; }

/* 续费漏斗 */
.funnel { margin-top: 10px; }
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.funnel-row .k { width: 80px; color: var(--text-2); flex: none; }
.funnel-row .bar { flex: 1; height: 10px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.funnel-row .bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.funnel-row .v { width: 40px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   v1.3.0 — CRM 设置弹窗 / 阶段条 / 标记 / 客户关系图谱
   ============================================================ */

/* 灰色「待开发」按钮：位置先占住，视觉上明确不可用 */
.btn-todo {
  background: var(--panel-3) !important; color: var(--text-3) !important;
  border: 1px dashed var(--border-strong) !important; cursor: not-allowed;
  box-shadow: none !important;
}
.btn-todo:hover { background: var(--panel-3) !important; color: var(--text-2) !important; border-color: var(--border-strong) !important; }

/* ---- 设置弹窗里的可编辑行 ---- */
.cfg-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2);
}
.cfg-row:hover { border-color: var(--primary-border); }
.cfg-idx {
  width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center;
  justify-content: center; margin-top: 22px;
}
.cfg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cfg-main .field { margin-bottom: 0; }
.cfg-main .textarea { min-height: 52px; }
.cfg-ops { flex: none; display: flex; gap: 4px; align-items: center; padding-top: 20px; }
.cfg-ops .btn { min-width: 30px; padding-left: 6px; padding-right: 6px; }
.cfg-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, .08);
}
.cfg-dot.blue { background: var(--primary); }
.cfg-dot.green { background: var(--success); }
.cfg-dot.orange { background: var(--warning); }
.cfg-dot.red { background: var(--danger); }
.cfg-dot.gray { background: var(--text-3); }

/* ---- 阶段进度条（列表内 / 详情内共用） ---- */
.stage-bar { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 4px; }
.stage-seg {
  display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 5px; border-radius: 999px;
  background: var(--panel-3); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; cursor: pointer; transition: all .15s; user-select: none; white-space: nowrap;
}
.stage-seg .n {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; color: var(--text-3);
  font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
  border: 1px solid var(--border);
}
.stage-seg:hover { border-color: var(--primary-border); color: var(--primary); }
.stage-seg.done { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }
.stage-seg.done .n, .stage-seg.on .n { background: var(--primary); color: #fff; border-color: var(--primary); }
.stage-seg.on {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 1px 6px rgba(31, 56, 100, .22);
}

/* ---- 标记区 ---- */
.mark-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mark-badge { cursor: pointer; }
.mark-badge:hover { filter: brightness(.95); text-decoration: line-through; }
.mark-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mark-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1px dashed var(--border-strong); background: var(--panel); color: var(--text-2);
  font-size: 13px; cursor: pointer; transition: all .15s; user-select: none;
}
.mark-chip:hover { border-color: var(--primary); color: var(--primary); }
.mark-chip .at { font-size: 11px; opacity: .75; }
.mark-chip.on.c-blue { background: var(--info-light); border: 1px solid var(--primary-border); color: var(--primary); }
.mark-chip.on.c-green { background: var(--success-light); border: 1px solid #bbf7d0; color: var(--success); }
.mark-chip.on.c-orange { background: var(--warning-light); border: 1px solid #fde68a; color: var(--warning); }
.mark-chip.on.c-red { background: var(--danger-light); border: 1px solid #fecaca; color: var(--danger); }
.mark-chip.on.c-gray { background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--text); }
.mark-chip.on { font-weight: 600; }

/* ---- 客户关系（联系人 / 微信群） ---- */
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 760px) { .rel-grid { grid-template-columns: 1fr; } }
.rel-col {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2);
  padding: 10px 12px;
}
.rel-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.rel-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.rel-item > div:first-child { flex: 1; min-width: 0; }
.rel-item .btn { flex: none; }

/* ---- 客户关系图谱 ---- */
.graph-wrap {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
  padding: 6px; margin-bottom: 10px; overflow: auto;
}
.graph-svg { display: block; width: 100%; height: auto; min-width: 640px; }
.graph-svg text { font-family: var(--font); }

/* 表单里占满整行的单元格 */
.form-grid .full { grid-column: 1 / -1; }

/* 设置弹窗：名称 + 自动推进 左右并排，压缩高度 */
.cfg-inline { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
@media (max-width: 720px) { .cfg-inline { grid-template-columns: 1fr; } }

/* 设置弹窗：加宽版 + 左右两栏（阶段 / 标记）
   v0.22.0：宽度不再写死 1000px，跟着「弹框宽度」档位在基准上加 */
.modal.xl { width: calc(var(--modal-w, 620px) + 380px); max-width: 96vw; }
.cfg-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.cfg-cols .section-title { margin-top: 0; }
@media (max-width: 980px) { .cfg-cols { grid-template-columns: 1fr; } }

/* 表格里的阶段条/操作按钮要更紧凑，避免一列换行把行高撑开 */
.table .stage-seg { font-size: 11px; padding: 2px 8px 2px 4px; gap: 4px; }
.table .stage-seg .n { width: 13px; height: 13px; font-size: 9.5px; }
.table .actions { flex-wrap: nowrap; }
.table .actions .btn { padding-left: 9px; padding-right: 9px; }
.table .stage-seg .n { display: none; }
.table .stage-bar { gap: 3px; margin: 0; }

/* ============================================================
   v1.4.0 — 统一页面头部 / 二级菜单 / 灰显占位 / 设置面板
   ============================================================ */

/* ---- 页面头部：左侧标题+描述，右侧二级菜单 + 页面设置 ---- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head-main { min-width: 220px; flex: 1; }
.page-head .page-title { margin-bottom: 4px; }
.page-head .page-desc { margin-bottom: 0; }
.page-head-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: flex-end; flex: none; max-width: 100%;
}
.page-settings-btn { flex: none; }
/* v0.28.7（用户第 1 条）：工作台「布局」和「设置」两个图标按钮同款同宽 */
.page-head-actions .icon-btn.page-settings-btn { width: 32px; height: 32px; flex: none; }
.page-head-actions .icon-btn.page-settings-btn .ico-svg { width: 16px; height: 16px; }
.page-head-actions .icon-btn.page-settings-btn.active {
  color: var(--primary); border-color: var(--primary-border); background: var(--primary-light);
}

/* ---- 二级菜单（客户阶段的录入/各阶段/分析/图谱） ---- */
.subnav {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 10px; padding: 3px;
}
.subnav-item {
  border: none; background: transparent; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; color: var(--text-2); padding: 5px 11px; border-radius: 7px;
  white-space: nowrap;
}
.subnav-item:hover { background: var(--panel); color: var(--text); }
.subnav-item.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(31,56,100,.18); }
.subnav-list { display: flex; flex-direction: column; gap: 6px; }
.subnav-list .subnav-item { text-align: left; padding: 9px 12px; background: var(--panel-2); }
.subnav-list .subnav-item.active { background: var(--primary); color: #fff; }
.subnav-fold { flex: none; }

/* ---- 左侧导航：可折叠分组 + 未细化页面置黑（与「细化中」的正常彩色区分） ---- */
.nav-group .nav-title { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 5px; }
.nav-group .nav-title .fold { font-size: 9px; color: var(--text-3); width: 10px; }
.nav-group .nav-title:hover { color: var(--text-2); }
/* 未细化：文字与图标都压黑，明确告知「这个页面还没细化」 */
.nav-item.nav-todo { color: var(--text); }
.nav-item.nav-todo .nav-ico { filter: grayscale(1) brightness(0.35); opacity: 1; }
.nav-item.nav-todo:hover { background: var(--panel-3); color: var(--text); }
.nav-item.nav-todo.active { background: var(--panel-3); color: var(--text); font-weight: 600; }
.nav-item .todo-dot { background: var(--panel-3); color: var(--text-3); border-color: var(--border); }

/* ---- 未细化页面的提示条 ---- */
.todo-banner {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 9px 14px; border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-3);
  background: var(--panel-3); border: 1px dashed var(--border-strong);
}

/* ---- 设置面板里「字段 / 列」清单 ---- */
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
@media (max-width: 900px) { .cfg-grid { grid-template-columns: 1fr; } }
.cfg-grid .cfg-row { margin-bottom: 0; }
.cfg-name { font-size: 13px; color: var(--text); padding-top: 9px; }
.cfg-name .req { font-size: 10.5px; color: var(--primary); background: var(--primary-light); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.cfg-grid .cfg-idx { margin-top: 9px; }
.cfg-grid .cfg-ops { padding-top: 7px; }

/* ---- 筛选面板的日期范围 ---- */
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range .input { flex: 1; min-width: 0; }
.date-range .sep { font-size: 12px; color: var(--text-3); flex: none; }

/* ---- 登录页：管理员入口提示 ---- */
.auth-admin-tip {
  text-align: left;
  font-size: 12.5px; line-height: 1.75; color: var(--text-2);
  background: var(--primary-light); border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px;
}
.auth-foot .admin-login { font-weight: 600; color: var(--primary); }

/* ============================================================
   v1.4.1
   1) 设置弹窗改为折叠区块（默认只显示标题）
   2) 二级菜单支持「阶段目标」这种分组下挂
   3) 客户阶段工作台：应用图标入口 + 可增补功能（灰=规划中，亮=已上线）
   4) 字段/列名称点击即改、可新增自定义字段
   ============================================================ */

/* ---- 设置弹窗：折叠区块 ---- */
.cfg-sec {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel); margin-bottom: 8px; overflow: hidden;
}
.cfg-sec-head {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 11px 14px; user-select: none; background: var(--panel-2);
}
.cfg-sec-head:hover { background: var(--panel-3); }
.cfg-sec-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cfg-sec-badge {
  font-size: 11.5px; color: var(--text-3); background: var(--panel-3);
  border-radius: 10px; padding: 1px 8px;
}
.cfg-sec-badge:empty { display: none; }
.cfg-sec-arrow {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  transition: transform .18s ease; transform: rotate(-90deg);
}
.cfg-sec.open .cfg-sec-arrow { transform: rotate(0deg); }
.cfg-sec-body { display: none; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.cfg-sec.open .cfg-sec-body { display: block; }
/* v0.120.28：内容用 flex 布局的节（字段设置）—— 只在展开时 flex，别用内联 display 覆盖折叠 */
.cfg-sec.open .cfg-sec-body.cfg-sec-body-flex { display: flex; }
.cfg-sec-body > .page-desc:first-child { margin-bottom: 10px; }

/* ---- v0.11.0：二级折叠块（页面设置 / 设置页里的「字段设置」「标签设置」等） ---- */
/* v0.120.64（用户 4.2）：.cfg-sub 完全对齐线索页的 .cfg-sec ——
   以前是两套设计（浅灰卡+左箭头 vs 白卡+右箭头），所以文件管理等页面看起来不一样。 */
.cfg-sub {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel); margin-bottom: 8px; overflow: hidden;
}
.cfg-sub-head {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 11px 14px; user-select: none; background: var(--panel-2);
}
.cfg-sub-head:hover { background: var(--panel-3); }
.cfg-sub-head .input { margin-top: 0; background: var(--panel); }
.cfg-sub-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cfg-sub-arrow { font-size: 11px; color: var(--text-3); width: 12px; text-align: center; flex: none; order: 99; margin-left: auto; }   /* v0.120.64：箭头挪到右侧，和线索页一致 */
.cfg-sub-body { padding: 10px 12px 12px; border-top: 1px solid var(--border); background: var(--panel); }
.cfg-sub-body > .page-desc:first-child,
.cfg-sub-body > .hint:first-child { margin-bottom: 8px; }
.cfg-sub .cfg-row { background: transparent; }
.cfg-sub .cfg-sub { background: var(--panel-2); }
.cfg-sub-body .toolbar { margin-top: 8px; }

/* ---- 字段/列：名称点击改名、新增按钮 ---- */
.cfg-name-btn {
  border: 1px dashed transparent; background: transparent; cursor: text;
  font-family: var(--font); font-size: 13px; color: var(--text);
  text-align: left; padding: 2px 5px; border-radius: 5px; margin-top: 4px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cfg-name-btn:hover { border-color: var(--border-strong); background: var(--panel-2); }
.cfg-name-in { margin-top: 3px; }
.cfg-custom-tag {
  font-size: 10.5px; color: var(--primary); background: var(--primary-light);
  border-radius: 4px; padding: 0 4px; margin-left: 4px;
}
.cfg-add {
  border: 1px dashed var(--border-strong); background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 12.5px; color: var(--text-2);
  padding: 7px 10px; border-radius: var(--radius-sm); width: 100%;
}
.cfg-add:hover { border-color: var(--primary-border); color: var(--primary); background: var(--primary-light); }

/* ============================================================
   v0.23.0 全站统一「字段行」（用户第 2 条）
   ------------------------------------------------------------
   用户要求：线索 / 商机 / 客户档案 / 成交记录 / 记账……只要涉及「展示字段」的地方，
   都是一个样式：⠿ 拖动 + 名称 + 类型 + 勾选项 + ↑↓ + 删除；
   不要再出现「自动标 1/2/3」的圆圈序号（.cfg-idx 直接隐藏，老编辑器也一起统一）。
   ============================================================ */
/* ============================================================
   v0.23.0 列表页工具栏（用户第 7 条）
   ------------------------------------------------------------
   用户要求：搜索框 / 筛选 / 「＋ 记一笔」这几个按钮高度必须一样，
   顺序也要统一（以客户档案那一行为标准）：主按钮 → 搜索框 → 筛选 → 其它。
   凡是列表页的工具栏，加个 class="toolbar list-tb" 就统一了。
   ============================================================ */
.toolbar.list-tb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* v0.28.2（用户第 2 条）：进入多选后，操作条直接填在工具栏这一行的空位里（不另起一行、不顶列表） */
.toolbar.list-tb .grow { flex: 1 1 0; min-width: 0; }
.toolbar.list-tb.in-mode { flex-wrap: nowrap; min-height: 34px; margin-bottom: 16px; }
/* 多选期间这一行只留操作条：新增 / 搜索 / 筛选 都先收起来（选完自动回来），
   这样操作条能用整行宽度，不用把按钮挤成竖排字。 */
.toolbar.list-tb.in-mode > *:not(.tmp-slot) { display: none; }
.toolbar.list-tb.in-mode .tmp-slot { flex: 1 1 auto; width: 100%; min-width: 0; justify-content: flex-start; }
.toolbar.list-tb.in-mode .tmp-bar { width: auto; padding: 0 8px 0 12px; }
.toolbar.list-tb.in-mode .tmp-bar .btn { height: 28px; min-height: 28px; }
.toolbar.list-tb.in-mode .tmp-bar .input.tmp-name,
.toolbar.list-tb.in-mode .tmp-bar .select.tmp-select { height: 28px !important; min-height: 28px !important; }
.toolbar.list-tb.in-mode .tmp-bar .seg-row.tmp-feat { flex-wrap: nowrap; padding: 0; height: 28px; }
.toolbar.list-tb.in-mode .tmp-bar .input.tmp-name { width: 150px; }
.toolbar.list-tb .btn,
.toolbar.list-tb .input,
.toolbar.list-tb .select-trigger {
  height: 34px; min-height: 34px; padding-top: 0; padding-bottom: 0;
  font-size: 13px; box-sizing: border-box; line-height: 32px;
}
.toolbar.list-tb .btn { padding-left: 14px; padding-right: 14px; display: inline-flex; align-items: center; }
.toolbar.list-tb .btn-primary { padding-left: 16px; padding-right: 16px; }
.toolbar.list-tb .input { padding: 0 10px; }
.toolbar.list-tb .select-trigger { padding: 0 10px; }
.toolbar.list-tb .grow { flex: 1 1 auto; }
/* v0.24.0（用户第 6 条）：工具栏里的「筛选片 / 分段」也压到 34px，和按钮一样高 */
.toolbar.list-tb .filter-chip,
.toolbar.list-tb .chip,
.toolbar.list-tb .chips button,
.toolbar.list-tb .seg button {
  height: 34px; min-height: 34px; display: inline-flex; align-items: center;
  padding-top: 0; padding-bottom: 0; box-sizing: border-box;
}
.toolbar.list-tb .chips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* UI.chips() 自己就是一个 .toolbar（带 margin-bottom:16px），嵌在统一工具栏里要抹掉，不然整行高 16px */
.toolbar.list-tb > .toolbar { margin: 0; flex: none; }
.cfg-idx { display: none !important; }
/* v0.24.0：字段行单列竖排容器（替代旧的两列 cfg-grid，保证全站字段行一个样） */
.fe-list { display: flex; flex-direction: column; gap: 0; }
.fe-list > .fe-row { margin-bottom: 7px; }
.fe-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 9px; margin-bottom: 7px;
  border: 1px dashed var(--border); border-radius: 8px; background: var(--panel);
}
.fe-row:hover { border-color: var(--primary-border); }
.fe-row.dragging { opacity: .4; }
.fe-row.drop-b { box-shadow: inset 0 2px 0 0 var(--primary); }
.fe-row.drop-a { box-shadow: inset 0 -2px 0 0 var(--primary); }
.fe-row .fe-name { flex: 1 1 170px; min-width: 120px; height: 30px; }
.fe-row .fe-type { flex: none; width: 126px; }
.fe-row .fe-type .select-trigger { min-height: 30px; height: 30px; padding: 0 8px; font-size: 12.5px; }
.fe-chk {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.fe-chk input { width: 14px; height: 14px; margin: 0; }
.fe-ops { flex: none; display: flex; gap: 2px; align-items: center; margin-left: auto; }
/* v0.120.62（AI0001 第十七条）：字段行右侧固定两段 —— 「☑ 显示在页面」+「⚙ 设置」。
   所有列表展示类页面的五类字段（系统 / 共有 / 引用 / 自定义 / 智能计算）共用，
   右边界同一条竖线，设置按钮永远在最右。 */
.lk-field-row { flex-wrap: nowrap !important; align-items: center !important; }
.lk-field-row > .fe-name,
.lk-field-row > .fe-ro-name { flex: 0 0 auto; }
.lk-field-row > .fe-ro-meta,
.lk-field-row > .fe-meta-ro { flex: 1 1 auto; min-width: 0; white-space: normal; line-height: 1.45; }
.lk-ops {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px;
  margin-left: auto; justify-content: flex-end; min-width: 184px;
}
.lk-ops > .btn, .lk-ops .icon-btn { flex: none; }
.lk-show-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 88px; justify-content: flex-end;
  font-size: 11px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.lk-show-toggle input { width: 14px; height: 14px; margin: 0; }

.fe-ops .icon-btn { padding: 0 5px; height: 24px; line-height: 22px; font-size: 13px; }
.fe-panel {
  margin: -3px 0 10px; padding: 10px 12px;
  border: 1px solid var(--primary-border); border-radius: 8px; background: var(--primary-light);
}
/* 项目字段那一套（.pf-row）跟新行同样高度，两个入口看起来是一套东西 */
.pf-row .input, .pf-row .select-trigger { height: 30px; min-height: 30px; font-size: 12.5px; }
.pf-row .icon-btn { padding: 0 5px; height: 24px; line-height: 22px; font-size: 13px; }
/* 只读的字段组一览（共有字段 / 分组字段）：同一套行，灰一点、不能拖 */
.fe-row.fe-ro { background: var(--panel-2); cursor: default; }
.fe-ro-name { flex: none; min-width: 110px; font-weight: 600; font-size: 12.5px; color: var(--text); }
.fe-ro-meta { flex: none; font-size: 11.5px; color: var(--text-3); }
.fe-ro-list {
  flex: 1 1 120px; min-width: 0; text-align: right;
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cfg-sec-body .cfg-add { margin-top: 8px; }

/* v0.23.0（用户第 6 条）：账本行 —— 名称 + 时间 + ✕ 一行；
   v0.24.0（用户第 2 条）：时间多了「之后 / 之前 / 之间 / 不限」下拉，宽度不够时可换行 */
.fe-row.book-row { flex-wrap: wrap; gap: 7px; }
.fe-row.book-row .fe-name { flex: 1 1 150px; min-width: 90px; }
.fe-row.book-row .input[type="date"] { flex: none; width: 126px; padding: 0 6px; font-size: 12.5px; }
.fe-row.book-row > .hint { flex: none; }
.fe-row.book-row .fe-ops { margin-left: auto; }
.book-mode { flex: none; width: 108px; }

/* ===== v0.24.0（用户第 1、2、3 条）：字段行再补齐几种「同一个模子」的行 =====
   只读名称 / 只读类型 / 一句状态 / 行内额外按钮 —— 让智能字段、系统字段、引用字段、
   客户搜索字段看起来全是同一套东西。 */
.fe-name-ro {
  flex: 1 1 170px; min-width: 120px; height: 30px; line-height: 30px;
  font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fe-type-ro { flex: none; width: auto; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.fe-meta-ro {
  flex: 1 1 150px; min-width: 0; font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fe-extra { flex: none; display: flex; gap: 4px; align-items: center; }
.fe-row.fe-row-smart { background: var(--panel-2); }
.fe-row.fe-row-smart .fe-name { height: 30px; }
.fe-row.fe-row-search .fe-chk { flex: none; font-size: 11.5px; color: var(--text-2); }

/* ---- 二级菜单：分组（阶段目标 → 各阶段） ---- */
.subnav-group { position: relative; display: inline-flex; }
.subnav-group-btn .caret { font-size: 9px; opacity: .75; margin-left: 2px; }
.subnav-group.open .subnav-group-btn { background: var(--panel); color: var(--text); }
.subnav-group.open .subnav-group-btn.active { background: var(--primary); color: #fff; }
.subnav-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 168px; padding: 5px; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.subnav-menu-item {
  border: none; background: transparent; cursor: pointer; text-align: left;
  font-family: var(--font); font-size: 12.5px; color: var(--text-2);
  padding: 7px 10px; border-radius: 7px; white-space: nowrap;
}
.subnav-menu-item:hover { background: var(--panel-2); color: var(--text); }
.subnav-menu-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.subnav-list-group {
  font-size: 11.5px; color: var(--text-3); padding: 8px 12px 2px;
}
.subnav-list .subnav-item.sub-child { padding-left: 22px; }

/* ---- 客户阶段工作台 ---- */
.home-hero {
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--panel));
  border: 1px solid var(--primary-border);
}
.home-hero-t { font-size: 16px; font-weight: 700; color: var(--primary); }
.home-hero-d { font-size: 12.5px; color: var(--text-2); margin-top: 5px; line-height: 1.7; }

.app-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin: 4px 0 18px;
}
.app-tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 14px 14px; cursor: pointer; transition: all .16s ease;
  display: flex; flex-direction: column; gap: 3px;
}
.app-tile:hover {
  border-color: var(--primary-border); box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.app-tile-ico {
  width: 44px; height: 44px; border-radius: 13px; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); margin-bottom: 7px;
}
.app-tile-name { font-size: 14px; font-weight: 600; color: var(--text); }
.app-tile-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.app-tile-meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* ---- 可增补功能：灰=规划中，亮=已上线 ---- */
.home-plan {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 12px;
}
.home-plan-head { font-size: 14px; font-weight: 600; color: var(--text); }
.home-plan-desc { font-size: 12.5px; color: var(--text-2); margin: 5px 0 12px; line-height: 1.7; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 10px; }
.plan-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--panel-2);
  cursor: pointer; transition: all .15s ease; filter: grayscale(1);
}
.plan-card:hover { border-color: var(--border-strong); background: var(--panel-3); }
.plan-card.done {
  filter: none; background: var(--panel); border-color: var(--primary-border);
  box-shadow: 0 1px 3px rgba(31, 56, 100, .06);
}
.plan-card.done:hover { border-color: var(--primary); }
.plan-ico {
  width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--panel-3);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.plan-card.done .plan-ico { background: var(--primary-light); }
.plan-info { min-width: 0; }
.plan-name { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.plan-card.done .plan-name { color: var(--text); }
.plan-line { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-card.done .plan-line { color: var(--text-2); }
.plan-tag {
  font-size: 10.5px; font-weight: 400; color: var(--text-3);
  background: var(--panel-3); border-radius: 4px; padding: 0 5px;
}
.plan-tag.on { color: var(--success); background: var(--success-light); }
.plan-tag.want { color: var(--warning); background: var(--warning-light); }
.plan-detail-desc { font-size: 13px; line-height: 1.85; color: var(--text); }
.plan-detail-val {
  font-size: 12.5px; line-height: 1.8; color: var(--text-2);
  background: var(--panel-2); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 10px;
}
.plan-detail-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.plan-detail-tip { font-size: 12.5px; color: var(--text-2); }

/* ---- 阶段目标弹窗 ---- */
.stage-goal-row {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; background: var(--panel-2);
}
.stage-goal-row:hover { border-color: var(--primary-border); background: var(--primary-light); }
.stage-goal-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.stage-goal-desc { font-size: 12px; color: var(--text-2); line-height: 1.7; margin-top: 4px; }

/* 名称 + 标签同一行（否则「必填」会掉到名称下面一行） */
.cfg-name-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cfg-name-line .cfg-name-btn { margin-top: 0; }
.cfg-name-line .cfg-name-in { margin-top: 0; }
/* 已上线的可增补功能：左侧亮条，和灰色规划项区分开 */
.plan-card.done { border-left: 3px solid var(--primary); }

/* ===== v0.3.0 三级菜单：一级标题 → 二级标题 → 页面 ===== */
.nav-group .nav-sub {
  font-size: 11.5px; color: var(--text-3); padding: 6px 10px 2px;
  letter-spacing: .5px; font-weight: 600;
}
/* ===== v0.3.0 平台管理「各角色左侧菜单栏」配置面板（拖动排序） ===== */
.menu-block { border: 1px solid var(--border); border-radius: 10px; margin: 10px 0; overflow: hidden; }
.menu-block.drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.menu-block-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--panel-2); flex-wrap: wrap; }
.menu-sub-block { border-top: 1px dashed var(--border); }
.menu-sub-block.drag-over { background: var(--primary-light); }
.menu-sub-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; flex-wrap: wrap; }
.menu-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 24px;
  font-size: 13px; flex-wrap: wrap; border-top: 1px solid rgba(15, 23, 42, .05);
}
.menu-row.drag-over { background: var(--primary-light); }
.drag-handle { cursor: grab; color: var(--text-3); font-size: 15px; line-height: 1; user-select: none; padding: 0 2px; }
.drag-handle:active { cursor: grabbing; }
.drag-handle.dragging { opacity: .35; }
.menu-pool { border: 1px dashed var(--border); border-radius: 10px; margin-top: 16px; padding: 8px 10px 10px; background: var(--panel-2); }
.menu-pool-head { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.menu-pool .menu-row { padding-left: 4px; border-top: 1px solid rgba(15, 23, 42, .05); }

/* ===== v0.4.0 字段设置：分组折叠箭头（加大，好点） ===== */
.pf-arrow {
  flex: none; width: 24px; height: 24px; line-height: 22px; text-align: center;
  font-size: 15px; color: var(--text-2); cursor: pointer; border-radius: 6px; user-select: none;
}
.pf-arrow:hover { background: var(--panel-3); color: var(--text); }

/* ===== v0.4.0 侧边栏：有子项的页面可展开/收起 ===== */
.nav-item .nav-caret { margin-left: 5px; font-size: 10px; color: var(--text-3); }
/* ===== v0.7.0 字段设置：拖进分组时高亮整组（落点仍用那条蓝线） ===== */
.pf-group.drag-over { border-color: var(--primary) !important; box-shadow: 0 0 0 2px var(--primary-light); }
.pf-group-head { border-bottom: 1px solid rgba(15, 23, 42, .05); padding-bottom: 6px; }
.pf-row .icon-btn { padding: 0 5px; height: 22px; line-height: 20px; font-size: 13px; }

/* ===== v0.4.0 菜单配置拖动落点提示线（只有一个元素，不会闪） ===== */
.drag-line {
  position: absolute; height: 2px; background: var(--primary); border-radius: 2px;
  pointer-events: none; z-index: 5; box-shadow: 0 0 0 2px var(--primary-light);
  transition: top .05s linear;
}

/* ===== v0.12.1 列表表头的小齿轮：点开直接拖动排序 / 选显示哪些列 ===== */
.cols-gear {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 14px; line-height: 1; cursor: pointer; font-family: var(--font);
  transition: color .15s, border-color .15s, background .15s;
}
.cols-gear:hover { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.cols-gear:active { background: var(--panel-3); }

/* ===== v0.12.2 设置里的标签小牌：一行多个、自动换行、可拖动排序 ===== */
.tag-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px;
}
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  /* 约 8 个汉字的宽度；名字更长会自己撑开，窗口变窄自动换行少排几个 */
  flex: 0 1 auto; min-width: 8em; max-width: 16em;
  /* v0.12.4：改成「浅色胶囊」样式（圆角拉满 + 极浅底的自身色） */
  height: 32px; padding: 0 10px 0 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-3);
  font-size: 13.5px; color: var(--text); cursor: grab; user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tag-chip:hover { border-color: var(--primary-border, var(--border-strong)); background: var(--primary-light, var(--panel-3)); }
.tag-chip.dragging { opacity: .45; cursor: grabbing; }
.tag-chip.drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light, var(--panel-3)); }
.tag-chip .tag-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .08);
}
.tag-dot.blue { background: var(--primary); }
.tag-dot.green { background: var(--success); }
.tag-dot.orange { background: var(--warning); }
.tag-dot.red { background: var(--danger); }
.tag-dot.gray { background: var(--text-3); }
.tag-dot.purple { background: #7C3AED; }
.tag-chip-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text;
}
.tag-chip-edit {
  flex: 1; height: 24px; padding: 0 4px; font-size: 13.5px; border-radius: 5px; min-width: 0;
}
.tag-chip-x {
  flex: none; font-size: 12px; color: var(--text-3); cursor: pointer; padding: 0 2px; line-height: 1;
}
.tag-chip-x:hover { color: var(--danger); }

/* ===== v0.12.4 标签颜色选择浮层：20 个预置色 + 自定义 ===== */
.tag-picker {
  background: var(--panel); border: 1px solid var(--border-strong, var(--border));
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; width: 268px;
}
.tag-picker-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tag-picker-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.tag-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.tag-swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel); }
.tag-picker-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border); flex-wrap: wrap;
}
.tag-color-input {
  width: 34px; height: 28px; padding: 0; border: 1px solid var(--border);
  border-radius: 6px; background: none; cursor: pointer;
}

/* ===== v0.12.2 金额算式：输入框下面的「270*6 = 1620」过程行 ===== */
.amount-expr {
  margin-top: 3px; font-size: 12px; color: var(--primary); letter-spacing: .2px;
}

/* ===== v0.21.0 阶段标签：按「开始% ~ 结束%」三段上色 =====
   0% ~ 开始%     走过的部分（灰）
   开始% ~ 结束%  本阶段（主色，高亮）
   结束% ~ 100%   还没到（留白）
   实现：整个胶囊铺一层很淡的三段底色，底边再压一条 4px 的实色进度线 ——
   底色负责「一眼看出大概」，实线负责「看得准」。--s = 开始%，--e = 结束%。 */
.st-badge {
  position: relative; display: inline-flex; align-items: center; max-width: 100%;
  min-width: 96px; padding: 3px 9px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2);
  font-size: 12px; line-height: 15px; color: var(--text-2);
  overflow: hidden; white-space: nowrap; vertical-align: middle;
}
.st-badge .st-bg {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to right,
    rgba(148, 163, 184, .42) 0%,
    rgba(148, 163, 184, .42) var(--s, 0%),
    var(--primary) var(--s, 0%),
    var(--primary) var(--e, 100%),
    rgba(0, 0, 0, 0) var(--e, 100%),
    rgba(0, 0, 0, 0) 100%);
  opacity: .16;
}
/* 底边那条实色进度线：灰 → 主色 → 空 */
.st-badge .st-line {
  position: absolute; left: 0; right: 0; bottom: 0; height: 5px; pointer-events: none;
  background: linear-gradient(to right,
    rgba(148, 163, 184, .75) 0%,
    rgba(148, 163, 184, .75) var(--s, 0%),
    var(--primary) var(--s, 0%),
    var(--primary) var(--e, 100%),
    rgba(0, 0, 0, 0) var(--e, 100%),
    rgba(0, 0, 0, 0) 100%);
}
.st-badge .st-tx { position: relative; display: inline-flex; align-items: center; gap: 5px; z-index: 1; }
.st-badge .st-name { font-weight: 600; color: var(--text); }
.st-badge .st-pct { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.st-badge .st-manual-tag {
  font-size: 10px; padding: 0 4px; border-radius: 4px;
  background: var(--panel); color: var(--text-3); border: 1px solid var(--border);
}
/* 进度条样式：方正一点，底色更实 */
.st-badge.st-bar { border-radius: 6px; padding: 5px 10px 9px; }
.st-badge.st-bar .st-bg { opacity: .26; }
.st-badge.st-bar .st-line { height: 7px; }
/* 圆点样式：左边一个小圆点 */
.st-badge.st-dot { min-width: 0; padding: 3px 9px 8px 19px; }
.st-badge.st-dot .st-bg { opacity: .12; }
.st-badge.st-dot::before {
  content: ''; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px;
  margin-top: -6px; border-radius: 50%; background: var(--primary); z-index: 1; opacity: .85;
}
/* 纯文字样式：没有胶囊底色，只留底部的进度线 */
.st-badge.st-text { background: transparent; border-color: transparent; padding: 2px 2px 9px; min-width: 0; }
.st-badge.st-text .st-bg { display: none; }
.st-badge.st-text .st-line { left: 2px; right: 2px; border-radius: 2px; }

/* ===== v0.21.0 服务阶段设置弹窗 ===== */
.stage-fx-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 4px;
  padding: 9px 11px; border: 1px solid var(--primary-border); background: var(--primary-light);
  border-radius: 10px;
}
.stage-fx-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.stage-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 6px 9px; margin-bottom: 7px;
  border: 1px dashed var(--border); border-radius: 8px; background: var(--panel);
}
.stage-row:hover { border-color: var(--primary-border); }
/* v0.23.0（用户第 4 条）：「⚙ 设置」展开的面板 —— 阶段目标 / 自动条件 / 预览 / 上移下移删除 */
.stage-set {
  margin: -3px 0 10px; padding: 10px 12px;
  border: 1px solid var(--primary-border); border-radius: 8px; background: var(--primary-light);
}
.stage-set .field { margin-bottom: 8px; }
.stage-set-pv { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; flex-wrap: wrap; }
.stage-set-pv .stage-pv { margin-left: 0; min-width: 150px; }
.stage-point-tag {
  font-size: 10.5px; color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary-border); border-radius: 4px; padding: 0 4px; margin-left: 2px;
}
.stage-band { display: inline-flex; align-items: center; gap: 3px; }
.stage-band-sep, .stage-band-pct { font-size: 12px; color: var(--text-3); }

/* ===== v0.24.0（用户第 8 条）：每个阶段自己的颜色 + 每行后面的实时预览 ===== */
.stage-dot-btn {
  width: 14px; height: 14px; border-radius: 50%; flex: none; cursor: pointer;
  display: inline-block; box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 0 0 2px var(--panel) inset;
}
.stage-dot-btn:hover { transform: scale(1.15); }
.stage-pv-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -3px 0 8px 6px; padding: 0 0 0 8px;
  border-left: 2px solid var(--border);
}
.stage-pv-cap { font-size: 11px; color: var(--text-3); flex: none; }
.stage-color-box { margin: 8px 0 4px; }
.stage-color-cap { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.stage-color-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.stage-sw {
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer; padding: 0;
  border: 1px solid rgba(0, 0, 0, .12); box-sizing: border-box;
}
.stage-sw.on { box-shadow: 0 0 0 2px var(--primary), 0 0 0 3px var(--panel) inset; }
.stage-cell .sc-manual.sc-auto { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.stage-chk {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.stage-pv { min-width: 110px; margin-left: 0; display: flex; align-items: center; }
/* v0.25.0（用户第 4.2 条）：预览和「⚙ 设置」靠右，名称/百分比在左 */
.stage-grow { flex: 1 1 auto; min-width: 8px; }
.stage-row .stage-pv { flex: none; }
.stage-look-cap { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 8px 0 4px; }
.stage-look-gap { margin-top: 10px; }

/* ===== v0.21.0 阶段条（CRM 线索 / 商机 / 客户阶段）：按区间宽度分段 ===== */
.table .stage-bar { flex-wrap: nowrap; }
.table .stage-bar .stage-seg { overflow: hidden; }
.table .stage-bar .stage-seg .t { overflow: hidden; text-overflow: ellipsis; }
.stage-bar-pct {
  font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums;
  letter-spacing: .2px; padding-left: 2px;
}

/* v0.21.0 阶段设置行：名称/区间/目标/条件在第一行，样式/显示%/预览/操作固定第二行 */
.stage-ops {
  flex: 1 1 100%; display: flex; align-items: center; gap: 6px;
  margin-top: 2px; flex-wrap: wrap;
}

/* ===== v0.22.0 设置页「弹框宽度」档位卡片 =====
   每张卡片里画一个小屏幕：灰底 = 窗口，右侧色块 = 抽屉占多宽（按档位比例）。
   不写具体像素，用户凭视觉挑，避免「填个 1370 结果表单挤成一条」。 */
.modalw-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px; margin: 10px 0 6px;
}
.modalw-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 9px 9px;
  background: var(--panel); cursor: pointer; transition: all .15s;
}
.modalw-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); }
.modalw-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.modalw-pv {
  position: relative; height: 52px; border-radius: 6px; overflow: hidden;
  background: var(--bg-2, #f1f5f9); border: 1px solid var(--border);
}
.modalw-pv::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 26px;
  background: repeating-linear-gradient(180deg, rgba(148,163,184,.35) 0 3px, transparent 3px 8px);
}
.modalw-side {
  position: absolute; right: 0; top: 0; bottom: 0;
  background: var(--primary); opacity: .26;
  border-left: 2px solid var(--primary);
}
.modalw-name { font-size: 12.5px; font-weight: 600; margin-top: 6px; color: var(--text); }
.modalw-desc { font-size: 11px; color: var(--text-3); line-height: 1.5; margin-top: 1px; }

/* ============================================================
   v0.22.0 阶段单元格（.stage-cell）—— 全站统一
   ------------------------------------------------------------
   用户第 4 条：以前成交记录里每行的阶段标签宽度跟着文字长短变，一列里参差不齐。
   现在所有阶段展示都套在同一个固定宽度的外框里（默认 132px），只换「里面的画法」：
     seg   分段条（默认）  整条按阶段分段，当前段高亮
     track 进度条          一条细轨道，当前区间着色
     pill  胶囊            定宽胶囊 + 三段淡底 + 底边实线
     dot   圆点            一个色点 + 名称
     text  纯文字          名称 + 细线
   三段配色：--s = 开始%，--e = 结束%
     0~开始   走过（灰）
     开始~结束 本阶段（主色 --sc-on）
     结束~100  还没到（留白）
   关掉「进度着色」（.sc-plain）时 --sc-on 变灰，只保留分段/轨道形状。
   ============================================================ */
.stage-cell {
  --sc-on: var(--primary, #2E75B6);
  /* 走过的段：主色的淡版（和「本阶段」是同一个色系，一眼看出「已经推到这里」）；
     不支持 color-mix 的老浏览器退回灰色 */
  --sc-done: rgba(46, 117, 182, .40);
  --sc-done: color-mix(in srgb, var(--primary, #2E75B6) 40%, transparent);
  --sc-off: rgba(148, 163, 184, .14);
  position: relative; display: flex; flex-direction: column; justify-content: center;
  /* v0.105.0（用户 4）：列窄的时候跟着列宽缩，不再压到隔壁列 */
  width: 100%; min-width: 0; max-width: 148px;
  box-sizing: border-box; padding: 2px 0; vertical-align: middle;
  font-size: 12px; line-height: 15px; color: var(--text-2);
  white-space: nowrap; overflow: hidden;
}
.stage-cell.sc-plain { --sc-on: var(--text-3, #9ca3af); --sc-done: rgba(148, 163, 184, .45); }
.stage-cell .sc-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.stage-cell .sc-name {
  font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0;
}
.stage-cell .sc-pct {
  font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none;
}
.stage-cell .sc-manual {
  font-size: 9px; line-height: 12px; padding: 0 2px; border-radius: 3px; flex: none;
  background: var(--panel); color: var(--text-3); border: 1px solid var(--border);
}

/* ① 分段条 */
/* ① 分段条 / ② 进度条 / ④ 圆点 / ⑤ 纯文字：同一条「三级比例轨道」
   0~开始 最深（干完了）｜ 开始~结束 普通（正在做）｜ 结束~100 最淡（还没做）
   点阶段（开始=结束）自动变成一根刻度，0~点 最深、点~100 最淡 */
.stage-cell .sc-rail {
  position: relative; height: 5px; border-radius: 3px; margin-top: 4px;
  background: var(--sc-off); overflow: hidden;
}
.stage-cell .sc-rail.sc-rail-tall { height: 8px; }
.stage-cell .sc-fill {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right,
    var(--sc-done) 0 var(--s, 0%),
    var(--sc-on) var(--s, 0%) var(--e, 100%),
    transparent var(--e, 100%) 100%);
}
.stage-cell .sc-tick {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--panel, #fff); border-radius: 1px; transform: translateX(-1px);
}
.stage-cell .sc-point {
  position: absolute; top: 50%; width: 3px; height: 9px; margin-top: -4.5px;
  border-radius: 2px; background: var(--text-3); transform: translateX(-1.5px); opacity: .75;
}
.stage-cell .sc-point.cur { background: var(--sc-on); height: 13px; margin-top: -6.5px; opacity: 1; }
/* v0.120.11（用户 1.4）：阶段点名称是一行文字，不能再被 .sc-point 的竖线样式吃掉 */
.stage-cell .sc-pointname {
  position: static; width: auto; height: auto; margin-top: 1px;
  background: none; opacity: 1; transform: none;
  font-size: 10px; line-height: 1.3; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stage-cell.sc-seg .sc-rail { height: 8px; }

/* ② 进度条 / ⑤ 纯文字：共用一条轨道（三段渐变） */
.stage-cell .sc-track {
  height: 5px; border-radius: 2px; margin-top: 3px;
  background-color: var(--sc-off);
  background-image: linear-gradient(to right,
    var(--sc-done) 0 var(--s, 0%),
    var(--sc-on) var(--s, 0%) var(--e, 100%),
    transparent var(--e, 100%) 100%);
}



/* ③ 胶囊 */
.stage-cell.sc-pill {
  padding: 4px 7px 7px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel-2, #f8fafc);
}
/* v0.25.0（用户第 4.1 条）：胶囊原来用「当前色 + 淡版」两段拼，选「最深颜色给已经干完的」
   时两段颜色一样，看不出区别（就是用户看到的「预览错误」）。改成和轨道同一套多段渐变
   --sc-grad（每个阶段自己的颜色 + 深浅按 deepOn 算），三种配色逻辑从此一致。 */
.stage-cell.sc-pill .sc-bg {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .16;
  background-image: var(--sc-grad, linear-gradient(to right, var(--sc-on) 0 100%));
}
.stage-cell.sc-pill .sc-underline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 0 0 999px 999px;
  background-image: var(--sc-grad, linear-gradient(to right, var(--sc-on) 0 100%));
}
.stage-cell.sc-pill .sc-tx { position: relative; display: flex; align-items: center; gap: 5px; min-width: 0; z-index: 1; }

/* ④ 圆点 */
.stage-cell.sc-dot .sc-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sc-on); flex: none; opacity: .9;
}


/* 表格里再收一点，保证行高不被撑开 */
.table .stage-cell { padding: 0; }
.table .stage-cell.sc-pill { padding: 3px 8px 6px; }

/* ===== v0.22.0 列表显示设置：「还没显示的列」按字段来源分组 =====
   组顺序 = 设置 → 字段标签里排的顺序（用户第 5 条） */
.pool-group-title {
  display: flex; align-items: center; gap: 6px; margin: 12px 0 2px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.pool-group-title .hint { font-weight: 400; }

/* ===== v0.22.0 阶段编辑器：「列表里的样子」+ 整条预览 ===== */
.stage-look {
  margin: 8px 0 4px; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--panel-2, #f8fafc);
}
.stage-look-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px;
}
.stage-demo {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 6px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px;
  background: var(--panel);
}
.stage-demo-cap { font-size: 11.5px; color: var(--text-3); }

/* ===== v0.24.0（用户第 10 条）：服务记录截图（粘贴 / 拖入 / 选文件） =====
   v0.25.0（用户第 9 条）：拆成「粘贴截图」+「上传文件」两块，下面加一条上传成功的反馈 */
.shot-zones { display: flex; gap: 8px; align-items: stretch; }
.shot-zones.on .shot-zone { border-color: var(--primary); background: var(--primary-soft, #eff6ff); }
.shot-zone {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 0; min-width: 0; padding: 12px; border: 1.5px dashed var(--border);
  border-radius: 10px; background: var(--panel-2, #f8fafc); cursor: pointer;
  outline: none; transition: border-color .15s, background .15s;
}
.shot-zone-main { min-width: 0; }
.shot-zone:hover, .shot-zone:focus, .shot-zone.on { border-color: var(--primary); background: var(--primary-soft, #eff6ff); }
.shot-zone-ico { font-size: 20px; line-height: 1.2; flex: none; }
.shot-zone-t { font-size: 13px; color: var(--text); font-weight: 500; }
.shot-zone-h { font-size: 11.5px; color: var(--text-3, #9ca3af); margin-top: 2px; }
/* 上传成功的反馈（黄框） */
.shot-done {
  margin-top: 8px; padding: 7px 10px; border-radius: 8px; font-size: 12.5px;
  background: var(--warning-light); border: 1px solid #fde68a; color: var(--warning);
}
.shot-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shot-cell { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.shot-cell-sm { width: 72px; height: 72px; }
/* 附件（非图片）：不是缩略图，是一条小卡片 */
.shot-cell-file { width: 148px; height: auto; min-height: 58px; overflow: visible; }
.shot-file-chip { display: flex; flex-direction: column; gap: 2px; padding: 8px 22px 8px 9px; height: 100%; }
.shot-file-ico { font-size: 15px; line-height: 1.1; }
.shot-file-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-file-size { font-size: 11px; color: var(--text-3, #9ca3af); }
.shot-thumb { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot-thumb-none { display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-3); }
.shot-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px;
  border: none; border-radius: 50%; background: rgba(17,24,39,.62); color: #fff;
  font-size: 11px; cursor: pointer; padding: 0; z-index: 2;
}
.shot-del:hover { background: rgba(185,28,28,.9); }
/* 记录行右侧的「更改 / 删除」：两个按钮一样大 */
.log-ops { display: flex; gap: 6px; align-self: flex-start; flex: none; }
.log-ops .btn { min-width: 58px; }

/* ===== v0.25.0（用户第 16 条）：字段标签的点击气泡 + 颜色色点 ===== */
.ftag-bubble {
  z-index: 4000; max-width: 290px; padding: 8px 11px; font-size: 12.5px; line-height: 1.65;
  background: var(--panel); color: var(--text-1); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.16); white-space: normal;
}
.ft-color-dot { outline: none; }
.ft-color-dot:hover { transform: scale(1.15); }
.ft-row .chips { margin-bottom: 0; }

/* ===== v0.25.0（用户第 14 条）：工单 —— 分组、对话、附件 ===== */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-2); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tk-group-hd { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.tk-group-hd:first-child { margin-top: 0; }
.tk-group-t { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.tk-group-c {
  min-width: 20px; height: 18px; line-height: 18px; text-align: center; padding: 0 6px;
  border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2);
}
/* 详情头部 */
.tk-head { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tk-head-t { font-size: 16px; font-weight: 600; line-height: 1.4; }
.tk-head-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.tk-head-b { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tk-kv { margin-bottom: 6px; }
/* 对话 */
.tk-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.tk-msg { display: flex; flex-direction: column; gap: 5px; max-width: 100%; }
.tk-msg-hd { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.tk-msg-hd b { color: var(--text-1); font-size: 12.5px; font-weight: 600; }
.tk-msg-bd {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 8px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text-1);
}
.tk-msg.mine .tk-msg-bd { background: var(--panel); border-color: var(--border); padding: 6px 8px; }   /* v0.120.59：去掉蓝底，和问题输入框同款 */
.tk-msg.tk-sys { align-items: center; }
.tk-sys-t { font-size: 11.5px; color: var(--text-3); background: var(--panel-2); border-radius: 12px; padding: 3px 10px; }
.tk-tag-in { color: #B54708; background: #FFFAEB; border: 1px solid #FEDF89; border-radius: 4px; padding: 0 5px; font-size: 10.5px; }
.tk-tag-fw { color: #175CD3; background: #EFF8FF; border: 1px solid #B2DDFF; border-radius: 4px; padding: 0 5px; font-size: 10.5px; }
/* 附件 */
.tk-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tk-img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; background: #fff; }
.tk-file {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px;
  background: var(--panel); font-size: 12px; cursor: pointer;
}
.tk-file:hover { border-color: var(--primary); }
.tk-file-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-file-s { color: var(--text-3); font-size: 11px; flex: none; }
/* 操作条 */
.tk-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
/* 我的服务里的工单小行 */
.tk-mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.tk-mini-t { flex: 1; }
.tk-msg .btn { align-self: flex-start; margin-top: 2px; }
.tk-msg-hd .tk-tag-in, .tk-msg-hd .tk-tag-fw { line-height: 15px; }

/* ===== v0.25.0（用户第 10 条）：记账「记收入 / 记支出」胶囊按钮 ===== */
.pill-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 15px 0 5px;
  border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--pill-c, #2E75B6) 32%, transparent);
  background: color-mix(in srgb, var(--pill-c, #2E75B6) 9%, var(--panel, #fff));
  color: var(--pill-c, #2E75B6);
  transition: background .16s, box-shadow .16s, transform .1s;
}
.pill-btn:hover { background: color-mix(in srgb, var(--pill-c, #2E75B6) 16%, var(--panel, #fff)); box-shadow: 0 1px 6px color-mix(in srgb, var(--pill-c, #2E75B6) 22%, transparent); }
.pill-btn:active { transform: translateY(1px); }
.pill-btn .pill-ico {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pill-c, #2E75B6); color: #fff; font-size: 12px; line-height: 1;
}

/* ============ v0.26.0（用户第 6 条）：记账页「记收入 / 记支出」按钮的几种预置风格 ============
   同一个 .pill-btn，换 class 变样子；图标实心/空心由 .ico-line 控制。
   pill（默认）= 浅底胶囊 + 实色圆图标；soft = 浅底圆角无圆标；solid = 整块实色白字；plain = 白底描边。 */
.pill-btn.v-soft {
  border-radius: 9px; padding: 0 14px; gap: 6px;
  border-color: color-mix(in srgb, var(--pill-c, #2E75B6) 24%, transparent);
  background: color-mix(in srgb, var(--pill-c, #2E75B6) 10%, var(--panel, #fff));
}
.pill-btn.v-soft:hover { background: color-mix(in srgb, var(--pill-c, #2E75B6) 17%, var(--panel, #fff)); }
.pill-btn.v-soft .pill-ico {
  width: auto; height: auto; border-radius: 0; background: none; color: inherit;
  font-size: 14px; font-weight: 700;
}
.pill-btn.v-solid {
  border-radius: 8px; padding: 0 14px;
  background: var(--pill-c, #2E75B6); color: #fff;
  border-color: transparent;
}
.pill-btn.v-solid:hover { background: color-mix(in srgb, var(--pill-c, #2E75B6) 86%, #000); }
.pill-btn.v-solid .pill-ico { background: rgba(255, 255, 255, .22); color: #fff; }
.pill-btn.v-plain {
  border-radius: 8px; padding: 0 14px;
  background: var(--panel, #fff); color: var(--pill-c, #2E75B6);
  border: 1px solid color-mix(in srgb, var(--pill-c, #2E75B6) 45%, transparent);
}
.pill-btn.v-plain:hover { background: color-mix(in srgb, var(--pill-c, #2E75B6) 8%, var(--panel, #fff)); }
.pill-btn.v-plain .pill-ico { background: color-mix(in srgb, var(--pill-c, #2E75B6) 14%, transparent); color: var(--pill-c, #2E75B6); }
/* 空心图标：只有一圈描边 */
.pill-btn.ico-line .pill-ico {
  background: transparent !important;
  border: 1.5px solid var(--pill-c, #2E75B6);
  color: var(--pill-c, #2E75B6);
}
.pill-btn.v-solid.ico-line .pill-ico { border-color: #fff; color: #fff; }

/* ===== v0.26.0（用户第 8 条）：工单内容设置 / 开单提示 ===== */
.sub-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 14px 0 8px; padding-left: 8px;
  border-left: 3px solid var(--primary); line-height: 1.2;
}
.ticket-intro {
  background: var(--primary-weak, #EAF2FB);
  border: 1px solid var(--primary-border, #CFE0F3);
  border-radius: 8px; padding: 9px 11px; margin: 6px 0 10px;
  font-size: 12.5px; line-height: 1.6; color: var(--text-2);
}
.row-wrap { display: flex; flex-wrap: wrap; gap: 14px; }
.row-item { display: flex; align-items: center; gap: 6px; }

/* ===== v0.26.0（用户第 17 条）：全站界面设计统一 ===== */
.ds-card { margin-bottom: 10px; }
.ds-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ds-code {
  font: 600 11.5px/1 ui-monospace, Menlo, Consolas, monospace;
  color: #fff; background: var(--primary, #2E75B6);
  border-radius: 5px; padding: 4px 7px; letter-spacing: .3px;
}
.ds-bd { display: flex; gap: 14px; padding: 10px 12px; align-items: flex-start; flex-wrap: wrap; }
.ds-left { flex: 1 1 300px; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.ds-adv {
  font-size: 12.5px; line-height: 1.65; color: var(--text-2);
  background: var(--primary-weak, #EAF2FB); border-left: 3px solid var(--primary, #2E75B6);
  border-radius: 0 6px 6px 0; padding: 7px 10px;
}
.ds-right { flex: 0 0 340px; max-width: 100%; }
.ds-sample {
  border: 1px dashed var(--border); border-radius: 8px; padding: 10px;
  background: var(--bg-soft, #FAFBFC); min-height: 46px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px;
}
.ds-sample .table-wrap { margin: 0; }

/* v0.27.0（用户第 1 条）：列表显示设置里的眼睛按钮 —— 显示中 = 正常眼睛；不显示 = 灰色闭眼 */
  /* v0.27.0（用户第 12 条）：「⋯ 更多」菜单 + 弹窗正文末尾的删除行 */
  .more-wrap { display: inline-flex; }
  .more-menu {
    background: var(--panel, #fff);
    border: 1px solid var(--line, var(--border, #e5e7eb));
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
    padding: 4px;
    max-height: 280px;
    overflow: auto;
  }
  .more-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
  }
  .more-item:hover { background: var(--panel-3, #f3f4f6); }
  .more-item.danger { color: var(--danger, #B42318); }
  .more-item.danger:hover { background: rgba(180, 35, 24, .08); }
  .pj-del-row {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border, #e5e7eb);
    display: flex;
    justify-content: flex-start;
  }
/* ============================================================
   v0.27.0（用户第 23 条）：全站界面设计统一 —— 三个通用类
   · .card-inline ：手写的「描边小卡片」统一成这个（D-09）
   · .mini-title  ：板块内的二级小标题（D-04）
   · .fe-row.line / .fe-row.box ：列表行 / 带框行（D-22）
   ============================================================ */
.card-inline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.mini-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
.fe-row.line { border-bottom: 1px dashed var(--border); }
.fe-row.box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

/* D-19：页面顶部长说明自动折叠（超过两行 → 两行 + 「展开」，点一下展开 / 收起） */
.page-desc.clampable {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  padding-right: 54px;
}
.page-desc.clampable::after {
  content: '展开 ▾';
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 2px 0 12px;
  background: var(--bg);
  color: var(--primary);
  font-size: 12.5px;
}
.page-desc.clampable.open {
  display: block;
  padding-right: 0;
}
.page-desc.clampable.open::after {
  content: '收起 ▴';
  position: static;
  display: inline-block;
  margin-left: 6px;
  padding: 0;
  background: transparent;
}

.eye-btn { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.eye-btn.eye-off { color: var(--text-3); background: var(--panel-3); border-color: transparent; }
.eye-btn.eye-off:hover { color: var(--danger, #d9534f); border-color: var(--danger, #d9534f); }

/* ===== v0.27.1（用户第 12 条）：设置页板块风格统一 =====
   以前每个板块是一张「带边框的卡片」，展开后又是一层白卡片，层级多、看着碎。
   现在统一成：标题就是一条浅灰的行（无边框、圆角 10px），展开后内容落在白底上，
   行与行之间只留 6px —— 和「成交记录 · 设置」那种紧凑条目的观感一致。 */
.cfg-sec {
  border: 0 !important; border-radius: 10px;
  background: var(--panel-2); margin-bottom: 6px;
}
.cfg-sec-head { padding: 10px 14px; background: transparent; }
.cfg-sec-head:hover { background: var(--panel-3); }
.cfg-sec-title { font-size: 13px; }
.cfg-sec-badge { background: transparent; padding: 0 0 0 2px; }
.cfg-sec-body { border-top: 0; background: var(--panel); padding: 10px 14px 14px; }

/* v0.120.69（用户 3）：**按实测值逐项对齐 .cfg-sec** ——
   上一版只是"看起来像"，实际量出来 6 项都不同：
     圆角 8 vs 12、下间距 8 vs 6、标题栏底色 #F8FAFC vs #F3F4F6、
     标题栏圆角 0 vs 10、标题栏下边框 1 vs 0、内容区底色 白 vs 透明。
   现在全部照抄实测值，不再靠肉眼接近。 */
.cfg-sub {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); margin-bottom: 6px;
}
.cfg-sub-head {
  padding: 10px 14px; background: var(--primary-light);
  border-radius: 10px 10px 0 0; border-bottom: 0;
}
.cfg-sub-head:hover { background: var(--panel-3); }
.cfg-sub-body { border-top: 0; background: transparent; padding: 10px 14px 14px; }
.cfg-sub .cfg-sub {
  border: 0; border-radius: 0; background: transparent; margin-bottom: 0;
}
.cfg-sub .cfg-sub > .cfg-sub-head { background: transparent; border-radius: 0; border-bottom: 1px solid var(--border); }
.cfg-sub .cfg-sub > .cfg-sub-head:hover { background: var(--panel-2); }
.cfg-sub .cfg-sub > .cfg-sub-body { padding: 6px 0 8px; }
.cfg-sub .cfg-sub { background: var(--panel-2); }

/* 设置页最外层分组（平台设置 / 账号与资料 …）也走同一套 */
.fold-group { border: 0 !important; background: transparent; margin-bottom: 10px; }

/* ============================================================
   v0.27.2（用户第 6 条）：板块用「淡淡的灰底」区分，背景跟随主题
   —— 以前是一堆描边小卡片，看着碎、也分不清哪块是一组。
   用法：把一组内容包进 <div class="card-block">，第一行放 .mini-title 当标题，
   板块之间不加编号（①②③ 这种），标题够了。
   ============================================================ */
.card-block {
  border: 0;
  border-radius: 10px;
  background: var(--panel-2);
  padding: 12px 14px 14px;
  margin-bottom: 10px;
}
.card-block > .mini-title {
  margin-bottom: 4px;
  font-size: 13.5px;
}
.card-block > .hint:first-of-type { margin-top: 0; }
/* 板块里的输入框用白底，和灰底拉开层次（深色主题自动跟着变） */
.card-block .input,
.card-block select,
.card-block textarea { background: var(--panel); }
/* 板块里再套一层字段行时，去掉多余的余量 */
.card-block > .field:last-child { margin-bottom: 0; }
/* ============================================================
   v0.27.3（用户第 5 条）：设置页版式 —— 严格对齐「成交记录 · 设置」
   规则（四级）：
     ① 整个页面背景：白色（.content.settings-page）
     ② 一级标题：淡灰底条（.fold-group-head）
     ③ 二级标题：淡灰底条（.fold-card > .fold-head）
     ④ 三级标题：淡灰底条（.cfg-sub-head）
     ⑤ 内容：白底，缩进贴在标题下面
   · 鼠标移到任何一级标题上，底色加深一档（--panel-2 → --panel-3）
   · 标题字重 600、正文字号 13.5、说明文字 --text-3，按钮主色 --primary
   ============================================================ */

/* ① 设置页整页白底（其它页面仍是 --bg 浅灰） */
.content.settings-page { background: var(--panel); }

/* ② 一级标题：淡灰底条 */
.fold-page > .fold-group { margin: 0 0 14px !important; border: 0 !important; background: transparent !important; }
.fold-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px !important;
  /* v0.29.2（用户第 3 条）：一级标题底色加深到「左侧菜单鼠标经过」那个色（--panel-3）；
     它本身是跟主题走的变量，换主题自动跟着变，不用手写颜色。 */
  background: var(--panel-3) !important;
  border: 0 !important;
  border-radius: var(--radius) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  text-align: left;
  cursor: pointer !important;
  transition: background .12s;
}
.fold-group-head:hover { background: color-mix(in srgb, var(--primary) 12%, var(--panel-3)) !important; }
/* v0.28.7（用户第 2 条）：一级标题和二级标题要一眼分得开 ——
   一级加一道主题色竖条、字号略大；二级留在缩进里（--fold-group-body 左缩进 14px） */
/* v0.28.8（用户第 2 条）：这两道竖条只在调试模式（.sl-edit）里出现 —— 关掉调试模式后标题前面不留标记 */
.settings-root.sl-edit .fold-page > .fold-group > .fold-group-head,
.sl-edit .fold-page > .fold-group > .fold-group-head { border-left: 3px solid var(--primary) !important; padding-left: 12px !important; }
.settings-root.sl-edit .fold-group-body > .fold-group > .fold-group-head { border-left: 3px solid var(--primary-border) !important; font-size: 13px !important; }

/* v0.29.0（用户第 2 条）：调试模式下「一级标题的背景色比二级深一点」，颜色跟着主题走 ——
   用主题主色混一点到背景里，换主题（含深色）自动跟着变，不用手写颜色。
   一级 = 主色 20% + 背景；二级 = 原来的淡灰（--panel-2），对比一眼就分得开。 */
.settings-root.sl-edit > .fold-group > .fold-group-head,
.sl-edit .fold-page > .fold-group > .fold-group-head,
.settings-root.sl-edit .fold-group > .fold-group > .fold-group-head {
  background: var(--panel-3) !important;
  background: color-mix(in srgb, var(--primary) 12%, var(--panel-3)) !important;
}
.settings-root.sl-edit > .fold-group > .fold-group-head:hover,
.sl-edit .fold-page > .fold-group > .fold-group-head:hover,
.settings-root.sl-edit .fold-group > .fold-group > .fold-group-head:hover {
  background: color-mix(in srgb, var(--primary) 20%, var(--panel-3)) !important;
}
/* 二级标题保持淡灰底，比一级浅一档；鼠标经过稍微深一点 */
.settings-root.sl-edit .fold-group-body .fold-head { background: transparent !important; }
.settings-root.sl-edit .fold-group-body > .fold-card { background: var(--panel-2) !important; }
.settings-root.sl-edit .fold-group-body > .fold-card > .fold-head:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--panel-2)) !important;
}
.fold-group-head .fold-group-arrow {
  margin-left: auto;
  color: var(--text-3) !important;
  font-weight: 400 !important;
  font-size: 11px !important;
}
/* 一级标题下面：白底，二级标题从左缩进 14px */
.fold-group-body {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 8px 0 0 !important;
  padding: 0 0 0 14px !important;
  overflow: visible;
}

/* ③ 二级标题：淡灰底条 */
.fold-card,
.fold-group-body > .fold-card {
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--panel-2) !important;
  box-shadow: none !important;
  margin: 0 0 6px !important;
  overflow: hidden;
}
.fold-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  text-align: left;
  cursor: pointer !important;
  transition: background .12s;
}
.fold-head:hover { background: var(--panel-3) !important; }
.fold-head .hint { font-weight: 400; font-size: 12.5px; color: var(--text-3); }
.fold-head .fold-arrow { margin-left: auto; color: var(--text-3); font-size: 11px; }

/* ⑤ 二级标题展开后的内容：白底 + 左缩进（三级标题从这条线往里再缩 14px） */
.fold-body {
  border-top: 0 !important;
  background: var(--panel) !important;
  padding: 10px 0 12px 14px !important;
}

/* ④ 三级标题（成交记录那边同一个组件 .cfg-sub）：淡灰底条 */
.fold-body .cfg-sub { background: var(--panel-2) !important; border: 0 !important; border-radius: 10px !important; margin: 4px 0 6px !important; }
.fold-body .cfg-sub-head { background: transparent !important; padding: 9px 12px !important; }
.fold-body .cfg-sub-head:hover { background: var(--panel-3) !important; }
.fold-body .cfg-sub-title { font-size: 13px !important; font-weight: 600 !important; }
.fold-body .cfg-sub-body { background: var(--panel) !important; border-top: 0 !important; padding: 8px 0 10px 12px !important; }

/* 内容里的「卡片」在设置页不再套边框 —— 内容就是白底，靠灰标题分层 */
.fold-body > .card,
.fold-body .cfg-sub-body > .card {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
}
.fold-body > .card > .card-body,
.fold-body .cfg-sub-body > .card > .card-body { padding: 0 !important; }

/* 设置页里的分板块（v0.27.3 标准 B-01）：灰底、圆角、无边框 */
.fold-body .card-block { background: var(--panel-2) !important; border-radius: 10px; margin-bottom: 8px; }

/* 标题右侧的小徽标（3 项 / 7 项）：跟在文字后面，不抢眼 */
.fold-head .hint,
.fold-group-head .hint { margin-left: 2px; }

/* 页面顶部标题区与内容的分隔 */
.fold-page { padding-top: 2px; }

/* ============================================================
   v0.27.4（用户第 1、2、5 条）：列表页「通用展示区」+ 关联模式 + 批量转派
   展示区 = 列表工具栏最右侧那块位置。常态放临时状态（如「3 列已临时隐藏」），
   进入关联 / 转派模式时变成一条临时操作条，退出即消失。
   ============================================================ */
.tmp-slot { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.tmp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2);
  font-family: var(--font); font-size: 12.5px; color: var(--text-2);
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.tmp-chip:hover { background: var(--panel-3); color: var(--text); }
.tmp-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 3px 8px 3px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  min-width: 0; max-width: 100%; overflow-x: auto;
}
.tmp-bar::-webkit-scrollbar { height: 4px; }
.tmp-count { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.tmp-count b { color: var(--text); font-weight: 700; }
.tmp-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tmp-all input { width: 14px; height: 14px; cursor: pointer; }
.tmp-bar .input.tmp-name { width: 210px; height: 30px !important; min-height: 30px !important; font-size: 12.5px; padding: 0 9px; }
.tmp-bar .select.tmp-select { height: 30px !important; min-height: 30px !important; font-size: 12.5px; padding: 0 8px; border-radius: 8px; }
.tmp-bar .btn { height: 30px; min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.tmp-bar .btn:disabled { opacity: .45; cursor: not-allowed; }

/* 行首勾选框
   v0.28.1（用户第 3 条）：勾选框不再占一列把内容挤走 ——
   表格左边留 22px 的缝（.picking），框子绝对定位落在缝里，行内容一个像素都不动。 */
.pick-cell { display: flex; align-items: center; justify-content: center; }
.pick-cell input { width: 15px; height: 15px; cursor: pointer; margin: 0; }
.table-wrap.picking { padding-left: 22px; margin-left: -22px; }
.table th.pick-th, .table td.pick-td {
  width: 0; min-width: 0; max-width: 0; padding: 0 !important;
  border: 0; background: transparent !important; position: relative; overflow: visible;
}
.table th.pick-th .pick-cell, .table td.pick-td .pick-cell {
  position: absolute; left: -22px; top: 0; bottom: 0; width: 22px;
}
.table td.pick-td .pick-cell { border-bottom: 0; }
.table tr:hover td.pick-td { background: transparent !important; }
/* 关联模式下，整行轻微高亮（方便看清在给哪些打勾） */
.table tr.row-picking { background: var(--panel-2); }
/* v0.28.0（用户第 3 条）：打勾的行整行换颜色 —— 一屏十几条时一眼看出勾了哪几条 */
.table tbody tr.row-sel { background: var(--primary-light) !important; }
.table tbody tr.row-sel > td { background: var(--primary-light) !important; }
.table tbody tr.row-sel > td:first-child:not(.pick-td),
.table tbody tr.row-sel > td.pick-td + td { box-shadow: inset 3px 0 0 var(--primary); }
.table tbody tr.row-sel:hover > td { background: var(--primary-light) !important; }
/* v0.28.3（用户第 1 条）：打勾模式下整行就是勾选器 —— 鼠标变成手型，整行都能点 */
.table-wrap.picking .table tbody tr.row-click { cursor: pointer; }
.table-wrap.picking .table tbody tr.row-click:hover > td { background: var(--panel-2); }
.table-wrap.picking .table tbody tr.row-sel:hover > td { background: var(--primary-light) !important; }
/* 多选操作条里的功能切换（转给其他账号 / 关联 / 标记阶段 / 其它操作） */
.tmp-bar .seg-row.tmp-feat { flex-wrap: wrap; }
.tmp-bar .seg-row.tmp-feat .seg { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* v0.27.4（用户第 2 条）：关联按钮的配色选择（系统字段 → 关联 → ⚙） */
.rel-color-field { padding: 2px 0 10px; }
.rel-color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.rel-color-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  transition: transform .1s, border-color .12s;
}
.rel-color-dot:hover { transform: scale(1.08); }
.rel-color-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel); }
.rel-color-custom {
  background: var(--panel-2) !important; color: var(--text-2);
  font-size: 14px; line-height: 1; font-weight: 600;
}
.rel-hex { width: 140px; height: 28px !important; min-height: 28px !important; font-size: 12.5px; padding: 0 8px; }

/* ============================================================
   v0.27.4（用户第 3 条）：「全站设计及功能的标准」页
   预览可点开看大图 / 功能示意小界面 / 沟通轮次 / 备注对话框
   ============================================================ */
.ds-sample-wrap { position: relative; cursor: zoom-in; }
.ds-zoom-tip {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 11px; color: var(--text-3); background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
  opacity: 0; transition: opacity .12s;
}
.ds-sample-wrap:hover .ds-zoom-tip { opacity: 1; }
.ds-big .ds-sample { transform: scale(1.6); transform-origin: top left; margin-bottom: 90px; }

/* 功能示意里的小界面元素 */
.ds-feat { padding: 8px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.mini-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.mini-set { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
.mini-bar {
  display: flex; align-items: center; gap: 4px; padding: 4px;
  border-radius: 7px; background: var(--panel-2); margin-bottom: 6px;
}
.mini-bar.hl { box-shadow: 0 0 0 2px #ef4444; }
.mini-btn {
  font-size: 10px; color: var(--text-2); background: var(--panel);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; white-space: nowrap;
}
.mini-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.mini-btn.rel.on { color: #2563eb; border-color: #2563eb; background: rgba(37,99,235,.08); }
.mini-input {
  font-size: 10px; color: var(--text-3); background: var(--panel);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 8px; min-width: 46px;
}
.mini-grow { flex: 1 1 auto; }
.mini-slot {
  font-size: 9.5px; color: var(--text-2); background: var(--panel);
  border: 1px dashed var(--border); border-radius: 5px; padding: 2px 6px; white-space: nowrap;
}
.mini-slot.hl { border: 1px solid #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.mini-row { display: flex; align-items: center; gap: 5px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.mini-cell { height: 6px; border-radius: 3px; background: var(--panel-3); }
.mini-cell.w8 { width: 8px; } .mini-cell.w14 { width: 14px; }
.mini-cell.w18 { width: 18%; } .mini-cell.w20 { width: 20%; }
.mini-cell.w34 { width: 34%; } .mini-cell.w40 { width: 40%; }
.mini-cb {
  width: 9px; height: 9px; border-radius: 2px; border: 1px solid var(--border);
  background: var(--panel); flex: none;
}
.mini-cb.on { background: var(--primary); border-color: var(--primary); }
.mini-g1 {
  font-size: 10.5px; font-weight: 600; color: var(--text); background: var(--panel-2);
  border-radius: 5px; padding: 4px 7px; margin-bottom: 3px;
}
.mini-g2 { font-size: 10px; color: var(--text-2); padding: 3px 7px; background: var(--panel-3); border-radius: 4px; margin-bottom: 2px; }
.mini-content { font-size: 10px; color: var(--text-3); padding: 6px 7px; background: var(--panel); border-radius: 4px; border: 1px solid var(--border); margin-bottom: 4px; }
.mini-field { display: flex; align-items: center; gap: 5px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.mini-fname { font-size: 10.5px; color: var(--text); }
.mini-ftag { font-size: 9px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.mini-fop { font-size: 10px; color: var(--text-3); }

/* 沟通轮次 */
.ds-rounds {
  font-size: 11.5px; color: var(--text-3); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; white-space: nowrap;
}
.ds-rounds.on { color: var(--text-2); background: var(--panel-2); }

/* 子编号 */
.ds-subs { margin-top: 8px; border-left: 2px solid var(--border); padding-left: 10px; }
.ds-sub { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 12.5px; }
.ds-sub-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--primary); flex: none; }
.ds-sub-name { color: var(--text); flex: none; }
.ds-sub-desc { color: var(--text-3); font-size: 12px; }

/* 备注对话框 */
.dn-item { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: var(--panel); }
.dn-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.dn-text { font-size: 13px; color: var(--text); line-height: 1.65; white-space: pre-wrap; }
.dn-reply { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.dn-reply .dn-meta { color: var(--primary); }
/* v0.27.9（用户第 5 条）：备注的标题行 / 折叠 / 定为标准 */
.dn-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dn-title { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-width: 0; }
.dn-title .dn-t { font-size: 13px; font-weight: 600; color: var(--text); }
.dn-title .dn-no {
  flex: none; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  font-size: 11px; background: var(--panel-3); color: var(--text-2); font-weight: 700;
}
.dn-title.reply .dn-t { color: var(--primary); }
.dn-title:hover .dn-t { text-decoration: underline; }
.dn-item.col { padding-top: 7px; padding-bottom: 7px; background: var(--panel-2); }
.dn-item.col .dn-meta { margin-bottom: 0; }

.ds-std {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2);
  cursor: pointer; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; user-select: none;
}
.ds-std:hover { border-color: var(--primary-border); color: var(--text); }
.ds-std input { width: 13px; height: 13px; accent-color: var(--primary); cursor: pointer; }
/* 勾成标准后这张卡默认收起：只留标题那一行 */
.ds-card.std-folded .ds-bd { display: none; }
.ds-card.std-folded .ds-hd { border-bottom: 0; }
/* v0.28.1（用户第 4 条）：打了删除线的条目默认折叠，点标题栏展开 / 收起 */
.ds-hd.ds-hd-foldable { cursor: pointer; }
.ds-hd.ds-hd-foldable:hover { background: var(--panel-2); }
.ds-card.ds-del.std-folded .ds-hd b { text-decoration: line-through; }
/* v0.28.0（用户第 5 条）：标记删除线 —— 已作废 / 已并入别的编号的条目整条划掉，
   浏览时一眼跳过；内容不删，点「取消删除线」就恢复。 */
.ds-card.ds-del .ds-bd,
.ds-card.ds-del .ds-hd b,
.ds-card.ds-del .ds-sub-name,
.ds-card.ds-del .ds-sub-desc { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 1.5px; }
.ds-card.ds-del .ds-bd { opacity: .72; }
.ds-card.ds-del .ds-hd b { color: var(--text-3); }
.ds-card.ds-del .ds-del-btn { color: var(--danger); border-color: var(--danger); }
/* v0.27.8（用户第 4 条）：备注可以就地编辑 */
.dn-meta { display: flex; align-items: center; gap: 8px; }
.dn-ops { margin-left: auto; }
.dn-ops2 { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
/* 备注弹窗开大一点（默认是一屏高、够看几轮对话） */
.modal.side.xl .modal-body { max-height: none; }
/* v0.27.8（F03 备注）：还没显示的列按分组折叠 */
.pool-group-title.clickable { cursor: pointer; user-select: none; }
.pool-group-title.clickable:hover { color: var(--primary); }
.pool-group-body { padding-left: 6px; }

/* v0.27.4（用户第 10.4 条）：顶栏「🎨」里的主题快捷选择面板 */
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px;
}
.theme-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 11px;
  background: var(--panel); cursor: pointer; font-family: var(--font); text-align: left;
  transition: border-color .12s, background .12s;
}
.theme-card:hover { border-color: var(--primary-border); background: var(--panel-2); }
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.theme-dots { display: flex; gap: 5px; }
.theme-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.theme-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.theme-card .td { font-size: 11.5px; color: var(--text-2); }
.topbar-theme { flex: none; }

/* v0.27.4（用户第 9 条）：左上角品牌（自定义 logo / 公司名 / 版本号） */
.brand { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.brand-logo { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none; }
.brand-name { font-weight: 700; font-size: 14px; color: var(--text); }
.brand-ver { font-size: 11px; color: var(--text-3); margin-left: 2px; font-weight: 400; }
.brand-preview { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel-2); border-radius: 10px; margin-bottom: 12px; }

/* ============================================================
   v0.27.5（用户第 4 条）：主题卡 —— 9 个色全排出来（不再是 3 个）
   ------------------------------------------------------------
   每张卡：名字（+一句风格说明）→ 9 个色点（鼠标停上去显示这个色是干嘛的）→ 一行小字图例。
   点了以后只换高亮、不重绘页面，所以卡片不会"缩回去"。
   ============================================================ */
.theme-cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.theme-card { text-align: left; padding: 12px 13px; background: var(--panel); }
.theme-card .t { font-size: 13px; font-weight: 700; color: var(--text); }
.theme-card .td2 { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.theme-card .swatches { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-start; margin: 8px 0 6px; }
.theme-card .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.06); box-shadow: none; }
.theme-card .sw-legend { font-size: 10.5px; color: var(--text-3); line-height: 1.5; }

/* v0.28.0（用户第 1 条）：设置页一行 8 套（16 套正好两行），顶栏 🎨 面板仍是一行 4 套。
   卡片变小后：色点缩到 11px、去掉那行小字图例（鼠标停上去仍然能看到每个色是什么），
   名字还在，所以一眼还是能认出是哪套。 */
.theme-cards.grid8 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.theme-cards.grid8 .theme-card { padding: 7px 7px 6px; border-radius: 9px; }
.theme-cards.grid8 .theme-card .t { font-size: 12px; font-weight: 600; line-height: 1.35; }
.theme-cards.grid8 .theme-card .td2 { display: none; }
.theme-cards.grid8 .theme-card .swatches { gap: 3px; margin: 6px 0 2px; }
.theme-cards.grid8 .theme-card .sw { width: 11px; height: 11px; }
.theme-cards.grid8 .theme-card .sw-legend { display: none; }
.theme-cards.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .theme-cards.grid8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .theme-cards.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.theme-cur { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; padding: 7px 10px; background: var(--panel-2); border-radius: 8px; }
.topbar-quick { display: flex; align-items: center; gap: 6px; flex: none; }

/* v0.28.0（用户第 1 条）：「一周七天」选主题 —— 带颜色的下拉（原生的下拉塞不进色块） */
.tc-wrap { position: relative; display: inline-flex; }
.tc-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 29px 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
  font-family: var(--font); position: relative; min-width: 190px;
}
.tc-btn:hover { border-color: var(--primary-border); }
.tc-btn::after {
  content: ''; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
}
.tc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset; }
.tc-menu {
  position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; min-width: 236px;
  max-height: 300px; overflow: auto; padding: 5px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.tc-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.tc-item:hover { background: var(--panel-2); }
.tc-item.on { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.tc-item .tc-mini { display: flex; gap: 2px; margin-left: auto; }
.tc-item .tc-mini i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.tc-item .tc-sub { font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-left: 4px; }

/* v0.28.0（用户第 1 条）：设置页分板块 —— 和全屏详情 / 成员账号同一套 .card-block 效果 */
.block-stack { display: flex; flex-direction: column; gap: 12px; }
.block-stack > .card-block { margin-bottom: 0; }
.card-block > .blk-hd {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.card-block > .blk-hd .blk-t { font-size: 13.5px; font-weight: 700; color: var(--text); }
.card-block > .blk-hd .blk-d { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* v0.27.5（用户第 3 条）：功能预览 —— 真实界面截图（红框已画在图上） */
.ds-shot { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.ds-shot-img { display: block; width: 100%; height: auto; }
.ds-shot-tip {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 11px; color: var(--text-2); background: rgba(255,255,255,.92);
  border-top: 1px solid var(--border); padding: 3px 8px; text-align: left;
}
.ds-shot.miss { min-height: 120px; }
.ds-shot.miss::after {
  content: '这张截图还没生成，跑一下 tools/_shots.js 就有了';
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-3);
}
.ds-big .ds-shot { max-width: 1280px; }
.ds-big .ds-shot-img { width: 100%; }
.ds-big .ds-shot-tip { position: static; }

/* ============================================================
   v0.27.6（用户第 2 条）：跟随主题变色的线性图标
   ------------------------------------------------------------
   原来的表情图标换成 currentColor 的 SVG：主题换色，图标跟着换。
   设置里可以切回「现在的彩色表情」（iconStyle = emoji）。
   ============================================================ */
.ico-svg {
  width: 16px; height: 16px; display: inline-block; vertical-align: -3px;
  color: currentColor; flex: none;
}
/* v0.27.9（用户第 4 条）：关联 · 每条规则自己的设置（点「⚙ 设置」展开） */
.relrule { border-bottom: 1px dashed var(--border); padding: 6px 0; }
.relrule:last-child { border-bottom: 0; }
.rr-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--border); }
.rr-panel {
  margin: 6px 0 8px 16px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
}
.rr-title { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.rr-colors { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.rr-lab { font-size: 12px; color: var(--text-2); margin-right: 4px; }
.rr-colors .tmp-hex { width: 96px; height: 24px; font-size: 12px; }
.rr-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* v0.27.9（用户第 2 条）：按天换风格 —— 主题风格里那块 */
.theme-plan { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pool-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pool-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 11px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
}
.pool-chip:hover { border-color: var(--primary-border); color: var(--text); }
.pool-chip.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.pool-chip .pc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset; }
.pool-chip .pc-no {
  font-size: 10.5px; min-width: 15px; height: 15px; line-height: 15px; text-align: center;
  border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700;
}
.plan-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pp-item {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; background: var(--panel-2);
}
.pp-item .pp-day { color: var(--text-3); }
.pp-item .pp-name { color: var(--text); }

/* v0.27.9（用户第 1 条）：正文里的图标 —— 跟着旁边的字号走，颜色永远跟着主题走。
   这些是「原来写死的 emoji 被自动替换掉」的那批，所以尺寸必须自适应，不能写死像素。 */
.ico-svg.ico-inline {
  width: 1.05em; height: 1.05em; vertical-align: -.16em;
  margin-right: .12em; color: currentColor;
}
.empty .ico .ico-svg.ico-inline { width: 34px; height: 34px; vertical-align: 0; }
.badge .ico-svg.ico-inline { width: 1em; height: 1em; vertical-align: -.15em; margin-right: .18em; }
.ds-hd .ico-svg.ico-inline { width: 1em; height: 1em; }
.nav-ico .ico-svg { width: 17px; height: 17px; }
.icon-btn .ico-svg { width: 17px; height: 17px; }
.topbar .icon-btn { color: var(--text-2); }
.topbar .icon-btn:hover { color: var(--primary); }
.brand .logo-mark .ico-svg { width: 15px; height: 15px; }

/* ============================================================
   v0.27.6（用户第 9 条）：页面背景 —— 纯白（默认）/ 跟随主题 / 护眼
   ============================================================ */
html[data-pagebg="white"] .content { background: var(--panel); }
html[data-pagebg="theme"] .content { background: var(--bg); }
html[data-pagebg="eye"] .content { background: #E9F3E4; }
html[data-pagebg="eye"] { --panel-2: #F1F7EC; --panel-3: #E4EFDC; }

/* v0.27.6（用户第 3、9 条）：分段选择器（页面背景 / 图标风格） + 顶栏配色按钮尺寸统一 */
.seg-row { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.seg {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font-family: var(--font); font-size: 12.5px; padding: 4px 10px; border-radius: 6px;
  transition: background .12s, color .12s;
}
.seg:hover { color: var(--text); background: var(--panel-3); }
.seg.active { background: var(--primary); color: #fff; }
/* v0.27.7（用户第 3 条）：顶栏「配色 / 刷新 / 帮助」三个框必须一样大。
   根因就是这里：配色按钮以前被单独压成 30×30，另外两个走 .icon-btn 的 36×36。
   现在统一交给 .icon-btn，一个字都不覆盖，三个框自然同尺寸、同边框、同 hover。 */
.topbar .topbar-theme { display: inline-flex; align-items: center; justify-content: center; }

/* v0.27.6（用户第 7 条）：D26 分板块的对比示例（有分板块 / 没分板块并排） */
.ds-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ds-cmp-col { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: var(--panel); }
.ds-cmp-title { font-size: 11.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ds-cmp-body.has-block { background: var(--panel); }
.ds-cmp-body .card-block { margin-bottom: 8px; }
.ds-cmp-plain { padding: 8px 10px; border-bottom: 1px dashed var(--border); }
.ds-cmp-body .card-block:last-child, .ds-cmp-body .ds-cmp-plain:last-child { margin-bottom: 0; }
.ds-cmp-note { font-size: 10.5px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

/* ============================================================
   v0.27.6（用户第 1 条）：全屏条目详情
   ============================================================ */
.rv-mask {
  position: fixed; inset: 0; z-index: 5200;
  background: var(--panel); display: flex; flex-direction: column;
  animation: rv-in .14s ease-out;
}
/* v0.27.7（用户第 2 条）：全屏详情打开时，它里面的「设置」等弹窗必须压在全屏之上。
   根因：.rv-mask 是 5200，而全站弹窗 .modal-mask 只有 100 —— 所以设置面板被全屏盖住了。
   这里按「全屏打开时统一抬高层级」处理，一次把弹窗 / 提示 / 下拉菜单都抬上来，
   以后再往全屏里加新弹层也不用一个个改 z-index。 */
body.rv-open .modal-mask { z-index: 5300; }
body.rv-open .more-menu { z-index: 5400 !important; }
body.rv-open .select-menu { z-index: 5400; }
body.rv-open #toast-root { z-index: 5600; }
@keyframes rv-in { from { opacity: 0; transform: scale(.995); } to { opacity: 1; transform: none; } }
.rv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.rv-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.rv-ttl { flex: 0 1 auto; min-width: 0; }
.rv-name { font-size: 15.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.rv-badge {
  font-size: 11.5px; font-weight: 500; color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary-border); border-radius: 20px; padding: 1px 9px;
}
.rv-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.rv-btn { width: 32px; height: 32px; }
/* v0.28.7（用户第 1 条）：全屏右上角两个按钮（布局 / 设置）同款同宽，布局只显示图标 */
.rv-layout-btn { flex: none; }
.rv-layout-btn.active { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.rv-set-w { min-width: 116px; }
.rv-set-h { width: 108px; }
.rv-body { flex: 1 1 auto; overflow: auto; padding: 14px 18px 40px; background: var(--panel); }

/* v0.28.1（用户第 2 条）：全屏最上面那一行 = 列表的表头 + 这一条的内容。
   横向排开、能左右滚，按钮在里面直接能点（记一条 / 更多）。 */
.rv-strip {
  /* v0.28.2（用户第 1 条）：不再是一条贴边、直角的横条 ——
     和下面「这条成交记录的收款 / 支出」等板块一样：圆角 + 同色底 + 左右留白。 */
  flex: none; display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; background: var(--panel-2);
  border-radius: 10px;
  margin: 10px 18px 0;
}
.rv-strip-cell {
  flex: none; min-width: 108px; max-width: 260px;
  padding: 7px 14px 8px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.rv-strip-cell:last-child { border-right: 0; }
.rv-strip-cell .rs-k {
  font-size: 11.5px; color: var(--text-3); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.rv-strip-cell .rs-v {
  font-size: 13px; color: var(--text); min-height: 22px;
  /* v0.28.6（用户第 1 条）：这一格只占自己的宽度，装不下就用省略号，点一下看全文；
     以前是 flex + nowrap，长文字会顶出格子、压到旁边那一列（截图里「记录与提醒」压住了「本地文件夹」） */
  display: block; line-height: 22px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.rv-strip-cell .rs-v > * { display: inline-flex; vertical-align: middle; }
.rv-strip-cell .rs-v .btn { display: inline-flex; }
.rv-strip-cell .rs-v .btn { height: 24px; }
.rv-strip-cell .rs-v .badge { white-space: nowrap; }
/* v0.28.0（用户第 2 条）：翻上一条 / 下一条时内容轻轻淡入（不是关掉再打开，所以不会闪） */
.rv-body.rv-swap { animation: rvSwap .16s ease-out; }
@keyframes rvSwap { from { opacity: .35; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.rv-block.full { grid-column: 1 / -1; }
.rv-block .card-block { margin: 0; }
.rv-block-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.rv-block-title .ico-svg { width: 15px; height: 15px; color: var(--primary); }
.rv-block-title .hint { font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-left: 4px; }
.rv-block-body { font-size: 13px; color: var(--text); }
.rv-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.rv-kv-row { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--border); min-width: 0; }
.rv-kv-row:last-child { border-bottom: 0; }
.rv-k { flex: 0 0 84px; color: var(--text-3); font-size: 12.5px; }
.rv-v { flex: 1 1 auto; min-width: 0; word-break: break-all; font-size: 13px; }
.rv-feed { max-height: 46vh; overflow: auto; }
.rv-feed-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.rv-feed-row:last-child { border-bottom: 0; }
.rv-feed-no {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--panel-3);
  color: var(--text-2); font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.rv-feed-body { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.6; }
.rv-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* v0.27.6（用户第 1 条）：整行可点（点按钮不触发） */
.table tr.row-click { cursor: pointer; }
.table tr.row-click:hover { background: var(--primary-light); }

/* v0.27.6（用户第 1 条）：全屏详情里的「关联」组 */
.rv-rel { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.rv-rel:last-child { border-bottom: 0; }
.rv-rel-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.rv-rel-others { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* v0.27.6（用户第 1 条）：跟进记录排版 */
.rv-follow-when { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.rv-follow-text { white-space: pre-wrap; }

/* v0.27.7（用户第 6 条）：自动关联规则 —— 一条规则两行：上面是名字/字段/操作，下面是它自己的颜色 */
.fe-col { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.fe-col:last-child { border-bottom: 0; }
.rule-colors { flex-wrap: wrap; gap: 4px; }
.rule-colors .tmp-hex { width: 96px; height: 24px; font-size: 12px; }

/* v0.27.8（用户第 3 条）：关联 · 颜色顺序（第 1 组 / 第 2 组…） */
.relcolor-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.rc-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rc-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rc-no { font-size: 11px; color: var(--text-3); }
.rc-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.rc-dot:hover { box-shadow: 0 0 0 2px var(--primary); }
.rc-pop {
  position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; gap: 4px; width: 108px; padding: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-lg); z-index: 20;
}
.rc-opt { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer; }

/* v0.27.8（用户第 2 条）：全屏详情的「上一条 / 下一条」 */
.rv-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.rv-nav-pos { font-size: 12.5px; color: var(--text-2); min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.rv-nav-btn { white-space: nowrap; }
/* v0.29.1（用户第 6 条）：全屏顶部「↑↓ 切换模块」那一条 */
.rv-modbar { display: flex; align-items: center; gap: 4px; flex: none; margin-right: 4px; flex-wrap: nowrap; }
.rv-modtip { font-size: 11px; color: var(--text-3); margin-right: 2px; white-space: nowrap; }
.rv-modchip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--panel-2); color: var(--text-3); white-space: nowrap;
}
.rv-modchip.on { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.rv-modsep { color: var(--text-3); font-size: 10px; }

/* v0.27.7（用户第 1 条）：全屏详情里的「跨阶段记录」行 —— 成交↔记账↔客户↔商机 串起来看 */
.rv-xrow {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px dashed var(--border);
}
.rv-xrow:last-child { border-bottom: 0; }
.rv-xrow.clickable { cursor: pointer; border-radius: 6px; }
.rv-xrow.clickable:hover { background: var(--primary-light); }
.rv-xbody { flex: 1 1 auto; min-width: 0; }
.rv-xmain { font-size: 13px; color: var(--text); }
.rv-xsub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.rv-xright { flex: none; font-size: 12px; }

/* v0.27.6（用户第 6 条）：关联操作条里的配色选择 */
.tmp-colors { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.tmp-color {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.tmp-color.active { border-color: var(--text); }
.tmp-bar .input.tmp-hex { width: 84px; height: 26px !important; min-height: 26px !important; font-size: 11.5px; }
/* v0.28.3（用户第 2 条）：多选操作条上的紧凑配色（关联成一组时才出现） */
.tmp-colors-sm { gap: 3px; }
.tmp-colors-sm .tmp-color { width: 14px; height: 14px; border-width: 1px; }
.tmp-colors-sm .tmp-color.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--primary-light); }
.tmp-color-cap { font-size: 11.5px; color: var(--text-3); margin-right: 2px; }
.tmp-color-pick {
  width: 18px; height: 18px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: none; cursor: pointer; overflow: hidden;
}
.tmp-color-pick::-webkit-color-swatch-wrapper { padding: 0; }
.tmp-color-pick::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* v0.28.3（F02）：设置项布局编辑（管理员）—— 每节标题右边的 ↑ ↓ ✎ ⇄ 和「按自定义分组」的组标题 */
.sl-edit .cfg-sec-head, .sl-edit .fold-head { position: relative; padding-right: 108px; }
.sl-edit .fold-card { position: relative; }
.sl-edit .fold-card > .sl-ops { position: absolute; right: 12px; top: 11px; }
.sl-ops { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.cfg-sec-head .sl-ops, .fold-head .sl-ops { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.sl-btn {
  height: 22px; min-width: 22px; padding: 0 5px; line-height: 20px;
  font-size: 12px; color: var(--text-2); background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.sl-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.sec-groupbar {
  margin: 14px 0 6px; padding-left: 2px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2); letter-spacing: .3px;
}
.shown-group { margin-bottom: 6px; }
.shown-group .pool-group-title { padding-top: 4px; }

/* v0.28.3（F08）：文件上传字段 */
.file-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-ctl .file-link, .file-link {
  display: inline-flex; align-items: center; gap: 4px; max-width: 260px;
  font-size: 13px; color: var(--primary); text-decoration: none;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  border-radius: 6px; padding: 2px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-link:hover { text-decoration: underline; }

/* ============================================================
   v0.28.4（用户第 1 条）：全屏详情的「板块选择」—— 字段板块、板块高度、设置行
   ============================================================ */
.rv-block .card-block.rv-fixed-h { display: flex; flex-direction: column; }
.rv-fixed-h .rv-block-body { flex: 1 1 auto; overflow: auto; }
.rv-field-val { font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-all; }
.rv-field-val .muted { color: var(--text-3); }

/* 设置弹窗里的「板块选择」行：左勾选、右宽度/高度/上下移 */
.rv-set-row { align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-set-row .rv-set-lab {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 150px; font-size: 13px; cursor: pointer;
}
.rv-set-ops { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.rv-set-h { width: 132px; height: 28px; font-size: 12px; padding: 0 6px; }
.rv-set-ops .seg-row .seg { height: 26px; line-height: 24px; font-size: 12px; padding: 0 7px; }
.rv-fold-head {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  padding: 6px 2px; border-top: 1px dashed var(--border);
}
.rv-fold-head:hover { color: var(--primary); }
.rv-fold-head .hint { font-weight: 400; }

/* 成交记录全屏里的「记录与提醒」 */
.rv-log-tools { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rv-log-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
}
.rv-log-row:last-child { border-bottom: 0; }
.rv-log-main { flex: 1 1 auto; min-width: 0; }
.rv-log-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rv-log-at { font-size: 12px; color: var(--text-3); }
.rv-log-by { font-size: 12px; color: var(--text-3); }
.rv-log-text { font-size: 13px; color: var(--text); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.rv-log-imgs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 5px; }
.rv-log-remind { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 5px; }
.rv-log-ops { display: flex; gap: 6px; flex: none; }

/* ============================================================
   v0.28.4（用户第 9 条）：正文字体颜色 —— 灰 / 更深 / 纯黑 / 高对比 / 跟随主题
   只换 --text / --text-2 / --text-3 三个变量，不改任何组件代码
   ============================================================ */
[data-fontcolor="gray"] { --text: #1F2937; --text-2: #6B7280; --text-3: #9CA3AF; }
[data-fontcolor="auto"] {
  --text: var(--primary-active); --text-2: var(--primary); --text-3: var(--primary-hover);
}
[data-fontcolor="dark"] { --text: #111827; --text-2: #4B5563; --text-3: #6B7280; }
[data-fontcolor="black"] { --text: #000000; --text-2: #1F2937; --text-3: #374151; }
[data-fontcolor="high"] { --text: #000000; --text-2: #111827; --text-3: #374151; }
[data-fontcolor="high"] body { font-weight: 500; }

/* ============================================================
   v0.28.4（用户第 6 条）：管理员调试模式 —— 顶栏 🐞 + 下面那条「撤销 / 保存」
   ============================================================ */
.topbar-debug.on {
  color: var(--primary); background: var(--primary-light);
  border-color: var(--primary-border);
}
.dbg-bar {
  display: flex; align-items: center; gap: 6px; margin: 8px 18px 0;
  padding: 4px 8px 4px 12px; background: var(--primary-light);
  border: 1px solid var(--primary-border); border-radius: 999px;
  font-size: 12.5px; color: var(--primary); width: fit-content;
  max-width: calc(100% - 36px);
}
.dbg-bar .grow { flex: 1; }
.dbg-bar .dbg-dirty { color: var(--warning); font-weight: 700; margin-left: 4px; }
/* v0.94.0（用户第 5.4 条）：调试模式里标记「待删除」的文字 */
.dbg-strike { text-decoration: line-through !important; text-decoration-thickness: 1.5px; opacity: .7; }
/* v0.95.2：先标记（下次更新统一处理）的视觉 —— 不影响现在使用 */
.dbg-mark { text-decoration: underline dotted var(--warning) !important; text-underline-offset: 3px; cursor: help; }
.dbg-icon-move { outline: 1px dashed var(--warning) !important; outline-offset: 2px; }
.dbg-hide { display: none !important; }
.dbg-bar .dbg-tip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dbg-bar .dbg-tip b { color: var(--text); }
.dbg-bar .dbg-dirty {
  color: #B42318; background: #FEE4E2; border-radius: 10px;
  padding: 0 7px; font-size: 11.5px;
}
.dbg-bar .grow { flex: 1 1 auto; }

/* 调试模式：一级标题（分组）也能上下排序 / 改名 */
.sl-edit .fold-group { position: relative; }
.sl-edit .fold-group > .sl-ops { position: absolute; right: 10px; top: 6px; }
.sl-edit .fold-group > .fold-group-head { padding-right: 96px; }
.sl-edit .fold-group-body .fold-card > .sl-ops { top: 9px; }

/* v0.28.4（用户第 8 条）：「单行文本」这类下拉文字被截断 —— 给下拉一个够用的最小宽度 */
select.input, .fe-row select, .pf-row select, .cfg-row select { min-width: 112px; }

/* ============================================================
   v0.28.7（用户第 1 条）：可拖动板块网格（全屏详情 / 工作台共用）
   10 列 —— 宽度 1/10 ~ 整行；高度可拖；布局模式里内容照常显示
   ============================================================ */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(var(--gl-cols, 10), minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.gl-cell {
  min-width: 0; position: relative;
  grid-column: span var(--gl-span, 10);
  display: flex; flex-direction: column;
}
@media (max-width: 980px) {
  .gl-grid { grid-template-columns: 1fr; }
  /* v0.29.0：格子的「起始列」是行内写的，手机上要强制压成一行一块 */
  .gl-cell { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .gl-slot { display: none !important; }
}
.gl-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 6px; padding: 3px;
  background: var(--panel-2, #F5F6F8); border-radius: 9px;
}
.gl-tab {
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  font-size: 12px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
  font-family: var(--font); white-space: nowrap;
}
.gl-tab:hover { color: var(--primary); }
.gl-tab.on { background: var(--panel); color: var(--primary); border-color: var(--primary-border); font-weight: 600; }
.gl-body { min-width: 0; flex: 1 1 auto; }
/* v0.28.8（用户第 1 条）：拖高了以后，里面的卡片跟着长高（以前只把外框拉大，卡片还是原高度） */
.gl-cell.has-h > .gl-body { display: flex; flex-direction: column; }
.gl-cell.has-h > .gl-body > * { flex: 1 1 auto; min-height: 0; }

/* 布局模式：格子套一层虚线框，里面就是原来的内容（不再是只剩标题） */
.gl-editing { padding-bottom: 4px; }
.gl-cell.gl-edit {
  border: 1px dashed var(--primary-border);
  border-radius: 12px;
  background: var(--primary-light);
  overflow: visible;
}
.gl-cell.gl-edit > .gl-body { padding: 6px 8px 8px; }
.gl-cell.gl-edit > .gl-tabs { margin: 6px 8px 0; }
.gl-cell.gl-edit.gl-dragging { opacity: .5; }
.gl-handle {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 9px; cursor: grab;
  font-size: 11.5px; color: var(--text-2);
  background: var(--panel); border-bottom: 1px dashed var(--primary-border);
  border-radius: 11px 11px 0 0;
}
.gl-handle:active { cursor: grabbing; }
.gl-grip { color: var(--primary); letter-spacing: -2px; font-size: 12px; }
.gl-name {
  font-weight: 600; color: var(--text); max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gl-grow { flex: 1 1 auto; }
.gl-size { color: var(--text-3); font-size: 11px; white-space: nowrap; }

/* 拖到格子上的三种提示：上插入 / 下插入 / 并进来 */
.gl-cell.gl-edit.gl-over-top { box-shadow: 0 -3px 0 0 var(--primary); }
.gl-cell.gl-edit.gl-over-bottom { box-shadow: 0 3px 0 0 var(--primary); }
.gl-cell.gl-edit.gl-over-left { box-shadow: -3px 0 0 0 var(--primary); }
.gl-cell.gl-edit.gl-over-right { box-shadow: 3px 0 0 0 var(--primary); }
.gl-cell.gl-edit.gl-over-merge { outline: 2px solid var(--primary); outline-offset: -2px; }

/* v0.29.0（用户第 1 条）：空位落点 —— 把板块拖到同一行右边的空档，原位置就留空 */
.gl-slot {
  min-height: 92px; border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(45deg, transparent 0 8px, var(--panel-2) 8px 16px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 11.5px; text-align: center;
}
.gl-slot.gl-over {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light); outline: 2px solid var(--primary); outline-offset: -2px;
}
/* v0.120.45：空白区整片可拖（stretch 撑满行高）；虚拟行小格半透明叠在上面 */
.gl-slot { align-self: stretch; }
.gl-slot-new { opacity: .65; }
.gl-slot-new:hover { opacity: .9; }
.gl-slot-cell { opacity: .35; }
.gl-slot-cell:hover { opacity: .9; }
.gl-slot-under { opacity: .6; }
.gl-slot-under:hover { opacity: 1; }

/* v0.120.49：正方形网格布局模式 —— 20 列，每格正方形，空白全部铺格 */
.gl-grid.gl-square { align-items: start; }   /* v0.120.55：方格不被内容拉成竖条 */
.gl-grid.gl-square .gl-cell { grid-column: auto; grid-row: auto; }
.gl-grid.gl-square .gl-sq {
  aspect-ratio: 1 / 1; min-height: 0; align-self: start; border-radius: 6px;
  border: 1px dashed var(--border);
  background: repeating-linear-gradient(45deg, transparent 0 6px, var(--panel-2) 6px 12px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 10px; opacity: .5;
}
.gl-grid.gl-square .gl-sq.gl-over {
  border-color: var(--primary); color: var(--primary); opacity: 1;
  background: var(--primary-light); outline: 2px solid var(--primary); outline-offset: -2px;
}
.gl-grid.gl-square .gl-cell.gl-edit { overflow: hidden; }
.gl-grid.gl-square .gl-handle { flex-wrap: wrap; }
.gl-grid.gl-square .gl-rz-h, .gl-grid.gl-square .gl-rz-w, .gl-grid.gl-square .gl-rz-e { z-index: 6; }
/* v0.120.50：拖动预览 —— 按板块实际格数显示同尺寸轮廓，精准落位 */
.gl-grid .gl-preview {
  grid-column: auto; grid-row: auto; z-index: 20; pointer-events: none;
  /* v0.120.65（用户 2.12）：.gl-grid 是 align-items:start，预览必须自己 stretch 才能铺满所占格子 */
  align-self: stretch; height: auto; min-height: 0;
  border: 2px dashed var(--primary); background: var(--primary-light);
  border-radius: 10px; opacity: .8;
  box-shadow: 0 0 0 2px rgba(0,0,0,.04) inset;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 13px; font-weight: 600;
}

/* v0.120.49（用户 2.2）：板块内容自适应窄宽 —— 长文件名/数字不溢出、表格不横向顶破 */
.gl-grid .gl-body { overflow: hidden; }
.gl-grid .kv { grid-template-columns: minmax(72px, auto) minmax(0, 1fr); }
.gl-grid .kv .v { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.gl-grid .table-wrap { max-width: 100%; overflow-x: auto; }
.gl-grid .stat-row { flex-wrap: wrap; }
.gl-grid .stat-box { min-width: 0; flex: 1 1 88px; }
.gl-grid .gl-cell .btn, .gl-grid .gl-cell .toolbar { max-width: 100%; }
.gl-grid .muted, .gl-grid .hint { overflow-wrap: anywhere; }

/* 右边框改宽度、下边框改高度 */
.gl-rz { position: absolute; z-index: 5; border-radius: 5px; }
.gl-rz-w { top: 0; right: -6px; width: 12px; height: 100%; cursor: col-resize; }
.gl-rz-e { top: 0; left: -6px; width: 12px; height: 100%; cursor: col-resize; }
.gl-rz-h { left: 0; bottom: -6px; height: 12px; width: 100%; cursor: row-resize; }
.gl-grid.gl-square .gl-rz-h { bottom: 0; height: 14px; }   /* v0.120.55：编辑态手柄不被 overflow 裁掉 */
.gl-grid.gl-square .gl-cell { overflow: visible; }
.gl-rz:hover { background: var(--primary); opacity: .35; }
.gl-add {
  grid-column: 1 / -1;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  padding: 14px; text-align: center; font-size: 12.5px; color: var(--text-3);
  background: var(--panel-2, #FAFAFB);
}
.gl-add.gl-over { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.gl-tip {
  grid-column: 1 / -1; font-size: 12px; color: var(--text-3);
  background: var(--panel-2, #F7F8FA); border-radius: 9px; padding: 7px 10px;
}
.rv-layout-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 4px 10px;
  /* v0.120.71（用户 1.2）：换成系统主题色 */
  background: var(--primary-light, #F3F4F6); border: 1px solid var(--primary-border, var(--border));
  border-radius: 10px; font-size: 12.5px; color: var(--text);
  /* v0.120.54（用户 2.5）：浮在顶部工具栏行，不占内容区空间 */
  flex: none; white-space: nowrap; flex-wrap: nowrap;
}
/* v0.120.54：状态栏进顶部工具栏，不占内容区高度；小屏自动缩到按钮 */
@media (max-width: 1100px) { .rv-layout-bar { padding: 3px 6px; gap: 5px; } }

/* ============================================================
   v0.28.6（用户第 1 条）：全屏顶部那一行 —— 一格只占自己的宽度，
   装不下就省略号（点一下看全文），不再顶到旁边那一列、也不画框
   ============================================================ */
.rv-strip { overflow: hidden; }
.rv-strip-cell { min-width: 0; max-width: 100%; overflow: hidden; }
.rv-strip-cell .rs-v {
  min-width: 0; max-width: 100%; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.rv-strip-cell .rs-v * { max-width: 100%; }
.rv-strip-cell .rs-v .badge,
.rv-strip-cell .rs-v .stage-cell,
.rv-strip-cell .rs-v .stage-wrap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rv-strip-cell .rs-v > div { overflow: hidden; text-overflow: ellipsis; }
.rv-strip-more {
  border: 0; background: transparent; color: var(--primary);
  font-size: 11.5px; cursor: pointer; padding: 0 2px; font-family: var(--font);
}

/* ============================================================
   v0.28.6（用户第 2 条）：顶栏「调试模式」按钮 —— 放在版本号旁边，带文字，宽度跟着字走
   ============================================================ */
.topbar-debug {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 7px; margin-left: 6px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--panel); color: var(--text-2);
  font-size: 11.5px; cursor: pointer; font-family: var(--font);
  white-space: nowrap; width: auto; min-width: 0;
}
.topbar-debug:hover { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.topbar-debug.on { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); font-weight: 600; }

/* 调试模式改名后：按钮不允许把字切掉，长度跟着文字走 */
.btn, .topbar-debug, .seg, .nav-item { max-width: none; }
.btn { flex: none; }
.actions .btn, .cfg-ops .btn, .toolbar .btn { white-space: nowrap; }

/* v0.28.7（用户第 2 条）：调试模式拖动排序的三种提示 —— 插前 / 插后 / 变成它的下属 */
.sl-edit .fold-group-head[data-sl-drag], .sl-edit .cfg-sec-head[data-sl-drag], .sl-edit .fold-head[data-sl-drag] { cursor: grab; }
.sl-dragging { opacity: .45; }
.sl-over { outline: 2px dashed var(--primary); outline-offset: 2px; border-radius: 8px; }
.sl-edit [data-sec].sl-over-top { box-shadow: 0 -3px 0 0 var(--primary); }
.sl-edit [data-sec].sl-over-bottom { box-shadow: 0 3px 0 0 var(--primary); }
.sl-edit [data-sec].sl-over-in {
  outline: 2px solid var(--primary); outline-offset: -2px;
  background: var(--primary-light); border-radius: 8px;
}

/* v0.28.7（用户第 2 条）：层级辅助显示 —— 每个标题前标「一级 / 二级 / 三级」，下一级带缩进竖线 */
.sl-show-lv [data-lv="1"] > .fold-group-head::before,
.sl-show-lv [data-lv="1"] > .fold-head::before,
.sl-show-lv [data-lv="1"] > .cfg-sec-head::before {
  content: '一级'; display: inline-block; margin-right: 6px;
  font-size: 10.5px; line-height: 16px; padding: 0 4px; border-radius: 4px;
  background: var(--primary); color: #fff; vertical-align: 1px;
}
.sl-show-lv [data-lv="2"] > .fold-head::before,
.sl-show-lv [data-lv="2"] > .cfg-sec-head::before {
  content: '二级'; display: inline-block; margin-right: 6px;
  font-size: 10.5px; line-height: 16px; padding: 0 4px; border-radius: 4px;
  background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border);
  vertical-align: 1px;
}
.sl-show-lv [data-lv="3"] > .fold-head::before,
.sl-show-lv [data-lv="3"] > .cfg-sec-head::before {
  content: '三级'; display: inline-block; margin-right: 6px;
  font-size: 10.5px; line-height: 16px; padding: 0 4px; border-radius: 4px;
  background: var(--panel-3); color: var(--text-3); border: 1px solid var(--border); vertical-align: 1px;
}
.sl-show-lv .sl-nested { position: relative; }
.sl-edit .sl-nested { margin-left: 14px; padding-left: 10px; border-left: 2px solid var(--primary-border); }
.sl-edit .fold-group-body .fold-group.sl-nested > .fold-group-head { font-size: 13px; font-weight: 600; }
.dbg-lv-btn.active { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.dbg-ico { font-size: 11px; }
.dbg-txt { font-size: 11.5px; }

/* ============================================================
   v0.28.7（用户第 4、6 条）：合并字段的选择器 + 插件市场卡片
   ============================================================ */
/* v0.29.4（用户第 6 条）：两个板块各占一半，右边不再空一截 */
.merge-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; align-items: start; }
.merge-two > .bind-card { width: 100%; }
.merge-pick { width: 100%; min-width: 0; }
/* 系统自动生成、不能参与合并的字段：灰掉加锁 */
.merge-row.locked { opacity: .55; cursor: not-allowed; }
.merge-row.locked .mr-name { color: var(--text-3); }
.merge-pick-t { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.merge-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.merge-row {
  display: flex; width: 100%; gap: 8px; align-items: center;
  padding: 6px 9px; background: transparent; border: 0;
  border-bottom: 1px solid var(--border); cursor: pointer; text-align: left;
  font-family: var(--font);
}
.merge-row:last-child { border-bottom: 0; }
.merge-row:hover { background: var(--primary-light); }
.merge-row.on { background: var(--primary-light); }
.merge-row.on .mr-name { color: var(--primary); font-weight: 600; }
.mr-name { font-size: 13px; }
.mr-group { font-size: 11px; color: var(--text-3); }
.mr-count { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.merge-tip {
  margin-top: 10px; padding: 8px 10px; border-radius: 9px;
  background: var(--panel-2); font-size: 12.5px; line-height: 1.85; color: var(--text-2);
}

.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.pm-card {
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.pm-head { display: flex; align-items: center; gap: 8px; }
.pm-ico { display: inline-flex; color: var(--primary); }
.pm-ico .ico-svg { width: 17px; height: 17px; }
.pm-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.pm-tag { margin-left: auto; }
.pm-what { font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.pm-advice {
  font-size: 12px; color: var(--text-3); line-height: 1.9;
  background: var(--panel-2); border-radius: 9px; padding: 8px 10px;
}
.pm-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* v0.28.7（用户第 10、11 条）：Z 系列对话气泡 + 录入表单排布 */
.z-thread { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.z-msg { border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.85; }
.z-user { background: var(--panel-2); }
.z-me { background: var(--primary-light); border: 1px solid var(--primary-border); }
.z-cap { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.z-text { white-space: pre-wrap; color: var(--text); }

.fl-preview { padding: 10px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; }
/* v0.29.0：这条只管老的「录入表单排布」预览盒（那个编辑器已经下线），
   不要再让 .fl-cell 影响录入表单的布局模式（会把字段盒子撑高 18px） */
.fl-preview .fl-cell {
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
  padding: 8px 10px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; min-height: 38px;
}
.fl-cell-name { color: var(--text); }
.fl-cell-w { margin-left: auto; font-size: 11px; color: var(--text-3); }
.fl-list { display: flex; flex-direction: column; gap: 6px; }
.fl-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--panel);
}
.fl-row.fl-dragging { opacity: .5; }
.fl-row.fl-over { border-color: var(--primary); background: var(--primary-light); }
.fl-grip { color: var(--text-3); cursor: grab; letter-spacing: -2px; }
.fl-name { font-size: 12.5px; min-width: 120px; }

/* v0.28.8（用户第 3 条）：合并字段的选择器 —— 按分组展示 + 搜索高亮 */
.mr-ghead {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 5px 8px; border: 0; border-bottom: 1px solid var(--border);
  background: var(--panel-2); cursor: pointer; font-family: var(--font);
  font-size: 12px; color: var(--text-2); position: sticky; top: 0; z-index: 1;
}
.mr-ghead:hover { background: var(--primary-light); }
.mr-garrow { color: var(--primary); font-size: 10px; width: 10px; }
.mr-gname { font-weight: 600; color: var(--text); }
.mr-gcount { margin-left: auto; font-size: 11px; color: var(--text-3); }
.mr-hit { background: #FFE69A; color: #6B4E00; border-radius: 3px; padding: 0 1px; }
.mr-hitbar {
  font-size: 11.5px; color: var(--text-2); background: var(--primary-light);
  border-radius: 7px; padding: 5px 8px; margin-bottom: 5px; line-height: 1.7;
}
[data-theme] .mr-hit, body[data-theme] .mr-hit { background: var(--warn-light, #FFE69A); }

/* v0.28.8（用户第 4 条）：录入表单「布局模式」—— 弹窗右上角图标 + 可拖的字段方块
   v0.29.0（用户第 3 条）：最小宽度到 1/6；进布局不改字段大小（只用虚线和角标，不占位） */
.form-grid > .twothird { grid-column: span 4; }
.form-grid > .sixth { grid-column: span 1; }
.form-grid.fl-editing { position: relative; z-index: 2; }
/* v0.48.0（用户第 3.3 条）：字段挪到两个小组中间后，右上角的 ‹ › 会被上面那张卡片盖住 ——
   抬高层级，让箭头永远浮在最上面 */
.form-grid.fl-editing > [data-fkey] { z-index: 3; }
.form-grid.fl-editing .fl-moves { z-index: 31; }
/* v0.29.2（用户第 4 条）：布局图标固定在最右边、紧挨 ✕（以前紧跟着标题，看着在中间） */
/* v0.29.3（用户第 4 条）：布局图标和关闭按钮挨得太近 —— 往左让 18px */
.fl-toggle { margin-left: auto; margin-right: 18px; }
.fl-toggle.active { color: var(--primary); border-color: var(--primary-border); background: var(--primary-light); }
.fl-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 10px;
  background: var(--primary-light); border: 1px dashed var(--primary-border); border-radius: 10px;
}
.fl-bar-t { font-size: 12px; color: var(--text-2); line-height: 1.75; flex: 1 1 300px; }
.form-grid.fl-editing > [data-fkey] {
  position: relative;
  /* outline 不占位置：进入布局模式后字段的宽高和平时一模一样 */
  outline: 1px dashed var(--primary-border); outline-offset: 1px;
  border-radius: 9px;
}
.form-grid.fl-editing > [data-fkey].fl-dragging { opacity: .45; }
.form-grid.fl-editing > [data-fkey].fl-over-before,
.form-grid.fl-editing > [data-fkey].fl-over-after { background: var(--primary-light); }
.form-grid.fl-editing > [data-fkey] .field > label { cursor: grab; }
/* 插到哪两个字段之间的那根竖线 */
.fl-dropline {
  position: absolute; width: 3px; border-radius: 2px;
  background: var(--primary); box-shadow: 0 0 0 1px var(--panel);
  pointer-events: none; z-index: 6;
}
/* 左上角 ‹ › 调顺序 */
.fl-moves {
  /* v0.29.0：放右上角 —— 左边是字段名，放左上会压住标签文字 */
  position: absolute; top: -9px; right: 4px; z-index: 4;
  display: flex; gap: 2px;
}
.fl-mv {
  width: 18px; height: 18px; line-height: 16px; padding: 0;
  border: 1px solid var(--primary-border); border-radius: 50%;
  background: var(--panel); color: var(--primary); font-size: 13px;
  cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; justify-content: center;
}
.fl-mv:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.fl-rz {
  position: absolute; top: 0; right: -5px; width: 10px; height: 100%;
  cursor: col-resize; border-radius: 5px; z-index: 3;
}
.fl-rz:hover { background: var(--primary); opacity: .3; }
/* 左边框手柄（左右都能拖宽度） */
.fl-rz-l { right: auto; left: -5px; }
.fl-wtag {
  position: absolute; right: 8px; bottom: 3px; font-size: 10.5px;
  color: var(--primary); background: var(--primary-light); border-radius: 6px; padding: 0 5px;
}

/* v0.28.8（用户第 5 条）：客户关系图谱设置 */
.gr-color-box { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 4px; }
.gr-color { width: 46px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); cursor: pointer; }
.gr-rules { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.gr-rule {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
}
.gr-rule-no {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.gr-rule select { min-width: 118px; }

/* ============================================================
   v0.29.0（用户第 5 条）：抓取公开信息 —— 向导三步（网址 → 字段 → 数量/间隔 → 结果）
   ============================================================ */
.pw-wrap { display: flex; flex-direction: column; gap: 10px; }
.pw-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.pw-step {
  font-size: 11.5px; padding: 4px 10px; border-radius: 20px;
  background: var(--panel-2); color: var(--text-3);
  border: 1px solid transparent; white-space: nowrap;
}
.pw-step.on { background: var(--primary-light); color: var(--primary); border-color: var(--primary-border); font-weight: 600; }
.pw-step.done { color: var(--primary); }
.pw-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pw-sample { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pw-sample-row {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--panel-2); font-size: 12.5px;
}
.pw-sample-no {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--primary); color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pw-prog {
  height: 8px; border-radius: 6px; background: var(--panel-2);
  overflow: hidden; border: 1px solid var(--border);
}
.pw-prog-fill { height: 100%; width: 0; background: var(--primary); transition: width .3s; }
.pw-prog-t { font-size: 12.5px; color: var(--text-2); margin: 6px 0 2px; }
.pw-list {
  max-height: 360px; overflow: auto;
  border: 1px solid var(--border); border-radius: 9px;
}
.pw-row {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 7px 10px; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.pw-row:last-child { border-bottom: 0; }

/* v0.29.0：留空位的占位（不在布局模式时看不见，只占地方） */
.gl-gap { min-height: 0; }

/* ============================================================
   v0.29.1（用户第 7 条）：字段绑定（设置 → 共用字段与标签 → 字段绑定）
   ============================================================ */
.bind-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.bind-card {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel-2); padding: 8px 10px;
}
.bind-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bind-name { font-size: 13px; font-weight: 600; color: var(--text); }
.bind-count { font-size: 11.5px; color: var(--text-3); margin-right: auto; }
.bind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.bind-chip {
  font-size: 11.5px; padding: 2px 9px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--primary-border);
  color: var(--primary); white-space: nowrap; cursor: pointer;
}
.bind-chip:hover { background: var(--primary-light); }
.bind-x { color: var(--text-3); font-weight: 400; margin-left: 2px; }
.bind-form { margin-top: 4px; }

/* ============================================================
   v0.29.2（用户第 5 / 7 / 8 条）：图谱多字段、经营分析设置、合并/绑定记录、全屏模块名
   ============================================================ */
/* 全屏左上角：模块名 + 记录名 */
.rv-modname {
  display: inline-block; margin-right: 8px; padding: 1px 8px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--primary-border); vertical-align: 2px;
}

/* 图谱设置：显示字段的每一行 */
.gr-labels { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.gr-label-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
}
.gr-label-row .an-no,
.an-no {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--primary); color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 经营分析设置：一行一个指标 / 分布 */
.an-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.an-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
}

/* 合并 / 绑定记录 */
.rec-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.rec-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2);
}
.rec-main { flex: 1 1 260px; font-size: 13px; }
.rec-meta { margin-left: 8px; font-size: 11.5px; color: var(--text-3); }
.rec-ops { display: flex; gap: 6px; flex: none; }

/* ============ v0.29.3（用户第 5.2 条）：图谱「大小规则」每行一张小卡 ============ */
.gr-rule-card {
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
  padding: 8px 10px; margin-bottom: 8px;
}
.gr-rule-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-rule-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding-left: 24px; }
.gr-rule-no {
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* ============ v0.32.0（用户第 3 条）：规则里的「板块」卡片 ============
   一个板块 = 一个数（页面 · 字段 · 算法），下面③用「板块1 + 板块2 − 板块3」组合。 */
.gr-blocks { display: flex; flex-direction: column; gap: 6px; }
.gr-block {
  border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2);
  padding: 7px 9px;
}
.gr-block-top { display: flex; align-items: center; gap: 8px; }
.gr-block-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gr-block-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.gr-ops { margin-top: 4px; }

/* ============ v0.29.4（用户第 1 条）：已显示的列平铺，不再按字段类别分组 ============ */
.shown-flat .pf-row:last-child { border-bottom: none; }

/* v0.29.4（用户第 3 条）：表单布局里「留空」的占位格子 */
.fld-gap {
  border: 1px dashed var(--border); border-radius: 8px; min-height: 60px;
  background: repeating-linear-gradient(45deg, transparent, transparent 6px,
    color-mix(in srgb, var(--border) 40%, transparent) 6px, color-mix(in srgb, var(--border) 40%, transparent) 7px);
  opacity: .5; position: relative;
}
.fld-gap::after {
  content: '留空'; position: absolute; left: 8px; top: 6px;
  font-size: 11px; color: var(--text-3);
}
.fl-dropzone {
  grid-column: 1 / -1; border: 1px dashed var(--primary); border-radius: 10px;
  min-height: 54px; display: none; align-items: center; justify-content: center;
  color: var(--primary); font-size: 12.5px; background: color-mix(in srgb, var(--primary) 6%, transparent);
}
.form-grid.fl-editing .fl-dropzone { display: flex; }
.form-grid.fl-editing.fl-over-zone .fl-dropzone { background: color-mix(in srgb, var(--primary) 16%, transparent); }

/* v0.29.4（用户第 4 条）：图谱工具栏上「1 个圈 = 客户」这个小标签 */
.chip-static {
  font-size: 12px; padding: 2px 9px; border-radius: 20px;
  background: var(--panel-3); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}

/* ============================================================
   v0.29.5（用户第 13、14 条）：常见问题 / 文章
   ------------------------------------------------------------
   ① 列表：一行一篇文章（缩略图 + 标题 + 摘要 + 编号 / 作者 / 日期）
   ② 编辑器：固定格式正文（一~四级标题自动编号、图片铺满、粘贴截图）
   ③ 阅读视图：和编辑器同一套正文样式
   ============================================================ */

/* ---------- 列表 ---------- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-row {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.faq-row:hover {
  border-color: var(--primary-border);
  box-shadow: 0 6px 18px rgba(16, 24, 40, .07);
}
.faq-thumb {
  width: 88px; height: 66px; flex: 0 0 88px; border-radius: 9px;
  background: var(--panel-3); display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--text-3); font-size: 22px;
}
.faq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.faq-main { flex: 1; min-width: 0; }
.faq-t { font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.faq-s { font-size: 13px; color: var(--text-2); line-height: 1.55; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.faq-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-3); }
.faq-ops { flex: 0 0 auto; padding-top: 2px; }

/* ---------- 编辑器 ---------- */
.ae-modal { display: flex; flex-direction: column; gap: 12px; }
.ae-title { font-size: 17px; font-weight: 600; padding: 10px 12px; }
.ae-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.ae-meta-i {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2);
  background: var(--panel-3); border-radius: 8px; padding: 6px 10px;
}
.ae-meta-i b { font-weight: 600; color: var(--text-2); }
.ae-meta-i .input { height: 30px; padding: 2px 8px; width: 150px; }
.ae-fld { display: flex; flex-direction: column; gap: 5px; }
.ae-fld-l { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ae-fld-note { font-size: 11.5px; color: var(--text-3); }
.ae-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ae-thumb-prev { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ae-thumb-prev img { max-width: 120px; max-height: 72px; border-radius: 8px; border: 1px solid var(--border); }
.ae-files { display: flex; flex-wrap: wrap; gap: 8px; min-height: 26px; align-items: center; }
.ae-file {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px;
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px;
}
.ae-file a { color: var(--primary); text-decoration: none; }
.ae-file-x { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 12px; }
.ae-file-x:hover { color: var(--danger); }
.ae-custom { border-top: 1px dashed var(--border); padding-top: 10px; }
.ae-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ae-sec-t { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 2px 0 6px; }

/* 工具栏 */
.ae-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); }
.ae-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
}
.ae-g { display: flex; gap: 4px; flex-wrap: wrap; }
.ae-g + .ae-g { padding-left: 8px; border-left: 1px solid var(--border); }
.ae-btn {
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  font-size: 12.5px; padding: 4px 9px; border-radius: 7px; cursor: pointer; line-height: 1.5;
}
.ae-btn:hover { background: var(--primary-light); color: var(--primary); }
.ae-btn-t { font-weight: 600; }
.ae-body {
  min-height: 360px; max-height: 56vh; overflow: auto; padding: 18px 22px;
  font-size: 14.5px; line-height: 1.85; color: var(--text); outline: none;
}
.ae-body:empty::before, .ae-body p:only-child:empty::before {
  content: attr(data-placeholder); color: var(--text-3);
}
.ae-body[contenteditable="true"]:focus { background: #fff; }
.ae-hint { font-size: 11.5px; color: var(--text-3); padding: 6px 12px 10px; }

/* ---------- 正文排版（编辑 / 阅读共用） ---------- */
.ae-body h1, .ae-read h1 { font-size: 20px; margin: 18px 0 10px; font-weight: 700; line-height: 1.5; }
.ae-body h2, .ae-read h2 { font-size: 17px; margin: 16px 0 8px; font-weight: 700; line-height: 1.5; }
.ae-body h3, .ae-read h3 { font-size: 15.5px; margin: 14px 0 6px; font-weight: 600; line-height: 1.5; }
.ae-body h4, .ae-read h4 { font-size: 14.5px; margin: 12px 0 6px; font-weight: 600; color: var(--text-2); }
/* 自动编号：1 / 1.1 / 1.11 / 1.111 —— 不写进正文，靠 data-no */
.ae-body h1[data-no]::before, .ae-read h1[data-no]::before,
.ae-body h2[data-no]::before, .ae-read h2[data-no]::before,
.ae-body h3[data-no]::before, .ae-read h3[data-no]::before,
.ae-body h4[data-no]::before, .ae-read h4[data-no]::before {
  content: attr(data-no); color: var(--primary); margin-right: 10px;
  font-variant-numeric: tabular-nums; font-weight: 700;
}
.ae-body p, .ae-read p { margin: 8px 0; }
.ae-body ul, .ae-body ol, .ae-read ul, .ae-read ol { margin: 8px 0 8px 22px; }
.ae-body blockquote, .ae-read blockquote {
  margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--primary-border);
  background: var(--primary-light); border-radius: 0 8px 8px 0; color: var(--text-2);
}
.ae-body figure.ae-img, .ae-read figure.ae-img { margin: 12px 0; }
.ae-body img, .ae-read img {
  max-width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block;
}
.ae-body a, .ae-read a { color: var(--primary); }

/* ---------- 阅读视图 ---------- */
.ae-reader-t { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.ae-reader-meta {
  display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-3);
  padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.ae-reader-sum { flex: 1 0 100%; color: var(--text-2); font-size: 13px; }
.ae-read { font-size: 14.5px; line-height: 1.85; color: var(--text); }
.ae-reader-files { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--border); }
.ae-reader-kv { display: flex; gap: 10px; font-size: 13px; padding: 4px 0; }
.ae-reader-kv b { color: var(--text-2); font-weight: 600; min-width: 100px; }

/* ============================================================
   v0.29.7（用户第 6 条）：文章编辑「最小化到左下角」
   ------------------------------------------------------------
   写文章时点标题栏的「—」→ 整个弹窗收起，左下角留一条小窗；
   点小窗回到编辑（正文、光标前的改动都在，没提交）。
   ============================================================ */
.modal-mini {
  position: fixed; left: 14px; bottom: 14px; z-index: 9999;
  display: flex; align-items: center; gap: 8px;
  max-width: 320px; padding: 9px 10px 9px 12px;
  background: var(--panel); border: 1px solid var(--primary-border);
  border-radius: 12px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .18);
  font-size: 13px; color: var(--text);
  transition: transform .12s, box-shadow .12s;
}
.modal-mini:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(16, 24, 40, .22); }
.modal-mini .mm-ico { font-size: 15px; }
.modal-mini .mm-t {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}
.modal-mini .mm-x {
  flex: 0 0 auto; color: var(--text-3); font-size: 12px; padding: 0 2px; border-radius: 4px;
}
.modal-mini .mm-x:hover { color: var(--danger); background: var(--danger-light, #FEE4E2); }

/* v0.33.0（用户第 5 条）：全站「记录与提醒」单元格 ——
   第 1-2 行可能是提醒（闹钟 + 还有几天 + 日期 / 提醒内容），后面是记录（记录图标 + 几天前 + 日期 + 内容） */
.rec-cell { min-width: 0; }
.rec-cell .rec-line { min-height: 18px; }
.rec-cell .rec-ico svg { width: 13px; height: 13px; display: block; }
.rec-cell .rec-ico { color: var(--primary); }
.rec-cell .rec-line > span:last-child { color: var(--text); }

/* ============================================================
   v0.35.0（用户第 1、2、4.1 条）：记录与提醒的标签图标 / 筛选条
   —— 图标一律用全站线性图标（颜色跟随主题），尺寸跟正文对齐
   ============================================================ */
.rec-tag-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 1; }
.rec-tag-ico .ico-svg { width: 13px; height: 13px; vertical-align: 0; }
.rec-filter-bar { scrollbar-width: thin; }
.rec-filter-bar .filter-chip { display: inline-flex; align-items: center; gap: 5px; }
.rec-filter-bar .filter-chip.active .ico-svg { color: #fff; }

/* ============================================================
   v0.37.0（用户第 3 条）：一行里的内容一律垂直居中
   ------------------------------------------------------------
   用户原话：「客户关系图谱上面那行……这里垂直居中。其他地方也检查下，
              一行的内容要垂直居中。」
   原因：UI.chips() 本身就是一个 .toolbar（自带 margin-bottom:16px），
        嵌在另一行 .toolbar 里时，那 16px 下边距把芯片整排顶高了，
        和旁边的文字 / 静态芯片对不齐。
   ============================================================ */
.toolbar { align-items: center; }
.toolbar > * { align-self: center; }
.toolbar > .toolbar { margin: 0; flex: none; }
.toolbar > .hint,
.toolbar > .chip-static,
.toolbar > span { line-height: 1.4; }
/* 工具栏里的原生输入框和按钮高度对齐（搜索框 34px 是列表工具栏的标准高度） */
.toolbar > .input { height: 34px; box-sizing: border-box; }

/* ========================= v0.38.0（用户第 2 条）：记录与提醒 =========================
   ① 记录内容按录入时的换行显示（不再挤成一口长条）
   ② 每条记录底部一行：标签 / 闹钟 / 延后 / 标记已处理，最右边「更多」（更改 / 删除）
   线索 / 商机 / 成交的客户 / 成交记录 共用这一套样式。 */
.rec-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  font-size: 13px;
  color: var(--text);
  margin-top: 3px;
}
/* v0.111.0（用户 1.1）：记录日期后面的闹钟提醒时间（处理过的不显示） */
.rec-rm-when { color: var(--warning); font-weight: 600; }
.rec-rm-when.over { color: var(--danger); }
.rec-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.rec-foot > .badge { font-size: 11.5px; }
.rec-foot .rec-more { margin-left: auto; }

/* v0.45.0（用户第 8 条）：表头筛选小箭头（Excel 那种） */
.th-filterable { position: relative; }
.th-filter {
  display: inline-block; margin-left: 4px; font-size: 10px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 2px 3px; border-radius: 4px;
  vertical-align: middle; user-select: none;
}
.th-filter:hover { background: var(--panel-2); color: var(--primary); }
.th-filter.on { color: var(--primary); font-weight: 700; }
.th-filtered { color: var(--primary); }
/* v0.120.22（用户第 1 条）：表头整格可拖换序（不要额外手柄），鼠标停在可拖表头上显示 grab */
.table th.th-reorderable { cursor: grab; user-select: none; -webkit-user-select: none; }
.table th.th-reorderable.th-dragging { cursor: grabbing; opacity: .6; }
.table th.th-reorderable .col-grip { cursor: col-resize; }
.table th.th-dragging { opacity: .45; }
/* v0.120.23：拖动换序的落点竖线 —— 独立元素，fixed 定位在两列之间的缝上（用视口坐标） */
.th-drop-line {
  position: fixed; width: 2px; background: var(--primary, #2E75B6);
  z-index: 4000; pointer-events: none; display: none; border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6);
}
.colfilter-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.colfilter-row { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.colfilter-row:hover { background: var(--panel-2); }
.colfilter-row .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== v0.46.0（用户第 10 条）：成交记录「客户视角」全屏 ===== */
/* v0.47.0（用户第 7 条）：以前是 96vw × 92vh，还被 `.modal-mask:not(.side-mask) .modal`
   的 max-width 压到 680px，看着还是个对话框。现在真的是**铺满整屏**（100vw × 100vh），
   和客户页面双击条目进入的全屏模式一样。 */
.modal-mask.cv-mask,
.modal-mask:has(.cv-full) { padding: 0; align-items: stretch; justify-content: stretch; background: var(--panel); }
.modal.cv-full,
.modal-mask:not(.side-mask) .modal.cv-full,
.modal-mask .modal.cv-full {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; box-shadow: none; margin: 0; display: flex; flex-direction: column;
}
.modal.cv-full .modal-head { padding: 12px 20px; }
.modal.cv-full .modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 12px 16px; }
.cv-body { height: 100%; min-height: 0; }
.cv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cv-who { font-weight: 700; font-size: 14px; }
.cv-chips { display: flex; gap: 6px; flex-wrap: wrap; max-width: 60%; }
.cv-cols { flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; overflow: hidden; }
.cv-left { flex: 1 1 54%; min-width: 320px; overflow: auto; padding-right: 4px; }
.cv-right { flex: 1 1 46%; min-width: 280px; overflow: auto; background: var(--panel-2); border-radius: 12px; padding: 10px; }
.cv-step-edit { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.cv-phone { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.cv-phone-hd { padding: 10px 12px; font-weight: 700; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.cv-phone-bd { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.cv-order { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.cv-timeline { display: flex; flex-direction: column; gap: 2px; }
.cv-tl { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; position: relative; }
.cv-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--panel-3); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.cv-tl.done .cv-dot { background: var(--primary); color: #fff; }
.cv-tl.cur .cv-dot { border: 2px solid var(--primary); background: var(--primary-light); color: var(--primary); }
.cv-tl-t { font-size: 13px; line-height: 1.4; }
.cv-logs { display: flex; flex-direction: column; gap: 6px; }
.cv-log { border-left: 2px solid var(--primary-border); padding: 2px 0 2px 8px; font-size: 13px; white-space: pre-wrap; }
.cv-log-at { font-size: 11.5px; color: var(--text-3); }
.cv-note { font-size: 12.5px; color: var(--text-2); background: var(--panel-2); border-radius: 8px; padding: 8px; }

/* v0.48.0（用户第 2.1 条）：客户关系图谱设置 —— 每个小节一块卡片（参考「开一个成员账号」） */
.gr-sec {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 10px;
  margin: 0 0 12px; background: var(--panel-2);
}
.gr-sec > .section-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.gr-sec > .hint:first-of-type { margin-top: 0; }

/* v0.48.0（用户第 5.3 条）：正在筛选的列，表头整格加深一点（跟随主题），一眼看出哪列筛过了 */
th.th-filtered {
  background: color-mix(in srgb, var(--primary) 20%, var(--panel-2));
  box-shadow: inset 0 -2px 0 var(--primary);
}
th.th-filtered .th-filter.on { color: var(--primary); font-weight: 700; }

/* v0.50.0（用户第 3.2 条）：图谱设置一个板块里的二级小标题（颜色 / 大小 / 显示字段 / 大小规则） */
.gr-sub {
  margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--text);
  padding-left: 8px; border-left: 3px solid var(--primary);
}
.gr-sub:first-child { margin-top: 0; }

/* v0.68.0（用户第 5 条）：紧凑行（30px 高的字段行）里的输入框 / 下拉框，
   全局 .input 带 8px 上下内边距，30px 的框只剩 14px 内容区，12.5px 的字上下被裁一半 ——
   用户看到的「单行文本 / 多行文本 显示不全」就是这个。这里统一把上下内边距清掉。 */
.fe-row .input, .fe-row select.input, .fe-name, .fe-row .fe-name,
.pf-row .input, .pf-row select.input, .pf-row .select-trigger,
.ae-meta-i .input, .rv-set-h, .rel-hex {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.fe-row select.input, .pf-row select.input, .ae-meta-i select.input {
  padding-left: 8px !important;
  padding-right: 4px !important;
}
/* 原生 select 在 30px 的框里居中显示，别让它按 line-height 顶上去 */
.fe-row select.input, .pf-row select.input, .ae-meta-i select.input { line-height: normal; }
.pf-row .input:not(select), .fe-row .fe-name { line-height: 28px; }

/* v0.68.0（用户第 1.3 条）：布局模式里多行文本框右下角的高度手柄 */
.fl-rzh {
  /* 往左让 19px：右下角那个原生「可拖拽」小三角要留着（用户第 1.3 条） */
  position: absolute; right: 19px; bottom: 3px; width: 17px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: ns-resize; z-index: 6; font-size: 11px; line-height: 12px;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary-border); border-radius: 4px;
}
.fl-rzh:hover { background: var(--primary); color: #fff; }

/* ---------- v0.91.0（用户第 4.4 / 4.5 条）：板块样式 ----------
   「背景色」= 现在的样子（淡色底，不描边）；
   「框框」= 白底 + 主题色边框，全站所有分板块统一换成这一种。
   由 设置 → 主题风格 → 板块样式 控制，按角色生效（body.block-frame）。 */
body.block-frame .card-block,
body.block-frame .rv-block,
body.block-frame .card,
body.block-frame .cfg-sec,
body.block-frame .fold-card,
body.block-frame .home-hero,
body.block-frame .home-plan {
  background: var(--panel) !important;
  border: 1px solid var(--primary-border) !important;
  box-shadow: none !important;
}
body.block-frame .card-block > .blk-hd,
body.block-frame .fold-card > .fold-head,
body.block-frame .cfg-sec > .cfg-sec-head {
  background: transparent !important;
}
/* v0.92.0（用户第 3.3 / 3.4 条）：板块样式要彻底 ——
   背景色：所有分板块（工作台卡片 / 设置分节 / 二级分节）都是淡色底、不描边；
   框框：全部白底 + 主题色边框，内层不再有任何底色（否则就是「框里套色块」）。 */
body:not(.block-frame) .card,
body:not(.block-frame) .cfg-sec,
body:not(.block-frame) .cfg-sub {
  background: var(--panel-2) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body:not(.block-frame) .card-head,
body:not(.block-frame) .cfg-sec-head,
body:not(.block-frame) .cfg-sub-head {
  border-color: transparent !important;
  background: transparent !important;
}
body.block-frame .cfg-sec,
body.block-frame .fold-body .cfg-sec {
  background: var(--panel) !important;
  border: 1px solid var(--primary-border) !important;
}
/* v0.94.0（用户第 3 条）：框只用来区分多个板块。
   ① 分节里只有一个内容块时，里面那块不再套框（外层分节已经是框/底色了）；
   ② 所有框框统一圆角，不出现「有的圆角、有的直角」。 */
body.block-frame .fold-body > .card:only-child {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* 背景色模式：一个块也可以有淡色底（用户明确允许），只把多余的边框去掉 */
body:not(.block-frame) .fold-body > .card:only-child {
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
body.block-frame .card,
body.block-frame .cfg-sec,
body.block-frame .fold-card,
body.block-frame .card-block,
body.block-frame .rv-block,
body.block-frame .home-hero,
body.block-frame .home-plan,
body:not(.block-frame) .card,
body:not(.block-frame) .cfg-sec,
body:not(.block-frame) .fold-card,
body:not(.block-frame) .card-block {
  border-radius: 12px !important;
}

/* v0.93.0（用户第 3 条）：框框模式下，二级标题（系统字段 / 共有字段 / 引用字段 / 自定义字段 / 智能字段…）
   直接白底、不要主题色边框 —— 一个标题只有一行时再套一个框，只会让设置面板满是方框。
   框只留给「一级分节」（字段设置 / 列表显示设置…）这种真正用来区分板块的地方。 */
body.block-frame .cfg-sub,
body.block-frame .fold-body .cfg-sub {
  background: var(--panel) !important;
  border: 0 !important;
  border-radius: 0 !important;
}
body.block-frame .cfg-sec > .cfg-sec-body,
body.block-frame .cfg-sub > .cfg-sub-body,
body.block-frame .fold-body .cfg-sub-body {
  background: transparent !important;
}
body.block-frame .cfg-sec > .cfg-sec-head {
  background: transparent !important;
  border-bottom-color: var(--primary-border) !important;
}
body.block-frame .cfg-sub > .cfg-sub-head,
body.block-frame .fold-body .cfg-sub-head {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
}
body.block-frame .cfg-sub > .cfg-sub-body,
body.block-frame .fold-body .cfg-sub-body { border-top: 0 !important; }
body.block-frame .card {
  background: var(--panel) !important;
  border: 1px solid var(--primary-border) !important;
  box-shadow: none !important;
}
body.block-frame .card > .card-head { border-bottom-color: var(--primary-border) !important; }

/* ============================================================
   v0.95.0
   ============================================================ */

/* 记录与提醒：没选标签时的「默认」图标（用户第 1 条） */
.rec-def-ico { font-size: 13px; line-height: 1; color: var(--text-3); opacity: .9; margin-right: 2px; }

/* 板块和板块之间要留缝（用户第 6 条）：数据和数据备份这类堆叠的卡片以前贴在一起 */
.content .card + .card,
.fold-body > .card + .card,
.cfg-sub-body > .card + .card { margin-top: 14px !important; }
.cfg-sec + .cfg-sec { margin-top: 12px; }
.fold-body > .cfg-sec + .cfg-sec { margin-top: 12px; }

/* 四个地方各自选样式（v0.95.2 用户第 4 条）
   ① 保存状态栏 saveBar ② 角色切换 roleSwitch ③ 板块标题条 blockHead ④ 账号名称 userChip
   六种：pill 浅色胶囊 / card 白底描边 / plain 纯文字 / underline 下划线 / soft 浅底无边框 / dark 主题实底 */

/* ---------- ① 保存状态栏 ---------- */
body.chrome-saveBar-pill .save-bar { background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 999px; }
body.chrome-saveBar-card .save-bar { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
body.chrome-saveBar-plain .save-bar { background: transparent; border-color: transparent; padding-left: 0; }
body.chrome-saveBar-underline .save-bar { background: transparent; border: 0; border-bottom: 2px solid var(--primary); border-radius: 0; padding-left: 0; }
body.chrome-saveBar-soft .save-bar { background: var(--primary-light); border: 0; border-radius: 10px; }
body.chrome-saveBar-dark .save-bar { background: var(--primary); border: 1px solid var(--primary); border-radius: 999px; }
body.chrome-saveBar-dark .save-bar .save-bar-txt { color: #fff; }
body.chrome-saveBar-dark .save-bar .btn { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- ② 角色切换 ---------- */
body.chrome-roleSwitch-pill .role-switch { background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 999px; }
body.chrome-roleSwitch-pill .role-switch button { color: var(--primary); }
body.chrome-roleSwitch-pill .role-switch button.active { background: var(--primary); color: #fff; }
body.chrome-roleSwitch-card .role-switch { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
body.chrome-roleSwitch-plain .role-switch { background: transparent; border-color: transparent; padding-left: 0; gap: 2px; }
body.chrome-roleSwitch-underline .role-switch { background: transparent; border: 0; border-bottom: 2px solid var(--primary); border-radius: 0; padding-left: 0; }
body.chrome-roleSwitch-soft .role-switch { background: var(--primary-light); border: 0; border-radius: 10px; }
body.chrome-roleSwitch-soft .role-switch button { color: var(--primary); }
body.chrome-roleSwitch-soft .role-switch button.active { background: var(--primary); color: #fff; }
body.chrome-roleSwitch-dark .role-switch { background: var(--primary); border: 1px solid var(--primary); border-radius: 999px; }
body.chrome-roleSwitch-dark .role-switch button { color: rgba(255,255,255,.78); }
body.chrome-roleSwitch-dark .role-switch button.active { background: #fff; color: var(--primary); }

/* ---------- ③ 板块标题条 ---------- */
body.chrome-blockHead-pill .cfg-sec .cfg-sec-head,
body.chrome-blockHead-pill .fold-card .fold-head,
body.chrome-blockHead-pill .card .card-head,
body.chrome-blockHead-pill .ps-sec-head {
  background: var(--primary-light) !important; border-bottom: 1px solid var(--primary-border) !important; border-radius: 10px !important;
}
body.chrome-blockHead-card .cfg-sec .cfg-sec-head,
body.chrome-blockHead-card .fold-card .fold-head,
body.chrome-blockHead-card .card .card-head,
body.chrome-blockHead-card .ps-sec-head {
  background: var(--panel-2) !important; border-bottom: 1px solid var(--border) !important; border-radius: 10px !important;
}
body.chrome-blockHead-plain .cfg-sec .cfg-sec-head,
body.chrome-blockHead-plain .fold-card .fold-head,
body.chrome-blockHead-plain .card .card-head,
body.chrome-blockHead-plain .ps-sec-head { background: transparent !important; border-radius: 0 !important; }
body.chrome-blockHead-underline .cfg-sec .cfg-sec-head,
body.chrome-blockHead-underline .fold-card .fold-head,
body.chrome-blockHead-underline .card .card-head,
body.chrome-blockHead-underline .ps-sec-head {
  background: transparent !important; border: 0 !important; border-bottom: 2px solid var(--primary) !important; border-radius: 0 !important;
}
body.chrome-blockHead-soft .cfg-sec .cfg-sec-head,
body.chrome-blockHead-soft .fold-card .fold-head,
body.chrome-blockHead-soft .card .card-head,
body.chrome-blockHead-soft .ps-sec-head {
  background: var(--primary-light) !important; border: 0 !important; border-radius: 10px !important;
}
body.chrome-blockHead-dark .cfg-sec .cfg-sec-head,
body.chrome-blockHead-dark .fold-card .fold-head,
body.chrome-blockHead-dark .card .card-head,
body.chrome-blockHead-dark .ps-sec-head {
  background: var(--primary) !important; border: 0 !important; border-radius: 10px !important;
}
body.chrome-blockHead-dark .cfg-sec .cfg-sec-head .cfg-sec-title,
body.chrome-blockHead-dark .fold-card .fold-head .fold-title,
body.chrome-blockHead-dark .card .card-head .title,
body.chrome-blockHead-dark .ps-sec-head b { color: #fff !important; }
body.chrome-blockHead-dark .cfg-sec-arrow,
body.chrome-blockHead-dark .fold-arrow { color: rgba(255,255,255,.8) !important; }
body.chrome-blockHead-dark .card .card-head .btn { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- ④ 账号名称 ---------- */
body.chrome-userChip-pill .user-chip { background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 999px; }
body.chrome-userChip-card .user-chip { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
body.chrome-userChip-plain .user-chip { background: transparent; border-color: transparent; padding-left: 2px; }
body.chrome-userChip-underline .user-chip { background: transparent; border: 0; border-bottom: 2px solid var(--primary); border-radius: 0; }
body.chrome-userChip-soft .user-chip { background: var(--primary-light); border: 0; border-radius: 10px; }
body.chrome-userChip-dark .user-chip { background: var(--primary); border: 1px solid var(--primary); border-radius: 999px; }
body.chrome-userChip-dark .user-chip .name,
body.chrome-userChip-dark .user-chip span { color: #fff !important; }
body.chrome-userChip-dark .user-chip .avatar { background: rgba(255,255,255,.2); color: #fff; }

/* 列表「点一下就能改」（用户第 5 条）—— 悬停时给个笔形提示 */
.cell-edit { cursor: text; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; transition: background .12s; }
.cell-edit:hover { background: var(--primary-light); box-shadow: inset 0 0 0 1px var(--primary-border); }
.cell-edit .cell-edit-pen { font-size: 11px; color: var(--primary); opacity: 0; margin-left: 4px; }
.cell-edit:hover .cell-edit-pen { opacity: 1; }
.cell-edit-input {
  width: 100%; min-width: 90px; font-family: var(--font); font-size: 13px;
  padding: 3px 6px; border: 1px solid var(--primary); border-radius: 6px;
  background: var(--panel); color: var(--text); outline: none;
}
.cell-edit-save { font-size: 11px; color: var(--primary); margin-left: 4px; cursor: pointer; }

/* 平台管理 → 设置 → 外观：三档预览图（用真实控件画的小样，不加载图片） */
.chrome-prev { display: flex; gap: 14px; flex-wrap: wrap; }
.chrome-prev-card {
  width: 196px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; cursor: pointer; background: var(--panel);
}
.chrome-prev-card:hover { border-color: var(--primary-border); }
.chrome-prev-card.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.chrome-prev-card .cp-title { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.chrome-prev-card .cp-demo { display: flex; align-items: center; gap: 4px; padding: 6px 8px; font-size: 10.5px; }
.chrome-prev-card .cp-demo b { font-weight: 600; }
.chrome-prev-card .cp-pill { border-radius: 999px; }
.chrome-prev-card .cp-bar { margin-top: 6px; border-radius: 8px; }
.chrome-prev-card .cp-note { font-size: 11px; color: var(--text-3); margin-top: 7px; line-height: 1.5; }

/* 数据备份：导出 / 导入两块各自成块、中间留缝（用户第 6 条） */
.fold-body .bk-block {
  background: var(--panel-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  margin: 0 0 12px !important;
}
.fold-body .bk-block:last-child { margin-bottom: 0 !important; }

/* 商品设置「详情页小节」这类板块标题条：跟随全局外观 */
.ps-sec-head { padding: 9px 12px !important; border-radius: 8px !important; }


/* v0.96.3：调试快捷按钮固定在右侧（账号名称左边） */
.topbar-dbg-right { margin-left: 6px; }

/* v0.97.0（团队） */
.team-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px;
  border-radius: 999px; background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.team-badge:hover { background: var(--primary); color: #fff; }
/* v0.99.0：折叠显示时，主行标识后面的「+2 / −2」展开按钮 */
.team-more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; margin-left: 3px; padding: 0 3px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--primary-border);
  color: var(--primary); font-size: 10px; font-weight: 700; line-height: 1;
}
.team-more:hover { background: var(--primary); color: #fff; }
.team-same { color: var(--text-3); font-size: 12px; }
.table tbody tr.team-syn button, .table tbody tr.team-syn .link { pointer-events: none; opacity: .45; }
.table tbody tr.row-tf-sel td { box-shadow: none; } /* v0.108.0（用户 2.5）：选中只变底色，不加框 */
.table tbody tr.team-sub td { background: color-mix(in srgb, var(--primary) 2.5%, transparent); border-bottom: none; }
.table tbody tr.team-sub.team-last td { border-bottom: 1px solid var(--border); }
/* 主行概念已取消，保留选择器只为兼容旧数据 */
.table tbody tr.team-main td { border-top: none; border-bottom: none; }
/* v0.107.0（用户 1.1）：团体名称下面的成员之间不画任何横线，只在团体最后一行收一条 */
.table tbody tr.team-main.team-last td,
.table tbody tr.team-roster.team-last td { border-bottom: 1px solid var(--border); }
.table tbody tr.team-roster td { background: color-mix(in srgb, var(--primary) 2.5%, transparent); border-bottom: none; }
/* v0.102.0（用户 4.5）：团体名称行 —— 和下面的成员之间不画线 */
.table tbody tr.team-head td {
  background: color-mix(in srgb, var(--primary) 2.5%, transparent);
  border-bottom: none;
  /* v0.105.0（用户 7.1）：团体名称和成员之间不画线（分隔靠上一组的 team-last） */
  box-shadow: none;
}
/* v0.120.98（用户 1.4）：团体 hover 用普通行同款色，不再单独做特殊色 */
.team-head-name { font-weight: 700; color: var(--primary); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
/* v0.109.0（用户 1.11）：成交记录页 —— 团体名称下面列成员智能称呼，一人一行，行高跟着人数变 */
.team-name-box { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-member-name-line { font-size: 12.5px; color: var(--text-2); padding-left: 12px; line-height: 1.55; white-space: nowrap; }
.table tbody tr.team-head.team-last td { border-bottom: 1px solid var(--border); }
.team-m {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 7px;
  background: var(--panel);
}
.team-m:hover { border-color: var(--primary-border); }
.team-name { font-size: 11.5px; color: var(--primary); margin-top: 2px; line-height: 1.4; }

/* v0.108.0（用户 4）：功能选择页的卡片在网格里，不能被「.content .card + .card」推出 14px 偏移 */
.feat-grid > .card + .card { margin-top: 0 !important; }

/* v0.120.52：工单多轮对话折叠（日期+主题） */
.tk-msg-fold { border:1px solid var(--border); border-radius:10px; margin-bottom:8px; background:var(--panel-2); }
.tk-msg-fold .tk-fold-caret { color:var(--primary); font-size:12px; width:12px; display:inline-block; }
.tk-msg-fold .tk-msg-hd { border-bottom:1px dashed var(--border); margin-bottom:6px; padding-bottom:4px; }

/* v0.120.61（用户 3.3）：阶段设置行里的「更多」按钮与输入框/下拉同高 */
.stage-edit-row .more-wrap .btn,
.stage-edit-row .more-wrap > .btn {
  height: 36px; min-height: 36px; padding: 0 12px;
  font-size: 13.5px; display: inline-flex; align-items: center;
}

/* v0.120.62（用户 1）：用户（终端客户）角色下，内部沟通记录与补充内容一律不显示 ——
   即使脚本判断有偏差，CSS 兜底也保证客户看不到。 */
.tk-role-customer [data-tk-internal] { display: none !important; }

/* v0.120.64（用户 4.2）：外层容器不再自己加框 —— 框统一交给每个分组（和线索页一样） */
.lk-fields-card { background: transparent; padding: 0; }

/* v0.120.64（用户 4.2）：ListKit 的「字段设置」是一级分节 —— 在框框皮肤下按 .cfg-sec 渲染（有框），
   保证文件管理 / 工单 / 服务评价 等页面和线索页面长得一模一样。 */
/* v0.120.69（用户 3）：这条 !important 就是把圆角钉死在 8px 的元凶 —— 删掉，交给 inline style（12px） */
body.block-frame .cfg-sub.lk-lv1 { border-radius: 12px !important; margin-bottom: 6px !important; }
body.block-frame .cfg-sub.lk-lv1 > .cfg-sub-head {
  background: var(--primary-light) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 14px !important;
}
body.block-frame .cfg-sub.lk-lv1 > .cfg-sub-body { background: var(--panel) !important; padding: 10px 14px 14px !important; }
body:not(.block-frame) .cfg-sub.lk-lv1 {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* v0.120.66（用户 2）：全屏板块「固定两行、竖排」—— 布局功能暂停期间的排版 */
.rv-stack { display: flex; flex-direction: column; gap: 14px; }
.rv-stack-block {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
}
.rv-stack-block > * { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ============================================================
   v0.120.67（用户 2 · 方案 A）：全屏自由画布
   容器 relative、板块 absolute —— 谁都不参与自动布局，所以永远不会「一起蹦」。
   ============================================================ */
.cv-canvas { position: relative; width: 100%; }
.cv-canvas.cv-editing {
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 1% 100%, 100% 40px;
  background-position: 0 0, 0 0;
  opacity: 1;
}
.cv-canvas.cv-editing { background-image: none; }   /* 网格线太密会晃眼，编辑态只用虚线框 */
.cv-node {
  position: absolute; display: flex; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden;
  border-radius: 10px; background: var(--panel);
}
.cv-canvas.cv-editing .cv-node {
  outline: 1px dashed var(--primary-border);
  outline-offset: -1px;
}
.cv-node.cv-moving, .cv-node.cv-resizing { z-index: 30; outline: 2px solid var(--primary); }
.cv-node-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* v0.120.68（用户 2.2）：拖动把手 = 左上角一个小方块，不占内容高度 */
.cv-bar {
  position: absolute; left: 6px; top: 6px; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; cursor: grab;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 10px; color: var(--text-2); user-select: none;
  opacity: .85;
}
.cv-bar:hover { opacity: 1; background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.cv-bar:active { cursor: grabbing; }
.cv-grip { font-size: 10px; color: var(--text-3); letter-spacing: -1px; }
.cv-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-grow { flex: 1 1 auto; }
.cv-size { white-space: nowrap; font-size: 11px; color: var(--text-3); }
.cv-rz {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 0 50%, var(--primary) 50% 60%, transparent 60% 70%, var(--primary) 70% 80%, transparent 80%);
  border-bottom-right-radius: 10px;
}

/* v0.120.69（用户 2.3/2.4）：布局模式下右上角常显尺寸，点一下可输入 */
.cv-tag {
  /* v0.120.70（用户 2.4）：右边留出 22px 给内容区滚动条，不再压在滑条上 */
  position: absolute; right: 22px; top: 6px; z-index: 6;
  padding: 2px 7px; border-radius: 6px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-2); white-space: nowrap; user-select: none;
}
.cv-tag:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
/* v0.120.70（用户 2.3）：板块标题的真实类名是 .rv-block-title（上一版写的 card-head/card-ico
   根本不存在，所以一直没生效）。布局模式下把它左边那个图标藏掉，那个位置只留拖动图标。 */
.cv-canvas.cv-editing .cv-node .rv-block-title > :first-child { display: none !important; }
/* 标题整体往右让一点，避免文字压到左上角拖动图标 */
.cv-canvas.cv-editing .cv-node .rv-block-title { padding-left: 30px !important; }

/* v0.120.69（用户 3）：顶层设置分组强行对齐线索页 —— 前面有多套历史规则互相覆盖，
   这里用 !important 一次压住，数值全部取自实测的 .cfg-sec。 */
.cfg-sub.cfg-lv1 {
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: var(--panel) !important;
  margin-bottom: 6px !important;
}
.cfg-sub.cfg-lv1 > .cfg-sub-head {
  padding: 10px 14px !important;
  background: var(--primary-light) !important;
  border-radius: 10px !important;
  border-bottom: 0 !important;
}
.cfg-sub.cfg-lv1 > .cfg-sub-body {
  background: transparent !important;
  border-top: 0 !important;
  padding: 10px 14px 14px !important;
}

/* v0.120.76（用户 6）：全站标准等表格，移动端长按复制「编号」时不要连带右侧「标题」——
   每个单元格独立可选（user-select: text），表头不可选。 */
.table td { -webkit-user-select: text; user-select: text; }
.table th { -webkit-user-select: none; user-select: none; }

/* v0.120.79（用户 1.4）：全屏顶部这一行的「记录与提醒」不文字重合 —— 只显示第一条、单行省略 */
.rv-strip-cell .rs-v .rec-cell { display:block; max-height:22px; overflow:hidden; line-height:22px; }
.rv-strip-cell .rs-v .rec-cell .rec-line { display:inline-flex; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rv-strip-cell .rs-v .rec-cell .rec-line:nth-child(n+2) { display:none; }

/* v0.120.79（用户 1.5）：团体名称行 + 成员行的「记录与提醒」合成一大块展示 —— 去掉成员行记录格的上边框，让多行记录连成一片 */
.table tr.team-head td:has(.rec-cell) { border-bottom-color: transparent; }
.table tr.team-sub td:has(.rec-cell) { padding-top: 2px; }
.table tr.team-last td:has(.rec-cell) { border-bottom-color: var(--border); }

/* v0.120.98（用户 1.3）：跨行记录格底部画团体分隔线 —— 成员行这一列没有 td，线原本会断 */
.table tbody tr.team-head td.rec-rowspan,
.table tbody td.rec-rowspan { border-bottom: 1px solid var(--border) !important; }


/* v0.120.98（用户 1.4）：整个团体一起 hover —— 命中任意成员行都给全组上普通行 hover 底色 */
.table tbody tr.team-hover td { background: var(--panel-2) !important; }

/* v0.120.98（用户 1.5）：团体名称旁的展开/收起小三角 */
.team-fold-tri { display:inline-flex; align-items:center; justify-content:center; margin-left:4px;
  font-size:12px; font-weight:700; color:var(--primary); cursor:pointer; padding:0 2px;
  border:1px solid var(--border); border-radius:3px; background:var(--panel-2); min-width:14px; height:16px; flex:none; position:relative; z-index:2; }
.team-fold-tri:hover { background:var(--primary-light); color:var(--primary); }

/* v0.120.102（用户 1.4）：团体名称与三角同一行 */
.team-name-row { display:flex; align-items:center; gap:4px; min-width:0; width:100%; }
/* v0.120.105：团体名称格不裁三角 */
.table tbody td.team-name-td { overflow: visible !important; }

/* v0.120.108（用户 2）：团体名称行内容顶部对齐 —— 折叠/展开行高变化时文字不上下跳 */
.table tbody tr.team-head td { vertical-align: middle !important; height:60px; }

/* v0.120.108（用户 1）：团体成员行紧凑一点 —— 减少跨行记录格底部的空白 */
.table tbody tr.team-sub td { padding-top: 6px; padding-bottom: 6px; }

/* v0.120.109（用户 3）：团体整组 hover 用纯 CSS —— 页面和全屏克隆表都生效，
   不用 JS 事件（cloneNode 不带监听器，之前全屏里 hover 只有单行变色、两种颜色）。
   命中团体任意行 → 同 data-team-id 的所有行一起变普通行 hover 色，一种颜色。 */
.table:has(tbody tr[data-team-id]:hover) tbody tr[data-team-id] td { background: var(--panel-2) !important; }

/* v0.120.110（用户 1）：工具栏高度恒定 —— 重绘后新工具栏也要保持 54px，
   否则点「今日跟进标记」按钮少了/多了会让工具栏 54→42px、整个列表上下跳。 */
.toolbar.list-tb { min-height: 54px; box-sizing: border-box; }

/* v0.120.111（用户 1）：折叠后团体名称/服务阶段垂直居中（用户明确要求，只改这一项） */
.table tbody tr.team-head.team-folded td { vertical-align: middle !important; }

/* v0.120.112：折叠后团体头行高与展开一致（60px），名称/服务阶段位置不跳；记录3行压进60px */
.table tbody tr.team-head.team-folded td { padding-top:2px !important; padding-bottom:2px !important; height:60px; vertical-align:middle !important; }

/* v0.120.113（用户）：只把团体块的「记录与提醒」跨行格内容改成靠上 ——
   团体名称/服务阶段的居中不动（名称不跳的修复保留）。 */
.table tbody tr.team-head td.rec-rowspan { vertical-align: top !important; }

/* v0.120.119（用户 1.2）：团体内操作列/更多按钮列底色和其他列一致 ——
   原来 .col-ops 强制白底，团体成员行是淡色，造成一列白带。 */
.table tbody tr.team-sub td.col-ops { background: color-mix(in srgb, var(--primary) 2.5%, transparent) !important; }
.table tbody tr.team-head td.col-ops { background: color-mix(in srgb, var(--primary) 2.5%, transparent) !important; }

/* v0.120.122（用户 1.1）：操作列表头背景和其他表头完全一致 ——
   .col-ops 是 sticky 列，之前在部分情况下透出白底；显式用和其它 th 一样的 --panel-2 色。 */
.table thead th.col-ops,
.table.table-fixed thead th.col-ops { background: var(--panel-2) !important; }

/* v0.120.122（用户 1.2）：团体头行没有记录时「＋ 记一条」在行内垂直居中；
   有记录时（没有 .rec-empty）排版完全不变。 */
.table tbody tr.team-head td .rec-cell:has(> .rec-empty:only-child) { display:flex !important; align-items:center !important; min-height:38px; }

/* v0.120.123（用户 1.2）：团体头行只有 1 条记录时垂直居中；多条保持原排版 */
.table tbody tr.team-head td .rec-cell.rec-single { display:flex !important; align-items:center !important; min-height:38px; }

/* v0.120.123（用户 1.3）：鼠标悬停行时，团体行「更多/操作」列背景和其他格子一致
   （上面 4408/4409 的 !important 锁住了淡蓝底，hover 时盖不过，这里同样 !important 覆盖）。 */
.table tbody tr.team-sub:hover td.col-ops,
.table tbody tr.team-head:hover td.col-ops { background: var(--panel-2) !important; }

/* v0.120.125（用户 1.2）：成交记录「更多」按钮背景和所在行的其他格子一致 ——
   按钮默认白底(var(--panel))，行是淡色(var(--panel-2))，悬停时更明显。改成透明继承行底色。 */
.table td.col-ops .btn,
.table td.col-ops .btn:hover,
.table td.col-ops .btn:focus { background: transparent !important; }

/* v0.120.125（用户 1.2）：所有行 hover 时操作列/更多按钮格背景和其他格一致（--panel-2）
   原 .table td.col-ops 白底优先级高于 tr:hover td，必须 !important 覆盖。 */
.table tbody tr:hover td.col-ops { background: var(--panel-2) !important; }
