/* GEO 销售 CRM 样式 —— 层次靠背景深浅，不靠边框线 */
:root {
  --bg-page: #F5F6F8;
  --bg-surface: #FFFFFF;
  --bg-subtle: #FAFBFC;
  --bg-sunken: #F2F4F7;
  --border: #E8EAED;
  --border-strong: #D8DDE5;
  --t1: #1A1D21;
  --t2: #5F6672;
  --t3: #98A0AC;
  --brand: #185FA5;
  --brand-bg: #E6F1FB;
  --brand-d: #134d87;
  --red: #A32D2D;
  --amber: #854F0B;
  --green: #0F6E56;
  --r: 8px;
  --r-sm: 6px;
}

* { box-sizing: border-box; }

/* 滚动条统一变窄 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--t1);
  font: 13px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--t1);
}
/* 输入控件聚焦：品牌色边框 + 淡光晕 */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
}

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 36px;
  width: 340px;
}
.login-card h1 { font-size: 19px; font-weight: 500; margin: 0 0 4px; }
.login-card .sub { color: var(--t3); font-size: 12px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--t3); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--bg-surface);
}
.btn {
  border: 1px solid var(--border-strong); background: var(--bg-surface);
  border-radius: var(--r-sm); padding: 5px 14px; cursor: pointer;
}
.btn:hover { background: var(--bg-sunken); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .10); }
.btn.primary:hover { background: var(--brand-d); }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.btn.full { width: 100%; padding: 8px; margin-top: 6px; }
.err { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 8px; }
.hint { color: var(--t3); font-size: 12px; margin-top: 14px; line-height: 1.8; }

/* 强制改密页的说明块与规则提示。复用 .login-card 的外壳，
   但用 --amber 系配色区别于「登录」——让人一眼看出这页不是可以随手关掉的登录页。 */
.force-note {
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 34%, transparent);
  border-left: 3px solid var(--amber);
  border-radius: var(--r-sm);
  color: var(--t2); padding: 9px 12px; margin-bottom: 16px;
  font-size: 12px; line-height: 1.7;
}
.pw-rule { color: var(--t3); font-size: 12px; margin: -4px 0 10px; line-height: 1.6; }

/* ---------- 骨架 ---------- */
.shell { display: grid; grid-template-columns: 188px 1fr; min-height: 100vh; }
.nav { background: var(--bg-subtle); border-right: 1px solid var(--border); padding: 16px 0; }
.nav .brand {
  margin: 0 12px 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--brand-bg), var(--bg-sunken));
  border: 1px solid var(--border);
}
.nav .brand-logo {
  width: 32px; height: 32px; object-fit: contain; flex: none;
  border-radius: 7px; padding: 2px;
  background: var(--bg-surface);
}
.nav .brand-text { font-weight: 600; font-size: 15px; color: var(--t1); letter-spacing: .02em; }
.nav .it {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; color: var(--t2);
  cursor: pointer; font-size: 14px; transition: background .12s, color .12s;
  position: relative;
}
/* 未选中项 hover 时左侧浮出细色条（绝对定位，不占布局） */
.nav .it::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; border-radius: 0 2px 2px 0;
  background: var(--brand); opacity: .45; transition: height .15s ease;
}
.nav .it:hover::before { height: 18px; }
.nav .it.on::before { height: 0; }
.nav .it:hover { background: var(--bg-surface); }
.nav .it.on {
  background: var(--bg-surface); box-shadow: inset 3px 0 0 var(--brand);
  color: var(--brand); font-weight: 600;
}
/* 选中项图标用 box-shadow 扩展出底色块，不改变布局尺寸 */
.nav .it.on .nav-icon {
  border-radius: 5px; background: var(--brand-bg);
  box-shadow: 0 0 0 3px var(--brand-bg);
}
.nav .it.dim { color: var(--t3); margin-top: 16px; }
.nav .ver { padding: 16px 16px 0; color: var(--t3); font-size: 11px; }
.nav-icon { display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; }
.nav-icon svg { width: 100%; height: 100%; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 22px; background: var(--bg-surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}
.topbar .crumbs { color: var(--t3); font-size: 12px; }
.topbar .right { color: var(--t3); font-size: 12px; }
.topbar .right b { color: var(--t1); font-weight: 500; }

.content { padding: 20px 22px 40px; }

/* ---------- 层次基元 ---------- */
.page-title {
  font-size: 17px; font-weight: 600; position: relative; padding-left: 11px;
}
/* 标题左侧品牌渐变色条，增加视觉锚点 */
.page-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-d));
}
.page-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }

