* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4f46e5;
  --primary-d: #4338ca;
  --primary-l: #eef2ff;
  --primary-100: #e0e7ff;   /* v106：比 -l 深一档，用作「选中/chip」描边（-l 太浅，描边看不见） */
  --hover-bg: #f1f5f9;      /* v106：通用 hover 底色（原先各处硬编码 #f1f5f9 / var(--bg) 不统一） */
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e8ebf2;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f59e0b;
  --sidebar: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow: 0 6px 20px rgba(16,24,40,.08);
  --shadow-lg: 0 16px 40px rgba(16,24,40,.16);
  --r: 16px;
  --r-sm: 10px;

  /* ===== 字号阶梯（六档）=====
     规范：只允许使用这六档。禁止 13.5 / 14.5 之类半档，禁止小于 12px 的字号（手机端看不清）。 */
  --fs-xs: 12px;    /* 辅助文字、时间戳、角标、表头 */
  --fs-sm: 13px;    /* 次要正文、表格内容、按钮 */
  --fs-md: 14px;    /* 正文基准 */
  --fs-lg: 16px;    /* 小标题、强调内容 */
  --fs-xl: 20px;    /* 区块标题、页面标题 */
  --fs-num: 28px;   /* 统计卡大数字 */

  /* ===== 间距（4px 栅格）=====
     规范：内外边距一律取这些档位，避免 5px / 7px / 18px 之类零散值。 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  --r-xs: 6px;      /* 圆角补充档（骨架屏、进度条） */

  /* ===== v103：语义色 —— 每组都配 bg（浅底）+ fg（深字）=====
     用法：徽章、状态标签、提示条一律取 bg 做底、fg 做字，禁止直接拿绿/红/橙当文字色（浅底上对比度不够）。 */
  --green-bg: #ecfdf5;  --green-fg: #047857;
  --red-bg: #fef2f2;    --red-fg: #b91c1c;
  --orange-bg: #fffbeb; --orange-fg: #b45309;
  --blue-bg: #eff6ff;   --blue-fg: #1d4ed8;
  --purple-bg: #f5f3ff; --purple-fg: #6d28d9;

  /* ===== v103：文字与边框补充档 ===== */
  --text-2: #475569;    /* 次级正文 */
  --text-3: #94a3b8;    /* 提示/占位 */
  --border-2: #d8dee9;  /* 强调边框（输入框 hover、分隔线） */

  /* ===== v103：z-index 层级表（全站唯一出处，组件里禁止再写魔法数字）=====
     粘性表头 2 < 下拉 15 < 顶栏 20 < 侧栏遮罩 30 < 抽屉 50 < 弹窗 60 < Toast 200 */
  --z-sticky: 2;
  --z-dropdown: 15;
  --z-header: 20;
  --z-mask: 30;
  --z-drawer: 50;
  --z-modal: 60;
  --z-preview: 95;   /* v161：资料预览层。层级表里 --z-modal 名义是 60，但 .modal-mask 实际硬编码 90（历史遗留），故预览层取 95 压住它 */
  --z-toast: 200;

  /* ===== v89：装修端引用的设计令牌 =====
     注意：--brand / --line / --sub 此前被装修端引用 25 处却从未定义，
     导致选中态边框、hover 底色、Tab 高亮等全部静默失效（回退到继承色）。 */
  --brand: #2563eb;
  --brand-w: #eef4ff;
  --brand-b: #c7d7ff;
  --line: #e6ebf2;
  --line2: #f1f5f9;
  --sub: #64748b;
  --hint: #94a3b8;
}
body { font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #2563eb 100%); }
.login-wrap::before, .login-wrap::after { content: ''; position: absolute; border-radius: 50%; filter: blur(20px); opacity: .5; }
.login-wrap::before { width: 380px; height: 380px; background: rgba(255,255,255,.18); top: -120px; left: -100px; }
.login-wrap::after { width: 320px; height: 320px; background: rgba(255,255,255,.14); bottom: -120px; right: -80px; }
.login-card { position: relative; background: #fff; width: 380px; max-width: 92vw; border-radius: 20px; padding: 40px 34px; box-shadow: var(--shadow-lg); }
.login-card .brand-mark { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; letter-spacing: .5px; margin-bottom: 18px; box-shadow: 0 8px 20px rgba(79,70,229,.4); }
.login-card h1 { font-size: 20px; margin-bottom: 6px; color: var(--text); letter-spacing: .5px; }
.login-card .sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 7px; font-weight: 500; }
.login-card input, .login-card select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); outline: none; transition: border-color .2s, box-shadow .2s; background: #fbfcfe; }
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); background: #fff; }
.btn-primary { width: 100%; margin-top: 26px; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; border: none; padding: 12px; border-radius: var(--r-sm); font-size: 16px; font-weight: 600; box-shadow: 0 6px 16px rgba(79,70,229,.35); transition: transform .15s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79,70,229,.4); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }
.alert { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px; margin-top: 14px; display: none; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: var(--sidebar); color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; transition: transform .25s ease; box-shadow: 4px 0 24px rgba(30,27,75,.18); position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
.sidebar .logo { padding: 20px 22px; font-size: 16px; font-weight: 800; color: #fff; background: rgba(0,0,0,.18); display: flex; align-items: center; gap: 11px; letter-spacing: .5px; }
.sidebar .logo::before { content: 'C'; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #818cf8, #c084fc); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 16px; box-shadow: 0 4px 10px rgba(129,140,248,.5); }
.sidebar .menu { padding: 14px 12px; flex: 1; }
.sidebar .menu a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #cbd5e1; font-size: 14px; border-radius: 10px; margin-bottom: 4px; transition: background .18s, color .18s, transform .18s; }
.sidebar .menu a:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.sidebar .menu a.active { background: rgba(129,140,248,.18); color: #fff; box-shadow: inset 3px 0 0 #a5b4fc; }
.sidebar .menu a .ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.sidebar .menu a .ic .ico { width: 19px; height: 19px; }
.btn svg.ico { width: 14px; height: 14px; margin-right: 5px; }
.contact-meta .ico { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.header .hamburger .ico { width: 22px; height: 22px; }
.btn.wp-del { padding: 6px 10px; }
.btn.wp-del .ico { margin-right: 0; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.header { height: 60px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 20; }
.header .hamburger { display: none; background: none; border: none; font-size: 20px; color: var(--text); }
.header .crumb { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.header .user { display: flex; align-items: center; gap: 12px; }
.header .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; box-shadow: 0 3px 8px rgba(79,70,229,.35); }
.header .uname { font-size: 13px; }
.header .uname .tag { margin-left: 6px; }
.content { padding: 22px; flex: 1; overflow: auto; max-width: 1480px; width: 100%; margin: 0 auto; }
/* v111：移动端底部导航（≤768px 显示），方案A：看板/客户/工单/更多，与顶部汉堡共存 */
.m-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: none; height: 56px; background: var(--card); border-top: 1px solid var(--border-2); box-shadow: 0 -2px 12px rgba(15,23,42,.08); padding-bottom: env(safe-area-inset-bottom); }
.m-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-2); font-size: 11px; text-decoration: none; position: relative; }
.m-tabbar a .mtb-ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.m-tabbar a .mtb-ic .ico { width: 21px; height: 21px; }
.m-tabbar a.on { color: var(--primary); }
.m-tabbar a.on .mtb-ic { transform: translateY(-1px); }
.m-tabbar .bdot { position: absolute; top: 6px; right: 50%; margin-right: -22px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.m-tabbar .bdot.b-red { background: var(--red); }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); display: none; visibility: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 40; }
.overlay.show { display: block; visibility: visible; pointer-events: auto; opacity: 1; }
.drawer { position: fixed; top: 0; right: -460px; width: 440px; max-width: 94vw; height: 100%; background: #fff; z-index: 50; box-shadow: var(--shadow-lg); transition: right .28s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; border-top-left-radius: 18px; border-bottom-left-radius: 18px; }
.drawer.show { right: 0; }
.drawer .d-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; }
.drawer .d-body { padding: 20px 22px; overflow: auto; flex: 1; }
.drawer .d-foot { padding: 15px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: #fafbfe; }

/* 卡片/通用 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
/* 数据看板卡片：平板 3 列、手机 2 列，缩小装饰占的空间 */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px 12px 10px; }
  .stat::after { width: 60px; height: 60px; right: -18px; top: -18px; opacity: .4; }
  .stat .value { font-size: 22px; margin-top: 4px; }
  .stat .value.sm { font-size: 16px; }
  .stat-delta { font-size: 11px; }
}
.stat { position: relative; overflow: hidden; padding: 18px 18px 16px; }
.stat:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.stat::after { content: ''; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px; border-radius: 50%; background: var(--accent, #eef2ff); opacity: .55; }
.stat .label { color: var(--muted); font-size: 13px; position: relative; }
.stat .value { font-size: 28px; font-weight: 800; margin-top: 8px; position: relative; letter-spacing: .3px; }
.stat .value.sm { font-size: 20px; }
.grid.stats .stat:nth-child(1) { --accent: #eef2ff; }
.grid.stats .stat:nth-child(1) .value { color: #4338ca; }
.grid.stats .stat:nth-child(2) { --accent: #dcfce7; }
.grid.stats .stat:nth-child(2) .value { color: #047857; }
.grid.stats .stat:nth-child(3) { --accent: #fef3c7; }
.grid.stats .stat:nth-child(3) .value { color: #b45309; }
.grid.stats .stat:nth-child(4) { --accent: #fee2e2; }
.grid.stats .stat:nth-child(4) .value { color: #b91c1c; }
.grid.stats .stat:nth-child(5) { --accent: #e0e7ff; }
.grid.stats .stat:nth-child(5) .value { color: #3730a3; }
.grid.stats .stat:nth-child(6) { --accent: #cffafe; }
.grid.stats .stat:nth-child(6) .value { color: #0e7490; }
.grid.stats .stat:nth-child(7) { --accent: #fce7f3; }
.grid.stats .stat:nth-child(7) .value { color: #9d174d; }
.grid.stats .stat:nth-child(8) { --accent: #f1f5f9; }
.grid.stats .stat:nth-child(8) .value { color: #334155; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1; min-width: 300px; }
.section-title { font-size: 16px; font-weight: 700; margin: 4px 0 16px; position: relative; padding-left: 11px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #6366f1, #a855f7); }
.muted { color: var(--muted); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 表单 */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); outline: none; background: #fbfcfe; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); background: #fff; }
.field .err { color: var(--red); font-size: 12px; margin-top: 4px; display: none; }

/* 按钮 */
.btn { padding: 8px 15px; border-radius: var(--r-sm); border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13px; transition: all .18s; font-weight: 500; }
.btn:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 2px 8px rgba(79,70,229,.12); }
.btn.primary { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(79,70,229,.3); }
.btn.primary:hover { background: linear-gradient(135deg, #4338ca, #4f46e5); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.4); }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; border-color: var(--red); color: var(--red); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--border); }
/* 手机端：横向滚动的宽表首列固定，避免滑走后不知道是哪一行 */
@media (max-width: 768px) {
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap > table th:first-child, .table-wrap > table td:first-child {
    position: sticky; left: 0; z-index: 2; background: #fff;
    box-shadow: 1px 0 0 var(--border);
  }
  .table-wrap > table th:first-child { background: #f8fafc; }
}
/* 销售分析：手机端把宽表格转成卡片 */
.ana-cards { display: none; }
@media (max-width: 768px) {
  .ana-tbl { display: none; }
  .ana-cards { display: grid; gap: 10px; }
  .ana-card { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; background: var(--card); box-shadow: var(--shadow-sm); }
  .ana-card-h { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .ana-card-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; font-size: 12px; color: var(--muted); }
  .ana-card-kv b { color: #1e293b; font-weight: 700; margin-left: 4px; }
  .ana-card-kv .up { color: #16a34a; }
  .ana-card-kv .down { color: #dc2626; }
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #f8fafc; position: sticky; top: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f6f8ff; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f1f5ff; }
tbody tr:last-child td { border-bottom: none; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); outline: none; background: #fbfcfe; transition: border-color .2s, box-shadow .2s; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); background: #fff; }
.toolbar input { min-width: 190px; }

/* 标签/徽章 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; background: #eef2ff; color: #4338ca; font-weight: 500; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 500; }
.b-green { background: #dcfce7; color: #166534; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-orange { background: #ffedd5; color: #9a3412; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-gray { background: #f1f5f9; color: #475569; }
.b-purple { background: #f3e8ff; color: #7e22ce; }

/* 时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, #c7d2fe, #e0e7ff); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-content { margin-top: 4px; line-height: 1.6; }

/* 跟进记录：信息分层（类型彩标 / 人+时间 / 内容 / 结果+下次跟进） */
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.fu-type { font-size: 12px; padding: 2px 9px; border-radius: 9px; font-weight: 600; flex-shrink: 0; }
.fu-t-blue { background: #dbeafe; color: #1e40af; }
.fu-t-green { background: #dcfce7; color: #15803d; }
.fu-t-orange { background: #ffedd5; color: #c2410c; }
.fu-t-purple { background: #ede9fe; color: #6d28d9; }
.fu-t-gray { background: #f1f5f9; color: #475569; }
.tl-who { font-size: 12px; color: #475569; font-weight: 500; }
.tl-time { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.tl-body { line-height: 1.65; color: var(--text, #1e293b); white-space: pre-wrap; word-break: break-word; }
.tl-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 7px; }
.fu-next { font-size: 12px; padding: 2px 9px; border-radius: 9px; font-weight: 600; }
.fu-over { background: #fee2e2; color: #b91c1c; }
.fu-soon { background: #ffedd5; color: #c2410c; }
.fu-ok { background: #f1f5f9; color: #475569; }

/* 售后记录：卡片式（原为 5 列表格，手机端会挤压截断） */
.as-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.as-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: #fff; }
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.as-type { font-size: 14px; color: var(--text, #1e293b); }
.as-body {
  margin-top: 7px; font-size: 13px; line-height: 1.6; color: #475569;
  background: #f8fafc; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word;
}
.as-foot { margin-top: 7px; font-size: 12px; color: var(--muted); }
@media (max-width: 768px) { .as-list { grid-template-columns: 1fr; } }

/* 响应式 */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; height: 100%; z-index: 60; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .header .hamburger { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 16px; }
    .row { flex-direction: column; }
    .m-tabbar { display: flex; }
    .content { padding-bottom: 72px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
}
canvas { display: block; width: 100%; max-width: 100%; }
/* 统一空状态：图标 + 主文案 + 可选说明 + 可选操作（各列表保持一致） */
.empty { text-align: center; color: var(--muted); padding: 44px var(--sp-4); font-size: var(--fs-sm); }
.empty-ico { font-size: 32px; line-height: 1; margin-bottom: var(--sp-3); opacity: .45; }
.empty-title { font-size: var(--fs-md); color: var(--text); font-weight: 500; margin-bottom: var(--sp-1); }
.empty-sub { font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }
.empty-act { margin-top: var(--sp-4); }

/* 骨架屏：列表加载态占位，替代纯文本「加载中...」 */
.skel {
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: skelMove 1.4s ease infinite;
  border-radius: var(--r-xs);
}
.skel-rows { padding: var(--sp-4); }
.skel-title { height: 20px; width: 38%; margin-bottom: var(--sp-4); }
.skel-row { height: 14px; margin-bottom: var(--sp-3); }
.skel-row.short { width: 62%; }
@keyframes skelMove {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* 手机端细调 */
@media (max-width: 768px) {
  .header .uname .tag { display: none; }
  th, td { padding: 10px 10px; }
  .drawer { width: 100%; max-width: 100%; border-radius: 0; }
  .stat .value { font-size: 20px; }
  /* 知识库文件行小屏换行 */
  .kb-files { padding: 10px 12px; }
  .file-row { flex-wrap: wrap; gap: 6px 10px; padding: 10px 8px; }
  .file-name { width: 100%; white-space: normal; word-break: break-all; order: 2; }
  .file-ic { order: 1; }
  .file-size { order: 3; font-size: 12px; }
  .file-row .btn.xs { order: 4; margin-left: auto; }
  .kb-meta { font-size: 12px; }
}
@media (max-width: 480px) {
  .header .uname { display: none; }
  .header { padding: 0 14px; gap: 10px; }
  .header .hamburger { font-size: 24px; }
  .crumb { font-size: 16px; }
  .content { padding: 13px; }
  .login-card { padding: 32px 22px; }
}

/* 分段切换 / 导入类型 */
.seg { display: inline-flex; background: #eef1f6; border-radius: 10px; padding: 4px; gap: 4px; }
.seg-btn { border: none; background: transparent; padding: 7px 16px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--muted); transition: all .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.1); }

/* 居中弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 90; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: min(440px, 92vw); max-height: 84vh; overflow: auto; box-shadow: 0 20px 50px rgba(15,23,42,.25); animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { padding: 16px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; line-height: 1.7; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== AI 话术 & 成交分析卡片 ===== */
.ai-block { margin-top: 12px; }
.ai-sub { font-size: 13px; font-weight: 700; color: #7c3aed; margin-bottom: 8px; letter-spacing: .3px; }
.ai-scripts { display: flex; flex-direction: column; gap: 10px; }
.ai-script { background: linear-gradient(135deg,#f5f3ff,#eef2ff); border: 1px solid #e9e3fb; border-radius: 12px; padding: 12px 14px; }
.ai-scn { display: inline-block; font-size: 12px; font-weight: 600; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 2px 9px; margin-bottom: 7px; }
.ai-ct { font-size: 13px; line-height: 1.75; color: #1e293b; white-space: pre-wrap; }
.ai-strat { font-size: 13px; line-height: 1.8; color: #334155; background: #faf5ff; border-left: 3px solid #a855f7; border-radius: 0 8px 8px 0; padding: 9px 13px; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ai-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.8; color: #334155; }
.ai-list li { margin: 4px 0; }
@media (max-width: 560px) { .ai-grid { grid-template-columns: 1fr; } }

/* 销售分析（阶段三） */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl tr.best td { background: #ecfdf5; }
.tbl tr.worst td { background: #fef2f2; }
.seg { display: inline-flex; gap: 4px; background: var(--bg-soft); border-radius: 8px; padding: 3px; }
.seg-i { padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); text-decoration: none; cursor: pointer; }
.seg-i.active { background: var(--primary); color: #fff; }
/* 销售分析·诊断页差异化样式 */
.analytics-intro { background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.analytics-intro b { color: var(--text); }
.up { color: #16a34a; }
.down { color: #dc2626; }
.warn { color: #dc2626; font-weight: 600; }
.tbl tr.warn-row td { background: #fef2f2; }
.tbl tr.warn-row td.warn { color: #dc2626; font-weight: 700; }
/* 阶段二·AI增强 工具栏与结果区 */
.ai-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-out { margin-top: 10px; }
.ai-scn-sel { font-size: 13px; padding: 5px 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: #fff; color: var(--text, #1e293b); max-width: 200px; }
.ai-summary-tx { font-size: 13.5px; line-height: 1.85; color: #1e293b; white-space: pre-wrap; background: #faf5ff; border-left: 3px solid #a855f7; border-radius: 0 8px 8px 0; padding: 10px 13px; }

/* ===== 知识库 ===== */
.kb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kb-card { padding: 18px 20px; }
.kb-content { margin-top: 10px; font-size: 13px; line-height: 1.85; color: #334155; white-space: pre-wrap; }
/* v74：Markdown 富文本渲染 */
.kb-content.kb-md { white-space: normal; }
.kb-md p { margin: 0 0 8px; }
.kb-md p:last-child { margin-bottom: 0; }
.kb-md .kb-h { font-weight: 700; color: #1e293b; margin: 10px 0 6px; line-height: 1.4; }
.kb-md .kb-h1 { font-size: 17px; }
.kb-md .kb-h2 { font-size: 15px; }
.kb-md .kb-h3, .kb-md .kb-h4 { font-size: 14px; color: #475569; }
.kb-md ul.kb-ul, .kb-md ol.kb-ol { margin: 4px 0 8px; padding-left: 20px; }
.kb-md ul.kb-ul li, .kb-md ol.kb-ol li { margin: 2px 0; }
.kb-md code { background: #f1f5f9; border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.kb-md a { color: var(--primary); }
/* v74：检索高亮 */
mark { background: #fde68a; color: #7c2d12; padding: 0 2px; border-radius: 3px; }
/* v74：版本历史面板 */
.kb-hist { margin-top: 8px; border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.kb-hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #475569; }
.kb-hist-row .btn { flex: none; }
.kb-toggle { margin-top: 6px; }
.kb-card { display: flex; flex-direction: column; }
/* 知识库 AI 问答面板 */
.kbai-msgs { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 10px; }
.kbai-q-msg { align-self: flex-end; background: var(--primary); color: #fff; padding: 9px 13px; border-radius: 12px 12px 2px 12px; max-width: 82%; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.kbai-a { align-self: flex-start; background: #f4f6fb; border: 1px solid var(--border); padding: 11px 14px; border-radius: 12px 12px 12px 2px; max-width: 92%; font-size: 13px; line-height: 1.85; color: #1e293b; white-space: pre-wrap; }
.kbai-loading { opacity: .7; }
.kbai-src { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kbai-src .tag { background: #eef2ff; color: #4338ca; border: 1px solid #e0e7ff; }
.kbai-box { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.kbai-bl { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.kbai-bl select { flex: 1; max-width: 220px; }
.kbai-q { width: 100%; font-family: inherit; font-size: 13px; line-height: 1.6; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; resize: vertical; }
.kbai-box .btn.primary { align-self: flex-end; }
.kb-ppt { margin-bottom: 16px; }
.kb-ppt a { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; background: var(--primary-l); border: 1px solid #e0e7ff; border-radius: 10px; padding: 9px 14px; }
.kb-ppt a:hover { background: #e0e7ff; }
@media (max-width: 760px) { .kb-grid { grid-template-columns: 1fr; } }
/* 知识库移动端字号：正文 13.5px 在手机上偏小，放大到 16px 提升长时间阅读舒适度 */
@media (max-width: 768px) {
  .kb-content { font-size: 16px; line-height: 1.9; }
  .kb-title { font-size: 16px; font-weight: 600; }
  .kb-meta { font-size: 13px; }
  .file-name { font-size: 16px; }
  .kb-toggle { font-size: 13px; padding: 7px 13px; }
}
/* 知识库文件区 */
.kb-files { margin-bottom: 16px; background: #fafbff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; }
.file-row:nth-child(even) { background: #f1f5ff; }
.file-ic { font-size: 20px; flex: 0 0 auto; }
.file-name { flex: 1 1 auto; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.btn.xs { padding: 4px 10px; font-size: 12px; border-radius: 8px; margin-left: 4px; }
.btn.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.btn.danger:hover { background: #fecaca; }

/* ===== 目标管理 ===== */
.progress { height: 8px; background: #e5e7eb; border-radius: 5px; overflow: hidden; margin-top: 10px; }
.progress .bar { height: 100%; border-radius: 5px; transition: width .4s ease; }
.progress.inline { display: inline-block; width: 90px; height: 6px; vertical-align: middle; margin: 0 8px; }
.wp-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.wp-row .wp-cust { flex: 1 1 160px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.wp-row .wp-act { flex: 2 1 200px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.wp-row .wp-due { padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.wp-row .wp-done { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.wp-row .wp-del { padding: 5px 9px; }
.dp-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.dp-row .dp-pri { padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.dp-row .dp-cust { flex: 1 1 160px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.dp-row .dp-content { flex: 2 1 200px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.dp-row .dp-content:focus { border-color: var(--primary); outline: none; }
.dp-row .dp-done { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.dp-row .dp-del { padding: 5px 9px; }
.dp-row.done .dp-content { text-decoration: line-through; color: var(--muted); }
.dp-row.done .dp-pri { opacity: .55; }

/* ===== 看板自定义指标弹窗 ===== */
.dc-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; margin-bottom: 8px; cursor: pointer; }
.dc-item input { width: auto; flex: 0 0 auto; }

/* ===== 客户协作共享 ===== */
.collab-list { display: flex; flex-direction: column; gap: 8px; }
.collab-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fbfcfe; border: 1px solid var(--border); border-radius: var(--r-sm); }
.collab-name { flex: 1 1 auto; font-size: 14px; font-weight: 600; color: var(--text); }
.collab-row .badge { flex: 0 0 auto; }

/* ===== 客户产品标注 ===== */
.chk-group { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 6px 0; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.chk input[type=checkbox] { width: auto; margin: 0; }
.tag-product { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; cursor: pointer; text-decoration: none; }
.tag-product:hover { background: #4338ca; color: #fff; border-color: #4338ca; }
.warn-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.alert-excl { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.alert-excl b { color: #7c2d12; }

/* ===== 客户多联系人 ===== */
.ct-row { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: #fafbff; }
.ct-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ct-grid input { width: 100%; padding: 6px 8px; font-size: 13px; }
.ct-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ct-foot input[type=text], .ct-foot .ct-remark { flex: 1; padding: 6px 8px; font-size: 13px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; }
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-row { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 10px 12px; background: #fafbff; }
.contact-main { font-size: 14px; }
.contact-meta { font-size: 13px; color: #475569; margin-top: 4px; }
.badge.b-green { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* ===== 看板客户健康分布图例 ===== */
.hk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hk-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; }
.hk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ===== 组织架构树 ===== */
.org-tree { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; }
.org-node { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border, #e2e8f0); font-size: 14px; }
.org-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.org-dot.mgr { background: var(--primary, #4f46e5); }
.org-dot.ad { background: #f59e0b; }
.hk-row b { color: #1f2937; margin-left: 2px; }

/* ===== 业务线管理 ===== */
.bl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bl-row .bl-name { flex: 1; padding: 7px 10px; font-size: 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; }
.bl-add { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border, #e2e8f0); }
.bl-add input { flex: 1; padding: 7px 10px; font-size: 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; }

/* ===== 客户库角标 ===== */
.badge-count { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; background: var(--primary, #2f6fed); color: #fff; border-radius: 9px; font-size: 12px; margin-left: 6px; padding: 0 5px; }
.badge-count.b-red { background: #ef4444; }
/* 售后工单 */
.tk-table { width: 100%; border-collapse: collapse; }
.tk-table th, .tk-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.tk-table th { background: #f8fafc; color: #475569; font-weight: 600; }
.tk-table tbody tr { cursor: pointer; }
.tk-table tbody tr:hover { background: #f1f5f9; }

/* 工单页工具栏：PC 端保持原样，移动端搜索框独占一行、筛选下拉自适应 */
.tk-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-toolbar #tk-search { flex: 1 1 220px; min-width: 180px; }
.tk-toolbar select { flex: 0 0 auto; }
.tk-new { flex-shrink: 0; }

/* 售后工单列表：移动端改为卡片式，避免列被截断 */
@media (max-width: 768px) {
  .tk-toolbar { gap: 6px; }
  .tk-toolbar #tk-search { width: 100%; flex: 1 0 100%; margin-bottom: 2px; }
  .tk-toolbar select { flex: 1; min-width: 0; font-size: 13px; }
  .tk-new { position: fixed; right: 14px; bottom: 20px; z-index: 100; width: 52px; height: 52px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(37,99,235,.35); }
  .tk-new .tk-new-text { display: none; }
  .tk-new svg { width: 22px; height: 22px; }
  .tk-table thead { display: none; }
  .tk-table, .tk-table tbody, .tk-table tr, .tk-table td { display: block; width: 100%; box-sizing: border-box; }
  .tk-table tr { margin-bottom: 12px; background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
  .tk-table tr:active { background: #f8fafc; }
  .tk-table td { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; text-align: right; }
  .tk-table td::before { content: attr(data-label); color: #64748b; font-size: 12px; flex-shrink: 0; margin-right: 12px; }
  .tk-table td:first-child { font-weight: 600; color: var(--text, #1e293b); }
  .tk-table td[data-label="标题"] { color: var(--text, #1e293b); text-align: right; }
  .tk-table td:last-child { justify-content: center; background: #f8fafc; padding: 10px; }
  .tk-table td:last-child::before { display: none; }
  .tk-table td .badge { font-size: 12px; }
}
.tk-detail .tk-meta { font-size: 13px; color: #64748b; }
.tk-detail .tk-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.tk-detail .tk-desc { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
/* ===== 工单处理时间线：对话化（我右蓝 / 他人左灰 / 系统流转居中弱化） ===== */
.tk-replies { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.tk-bubble { max-width: 88%; display: flex; flex-direction: column; }
.tk-bubble.tk-b-me { align-self: flex-end; align-items: flex-end; }
.tk-bubble.tk-b-other { align-self: flex-start; align-items: flex-start; }
.tk-b-who { font-size: 12px; color: var(--muted); margin-bottom: 3px; padding: 0 3px; }
.tk-b-body {
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  padding: 9px 12px; border-radius: 13px; background: #fff; border: 1px solid var(--border);
}
.tk-b-me .tk-b-body { background: var(--primary); border-color: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.tk-b-other .tk-b-body { background: #f8fafc; border-bottom-left-radius: 4px; }
.tk-b-time { font-size: 12px; color: #94a3b8; margin-top: 3px; padding: 0 3px; }
.tk-bubble .up-list { margin-top: 6px; }
.tk-sys { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 1px 0; }
.tk-sys span { font-size: 12px; color: #94a3b8; background: #f1f5f9; border-radius: 9px; padding: 2px 10px; }
.tk-sys i { font-style: normal; font-size: 12px; color: #b8c2cf; }

/* ===== 工单回复区：放进抽屉底栏，天然固定在底部 ===== */
.drawer .d-foot.tk-foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 14px; }
.tk-quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tk-quick::-webkit-scrollbar { display: none; }
.tk-q {
  flex-shrink: 0; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: #475569; font-size: 12px; font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: border-color .16s, color .16s;
}
.tk-q:hover { border-color: var(--primary); color: var(--primary); }
.tk-compose-bar { display: flex; align-items: flex-end; gap: 8px; }
.tk-spacer { flex: 1; }
.tk-foot textarea { min-height: 76px; padding: 10px 12px; line-height: 1.5; border-radius: 8px; resize: none; max-height: 160px; overflow-y: auto; }
.tk-foot .up-list:empty { display: none; }
.tk-foot .voice-bar { margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.voice-btn { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 768px) {
  .voice-hint { display: none; }
  .tk-bubble { max-width: 92%; }
  .drawer .d-foot.tk-foot { padding: 8px 10px; gap: 6px; }
  .tk-foot textarea { min-height: 68px; padding: 8px 10px; }
  .voice-btn .vtxt { display: none; }
  .voice-btn svg, .voice-btn .icon { width: 18px; height: 18px; }
}

/* ===== 系统设置 ===== */
.divider { height: 1px; background: var(--border, #e2e8f0); margin: 14px 0; }
.sub-title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 10px; }
.ls-row { border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.ls-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ls-row-head b { font-size: 14px; color: #334155; }
.ls-owner { width: auto; min-width: 170px; padding: 7px 10px; font-size: 13px; }
.ls-link { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ls-link code { flex: 1; min-width: 0; background: #f1f5f9; border-radius: 8px; padding: 7px 10px; font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-qrwrap { display: flex; gap: 12px; align-items: flex-start; }
.ls-qr { width: 120px; height: 120px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: #fff; }
.ls-qr-fallback { font-size: 12px; color: #94a3b8; padding-top: 8px; }
.alert.ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; padding: 10px 12px; border-radius: 6px; font-size: 13px; }

/* 开关 switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 22px; transition: .2s; }
.switch .slider:before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary, #2f6fed); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* ===== 项目服务模块 ===== */
.ptabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ptab { padding: 6px 14px; font-size: 13px; border-radius: 999px; background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); color: var(--muted, #64748b); cursor: pointer; user-select: none; }
.ptab.active { background: var(--primary, #2f6fed); color: #fff; border-color: var(--primary, #2f6fed); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.project-card { background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: var(--r-sm, 10px); padding: 16px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.project-card:hover { box-shadow: var(--shadow, 0 6px 20px rgba(16,24,40,.08)); transform: translateY(-2px); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pc-title { font-size: 16px; font-weight: 700; color: var(--text, #1e293b); }
.pc-meta { margin-top: 8px; font-size: 13px; color: var(--muted, #64748b); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pc-stage { margin-top: 6px; font-size: 13px; color: var(--text, #1e293b); }
.pc-foot { margin-top: 10px; font-size: 12px; }
.progress { height: 8px; background: #eef1f6; border-radius: 6px; overflow: hidden; margin-top: 12px; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--primary, #2f6fed), #6366f1); border-radius: 6px; transition: width .3s; }
.stage-bar { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.stage-bar::-webkit-scrollbar { height: 6px; }
.stage-bar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.sb-step { flex: 0 0 auto; width: 84px; text-align: center; position: relative; }
.sb-dot { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; margin: 0 auto 4px; background: #eef1f6; color: var(--muted, #64748b); font-size: 12px; font-weight: 600; }
.sb-step.cur .sb-dot { background: var(--primary, #2f6fed); color: #fff; }
.sb-step.done .sb-dot { background: var(--green, #10b981); color: #fff; }
.sb-name { font-size: 12px; color: var(--muted, #64748b); }
.sb-step.cur .sb-name, .sb-step.done .sb-name { color: var(--text, #1e293b); }
.node-list, .issue-list { display: flex; flex-direction: column; gap: 10px; }
.node-stage-group { border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 12px; background: #f8fafc; }
.nsg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nsg-name { font-weight: 600; color: var(--text, #1e293b); font-size: 14px; }
.nsg-count { font-size: 12px; color: var(--muted, #64748b); background: #fff; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--border, #e2e8f0); }
.node-item { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 12px; background: #fff; }
.node-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.node-item.blocked { background: #fef2f2; border-color: #fecaca; }
.node-item.overdue { border-color: #ef4444; box-shadow: 0 0 0 1px #ef4444 inset; }
.owner-pick { cursor: pointer; padding: 1px 5px; border-radius: 6px; border: 1px dashed transparent; }
.owner-pick:hover { background: #eef2ff; border-color: #c7d2fe; }
.nsg-batch { display: inline-flex; gap: 6px; }
.b-red-text { color: #ef4444; font-weight: 600; }
.user-pick-list { display: flex; flex-direction: column; gap: 6px; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; cursor: pointer; transition: background .12s; }
.up-item:hover { background: #eef2ff; }
.up-name { font-weight: 600; color: var(--text, #1e293b); }
.avatar.sm { width: 26px; height: 26px; line-height: 26px; font-size: 12px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.node-item .ni-files, .issue-item .ni-files { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.file-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; font-size: 12px; color: #2563eb; text-decoration: none; background: #f8fafc; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { background: #eef2ff; }
.file-add { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; position: relative; }
.file-add.uploading { pointer-events: none; opacity: .75; }
.file-add .upload-overlay { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: inherit; border-radius: inherit; padding: inherit; white-space: nowrap; }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); padding: 10px 18px; border-radius: var(--r-sm, 10px); background: #1e293b; color: #fff; font-size: 13px; box-shadow: 0 16px 40px rgba(16,24,40,.16); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 9999; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: #10b981; }
.toast.err { background: #ef4444; }
.toast.warn { background: #f59e0b; }

/* 客户快速录入 */
.quick-entry { background: linear-gradient(135deg,#eef2ff,#f5f3ff); border: 1px dashed #c7d2fe; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.quick-entry summary { cursor: pointer; font-weight: 600; color: #4f46e5; font-size: 13px; user-select: none; }
.quick-entry summary::-webkit-details-marker { color: #818cf8; }
.quick-entry textarea { width: 100%; margin-top: 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 8px; resize: vertical; font-size: 13px; line-height: 1.5; box-sizing: border-box; }
.quick-entry .qe-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.quick-entry #qe-preview { font-size: 12px; color: #16a34a; }
.ni-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ni-title { font-weight: 600; margin-top: 6px; color: var(--text, #1e293b); }
.ni-meta { font-size: 12px; margin-top: 4px; }
.ni-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.issue-item { border-left: 3px solid var(--orange, #f59e0b); background: #fffbeb; border-radius: 6px; padding: 10px 12px; }
.issue-item.resolved { border-left-color: var(--green, #10b981); background: #f0fdf4; }
.ii-top { font-weight: 600; color: var(--text, #1e293b); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-item .btn { margin-top: 8px; }
.pf-preview { background: #f8fafc; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 10px 12px; font-size: 13px; max-height: 180px; overflow: auto; }
.pf-stage { margin-bottom: 6px; }
.pf-stage b { color: var(--primary, #2f6fed); }
.avatar-group { display: inline-flex; vertical-align: middle; }
.avatar-group .avatar { width: 24px; height: 24px; font-size: 12px; line-height: 24px; margin-left: -6px; border: 2px solid #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; flex: 0 0 auto; }
.ni-meta .avatar, .ii-top .avatar { margin-right: 4px; }
.chk-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 150px; overflow: auto; padding: 6px 2px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text, #1e293b); cursor: pointer; }
.flex-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mb { margin-bottom: 14px; }
.project-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.board-col { flex: 0 0 280px; background: #f8fafc; border: 1px solid var(--border, #e2e8f0); border-radius: var(--r-sm, 10px); padding: 12px; min-height: 80px; transition: background .15s, border-color .15s; }
.board-col.drag-over { background: #eef2ff; border-color: var(--primary, #2f6fed); }
.project-card.dragging { opacity: .5; }
.board-empty { color: var(--muted, #64748b); text-align: center; padding: 14px 0; font-size: 13px; }
.board-head { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text, #1e293b); display: flex; align-items: center; gap: 8px; }
.board-head .badge { background: #e2e8f0; color: #475569; border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.board-col .project-card { margin-bottom: 10px; }
.board-empty { color: var(--muted, #94a3b8); text-align: center; font-size: 13px; padding: 12px 0; }
.ptpl-card { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.ptpl-card .flex-between { gap: 10px; }
.tf-stage { background: #fff; }
.tf-nodes { margin: 2px 0 8px; }

/* 工单附件（图片 / 视频） */
.up-list { display: flex; flex-wrap: wrap; gap: 8px; }
.up-list:empty { display: none; }
.up-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border, #e2e8f0); background: #f8fafc; }
.up-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #0f172a; }
.up-item .up-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; line-height: 19px; text-align: center; border: none; border-radius: 50%; background: rgba(15,23,42,.66); color: #fff; font-size: 12px; cursor: pointer; padding: 0; }
.up-item .up-del:hover { background: #dc2626; }
.up-flag { position: absolute; top: 3px; left: 3px; padding: 1px 6px; border-radius: 8px; background: rgba(15,23,42,.7); color: #fff; font-size: 12px; line-height: 1.5; }
.up-add { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; position: relative; cursor: pointer; }
.up-add.uploading { pointer-events: none; opacity: .7; }

/* 数据看板增强：环比 / 趋势 / 待办 / 阶段分布 */
.stat-delta { font-size: 12px; margin-top: 4px; }
.stat-delta.up { color: #16a34a; }
.stat-delta.down { color: #dc2626; }
.stat-delta .mu { color: #94a3b8; }
.stat-bar { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.stat-bar i { display: block; height: 100%; background: #2f6fed; border-radius: 3px; }
.dash-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.dash-extra:first-child { margin-top: 0; }
.dash-spark { width: 100%; height: 84px; display: block; margin-top: 6px; }
.dash-spark-x { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-top: 2px; }
.dash-spark-x span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.dash-spark-x b { color: #475569; font-size: 12px; }
.todo-count {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 10px;
  background: #eef2f7; color: #475569; font-size: 12px; font-weight: 700; vertical-align: 2px;
}
.todo-count.has-danger { background: #fee2e2; color: #b91c1c; }
.todo-alert {
  padding: 8px 11px; border-radius: 8px; margin-top: 6px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 12px; font-weight: 600;
}
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; margin-top: 8px; cursor: pointer; background: #f8fafc; border: 1px solid #f1f5f9; }
.todo-item:active { background: #eef2f7; }
.todo-item.todo-danger { background: #fef2f2; border-color: #fecaca; }
.todo-item.todo-info { background: #eff6ff; border-color: #dbeafe; }
.todo-item.todo-ok { background: #f0fdf4; border-color: #bbf7d0; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #94a3b8; }
.todo-danger .todo-dot { background: #dc2626; }
.todo-info .todo-dot { background: #2563eb; }
.todo-ok .todo-dot { background: #16a34a; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 13px; color: var(--text, #1e293b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-desc { font-size: 12px; color: #64748b; margin-top: 2px; }
.todo-go { color: #94a3b8; font-size: 20px; flex-shrink: 0; }
.sb-row { display: flex; justify-content: space-between; font-size: 12px; margin: 8px 0 4px; color: #475569; }
.sb-bar { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.sb-bar i { display: block; height: 100%; border-radius: 3px; }
@media (max-width: 768px) {
  .dash-extra { grid-template-columns: 1fr; gap: 12px; }
  .dash-spark { height: 72px; }
}

/* ===== 自定义选择器：图标卡片（工单类型等，多选一） ===== */
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pick-empty {
  padding: 12px; border: 1px dashed var(--border); border-radius: var(--r-sm);
  text-align: center; color: var(--muted); font-size: 12px; background: #f8fafc;
}
.pick-item {
  position: relative; display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; cursor: pointer;
  font-size: 13px; color: #475569; -webkit-user-select: none; user-select: none;
  transition: border-color .16s, background .16s, color .16s, box-shadow .16s;
}
.pick-item:hover { border-color: #c7d2fe; }
.pick-item .pi-ico {
  width: 28px; height: 28px; border-radius: 8px; background: #eef2f7; color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .16s, color .16s;
}
.pick-item .pi-ico svg { width: 15px; height: 15px; }
.pick-item .pi-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item.on {
  border-color: var(--primary); background: var(--primary-l); color: var(--primary-d); font-weight: 600;
  box-shadow: 0 0 0 3px rgba(79,70,229,.10);
}
.pick-item.on .pi-ico { background: var(--primary); color: #fff; }
.pick-item.on::after {
  content: ''; position: absolute; top: -4px; right: -3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--primary); box-shadow: 0 2px 6px rgba(79,70,229,.35);
}
.pick-item.on::before {
  content: ''; position: absolute; top: 1px; right: 3px; z-index: 1;
  width: 7px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* ===== 自定义选择器：分段控件（优先级等） ===== */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg-item {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 2px; text-align: center; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: #fbfcfe; font-size: 13px; font-weight: 600; color: #64748b; cursor: pointer;
  -webkit-user-select: none; user-select: none; transition: all .16s;
}
.seg-item:hover { border-color: #c7d2fe; }
.seg-item .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.seg-item[data-v="高"] .dot { background: var(--orange); }
.seg-item[data-v="紧急"] .dot { background: var(--red); }
.seg-item.on { color: #fff; border-color: transparent; }
.seg-item.on .dot { background: rgba(255,255,255,.9); }
.seg-item[data-v="低"].on { background: #94a3b8; }
.seg-item[data-v="中"].on { background: var(--primary); }
.seg-item[data-v="高"].on { background: var(--orange); }
.seg-item[data-v="紧急"].on { background: var(--red); }

/* ===== 手机号点击拨号（tel: 链接） ===== */
.tel-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); font-weight: 600; text-decoration: none;
  -webkit-touch-callout: default;              /* 允许长按弹出「拷贝号码」 */
  -webkit-tap-highlight-color: rgba(79,70,229,.12);
}
.tel-link .ico { width: 14px; height: 14px; flex-shrink: 0; }
.tel-link:hover { text-decoration: underline; }
.contact-meta .tel-link .ico { margin-right: 0; vertical-align: 0; }
@media (max-width: 768px) {
  /* 移动端加大触控热区，保证手指点得中 */
  .tel-link {
    min-height: 38px; padding: 6px 12px 6px 9px; border-radius: 9px;
    background: rgba(79,70,229,.08); font-size: 14px;
  }
  .tel-link:active { background: rgba(79,70,229,.2); }
  .contact-meta .tel-link { margin: 3px 0; }
}

/* ===== 语音输入（录音 → 腾讯云 ASR 转文字） ===== */
.voice-bar { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-btn { display: inline-flex; align-items: center; gap: 5px; }
.voice-btn .ico { width: 14px; height: 14px; }
.voice-hint { font-size: 12px; color: var(--muted); }
.voice-rec { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: #fef2f2; border: 1px solid #fecaca; }
.vdot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex-shrink: 0; animation: vpulse 1s infinite; }
@keyframes vpulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.voice-rec b { font-size: 13px; color: #b91c1c; font-variant-numeric: tabular-nums; }
.vwave { display: flex; align-items: center; gap: 2px; height: 18px; }
.vwave i { width: 2px; height: 14px; border-radius: 1px; background: #f87171; transform: scaleY(.12); transform-origin: center; transition: transform .08s linear; }
.voice-busy { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--primary); }
.vspin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c7d2fe; border-top-color: var(--primary); animation: vspin .8s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
  .voice-btn { min-height: 40px; padding: 8px 14px; }
  .voice-rec { padding: 7px 8px 7px 12px; }
}

/* ---------- P2：可点击统计卡片 / 逾期项目列表 ---------- */
.card.stat.clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.card.stat.clickable:hover { box-shadow: 0 4px 16px rgba(47,111,237,.18); transform: translateY(-1px); }
.od-item { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; }
.od-item.clickable { cursor: pointer; }
.od-item.clickable:hover { background: #f5f8ff; border-color: var(--primary); }

/* ---------- P2：甘特图 / 时间线 ---------- */
.gantt { position: relative; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.g-axis { position: relative; height: 22px; border-bottom: 1px solid #eef; font-size: 12px; color: #94a3b8; }
.g-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.g-axis span:first-child { transform: translateX(0); }
.g-grid { position: relative; padding: 6px 0; background-image: linear-gradient(90deg, #eef 1px, transparent 1px); background-size: 25% 100%; }
.g-row { display: flex; align-items: center; min-height: 30px; }
.g-label { width: 130px; flex: 0 0 130px; padding-left: 10px; font-size: 13px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { position: relative; flex: 1; height: 26px; }
.g-bar { position: absolute; top: 4px; height: 18px; border-radius: 4px; font-size: 12px; line-height: 18px; padding: 0 6px; color: #fff; overflow: hidden; white-space: nowrap; box-sizing: border-box; }
.g-bar-t { opacity: .95; }
.g-done { background: #22c55e; }
.g-doing { background: #2f6fed; }
.g-over { background: #ef4444; }
.g-mstone { position: absolute; top: -2px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 12px solid #f59e0b; transform: translateX(-7px); }
.g-ms { color: #f59e0b; font-size: 12px; }
.g-today { position: absolute; top: 22px; bottom: 0; width: 2px; background: rgba(239,68,68,.45); z-index: 2; }
.g-today::after { content: '今天'; position: absolute; top: -18px; left: 2px; font-size: 12px; color: #ef4444; }

/* ---------- P2：里程碑 ---------- */
.sb-step.ms .sb-name { color: #b45309; font-weight: 600; }
.sb-ms { color: #f59e0b; }
.ms-list { display: flex; flex-direction: column; gap: 8px; }
.ms-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; }
.ms-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.ms-flag { color: #f59e0b; font-size: 20px; line-height: 1; margin-top: 1px; }
.ms-item.done .ms-flag { color: #22c55e; }
.ms-body { font-size: 14px; }
.ms-body .muted { font-size: 12px; margin-top: 2px; }

/* ---------- P2 修复：报表头/汇总、未排期、整体进度 ---------- */
.report-head { margin-bottom: 14px; }
.report-head .section-title { font-size: 20px; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.rs-item { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 12px 14px; text-align: center; }
.rs-v { display: block; font-size: 20px; font-weight: 700; color: var(--text, #1e293b); }
.rs-l { display: block; font-size: 12px; color: #94a3b8; margin-top: 4px; }
.g-undated { margin-top: 10px; font-size: 12px; line-height: 1.7; }
.prog-line { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.prog-track { flex: 1; height: 10px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.prog-track i { display: block; height: 100%; background: linear-gradient(90deg, #2f6fed, #34d399); border-radius: 6px; transition: width .3s; }
.prog-txt { font-size: 13px; color: #475569; white-space: nowrap; }

/* ===== 公司客观分析（六维评分） ===== */
.ana-hero { display: flex; align-items: center; gap: 18px; padding: 4px 0 12px; }
.ana-score { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.ana-score i { font-size: 16px; font-weight: 500; color: var(--muted); font-style: normal; margin-left: 4px; }
.ana-hero-r { text-align: center; }
.ana-grade { width: 44px; height: 44px; border-radius: 12px; color: #fff; font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ana-vs { margin: 10px 0; padding: 9px 12px; border-radius: var(--r-sm); background: #f8fafc; border: 1px solid var(--border); font-size: 13px; line-height: 1.6; }
.ana-vs.warn { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ana-vs.good { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.ana-conf { margin: 8px 0 2px; font-size: 12px; color: var(--muted); }
.ana-conf.low { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--r-sm); padding: 8px 12px; line-height: 1.6; }
.ana-grid { display: grid; grid-template-columns: 216px 1fr; gap: 18px; align-items: start; margin: 14px 0; }
.ana-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ana-dim { background: #fafbff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.ana-dim-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ana-dim-n { font-size: 13px; font-weight: 600; }
.ana-w { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.ana-dim-s { font-size: 17px; font-weight: 800; }
.ana-bar { height: 6px; background: #eef2f7; border-radius: 4px; margin: 7px 0; overflow: hidden; }
.ana-bar i { display: block; height: 100%; border-radius: 4px; }
.ana-dim-sum { font-size: 12px; color: var(--muted); line-height: 1.6; }
.ana-detail { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ana-dr { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 3px 0; }
.ana-dr span { color: var(--muted); }
.ana-tg { margin-top: 8px; }
.ana-sec { margin-top: 18px; }
.ana-risk { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: #fffbeb; border-left: 3px solid var(--orange); margin-bottom: 6px; line-height: 1.6; }
.ana-risk.hi { background: #fef2f2; border-left-color: var(--red); }
/* v158：风险条目的行动建议（挂在 .ana-risk 内部，视觉上低一级于风险标题） */
.ana-risk-adv { margin-top: 5px; font-size: 12px; line-height: 1.55; color: #15803d; }
.ana-risk.hi .ana-risk-adv { color: #b91c1c; }
/* v158：智能分析「另外：」客观画像（跟进方式 / 成交回款 / 决策链） */
.ins-extra { font-size: 12px; line-height: 1.6; color: #64748b; }
/* v158：已流失客户横幅 —— 说明其经营风险已排除出统计与筛选 */
.churn-tag { font-size: 13px; padding: 9px 12px; border-radius: 8px; background: #f1f5f9; color: #475569; border-left: 3px solid #94a3b8; margin-bottom: 12px; }
.ana-opp { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: #ecfdf5; border-left: 3px solid var(--green); margin-bottom: 6px; line-height: 1.6; }
.ent-chg { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.ent-chg th, .ent-chg td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ent-chg th { color: var(--muted); font-weight: 600; background: #f8fafc; }
.ent-chg td:nth-child(2) { white-space: normal; }
.ana-demo { font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
/* v159：工商数据陈旧快照提示 —— 拉取失败回落历史数据时必须显式标注「非最新」，
   用红色边框而非灰字，因为「拿着旧数据做判断」比看到报错危险得多 */
.ent-stale { font-size: 12px; line-height: 1.6; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-left: 3px solid #dc2626; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ana-verdict { font-size: 13px; }
.ana-sug { font-size: 13px; padding: 5px 0; color: #334155; line-height: 1.7; }
/* 工商情报：风险明细展开 + 风险等级条 */
.ent-risk-d { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; }
.ent-risk-d > summary { cursor: pointer; padding: 6px 10px; list-style: none; user-select: none; }
.ent-risk-d > summary::-webkit-details-marker { display: none; }
.ent-risk-d[open] > summary { border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.ent-risk-body { padding: 6px 10px; max-height: 320px; overflow: auto; }
.ent-detail { width: 100%; border-collapse: collapse; font-size: 12px; }
.ent-detail td { padding: 3px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.ent-detail td.k { color: #64748b; white-space: nowrap; width: 96px; }
.ent-detail td:nth-child(2) { color: #1e293b; word-break: break-all; }
.ent-risk-banner { font-size: 13px; font-weight: 600; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.ent-risk-banner.high { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.ent-risk-banner.mid { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.ent-risk-banner.low { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
@media (max-width: 860px) {
  .ana-grid { grid-template-columns: 1fr; }
  .ana-dims { grid-template-columns: 1fr; }
  .ana-score { font-size: 38px; }
}

/* ===== 小程序装修端 v2（可视化编辑器，参考标准装修器） ===== */
.mm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mm-palette-box .mm-p-h, .mm-props-box .mm-p-h { padding: 12px 12px 0; }
.mm-layers-empty { margin: 20px 8px; padding: 24px 12px; background: linear-gradient(180deg, var(--brand-w) 0%, #fff 100%);
  border: 1px dashed var(--brand-b); border-radius: 10px; text-align: center; color: var(--sub); font-size: 12px; line-height: 1.7; }
.mm-layers-empty .ico { width: 36px; height: 36px; margin: 0 auto 10px; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 18px;
  box-shadow: 0 2px 6px rgba(37,99,235,.10); }
.mm-layers-empty b { display: block; font-size: 13px; color: #334155; font-weight: 600; margin-bottom: 4px; }
.mm-layers-empty small { color: var(--hint); font-size: 11px; }
.mm-layer.hidden { opacity: .45; }
.mm-layer-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.mm-layer.drag-over { outline: 2px dashed var(--brand); outline-offset: -2px; }
.mm-p-h { font-size: 12px; color: var(--sub); margin-bottom: 8px; font-weight: 600; }
.mm-phone-head { background: #fff; padding: 10px 14px 8px; text-align: center; position: relative; border-bottom: 1px solid #f1f5f9; flex: none; }
.mm-phone-notch { width: 60px; height: 5px; background: #e2e8f0; border-radius: 10px; margin: 0 auto 8px; }
.mm-phone-title { font-size: 15px; font-weight: 600; color: #1f2937; }
.mm-phone-body { flex: 1; overflow: auto; position: relative; }
.mm-phone-foot { text-align: center; color: #94a3b8; font-size: 11px; padding: 12px; flex: none; }
.mm-phone-block.sel { border-color: var(--brand); }
.mm-phone-block .mm-phone-mask { position: absolute; inset: 0; z-index: 2; }
.mm-tabbar { border-top: 1px solid #e2e8f0; background: #fff; flex: none; }
.mm-tabbar-inner { display: flex; justify-content: space-around; padding: 8px 0; }
.mm-tabbar-inner a { font-size: 12px; text-decoration: none; }
.mm-fld label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.mm-p-type { font-size: 12px; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.mm-rep-title { font-size: 12px; color: var(--sub); margin: 10px 0 6px; font-weight: 600; }
.mm-rep.col2 { flex-wrap: wrap; }
.mm-rep.col2 input { flex: 1 1 40%; min-width: 0; }
.mm-rep input { flex: 1; padding: 6px 8px; border: 1px solid #d7dee8; border-radius: 6px; font-size: 12px; }
.mm-rep .btn.xs { flex: none; }
.mm-empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 30px 10px; }
/* v80 增强：草稿角标 / 拖拽 / 模板库 */
.mm-draft { position: absolute; top: 4px; right: 4px; background: #f59e0b; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 4px; z-index: 3; }
.mm-phone-block[draggable="true"] { cursor: grab; }
.mm-phone-block:active { cursor: grabbing; }
.mm-phone-block.drag-over { border-color: var(--brand); background: #eef4ff; opacity: .65; }
.mm-tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; }
.mm-tpl-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; cursor: pointer; background: #fff; }
.mm-tpl-card:hover { border-color: var(--brand); background: #eef4ff; }
.mm-tpl-name { font-weight: 600; font-size: 13px; color: #1f2937; }
.mm-tpl-desc { font-size: 12px; color: #64748b; margin-top: 4px; }

/* v81 P3 自由画布（绝对定位 / 拖拽 / 缩放 / 吸附参考线） */
.mm-phone.free .mm-phone-body { position: relative; min-height: 600px; overflow: hidden; outline: 1px dashed #e2e8f0; outline-offset: -1px; }
.mm-phone.free .mm-phone-block { box-sizing: border-box; cursor: move; }
.mm-phone.free .mm-phone-block[data-lock] { cursor: not-allowed; }
.mm-phone.free .mm-block-inner { min-height: 24px; }
.mm-phone.free .mm-phone-block.sel { outline: 2px solid var(--mm-primary); outline-offset: 2px; }
.mm-phone-block .mm-rz { position: absolute; width: 12px; height: 12px; background: var(--mm-primary); border: 2px solid #fff; border-radius: 2px; z-index: 6; box-sizing: border-box; }
.mm-rz.nw { left: -6px; top: -6px; cursor: nwse-resize; }
.mm-rz.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.mm-rz.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.mm-rz.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.mm-guides { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.mm-guide-v { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid #ff4d6a; box-shadow: 0 0 6px rgba(255,77,106,.45); }
.mm-guide-h { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid #ff4d6a; box-shadow: 0 0 6px rgba(255,77,106,.45); }
.mm-guide-v.sub, .mm-guide-h.sub { border-color: rgba(255,77,106,.45); border-style: dashed; box-shadow: none; border-width: 1px; }
.mm-guide-label { position: absolute; background: #ff4d6a; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; line-height: 14px; white-space: nowrap; font-weight: 600; letter-spacing: .2px; pointer-events: none; }
.mm-guide-v > .mm-guide-label { left: 4px; top: 4px; transform: translateX(-50%); }
.mm-guide-h > .mm-guide-label { top: 4px; left: 8px; transform: translateY(-50%); }

/* v83 ①：主题预设色卡 */
.mm-thp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.mm-thp { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 4px 5px; text-align: center; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.mm-thp:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(31, 111, 235, .12); }
.mm-thp.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(31, 111, 235, .16); }
.mm-thp-sw { display: block; height: 26px; border-radius: 6px; margin-bottom: 5px; }
.mm-thp-n { font-size: 11px; color: #475569; line-height: 1.2; }

/* v83 ①：模板卡缩略图与标签 */
.mm-tpl-thumb { height: 72px; border-radius: 8px; margin: -2px 0 8px; display: flex; align-items: flex-end; padding: 8px 10px; box-sizing: border-box; }
.mm-tpl-thumb span { color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.mm-tpl-name em { font-style: normal; font-weight: 400; color: #94a3b8; font-size: 12px; }
.mm-tpl-tags { margin-top: 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.mm-tpl-tags i { font-style: normal; font-size: 11px; color: #4a5a72; background: #f3f6fb; border: 1px solid #e6ecf5; border-radius: 10px; padding: 1px 7px; }
.mm-tpl-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; margin-top: 4px; }

/* v83 ②：画布内联直接编辑 */
.mm-phone [data-edit] { cursor: text; }
.mm-phone-block:hover [data-edit] { box-shadow: inset 0 -1px 0 rgba(31, 111, 235, .35); }
.mm-editing { outline: 2px solid #f59e0b !important; outline-offset: 2px; background: rgba(245, 158, 11, .08); border-radius: 3px; cursor: text !important; position: relative; z-index: 8; box-shadow: none !important; }
/* 控制点常驻渲染，仅选中时显示 */
.mm-phone.free .mm-phone-block .mm-rz { display: none; }
.mm-phone.free .mm-phone-block.sel .mm-rz { display: block; }

/* v83 ③：AI 助手抽屉 */
.mm-ai-modes { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mm-ai-mode { border: 1px solid #e2e8f0; border-radius: 20px; padding: 5px 14px; font-size: 13px; cursor: pointer; background: #fff; color: #475569; }
.mm-ai-mode.on { border-color: var(--brand); background: #eef4ff; color: #1f6feb; font-weight: 600; }
.mm-ai-tips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.mm-ai-tips i { font-style: normal; font-size: 12px; color: #4a5a72; background: #f3f6fb; border: 1px solid #e6ecf5; border-radius: 12px; padding: 3px 10px; cursor: pointer; }
.mm-ai-tips i:hover { border-color: var(--brand); color: #1f6feb; }
.mm-ai-out { border: 1px solid #e6ecf5; border-radius: 8px; background: #fafbfd; padding: 10px 12px; margin-top: 10px; font-size: 13px; color: #334155; line-height: 1.7; max-height: 320px; overflow: auto; }
.mm-ai-out ul { margin: 6px 0 0; padding-left: 18px; }
.mm-ai-sw { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.mm-ai-sw span { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid #d9e1ee; }

/* v84 图片上传 + 图库 */
.mm-thumb { width: 100%; max-height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 6px; display: block; background: #f1f5f9; }
.mm-thumb.sm { width: 34px; height: 34px; max-height: 34px; margin: 0 0 0 4px; flex: 0 0 auto; }
.mm-rep-row { display: flex; align-items: center; gap: 6px; }
.mm-rep-row input { flex: 1; min-width: 0; }
.mm-rep.img-rep { flex-direction: column; align-items: stretch; }
.btn.up { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.up:hover { filter: brightness(1.05); }
.btn.up.uploading { opacity: .6; pointer-events: none; }
.mm-med-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mm-med { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .15s; }
.mm-med:hover { border-color: var(--primary); }
.mm-med img { width: 100%; height: 78px; object-fit: cover; display: block; background: #f1f5f9; }
.mm-med-n { font-size: 11px; padding: 4px 6px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 真机预览二维码（v85） */
.mm-qr { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 2px; }
.mm-qr-box { width: 240px; height: 240px; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mm-qr-img { width: 228px; height: 228px; object-fit: contain; display: block; }
.mm-qr-fallback { font-size: 13px; color: #cf1322; text-align: center; padding: 0 12px; }
.mm-qr-link { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.mm-qr-link code { font-size: 12px; color: #475569; background: #f1f5f9; padding: 4px 6px; border-radius: 6px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== v86 编辑器操作体验重构 ===== */
/* 工具栏分组 */
.mm-tb-l { display: flex; align-items: center; gap: 12px; }
.mm-pagechip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; color: #334155; cursor: pointer; }
.mm-pagechip:hover { border-color: var(--brand); color: var(--brand); }
.mm-pagechip .caret { font-size: 10px; color: #94a3b8; }
.mm-tb-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mm-tb-grp { display: flex; gap: 6px; align-items: center; padding: 3px 8px; background: #f3f6fb; border: 1px solid #e8edf4; border-radius: 10px; }
.mm-tb-grp.mm-tb-save { background: #fff; border-color: #e2e8f0; }
.btn.icon { min-width: 34px; padding: 6px 9px; font-size: 15px; line-height: 1; }
/* 属性面板：图片行 */
.mm-img-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.mm-img-row .mm-img-url { flex: 1; min-width: 0; }
.mm-img-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.mm-img-btns .btn.xs { padding: 4px 8px; font-size: 11px; }
.mm-img-btns .btn.up { background: #eef4ff; border-color: #c7d7ff; color: #1f6feb; }
.mm-img-btns .btn.ai { background: #f3f0ff; border-color: #ddd3ff; color: #6d28d9; }
.mm-thumb-wrap { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.mm-thumb-wrap .mm-thumb { margin-bottom: 0; }
.mm-thumb-ov { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(15,23,42,.45); opacity: 0; transition: opacity .15s; }
.mm-thumb-wrap:hover .mm-thumb-ov { opacity: 1; }
.mm-thumb-ov .btn.xs { padding: 3px 7px; font-size: 11px; background: #fff; }
/* 媒体中心弹窗 */
.mm-mc { display: flex; flex-direction: column; gap: 10px; }
.mm-mc-tabs { display: flex; gap: 6px; }
.mm-mc-tab { padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; background: #f3f6fb; border: 1px solid #e8edf4; color: #475569; }
.mm-mc-tab.on { background: #eef4ff; border-color: #c7d7ff; color: #1f6feb; font-weight: 600; }
.mm-drop { border: 2px dashed #c7d2fe; border-radius: 12px; padding: 26px 16px; text-align: center; color: #475569; cursor: pointer; background: #f8faff; transition: border-color .15s, background .15s; }
.mm-drop:hover { border-color: var(--brand); background: #eef4ff; }
.mm-drop-ico { font-size: 26px; color: var(--brand); margin-bottom: 6px; }
.mm-drop b { color: var(--brand); }
.mm-mc-ai textarea, .mm-mc-ai .mm-mc-prompt { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d9e1ee; border-radius: 8px; font: inherit; resize: vertical; }
.mm-mc-ai-out { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 320px; overflow: auto; }
.mm-mc-r { position: relative; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.mm-mc-r:hover { border-color: var(--brand); }
.mm-mc-r img { width: 100%; height: 120px; object-fit: cover; display: block; background: #f1f5f9; }
.mm-mc-r span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(31,111,235,.85); color: #fff; font-size: 12px; text-align: center; padding: 4px; }
/* 画布：拖拽上传态 / 悬停快捷操作 / 空状态 / 内联提示 */
.mm-phone.mm-drag { outline: 2px dashed var(--brand); outline-offset: -4px; background: #eef4ff !important; }
.mm-phone.mm-drag::after { content: '松开即可上传到该组件'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(31,111,235,.9); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; z-index: 40; pointer-events: none; }
.mm-block-qa { position: absolute; top: 4px; right: 4px; z-index: 7; display: none; gap: 2px; background: rgba(15,23,42,.7); border-radius: 8px; padding: 3px; }
.mm-phone-block:hover .mm-block-qa, .mm-phone-block.sel .mm-block-qa { display: flex; }
.mm-block-qa button { border: none; background: transparent; color: #fff; font-size: 13px; line-height: 1; padding: 3px 5px; border-radius: 5px; cursor: pointer; }
.mm-block-qa button:hover { background: rgba(255,255,255,.22); }
.mm-empty-state { text-align: center; padding: 70px 24px; color: #64748b; }
.mm-empty-ico { font-size: 44px; margin-bottom: 10px; }
.mm-empty-t { font-size: 16px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.mm-empty-state .btn { margin-top: 12px; }
.mm-phone.mm-editing-mode::before { content: '编辑中 · Enter 保存 / Esc 取消'; position: absolute; top: 0; left: 0; right: 0; z-index: 30; background: #f59e0b; color: #fff; font-size: 12px; text-align: center; padding: 5px; letter-spacing: .5px; }

/* 名片浏览动态（v76） */
.cv-list { display: flex; flex-direction: column; gap: 8px; }
.cv-row { border: 1px solid #eef1f6; border-radius: 8px; padding: 8px 10px; background: #fafbfd; }
.cv-row:last-child { margin-bottom: 0; }
.cv-who { font-size: 13px; line-height: 1.5; }

/* 服务待办（v77） */
.st-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.st-pill { background: #f3f6fb; border: 1px solid #e6ecf5; border-radius: 20px; padding: 4px 12px; font-size: 13px; color: #4a5a72; }
.st-pill b { color: #1f6feb; margin-left: 4px; }
.st-pill.b-red { background: #fff1f0; border-color: #ffccc7; color: #cf1322; }
.st-pill.b-red b { color: #cf1322; }
.st-tip { background: #f0f7ff; border: 1px solid #d6e8ff; color: #2f5d8f; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 10px 0; line-height: 1.6; }
.st-group { margin: 14px 0; }
.st-group-h { font-size: 14px; font-weight: 700; color: #2b3a52; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.st-group-n { background: #eef2f8; color: #5a6b85; border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.st-group.st-overdue .st-group-h { color: #cf1322; }
.st-item { display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; transition: box-shadow .15s; }
.st-item:hover { box-shadow: 0 2px 10px rgba(31,111,235,.08); }
.st-item.st-done { opacity: .62; }
.st-item.st-high { border-left: 3px solid #fa8c16; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: #d0d7e2; flex: 0 0 auto; }
.st-dot.is-over { background: #cf1322; }
.st-dot.is-done { background: #52c41a; }
.st-main { flex: 1; min-width: 0; }
.st-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-content { font-size: 14px; color: #1f2d44; font-weight: 600; word-break: break-word; }
.st-done .st-content { text-decoration: line-through; font-weight: 500; color: #8a97ad; }
.st-pri { background: #fff1e6; color: #d46b08; border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 600; }
.st-rep { background: #e6f4ff; color: #1677ff; border-radius: 4px; padding: 0 6px; font-size: 12px; }
.st-tk { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; border-radius: 4px; padding: 0 6px; font-size: 12px; }
.st-row2 { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; color: #6b7a93; flex-wrap: wrap; }
.st-cust { color: #1f6feb; font-weight: 600; text-decoration: none; }
.st-cust.muted { color: #9aa6ba; font-weight: 400; }
.st-cust:hover { text-decoration: underline; }
.st-day { background: #f3f6fb; border-radius: 4px; padding: 0 6px; color: #4a5a72; }
.st-day.is-over { background: #fff1f0; color: #cf1322; }
.st-owner { color: #8a97ad; }
.st-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; align-items: center; }
@media (max-width: 640px) { .st-item { flex-wrap: wrap; } .st-actions { width: 100%; } }

/* 全局错误浮层（v78）：脚本报错不再白屏，直接显示错误文字 */
.boot-error {
  position: fixed; inset: 0; z-index: 99999;
  display: none; padding: 28px; box-sizing: border-box;
  background: #1f2430; color: #ffd7d2;
  font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow: auto;
}

/* ==========================================================================
   v89 装修端 UI 重构
   1) 三栏观感：面板卡片化 + 画布点阵网格 + 工具栏层次
   2) 属性面板：内容 / 样式 / 高级 三段折叠 + 组件头
   3) 控件升级：数值条(可拖动) / 颜色(色块+hex+主题板) / 分段按钮 / 开关
   4) 画布右键菜单      5) 空页面三选一引导
   ========================================================================== */

/* ---------- 外壳与三栏 ---------- */
.mm-wrap { padding: 0; overflow: hidden; display: flex; flex-direction: column;
  margin: -22px; height: calc(100% + 44px); min-height: 600px; }
.mm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; height: 54px; flex: none; position: static; background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16,24,40,.02), 0 2px 12px rgba(16,24,40,.05); }
.mm-tb-l { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.mm-title { font-size: 15px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center; }
.mm-title::before { content: ""; display: inline-block; width: 3px; height: 15px; border-radius: 2px; background: var(--brand); margin-right: 8px; }
.mm-pagechip { display: inline-flex; align-items: center; gap: 5px; height: 30px;
  padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 12.5px; color: var(--text); cursor: pointer; }
.mm-pagechip:hover { border-color: var(--brand-b); background: var(--brand-w); color: var(--brand); }
.mm-pagechip .caret { font-size: 10px; color: var(--hint); }
.mm-tb-r { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.mm-tb-grp { display: flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: 0; border-radius: 0; flex: none; }
.mm-tb-grp + .mm-tb-grp { border-left: 1px solid var(--line2); padding-left: 10px; margin-left: 2px; }
.mm-tb-save { padding-left: 10px; }
/* v100：按钮永不换行、永不压缩 —— 窄屏宁可让页签横向滚动或整组换行，也不让按钮挤成竖排 */
.mm-toolbar .btn { white-space: nowrap; flex: none; }
.mm-toolbar .btn.sm.icon { min-width: 30px; }

.mm-cols { display: grid; grid-template-columns: 248px 1fr 360px; gap: 0;
  flex: 1 1 0; min-height: 0; }
.mm-palette-box, .mm-props-box { background: #fff; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mm-palette-box { border-right: 1px solid var(--line); }
.mm-props-box { border-left: 1px solid var(--line); }
.mm-pnl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  padding: 12px 12px 8px; flex: none; }
.mm-pnl-h .t { font-size: 12px; font-weight: 600; color: var(--sub); letter-spacing: .4px; }
.mm-pnl-h .x { font-size: 11px; color: var(--hint); }
.mm-pnl-h.line { border-top: 1px solid var(--line); }

/* ---------- 左栏：组件库 ---------- */
.mm-palette { flex: 1 1 0; min-height: 0; overflow: auto; padding: 0 12px 12px; }
.mm-cat { margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.mm-cat-h { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: #334155; background: #fcfdff; user-select: none; }
.mm-cat-h:hover { background: var(--brand-w); color: var(--brand); }
.mm-cat-n { font-size: 10px; color: var(--hint); background: var(--line2); border-radius: 999px; padding: 1px 6px; margin-left: auto; }
.mm-cat-arrow { font-size: 9px; color: var(--hint); transition: transform .15s; flex: none; }
.mm-cat-arrow.open, .mm-cat.open .mm-cat-arrow { transform: rotate(90deg); }
.mm-comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 8px; max-height: 0; overflow: hidden; transition: max-height .18s; border-top: 1px solid var(--line2); }
.mm-comp-grid.open, .mm-cat.open .mm-comp-grid { max-height: 400px; }
.mm-comp { display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 2px; border-radius: 7px; cursor: pointer; }
.mm-comp:hover { background: var(--brand-w); }
.mm-comp-ico { width: 30px; height: 30px; border-radius: 7px; background: #f6f8fc;
  border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--brand); }
.mm-comp-ico svg { width: 16px; height: 16px; }
.mm-comp-t { font-size: 10.5px; color: var(--sub); text-align: center; line-height: 1.3; }

/* ---------- 左栏：图层 ---------- */
.mm-layers { flex: none; max-height: 36%; overflow: auto; border-top: 1px solid var(--line); padding: 8px 10px 12px; }
.mm-layer { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; cursor: pointer; margin-bottom: 2px; }
.mm-layer:hover { background: #f4f7fc; }
.mm-layer.sel { background: var(--brand-w); box-shadow: inset 0 0 0 1px var(--brand-b); }
.mm-layer-grip { color: #cbd5e1; cursor: grab; font-size: 11px; }
.mm-layer-ico { width: 16px; text-align: center; color: var(--sub); flex: 0 0 auto; }
.mm-layer-ico svg { width: 14px; height: 14px; vertical-align: -2px; }
.mm-layer-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mm-layer-btn { border: 0; background: transparent; cursor: pointer; font-size: 11px; padding: 2px 3px; border-radius: 4px; opacity: .55; }
.mm-layer:hover .mm-layer-btn { opacity: 1; }
.mm-layer-btn:hover { background: #e5e9f0; }

/* ---------- 中栏：画布 ---------- */
/* v131：wrap 不滚动（zoombar/zenbar 钉在可视区底部），滚动发生在 .mm-canvas-box */
.mm-canvas-wrap { position: relative; min-width: 0; display: flex; flex-direction: column; }
.mm-canvas-box { position: relative; overflow: auto; flex: 1 1 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 0 40px; background-color: #f5f7fa;
  background-image: radial-gradient(circle, #d3dbe6 1px, transparent 1px);
  background-size: 16px 16px; background-position: -1px -1px; }
.mm-canvas-inner { padding: 0; transform-origin: top center; }
/* v130 hotfix：v128 清理旧 CSS 时误删了 .mm-phone 基础布局属性（宽度/弹性列/裁剪），此处补回 */
.mm-phone { width: 340px; min-height: 640px; background: #fff; border-radius: 30px; border: 8px solid #dfe6f0; box-shadow: 0 10px 40px rgba(16,24,40,.12); position: relative; overflow: hidden; display: flex; flex-direction: column; flex: none; }

/* ---------- 右栏：属性面板 ---------- */
.mm-props { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.mm-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.mm-tab { padding: 8px 9px; font-size: 12px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.mm-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.mm-props-body { flex: 1 1 0; min-height: 0; overflow: auto; padding: 12px; }

/* 组件头 */
.mm-phead { display: flex; align-items: center; gap: 9px; padding: 10px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #fcfdff, #fff); }
.mm-phead .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-w); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex: none; }
.mm-phead .ic svg { width: 17px; height: 17px; }
.mm-phead b { display: block; font-size: 13.5px; font-weight: 600; }
.mm-phead small { color: var(--hint); font-size: 11px; }
.mm-phead .sp { flex: 1; }

/* 折叠段 */
.mm-sec { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.mm-sec-h { display: flex; align-items: center; gap: 7px; padding: 10px 12px; cursor: pointer; user-select: none; background: #fcfdff; }
.mm-sec-h:hover { background: var(--brand-w); }
.mm-sec-h .ar { font-size: 9px; color: var(--hint); transition: transform .15s; }
.mm-sec.open .mm-sec-h .ar { transform: rotate(90deg); }
.mm-sec-h b { font-size: 12.5px; font-weight: 600; }
.mm-sec-h .sp { flex: 1; }
.mm-sec-b { padding: 12px; max-height: 0; overflow: hidden; transition: max-height .2s; border-top: 1px solid var(--line2); }
.mm-sec.open .mm-sec-b { max-height: 1600px; }
.mm-sec-n { font-size: 10px; color: var(--hint); }

/* 字段 */
.mm-fld { margin-bottom: 12px; }
.mm-fld:last-child { margin-bottom: 0; }
.mm-fld > label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--sub); margin-bottom: 5px; }
.mm-fld input:not([type]), .mm-fld input[type="text"], .mm-fld input[type="number"],
.mm-fld select, .mm-fld textarea { width: 100%; padding: 7px 9px; border: 1px solid #dde3ec; border-radius: 7px;
  font-size: 12.5px; outline: none; background: #fff; box-sizing: border-box; font-family: inherit; }
.mm-fld input:focus, .mm-fld select:focus, .mm-fld textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.mm-fld textarea { resize: vertical; min-height: 60px; }
.mm-hint { font-size: 11px; color: var(--hint); margin-top: 5px; line-height: 1.5; }
.mm-raw { display: none !important; }

/* 数值条（可左右拖动改值） */
.mm-nb { display: flex; align-items: center; gap: 9px; }
.mm-nb-track { position: relative; flex: 1; height: 22px; cursor: ew-resize; display: flex; align-items: center; touch-action: none; }
.mm-nb-track::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 999px; background: #eef2f7; }
.mm-nb-fill { position: absolute; left: 0; height: 4px; border-radius: 999px; background: var(--brand); }
.mm-nb-knob { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  transform: translateX(-50%); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.mm-nb-val { width: 58px; flex: none; text-align: center; font-size: 12px; }
/* 需压过 `.mm-fld input[type=number]{width:100%}`（0,2,1），故用三层类选择器 */
.mm-fld .mm-nb .mm-nb-val { width: 58px; text-align: center; }

/* 颜色控件 */
.mm-crow { display: flex; align-items: center; gap: 8px; }
/* 裸 color input（主题/页面设置里仍在用）：收成小色块，别被 width:100% 拉满整行 */
.mm-fld input[type="color"] { width: 30px; height: 30px; flex: none; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; cursor: pointer; vertical-align: middle; }
.mm-fld input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.mm-fld input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }
.mm-fld input[type="color"].mm-csw { width: 30px; height: 30px; flex: none; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; cursor: pointer; }
.mm-fld input[type="color"].mm-csw::-webkit-color-swatch-wrapper { padding: 2px; }
.mm-fld input[type="color"].mm-csw::-webkit-color-swatch { border: none; border-radius: 5px; }
.mm-chex { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12px; text-transform: uppercase; }
.mm-fld .mm-crow .mm-chex { width: auto; }
.mm-pal { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.mm-pal i { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.06); cursor: pointer; display: block; }
.mm-pal i:hover { transform: scale(1.14); }

/* 分段按钮 */
.mm-seg { display: flex; border: 1px solid #dde3ec; border-radius: 7px; overflow: hidden; background: #fff; }
.mm-seg button { flex: 1; height: 29px; min-width: 0; border: 0; border-right: 1px solid #eef2f7; background: transparent;
  cursor: pointer; font-size: 12px; color: var(--sub); padding: 0 6px;
  display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.mm-seg button:last-child { border-right: 0; }
.mm-seg button.on { background: var(--brand); color: #fff; }
.mm-seg button:hover:not(.on) { background: var(--brand-w); color: var(--brand); }
.mm-seg svg { width: 14px; height: 14px; }

/* 开关 */
.mm-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mm-switchrow:last-child { margin-bottom: 0; }
.mm-switchrow > span { font-size: 11.5px; color: var(--sub); }
.mm-sw { width: 38px; height: 21px; border-radius: 999px; background: #d7dee8; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.mm-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.mm-sw.on { background: var(--brand); }
.mm-sw.on::after { left: 19px; }

/* 图片行重排 */
.mm-img-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fcfdff; margin-bottom: 8px; }
.mm-img-card .mm-thumb-wrap { max-width: 100%; }

/* ---------- 画布右键菜单 ---------- */
.mm-ctx { position: fixed; z-index: 200; display: none; min-width: 164px; padding: 5px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(16,24,40,.12); }
.mm-ctx.on { display: block; }
.mm-ctx button { display: flex; align-items: center; gap: 8px; width: 100%; height: 29px; padding: 0 9px; border: 0;
  border-radius: 6px; background: transparent; font-size: 12.5px; color: var(--text); cursor: pointer; text-align: left; }
.mm-ctx button:hover { background: var(--brand-w); color: var(--brand); }
.mm-ctx button.danger:hover { background: #fef2f2; color: #dc2626; }
.mm-ctx hr { border: 0; border-top: 1px solid var(--line2); margin: 4px 2px; }
.mm-ctx .kbd { margin-left: auto; font-size: 10.5px; color: var(--hint); }

/* ---------- 空页面三选一 ---------- */
.mm-empty3 { position: absolute; inset: 0; z-index: 30; background: rgba(245,247,250,.97);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.mm-empty3 h3 { margin: 0; font-size: 15px; font-weight: 600; color: #334155; }
.mm-empty3 p { margin: 0; font-size: 12px; color: var(--sub); }
.mm-e3 { display: flex; gap: 10px; margin-top: 4px; }
.mm-e3 > div { width: 96px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.mm-e3 > div:hover { border-color: var(--brand); background: var(--brand-w); }
.mm-e3 .ic { width: 30px; height: 30px; margin: 0 auto 7px; border-radius: 8px; background: var(--brand-w);
  color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mm-e3 b { display: block; font-size: 12px; font-weight: 500; color: #334155; }
.mm-e3 small { color: var(--hint); font-size: 10.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) { .mm-cols { grid-template-columns: 216px 1fr 320px; } }
@media (max-width: 1024px) {
  .mm-wrap { height: auto; min-height: 0; }
  .mm-cols { grid-template-columns: 1fr; }
  .mm-palette-box, .mm-props-box { border: none; border-bottom: 1px solid var(--line); max-height: 320px; }
  .mm-phone { width: 100%; max-width: 340px; }
}

/* ================= v90：拖放插入 / 画布缩放 / 沉浸模式 / 落地动效 ================= */

/* 组件库搜索 */
.mm-psearch { padding: 0 12px 8px; flex: none; }
.mm-psearch input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: 12.5px; outline: none; background: #fff; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s; }
.mm-psearch input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.mm-noresult { padding: 20px 6px; text-align: center; font-size: 12px; color: var(--sub); line-height: 1.8; }
.mm-noresult span { color: var(--hint); font-size: 11px; }

/* 组件拖拽中 */
.mm-comp { cursor: grab; transition: background .14s, transform .14s, opacity .14s; }
.mm-comp:active { cursor: grabbing; }
.mm-comp.dragging { opacity: .35; transform: scale(.92); }
body.mm-dnd-new { cursor: copy; }
body.mm-dnd-new .mm-phone { border-color: var(--brand-b);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14), 0 14px 44px rgba(16,24,40,.20); }
.mm-phone-block.dragging { opacity: .3; }

/* 插入位置指示线 */
.mm-drop-line { position: absolute; left: 0; right: 0; height: 0; display: none; pointer-events: none; z-index: 70; }
.mm-drop-line.on { display: block; }
.mm-drop-line::before { content: ""; position: absolute; left: 4px; right: 4px; top: -1.5px; height: 3px;
  border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.mm-drop-line::after { content: ""; position: absolute; left: -1px; top: -4.5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-sizing: border-box; }
.mm-drop-line.solo::before { top: 0; }
.mm-empty3 { transition: border-color .16s, background .16s, transform .16s; }
.mm-empty3.dropping { border: 2px dashed var(--brand); background: var(--brand-w); transform: scale(1.015); }

/* 落地动效：插入 / 移动后闪一下，给出明确反馈 */
/* v130 hotfix：补回被误删的组件块基础规则（遮罩/角标/快捷按钮的定位基准 + 选中边框不抖动） */
.mm-phone-block { position: relative; cursor: pointer; border: 2px solid transparent; }
.mm-phone-block { transition: box-shadow .16s ease; }
@keyframes mmDropIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mmRingOut { 0% { opacity: 1; } 60% { opacity: .55; } 100% { opacity: 0; } }
.mm-phone-block.just-added { position: relative; animation: mmDropIn .3s cubic-bezier(.2,.9,.3,1.15); }
.mm-phone-block.just-added::after { content: ""; position: absolute; inset: 0; z-index: 45; pointer-events: none;
  border-radius: 4px; box-shadow: inset 0 0 0 2px var(--brand), 0 0 14px rgba(37,99,235,.35);
  animation: mmRingOut 1s ease-out forwards; }

/* 画布缩放条 */
.mm-zoombar { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 22px rgba(16,24,40,.14); }
.mm-zoombar button { height: 26px; min-width: 28px; padding: 0 9px; border: 0; background: transparent;
  border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--sub); line-height: 1; }
.mm-zoombar button:hover { background: var(--brand-w); color: var(--brand); }
.mm-zoombar span { min-width: 48px; text-align: center; font-size: 11.5px; color: var(--sub);
  font-variant-numeric: tabular-nums; }

/* 沉浸模式：只留画布 */
.mm-zenbar { display: none; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
  align-items: center; gap: 10px; padding: 6px 8px 6px 14px; background: rgba(23,32,51,.9); color: #fff;
  border-radius: 999px; font-size: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.28); }
.mm-zenbar button { border: 0; background: rgba(255,255,255,.18); color: #fff; height: 22px; padding: 0 11px;
  border-radius: 999px; cursor: pointer; font-size: 11.5px; }
.mm-zenbar button:hover { background: rgba(255,255,255,.30); }
@keyframes mmZenIn { from { opacity: .35; } to { opacity: 1; } }
.mm-wrap.zen .mm-cols { grid-template-columns: 1fr; }
.mm-wrap.zen .mm-palette-box, .mm-wrap.zen .mm-props-box { display: none; }
.mm-wrap.zen .mm-canvas-box { background-color: #eceff5; animation: mmZenIn .22s ease; }
.mm-wrap.zen .mm-zenbar { display: flex; }

/* 保存按钮状态 */
.mm-tb-save .loading { opacity: .7; pointer-events: none; }
.mm-tb-save .done { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; }

/* ================= v94 小程序运营后台（总览/内容管理/C端线索/名片管理） ================= */
/* v133：分组标题方案C（用户拍板）——色条强调：13px 纯白 + 左侧品牌色短条 + 组间分割线，分组边界更清晰 */
.menu-group { margin: 18px 0 6px; padding: 0 12px; font-size: 13px; font-weight: 600; color: #fff; letter-spacing: 1px; white-space: nowrap; border-left: 3px solid #818cf8; }
.menu > .menu-group:not(:first-child) { border-top: 1px solid rgba(255,255,255,.14); padding-top: 12px; }
.kv { display: flex; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .k { flex: 0 0 84px; color: var(--muted); }
.tag.g { background: #dcfce7; color: #047857; }
.tag.o { background: #fef3c7; color: #b45309; }
.tag.r { background: #fee2e2; color: #b91c1c; }
.tag.c { background: #cffafe; color: #0e7490; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 12px; background: #eef2ff; color: #4338ca; font-size: 12px; margin: 2px 6px 2px 0; white-space: nowrap; }
.mctabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mctab { padding: 6px 14px; border: 1px solid var(--border); border-radius: 18px; background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; }
.mctab.on { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; font-weight: 600; }
/* 运营总览 */
.mo-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 10px 4px 0; }
.mo-bcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.mo-bcol i { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6366f1, #a855f7); min-height: 2px; }
.mo-bcol.wk i { background: #c7d2fe; }
.mo-bcol b { font-size: 11px; color: var(--text); }
.mo-bcol em { font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; }
.mo-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: linear-gradient(135deg, #6366f1, #a855f7); vertical-align: -1px; }
.mo-dot.wk { background: #c7d2fe; }
.mo-hbar { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.mo-hbar .nm { width: 92px; color: var(--text); text-align: right; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-hbar .tr { flex: 1; height: 10px; background: #eef2ff; border-radius: 6px; overflow: hidden; }
.mo-hbar .tr i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #a855f7); border-radius: 6px; }
.mo-hbar.p2 .tr i { background: linear-gradient(90deg, #0ea5e9, #22d3ee); }
.mo-hbar.p3 .tr i { background: linear-gradient(90deg, #16a34a, #4ade80); }
.mo-hbar.p4 .tr i { background: linear-gradient(90deg, #ea580c, #fb923c); }
.mo-hbar.p5 .tr i { background: linear-gradient(90deg, #64748b, #94a3b8); }
.mo-hbar .pc { width: 72px; color: var(--muted); font-size: 12px; flex: none; text-align: left; }
.mo-todo { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.mo-todo .dt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mo-todo time { margin-left: auto; color: var(--muted); font-size: 12px; }
/* 内容编辑器章节 */
.ct-sec { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafbfe; }
/* 名片管理 */
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mc-card { display: flex; flex-direction: column; gap: 8px; }
.mc-top { display: flex; align-items: center; gap: 10px; }
.mc-ava { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: none; }
.mc-nm { font-weight: 700; font-size: 15px; }
.mc-rl { font-size: 12px; color: var(--muted); }
.mc-tel { font-size: 13px; color: var(--text); }
.mc-chips { min-height: 24px; }
.mc-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.mc-stats b { color: var(--text); }
.mc-ops { display: flex; gap: 8px; margin-top: auto; }
.mc-ops .btn { flex: 1; justify-content: center; }

/* ================= v95 小程序设置页 ================= */
.mmset-tabrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.mmset-tabrow:last-of-type { border-bottom: none; }
.mmset-tabrow .mono { flex: 1.4; min-width: 160px; font-size: 12px; color: var(--muted); }
.mmset-tabrow input:not([type="checkbox"]) { flex: 1; min-width: 100px; max-width: 180px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.mmset-tabrow select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--bg, #fff); }
.mmset-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.mmset-chk input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ================= v95b 侧栏折叠分组 ================= */
.menu-group.grp-tog { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.menu-group.grp-tog .arw { font-size: 10px; opacity: .65; }
.menu-group.grp-tog:hover { color: #fff; opacity: .9; }

/* ================= v97 富文本编辑器 ================= */
.rte { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg-soft, #f7f8fa); }
.rte-bar button { padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; color: var(--text); }
.rte-bar button:hover { border-color: var(--brand, #4f46e5); color: var(--brand, #4f46e5); }
.rte-area { min-height: 180px; max-height: 480px; overflow-y: auto; padding: 12px 14px; font-size: 14px; line-height: 1.8; outline: none; }
.rte-area:empty::before { content: '输入正文内容…'; color: #9aa3b2; }
.rte-area img { max-width: 100%; border-radius: 8px; }
.rte-area h2, .rte-area h3 { margin: 14px 0 6px; }
.rte-area p { margin: 6px 0; }
.rte-area ul, .rte-area ol { padding-left: 22px; margin: 6px 0; }

/* ================= v98 全DIY装修工作台改版（页签导航 + 组件抽屉沉底 + 对标操控） ================= */
.mm-toolbar .btn:disabled { opacity: .4; cursor: not-allowed; }
/* 顶部页签导航（带块数角标） */
/* v100：页签改为横向滚动（原来是 flex-wrap，页面一多就竖排把顶栏撑高，这正是 1080px 下"挤成竖排"的元凶） */
.mm-ptabs { display: flex; gap: 4px; background: #f2f5fb; border: 1px solid var(--line); padding: 3px; border-radius: 9px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; max-width: 40vw; scrollbar-width: thin; }
.mm-ptabs::-webkit-scrollbar { height: 4px; }
.mm-ptabs::-webkit-scrollbar-thumb { background: #cfd7e6; border-radius: 4px; }
.mm-ptab { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: #7a8499; cursor: pointer; user-select: none; white-space: nowrap; }
.mm-ptab:hover { color: #1f2733; }
.mm-ptab.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.mm-ptab .cnt { font-style: normal; font-size: 10px; background: #e2e8f5; color: #7a8499; border-radius: 8px; padding: 1px 6px; }
.mm-ptab.on .cnt { background: rgba(31,111,235,.12); color: var(--brand); }
/* 保存状态灯 */
.mm-save-lamp { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #7a8499; white-space: nowrap; }
.mm-save-lamp .dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.mm-save-lamp.dirty .dot { background: #d97706; animation: mmLampPulse 1.6s infinite; }
@keyframes mmLampPulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
/* v128：左栏可折叠（窄屏给画布让宽，对标微盟） */
.mm-pal-inner { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; }
.mm-pal-rail { display: none; }
.mm-cols.pal-fold { grid-template-columns: 40px 1fr 360px; }
.mm-cols.pal-fold .mm-pal-inner { display: none; }
.mm-cols.pal-fold .mm-pal-rail { display: flex; align-items: center; justify-content: center;
  height: 100%; cursor: pointer; color: var(--sub); font-size: 13px; user-select: none; }
.mm-cols.pal-fold .mm-pal-rail:hover { background: var(--brand-w); color: var(--brand); }
@media (max-width: 1280px) { .mm-cols.pal-fold { grid-template-columns: 40px 1fr 320px; } }

/* 画布块悬浮工具条：组件名徽标 */
.mm-block-qa .mm-qa-n { font-size: 10px; color: rgba(255,255,255,.85); padding: 0 4px 0 7px; font-weight: 500; white-space: nowrap; line-height: 1.5; }
/* 宫格图标选择器 */
.mm-ico-cur { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mm-ico-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
.mm-ico-grid button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .12s; padding: 0; }
.mm-ico-grid button:hover { border-color: var(--brand); background: rgba(31,111,235,.06); transform: scale(1.1); }
.mm-nav-ico { width: 40px; height: 40px; border-radius: 10px; border: 1px dashed #c2c9d8; background: #fafbfd; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.mm-nav-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.mm-nav-ico:hover { border-color: var(--brand); }
/* 站内链接选择器（下拉 + 自定义输入） */
.mm-lnkrow { display: flex; gap: 6px; flex: 1; min-width: 0; align-items: center; }
.mm-lnkrow select { flex: 0 0 auto; max-width: 130px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; font-size: 12px; background: #fff; color: #1f2733; }
.mm-lnkrow input { flex: 1; min-width: 60px; }
/* 主题最近使用色 */
.mm-rc { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.mm-rc span { font-size: 10.5px; color: #a7b0c3; }
.mm-rc i { width: 20px; height: 20px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line); }
.mm-rc i:hover { transform: scale(1.15); }

/* ============ v100 新增组件：方案卡片 promo / 倒计时 countdown / 分隔符 divider / 悬浮客服 float ============ */
.mm-promo { padding: 12px; }
.mm-promo-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mm-promo-hd b { font-size: 15px; font-weight: 700; color: var(--mm-text, #1f2937); }
.mm-promo-hd span { font-size: 12px; }
.mm-promo-grid { display: grid; gap: 10px; }
.mm-promo-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.mm-promo-scroll .mm-promo-card { flex: 0 0 62%; }
.mm-promo-card { position: relative; border: 1px solid #eef1f6; background: #fff; padding: 12px; display: flex; flex-direction: column; gap: 5px; }
.mm-promo-emo { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.mm-promo-tag { position: absolute; top: 10px; right: 10px; font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.mm-promo-card b { font-size: 13.5px; font-weight: 600; color: var(--mm-text, #1f2937); line-height: 1.35; }
.mm-promo-card small { font-size: 11.5px; color: #8b95a7; line-height: 1.45; }
.mm-promo-empty { font-size: 12px; color: #a7b0c3; padding: 14px; text-align: center; border: 1px dashed #dfe4ee; border-radius: 10px; }
.mm-cd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.mm-cd-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mm-cd-l b { font-size: 14px; font-weight: 700; }
.mm-cd-l small { font-size: 10.5px; opacity: .72; }
.mm-cd-r { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mm-cd-cell { display: flex; align-items: baseline; gap: 1px; }
.mm-cd-cell b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-cd-cell em { font-size: 10px; font-style: normal; opacity: .8; margin-right: 3px; }
.mm-cd-tip, .mm-cd-over { font-size: 12px; opacity: .85; }
.mm-dv-row { display: flex; align-items: center; gap: 10px; }
.mm-dv-txt { font-size: 12px; white-space: nowrap; }
.mm-fl-wrap { width: auto !important; }
.mm-fl-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mm-fl-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .24); }
.mm-fl-btn em { font-size: 9px; font-style: normal; margin-top: 1px; }
.mm-fl-empty { font-size: 10px; color: #a7b0c3; }
.mm-rep.pm { flex-wrap: wrap; }
.mm-rep.pm input { flex: 1 1 44%; min-width: 0; }
.mm-rep.pm .pm-emo { flex: 0 0 44px; text-align: center; font-size: 15px; }
.mm-rep.pm .mm-lnkrow { flex: 1 1 100%; }
/* 可撤销操作 toast */
.mm-atoast { position: fixed; left: 50%; bottom: 170px; transform: translate(-50%, 16px); background: #1f2733; color: #fff; padding: 10px 16px; border-radius: 11px; font-size: 12.5px; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: .22s; z-index: 9999; }
.mm-atoast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mm-atoast b { color: #7fb0ff; cursor: pointer; font-weight: 600; }

/* ===== v100 装修端响应式收窄：1440 / 1320 / 1180 / 1080 四级降噪 ===== */
@media (max-width: 1440px) {
  .mm-cols { grid-template-columns: 232px 1fr 336px; }
}
@media (max-width: 1320px) {
  .mm-cols { grid-template-columns: 220px 1fr 322px; }
  .mm-toolbar { padding: 0 12px; }
  .mm-tb-r { gap: 6px; }
  .mm-tb-grp + .mm-tb-grp { padding-left: 7px; margin-left: 0; }
  .mm-toolbar .btn.sm { padding: 0 9px; }
}
@media (max-width: 1180px) {
  .mm-cols { grid-template-columns: 208px 1fr 306px; }
  .mm-title { display: none; }
  .mm-ptabs { max-width: 34vw; }
  .mm-toolbar .btn.sm { padding: 0 7px; font-size: 12px; }
  .mm-tb-save .mm-save-lamp span:last-child { display: none; }
}
/* 1080 及以下：不再硬挤 —— 顶栏整体换行成两行（左=标题+页签，右=操作区整组），按钮仍保持单行 */
@media (max-width: 1080px) {
  .mm-cols { grid-template-columns: 196px 1fr 296px; }
  .mm-toolbar { height: auto; min-height: 54px; flex-wrap: wrap; row-gap: 8px; padding: 8px 12px; }
  .mm-tb-l { flex: 1 1 100%; }
  .mm-ptabs { max-width: none; flex: 1 1 auto; }
  .mm-tb-r { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
}

/* ===== v101 客户三库：分类页签 =====
 * v106：.lib-head / .lib-head-t / .lh-title / .lh-sub 已删 —— 页内标题取消后交给统一页头（PAGE_META），
 * 这四条变成没人引用的死样式，留着只会让人以为还有第二处标题。 */
.lib-tabs { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-3); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--sp-1); padding: 7px 15px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); border-radius: 999px;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: all .18s; }
.lib-tab:hover { border-color: var(--primary); color: var(--primary); }
.lib-tab.active { background: var(--primary-l); border-color: var(--primary); color: var(--primary-d); }
.lib-tab .n { min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(100,116,139,.14); font-size: var(--fs-xs); text-align: center; }
.lib-tab.active .n { background: var(--primary); color: #fff; }
@media (max-width: 768px) {
  .lh-title { font-size: var(--fs-lg); }
  .lib-tab { padding: 6px 13px; }
}

/* ===== v102 提示升级与输入态 ===== */
/* alertBox 的长文本容器：报错信息常要复制给开发，所以必须能选中、能滚动 */
.err-box {
  margin: 0; padding: var(--sp-3); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-sm); line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  max-height: 50vh; overflow: auto; user-select: text; -webkit-user-select: text;
}
/* 搜索框防抖等待态：告诉用户「在等你停手」，而不是让人以为卡住了。
   加 !important 是因为聚焦态 .toolbar input:focus 权重更高，会把这个指示盖掉。 */
input.typing {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-l);
  transition: border-color .18s, box-shadow .18s;
}

/* ==========================================================================
   v103 · 骨架层
   只做四件事：侧栏（六域 + 搜索）、顶栏（全局搜索 + 通知 + 用户卡）、
   页头（标题 + 副标题 + 主操作）、内容区节奏。不碰任何页面内部逻辑。

   页头为什么是 #page-head 而不是塞进各页：所有页面渲染函数都是
   `page.innerHTML = ...` 整体覆盖 #page，页头跟内容放一起必被冲掉。
   所以拆成两个兄弟容器，页头由 render() 统一填充。

   三套侧栏主题只换下面这组变量，切主题零成本（html[data-theme]）。
   ========================================================================== */

/* ---------- 侧栏主题 A · 白侧栏（默认） ---------- */
html, html[data-theme="a"] {
  --side-bg: #ffffff;
  --side-fg: #475569;
  --side-fg-hi: #1e293b;
  --side-hover-bg: #f1f5f9;
  --side-active-bg: #eef2ff;
  --side-active-fg: #3730a3;
  --side-active-bar: #4f46e5;
  --side-logo-bg: #f8fafc;
  --side-logo-fg: #1e293b;
  --side-group-fg: #94a3b8;
  --side-shadow: 1px 0 0 var(--border);
  --side-input-bg: #f8fafc;
  --side-input-bd: #e2e8f0;
  --side-badge-bg: #4f46e5;
}
/* ---------- 侧栏主题 B · 深蓝渐变（v103 之前的原样） ---------- */
html[data-theme="b"] {
  --side-bg: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  --side-fg: #cbd5e1;
  --side-fg-hi: #ffffff;
  --side-hover-bg: rgba(255, 255, 255, .08);
  --side-active-bg: rgba(129, 140, 248, .18);
  --side-active-fg: #ffffff;
  --side-active-bar: #a5b4fc;
  --side-logo-bg: rgba(0, 0, 0, .18);
  --side-logo-fg: #ffffff;
  --side-group-fg: rgba(255, 255, 255, .55);
  --side-shadow: 4px 0 24px rgba(30, 27, 75, .18);
  --side-input-bg: rgba(255, 255, 255, .08);
  --side-input-bd: rgba(255, 255, 255, .14);
  --side-badge-bg: #818cf8;
}
/* ---------- 侧栏主题 C · 品牌紫 ---------- */
html[data-theme="c"] {
  --side-bg: #2e1065;
  --side-fg: #ddd6fe;
  --side-fg-hi: #ffffff;
  --side-hover-bg: rgba(255, 255, 255, .10);
  --side-active-bg: rgba(167, 139, 250, .22);
  --side-active-fg: #ffffff;
  --side-active-bar: #c4b5fd;
  --side-logo-bg: rgba(0, 0, 0, .22);
  --side-logo-fg: #ffffff;
  --side-group-fg: rgba(255, 255, 255, .50);
  --side-shadow: 4px 0 24px rgba(46, 16, 101, .25);
  --side-input-bg: rgba(255, 255, 255, .10);
  --side-input-bd: rgba(255, 255, 255, .16);
  --side-badge-bg: #a78bfa;
}

/* ---------- 侧栏 ---------- */
.sidebar { background: var(--side-bg); color: var(--side-fg); box-shadow: var(--side-shadow); }
.sidebar .logo { background: var(--side-logo-bg); color: var(--side-logo-fg); }
.sidebar .menu a { color: var(--side-fg); }
.sidebar .menu a:hover { background: var(--side-hover-bg); color: var(--side-fg-hi); }
.sidebar .menu a.active { background: var(--side-active-bg); color: var(--side-active-fg); box-shadow: inset 3px 0 0 var(--side-active-bar); font-weight: 600; }
.sidebar .menu a .badge-count { background: var(--side-badge-bg); }
/* 菜单搜索：命中项即便在折叠分组里也要显示，所以 f-hidden 必须能盖住
   折叠逻辑写在 style.display 上的内联样式 —— 只有 !important 能做到。 */
.sidebar .menu a.f-hidden, .sidebar .menu .menu-group.f-hidden { display: none !important; }

/* ---------- 侧栏顶部的菜单搜索 ---------- */
.side-search { padding: 10px 12px 2px; }
.side-search .ss-wrap { position: relative; display: flex; align-items: center; }
.side-search .ss-ic { position: absolute; left: 9px; color: var(--side-group-fg); pointer-events: none; display: flex; }
.side-search .ss-ic .ico { width: 15px; height: 15px; }
.side-search input {
  width: 100%; height: 34px; box-sizing: border-box;
  padding: 0 30px 0 30px; border: 1px solid var(--side-input-bd);
  border-radius: var(--r-sm); background: var(--side-input-bg);
  color: var(--side-fg-hi); font-size: var(--fs-sm); font-family: inherit;
  outline: none; transition: border-color .16s, box-shadow .16s;
}
.side-search input::placeholder { color: var(--side-group-fg); }
.side-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.side-search .ss-kbd {
  position: absolute; right: 8px; font-size: 11px; line-height: 16px;
  padding: 0 4px; border-radius: 4px; border: 1px solid var(--side-input-bd);
  color: var(--side-group-fg); pointer-events: none;
}
.side-search .ss-clr {
  position: absolute; right: 6px; width: 20px; height: 20px; border: none;
  background: none; color: var(--side-group-fg); cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0;
}
.side-search.has-val .ss-clr { display: flex; }
.side-search.has-val .ss-kbd { display: none; }
.side-empty { padding: 16px 14px; font-size: var(--fs-sm); color: var(--side-group-fg); text-align: center; }

/* ---------- 六域分组标题 ---------- */
.menu-group {
  margin: 14px 0 4px; padding: 0 12px; font-size: 11px; font-weight: 600;
  color: var(--side-group-fg); letter-spacing: 1.5px; white-space: nowrap;
}

/* ---------- 顶栏 ---------- */
.header { gap: var(--sp-4); padding: 0 20px; background: rgba(255, 255, 255, .92); z-index: var(--z-header); }
.header .crumb { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.header .h-left { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.header .h-right { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; }

/* 全局搜索：菜单 + 客户通搜 */
.gsearch { position: relative; width: 340px; max-width: 32vw; }
.gsearch .gs-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: flex; pointer-events: none; }
.gsearch .gs-ic .ico { width: 15px; height: 15px; }
.gsearch input {
  width: 100%; height: 36px; box-sizing: border-box;
  padding: 0 12px 0 32px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--bg);
  color: var(--text); font-size: var(--fs-sm); font-family: inherit; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.gsearch input::placeholder { color: var(--text-3); }
.gsearch input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.gs-panel {
  position: absolute; top: 44px; left: 0; right: 0; display: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown); max-height: 62vh; overflow: auto; padding: 6px;
}
.gs-panel.open { display: block; }
.gs-sec { font-size: 11px; color: var(--text-3); letter-spacing: .5px; padding: 8px 10px 4px; }
.gs-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--r-xs); cursor: pointer; font-size: var(--fs-sm); color: var(--text);
}
.gs-item:hover, .gs-item.on { background: var(--primary-l); color: var(--primary-d); }
.gs-item .gs-ic { display: flex; color: var(--text-3); }
.gs-item:hover .gs-ic, .gs-item.on .gs-ic { color: var(--primary); }
.gs-item .gs-ic .ico { width: 15px; height: 15px; }
.gs-item .gs-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item .gs-s { font-size: var(--fs-xs); color: var(--text-3); flex-shrink: 0; }
.gs-empty { padding: 16px 10px; font-size: var(--fs-sm); color: var(--text-3); text-align: center; }

/* 通知铃 */
.bell {
  position: relative; width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--card); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: background .16s, color .16s;
}
.bell:hover { background: var(--bg); color: var(--text); }
.bell .dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  box-sizing: border-box; padding: 0 4px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; border: 2px solid var(--card);
}
.bell .dot.warn { background: var(--orange); }

/* 顶栏主题入口（v105）：与铃铛同规格，hover 转品牌紫提示可点 */
.theme-btn:hover { color: var(--purple-fg); border-color: var(--purple-fg); }

/* 主题选择弹窗：三张色卡并排，当前主题描边 + 打勾 */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-opt {
  border: 2px solid var(--border); border-radius: var(--r-sm); background: var(--card);
  padding: 10px; cursor: pointer; display: flex; flex-direction: column;
  gap: 8px; align-items: center; transition: border-color .16s, transform .16s;
}
.theme-opt:hover { border-color: var(--purple-fg); transform: translateY(-2px); }
.theme-opt.on { border-color: var(--purple-fg); background: var(--purple-bg); }
.theme-prev { width: 100%; height: 44px; border-radius: 6px; display: block; border: 1px solid rgba(0, 0, 0, .08); }
.theme-name { font-size: 12px; color: var(--text-2); }
.theme-opt.on .theme-name { color: var(--purple-fg); font-weight: 600; }
@media (max-width: 768px) { .theme-grid { grid-template-columns: 1fr; } }

/* 用户卡片（姓名 + 角色两行） */
.ucard {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px;
  border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent;
  transition: background .16s, border-color .16s;
}
.ucard:hover { background: var(--bg); border-color: var(--border); }
.ucard .u-txt { line-height: 1.25; text-align: left; }
.ucard .u-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text); white-space: nowrap; }
.ucard .u-role { font-size: var(--fs-xs); color: var(--muted); }
.ucard .avatar { width: 32px; height: 32px; font-size: var(--fs-sm); }

/* ---------- 页头 ---------- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-5);
}
.page-head .ph-t {
  font-size: var(--fs-xl); font-weight: 700; color: var(--text);
  letter-spacing: .2px; line-height: 1.3;
}
.page-head .ph-d {
  margin-top: 6px; font-size: var(--fs-sm); color: var(--muted);
  line-height: 1.6; max-width: 900px;
}
.page-head .ph-a { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }

/* ---------- 内容区节奏 ---------- */
.content { padding: var(--sp-5) var(--sp-6) var(--sp-8); max-width: 1520px; }

/* ---------- 移动端 ---------- */
@media (max-width: 1100px) {
  .gsearch { width: 220px; }
}
@media (max-width: 768px) {
  .content { padding: var(--sp-4) var(--sp-4) var(--sp-6); }
  .gsearch { display: none; }
  .header { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .header .crumb { display: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .page-head .ph-t { font-size: var(--fs-lg); }
  .page-head .ph-a { flex-wrap: wrap; }
  .ucard .u-txt { display: none; }
}

/* ============================================================
   v106 · 第二步（1/6）客户库：筛选区 / 批量条 / 表格增强
   原 toolbar 是 14 个控件挤一行，改成「搜索 + 高频胶囊 + 折叠高级筛选」。
   ============================================================ */

/* ---------- 筛选区 ---------- */
.filters { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-3); margin-bottom: var(--sp-4); }
.f-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
/* 第二行起加虚线分隔：让"搜索行 / 高级行 / 回显行"三层一眼分得开 */
.f-row + .f-row { margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px dashed var(--border); }

.f-search { position: relative; flex: 1; min-width: 220px; }
.f-search .fs-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: flex; pointer-events: none; }
.f-search input { width: 100%; padding: 9px 32px 9px 34px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-md); font-family: inherit; outline: none; background: #fbfcfe; transition: border-color .2s, box-shadow .2s; }
.f-search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.f-search .fs-clr { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: var(--border-2); color: var(--text-2); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; display: none; }
.f-search.has-val .fs-clr { display: block; }

.caps { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.caps .cap-lbl { font-size: var(--fs-xs); color: var(--text-3); margin-right: 2px; }
.cap { padding: 7px 14px; border: 1px solid var(--border); background: var(--card); border-radius: 18px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; font-family: inherit; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.cap:hover { border-color: var(--primary); color: var(--primary); }
.cap.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.cap.on.warn { background: var(--red); border-color: var(--red); color: #fff; }
.cap .cnt { opacity: .75; font-size: 11px; margin-left: 4px; }

.f-more { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; user-select: none; padding: 7px 10px; border-radius: var(--r-xs); }
.f-more:hover { background: var(--hover-bg); color: var(--text); }
.f-more .arw { font-size: 9px; transition: transform .18s; }
.f-more[aria-expanded="true"] .arw { transform: rotate(180deg); }
.f-adv { display: none; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px dashed var(--border); }
.f-adv.on { display: flex; }
.f-adv select { padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; font-size: var(--fs-sm); font-family: inherit; color: var(--text-2); outline: none; min-width: 116px; }
.f-adv select:focus { border-color: var(--primary); }

/* 已选条件回显：筛完一眼看出筛了什么，不用逐个下拉翻回去 */
.fchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-l); color: var(--primary-d); border: 1px solid var(--primary-100); padding: 4px 8px; border-radius: var(--r-xs); font-size: var(--fs-xs); }
.fchip b { font-weight: 700; }
.fchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; opacity: .55; }
.fchip button:hover { opacity: 1; }
.fchips .fclr-all { border: 0; background: none; color: var(--muted); font-size: var(--fs-xs); cursor: pointer; text-decoration: underline; padding: 4px 2px; font-family: inherit; }
.fchips .fclr-all:hover { color: var(--red); }

/* ---------- 批量操作条（勾选后才出现） ---------- */
.bulkbar { display: flex; align-items: center; gap: var(--sp-3); background: var(--primary); color: #fff; padding: 10px var(--sp-4); border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: -1px; position: relative; z-index: 3; flex-wrap: wrap; }
.bulkbar .bcnt { font-size: var(--fs-md); }
.bulkbar .bcnt b { font-size: 16px; }
.bulkbar .bacts { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.bulkbar button { background: rgba(255, 255, 255, .16); border: 0; color: #fff; padding: 6px 13px; border-radius: var(--r-xs); cursor: pointer; font-size: var(--fs-sm); font-family: inherit; transition: background .15s; }
.bulkbar button:hover { background: rgba(255, 255, 255, .3); }
.bulkbar button.danger { background: rgba(0, 0, 0, .18); }
.bulkbar button.danger:hover { background: #dc2626; }
.bulkbar .bcancel { margin-left: auto; background: none; text-decoration: underline; opacity: .85; }
.bulkbar .bcancel:hover { background: none; opacity: 1; }

/* ---------- 表格增强 ---------- */
/* 粘性表头只挂在客户库这张表上（.tbl-sticky）：全站改 thead 会波及弹窗里的表格 */
.tbl-sticky thead th { position: sticky; top: 0; z-index: var(--z-sticky); }
.col-chk { width: 38px; }
.col-chk input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin-top: 2px; }
tbody tr.sel td { background: var(--primary-l); }
tbody tr.sel:hover td { background: var(--primary-100); }

/* 行操作：现在 5 个按钮常驻，视觉噪音大；改成 hover 才全显。
   触屏没有 hover（pointer: coarse），必须常显，否则按钮点不到。 */
.rowacts { display: flex; gap: 5px; flex-wrap: wrap; opacity: .45; transition: opacity .15s; }
tbody tr:hover .rowacts, tbody tr.sel .rowacts { opacity: 1; }
@media (hover: none), (pointer: coarse) { .rowacts { opacity: 1; } }

@media (max-width: 768px) {
  .filters { padding: var(--sp-2); }
  .f-search { min-width: 100%; }
  .caps { width: 100%; }
  .bulkbar { padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); }
  .bulkbar .bacts { width: 100%; }
  .bulkbar .bcancel { margin-left: 0; }
}

/* ===== v107 数据看板：三分区 + 主次 KPI ===== */
.dash-sec { margin-top: 22px; }
.dash-sec:first-child { margin-top: 0; }
.dash-sec-h { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.dash-sec-h::before { content: ''; width: 3px; height: 13px; background: var(--primary); border-radius: 2px; flex: none; }
.dash-sec-sub { font-weight: 400; color: var(--text-3); font-size: 12px; }
.dash-sec-h .dash-cfg { margin-left: auto; }

/* 栅格：告警 3 列 / 主指标 2×2 / 次指标 4 列 */
.grid.dash-g2 { grid-template-columns: repeat(2, 1fr); }
.grid.dash-g3 { grid-template-columns: repeat(3, 1fr); }
.grid.dash-g4 { grid-template-columns: repeat(4, 1fr); }

/* 主次分档：大卡 34px，小卡 19px + 更紧的内边距 */
.stat.big .value { font-size: 34px; }
.stat.mini { padding: 12px 14px; }
.stat.mini .value { font-size: 19px; margin-top: 3px; }
.stat.mini .label { font-size: 12px; }
.stat .sub { font-size: 12px; color: var(--text-3); margin-top: 4px; position: relative; }

/* 告警卡：统一红色调。必须写成 .grid.stats .stat.alarm ——
   上面 .grid.stats .stat:nth-child(n) 给前 8 张按序上色，特异性相同，靠"后定义"压过去 */
.grid.stats .stat.alarm { --accent: #fee2e2; border-color: #fecaca; background: linear-gradient(180deg, #fff, #fef6f6); }
.grid.stats .stat.alarm .value { color: var(--red); }

/* 次指标中性化，与上方大卡拉开层级（同样是为了压住 nth-child 按序配色） */
.grid.stats.dash-mini { gap: 12px; row-gap: 12px; margin-top: 12px; }
.grid.stats.dash-mini .stat { --accent: transparent; }
.grid.stats.dash-mini .stat .value { color: var(--text); }

/* 业绩概览：左侧 2×2 主卡 + 右侧目标完成率横卡 */
.dash-kpi { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dash-kpi.no-goal { grid-template-columns: 1fr; }
.dash-goal { display: flex; align-items: center; gap: 18px; }
.dash-goal-main { flex: 1; min-width: 0; }
.dash-goal-main .label { color: var(--text-3); font-size: 12.5px; }
.dash-goal-v { font-size: 15px; font-weight: 700; margin-top: 4px; }
.dash-goal-link { display: inline-block; margin-top: 8px; color: var(--primary); font-size: 12.5px; text-decoration: none; }
.dash-goal-link:hover { text-decoration: underline; }
.dash-ring { width: 128px; height: 128px; flex: none; }
.dash-ring .ring-bg { fill: none; stroke: var(--border-2); stroke-width: 12; }
.dash-ring .ring-fg { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; }
.dash-ring text { font-size: 20px; font-weight: 700; fill: var(--text); text-anchor: middle; }

@media (max-width: 1100px) {
  .grid.dash-g4 { grid-template-columns: repeat(3, 1fr); }
  .dash-kpi { grid-template-columns: 1.6fr 1fr; }
}
@media (max-width: 768px) {
  .dash-sec { margin-top: 16px; }
  .dash-sec-h { font-size: 12.5px; margin-bottom: 8px; }
  .dash-sec-sub { display: none; }
  .dash-kpi, .dash-kpi.no-goal { grid-template-columns: 1fr; }
  .grid.dash-g3, .grid.dash-g2, .grid.dash-g4 { grid-template-columns: repeat(2, 1fr); }
  .stat.big .value { font-size: 26px; }
  .dash-goal { gap: 12px; padding: 14px; }
  .dash-ring { width: 84px; height: 84px; }
  .dash-goal-v { font-size: 13.5px; }
}

/* v108 工单快捷筛选胶囊 + 超时行标红 */
.tk-caps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tk-caps .cap {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; line-height: 1.4; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tk-caps .cap:hover { border-color: var(--primary); color: var(--primary); }
.tk-caps .cap.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tk-row.tk-row-overdue { box-shadow: inset 3px 0 0 var(--red); background: var(--red-bg); }
.tk-row.tk-row-overdue:hover { background: var(--red-bg); }

/* v109 客户详情双栏（方案 A） */
.cd-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.cd-main { min-width: 0; }
.cd-side { min-width: 0; }
.cd-side-sticky { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.cd-act { gap: 8px; flex-wrap: wrap; }
.cd-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 13px; }
@media (max-width: 980px) {
  .cd-wrap { grid-template-columns: 1fr; }
  .cd-side-sticky { position: static; }
}
@media (max-width: 560px) {
  .cd-info-grid { grid-template-columns: 1fr; }
}

/* v110 其余页统一改造：双标题清理 + 操作按钮归位统一页头。
   窄屏 .page-head 已在骨架层响应式里纵向堆叠、.ph-a 自动 wrap，按钮归位后天然适配移动端；
   此处仅补项目看板列最小宽度，保证 board 视图横滚可读。 */
.board-col { min-width: 260px; flex: 0 0 auto; }

/* ================= v123 销售视角待跟进 + 新版本提醒 ================= */
.bv-tabs { display: inline-flex; gap: 6px; }
.bv-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.bv-card:hover { border-color: var(--brand-b); background: var(--brand-w); }
.bv-c-h { display: flex; align-items: center; gap: 8px; }
.bv-c-name { font-weight: 600; color: var(--text); text-decoration: none; }
.bv-c-name:hover { color: var(--brand); }
.bv-c-meta { font-size: var(--fs-sm); color: var(--sub); margin-top: 4px; }
.bv-c-last { font-size: var(--fs-sm); color: var(--sub); margin-top: 2px; }
.bv-c-acts { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-sm); }
.bv-warn { color: var(--red); }
.bv-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: #eef2f7; }
.bv-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-b) 100%); }
.bv-mgr { margin-top: 14px; }
.bv-mgr > summary { cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; color: var(--sub); background: var(--card); }
.bv-mgr[open] > summary { margin-bottom: 12px; }
.bv-mgr > summary:hover { border-color: var(--brand-b); color: var(--brand); }
.upd-bar { position: fixed; left: 50%; transform: translateX(-50%); top: 14px; z-index: 201;
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--brand); color: #fff; font-size: var(--fs-sm); box-shadow: var(--shadow-lg); }
.upd-bar .btn.xs { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.32); }
.upd-bar .btn.xs.primary { background: #fff; color: var(--brand); border-color: #fff; }
@media (max-width: 768px) { .upd-bar { left: 12px; right: 12px; transform: none; } }

/* ================= v124 新组件画布样式（faq / team / stats / timeline）================= */
.mm-sec-t { font-size: 15px; font-weight: 700; color: var(--mm-text, #1f2937); margin-bottom: 10px; }
.mm-empty-tip { font-size: 12px; color: #a7b0c3; padding: 14px; text-align: center; border: 1px dashed #dfe4ee; border-radius: 10px; }
/* 常见问题 */
.mm-faq-item { border-bottom: 1px solid #f0f2f5; }
.mm-faq-item:last-child { border-bottom: 0; }
.mm-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; }
.mm-faq-q b { font-size: 13.5px; font-weight: 600; color: var(--mm-text, #1f2937); }
.mm-faq-ar { color: #b6bfd0; font-size: 12px; transition: transform .18s; }
.mm-faq-item.open .mm-faq-ar { transform: rotate(180deg); }
.mm-faq-a { display: none; font-size: 12px; color: #8b95a7; line-height: 1.7; padding: 0 0 9px; }
.mm-faq-item.open .mm-faq-a { display: block; }
/* 团队展示 */
.mm-team-grid { display: grid; gap: 12px; }
.mm-team-card { text-align: center; }
.mm-team-av { margin: 0 auto 6px; font-size: 20px; font-weight: 700; }
.mm-team-card img { object-fit: cover; margin: 0 auto 6px; display: block; }
.mm-team-card b { display: block; font-size: 13px; font-weight: 600; color: var(--mm-text, #1f2937); }
.mm-team-card small { display: block; font-size: 11px; color: #8b95a7; margin-top: 1px; }
.mm-team-card p { font-size: 11px; color: #a7b0c3; line-height: 1.55; margin: 3px 0 0; }
/* 数据背书 */
.mm-stats { padding: 14px 12px; }
.mm-stats-grid { display: grid; gap: 10px; }
.mm-stats-cell { text-align: center; }
.mm-stats-cell b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.mm-stats-cell b em { font-size: 11px; font-style: normal; margin-left: 2px; }
.mm-stats-cell small { display: block; font-size: 11.5px; color: #8b95a7; margin-top: 2px; }
/* 发展历程 */
.mm-tl-item { position: relative; padding: 0 0 14px 18px; border-left: 2px solid #eef1f6; }
.mm-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.mm-tl-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; }
.mm-tl-year { font-size: 11.5px; color: #8b95a7; }
.mm-tl-t { font-size: 13.5px; font-weight: 600; color: var(--mm-text, #1f2937); margin-top: 1px; }
.mm-tl-d { font-size: 11.5px; color: #8b95a7; line-height: 1.65; margin-top: 2px; }

/* ===== v126 待跟进清单 ===== ===== */
/* 客户库「待跟进 N」胶囊角标：数字为空时整个角标不占位，避免胶囊宽度跳动 */
.cap-n { display: none; margin-left: 5px; min-width: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: var(--fs-xs, 12px); font-weight: 600;
  line-height: 16px; text-align: center; }
.cap-n:not(:empty) { display: inline-block; }
.cap-n.danger { background: var(--red); }
/* 待跟进抽屉：按「逾期 / 今日 / 7天内 / 无计划」分组 */
.ftodo-grp { margin-bottom: 14px; }
.ftodo-gt { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ftodo-gn { font-size: var(--fs-xs, 12px); font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--hover-bg); color: var(--muted); }
.ftodo-grp.danger .ftodo-gt { color: var(--red); }
.ftodo-grp.danger .ftodo-gn { background: #fee2e2; color: #991b1b; }
.ftodo-grp.warn .ftodo-gt { color: var(--orange); }
.ftodo-grp.warn .ftodo-gn { background: #fef3c7; color: #92400e; }
.ftodo-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 8px; background: var(--card); }
.ftodo-row:hover { border-color: var(--primary-100); background: var(--hover-bg); }
.ftodo-main { flex: 1; min-width: 0; }
.ftodo-acts { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 560px) {
  .ftodo-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .ftodo-acts { justify-content: flex-end; }
}

/* v136：专题合集入口卡片（装修画布侧） */
.mm-col-grid { display: grid; gap: 10px; }
.mm-col-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.mm-col-card img { width: 100%; height: 80px; object-fit: cover; display: block; }
.mm-col-ph { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: #f1f5f9; }
.mm-col-bd { padding: 8px 10px; }
.mm-col-bd b { font-size: 14px; display: block; }
.mm-col-bd p { margin: 2px 0 0; font-size: 12px; color: #64748b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* v141：后台内容库标签筛选条 */
.ctfb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0}
.ctfb .ctfb-lb{font-size:12px;color:var(--muted);margin-right:2px}
.ctfb .ctfb-c{padding:3px 10px;border:1px solid var(--border);border-radius:12px;background:#fff;font-size:12px;cursor:pointer;color:var(--text);transition:.12s}
.ctfb .ctfb-c:hover{border-color:var(--primary);color:var(--primary)}
.ctfb .ctfb-c.on{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:600}
.ctfb .ctfb-c .n{opacity:.6;margin-left:3px;font-size:11px}
.ctfb .ctfb-x{font-size:12px;color:var(--muted);cursor:pointer;padding:3px 8px;border-radius:12px}
.ctfb .ctfb-x:hover{background:var(--bg);color:var(--danger,var(--red))}
.ctfb .ctfb-empty{font-size:12px;color:var(--muted)}
.ct-tags-mini{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}
.ct-tags-mini .ct-tm{display:inline-block;padding:1px 6px;border-radius:8px;background:#f1f5f9;color:#475569;font-size:11px;border:1px solid #e2e8f0}

/* ===== v142 目标管理：作战条 / 折叠回顾 / 策略建议 / 周计划细化 ===== */
.gh-war { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gh-war-l { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gh-war-l .gh-tbar { display: inline-block; width: 70px; height: 6px; border-radius: 6px; background: #e5e7eb; overflow: hidden; margin: 0 2px; }
.gh-war-l .gh-tbar i { display: block; height: 100%; background: #2f6fed; border-radius: 6px; }
.gh-war-c { flex: 1 1 340px; min-width: 240px; font-size: 13px; line-height: 1.7; color: var(--text); border-left: 3px solid #94a3b8; padding: 6px 12px; background: #fafbfd; border-radius: 0 6px 6px 0; }
.gh-war-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gh-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
@media (max-width: 820px) {
  .gh-war { flex-direction: column; align-items: stretch; gap: 10px; }
  .gh-war-c { border-left: none; border-top: 3px solid #94a3b8; padding: 10px 0 0; border-radius: 0; background: transparent; }
}
.gh-fold { border: 1px solid var(--border); border-radius: var(--r-sm); margin-top: 14px; background: #fff; }
.gh-fold > summary { cursor: pointer; padding: 11px 14px; font-weight: 700; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; user-select: none; }
.gh-fold > summary::-webkit-details-marker { display: none; }
.gh-fold > summary::before { content: '\25B8'; color: var(--muted); display: inline-block; transition: transform .15s; }
.gh-fold[open] > summary::before { transform: rotate(90deg); }
.gh-fold > summary:hover { background: #f5f7ff; }
.gh-fold > summary .muted { font-weight: 400; }
.gh-fold .gh-fold-body { padding: 2px 14px 14px; }
.stg-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.8; }
.stg-meta b { color: var(--text); }
.stg-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.stg-act { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fbfcfe; }
.stg-act-t { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 5px; }
.stg-act-t b { font-weight: 600; }
.stg-ico { width: 20px; height: 20px; border-radius: 6px; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.stg-act-d { font-size: 12px; color: var(--muted); line-height: 1.7; }
.stg-act .btn { margin-top: 8px; }
.stg-ai { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #f6f8ff; border: 1px solid #dbe4ff; font-size: 13px; line-height: 1.9; white-space: pre-wrap; color: var(--text); }
.wp-row .wp-goal { flex: 1 1 150px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.wp-row .wp-exp { flex: 0 1 100px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfcfe; }
.wp-row .wp-today { padding: 5px 9px; white-space: nowrap; }
.wp-cov { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.7; }
.dp-src { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: #eef2ff; color: #4f46e5; font-size: 11px; font-weight: 700; }
@media (max-width: 640px) {
  .wp-row .wp-goal, .wp-row .wp-exp { flex: 1 1 100%; }
  .stg-acts { grid-template-columns: 1fr; }
}

/* v143 目标设定：建议值 / 上期复制 / 团队下钻 */
.gh-set-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px;padding:8px 12px;background:#f8fafc;border:1px solid var(--border);border-radius:8px}
.g-sug{margin:4px 0 10px;padding:10px 12px;background:#f0f7ff;border:1px solid #cfe3ff;border-radius:8px}
.g-sug-t{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;flex-wrap:wrap}
.g-sug .btn.sm{padding:2px 8px}
.cp-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--border);flex-wrap:wrap}
.cp-all{display:flex;align-items:center;gap:6px;font-weight:600}
.cp-item{display:flex;align-items:center;gap:8px;padding:8px 4px;border-bottom:1px dashed var(--border);flex-wrap:wrap;cursor:pointer}
.cp-item>span:first-of-type{min-width:170px}
.cp-conf{opacity:.62}
.cp-tag{font-size:12px;color:#ea580c;background:#fff7ed;border:1px solid #fed7aa;border-radius:4px;padding:1px 6px}
.tm-detail-box{padding:8px 10px;background:#f8fafc;border-radius:8px}
.tm-sub{width:100%;font-size:13px}
.tm-sub th,.tm-sub td{padding:6px 8px;text-align:left;white-space:nowrap}
.tm-detail>td{background:#fbfcfe}
@media (max-width:820px){.gh-set-bar{flex-direction:column;align-items:flex-start}.cp-item>span:first-of-type{min-width:0}}

/* ===== v147：智能分析 · 经理视角按负责人分组折叠 ===== */
.ins-grp { margin-bottom: 10px; }
.ins-grp-head { transition: background .15s; }
.ins-grp-head:hover { background: var(--hover-bg); }
.ins-grp-body { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--border); }
/* ===== v148：目标管理 · 每日记事 + 复盘总结（规则版） ===== */
.dn-sep { border-top: 1px dashed var(--border); margin: 16px 0 12px; }
.dn-facts { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: #334155; margin-bottom: 10px; }
.dn-facts b { color: #0f172a; }
.dn-facts-sub { margin-top: 4px; font-size: 12px; color: #64748b; }
.dn-text { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.7; resize: vertical; font-family: inherit; color: inherit; background: transparent; }
.dn-text:focus { outline: none; border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.dn-seg { display: inline-flex; gap: 6px; }
.dn-seg .btn.active { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.sum-card { min-width: 0; }
.sum-num { font-size: 22px; font-weight: 700; margin: 2px 0; }
.sum-cmps { display: flex; flex-direction: column; gap: 8px; }
.sum-cmp { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.sum-cmp > span:first-child { min-width: 110px; color: #475569; }
.sum-stucks { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; color: #334155; }
.sum-stucks .dn-kw { display: inline-block; background: #fef2f2; color: #b91c1c; border-radius: 4px; padding: 0 5px; font-weight: 600; }
/* ===== v149：智能分析 · 策略建议动态化（可点击跳转） ===== */
.tac-list { display: flex; flex-direction: column; gap: 8px; }
.tac-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; line-height: 1.7; background: var(--card-bg); }
.tac-item.is-link { cursor: pointer; transition: background .15s, border-color .15s; }
.tac-item.is-link:hover { background: var(--hover-bg); border-color: #c7d2fe; }
.tac-ic { flex: 0 0 auto; font-size: 15px; line-height: 1.55; }
.tac-tx { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.tac-go { flex: 0 0 auto; color: #4338ca; font-size: 12px; font-weight: 600; white-space: nowrap; }
@media (max-width:820px){.tac-item{font-size:13px;padding:8px 10px}.tac-go{display:none}}
/* v150：智能分析 · 建议处置（⋯ 展开操作行 / 已隐藏抽屉） */
.ins-act-ops{display:flex;gap:6px;align-items:center;flex-shrink:0}
.ins-more-btn{padding:2px 10px;line-height:1.5;font-weight:600;color:var(--primary-d);background:var(--primary-l);border:1px solid var(--primary-100)}
.ins-ops{display:none;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.ins-op{font-size:var(--fs-xs)}
.ins-hid-head{padding:2px 0}
.ins-hid-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--border);font-size:var(--fs-sm)}
.ins-hid-item .badge{margin-left:6px}
@media (max-width:820px){
  .ins-act-ops{width:100%;justify-content:flex-end;margin-top:8px}
  .ins-hid-item{flex-wrap:wrap}
  .ins-ops .muted{display:none}
}
/* v150：今日三件事 / 团队风险榜 */
.foc-item{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-top:1px solid var(--border)}
.foc-item:first-of-type{border-top:none}
.foc-no{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:var(--fs-xs);font-weight:600;flex-shrink:0}
.foc-main{flex:1;min-width:0}
.foc-ops{display:flex;gap:6px;flex-shrink:0}
.risk-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--border);font-size:var(--fs-sm)}
.risk-row:first-of-type{border-top:none}
.risk-row:hover{background:var(--hover-bg)}
.risk-no{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:var(--fs-xs);font-weight:600;background:var(--hover-bg);color:var(--muted);flex-shrink:0}
.risk-no.top{background:#fee2e2;color:#b91c1c}
.risk-main{flex:1;min-width:0}
.risk-tags{display:flex;gap:5px;flex-wrap:wrap}
.risk-score{font-weight:600;color:#b91c1c;min-width:32px;text-align:right}
@media (max-width:820px){
  .foc-item{flex-wrap:wrap}
  .foc-ops{width:100%;justify-content:flex-end}
  .risk-tags{display:none}
}
/* v150：本周 vs 上周 */
.wk-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.wk-cell{padding:8px;border:1px solid var(--border);border-radius:var(--r-sm);text-align:center}
.wk-cur{font-size:var(--fs-lg);font-weight:600;margin:2px 0}
.wk-up{color:#16a34a}
.wk-down{color:#dc2626}
@media (max-width:820px){
  .wk-grid{grid-template-columns:repeat(2,1fr)}
}

/* ===== v155 头部瘦身：KPI 指标条 + 折叠块（公司分析页与客户详情分析页共用） =====
   目的：把原「6 张统计大卡(≈210px) + 页签条(≈50px)」压成一行 ≈38px，首屏让给表格。
   数字同时也是视图入口（data-av），disabled 的那项（均分）只作展示不可点。 */
.an-kpi-bar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;background:var(--bg-soft);border:1px solid var(--border);border-radius:var(--r-sm);padding:4px 6px}
.an-kpi{display:inline-flex;align-items:baseline;gap:6px;padding:5px 11px;border:1px solid transparent;border-radius:8px;background:transparent;font:inherit;color:var(--text);cursor:pointer;line-height:1.2}
.an-kpi:hover{background:#fff;border-color:var(--border)}
.an-kpi.active{background:#fff;border-color:var(--primary);box-shadow:0 1px 3px rgba(15,23,42,.08)}
.an-kpi.active .an-kpi-l{color:var(--primary)}
.an-kpi[disabled]{cursor:default;opacity:.9}
.an-kpi[disabled]:hover{background:transparent;border-color:transparent}
.an-kpi-l{font-size:12px;color:var(--muted)}
.an-kpi b{font-size:15px;font-weight:700}
.an-kpi b.t-red{color:var(--red)}
.an-kpi b.t-green{color:var(--green)}
.an-kpi b.t-amber{color:#b45309}
.an-kpi i{font-size:12px;font-style:normal;color:var(--muted)}
.an-gd{width:20px;height:20px;border-radius:6px;color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.an-fold{padding:0;overflow:hidden}
.an-fold > details > summary{cursor:pointer;list-style:none;padding:11px 16px;display:flex;align-items:center;gap:10px;font-size:13px}
.an-fold > details > summary::-webkit-details-marker{display:none}
.an-fold > details > summary::after{content:"▾";margin-left:auto;color:var(--muted);font-size:12px;transition:transform .15s}
.an-fold > details[open] > summary::after{transform:rotate(180deg)}
.an-fold > details[open] > summary{border-bottom:1px solid var(--border);background:var(--bg-soft)}
.an-fold-body{padding:10px 16px 12px}
.ana-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}
@media (max-width:900px){
  .ana-two{grid-template-columns:1fr}
}

/* ---------- v156：B 组「商机适配度」---------- */
/* 维度明细列默认收起：表格默认 7 列（客户 / 业务线 / 负责人 / 经营分 / 适配分 / 类型 / 风险），
   点「维度明细」才展开 A 组 6 + B 组 4 = 10 列。首屏先回答「今天该管谁」，细节按需展开。 */
.tbl .an-dimcol{display:none}
.tbl.show-dims .an-dimcol{display:table-cell}
.tbl.show-dims .an-fitcol{background:#f5f9ff}
.an-quad{display:inline-block;padding:2px 9px;border-radius:999px;color:#fff;font-size:12px;font-weight:600;white-space:nowrap}
/* 双分对照卡：左侧色条按象限着色，一眼分清「好客户没经营」与「努力了但客户不匹配」 */
.ana-dual{margin:10px 0 0;padding:10px 12px;border-radius:var(--r-sm);background:var(--bg-soft);border:1px solid var(--border);border-left:3px solid #94a3b8}
.ana-dual.q-neglect{border-left-color:#2563eb}
.ana-dual.q-mismatch{border-left-color:#f59e0b}
.ana-dual.q-star{border-left-color:#059669}
.ana-dual-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ana-dual-i{font-size:13px;color:var(--text)}
.ana-dual-i b{font-size:20px;font-weight:800;margin:0 3px}
.ana-dual-i i{font-style:normal;font-size:12px;font-weight:700;color:#fff;padding:1px 6px;border-radius:4px;background:#94a3b8;margin-left:2px}
.ana-dual-x{color:var(--muted);font-size:13px}
.ana-dual-t{margin-top:6px;font-size:12px;line-height:1.6;color:var(--muted)}
.an-est{font-style:normal;font-size:11px;color:#b45309;background:#fef3c7;border-radius:4px;padding:0 4px;margin-left:4px}

/* ---------- v157：行动清单 + 行业分布 ---------- */
/* 两块都用 v155 的 .an-fold 折叠卡承载：头部只多两条 42px 的折叠条，
   绝不能往 KPI 条里加项（v155/v156 的渲染探针都断言它横排 h<=46，加项会换行撑回大卡） */
.an-act-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.an-act-col{min-width:0}
.an-act-h{display:flex;align-items:center;gap:8px;margin-bottom:3px;flex-wrap:wrap}
.an-act-h b{font-size:13px}
.an-act-h .btn{margin-left:auto;flex:none}
.an-act-rule{font-size:12px;color:var(--muted);margin-bottom:7px;line-height:1.5}
.an-act-row{padding:7px 0;border-top:1px dashed var(--border)}
.an-act-row:first-child{border-top:none;padding-top:2px}
.an-act-row .an-act-nm{font-weight:600;color:var(--primary);font-size:13px}
.an-act-row .an-act-co{font-size:12px;color:var(--muted);margin-left:6px}
.an-act-row .an-act-why{font-size:12px;color:var(--muted);line-height:1.55;margin-top:2px}
/* 清单视图提示条：清单比 KPI 的象限口径更严（多一层「长期无进展」），
   必须把口径摊在表格上方，否则「待攻坚 9」和「优先攻坚 3」会让人以为其中一个是 bug */
.an-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f8fafc;border:1px solid var(--border);border-left:3px solid var(--primary);border-radius:var(--r-sm);padding:8px 12px;margin-bottom:10px;font-size:12px;line-height:1.5}
.an-note b{font-size:13px}
.an-note .btn{margin-left:auto;flex:none}
.an-ind-row{display:grid;grid-template-columns:150px 1fr 48px 46px auto;align-items:center;gap:10px;padding:4px 0}
.an-ind-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.an-ind-track{height:16px;background:#f1f5f9;border-radius:4px;overflow:hidden}
.an-ind-bar{display:block;height:100%;background:#94a3b8;border-radius:4px;transition:width .2s}
.an-ind-strong{background:#059669}
.an-ind-weak{background:#f59e0b}
.an-ind-low{background:#ef4444}
.an-ind-unknown{background:#cbd5e1}
.an-ind-num{font-size:13px;font-weight:700;text-align:right}
.an-ind-pct{font-size:12px;text-align:right}
.an-ind-tag{text-align:right;white-space:nowrap}
@media (max-width: 900px) { .an-act-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .an-ind-row { grid-template-columns: 96px 1fr 34px auto; } .an-ind-pct { display: none; } }
/* ===== v160：客户资料库（客户详情页「资料档案」Tab） ===== */
.doc-done{border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px;margin-bottom:12px;background:#f8fafc}
.doc-done-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.doc-dot{font-size:12px;padding:2px 10px;border-radius:20px;border:1px solid var(--border);background:#fff;color:var(--muted)}
.doc-dot-on{color:#059669;border-color:#a7f3d0;background:#ecfdf5;font-weight:600}
.doc-dot-off{color:#b45309;border-color:#fde68a;background:#fffbeb;font-weight:600}
.doc-dot-na{background:#f1f5f9;border-style:dashed}
.doc-cat{border:1px solid var(--border);border-radius:var(--r-sm);margin-bottom:10px;overflow:hidden}
.doc-cat-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 12px;background:#f8fafc;border-bottom:1px solid var(--border)}
.doc-cat-name{font-weight:700;font-size:13px}
.doc-cat-hint{font-size:12px;flex:1;min-width:120px}
.doc-list{display:flex;flex-direction:column}
.doc-item{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--border)}
.doc-item:last-child{border-bottom:none}
.doc-main{flex:1;min-width:200px}
.doc-name{font-size:13px;font-weight:600;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.doc-name a{color:var(--primary);text-decoration:none}
.doc-name a:hover{text-decoration:underline}
.doc-meta{font-size:12px;margin-top:3px;line-height:1.5}
.doc-tags{margin-top:4px;display:flex;gap:6px;flex-wrap:wrap}
.doc-exp{font-size:11px;padding:1px 8px;border-radius:20px;border:1px solid transparent;display:inline-block}
.exp-over{color:#b91c1c;background:#fef2f2;border-color:#fecaca;font-weight:600}
.exp-soon{color:#b45309;background:#fffbeb;border-color:#fde68a;font-weight:600}
.exp-ok{color:var(--muted);background:#f8fafc;border-color:var(--border)}
.doc-ops{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.doc-empty{font-size:12px;color:var(--muted);padding:10px 12px}
.doc-ver{width:100%;border-top:1px dashed var(--border);margin-top:8px;padding-top:6px}
.doc-ver-row{display:flex;align-items:center;gap:8px;font-size:12px;padding:3px 0;flex-wrap:wrap}
.doc-ver-row a{color:var(--primary);text-decoration:none}
.doc-ver-tag{font-size:11px;background:#eef2ff;color:#4338ca;border-radius:4px;padding:1px 6px;font-weight:600}
.doc-tip{font-size:12px;line-height:1.6;background:#f8fafc;border:1px dashed var(--border);border-radius:var(--r-sm);padding:8px 10px;margin-top:8px}
.doc-fixed{font-size:13px;padding:7px 0;color:var(--muted)}
@media (max-width:560px){.doc-item{align-items:stretch}.doc-ops{width:100%}}

/* ===== v161：资料预览层 =====
   层级走 --z-preview（要盖过抽屉 50 / 移动端侧栏 60 / 模态 90）。
   移动端不套圆角与留白：PDF 和图片在窄屏上寸土寸金。 */
.dp-mask { position: fixed; inset: 0; background: rgba(15,23,42,.72); display: none; align-items: center; justify-content: center; z-index: var(--z-preview); padding: var(--sp-3); }
.dp-mask.show { display: flex; }
.dp-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-lg); width: 100%; max-width: 1080px; height: 100%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.dp-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); flex: none; }
.dp-title-wrap { flex: 1; min-width: 0; }
.dp-title { font-size: var(--fs-lg); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-sub { font-size: var(--fs-xs); margin-top: var(--sp-1); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-x { border: 0; background: none; font-size: var(--fs-lg); line-height: 1; padding: var(--sp-1) var(--sp-2); cursor: pointer; color: var(--muted); border-radius: var(--r-sm); }
.dp-x:hover { background: var(--hover-bg); color: var(--text); }
.dp-body { flex: 1; min-height: 0; overflow: auto; background: var(--bg); display: flex; flex-direction: column; }
.dp-center { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: var(--sp-3); }
.dp-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.dp-img-full { max-width: none; max-height: none; cursor: zoom-out; }
.dp-frame { flex: 1; min-height: 420px; width: 100%; border: 0; display: block; background: var(--card); }
.dp-video { max-width: 100%; max-height: 100%; }
.dp-mobile-tip { font-size: var(--fs-xs); padding: var(--sp-2) var(--sp-3); color: var(--muted); background: var(--card); border-top: 1px solid var(--border); }
.dp-text { margin: 0; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-xs); line-height: 1.7; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); }
.dp-unsupported { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-5) var(--sp-4); text-align: center; }
.dp-uns-icon { font-size: 44px; line-height: 1; }
.dp-uns-name { font-size: var(--fs-lg); font-weight: 600; color: var(--text); word-break: break-all; }
.dp-uns-msg { font-size: var(--fs-sm); color: var(--muted); max-width: 460px; line-height: 1.7; }
.dp-uns-meta { font-size: var(--fs-xs); color: var(--muted); }
.dp-unsupported .btn { margin-top: var(--sp-2); }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); flex: none; flex-wrap: wrap; }
.dp-note { font-size: var(--fs-xs); flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-actions { display: flex; gap: var(--sp-2); flex: none; }
/* 按钮里混了 <a>（下载/新窗口打开是链接不是按钮）：<a> 默认 inline，不加这两行会与相邻 <button> 错位 */
.dp-actions a.btn, .doc-ops a.btn { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width:720px){
  .dp-mask { padding: 0; }
  .dp-card { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .dp-frame { min-height: 60vh; }
  .dp-foot { padding: var(--sp-2) var(--sp-3); }
  .dp-note { white-space: normal; }
}