.card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card.sub { background: var(--bg-subtle); }

.group-label {
  font-size: 12px; color: var(--t2); font-weight: 600; margin: 22px 0 8px; letter-spacing: .02em;
  position: relative; padding-left: 11px;
}
/* 分组标题前的小圆点 */
.group-label::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .6;
}
.group-label:first-child { margin-top: 0; }

.metric {
  background: var(--bg-sunken); border-radius: var(--r-sm); padding: 13px 15px;
  position: relative; overflow: hidden;
}
/* 指标卡左侧品牌色条（绝对定位，不影响 flex 布局） */
.metric::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand); border-radius: 3px 0 0 3px;
}
.metric .k { font-size: 11px; color: var(--t3); }
.metric .v { font-size: 20px; font-weight: 600; margin-top: 1px; }
.metric .d { font-size: 11px; color: var(--t3); margin-top: 1px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 结果层 / 过程层：**每个模块 800px 宽、上下排列**（2026-09-15 第二轮，用户要求「改到 800」）。
   800px 指的是**模块本身**（分组标题 + 4 张卡一起），所以每张卡 = (800 − 3×12) / 4 ≈ 191px，
   比并排时的 231.5px 明显收窄 —— 这才是「把卡片压窄」。
   注意：800px 比半行（968÷2 = 484）宽，**两块不可能再并排**，所以这里改回上下排列、每块一行 4 张卡。
   左对齐、右侧留白（不居中）：页面标题和其它模块标题都是左对齐的，居中会让两层的标题缩进、和标题对不齐。 */
.dash-row2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.dash-row2-col { max-width: 800px; }
.dash-row2 .grid4 { grid-template-columns: repeat(4, 1fr); }
/* 窄屏（内容区撑不到 800px）退回一行 2 张，免得卡片挤成一条 */
@media (max-width: 1000px) {
  .dash-row2-col { max-width: none; }
  .dash-row2 .grid4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 表格 ---------- */
.dtable { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--bg-surface); }
.dtable th {
	background: var(--bg-subtle); color: var(--t3); font-weight: 400; font-size: 12px;
	padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.dtable td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.dtable .act a { color: var(--t3); cursor: pointer; text-decoration: none; }
.dtable .act a:hover { color: var(--brand); text-decoration: underline; }
/* 操作列的删除链接必须与「编辑」区分开，否则用户看不出哪个是破坏性操作。
   注意要连 :hover 一起覆盖：上面那条同权重且在后，不写就会被它盖掉。 */
.dtable .act a.danger { color: var(--red); }
.dtable .act a.danger:hover { color: var(--red); text-decoration: underline; }
.dtable tr:hover td { background: var(--bg-subtle); }
/* 行 hover 时首列浮出品牌色条（inset 阴影，不影响列宽） */
.dtable tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.dtable .aux { color: var(--t3); font-size: 12px; }
.dtable .act { color: var(--t3); font-size: 12px; white-space: nowrap; }

/* 名称置顶行：浅琥珀底色 + 左侧金条——「便签纸」感。
   优先级要高于通用 tr:hover（避免 hover 时反而把底色盖回灰）；
   也避免压住选中行（.dtable tr.checked td）已有的样式，
   所以这里只覆盖「未选中 + 已置顶」这一组合。 */
.dtable tr.pinned td { background: #FFF7E6; }
.dtable tr.pinned td:first-child { box-shadow: inset 3px 0 0 #D97706; }
.dtable tr.pinned:hover td { background: #FFEFC9; }
.dtable tr.pinned:hover td:first-child { box-shadow: inset 3px 0 0 #B5740B; }
/* 置顶行的公司名前缀图标（📌）——颜色调到与金条同色系 */
.dtable .pin-mark { color: #D97706; font-size: 13px; }
/* 操作列：置顶按钮颜色与未置顶按钮颜色错开 */
.dtable .act a.pin-off { color: var(--t3); }
.dtable .act a.pin-off:hover { color: #D97706; text-decoration: underline; }
.dtable .act a.pin-on { color: #D97706; font-weight: 500; }
.dtable .act a.pin-on:hover { color: #B5740B; text-decoration: underline; }
.dtable .act .pin-on-mute { color: #D97706; font-size: 12px; }

/* 表格列配置：拖拽排序 + 列宽缩放 */
.dtable.colcfg { table-layout: fixed; }
.dtable.colcfg th { position: relative; user-select: none; }
.dtable.colcfg th[draggable="true"] { cursor: grab; }
.dtable.colcfg th[draggable="true"]:active { cursor: grabbing; }
.dtable.colcfg th.dragging { opacity: .4; }
/* 列变窄时内容不换行，超出用省略号（colcfg 为 fixed 布局 + colgroup 固定列宽） */
.dtable.colcfg th, .dtable.colcfg td {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dtable.colcfg .col-resize {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
  cursor: col-resize; z-index: 2;
}
.dtable.colcfg .col-resize:hover { background: var(--brand); opacity: .5; }

.pager {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; font-size: 12px; color: var(--t3);
}
.pager select, .pager input { border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 2px 6px; }
.pager .sum { margin-left: auto; color: var(--t2); }
.pager a { color: var(--t2); cursor: pointer; padding: 0 4px; }
.pager a.on { color: var(--brand); font-weight: 500; }
.pager a.disabled { color: var(--t3); cursor: not-allowed; opacity: .6; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px; line-height: 18px; font-weight: 500; }
.tag.red { background: #FCEBEB; color: #A32D2D; }
.tag.amber { background: #FAEEDA; color: #854F0B; }
.tag.gray { background: #F1EFE8; color: #5F5E5A; }
.tag.green { background: #E1F5EE; color: #0F6E56; }
.tag.blue { background: #E6F1FB; color: #185FA5; }

/* 悬浮提示（意向分级定义等，data-tip 触发） */
.ui-tip {
  position: fixed; z-index: 200; display: none; max-width: 320px;
  padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.6;
  color: var(--t1); background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.14); pointer-events: none;
}

/* 意向内联下拉（列表/详情可直接选中变更） */
.intent-sel {
  display: inline-block; padding: 1px 6px; border-radius: 20px; font-size: 11px; line-height: 18px;
  border: 1px solid transparent; cursor: pointer; background: var(--bg-surface); vertical-align: middle;
}
.intent-sel.red { background: #FCEBEB; color: #A32D2D; border-color: #F2C9C9; }
.intent-sel.amber { background: #FAEEDA; color: #854F0B; border-color: #F0D9AC; }
.intent-sel.gray { background: #F1EFE8; color: #5F5E5A; border-color: #E2DFD6; }
.decision-tag { font-size: 10px; padding: 0 4px; line-height: 14px; vertical-align: middle; }

/* ---------- 筛选 ---------- */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg span { padding: 4px 14px; font-size: 12px; color: var(--t2); border-right: 1px solid var(--border); cursor: pointer; }
.seg span:last-child { border-right: 0; }
.seg span.on { background: var(--brand-bg); color: var(--brand); font-weight: 500; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.toolbar input, .toolbar select {
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 4px 9px; background: var(--bg-surface);
}

/* ---------- 弹窗 ---------- */
.mask {
  position: absolute; inset: 0; background: rgba(20, 24, 31, .35);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 60px; overflow: auto; z-index: 50;
}
.mask-inner {
  background: var(--bg-surface); border-radius: var(--r); width: 560px;
  max-width: calc(100vw - 40px); box-shadow: 0 8px 28px rgba(16, 24, 40, .16);
}
.mask-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.mask-head b { font-weight: 500; font-size: 14px; }
.mask-body { padding: 16px 18px; }
/* 删除类弹窗里的警示块（不可撤销提示、护栏拦截原因） */
.danger-note {
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 32%, transparent);
  border-left: 3px solid var(--red);
  border-radius: var(--r-sm);
  color: var(--red);
  padding: 9px 12px; margin-bottom: 12px;
  font-size: 13px; line-height: 1.7;
}
.danger-note ul { margin: 4px 0 0; padding-left: 18px; }
.danger-note li { color: var(--t2); }
.mask-foot { padding: 12px 18px; border-top: 1px solid var(--border); text-align: right; }
.mask-foot .btn { margin-left: 8px; }

.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form2 .full { grid-column: 1 / -1; }
.form2 label { display: block; font-size: 12px; color: var(--t3); margin-bottom: 4px; }
.form2 input, .form2 select, .form2 textarea {
  width: 100%; padding: 5px 9px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--bg-surface);
}
.form2 textarea { min-height: 68px; resize: vertical; }

/* 新建商机：客户可搜索下拉 */
.cust-list { max-height: 210px; overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--r-sm); margin-top: 4px; background: var(--bg-surface); }
.cust-item { padding: 7px 10px; cursor: pointer; font-size: 13px; }
.cust-item:hover { background: var(--brand-bg); color: var(--brand); }
.cust-empty { padding: 8px 10px; font-size: 12px; color: var(--t3); }
.cust-sel { display: none; margin-top: 4px; font-size: 12px; color: var(--brand); }

/* ---------- 提示 ---------- */
.toast-box { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; }
.toast {
  background: var(--t1); color: #fff; padding: 8px 16px; border-radius: var(--r-sm);
  margin-bottom: 8px; font-size: 12.5px; opacity: .96;
}
.toast.ok { background: #0F6E56; }
.toast.err { background: #A32D2D; }

.empty { color: var(--t3); text-align: center; padding: 40px 0; font-size: 12.5px; }
/* 空状态：圆角卡片 + 三行「文本线」图形，弱化空白感 */
.empty::before {
  content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 12px; border: 1px solid var(--border-strong);
  background:
    linear-gradient(var(--t3), var(--t3)) 13px 15px / 20px 2px no-repeat,
    linear-gradient(var(--t3), var(--t3)) 13px 22px / 14px 2px no-repeat,
    linear-gradient(var(--t3), var(--t3)) 13px 29px / 17px 2px no-repeat,
    linear-gradient(135deg, var(--brand-bg), var(--bg-sunken));
}
/* 固定高度小模块内、以及直接用于 td 的空态，不显示装饰 */
.detail-cols .mod-fixed > .empty::before,
td.empty::before { display: none; }

.kv { display: grid; grid-template-columns: 80px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv dt { color: var(--t3); }
.kv dd { margin: 0; }

.tl { position: relative; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl .node { position: relative; margin-bottom: 14px; }
.tl .node::before {
  content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--border-strong);
}
.tl .node.hot::before { border-color: var(--brand); }
.tl .h { font-size: 12px; color: var(--t3); }
.tl .c { font-size: 12.5px; margin-top: 1px; }

/* 商机漏斗：靠宽度表达数量，不靠字号 */
/* ---------- 商机漏斗（漏斗图形，2026-09-15 重做） ----------
   每行 = 一个梯形色带（clip-path 由 JS 按到达口径算上/下边宽），叠起来是一条连续漏斗；
   右侧三列右对齐成表。`.fn-row` 仍是「每个阶段一个」的元素，验证脚本按它数 7 个阶段。 */
.fn-card { padding: 14px 18px 13px; }
.fn-head {
  display: grid; grid-template-columns: 1fr 62px 106px 54px; gap: 12px;
  padding: 0 0 8px; font-size: 11px; color: var(--t3); letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
}
.fn-head-l { padding-left: 2px; }
.fn-h-num, .fn-h-amt, .fn-h-prob { text-align: right; }

.funnel { display: flex; flex-direction: column; }
.fn-row {
  display: grid; grid-template-columns: 1fr 62px 106px 54px; gap: 12px; align-items: center;
}
.fn-band-wrap { height: 38px; display: flex; justify-content: center; }
.fn-band {
  width: 100%; height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px;
  color: #fff; font-size: 12.5px; line-height: 1;
  /* 用「白色高光 + 黑色暗角」两段叠加在 --brand 上，这样 蓝/紫/青/暗夜 各套主题都能跟着变 */
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .08)), var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: filter .15s ease;
}
.fn-band .fn-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, .22);
}
.fn-band .fn-name { font-weight: 500; white-space: nowrap; }
.fn-row.win .fn-band {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .08)), var(--green);
}
.fn-row.zero .fn-band {
  background: var(--bg-sunken); color: var(--t3); box-shadow: none;
}
.fn-row.zero .fn-band .fn-tag { background: rgba(0, 0, 0, .05); }
.fn-row:hover .fn-band { filter: brightness(1.07); }

.fn-num { text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fn-amt { text-align: right; font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; }
.fn-prob { text-align: right; font-size: 12px; color: var(--t3); font-variant-numeric: tabular-nums; }
.fn-note { margin-top: 10px; font-size: 11.5px; color: var(--t3); }

/* 到期提醒 */
.exp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 20px;
            background: var(--bg-sunken); font-size: 12px; color: var(--t2); }
.exp-chip.warn { background: #FAEEDA; color: var(--amber); }
.exp-chip.hot { background: #FCEBEB; color: var(--red); }

/* 外呼：点号码调取手机拨号组件（沿用快聘 CRM 的 tel: 链接模式） */
.tel { color: var(--brand); cursor: pointer; text-decoration: none; border-bottom: 1px dashed var(--brand); }
.tel:hover { opacity: .8; }

/* ---------- 客户详情页新布局：紧凑、弱标签、去重复、去死白 ---------- */
.detail-head { margin-bottom: 12px; }
.detail-head .meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 4px; font-size: 12px; color: var(--t2);
}
.detail-head .meta .dot { color: var(--border-strong); }
.detail-head .meta a { color: var(--brand); text-decoration: none; }
.detail-head .meta a:hover { text-decoration: underline; }

.tag-edit {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--brand-bg); color: var(--brand); line-height: 18px; cursor: pointer;
}
.tag-edit:hover { background: var(--brand); color: #fff; }
.tag-edit-input {
  font-size: 12px; padding: 2px 6px; border: 1px solid var(--brand);
  border-radius: 4px; width: 160px; line-height: 18px;
}

.info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px;
}
.info-item .k { font-size: 11px; color: var(--t3); margin-bottom: 1px; }
.info-item .v { font-size: 13px; color: var(--t1); word-break: break-all; }
.info-item .v a { color: var(--brand); text-decoration: none; }

.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.left-stack, .right-stack { display: flex; flex-direction: column; }

/* 固定高度的模块卡：高度固定约 3 行，内容超过内部滚动，空态垂直居中 */
.mod-fixed { height: 176px; overflow: auto; }
.mod-fixed .dtable { margin-bottom: 0; }
.mod-fixed thead th { position: sticky; top: 0; z-index: 1; box-shadow: 0 1px 0 var(--border); }
.detail-cols .mod-fixed > .empty { height: 100%; display: flex; align-items: center; justify-content: center; padding: 0; }

.detail-cols .card { padding: 12px 14px; }
.detail-cols .group-label { margin: 14px 0 6px; }
.detail-cols .group-label:first-child { margin-top: 0; }
.detail-cols .empty { padding: 18px 0; }

/* 主联系人：行首单选圆点 */
.radio {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--bg-surface);
  cursor: pointer; vertical-align: middle;
}
.radio.on {
  border-color: var(--brand); background: var(--brand);
  box-shadow: inset 0 0 0 3px var(--bg-surface);
}
.contact-table td:first-child, .contact-table th:first-child { padding-left: 8px; padding-right: 0; text-align: center; }
.contact-table th:first-child .btn.sm,
.contact-table th:first-child .btn {
  background: var(--brand-bg); border-color: var(--brand-bg); color: var(--brand);
  font-size: 13px; line-height: 16px; padding: 0 5px; border-radius: 4px;
}
.contact-table th:first-child .btn.sm:hover,
.contact-table th:first-child .btn:hover {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.contact-table td:last-child .btn.sm,
.contact-table td:last-child .btn,
.opp-table td:last-child .btn.sm,
.opp-table td:last-child .btn,
.order-table td:last-child .btn.sm,
.order-table td:last-child .btn {
  background: transparent; border: 0; color: var(--brand);
  font-size: 11px; padding: 0; line-height: 1; white-space: nowrap;
}
.contact-table td.empty { border-bottom: 0; }

.contact-table td:last-child .btn.sm:hover,
.contact-table td:last-child .btn:hover,
.opp-table td:last-child .btn.sm:hover,
.opp-table td:last-child .btn:hover,
.order-table td:last-child .btn.sm:hover,
.order-table td:last-child .btn:hover {
  background: transparent; color: var(--brand); text-decoration: underline;
}

/* 跟进区：输入与历史合并，减少留白 */
.right-stack .follow-card { flex: 1; min-height: 0; }
.follow-card { padding: 12px 14px; display: flex; flex-direction: column; }
.follow-form { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); flex: none; }
.follow-form textarea[name="f_content"] { min-height: 36px; }
.follow-form .btn.primary { padding: 5px 16px; }
.follow-card .tl { flex: 1; min-height: 0; overflow: auto; padding-top: 4px; }

/* 客户详情页右侧时间线与左侧总高度对齐，内容超出时内部滚动；呼叫中心沿用 flex 等高规则 */
.cc-compact .detail-cols .right-stack .follow-card .tl { max-height: none; overflow: auto; }

/* 待呼队列：左侧公司名列表 + 右侧客户详情 */
#cqLeft { border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-surface); padding: 6px; }
.cq-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: background .12s, border-color .12s;
}
.cq-item:hover { background: var(--brand-bg); }
.cq-item.on { background: var(--brand-bg); border-color: var(--brand); }
.cq-main { min-width: 0; }
.cq-name { font-size: 13px; font-weight: 500; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-item.on .cq-name { color: var(--brand); }
.cq-sub { font-size: 11px; color: var(--t3); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.cq-call { flex: none; padding: 3px 10px; }

/* 客户列表：首列复选框 + 表头全选 */
th.selcol, td.selcol { text-align: center; padding-left: 0; padding-right: 0; width: 36px; }
th.selcol { line-height: 1; }
th.selcol .sel-all, td.selcol .row-sel { margin: 0; cursor: pointer; vertical-align: middle; }

/* 客户列表批量操作条：按钮在品牌色背景上，显式指定样式避免浏览器默认/状态差异 */
#selbar .btn { background: var(--bg-surface); border-color: var(--brand); color: var(--brand); }
#selbar .btn:hover { background: var(--brand-bg); }
#selbar .btn.primary { background: var(--brand); color: #fff; }
#selbar .btn.primary:hover { background: var(--brand-d); }

/* 客户列表：仅表体滚动，表头及以上固定；overscroll 防止滚动穿透到页面 */
#tbl.tbl-scroll > div:first-child {
  max-height: calc(100vh - 300px);
  min-height: 240px;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
#tbl.tbl-scroll thead th {
  position: sticky; top: 0; z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}

/* 呼叫中心：顶部收紧、内容紧凑（仅作用本页） */
.cc-compact .page-title { font-size: 16px; }
.cc-compact .page-sub { margin-top: 1px; }
.cc-compact .group-label { margin: 5px 0 3px; font-size: 11px; }
.cc-compact #planDate {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  background: var(--bg-surface);
}
.cc-compact .metric {
  padding: 2px 6px;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
}
.cc-compact .metric .k { flex: none; font-size: 11px; }
.cc-compact .metric .v { font-size: 16px; margin: 0; }
.cc-compact .metric .d { font-size: 11px; margin: 0 0 0 4px; }
.cc-compact .grid4 { grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px; }

/* 呼叫中心详情：#queue 高度以内容（较高一列）为准，但不超过视口上限；
   左右两栏自动等高拉伸，内容超长时各自内部滚动，底部始终对齐 */
.cc-compact #queue { align-items: stretch; max-height: min(calc(100vh - 180px), 760px); overflow: hidden; }
.cc-compact #cqLeft, .cc-compact #cqRight {
  min-height: 0;
  overflow: auto;
}
.cc-compact #cqRight { display: flex; flex-direction: column; }
.cc-compact .detail-cols { align-items: stretch; flex: 1; min-height: 0; }
.cc-compact .left-stack, .cc-compact .right-stack { min-height: 0; }
.cc-compact .mod-fixed { height: 180px; flex: none; overflow: auto; }
.cc-compact .right-stack .follow-card { flex: 1; min-height: 0; }
.cc-compact .follow-card .tl { flex: 1; min-height: 0; max-height: none; overflow: auto; }

/* ===================== 主题预设 =====================
   在 <html data-theme="..."> 上切换；省略 data-theme 时回退到 :root（默认蓝）。
   各主题仅覆盖同样的 CSS 变量，整站自动换肤。 */
[data-theme="green"] {
  --bg-page: #F4F8F4; --bg-surface: #FFFFFF; --bg-subtle: #F7FAF7; --bg-sunken: #EEF3EE;
  --border: #E1E9E1; --border-strong: #CDDBCD;
  --t1: #16241B; --t2: #54685B; --t3: #8DA08F;
  --brand: #137A46; --brand-bg: #E3F4EA; --brand-d: #0F5E36;
  --red: #B0392F; --amber: #855A0B; --green: #137A46;
}
[data-theme="amber"] {
  --bg-page: #FBF7F1; --bg-surface: #FFFFFF; --bg-subtle: #FDFAF5; --bg-sunken: #F6EFE4;
  --border: #ECE3D7; --border-strong: #DBCCB4;
  --t1: #2A1F12; --t2: #6E5C46; --t3: #A8977F;
  --brand: #B5740B; --brand-bg: #FBEFD6; --brand-d: #93600A;
  --red: #B0392F; --amber: #B5740B; --green: #137A46;
}
[data-theme="purple"] {
  --bg-page: #F7F5FB; --bg-surface: #FFFFFF; --bg-subtle: #FAF8FD; --bg-sunken: #EFEBF7;
  --border: #E6E0EF; --border-strong: #D5CBE5;
  --t1: #201A2B; --t2: #5E5270; --t3: #9A90AC;
  --brand: #6B3FA0; --brand-bg: #EFE6FA; --brand-d: #563287;
  --red: #B0392F; --amber: #855A0B; --green: #137A46;
}
[data-theme="teal"] {
  --bg-page: #F2F8F8; --bg-surface: #FFFFFF; --bg-subtle: #F6FBFB; --bg-sunken: #E9F3F3;
  --border: #DDE9E9; --border-strong: #C6DBDB;
  --t1: #132424; --t2: #506464; --t3: #8BA0A0;
  --brand: #0B7A82; --brand-bg: #DEF3F4; --brand-d: #0A6168;
  --red: #B0392F; --amber: #855A0B; --green: #137A46;
}
[data-theme="dark"] {
  --bg-page: #14161A; --bg-surface: #1E2127; --bg-subtle: #23272F; --bg-sunken: #181B20;
  --border: #2C313A; --border-strong: #3A414D;
  --t1: #E8EBF0; --t2: #A8B0BD; --t3: #717A89;
  --brand: #4C9BE0; --brand-bg: #1B2C3D; --brand-d: #3C82C2;
  --red: #E07A7A; --amber: #E0A85A; --green: #4FB38E;
}
/* 暗夜主题下，修正少量硬编码浅色标签/徽标，避免白底刺眼 */
[data-theme="dark"] .tag.red, [data-theme="dark"] .intent-sel.red, [data-theme="dark"] .exp-chip.hot { background: #3A2526; color: #F2A0A0; border-color: #5A3A3B; }
[data-theme="dark"] .tag.amber, [data-theme="dark"] .intent-sel.amber, [data-theme="dark"] .exp-chip.warn { background: #352B1C; color: #E8C088; border-color: #574625; }
[data-theme="dark"] .tag.gray, [data-theme="dark"] .intent-sel.gray { background: #2C3138; color: #B6BEC9; border-color: #3A414D; }
[data-theme="dark"] .tag.green, [data-theme="dark"] .intent-sel.green { background: #1E3329; color: #8FD2B0; border-color: #2F4D3C; }
[data-theme="dark"] .tag.blue { background: #1B2C3D; color: #8FC1EE; border-color: #2E4A66; }

/* ===================== 主题选择弹窗 ===================== */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 2px 0; }
.theme-pick {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; background: var(--bg-surface); transition: border-color .12s, background .12s;
}
.theme-pick:hover { border-color: var(--brand); }
.theme-pick.on { border-color: var(--brand); background: var(--brand-bg); }
.theme-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.12); }
.theme-name { font-size: 13px; color: var(--t1); }

/* ===================== 仪表盘视觉加强（2026-09-15） =====================
   用户要求「仪表盘加强渲染、提升观感、模块更加清晰」。
   全部限定在 #dash-body（= 仪表盘结果层容器，只有本页有）内，
   不改 .card/.metric/.group-label 等全局基元，避免影响客户 / 订单 / 呼叫中心页面。
   颜色一律走主题变量：本仓库有 蓝(默认)/紫/青/暗夜 多套主题，
   品牌色渐变统一用「白色高光 + 黑色暗角」叠在 --brand 上，这样换主题也跟着变。 */

/* 1) 分组标题＝模块分隔条：左侧品牌色条 + 右侧渐隐细线，模块边界一眼可见 */
#dash-body .group-label {
  display: flex; align-items: center; gap: 9px;
  margin: 26px 0 10px; padding-left: 0;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--t1);
}
#dash-body .group-label::before {
  content: ""; position: static; transform: none;
  width: 4px; height: 14px; border-radius: 2px; opacity: 1;
  background: linear-gradient(180deg, var(--brand), var(--brand-d));
}
#dash-body .group-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
#dash-body .group-label:first-child { margin-top: 0; }

/* 2) 卡片：加深层次（靠阴影，不靠更重的边框） */
#dash-body .card {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px -20px rgba(16, 24, 40, .35);
}

/* 3) 指标卡：左侧色条加粗、悬停微浮起、数字等宽不抖 */
#dash-body .metric {
  border: 1px solid var(--border);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
#dash-body .metric::before {
  width: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .08)), var(--brand);
}
#dash-body .metric:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: 0 6px 16px -8px rgba(24, 95, 165, .45);
}
#dash-body .metric .v {
  font-size: 21px; font-weight: 700; letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}

/* 4) 季度目标：细轨道 + 品牌渐变进度 + 百分比胶囊 */
#dash-body .q-card { margin-top: 14px; }
#dash-body .q-top {
  display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px;
}
#dash-body .q-top b { color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
#dash-body .q-pct {
  font-style: normal; margin-left: 10px; font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-bg); padding: 1px 7px; border-radius: 10px;
}
#dash-body .q-track {
  margin-top: 9px; height: 9px; border-radius: 5px; overflow: hidden; background: var(--bg-sunken);
}
#dash-body .q-fill {
  height: 100%; border-radius: 5px; transition: width .3s ease;
  background: linear-gradient(90deg, rgba(255, 255, 255, .3), rgba(0, 0, 0, .06)), var(--brand);
}

/* 5) 业绩趋势：柱子加渐变与悬停，底部补一条横轴基线 */
#dash-body .tv-bars {
  display: flex; align-items: flex-end; gap: 4px; height: 134px;
  overflow-x: auto; padding-bottom: 2px; border-bottom: 1px solid var(--border);
}
#dash-body .tv-col {
  flex: 1; min-width: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
}
#dash-body .tv-bar {
  width: 100%; max-width: 34px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(0, 0, 0, .06)), var(--brand);
  transition: filter .14s ease;
}
/* 空柱用 no-data，**不要叫 .empty** —— 那会和全局空状态类 .empty 撞名，
   继承它的 46px 图标与 40px 内边距（2026-09-15 踩过：趋势图两根空柱变成灰盒子）。 */
#dash-body .tv-bar.no-data { background: var(--bg-sunken); }
#dash-body .tv-col:hover .tv-bar { filter: brightness(1.08); }
#dash-body .tv-lb { font-size: 11px; color: var(--t3); height: 15px; white-space: nowrap; }

/* 6) 表格：表头更清、数字等宽 */
#dash-body .dtable th { font-weight: 600; letter-spacing: .02em; }
#dash-body .dtable td { font-variant-numeric: tabular-nums; }

/* 7) 今日待办：逐条分隔，避免挤成一团 */
#dash-body .todo-card > div { padding: 5px 0; }
#dash-body .todo-card > div + div { border-top: 1px dashed var(--border); }
#dash-body .todo-card a { text-decoration: none; }
#dash-body .todo-card a:hover { text-decoration: underline; }
