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

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #e3e6ea;
  --text: #1f2329;
  --muted: #8a9099;
  --primary: #1e88e5;
  --primary-d: #1565c0;
  --primary-soft: #e8f1fd;
  --danger: #e53935;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

#app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧边栏 ---------- */
#sidebar {
  width: 340px;
  flex: 0 0 340px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-header { padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.side-header h1 { font-size: 18px; }
.side-header .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.panel { padding: 14px 18px; border-bottom: 1px solid var(--border); overflow-y: auto; }
.panel h2 { font-size: 14px; margin-bottom: 10px; color: #333; }

#customer-form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
#customer-form input,
#customer-form select,
#customer-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
#customer-form input:focus,
#customer-form select:focus,
#customer-form textarea:focus { outline: none; border-color: var(--primary); }
#customer-form .row { display: flex; gap: 10px; }
#customer-form .row label { flex: 1; }

.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-primary {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}
.hint { font-size: 12px; color: var(--danger); margin-top: 8px; min-height: 16px; }

/* ---------- 工具栏 / 列表 ---------- */
.toolbar { margin-bottom: 10px; }
#search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.filter-chip.off { opacity: .4; }
.filter-chip .dot { width: 9px; height: 9px; border-radius: 50%; }

.stats { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.customer-list { list-style: none; max-height: 38vh; overflow-y: auto; }
.customer-list li {
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s;
}
.customer-list li:hover { border-color: var(--primary); }
.customer-list .ci-top { display: flex; align-items: center; gap: 7px; }
.customer-list .ci-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.customer-list .ci-name { font-size: 13px; font-weight: 600; flex: 1; }
.customer-list .ci-addr { font-size: 12px; color: var(--muted); margin: 4px 0 0 17px; }
.customer-list .ci-actions { display: none; gap: 6px; margin-top: 6px; margin-left: 17px; }
.customer-list li:hover .ci-actions { display: flex; }
.ci-actions button {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
}
.ci-actions .del { color: var(--danger); border-color: #f3c0bf; }
.empty-tip { font-size: 12px; color: var(--muted); padding: 8px 4px; }

/* ---------- 底部 ---------- */
.side-footer {
  margin-top: auto;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.side-footer .footer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* 启动自动定位开关 */
.switch {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: #555; cursor: pointer; user-select: none;
}
.switch input { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }
.switch:hover { color: var(--primary); }
.btn-mini {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini.danger:hover { border-color: var(--danger); color: var(--danger); }
.import-status { font-size: 11px; color: var(--primary); width: 100%; margin-top: 2px; }

/* ---------- 地图 ---------- */
#map-wrap { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }
.key-warning {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: #fff4e5;
  color: #8a5a00;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid #f0d9b0;
  z-index: 10;
}
.key-warning code { background: #fdeccd; padding: 1px 4px; border-radius: 3px; }

/* 地图加载进度遮罩 */
.map-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(245, 246, 248, 0.85);
  color: var(--muted);
  font-size: 14px;
  z-index: 20;
}
.map-loading::before {
  content: "";
  width: 22px; height: 22px;
  margin-right: 10px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 示例数据提示横幅 */
.demo-banner {
  margin: 8px 12px 0;
  padding: 8px 12px;
  background: #e8f1fd;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  font-size: 12px;
  color: #1f4f80;
  line-height: 1.5;
}
.demo-banner button {
  margin-top: 6px;
  display: block;
  width: 100%;
  border: 1px solid #cfe0f7;
  background: #fff;
  color: #1f4f80;
  border-radius: 6px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 12px;
}

/* 自定义标记 pin */
.amap-pin { width: 28px; height: 36px; cursor: pointer; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.amap-pin svg { display: block; }

/* 信息卡片 */
.info-card { font-size: 13px; line-height: 1.6; min-width: 220px; }
.info-card h3 { font-size: 15px; margin-bottom: 4px; }
.info-card .tag { display: inline-block; font-size: 11px; color: #fff; padding: 1px 7px; border-radius: 10px; margin-bottom: 6px; }
.info-card .kv { color: #555; }
.info-card .kv b { color: #222; font-weight: 600; }

/* 商家（高德 POI）信息卡：与客户卡区分开的冷色调 */
.poi-card .tag.poi-tag { background: #0ea5e9; }
.poi-card h3 { color: #0f172a; }

/* 商家信息卡「一键认领跟进」按钮：品牌主色 + 微动效，与导航按钮区分层级 */
.poi-card .poi-actions { margin-top: 8px; }
.poi-claim-btn {
  width: 100%; padding: 7px 12px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, #1a73e8, #0ea5e9);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 115, 232, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.poi-claim-btn:hover { filter: brightness(1.08); box-shadow: 0 3px 10px rgba(26, 115, 232, .45); }
.poi-claim-btn:active { transform: scale(.97); }
/* 已入池徽标：弱化、不可点，避免重复认领 */
.poi-card .poi-pooled {
  margin-top: 8px; padding: 6px 10px; border-radius: 9px;
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 双击标记后，左侧列表对应行闪一下，方便建立「图 ↔ 列表」的对应关系 */
@keyframes rowFlash {
  0% { background: rgba(26, 115, 232, .16); }
  100% { background: transparent; }
}
#customer-list li.row-flash { animation: rowFlash 1.6s ease-out; border-radius: 10px; }

/* Leaflet 兜底引擎的标记 pin（与高德共用 SVG，去掉默认图标背景） */
.leaflet-pin { background: none; border: none; }
.leaflet-pin .amap-pin { filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.leaflet-popup-content .info-card { margin: 0; }

/* 地图引擎提示条（AMap 不可用时显示） */
.engine-badge {
  position: absolute; top: 10px; left: 10px; z-index: 500;
  background: rgba(27,94,32,.92); color: #fff;
  font-size: 12px; padding: 5px 10px; border-radius: 6px;
  max-width: 70%; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* 客户名称自动补全下拉 */
.autocomplete { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px);
  margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  max-height: 220px; overflow-y: auto; z-index: 60;
}
.ac-item {
  padding: 7px 12px; font-size: 13px; color: var(--text);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-item:hover, .ac-item.active { background: var(--primary-soft); color: var(--primary); }
.ac-main { font-size: 13px; color: var(--text); }
.ac-sub { font-size: 11px; color: #8a8a8a; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item.active .ac-sub { color: var(--primary); }
.poi-label { font-weight: 600; }
.poi-label .autocomplete { margin-top: 4px; font-weight: 400; }

/* 地图搜索框（对齐高德：左侧放大镜、右侧清空、绝对定位结果下拉） */
.poi-wrap { position: relative; margin-top: 4px; font-weight: 400; }
/* 注意：优先级必须高于 #customer-form input（否则会被其 padding:8px 10px 覆盖，导致放大镜压字） */
#customer-form .poi-wrap input {
  width: 100%; box-sizing: border-box;
  padding: 9px 38px 9px 40px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none; background: #fff; color: var(--text);
}
#customer-form .poi-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.poi-ico {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; padding: 0; line-height: 1;
  color: #9aa0a6;
}
.poi-ico:hover { color: var(--primary); }
.poi-ico:active { transform: translateY(-50%) scale(.94); }
.poi-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #e6e6e6; color: #666; font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
}
.poi-clear:hover { background: #d4d4d4; color: #333; }
.poi-wrap .ac-list { top: calc(100% + 4px); }

/* ---------------- 定位 & 导航 ---------------- */
/* 地图右下角定位按钮（对齐高德定位控件） */
.map-tools {
  position: absolute; bottom: 30px; right: 12px; z-index: 480;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;          /* 三个按钮按同一条中轴线严格对齐 */
}
.map-tools > .locate-btn { flex: 0 0 40px; }
.locate-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer; transition: transform .1s, background .15s;
}
.locate-btn:hover { background: var(--primary-soft); }
.locate-btn:active { transform: scale(.92); }
.locate-btn.busy { animation: locspin .9s linear infinite; color: #bbb; }
@keyframes locspin { to { transform: rotate(360deg); } }

/* 3D / 2D 视角切换按钮 */
.view-btn .vb-label { font-size: 13px; font-weight: 700; letter-spacing: .5px; }

/* 指南针按钮：指针始终指向真实北方，地图旋转时反向补偿 */
.compass-btn svg { transition: transform .25s ease; transform-origin: 50% 50%; display: block; }
.compass-btn.rotated { color: #e53935; }

/* 高德原生罗盘控件（ControlBar）：与右下角三个圆形按钮「同尺寸」对齐排列。
   原生罗盘 .amap-luopan 尺寸为 92x92px，按钮为 40px => 缩放比 40/92 ≈ .435，视觉严格相等。
   以 bottom-right 为缩放原点 => 视觉底边锚定在 bottom:176px，紧贴按钮列顶端(166px)，留 10px 间隙 */
.amap-controlbar {
  transform: scale(.435) !important;
  transform-origin: bottom right !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 缩放控件：统一移到「右侧垂直居中」（高德 ToolBar / Leaflet zoom 双引擎） */
.amap-toolbar {
  top: 50% !important; bottom: auto !important;
  left: auto !important; right: 12px !important;
  transform: translateY(-50%) !important;
}
.leaflet-top.leaflet-right { top: 50% !important; transform: translateY(-50%) !important; }

/* 我的位置：高德同款蓝点（方向箭头 + 精度光环） */
.my-dot { width: 22px; height: 22px; position: relative; pointer-events: none; }
.my-acc {   /* 精度扩散光环 */
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(43,127,255,.28); transform: translate(-50%,-50%);
  animation: pulse 1.8s ease-out infinite;
}
.my-core {  /* 中心蓝点 */
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: #2b7fff; border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(43,127,255,.55), 0 1px 4px rgba(0,0,0,.35);
  transform: translate(-50%,-50%); z-index: 2;
}
.my-arrow { /* 方向箭头（向上，可随航向旋转） */
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 12px solid #6ba6ff; opacity: .9;
  transform: translate(-50%, -88%) rotate(var(--heading, 0deg));
  transform-origin: 50% 88%; filter: drop-shadow(0 0 1px rgba(0,0,0,.25)); z-index: 1;
}
@keyframes pulse { 0% { opacity: .85; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(3.2); } }

/* 信息卡片内「导航前往」按钮 */
.info-actions { margin-top: 8px; }
.nav-btn {
  width: 100%; padding: 7px 10px; border: none; border-radius: 6px;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
}
.nav-btn:hover { background: #1565c0; }

/* 客户列表内「导航」小按钮 */
.ci-actions .nav { color: var(--primary); border-color: var(--primary); }
.ci-actions .nav:hover { background: var(--primary); color: #fff; }

/* 轻提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(33,33,33,.92); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 8px; z-index: 2000;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 高级筛选面板（省份/地区 + 商务负责人，精准 & 模糊） ---------- */
.filter-panel {
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; padding: 8px; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.fp-row { display: flex; align-items: center; gap: 6px; }
.fp-label { font-size: 12px; color: #555; width: 64px; flex: none; font-weight: 600; }
#filter-region, #filter-owner {
  flex: 1 1 60%; min-width: 0; font-size: 12px; padding: 5px 6px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text);
}
#filter-region-kw, #filter-owner-kw {
  flex: 1 1 40%; min-width: 0; font-size: 12px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 6px;
}
#filter-region:focus, #filter-owner:focus,
#filter-region-kw:focus, #filter-owner-kw:focus { border-color: var(--primary); outline: none; }
.fp-foot { justify-content: space-between; padding-left: 2px; }
.switch-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #666; cursor: pointer; user-select: none;
}
.switch-inline input { accent-color: var(--primary); cursor: pointer; }
.switch-inline b { color: var(--primary); }

/* ---------- 地图悬停浮窗（hover card） ---------- */
.hover-card {
  position: absolute; z-index: 600; transform: translate(-50%, -100%);
  pointer-events: none;               /* 纯展示，避免抢走标记的鼠标事件导致闪烁 */
  background: #fff; border-radius: 8px; padding: 9px 11px;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  border: 1px solid var(--border);
  min-width: 170px; max-width: 260px;
  animation: hvIn .12s ease-out;
}
.hover-card[hidden] { display: none; }
@keyframes hvIn { from { opacity: 0; transform: translate(-50%, -92%); } to { opacity: 1; transform: translate(-50%, -100%); } }
.hover-card::after {   /* 指向标记的小三角 */
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid #fff;
}
.hv-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.hv-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hv-name { font-size: 13px; font-weight: 600; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-tag { font-size: 10px; color: #fff; padding: 1px 6px; border-radius: 9px; margin-left: auto; flex: none; }
.hv-kv { font-size: 12px; color: #555; line-height: 1.55; word-break: break-all; }
.hv-kv b { color: #222; font-weight: 600; margin-right: 6px; }
.hv-tip { font-size: 10px; color: #9e9e9e; margin-top: 6px; border-top: 1px dashed #ececec; padding-top: 4px; }

/* 信息卡片底部说明 */
.info-foot { margin-top: 6px; font-size: 11px; color: #9e9e9e; }

/* 客户列表里的商务负责人 */
.customer-list .ci-owner { font-size: 12px; color: #6b7785; margin: 3px 0 0 17px; }
.customer-list .ci-owner.unclaimed { color: #bdbdbd; }

/* ---------- 账号 / 权限 ---------- */
.user-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ub-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none;
}
.ub-info { display: flex; flex-direction: column; line-height: 1.25; }
.ub-info b { font-size: 12px; }
.ub-role { font-size: 10px; font-style: normal; color: #8a8a8a; }
.ub-role.admin { color: #e53935; }
.ub-guest { font-size: 12px; color: #8a8a8a; }

.auth-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 16px;
}
.auth-card {
  background: #fff; border-radius: 12px; padding: 20px; width: 340px; max-width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); max-height: 88vh; overflow: auto;
}
.auth-card.wide { width: 720px; }
.auth-card h2 { font-size: 17px; margin-bottom: 6px; }
.auth-card h3 { font-size: 13px; margin-bottom: 6px; }
.auth-sub { font-size: 12px; color: #666; margin-bottom: 12px; line-height: 1.6; }
.auth-card label { display: block; font-size: 12px; color: #555; margin-bottom: 8px; }
.auth-card input[type="text"], .auth-card input[type="password"], .auth-card select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; box-sizing: border-box; margin-top: 4px;
}
.auth-msg { color: #e53935; font-size: 12px; min-height: 16px; margin-bottom: 6px; }
.auth-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

.um-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; flex-wrap: wrap; }
.um-name { flex: 1; min-width: 120px; }
.um-name i { color: #999; font-style: normal; font-size: 11px; }
.um-me { font-size: 11px; color: var(--primary); }
.um-add { margin-top: 12px; }
.um-row { display: flex; gap: 6px; flex-wrap: wrap; }
.um-row input, .um-row select { font-size: 12px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.um-empty { font-size: 12px; color: #999; padding: 8px 0; }

/* ---------- 认领 ---------- */
.claim-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: #e3f2fd; border: 1px solid #bbdefb; border-radius: 8px; margin-bottom: 8px; font-size: 12px;
}
.claim-bar select { flex: 1; min-width: 0; font-size: 12px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; }
.btn-mini.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-mini:disabled { opacity: .5; cursor: not-allowed; }
#claim-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.customer-list .ci-check { margin-right: 5px; }

/* ---------- 筛选面板补充 ---------- */
.toolbar-row { display: flex; gap: 6px; align-items: center; }
.toolbar-row #search { flex: 1; min-width: 0; }
.fp-quick { flex-wrap: wrap; gap: 5px; }
.qchip {
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; cursor: pointer;
}
.qchip:hover { border-color: var(--primary); color: var(--primary); }
.fp-summary { font-size: 11px; color: #8a8a8a; line-height: 1.5; border-top: 1px dashed #eee; padding-top: 5px; margin-top: 2px; }

/* ---------- 导入：高德商家匹配确认 ---------- */
.mm-progress { font-size: 12px; color: var(--primary); margin-bottom: 8px; }
.mm-actions { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.mm-list { max-height: 46vh; overflow: auto; border: 1px solid #eee; border-radius: 8px; }
.mm-item { display: flex; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid #f5f5f5; font-size: 12px; }
.mm-item.matched { background: #f1f8e9; }
.mm-item.skipped { background: #fafafa; }
.mm-src { flex: 1; min-width: 0; }
.mm-src b { display: block; }
.mm-src span { color: #888; font-size: 11px; }
.mm-sel { flex: 1.3; min-width: 0; font-size: 12px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }
.mm-state { font-size: 11px; color: #888; width: 58px; text-align: right; flex: none; }

/* ---------- 标记选中态（认领勾选） ---------- */
.amap-pin { position: relative; }
.pin-tick {
  position: absolute; top: -4px; right: -4px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; color: #2e7d32; font-size: 11px; font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* ---------- 认领：地图点选未标记商家 ---------- */
#map.claiming { cursor: crosshair; }
.claim-hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(33, 33, 33, .9); color: #fff; font-size: 12px;
  padding: 8px 12px; border-radius: 20px; z-index: 12;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28); max-width: 80%; white-space: nowrap;
}
.claim-hint b { color: #ffd54f; }
.claim-hint .ch-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff5252; flex: none;
  animation: chPulse 1.2s ease-in-out infinite;
}
@keyframes chPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.claim-hint button {
  background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 12px;
  padding: 3px 10px; font-size: 11px; cursor: pointer; flex: none;
}
.claim-hint button:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 720px) { .claim-hint { white-space: normal; font-size: 11px; } }

/* 认领确认面板 */
.claim-card .mm-list { margin-bottom: 10px; }
.cm-loading, .cm-empty { padding: 16px; text-align: center; color: #888; font-size: 12px; line-height: 1.7; }
.cm-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px;
  border-bottom: 1px solid #f5f5f5; cursor: pointer; font-size: 12px;
}
.cm-item:last-child { border-bottom: 0; }
.cm-item:hover { background: #f7fbff; }
.cm-item.on { background: #e8f4ff; }
.cm-item.dup { opacity: .62; }
.cm-item input { margin-top: 3px; flex: none; }
.cm-body { flex: 1; min-width: 0; }
.cm-name { display: block; font-weight: 600; color: #222; }
.cm-sub { display: block; color: #888; font-size: 11px; margin-top: 2px; }
.cm-tag {
  display: inline-block; margin-top: 4px; font-size: 10px; color: #ef6c00;
  background: #fff3e0; border-radius: 4px; padding: 1px 6px;
}
.cm-dist { flex: none; color: #1e88e5; font-size: 11px; margin-top: 2px; }
.cm-meta { color: #999; font-size: 11px; margin-left: 6px; }
.cm-form { display: flex; gap: 10px; margin-bottom: 8px; }
.cm-form label { flex: 1; display: block; font-size: 12px; color: #555; margin: 0; }
.cm-form select {
  width: 100%; margin-top: 4px; padding: 6px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box;
}
#cm-remark {
  width: 100%; padding: 7px 9px; font-size: 12px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px;
}
#claim-toggle.active, #assign-toggle.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 侧栏底部说明（替代原「启动自动定位」开关） */
.footer-tip {
  font-size: 11px; color: #90a4ae; line-height: 1.6;
  background: #f5f7f8; border-radius: 6px; padding: 6px 8px; margin-bottom: 8px;
}

/* 点选认领时，高德/Leaflet 内部容器也要显示十字光标 */
#map.claiming .amap-container,
#map.claiming .amap-maps,
#map.claiming .amap-layer,
#map.claiming .leaflet-container,
#map.claiming canvas { cursor: crosshair !important; }

/* =====================================================================
   侧栏 v2 —— 更专业的工具体验（信息层级 / 8pt 栅格 / 卡片化）
   ===================================================================== */
:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e6eaf0;
  --line-2: #f1f4f8;
  --brand: #1a73e8;
  --brand-d: #1557b0;
  --brand-soft: #eaf2fe;
  --ok: #16a34a;
  --warn: #f59e0b;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, .08);
}

#sidebar {
  width: 372px;
  flex: 0 0 372px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 rgba(15, 23, 42, .02);
}

/* ---------- 顶部品牌区 ---------- */
.side-header {
  position: relative;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
}
.side-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #1a73e8 0%, #4f9df7 45%, #7cc4ff 100%);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2f86f6 0%, #1557b0 100%);
  box-shadow: 0 3px 8px rgba(26, 115, 232, .32);
}
.brand-txt h1 { font-size: 15px; font-weight: 700; letter-spacing: .2px; color: var(--ink); line-height: 1.2; }
.brand-txt .sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; letter-spacing: .3px; }

.user-bar { margin-top: 12px; }
.user-bar:empty { display: none; }

/* ---------- 滚动主体 ---------- */
.side-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}
.side-scroll::-webkit-scrollbar { width: 8px; }
.side-scroll::-webkit-scrollbar-thumb { background: #dfe5ee; border-radius: 8px; border: 2px solid #fff; }
.side-scroll::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

.panel {
  padding: 14px 18px 16px;
  border-bottom: 1px solid var(--line-2);
  overflow: visible;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel h2 {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  letter-spacing: 1.2px; text-transform: uppercase;
}
.panel-badge {
  font-size: 10px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border-radius: 20px; padding: 2px 8px;
}
.panel-badge.edit { color: var(--warn); background: #fff7e6; }

/* ---------- 表单 ---------- */
#customer-form .field { margin-bottom: 10px; }
#customer-form .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
#customer-form .field-grid .field { margin-bottom: 10px; }
#customer-form .field-grid .span2 { grid-column: span 2; }
#customer-form .field > label,
#customer-form .field-label {
  display: block;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .3px; margin-bottom: 5px;
}
#customer-form .field > label { margin-bottom: 5px; }
#customer-form .req { color: #ef4444; font-style: normal; }
#customer-form input,
#customer-form select,
#customer-form textarea {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#customer-form textarea { height: auto; padding: 9px 11px; line-height: 1.5; resize: vertical; }
#customer-form select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
#customer-form input::placeholder,
#customer-form textarea::placeholder { color: #b3bcc9; }
#customer-form input:hover,
#customer-form select:hover,
#customer-form textarea:hover { border-color: #d5dbe5; }
#customer-form input:focus,
#customer-form select:focus,
#customer-form textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .12);
}
#customer-form textarea { min-height: 62px; }
#customer-form .hint { margin: 2px 0 8px; min-height: 0; font-size: 11px; line-height: 1.5; color: #e5484d; }
#customer-form .hint:empty { display: none; }

.form-actions { display: flex; gap: 8px; margin-top: 6px; }
.btn-primary {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #2f86f6 0%, #1a73e8 100%);
  box-shadow: 0 2px 6px rgba(26, 115, 232, .28);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 4px 12px rgba(26, 115, 232, .32); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(26, 115, 232, .3); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  height: 38px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.btn-ghost:hover { border-color: #cfd8e5; background: #f8fafc; }

/* 地图搜索框（保留原有 .poi-wrap 结构，只调视觉） */
.poi-wrap { position: relative; }
#customer-form .poi-wrap input {
  height: 38px; padding-left: 38px; padding-right: 34px;
  font-size: 13px; background: #fff;
}
.poi-ico {
  position: absolute; left: 6px; top: 6px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer; border-radius: 6px;
}
.poi-ico:hover { color: var(--brand); background: var(--brand-soft); }
.poi-clear {
  position: absolute; right: 8px; top: 11px; width: 18px; height: 18px;
  border: 0; background: #eef1f6; color: #7c8798; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.poi-clear:hover { background: #e2e7ef; color: var(--ink-2); }

/* ---------- 搜索行 / 操作行 ---------- */
.search-row { position: relative; margin-bottom: 8px; }
.search-row .search-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
#search {
  width: 100%; height: 36px; padding: 0 11px 0 32px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #fbfcfe; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#search:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); }
.action-row { display: flex; gap: 8px; margin-bottom: 10px; }
.action-row .btn-mini { flex: 1; height: 34px; font-size: 12px; font-weight: 600; border-radius: 8px; }
.btn-mini.accent {
  color: var(--brand); border-color: #c7ddfb; background: var(--brand-soft);
}
.btn-mini.accent:hover { background: #dcebfe; border-color: #a9cbf7; color: var(--brand-d); }
.btn-mini.accent.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(26, 115, 232, .3); }

/* ---------- 筛选面板 ---------- */
.filter-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fcfdff; padding: 8px 10px 9px; margin-bottom: 8px;
}
.fp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fp-title { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: 1px; }
.fp-toggle {
  border: 0; background: transparent; color: var(--brand);
  font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 5px;
}
.fp-toggle:hover { background: var(--brand-soft); }
.filter-panel.collapsed .fp-body { display: none; }
.filter-panel .fp-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.filter-panel .fp-label { flex: 0 0 42px; font-size: 11px; color: var(--ink-3); }
.filter-panel select, .filter-panel input[type="search"] {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px; font-size: 12px; background: #fff; color: var(--ink);
}
.filter-panel select:focus, .filter-panel input[type="search"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(26, 115, 232, .1);
}
.filter-panel .fp-quick { flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.qchip {
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 20px; background: #fff; cursor: pointer; color: var(--ink-2);
  transition: all .15s;
}
.qchip:hover { border-color: #bcd7fb; color: var(--brand); background: var(--brand-soft); }
.qchip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-panel .fp-foot { justify-content: space-between; margin-bottom: 0; margin-top: 6px; }
.switch-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.switch-inline input { width: 13px; height: 13px; accent-color: var(--brand); }
.fp-summary { font-size: 11px; color: var(--ink-3); line-height: 1.5; margin-top: 4px; }
.fp-summary:empty { display: none; }

/* ---------- 分类 chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 20px; cursor: pointer; user-select: none; background: #fff; color: var(--ink-2);
  transition: all .15s;
}
.filter-chip:hover { border-color: #cfd8e5; }
.filter-chip.off { opacity: .42; background: #fafbfc; }
.filter-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- 认领/指派工具条 ---------- */
.claim-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 9px; margin-bottom: 8px;
  background: var(--brand-soft); border: 1px solid #cfe3fc; border-radius: 9px;
  font-size: 12px; color: var(--brand-d); font-weight: 600;
}
.claim-bar select {
  flex: 1; min-width: 0; height: 28px; font-size: 12px; padding: 0 6px;
  border: 1px solid #bfdbfe; border-radius: 6px; background: #fff; color: var(--ink);
}
.claim-bar .btn-mini { height: 28px; font-size: 11px; }
.btn-mini.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-mini.primary:hover { filter: brightness(1.05); color: #fff; }
.btn-mini:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 客户列表 ---------- */
.stats {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--ink-3); margin: 2px 0 8px;
}
.customer-list { list-style: none; max-height: none; overflow: visible; }
.customer-list li {
  position: relative;
  display: flex; gap: 9px;
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 7px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.customer-list li:hover { border-color: #c9defb; box-shadow: var(--shadow-md); }
.customer-list li:hover .ci-actions { display: flex; }
.ci-bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; }
.ci-main { flex: 1; min-width: 0; padding-left: 3px; }
.ci-top { display: flex; align-items: center; gap: 6px; }
.customer-list .ci-dot { display: none; }
.customer-list .ci-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ci-badge { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px; flex: none; }
.ci-addr {
  font-size: 11.5px; color: var(--ink-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ci-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 11px; color: var(--ink-2); }
.ci-owner { display: inline-flex; align-items: center; gap: 3px; background: #f3f6fa; border-radius: 20px; padding: 1px 7px; }
.ci-owner.unclaimed { color: var(--warn); background: #fff8e8; }
.ci-time { color: #b6c0cd; }
.ci-actions { display: none; gap: 5px; margin-top: 7px; }
.ci-actions button {
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--line);
  background: #fff; border-radius: 6px; cursor: pointer; color: var(--ink-2);
  transition: all .15s;
}
.ci-actions button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.ci-actions .del { color: #e5484d; border-color: #f6d6d7; }
.ci-actions .del:hover { background: #fef2f2; border-color: #ef9a9d; color: #d1373c; }
.customer-list .ci-check { margin-right: 2px; accent-color: var(--brand); flex: none; }
.empty-tip {
  font-size: 12px; color: var(--ink-3); text-align: center;
  padding: 22px 8px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fcfdff;
}

/* ---------- 底部 ---------- */
.side-footer {
  margin-top: 0;
  padding: 10px 18px 12px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}
.side-footer .footer-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.side-footer .btn-mini { font-size: 11px; padding: 4px 9px; border-radius: 7px; background: #fff; }
.import-status { font-size: 11px; color: var(--brand); width: 100%; }
.import-status:empty { display: none; }
.footer-tip { font-size: 10.5px; color: #a9b4c2; line-height: 1.5; }

/* 小屏：侧栏收窄，字段单列 */
@media (max-width: 900px) {
  #sidebar { width: 320px; flex: 0 0 320px; }
  #customer-form .field-grid { grid-template-columns: 1fr; }
  #customer-form .field-grid .span2 { grid-column: span 1; }
}

/* =====================================================================
   认领面板 v2（高德商家公开信息 + 图片） / 商家详情卡 / 图片查看器
   ===================================================================== */
.claim-card { max-height: 90vh; overflow-y: auto; padding: 16px 18px 14px; }
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.cm-head h2 { margin: 0; }
.cm-counter {
  font-size: 11px; color: var(--brand-d); background: var(--brand-soft);
  border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.cm-counter b { font-size: 12px; }
.claim-card .auth-sub { margin: 3px 0 8px; font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }
.cm-meta { color: #a9b4c2; }

.cm-search { display: flex; gap: 6px; margin-bottom: 8px; }
.cm-search input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12px; background: #fbfcfe;
}
.cm-search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,.1); }
.cm-search .btn-mini { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; }

.claim-card .mm-list { max-height: 34vh; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.cm-item { transition: background .12s; }
.cm-item .cm-tag.ok { color: #b45309; background: #fff7ed; }
.cm-item .cm-body { display: block; }

/* 选中候选的高德公开信息 */
.cm-detail {
  margin-top: 9px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe;
}
.cmd-loading { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 8px 0; }
.cmd-photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 7px; }
.cmd-photos img {
  width: 100%; height: 54px; object-fit: cover; border-radius: 7px;
  cursor: zoom-in; background: #eef1f6; transition: transform .12s, filter .12s;
}
.cmd-photos img:hover { transform: translateY(-1px); filter: brightness(1.04); }
.cmd-nophoto {
  font-size: 11px; color: #a9b4c2; text-align: center;
  padding: 12px 0; background: #f1f4f8; border-radius: 8px; margin-bottom: 7px;
}
.cmd-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--ink-2); margin-bottom: 5px; }
.cmd-star { color: #f59e0b; font-weight: 700; }
.cmd-type { background: #eef2f8; border-radius: 4px; padding: 0 6px; color: var(--ink-2); }
.cmd-tel { color: var(--brand); }
.cmd-foot { display: flex; align-items: center; gap: 8px; }
.cmd-addr {
  flex: 1; min-width: 0; font-size: 11px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmd-link { font-size: 11px; color: var(--brand); text-decoration: none; flex: none; }
.cmd-link:hover { text-decoration: underline; }

.cm-form { display: flex; gap: 10px; margin-top: 9px; margin-bottom: 8px; }
.cm-form label { flex: 1; display: block; font-size: 11px; color: var(--ink-3); font-weight: 600; margin: 0; }
.cm-form select {
  width: 100%; height: 32px; margin-top: 4px; padding: 0 8px;
  font-size: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.cm-form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,115,232,.1); }
#cm-remark {
  width: 100%; height: 34px; padding: 0 10px; font-size: 12px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; margin-bottom: 8px;
}
#cm-remark:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,.1); }
.cm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cm-continue { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.cm-continue input { width: 13px; height: 13px; accent-color: var(--brand); }
.cm-foot .btn-mini { font-size: 11px; padding: 4px 9px; border-radius: 7px; }
.claim-card .auth-actions { margin-top: 6px; }
.claim-card .auth-actions .btn-primary { flex: 1.4; }

/* 认领提示条补充 */
.claim-hint .ch-kbd {
  font-size: 10px; color: #cbd5e1; border: 1px solid rgba(255,255,255,.22);
  border-radius: 4px; padding: 0 5px; flex: none;
}

/* 商家详情卡 */
.poi-card { max-height: 90vh; overflow-y: auto; padding: 0 0 14px; }
.pc-hero {
  position: relative; width: 100%; height: 186px; overflow: hidden;
  border-radius: 14px 14px 0 0; background: #eef1f6;
}
.pc-hero-img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.pc-hero-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #a9b4c2; font-size: 12px; }
.pc-src {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 10px; color: #fff; background: rgba(15,23,42,.55);
  border-radius: 20px; padding: 2px 9px; backdrop-filter: blur(4px);
}
.pc-thumbs { display: flex; gap: 6px; padding: 8px 18px 0; overflow-x: auto; }
.pc-thumbs img {
  width: 62px; height: 46px; object-fit: cover; border-radius: 7px;
  cursor: zoom-in; flex: none; background: #eef1f6;
}
.poi-card h2 { padding: 10px 18px 0; font-size: 18px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 18px 0; font-size: 12px; color: var(--ink-2); }
.pc-star { color: #f59e0b; font-weight: 700; }
.pc-type { background: #eef2f8; border-radius: 4px; padding: 0 6px; }
.pc-rows { padding: 10px 18px 0; font-size: 12.5px; }
.pc-rows > div { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #f1f4f8; }
.pc-rows b { flex: 0 0 46px; color: var(--ink-3); font-weight: 600; font-size: 11.5px; }
.pc-rows span { flex: 1; color: var(--ink); word-break: break-all; }
.poi-card .auth-actions { padding: 12px 18px 0; }
.poi-card .auth-actions .btn-primary { flex: 0 0 auto; padding: 0 18px; }
.poi-card .auth-actions .btn-ghost { height: 38px; display: inline-flex; align-items: center; text-decoration: none; }

/* 图片查看器 */
.photo-viewer {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(8, 12, 20, .88);
  display: flex; align-items: center; justify-content: center;
  animation: pvIn .16s ease-out;
}
@keyframes pvIn { from { opacity: 0; } to { opacity: 1; } }
.pv-img { max-width: 88vw; max-height: 84vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.pv-close {
  position: absolute; top: 18px; right: 22px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.pv-close:hover { background: rgba(255,255,255,.26); }
.pv-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 28px; cursor: pointer;
}
.pv-nav:hover { background: rgba(255,255,255,.24); }
.pv-prev { left: 18px; }
.pv-next { right: 18px; }
.pv-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 12px; background: rgba(255,255,255,.14);
  padding: 3px 10px; border-radius: 20px;
}

/* 信息卡里的商家图片 / 次要按钮 */
.info-card .ic-photo {
  display: block; width: 100%; max-width: 220px; height: 92px;
  object-fit: cover; border-radius: 8px; margin: 2px 0 7px; cursor: zoom-in;
}
.nav-btn.ghost { background: #fff; color: var(--brand); border: 1px solid #c7ddfb; }
.nav-btn.ghost:hover { background: var(--brand-soft); color: var(--brand-d); }

@media (max-width: 720px) {
  .cmd-photos { grid-template-columns: repeat(4, 1fr); }
  .pc-hero { height: 140px; }
}

/* 收尾修正：覆盖旧规则遗留的 margin / transform（否则图标与输入框会错位） */
#customer-form .field input,
#customer-form .field select,
#customer-form .field textarea { margin-top: 0; }
.poi-wrap { margin-top: 0; }
.poi-ico { top: 50%; transform: translateY(-50%); }
.poi-ico:active { transform: translateY(-50%) scale(.94); }
.poi-clear { top: 50%; transform: translateY(-50%); }
/* 大图查看器必须盖在认领/详情弹窗之上（弹窗 z-index:3000） */
.photo-viewer { z-index: 3200; }

/* ---------- 侧栏标签页 ---------- */
.side-tabs {
  display: flex; gap: 4px; padding: 8px 16px 0; background: #fff;
  border-bottom: 1px solid var(--line);
}
.side-tab {
  flex: 1; position: relative; border: 0; background: transparent;
  padding: 8px 6px 9px; border-radius: 8px 8px 0 0;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  cursor: pointer; font-family: inherit; transition: color .15s, background .15s;
}
.side-tab em {
  font-style: normal; font-size: 10px; font-weight: 700;
  background: #eef2f8; color: var(--ink-2); border-radius: 20px;
  padding: 1px 6px; margin-left: 4px;
}
.side-tab:hover { color: var(--ink); background: #f7f9fc; }
.side-tab.active { color: var(--brand); }
.side-tab.active em { background: var(--brand-soft); color: var(--brand); }
.side-tab.active::after {
  content: ""; position: absolute; left: 16%; right: 16%; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--brand);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 示例数据提示条：更紧凑、可一键收起 */
.demo-banner {
  margin: 10px 16px 0; padding: 7px 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff8e8; border: 1px solid #f7e2b8; border-radius: 9px;
  font-size: 11px; color: #8a5a00; line-height: 1.5;
}
.demo-banner b { color: #7a4f00; }
.demo-banner button {
  margin: 0 0 0 auto; width: auto; flex: none;
  border: 1px solid #f0d49a; background: #fff; color: #8a5a00;
  border-radius: 20px; padding: 2px 10px; font-size: 11px; cursor: pointer;
}
.demo-banner button:hover { background: #fff4dd; }

/* 筛选面板紧凑化：两个条件并排，避免关键词框被挤窄 */
.filter-panel .fp-row > select,
.filter-panel .fp-row > input[type="search"] { flex: 1 1 0; min-width: 0; }
.filter-panel .fp-row { margin-bottom: 5px; }
.filter-panel { padding: 7px 9px 8px; }
.side-scroll { padding-bottom: 26px; }
/* 分类 chips 更紧凑：5 个类别尽量一行排下 */
.filter-chip { padding: 3px 7px; font-size: 10.5px; gap: 4px; }
.filter-chip .dot { width: 7px; height: 7px; }
/* 表单分组间距略放宽，长表单更透气 */
#customer-form .field-grid { row-gap: 2px; }

/* 认领候选行：强制单行三列（单选 / 信息 / 距离），避免距离被挤到下一行 */
.cm-item { flex-wrap: nowrap; align-items: flex-start; padding: 8px 10px; }
.cm-item .cm-body { flex: 1 1 auto; min-width: 0; }
.cm-item .cm-dist { flex: 0 0 auto; margin-left: auto; margin-top: 1px; }
.cm-item .cm-sub,
.cm-item .cm-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 修正：.auth-card label 会覆盖 .cm-item 的 flex，导致候选行变成块级堆叠 */
.auth-card .cm-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; margin-bottom: 0;
  font-size: 12px; color: var(--ink);
}
.auth-card .cm-form label {
  display: block; margin-bottom: 0;
  font-size: 11px; color: var(--ink-3); font-weight: 600;
}
.auth-card .cm-continue {
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 0; font-size: 11.5px; color: var(--ink-2);
}
#cm-remark { margin-top: 0; }

/* =====================================================================
   CRM 主界面 v3 —— 统一搜索 + 两个板块（1 新增客户·地图搜索 / 2 客户信息）
   ===================================================================== */

/* ---------- 顶部统一搜索（客户 + 高德地点 合并） ---------- */
.omni-bar {
  padding: 10px 14px 9px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex: none;
}
.omni-wrap { position: relative; }
.omni-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
#search {
  width: 100%; height: 36px;
  padding: 0 32px 0 32px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #f7f9fc; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#search::placeholder { color: #b3bcc9; }
#search:hover { border-color: #d5dbe5; }
#search:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); }
#search::-webkit-search-cancel-button { display: none; }
.omni-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #e9edf3; color: #7c8798;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.omni-clear:hover { background: #dde3ec; color: var(--ink-2); }
.omni-hint { font-size: 10.5px; color: #a3aebd; line-height: 1.45; margin-top: 5px; }
/* 搜索框已移入「新增客户」面板：去掉外层边框/左右内边距，避免与面板内边距叠加 */
.tab-pane .omni-bar { padding-left: 0; padding-right: 0; border-bottom: 0; padding-top: 4px; }

.omni-list {
  padding: 5px;
  max-height: min(58vh, 430px);
  border-radius: 12px; border-color: var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}
.omni-group {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: var(--ink-3);
}
.omni-group em {
  font-style: normal; font-weight: 600; letter-spacing: 0;
  background: #eef2f8; border-radius: 20px; padding: 0 6px; color: var(--ink-2);
}
.omni-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px;
  white-space: normal; overflow: visible; text-overflow: clip;
}
.omni-item:hover, .omni-item.active { background: var(--brand-soft); color: var(--ink); }
.oi-ico {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #eef2f8; font-size: 12px; line-height: 1;
}
.oi-ico.poi { background: #fff2e8; }
.oi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oi-main {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oi-pill {
  flex: none; font-style: normal; font-size: 10px; font-weight: 600;
  padding: 0 6px; border-radius: 20px; line-height: 16px;
}
.oi-pill.dup { color: #b45309; background: #fff7ed; }
.oi-sub {
  font-size: 10.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oi-go { flex: none; font-size: 10.5px; color: var(--brand); font-weight: 600; }
.omni-loading {
  display: flex; align-items: center; gap: 6px;
  padding: 8px; font-size: 11px; color: var(--ink-3);
}
.ol-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  animation: olPulse 1s infinite ease-in-out;
}
@keyframes olPulse { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- 两个板块 ---------- */
.block { border-bottom: 1px solid var(--line-2); }
.block-head {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px 9px;
  background: #fff;
}
.block-list > .block-head {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line-2);
}
.block-idx {
  flex: none; width: 18px; height: 18px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft);
}
.block-head h2 {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.block-btn {
  flex: none; height: 24px; padding: 0 9px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer;
}
.block-btn:hover { border-color: #bcd7fb; color: var(--brand); background: var(--brand-soft); }
.block-new .block-head { cursor: pointer; }
.count-pill {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 20px; padding: 1px 8px;
}
.block-body { padding: 0 14px 14px; }
.block-new.collapsed .block-body { display: none; }
.block-new.collapsed .block-head { padding-bottom: 11px; }
#block-new-body { padding-top: 2px; }

/* ---------- 板块一：操作行 / 来源条 / 合作内容 ---------- */
.lead-row { display: flex; gap: 7px; margin-bottom: 6px; }
.lead-btn {
  flex: 1; height: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
  transition: all .15s;
}
.lead-btn:hover { border-color: #bcd7fb; color: var(--brand); background: var(--brand-soft); }
.lead-btn.claim { color: var(--brand); border-color: #c7ddfb; background: var(--brand-soft); }
.lead-btn.claim:hover { background: #dcebfe; }
.lead-btn.claim.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.lead-tip { font-size: 10.5px; color: #a3aebd; line-height: 1.45; margin-bottom: 8px; }

.picked-poi {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; margin-bottom: 8px;
  border: 1px solid #cfe3fc; border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #f2f8ff 100%);
}
.picked-poi[hidden] { display: none; }
.picked-poi img {
  flex: none; width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; background: #e6edf7;
}
.picked-poi .pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.picked-poi .pp-main b { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-poi .pp-main span { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-btn {
  flex: none; height: 24px; padding: 0 8px;
  font-size: 10.5px; font-weight: 600; color: var(--brand);
  border: 1px solid #c7ddfb; border-radius: 7px; background: #fff; cursor: pointer;
}
.pp-btn:hover { background: var(--brand-soft); }
.pp-btn:disabled { opacity: .5; cursor: not-allowed; }
.pp-x {
  flex: none; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #e7effb; color: #7c8798; font-size: 13px; line-height: 1; cursor: pointer;
}
.pp-x:hover { background: #dbe7f8; color: var(--ink-2); }

.lab-tip { font-weight: 500; color: #b6c0cd; margin-left: 4px; }
/* 合作内容：点取下拉多选 */
.coop-select { position: relative; }
.coop-trigger {
  width: 100%; height: 38px; padding: 0 11px;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fbfcfe; color: var(--ink); cursor: pointer;
  font-size: 13px; font-weight: 500; line-height: 1.4;
  font-family: inherit; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.coop-trigger:hover { border-color: #d5dbe5; }
.coop-trigger:focus,
.coop-trigger.open { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); }
.coop-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.coop-summary:not(.has) { color: #aab3c0; font-weight: 400; }
.coop-caret { flex: none; color: var(--ink-3); font-size: 11px; transition: transform .15s; }
.coop-trigger.open .coop-caret { transform: rotate(180deg); }

.coop-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16); padding: 8px;
  max-height: min(62vh, 330px); overflow: hidden;
  display: flex; flex-direction: column;
}
.coop-menu[hidden] { display: none; }
.coop-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 7px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
}
.cmh-count { font-size: 11px; font-weight: 600; letter-spacing: .2px; color: var(--ink-2); }
.cmh-clear {
  border: none; background: none; cursor: pointer; padding: 2px 4px;
  font-size: 11.5px; font-weight: 600; color: #e5484d;
}
.cmh-clear:hover { text-decoration: underline; }
.coop-filter {
  width: 100%; height: 32px; margin-bottom: 6px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px;
  background: #fbfcfe; color: var(--ink); font-family: inherit;
}
.coop-filter:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 115, 232, .1); }

.coop-opts { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; padding-right: 2px; }
.coop-grp { padding: 8px 2px 3px; }
.coop-grp-name {
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  color: var(--ink-3);
}
.coop-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
  font-size: 13px; line-height: 1.5; color: var(--ink);
  transition: background .12s;
}
.coop-opt:hover { background: #f5f8fc; }
.coop-opt.on { background: var(--brand-soft); }
.coop-opt .coop-cb { width: 16px; height: 16px; accent-color: var(--brand); flex: none; cursor: pointer; }
.coop-opt .coop-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.coop-opt.on .coop-txt { color: var(--brand-d); font-weight: 600; }
.coop-opt .cc-x {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #c2cbd8; font-style: normal; font-size: 13px; line-height: 1; cursor: pointer;
}
.coop-opt .cc-x:hover { color: #e5484d; background: #fee2e2; }
.coop-empty { padding: 14px 8px; font-size: 12px; color: var(--ink-3); text-align: center; }
.coop-add-row { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.coop-new {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.coop-new:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 115, 232, .1); }
.coop-add-btn {
  flex: none; width: 36px; height: 32px; font-size: 17px; line-height: 1;
  color: var(--brand); border: 1px solid #c7ddfb; border-radius: 8px; background: #fff; cursor: pointer;
}
.coop-add-btn:hover { background: var(--brand-soft); }

/* 提级覆盖 #customer-form 里 label / input 的通用样式：
 * 通用规则 `#customer-form label{display:block}` 与 `#customer-form input{width:100%}`
 * 会破坏下拉内部的选项行（勾选框被拉满宽、文字换行），这里按 ID 级权重重新声明。 */
#customer-form label.coop-opt {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 0; padding: 7px 8px;
  font-size: 13px; line-height: 1.5; font-weight: 400;
  color: var(--ink); border-radius: 8px; cursor: pointer;
}
#customer-form label.coop-opt:hover { background: #f5f8fc; }
#customer-form label.coop-opt.on { background: var(--brand-soft); }
#customer-form .coop-opt .coop-cb {
  width: 16px; height: 16px; min-width: 16px;
  margin: 0; padding: 0; flex: none;
  accent-color: var(--brand); cursor: pointer;
}
#customer-form .coop-opt .coop-txt {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: var(--ink); font-weight: 400;
}
#customer-form label.coop-opt.on .coop-txt { color: var(--brand-d); font-weight: 600; }
#customer-form .coop-filter,
#customer-form .coop-new {
  margin-top: 0; padding: 0 10px; border-radius: 8px; font-size: 12.5px;
}
#customer-form .coop-filter { height: 32px; margin-bottom: 6px; }
#customer-form .coop-new { height: 32px; }

/* ---------- 板块一：批量导入（归入「新增客户」板块） ---------- */
.import-block {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2);
}
.ib-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.ib-head .panel-badge { flex: none; }
.ib-tip { flex: 1; min-width: 0; font-size: 10.5px; color: #a3aebd; line-height: 1.45; }
.ib-row { display: flex; gap: 6px; }
.ib-row .btn-mini { flex: 1; height: 32px; font-size: 12px; font-weight: 600; }
.import-status { display: block; margin-top: 6px; font-size: 11px; color: var(--brand); }
.import-status:empty { display: none; }

/* ---------- 板块二：范围提示 / 合作内容标签 ---------- */
.home-scope {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--brand-d);
  background: var(--brand-soft); border-radius: 7px;
  padding: 4px 8px; margin-bottom: 8px; line-height: 1.45;
}
.home-scope[style*="display: none"] { display: none !important; }
.ci-coops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ci-coops span {
  font-size: 10px; color: #475569; background: #f1f5f9;
  border-radius: 4px; padding: 1px 5px; line-height: 14px;
}
.ci-coops span.more { color: var(--ink-3); background: #f8fafc; }
.ci-actions { display: none; }
.customer-list li:hover .ci-actions { display: flex; }

/* 表单更紧凑一点，给客户列表留高度 */
#customer-form .field-grid { gap: 0 9px; }
#customer-form .field { margin-bottom: 9px; }
#customer-form .form-actions { margin-top: 2px; }

/* 侧栏窄屏 */
@media (max-width: 900px) {
  .block-body { padding: 0 12px 12px; }
  .block-head { padding: 10px 12px 8px; }
}

/* ---------- 高度预算优化：底部工具条收紧 + 筛选概要常显 ---------- */
.side-footer { padding: 8px 14px 9px; gap: 5px; }
.side-footer .footer-actions { gap: 4px; }
.side-footer .btn-mini { font-size: 10.5px; padding: 3px 8px; border-radius: 6px; }
.footer-tip {
  font-size: 10px; line-height: 1.45; color: #adb8c6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.filter-panel { padding: 7px 9px 8px; }
.filter-panel .fp-summary { margin-top: 3px; font-size: 10.5px; }
.filter-panel.collapsed .fp-summary { color: var(--ink-2); }
.filter-label { font-size: 10.5px; color: var(--ink-3); align-self: center; margin-right: 1px; }

/* =====================================================================
   侧栏「左右结构选项卡」v4
   —— 上方一行两个等宽标签，下方互斥显示对应板块（不再上下堆叠）
   ===================================================================== */
.side-tabs {
  flex: none;
  display: flex;
  gap: 4px;
  margin: 9px 12px 8px;
  padding: 3px;
  background: #eef2f8;
  border-radius: 10px;
}
.side-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, box-shadow .16s;
}
.side-tab:hover { color: var(--brand-d); background: rgba(255, 255, 255, .6); }
.side-tab.active {
  background: #fff;
  color: var(--brand-d);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
}
.st-txt { overflow: hidden; text-overflow: ellipsis; }
/* 选项卡编号（1/2）已按需求移除，.st-idx 样式不再使用 */
.side-tab .count-pill {
  flex: none; padding: 0 5px; font-size: 10px; line-height: 15px;
  background: #eef2f8; color: var(--ink-2);
}
.side-tab.active .count-pill { background: var(--brand-soft); color: var(--brand-d); }

/* 选项卡面板：一次只显示一个 */
.tab-pane { display: none; padding: 2px 14px 16px; }
.tab-pane.active { display: block; }

/* 选项卡一顶部状态行 */
.pane-top { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; min-width: 0; }
.pane-top .panel-badge { flex: none; }
.pane-tip {
  flex: 1; min-width: 0;
  font-size: 10.5px; color: #a3aebd;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 选项卡二顶部：统计条 + 批量指派 */
.pane-tool { display: flex; align-items: flex-start; gap: 7px; margin: 2px 0 7px; }
.pane-tool .stats { flex: 1; min-width: 0; margin: 0; justify-content: flex-start; flex-wrap: wrap; gap: 2px 8px; }
.pane-tool .block-btn { margin-top: -1px; }

/* 选项卡收尾微调：分类 chips 一行放下、底部说明单行省略 */
#block-list .filters { gap: 4px; margin-bottom: 7px; }
#block-list .filter-chip { font-size: 10.5px; padding: 2px 7px; gap: 4px; }
#block-list .filter-chip .dot { width: 7px; height: 7px; }
.filter-label { font-size: 10px; margin-right: 0; }
.side-footer .footer-tip {
  display: block;
  -webkit-line-clamp: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  margin-top: 1px;
}

/* 窄屏（侧栏收窄到 320px）时，选项卡一收起副标题，只留「新增客户」 */
.st-sub { font-weight: 500; color: #7f8da1; }
.side-tab.active .st-sub { color: inherit; }
@media (max-width: 900px) {
  .st-sub { display: none; }
}
/* 表单标签对比度微调，避免整体发灰 */
#customer-form .field > label,
#customer-form .field-label { color: #4a5a70; }

/* =====================================================================
   管理后台（账号与权限 / 商务负责人 / 数据仪表盘）
   ===================================================================== */
.ac-overlay {
  position: fixed; inset: 0; z-index: 3100;
  background: rgba(15, 23, 42, .5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.ac-panel {
  width: min(1160px, 96vw); height: min(860px, 92vh);
  background: #fff; border-radius: 16px; overflow: hidden;
  display: flex; box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
}

/* ---- 左侧导航 ---- */
.ac-rail {
  width: 208px; flex: none; padding: 14px 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.ac-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 14px; font-size: 14px; font-weight: 700; color: var(--ink);
}
.ac-brand i { font-style: normal; font-size: 15px; }
.ac-navs { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ac-nav {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border: 0; border-radius: 9px; background: transparent;
  font-size: 13px; color: var(--ink-2); font-family: inherit;
  cursor: pointer; text-align: left; transition: background .14s, color .14s;
}
.ac-nav i { font-style: normal; font-size: 14px; }
.ac-nav:hover { background: #eef2f8; color: var(--ink); }
.ac-nav.on {
  background: #fff; color: var(--brand-d); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.ac-rail-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ac-me { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.ac-me b { display: block; font-size: 12px; color: var(--ink); line-height: 1.2; }
.ac-me i { font-style: normal; font-size: 10px; color: var(--ink-3); }

/* ---- 右侧内容 ---- */
.ac-body { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 26px; background: #fbfcfe; }
.ac-head h2 { font-size: 18px; font-weight: 700; color: var(--ink); }
.ac-head p { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; margin-bottom: 16px; line-height: 1.6; }

.ac-perm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ac-perm-col { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ac-perm-col b { font-size: 12px; color: var(--brand-d); }
.ac-perm-col span { display: block; font-size: 11.5px; color: var(--ink-2); line-height: 1.55; margin-top: 3px; }

.ac-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.ac-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ac-card-h h3 { font-size: 13px; font-weight: 700; color: var(--ink); }
.ac-sub { font-size: 11px; color: var(--ink-3); }
.ac-h-acts { display: flex; gap: 6px; }

.ac-rows { display: flex; flex-direction: column; }
.ac-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed var(--line-2); }
.ac-row:last-child { border-bottom: 0; }
.ac-row-main { flex: 1; min-width: 0; }
.ac-row-main b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); font-weight: 600; }
.ac-row-main > span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ac-tag {
  font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 20px; background: #eef2f8; color: #64748b;
}
.ac-tag.me { background: var(--brand-soft); color: var(--brand-d); }
.ac-tag.off { background: #fee2e2; color: #b91c1c; }
.ac-tag.none { background: #eef2f8; color: #64748b; }
.ac-h-sub { margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.ac-sel {
  height: 30px; padding: 0 8px; font-size: 12px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2);
}
.ac-sel:disabled { opacity: .6; }
/* 「仅负责人」没有账号，用等宽占位保持四列对齐 */
.ac-sel-na {
  display: inline-flex; align-items: center; justify-content: center;
  width: 74px; height: 30px; flex: none;
  font-size: 11px; color: #94a3b8;
  background: #f6f8fb; border: 1px dashed #dfe6ef; border-radius: 8px;
}
.ac-acts { display: flex; gap: 6px; flex: none; }

.ac-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-form input, .ac-form select {
  flex: 1; min-width: 150px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 12.5px; font-family: inherit; color: var(--ink); background: #fff;
}
.ac-form select { flex: 0 0 108px; min-width: 0; }
.ac-form input:focus, .ac-form select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 115, 232, .1);
}
.ac-form .btn-primary {
  flex: none; height: 36px; padding: 0 16px; border: 0; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.ac-form .btn-primary:hover { background: var(--brand-d); }
.ac-msg { font-size: 11.5px; min-height: 16px; margin-top: 8px; color: var(--ink-3); }
.ac-msg.ok { color: var(--ok); }
.ac-msg.err { color: #dc2626; }
.ac-tip {
  margin-top: 10px; padding: 8px 10px; font-size: 11.5px; color: #92400e;
  background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px;
}
.ac-empty { padding: 18px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* 合并后的「添加人员」表单：姓名/电话/账号/密码/角色/按钮 一行排布，窄屏自动折行 */
.ac-form-wide input { min-width: 130px; }
.ac-form-wide #ac-pn { flex: 1.1; }
.ac-form-wide #ac-pu { flex: 1.1; }

/* ---- 仪表盘 ---- */
.ac-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 14px;
}
.ac-filters label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.ac-filters select {
  height: 32px; padding: 0 8px; font-size: 12px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); max-width: 150px;
}
.ac-filters .btn-mini { height: 32px; }

.ac-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.ac-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ac-kpi b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.ac-kpi span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.ac-kpi em { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }
.ac-kpi.good b { color: var(--ok); }
.ac-kpi.brand b { color: var(--brand); }
.ac-kpi.warn b { color: #d97706; }
.ac-kpi.bad b { color: #dc2626; }

.ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ac-grid .ac-card { margin-bottom: 0; }

.ac-bars { display: flex; flex-direction: column; gap: 7px; }
.ac-bar { display: grid; grid-template-columns: 84px 1fr 42px; gap: 8px; align-items: center; }
.ac-bar-lab { font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-bar-track { height: 8px; background: #eef2f7; border-radius: 20px; overflow: hidden; }
.ac-bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 20px; transition: width .28s ease; }
.ac-bar-val { font-size: 11.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

.ac-donut-wrap { display: flex; align-items: center; gap: 18px; }
.ac-donut { width: 128px; height: 128px; border-radius: 50%; position: relative; flex: none; }
.ac-donut-hole {
  position: absolute; inset: 30px; background: #fff; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ac-donut-hole b { font-size: 17px; color: var(--ink); line-height: 1.1; }
.ac-donut-hole span { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.ac-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ac-leg { display: grid; grid-template-columns: 10px 1fr 38px 32px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--ink-2); }
.ac-leg i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.ac-leg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-leg b { text-align: right; font-weight: 600; color: var(--ink); }
.ac-leg em { font-style: normal; text-align: right; color: var(--ink-3); font-size: 10.5px; }

.ac-trend { width: 100%; height: 118px; display: block; }
.ac-trend-vals { display: flex; margin-top: 4px; }
.ac-trend-vals span { flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-3); }

.ac-alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ac-alert { border: 1px solid var(--line-2); background: #fcfdff; border-radius: 10px; padding: 10px 12px; }
.ac-alert b { display: block; font-size: 18px; color: var(--ink); line-height: 1.2; }
.ac-alert span { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.ac-alert em { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }

/* ---- 删除负责人的转移小弹窗 ---- */
.ac-mini-ov {
  position: fixed; inset: 0; z-index: 3150; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ac-mini { background: #fff; border-radius: 14px; padding: 18px; width: 400px; max-width: 100%; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.ac-mini h4 { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.ac-mini p { font-size: 12px; color: var(--ink-2); line-height: 1.65; margin-bottom: 10px; }
.ac-mini select {
  width: 100%; height: 36px; padding: 0 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
/* 开通账号弹窗里的输入框 */
.ac-mini input {
  width: 100%; height: 36px; margin-bottom: 8px; padding: 0 10px;
  font-size: 12.5px; font-family: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.ac-mini input:focus, .ac-mini select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 115, 232, .1);
}
.ac-mini-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

@media (max-width: 1120px) {
  .ac-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .ac-grid { grid-template-columns: 1fr; }
  .ac-perm { grid-template-columns: 1fr; }
  .ac-alerts { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .ac-overlay { padding: 0; }
  .ac-panel { width: 100%; height: 100%; border-radius: 0; flex-direction: column; }
  .ac-rail { width: 100%; flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ac-brand { padding: 0 10px 0 0; font-size: 13px; }
  .ac-navs { flex-direction: row; gap: 2px; }
  .ac-nav { padding: 7px 9px; font-size: 12px; }
  .ac-nav i { display: none; }
  .ac-rail-foot { border: 0; padding: 0; margin-left: auto; flex-direction: row; align-items: center; }
  .ac-me { display: none; }
  .ac-body { padding: 16px; }
  .ac-kpis { grid-template-columns: repeat(2, 1fr); }
  .ac-row { flex-wrap: wrap; }
  .ac-acts { width: 100%; }
}

/* =========================================================================
   联客宝 · 品牌化界面（登录动画页 / 数据仪表盘 / 游客隐私）
   说明：本项目统一浅色主题；品牌色取 LOGO 的橙 + 蓝
   ========================================================================= */
:root {
  --lk-orange: #ef4b23;
  --lk-orange-2: #ff7a45;
  --lk-blue: #1b4f9c;
  --lk-ink: #101828;
  --lk-line: #e7ecf3;
  --lk-soft: #f6f8fc;
}

/* ---------- 品牌标记（侧栏 / 仪表盘顶栏） ---------- */
.brand-logo,
.dt-mark {
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6edf8, 0 2px 6px rgba(16, 24, 40, .06);
}
.brand-logo img { width: 22px; height: 22px; object-fit: contain; display: block; }
.dt-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.dt-mark img { width: 20px; height: 20px; object-fit: contain; display: block; }

/* ---------- 用户条：仪表盘 / 后台 / 退出 图标按钮 ---------- */
.ub-guest { display: inline-flex; align-items: center; gap: 6px; }
.ub-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #c8d0dc; flex: none;
  box-shadow: 0 0 0 3px rgba(200, 208, 220, .25);
}
.ub-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ub-icon {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent;
  background: #f4f7fb; color: #5b6a80; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.ub-icon:hover { background: #e9f1fd; color: var(--primary); border-color: #d6e4f8; transform: translateY(-1px); }
.user-bar { gap: 8px; }

/* =========================================================================
   一、登录首页（第一级界面）：LOGO 动画 + 登录卡
   ========================================================================= */
.lg {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; align-items: center; justify-content: center;
  overflow: auto;
  background: #fbfcfe;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--lk-ink);
}
html.authed .lg { display: none; }

/* 背景：柔光斑 + 细网格 */
.lg-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lg-scene::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(239, 75, 35, .10), transparent 62%),
    radial-gradient(820px 520px at 88% 82%, rgba(27, 79, 156, .10), transparent 60%),
    linear-gradient(180deg, #fdfefe 0%, #f7f9fd 100%);
}
.lg-mesh {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(16, 24, 40, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
}
.lg-orb {
  position: absolute; border-radius: 50%; opacity: .9;
  animation: lgFloat 13s ease-in-out infinite;
}
.lg-orb.orb-a { width: 620px; height: 620px; left: -180px; top: -60px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 138, 92, .30) 0%, rgba(255, 138, 92, .10) 42%, rgba(255, 138, 92, 0) 70%); }
.lg-orb.orb-b { width: 700px; height: 700px; right: -200px; bottom: -220px; animation-delay: -4s;
  background: radial-gradient(circle at 50% 50%, rgba(96, 154, 235, .26) 0%, rgba(96, 154, 235, .09) 44%, rgba(96, 154, 235, 0) 72%); }
.lg-orb.orb-c { width: 460px; height: 460px; left: 40%; top: -180px; animation-delay: -7s;
  background: radial-gradient(circle at 50% 50%, rgba(255, 196, 120, .26) 0%, rgba(255, 196, 120, .08) 45%, rgba(255, 196, 120, 0) 72%); }
@keyframes lgFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -22px, 0) scale(1.08); }
}

.lg-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1120px;
  padding: 40px;
  display: grid; grid-template-columns: 1.04fr .96fr;
  align-items: center; gap: 56px;
}

/* --- 左侧品牌区 --- */
.lg-side { padding: 8px 0; }
.lg-logo-stage { position: relative; display: inline-block; padding: 6px 4px; }
.lg-logo {
  position: relative; z-index: 2; display: block;
  width: min(360px, 78%); height: auto;
}
.lg-halo {
  position: absolute; left: 50%; top: 50%; width: 190px; height: 190px; margin: -95px 0 0 -95px;
  border-radius: 50%; border: 1px solid rgba(239, 75, 35, .35);
  opacity: 0; z-index: 1;
}
.lg-sweep {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 8px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .92) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-150%);
}
.lg-slogan {
  margin: 18px 0 0; font-size: 12px; letter-spacing: 3px; color: var(--lk-orange);
  font-weight: 700; text-transform: uppercase;
}
.lg-tagline {
  margin: 12px 0 0; font-size: 30px; line-height: 1.36; font-weight: 800; letter-spacing: .5px;
  color: #0f172a;
}
.lg-feats { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.lg-feats li {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: #465468;
}
.lg-feats i {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--lk-blue);
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef3fb; box-shadow: inset 0 0 0 1px #e0e9f7;
}
.lg-copy { margin: 30px 0 0; font-size: 11.5px; color: #98a2b3; letter-spacing: .3px; }

/* --- 右侧登录卡 --- */
.lg-card {
  background: #fff; border: 1px solid var(--lk-line);
  border-radius: 20px; padding: 30px 30px 24px;
  box-shadow: 0 26px 60px -24px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .04);
  width: 100%; max-width: 430px; justify-self: end;
}
.lg-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.lg-mark {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(160deg, #fff8f5 0%, #fff 100%);
  box-shadow: inset 0 0 0 1px #f2e6e0;
  display: inline-flex; align-items: center; justify-content: center;
}
.lg-mark img { width: 28px; height: 28px; object-fit: contain; }
.lg-h-txt h2 { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.lg-h-txt p { margin-top: 3px; font-size: 12.5px; color: #8a94a6; }

.lg-field { display: block; margin-bottom: 14px; }
.lg-lab {
  display: block; font-size: 12px; font-weight: 600; color: #5a6678; margin-bottom: 6px;
  letter-spacing: .2px;
}
.lg-field input {
  width: 100%; height: 44px; padding: 0 13px;
  border: 1px solid #e3e9f2; border-radius: 11px;
  font-size: 14px; color: var(--lk-ink); background: #fafbfe;
  font-family: inherit;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.lg-field input::placeholder { color: #b4bccb; }
.lg-field input:hover { border-color: #d5deec; }
.lg-field input:focus {
  outline: none; background: #fff; border-color: #f0855f;
  box-shadow: 0 0 0 4px rgba(239, 75, 35, .11);
}
.lg-pwd { position: relative; display: block; }
.lg-pwd input { padding-right: 44px; }
.lg-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px;
  color: #98a2b3; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.lg-eye:hover { background: #f2f5fa; color: #5b6a80; }
.lg-eye.on { color: var(--lk-orange); }

.lg-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; }
.lg-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #6b7688; cursor: pointer; }
.lg-check input { width: 15px; height: 15px; accent-color: var(--lk-orange); }
.lg-forgot {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-size: 12.5px; color: #8a94a6; font-family: inherit;
}
.lg-forgot:hover { color: var(--lk-orange); }

.lg-msg { min-height: 18px; font-size: 12.5px; color: #e5484d; line-height: 1.4; padding: 2px 0 0; }
.lg-msg.info { color: #1a73e8; }

.lg-submit {
  width: 100%; height: 46px; margin-top: 4px; border: 0; border-radius: 12px;
  background: linear-gradient(96deg, #f2542a 0%, #ef4b23 55%, #d93f1a 100%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 1px; font-family: inherit;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 12px 22px -12px rgba(239, 75, 35, .85);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.lg-submit em { font-style: normal; transition: transform .18s; }
.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 26px -12px rgba(239, 75, 35, .9); }
.lg-submit:hover em { transform: translateX(3px); }
.lg-submit:active { transform: translateY(0); }
.lg-submit.busy { filter: saturate(.75) brightness(.98); pointer-events: none; }
.lg-submit.busy::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff;
  animation: lgSpin .7s linear infinite;
}
.lg-submit.busy em { display: none; }
@keyframes lgSpin { to { transform: rotate(360deg); } }

.lg-guest {
  width: 100%; height: 40px; margin-top: 10px; border-radius: 11px;
  border: 1px solid #e3e9f2; background: #fff; color: #5b6a80;
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.lg-guest:hover { background: #f7f9fc; border-color: #d5deec; color: #33405a; }

.lg-hint {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #f6f9ff; border: 1px solid #e3edfb; color: #4a6a9b;
  font-size: 12px; line-height: 1.55;
}

/* --- 动画：入场 + 左侧品牌区常驻循环 ---
 * 设计约束：循环动画只用 transform / opacity（合成层属性，不触发回流），
 * 且全部发生在 .lg-side 内部；右侧登录卡始终静止，不会随循环抖动。
 */
.lg-logo-stage { contain: layout; transform-origin: 50% 50%; }
.lg.play .lg-logo { animation: lgLogoIn .9s cubic-bezier(.22, .75, .2, 1) both; }
/* 呼吸：常驻无限循环（位移+微缩放，不影响任何盒子尺寸） */
.lg.play .lg-logo-stage { animation: lgBreath 7s ease-in-out 1.2s infinite; }
/* 光环：两圈错开相位，无限向外扩散 */
.lg.play .lg-halo { animation: lpHalo 3.6s ease-out .3s infinite; }
.lg.play .lg-halo.h2 { animation-delay: 2.1s; }
/* 扫光：每轮留出停顿，避免循环时出现「从右边瞬移回左边」的突兀感 */
.lg.play .lg-sweep { animation: lgSweep 5.6s cubic-bezier(.4, .1, .2, 1) 1.1s infinite; }
.lg.play .lg-slogan { animation: lgUp .7s cubic-bezier(.22, .75, .2, 1) .38s both; }
.lg.play .lg-tagline { animation: lgUp .8s cubic-bezier(.22, .75, .2, 1) .46s both; }
.lg.play .lg-feats li { animation: lgUp .7s cubic-bezier(.22, .75, .2, 1) both; }
.lg.play .lg-feats li:nth-child(1) { animation-delay: .62s; }
.lg.play .lg-feats li:nth-child(2) { animation-delay: .72s; }
.lg.play .lg-feats li:nth-child(3) { animation-delay: .82s; }
.lg.play .lg-copy { animation: lgUp .7s ease .9s both; }
/* 登录卡只入场一次；动画结束后不再参与任何重放（保证永不跳位） */
.lg.play .lg-card { animation: lgCardIn .8s cubic-bezier(.22, .75, .2, 1) .2s both; }

@keyframes lgLogoIn {
  0% { opacity: 0; transform: translateY(16px) scale(.86); filter: blur(10px); }
  55% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes lgBreath {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -5px, 0) scale(1.012); }
}
/* 首尾都是 opacity 0，循环衔接处没有突变 */
@keyframes lpHalo {
  0% { opacity: 0; transform: scale(.5); }
  14% { opacity: .5; }
  70% { opacity: .12; }
  100% { opacity: 0; transform: scale(2.15); }
}
@keyframes lgSweep {
  0%, 46% { transform: translateX(-155%) skewX(-14deg); opacity: 0; }
  52% { opacity: .95; }
  80% { opacity: .85; }
  94%, 100% { transform: translateX(240%) skewX(-14deg); opacity: 0; }
}
@keyframes lgUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lgCardIn {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* 登录失败：卡片轻微抖动（选择器需压过入场动画的 .lg.play .lg-card，否则不生效） */
.lg.play .lg-card.shake { animation: lgShake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes lgShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* 登录成功：LOGO 放大淡出 → 露出二级界面 */
.lg-done {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; pointer-events: none; z-index: 5;
}
.lg-done img { width: 240px; max-width: 46vw; height: auto; }
.lg.leaving { animation: lgOut .46s cubic-bezier(.4, 0, .2, 1) forwards; pointer-events: none; }
.lg.leaving .lg-done { display: flex; }
.lg.leaving .lg-done img { animation: lgDoneZoom .46s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes lgOut { to { opacity: 0; visibility: hidden; } }
@keyframes lgDoneZoom {
  0% { opacity: .35; transform: scale(.9); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35); }
}

@media (max-width: 1000px) {
  .lg-inner { grid-template-columns: 1fr; gap: 30px; padding: 32px 22px; max-width: 560px; }
  .lg-card { justify-self: center; max-width: 460px; }
  .lg-side { text-align: center; }
  .lg-logo { width: min(300px, 72%); margin: 0 auto; }
  .lg-feats { max-width: 320px; margin-left: auto; margin-right: auto; }
  .lg-tagline { font-size: 24px; }
  .lg-copy { display: none; }
}
@media (max-width: 560px) {
  .lg-card { padding: 22px 18px 18px; border-radius: 16px; }
  .lg-tagline { font-size: 20px; }
  .lg-feats { display: none; }
}

/* =========================================================================
   二、数据仪表盘（登录后的第一界面，独立板块）
   ========================================================================= */
.dash {
  position: fixed; inset: 0; z-index: 900;
  display: none; flex-direction: column;
  background: #f4f7fb;
  color: var(--lk-ink);
}
.dash.show { display: flex; }
.dash.enter { animation: dashIn .42s ease both; }
@keyframes dashIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 顶栏 */
.dash-top {
  flex: none; height: 60px; padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--lk-line);
  position: sticky; top: 0; z-index: 5;
}
.dt-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dt-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dt-name b { font-size: 15px; font-weight: 800; letter-spacing: .4px; }
.dt-name i {
  font-style: normal; font-size: 11.5px; color: #8a94a6; letter-spacing: .6px;
  border-left: 1px solid #e3e9f2; padding-left: 8px; white-space: nowrap;
}
.dt-nav { display: flex; gap: 4px; margin-left: 10px; background: #f1f4f9; padding: 3px; border-radius: 10px; }
.dt-tab {
  height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent;
  font-size: 13px; color: #5b6a80; font-family: inherit; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.dt-tab:hover { color: #1a73e8; }
.dt-tab.on { background: #fff; color: #101828; font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.dt-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.dt-admin {
  height: 30px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid #e3e9f2; background: #fff; color: #4a5668; font-size: 12.5px; font-family: inherit;
}
.dt-admin:hover { border-color: #cfdcf0; color: #1a73e8; background: #f7faff; }
.dt-user { display: flex; align-items: center; gap: 8px; }
.dtu-txt { display: flex; flex-direction: column; line-height: 1.2; }
.dtu-txt b { font-size: 12.5px; }
.dtu-txt i { font-style: normal; font-size: 10.5px; color: #98a2b3; }
.dtu-out {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: #f4f7fb;
  color: #5b6a80; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.dtu-out:hover { background: #fdeceb; color: #e5484d; }

.dash-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.dash-scroll::-webkit-scrollbar { width: 10px; }
.dash-scroll::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 8px; border: 3px solid #f4f7fb; }
.dash-main { max-width: 1440px; margin: 0 auto; padding: 12px 24px 40px; }

/* v2.1：全局导航已有品牌区，隐藏二级 header，消除导航与「下午好」之间的空白 */
#dash-view .dash-top { display: none; }

/* v2.1：订单报表并入仪表盘（内嵌订单报表模块） */
.dash-reports { padding-bottom: 6px; }
.dash-reports-frame {
  display: block; width: 100%; height: 920px; border: 0; border-radius: 10px;
  background: transparent;
}

/* 抬头 */
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 22px;
  padding: 0 2px 14px; flex-wrap: wrap;
}
.dh-hello { font-size: 13px; color: #7b8698; margin-bottom: 6px; }
.dash-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: .4px; }
.dh-sub { margin-top: 8px; font-size: 12.5px; color: #7b8698; line-height: 1.6; }
.dh-sub b { color: #1a73e8; }
.dh-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.dq {
  height: 36px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--lk-line); background: #fff; color: #4a5668;
  font-size: 12.5px; font-family: inherit; display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .15s, box-shadow .15s, transform .15s, color .15s;
}
.dq em { font-style: normal; font-weight: 700; color: #1a73e8; font-variant-numeric: tabular-nums; }
.dq:hover { border-color: #cfe0f7; color: #1a73e8; box-shadow: 0 4px 12px -6px rgba(26, 115, 232, .4); transform: translateY(-1px); }

/* 筛选条 */
.dash-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--lk-line); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.df-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: #98a2b3;
  padding-right: 6px; border-right: 1px solid #eef2f8; margin-right: 2px;
}
.dash-filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #7b8698; }
.dash-filters select {
  height: 32px; padding: 0 26px 0 10px; border-radius: 8px;
  border: 1px solid #e3e9f2; background: #fbfcfe; color: #33405a; font-size: 12.5px;
  font-family: inherit; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.dash-filters select:hover { border-color: #cfdcf0; }
.dash-filters select:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); background-color: #fff; }
.df-reset {
  margin-left: auto; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid #e3e9f2; background: #fff; color: #7b8698; font-size: 12.5px; font-family: inherit;
}
.df-reset:hover { color: #e5484d; border-color: #f6d5d4; background: #fffafa; }

/* KPI 卡片 */
.dash-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.dash-kpi {
  position: relative; text-align: left; cursor: pointer; font-family: inherit;
  background: #fff; border: 1px solid var(--lk-line); border-radius: 14px;
  padding: 15px 16px 13px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  transition: transform .18s cubic-bezier(.3, .7, .3, 1), box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.dash-kpi::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 115, 232, .10), transparent 70%);
}
.dash-kpi:hover { transform: translateY(-2px); border-color: #cfe0f7; box-shadow: 0 12px 26px -16px rgba(16, 24, 40, .32); }
.dash-kpi .dk-ico {
  position: absolute; right: 12px; top: 12px; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f2f6fd; color: #1a73e8;
}
.dash-kpi b {
  display: block; font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; color: #101828;
}
.dash-kpi .dk-lab { display: block; margin-top: 6px; font-size: 12.5px; color: #5b6a80; font-weight: 600; }
.dash-kpi em { display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: #98a2b3; }
.dk-go {
  position: absolute; right: 14px; bottom: 12px; font-style: normal; font-size: 11px;
  color: #1a73e8; opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s;
}
.dash-kpi:hover .dk-go { opacity: 1; transform: none; }
.dash-kpi.tone-good .dk-ico { background: #eaf7ef; color: #0e9f6e; }
.dash-kpi.tone-good b { color: #0b7a55; }
.dash-kpi.tone-brand .dk-ico { background: #eaf1fd; color: #1a73e8; }
.dash-kpi.tone-warn .dk-ico { background: #fff6e6; color: #d97706; }
.dash-kpi.tone-warn b { color: #b45309; }
.dash-kpi.tone-bad .dk-ico { background: #fdeceb; color: #e5484d; }
.dash-kpi.tone-bad b { color: #c62828; }

/* 图表卡片 */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-card {
  background: #fff; border: 1px solid var(--lk-line); border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.dc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dc-head h3 { font-size: 13.5px; font-weight: 700; color: #101828; letter-spacing: .2px; }
.dc-sub { font-size: 11px; color: #a3adbd; }
.dash-empty { padding: 26px 0; text-align: center; font-size: 12px; color: #a3adbd; }

/* 环形图 */
.dash-donut-wrap { display: flex; align-items: center; gap: 16px; }
.dash-donut {
  width: 118px; height: 118px; border-radius: 50%; flex: none; position: relative;
  animation: donutIn .55s cubic-bezier(.3, .7, .3, 1) both;
}
@keyframes donutIn { from { opacity: 0; transform: scale(.9) rotate(-12deg); } to { opacity: 1; transform: none; } }
.dash-donut-hole {
  position: absolute; inset: 22px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px #f1f4f9;
}
.dash-donut-hole b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-donut-hole span { font-size: 10.5px; color: #98a2b3; }
.dash-legend { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.dl-row {
  display: grid; grid-template-columns: 8px 1fr auto auto; align-items: center; gap: 8px;
  padding: 5px 6px; border: 0; background: transparent; border-radius: 7px;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: background .14s;
}
.dl-row:hover { background: #f6f9fe; }
.dl-row i { width: 8px; height: 8px; border-radius: 3px; }
.dl-row span { font-size: 12px; color: #4a5668; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row b { font-size: 12px; font-variant-numeric: tabular-nums; color: #101828; }
.dl-row em { font-style: normal; font-size: 10.5px; color: #a3adbd; width: 30px; text-align: right; }

/* 条形图 */
.dash-bars { display: grid; gap: 6px; }
.db-row {
  display: grid; grid-template-columns: 76px 1fr 40px 10px; align-items: center; gap: 9px;
  border: 0; background: transparent; padding: 4px 4px; border-radius: 8px;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: background .14s;
}
.db-row:hover { background: #f6f9fe; }
.db-lab { font-size: 12px; color: #4a5668; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-track { height: 9px; border-radius: 6px; background: #f1f4f9; overflow: hidden; }
.db-fill {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #2f86f6, #7cc4ff);
  transform-origin: left center;
  animation: barIn .55s cubic-bezier(.25, .8, .3, 1) both;
}
@keyframes barIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.db-val { font-size: 12px; font-weight: 700; color: #101828; text-align: right; font-variant-numeric: tabular-nums; }
.db-go { font-size: 11px; color: #1a73e8; opacity: 0; transition: opacity .14s; }
.db-row:hover .db-go { opacity: 1; }

/* 折线图 */
.dash-trend-wrap { position: relative; }
.dash-trend { width: 100%; height: 132px; display: block; overflow: visible; }
.dash-trend .dt-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: trendDraw 1.1s cubic-bezier(.4, .1, .2, 1) .1s forwards; }
@keyframes trendDraw { to { stroke-dashoffset: 0; } }
.dash-trend .dt-hit { cursor: pointer; }
.dash-trend .dt-hit:hover { fill: rgba(26, 115, 232, .07); }
.dash-trend-vals {
  display: flex; justify-content: space-between; padding: 2px 2px 0;
  font-size: 10.5px; color: #a3adbd; font-variant-numeric: tabular-nums;
}

/* 待处理 */
.dash-alerts-card { margin-bottom: 14px; }
.dash-alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dash-alert {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
  border: 1px solid #eef2f8; background: #fbfcfe; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .16s, background .16s, transform .16s;
}
.dash-alert:hover { background: #fff; border-color: #d8e5f8; transform: translateY(-1px); }
.da-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef3fb; color: #1a73e8;
}
.da-ico.warn { background: #fff6e6; color: #d97706; }
.da-ico.bad { background: #fdeceb; color: #e5484d; }
.da-ico.info { background: #eaf1fd; color: #1a73e8; }
.da-main { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.da-main b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.da-main span { font-size: 12px; color: #4a5668; font-weight: 600; }
.da-main em { font-style: normal; font-size: 11px; color: #98a2b3; }
.da-go { margin-left: auto; font-style: normal; color: #1a73e8; opacity: .5; transition: opacity .16s, transform .16s; }
.dash-alert:hover .da-go { opacity: 1; transform: translateX(2px); }

.dash-foot { text-align: center; font-size: 11.5px; color: #a3adbd; padding: 8px 0 4px; }

@media (max-width: 1280px) {
  .dash-kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .dash-main { padding: 16px 14px 30px; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-alerts { grid-template-columns: 1fr; }
  .dt-name i, .dt-admin { display: none; }
  .dash-hero h1 { font-size: 20px; }
}

/* =========================================================================
   三、游客浏览：客户隐私保护
   ========================================================================= */
/* 游客隐藏所有「录入 / 导入 / 认领」入口，只保留公开地点搜索与底图 */
body.guest-mode #customer-form,
body.guest-mode .import-block,
body.guest-mode .lead-row,
body.guest-mode #picked-poi,
body.guest-mode #form-badge,
body.guest-mode .pane-top,
body.guest-mode #filters { display: none !important; }
/* v70：游客态**正是**要显示演示横幅的时刻，旧规则把它藏了，导致「示例数据」提示从未出现过。
 * 注意不能加 !important —— 否则用户点「清掉示例」时内联 display:none 盖不住，横幅会赖着不走。 */
body.guest-mode .demo-banner { display: flex; }

body.guest-mode #block-new { padding-bottom: 6px; }
body.guest-mode .omni-hint { color: #7b8698; }

/* 底部说明：游客不展示「默认显示杭州市已合作客户」，改为隐私提示 */
.footer-tip-guest { display: none !important; }
body.guest-mode .footer-tip { display: none !important; }
body.guest-mode .footer-tip-guest {
  display: -webkit-box !important;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 客户信息锁卡片 */
.guest-lock {
  margin: 18px 16px; padding: 26px 20px 24px; text-align: center;
  border: 1px dashed #dbe4f0; border-radius: 14px; background: #fbfcfe;
}
.guest-lock .gl-ico {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px;
  background: #eef3fb; color: #5b7db1; display: flex; align-items: center; justify-content: center;
}
.guest-lock b { display: block; font-size: 14px; color: #33405a; }
.guest-lock p { margin: 8px 0 16px; font-size: 12.5px; line-height: 1.65; color: #8592a6; }
.guest-lock .btn-primary { flex: none; width: 128px; height: 36px; margin: 0 auto; display: block; }

/* 地图上的游客提示条 */
.guest-banner {
  position: absolute; left: 50%; transform: translateX(-50%); top: 14px; z-index: 7;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 9px 12px 9px 14px; border-radius: 999px;
  background: rgba(255, 251, 245, .97); border: 1px solid #f3dcbd;
  box-shadow: 0 8px 22px -12px rgba(120, 80, 20, .45);
  font-size: 12.5px; color: #8a5b12;
}
.guest-banner b { font-size: 12.5px; color: #7a4f00; white-space: nowrap; }
.guest-banner span { color: #9a7433; }
.guest-banner button {
  height: 26px; padding: 0 11px; border-radius: 999px; cursor: pointer;
  border: 0; background: #ef4b23; color: #fff; font-size: 12px; font-family: inherit; white-space: nowrap;
}
.guest-banner button:hover { filter: brightness(1.06); }

/* 地图左上角「返回数据仪表盘」 */
.dash-back {
  position: absolute; left: 16px; top: 16px; z-index: 7;
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid #e3e9f2; background: rgba(255, 255, 255, .96);
  color: #33405a; font-size: 12.5px; font-family: inherit;
  box-shadow: 0 6px 16px -10px rgba(16, 24, 40, .45);
  transition: color .15s, border-color .15s, transform .15s;
}
.dash-back:hover { color: #1a73e8; border-color: #cfe0f7; transform: translateY(-1px); }

/* 管理后台：仪表盘已独立 */
.ac-nav-out {
  margin-left: auto; font-style: normal; font-size: 9.5px; color: #8a94a6;
  background: #eef2f8; border-radius: 999px; padding: 1px 6px; letter-spacing: .2px;
}


/* hidden 属性优先：避免 class 上的 display:flex/grid 覆盖 [hidden] 导致元素「该藏没藏」 */
[hidden] { display: none !important; }

/* =====================================================================
 * 提报审核（客户状态徽标 / 列表里的待审核行 / 管理后台审核页）
 * ===================================================================== */
/* 列表里的状态徽标：待审核 / 已驳回 */
.ci-st {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .2px;
  padding: 1px 6px; border-radius: 20px; white-space: nowrap;
}
.ci-st.pending { background: #fff7e6; color: #b45309; border: 1px solid #fcd34d; }
.ci-st.rejected { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
/* 未审核的行整体降饱和，一眼区分「正式客户 / 还在走流程」 */
.customer-list li.ci-pending, .customer-list li.ci-rejected { background: #fbfcfe; }
.customer-list li.ci-pending .ci-name, .customer-list li.ci-rejected .ci-name { color: #475569; }
.ci-note {
  margin-top: 4px; font-size: 11px; color: #b91c1c;
  background: #fef2f2; border-left: 2px solid #fca5a5; padding: 3px 6px; border-radius: 4px;
}

/* 统计条里的「待审核 N 项」按钮（管理员可见） */
.stat-review {
  font: inherit; font-size: 11px; font-weight: 700; color: #b45309;
  background: #fff7e6; border: 1px solid #fcd34d; border-radius: 20px;
  padding: 1px 8px; cursor: pointer; white-space: nowrap;
}
.stat-review:hover { background: #fde68a; color: #92400e; }
/* 成员视角：我自己提报、还在等审核的数量 */
.stat-wait {
  font-size: 11px; font-weight: 700; color: #64748b;
  background: #eef2f8; border-radius: 20px; padding: 1px 8px; white-space: nowrap;
}

/* 管理后台导航上的待办计数 */
.ac-nav-badge {
  font-style: normal; margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: #fff; background: #ef4444; border-radius: 20px;
}

/* 审核页的行 */
.ac-row.ac-rev { align-items: flex-start; }
.ac-rev-meta { color: var(--ink-3); }
.ac-tag.rev { background: #fff7e6; color: #b45309; }
.btn-mini.ok { border-color: #86efac; color: #15803d; background: #f0fdf4; }
.btn-mini.ok:hover { border-color: #22c55e; color: #14532d; background: #dcfce7; }

/* 字段差异：旧值删除线 → 新值高亮 */
.ac-diff { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.ac-diff-row {
  display: grid; grid-template-columns: 78px 1fr 1fr; gap: 6px; align-items: baseline;
  font-size: 11.5px; line-height: 1.5;
}
.ac-diff-row i { font-style: normal; color: var(--ink-3); }
.ac-diff-row del {
  color: #94a3b8; text-decoration: line-through; word-break: break-all;
  background: #f8fafc; border-radius: 4px; padding: 1px 5px;
}
.ac-diff-row ins {
  color: #0f766e; text-decoration: none; word-break: break-all;
  background: #ecfdf5; border-radius: 4px; padding: 1px 5px;
}
.ac-rev-diff { background: #fcfdff; }

/* 地图容器内的文本不要被误选中：双击手势产生选区后再拖动会像「地图跟着鼠标漂」 */
#map, #map .amap-marker, #map .amap-marker * { user-select: none; -webkit-user-select: none; }
#map .amap-marker img, #map .amap-marker-content img { -webkit-user-drag: none; }

/* 页面本体不滚动：滚动都发生在内部容器（登录页 / 仪表盘 / 侧栏）里 */
html, body { overflow: hidden; }

/* ================= 「获取数据」替代入口（导出收归主管理员后的三选一） ================= */
.gd-modal { max-width: 420px; }
.gd-tip { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; color: #6b7280; }
.gd-opts { display: flex; flex-direction: column; gap: 8px; }
.gd-opt {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line, #e6eaf0); border-radius: 10px;
  background: #fff; cursor: pointer; font-family: inherit;
}
.gd-opt:hover { border-color: #b9c6db; background: #f8fafc; }
.gd-opt b { font-size: 13px; color: var(--ink, #1f2937); }
.gd-opt span { font-size: 11.5px; color: #8a94a6; line-height: 1.5; }

/* ================= 客户详情面板（双击地图标记后在「客户信息」tab 顶部展开） ================= */
.dp {
  position: sticky; top: 0; z-index: 6;
  margin: 0 0 10px; padding: 10px 12px 12px;
  background: #fff; border: 1px solid var(--line, #e6eaf0); border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
}
.dp-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #f0f3f7; }
.dp-title { font-size: 14px; font-weight: 700; color: var(--ink, #1f2937); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-badge { flex: none; padding: 1px 7px; border-radius: 999px; background: #eef2ff; color: #4457a8; font-size: 11px; }
.dp-sp { flex: 1 1 auto; }
.dp-mini {
  flex: none; height: 24px; min-width: 26px; padding: 0 7px;
  border: 1px solid var(--line, #e6eaf0); border-radius: 7px; background: #fff;
  color: #6b7280; font-size: 12px; font-family: inherit; cursor: pointer;
}
.dp-mini:hover { background: #f5f7fa; color: #374151; }

.dp-body { max-height: 46vh; overflow-y: auto; padding: 4px 0 2px; }
.dp-group { margin-top: 8px; }
.dp-group:first-child { margin-top: 0; }
.dp-gt { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: .04em; margin: 6px 0 4px; }
.dp-row { display: flex; align-items: flex-start; gap: 10px; padding: 3px 0; font-size: 12.5px; line-height: 1.5; }
.dp-k { flex: none; width: 96px; color: #8a94a6; }
.dp-v { flex: 1 1 auto; color: var(--ink, #1f2937); word-break: break-all; }
.dp-row.dp-empty .dp-v { color: #c3cad6; }
.dp-star { font-style: normal; color: #f59e0b; font-size: 10px; margin-left: 3px; }
.dp-link { color: #1a73e8; text-decoration: none; }
.dp-link:hover { text-decoration: underline; }

.dp-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #f0f3f7; }
.dp-btn {
  height: 28px; padding: 0 12px; border: 1px solid var(--line, #e6eaf0); border-radius: 8px;
  background: #fff; color: #374151; font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.dp-btn:hover { background: #f5f7fa; border-color: #d5dbe4; }
.dp-btn.dp-danger { color: #b91c1c; border-color: #f3c9c9; }
.dp-btn.dp-danger:hover { background: #fef2f2; }

.dp-collapsed .dp-body, .dp-collapsed .dp-acts { display: none; }
.dp-collapsed .dp-head { border-bottom: 0; padding-bottom: 0; }

/* 无障碍：系统开启「减少动态效果」时，动画瞬间走完（保留 forwards 终态，不会停在半截） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
 * v1.4 UI 打磨层（追加于末尾，靠层叠覆盖上方旧规则）
 * 目标：美观（品牌渐变/微动效/焦点环）+ 实用性（滚动条/可达性/hover 反馈）
 * ========================================================= */

/* 1. 全局细滚动条：不再出现粗黑滚动条破坏观感 */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cfd6df; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #b6c0cc; }
*::-webkit-scrollbar-track { background: transparent; }

/* 2. 主按钮：品牌渐变 + 投影 + 按压反馈 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #42a5f5);
  box-shadow: 0 2px 6px rgba(30, 136, 229, .3);
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-d), #1e88e5); box-shadow: 0 3px 10px rgba(30, 136, 229, .38); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(30, 136, 229, .3); }

/* 3. 幽灵按钮 hover 反馈 */
.btn-ghost { transition: border-color .15s, background .15s, color .15s; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: #f6faff; }

/* 4. 客户列表行：hover 轻浮起，建立「这一行是可点的」的手感 */
.customer-list li { transition: border-color .15s, box-shadow .15s, transform .15s; }
.customer-list li:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(30, 136, 229, .12); transform: translateY(-1px); }

/* 5. 筛选 chip hover 反馈 */
.filter-chip { transition: border-color .15s, box-shadow .15s, opacity .15s; }
.filter-chip:hover { border-color: var(--primary); box-shadow: 0 1px 5px rgba(30, 136, 229, .14); }

/* 6. 表单控件统一焦点环（原来只有 #search 有，新增表单没有） */
#customer-form input:focus,
#customer-form select:focus,
#customer-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, .12);
}

/* 7. 地图悬浮按钮：加投影与 hover 反馈，与底图拉开层次 */
.locate-btn {
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  transition: background .15s, box-shadow .15s, transform .12s;
}
.locate-btn:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .18); }

/* 8. 键盘可达性：Tab 聚焦时统一焦点框 */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid rgba(30, 136, 229, .6);
  outline-offset: 1px;
}

/* 9. 详情面板字段行 hover：长面板逐行核对时不看串行 */
.dp-row { transition: background .12s; border-radius: 6px; }
.dp-row:hover { background: #f6f9fd; }

/* 10. 动效守卫补充：上面新加的 transition 同样尊重「减少动态效果」系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .customer-list li, .filter-chip, .btn-primary, .btn-ghost, .locate-btn, .dp-row, .poi-claim-btn {
    transition: none !important;
    animation: none !important;
  }
}

/* ==================================================================
   路线规划面板（15-route.js）
   位置：地图区右下，避开右侧详情面板；宽度控制在 320px 内，不遮地图主体
   ================================================================== */
.route-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 320px;
  max-height: min(64vh, 560px);
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
  z-index: 99990;
  overflow: hidden;
  font: 13px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif;
}
.route-panel.on { display: flex; }

.rp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-bottom: 1px solid #eef3fa;
}
.rp-head b { font-size: 13.5px; color: #101828; letter-spacing: .2px; }
.rp-close {
  width: 24px; height: 24px; border: 0; border-radius: 7px;
  background: transparent; color: #98a2b3; font-size: 18px; line-height: 1;
  cursor: pointer; transition: background .15s, color .15s;
}
.rp-close:hover { background: #f2f4f7; color: #475467; }

.rp-meta { padding: 9px 14px 4px; color: #667085; font-size: 12.5px; }
.rp-meta b { color: #0b4ed6; }

.rp-tools {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px 9px; border-bottom: 1px dashed #eef3fa;
}
.rp-from { display: inline-flex; align-items: center; gap: 6px; color: #475467; font-size: 12.5px; cursor: pointer; }
.rp-from input { accent-color: #0b4ed6; }
.rp-link {
  border: 0; background: transparent; color: #0b4ed6; font-size: 12.5px;
  cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.rp-link:hover { background: #eef4ff; }

.rp-list {
  list-style: none; margin: 0; padding: 6px 8px;
  overflow-y: auto; flex: 1 1 auto;
}
.rp-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 7px; border-radius: 9px; transition: background .15s;
}
.rp-item:hover { background: #f7faff; }
.rp-no {
  flex: 0 0 21px; height: 21px; border-radius: 50%;
  background: #fff4e8; color: #c2410c; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #fed7aa; margin-top: 1px;
}
.rp-txt { flex: 1 1 auto; min-width: 0; }
.rp-txt b { display: block; color: #101828; font-size: 12.8px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-txt i { display: block; color: #98a2b3; font-size: 11.5px; font-style: normal;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-focus {
  flex: 0 0 auto; border: 1px solid #e6edf7; background: #fff; color: #475467;
  font-size: 11.5px; padding: 2px 7px; border-radius: 7px; cursor: pointer;
}
.rp-focus:hover { border-color: #b2ccff; color: #0b4ed6; background: #f5f9ff; }

.rp-foot {
  display: flex; gap: 7px; padding: 10px 12px;
  border-top: 1px solid #eef3fa; background: #fcfdff;
}
.rp-go {
  flex: 1 1 auto; height: 34px; border: 0; border-radius: 9px;
  background: #f97316; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter .15s, transform .1s;
}
.rp-go:hover { filter: brightness(1.05); }
.rp-go:active { transform: scale(.985); }
.rp-copy, .rp-clear {
  height: 34px; padding: 0 11px; border-radius: 9px; cursor: pointer;
  border: 1px solid #e6edf7; background: #fff; color: #475467; font-size: 12.5px;
}
.rp-copy:hover { border-color: #b2ccff; color: #0b4ed6; }
.rp-clear:hover { border-color: #fda29b; color: #d92d20; }

/* 地图标记上的路线序号 */
.route-badge {
  position: absolute; top: -7px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 8px; background: #f97316; color: #fff;
  font: 700 10.5px/16px system-ui, sans-serif; text-align: center;
  font-style: normal; box-shadow: 0 2px 6px rgba(249, 115, 22, .45);
  pointer-events: none;
}
.route-pin { position: relative; }

/* 路线按钮激活态（圈选模式） */
.route-btn.on { background: #fff4e8; color: #c2410c; box-shadow: inset 0 0 0 1.5px #fdba74; }

@media (max-width: 720px) {
  .route-panel { right: 8px; left: 8px; width: auto; bottom: 76px; max-height: 54vh; }
}

.rp-tools-right { display: inline-flex; align-items: center; gap: 2px; }
.rp-link.on { background: #fff4e8; color: #c2410c; font-weight: 600; }

/* ==================================================================
   跟进提醒（16-followup.js）
   列表行色条 + 「X 天」角标 + 顶部待回访筛选条
   ================================================================== */
.fu-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 8px; flex-wrap: wrap;
}
.fu-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 8px;
  border: 1px solid #e6edf7; background: #fff; color: #475467;
  font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.fu-chip b { color: #0b4ed6; font-size: 12.5px; }
.fu-chip:hover { border-color: #b2ccff; background: #f7faff; }
.fu-chip.on { background: #fff4e8; border-color: #fdba74; color: #c2410c; font-weight: 600; }
.fu-chip.on b { color: #c2410c; }
.fu-split { display: inline-flex; gap: 6px; font-size: 11.5px; }
.fu-split i { font-style: normal; padding: 1px 6px; border-radius: 6px; }
.fu-split .fu-d { background: #fef3f2; color: #b42318; }
.fu-split .fu-w { background: #fffaeb; color: #b54708; }
.fu-split .fu-c { background: #f2f4f7; color: #475467; }

/* 名称后的「X 天」角标 */
.fu-mark {
  display: inline-flex; align-items: center; height: 16px;
  padding: 0 5px; margin-left: 5px; border-radius: 7px;
  font-size: 10.5px; font-weight: 600; line-height: 1;
  vertical-align: 1px; white-space: nowrap;
}
.fu-mark.fu-danger { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.fu-mark.fu-warn   { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
.fu-mark.fu-cold   { background: #f2f4f7; color: #667085; border: 1px solid #e4e7ec; }

/* 行内左侧色条已由 .ci-bar 承担，这里只补「待回访」行的轻微底纹提示 */
.customer-list li.fu-danger { background: linear-gradient(90deg, #fff7f6 0%, transparent 42%); }
.customer-list li.fu-warn   { background: linear-gradient(90deg, #fffcf3 0%, transparent 42%); }

/* 仪表盘「今日待回访」卡片强化 */
.dash-alert#da-followup .da-ico.warn { background: #fff4e8; color: #c2410c; }

/* ==================================================================
   业绩时间对比（dashboard.js perfCard）
   本月 vs 上月，按负责人逐行对比，带环比与排名变化
   ================================================================== */
.dash-perf .pf-total {
  display: flex; gap: 12px; margin: 4px 0 14px;
}
.pf-tile {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #f7faff, #fff);
  border: 1px solid #eef3fa;
}
.pf-tile .pf-t { font-size: 12px; color: #667085; }
.pf-tile b { font-size: 24px; font-weight: 700; color: #101828; line-height: 1.2; letter-spacing: -.5px; }
.pf-tile .pf-prev { font-size: 11.5px; color: #98a2b3; }
.pf-tile .pf-up { color: #079455; font-size: 12px; font-style: normal; font-weight: 600; }
.pf-tile .pf-down { color: #d92d20; font-size: 12px; font-style: normal; font-weight: 600; }
.pf-tile .pf-flat { color: #98a2b3; font-size: 12px; font-style: normal; }

.pf-table { display: flex; flex-direction: column; }
.pf-tr {
  display: grid;
  grid-template-columns: 1.5fr .85fr .7fr .75fr .85fr .7fr .75fr .8fr;
  align-items: center; gap: 6px;
  width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: 9px;
  background: transparent; font: inherit; font-size: 12.5px; color: #344054;
  cursor: pointer; transition: background .15s;
}
.pf-tr:hover { background: #f7faff; }
.pf-th {
  font-size: 11.5px; color: #98a2b3; font-weight: 600;
  border-bottom: 1px solid #eef3fa; border-radius: 0; cursor: default;
  padding-bottom: 7px; margin-bottom: 2px;
}
.pf-th:hover { background: transparent; }
.pf-c1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pf-c1 b { font-weight: 600; color: #101828; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 9.5px; font-weight: 700; font-style: normal; color: #fff;
}
.pf-medal.m1 { background: #f5a524; }
.pf-medal.m2 { background: #98a2b3; }
.pf-medal.m3 { background: #c98a5b; }
.pf-n { font-variant-numeric: tabular-nums; font-weight: 600; color: #101828; }
.pf-n.dim { color: #98a2b3; font-weight: 400; }
.pf-pct { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 5px; border-radius: 5px; }
.pf-pct.up { color: #079455; background: #ecfdf3; }
.pf-pct.down { color: #d92d20; background: #fef3f2; }
.pf-pct.flat { color: #667085; background: #f2f4f7; }
.pf-pct.new { color: #0b4ed6; background: #eef4ff; font-size: 10px; letter-spacing: .3px; }
.pf-rk { font-size: 11.5px; font-weight: 600; }
.pf-rank-up { color: #079455; }
.pf-rank-down { color: #d92d20; }
.pf-rank-flat { color: #98a2b3; }
.pf-rank-new { color: #0b4ed6; background: #eef4ff; padding: 1px 5px; border-radius: 5px; font-size: 10.5px; }

/* ==================================================================
   移动端适配（<= 768px）
   场景：销售在外面用手机查客户 / 打卡 / 导航，核心诉求是「地图要大、
   手指能点、不用缩放」。策略：
     1) 侧栏改成抽屉，默认收起，底部悬浮按钮唤出；
     2) 地图占满全屏，工具按钮加大到 44px 拇指友好尺寸；
     3) 顶栏导航横向滚动，不再折行；
     4) 弹窗类统一 92vw，表格类允许横向滚动。
   ================================================================== */
@media (max-width: 768px) {
  /* 顶栏：横向滚动，隐藏次要信息 */
  .dash-top { height: 54px; padding: 0 12px; gap: 10px; }
  .dt-brand .dt-name i { display: none; }
  .dt-nav {
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex: 1 1 auto;
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 12px), transparent);
  }
  .dt-nav::-webkit-scrollbar { display: none; }
  .dt-tab { flex: 0 0 auto; height: 30px; padding: 0 11px; font-size: 12.5px; }
  .dt-user { flex: 0 0 auto; }
  .dt-user .ub-name { display: none; }

  /* 主容器：地图全屏 */
  #app { position: relative; }
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 520;
    width: min(88vw, 360px); flex: none;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0);
    will-change: transform;
  }
  #app.side-open #sidebar {
    transform: translateX(0);
    box-shadow: 0 8px 40px rgba(15, 23, 42, .28);
  }
  #app.side-open::after {
    content: ''; position: fixed; inset: 0; z-index: 510;
    background: rgba(15, 23, 42, .38);
    -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
  }
  #map-wrap { width: 100%; }

  /* 侧栏开关：底部左侧悬浮 */
  #side-toggle {
    position: fixed; left: 12px; bottom: 18px; z-index: 500;
    display: flex !important; align-items: center; gap: 6px;
    height: 44px; padding: 0 15px 0 13px; border-radius: 22px;
    border: 0; background: #1a73e8; color: #fff;
    font-size: 13px; font-weight: 600; font-family: inherit;
    box-shadow: 0 6px 20px rgba(26, 115, 232, .38);
    cursor: pointer; transition: transform .12s;
  }
  #side-toggle:active { transform: scale(.95); }
  #side-toggle svg { width: 17px; height: 17px; }

  /* 地图工具按钮：加大到 44px，靠近右手拇指 */
  .map-tools { bottom: 18px; right: 10px; gap: 10px; }
  .map-tools > .locate-btn { flex: 0 0 44px; width: 44px; height: 44px; }
  .locate-btn svg { width: 22px; height: 22px; }
  .dash-back { top: 10px !important; left: 10px !important; padding: 7px 12px !important; font-size: 12px !important; }

  /* 路线面板：底部抽屉式 */
  .route-panel {
    right: 8px !important; left: 8px !important; bottom: 76px !important;
    width: auto !important; max-height: 62vh !important;
  }
  .rp-tr { grid-template-columns: 1.6fr 1fr 1fr 1fr; }

  /* 仪表盘：单列 + 更紧凑 */
  .dash-main { padding: 12px 12px 40px; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dash-grid { grid-template-columns: 1fr !important; }
  .dash-hero h1 { font-size: 19px; }
  .dash-hero { padding: 14px; }
  .dash-card { padding: 12px; border-radius: 12px; }
  .dc-head h3 { font-size: 14px; }

  /* 业绩对比表：允许横向滚动，避免挤成一团 */
  .dash-perf .pf-total { flex-direction: column; }
  .pf-table { overflow-x: auto; }
  .pf-tr { min-width: 560px; }
  .pf-th { position: sticky; top: 0; }

  /* 弹窗：贴近全屏 */
  .auth-card, .claim-card, .dp-panel, .cmd-card, .modal-card {
    width: 92vw !important; max-width: 92vw !important;
  }
  .claim-card, .dp-panel { max-height: 88vh !important; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn-primary { flex: 1 1 100%; }
}

/* 触摸设备：去掉 hover 依赖，加大点击区 */
@media (hover: none) and (pointer: coarse) {
  .ci-actions button { padding: 6px 9px; font-size: 12px; }
  .customer-list li { padding-top: 10px; padding-bottom: 10px; }
  .bubble-hover, .hover-card { display: none !important; }
}

/* 极窄屏（<= 380px）二次压缩 */
@media (max-width: 380px) {
  .dash-kpis { grid-template-columns: 1fr; }
  .dt-tab { padding: 0 9px; font-size: 12px; }
  .fu-bar { padding: 6px 8px; }
}

/* 桌面端默认隐藏移动端抽屉开关（<=768px 时由媒体查询改为 flex） */
#side-toggle { display: none; }

/* ==================================================================
   空状态引导卡（app/07-dashboard-link.js）
   ================================================================== */
.empty-guide {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
  padding: 28px 18px 26px; margin: 8px 4px;
  border: 1px dashed #d5e2f5; border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}
.empty-guide .eg-ico { font-size: 34px; line-height: 1; }
.empty-guide b { font-size: 13.5px; color: #101828; }
.empty-guide p {
  margin: 0; max-width: 30em;
  font-size: 12px; line-height: 1.7; color: #667085;
}

/* ============================================================
   P0 统一外壳：全局顶部导航 + 内嵌模块视图（19-shell.js）
   布局：品牌「联客宝 · 客户管理CRM系统」在左，9 项导航紧跟其右
   ============================================================ */
.global-nav { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  height: 56px; padding: 0 22px;
  align-items: center; gap: 16px;
  background: #fff;
  border-bottom: 1px solid #e4e9f2;
  box-shadow: 0 1px 6px rgba(16,24,40,.06);
}
html.authed .global-nav { display: flex; }
/* v56：导航键位置固定——tabs 不再居中伸缩，「返回/用户区」一律推到最右，切换页面绝不移动 */
.global-nav .dt-right { margin-left: auto !important; }
.gn-brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.gn-brand img { width: 38px; height: 38px; border-radius: 9px; }
.gn-brand b { font-size: 17px; font-weight: 800; color: #101828; letter-spacing: .3px; }
.gn-brand i { font-size: 12px; font-style: normal; color: #98a2b3; border-left: 1px solid #e4e9f2; padding-left: 10px; }
/* 版本号徽章：与 window.APP_VERSION 实时同步（18-version.js 填充） */
.gn-brand .gn-ver {
  font-style: normal; font-size: 10.5px; font-weight: 700; color: #1a6fe0;
  background: #eaf3ff; border: 1px solid #cfe2fb; border-radius: 999px;
  padding: 2px 8px; line-height: 1.4; letter-spacing: .3px; white-space: nowrap;
}
.gn-tabs { display: flex; align-items: center; justify-content: flex-start; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; min-width: 0; padding: 0 6px; }
.gn-tabs::-webkit-scrollbar { display: none; }
.gn-tabs .dt-tab {
  flex: none; height: 35px; padding: 0 18px; border-radius: 10px; font-size: 13.5px; letter-spacing: .2px;
  background: transparent; border: 0; color: #475467; cursor: pointer;
  position: relative; transition: color .15s, background .15s;
}
.gn-tabs .dt-tab:hover { color: #1a73e8; background: #f2f6fd; }
.gn-tabs .dt-tab.on { background: linear-gradient(135deg, #1a73e8, #4b9bff); color: #fff; font-weight: 600; box-shadow: 0 4px 12px -4px rgba(26, 115, 232, .55); }
.gn-tabs .dt-tab.gn-disabled { color: #b6bfce; cursor: not-allowed; }
.gn-tabs .dt-tab.gn-disabled:hover { color: #b6bfce; background: transparent; }

/* 仪表盘顶栏与全局导航合并：隐藏旧品牌区，保留右侧用户/管理入口 */
html.authed .dash { top: 52px; }
html.authed .dash-top .dt-brand { display: none; }
html.authed #app { height: calc(100vh - 56px); padding-top: 56px; box-sizing: border-box; }

/* 内嵌模块视图：盖住地图层，低于仪表盘层，iframe 占满 */
#embed-view { position: fixed; left: 0; right: 0; top: 52px; bottom: 0; z-index: 890; background: #f4f7fb; }
#embed-view[hidden] { display: none; }
#embed-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

@media (max-width: 768px) {
  .global-nav { padding: 0 10px; gap: 8px; height: 50px; }
  .gn-brand i { display: none; }
  .gn-brand b { font-size: 13px; }
  .gn-tabs .dt-tab { height: 30px; padding: 0 11px; font-size: 12.5px; }
  html.authed .dash { top: 46px; }
  html.authed #app { height: calc(100vh - 50px); padding-top: 50px; }
  #embed-view { top: 46px; }
}

/* =====================================================================
   双面板改版（v29）：左「新增客户」+ 右「客户信息」+ 折叠 + 拓客找店 + 公海
   ===================================================================== */
#panel-right {
  width: 372px;
  flex: 0 0 372px;
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -1px 0 0 rgba(15, 23, 42, .02);
}
.pr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 12px;
}
.pr-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #26b47f 0%, #4f9df7 60%, #7cc4ff 100%);
}
.pr-title { display: flex; align-items: center; gap: 8px; }
.pr-title b { font-size: 15px; color: var(--ink); }
.pr-title .count-pill {
  font-size: 11px; padding: 1px 8px; border-radius: 10px;
  background: var(--brand-soft, #e8f1fd); color: var(--brand, #1a73e8); font-weight: 700;
}

/* 折叠 / 恢复按钮 */
.panel-fold {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: #7c8798;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.panel-fold:hover { color: var(--brand); border-color: var(--brand); background: #f5f9ff; }
.panel-expand {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 480;
  height: 34px; padding: 0 10px; border-radius: 0 9px 9px 0;
  border: 1px solid var(--line); border-left: 0; background: #fff;
  color: #3c4254; font-size: 12.5px; cursor: pointer;
  box-shadow: 3px 3px 12px rgba(15, 23, 42, .10);
}
.panel-expand.right { right: 0; border-radius: 9px 0 0 9px; border-left: 1px solid var(--line); border-right: 0; }
.panel-expand.left { left: 0; }
.panel-expand:hover { color: var(--brand); }

/* 折叠态：隐藏对应面板，地图铺满 */
#app.left-closed #sidebar { display: none; }
#app.right-closed #panel-right { display: none; }

/* 公海按钮组 */
.pt-btns { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.pt-btns .block-btn { white-space: nowrap; }
#pool-toggle.active { background: var(--primary, #1a73e8); color: #fff; border-color: var(--primary, #1a73e8); }

/* 列表行内「认领」按钮 */
.ci-actions .claim-one { color: #0a7d54; font-weight: 600; }
.ci-actions .claim-one:hover { background: #e6f7ef; }

/* 拓客找店 */
.prospect-block {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 10px 0 12px; background: #fbfdff;
}
.prospect-block .ib-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.prospect-block .ib-tip { font-size: 10.5px; color: #a9b4c2; }
.pb-row { display: flex; gap: 6px; }
.pb-row #prospect-kw { flex: 1 1 auto; min-width: 0; }
.pb-row #prospect-radius { width: 76px; flex: none; }
.pb-row .btn-mini.primary { flex: none; }
.pb-row input {
  height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 12.5px; outline: none; background: #fff;
}
.pb-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(26, 115, 232, .12); }
.pb-hint { font-size: 10.5px; color: #a9b4c2; margin-top: 6px; line-height: 1.5; }
.prospect-list { list-style: none; margin: 8px 0 0; padding: 0; }
.prospect-list .pl-loading, .prospect-list .pl-empty {
  padding: 10px 6px; font-size: 12px; color: #8b96a6; text-align: center;
}
.prospect-list .pl-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; border-top: 1px dashed #eef1f6;
}
.prospect-list .pl-item:first-child { border-top: 0; }
.pl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-main b { font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.pl-main span { font-size: 11px; color: #8b96a6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-acts { flex: none; display: flex; gap: 5px; }
.oi-pill.dup {
  font-style: normal; font-size: 10px; padding: 0 6px; border-radius: 8px;
  background: #eef1f6; color: #8b96a6; font-weight: 600;
}

/* 中小屏适配 */
@media (max-width: 1280px) {
  #sidebar, #panel-right { width: 340px; flex: 0 0 340px; }
}
@media (max-width: 1024px) {
  #sidebar, #panel-right { width: 320px; flex: 0 0 320px; }
}
@media (max-width: 768px) {
  /* 右侧面板在移动端变成抽屉（默认折叠，见 20-panels.js），由「客户信息 ›」按钮唤出 */
  #panel-right {
    position: fixed; right: 0; top: 0; bottom: 0; z-index: 520;
    width: min(88vw, 360px); flex: none;
    box-shadow: -8px 0 40px rgba(15, 23, 42, .28);
  }
  .panel-expand { top: auto; bottom: 66px; transform: none; z-index: 500; }
}

/* =====================================================================
   v30 微调：极简左面板头部 / 拓客找店按钮化 / 结果列表滚动 / 右面板最右
   ===================================================================== */
.side-header.slim {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
}
.side-header.slim .sh-title { font-size: 15px; color: var(--ink); }
.side-header.slim::before { content: ""; }

/* 拓客找店按钮：与认领商家同款 UI */
#prospect-toggle.active { background: var(--primary, #1a73e8); color: #fff; border-color: var(--primary, #1a73e8); }
.prospect-block { margin-top: 8px; }
.prospect-block[hidden] { display: none; }
.prospect-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.prospect-list::-webkit-scrollbar { width: 6px; }
.prospect-list::-webkit-scrollbar-thumb { background: #dfe5ee; border-radius: 6px; }

/* lead-row 三个按钮排布 */
.lead-row { flex-wrap: wrap; }

/* v31：拓客找店半径改为下拉选择 */
.pb-row select {
  width: 84px; flex: none; height: 30px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 12px; outline: none; background: #fff; color: var(--ink);
}
.pb-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(26, 115, 232, .12); }

/* ============ v32：数据仪表盘四板块一屏布局 ============ */
.dash-hero.slim { padding: 10px 18px 6px; }
.dash-hero.slim .dh-hello { font-size: 15px; margin: 0; }
.dash-hero.slim .dh-hello em { font-size: 12px; color: #8a93a3; font-style: normal; }

.dash-grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 232px);
  min-height: 460px;
  margin: 10px 18px 0;
}
.dash-card.b4 {
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
  background: #fff; border: 1px solid #e7ebf2; border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 22px -18px rgba(16, 24, 40, .35);
}
.dash-card.b4 .dc-head { flex: none; display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.dash-card.b4 .dc-head h3 { margin: 0; font-size: 14.5px; }
.dash-card.b4 .dc-sub { font-size: 11.5px; color: #98a2b3; }

.dash-kpis.mini3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; flex: none; }
.dash-kpi.mini { padding: 7px 10px; border-radius: 10px; }
.dash-kpi.mini b { font-size: 17px; }
.dash-kpi.mini .dk-lab { margin-top: 2px; font-size: 11px; }

.b4-tablewrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.b4-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.b4-table th, .b4-table td { padding: 5px 8px; border-bottom: 1px solid #f0f2f6; text-align: left; white-space: nowrap; }
.b4-table thead th { position: sticky; top: 0; background: #f7f9fc; font-size: 11.5px; color: #5b6a80; z-index: 1; }
.b4-table thead th i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }
.b4-table td.tt { font-weight: 700; color: #1a73e8; }
.b4-table td.good { color: #188038; font-weight: 600; }
.b4-table tr.dim th, .b4-table tr.dim td { color: #98a2b3; }
.b4-table th em { font-style: normal; font-size: 10.5px; color: #c1c7d0; }
.b4-note { flex: none; margin: 8px 0 0; font-size: 11.5px; color: #8a93a3; }

.dash-foot { margin: 8px 18px 0; font-size: 11.5px; color: #98a2b3; }

/* 合作内容：原生下拉单选（v32） */
.coop-single {
  width: 100%; height: 38px; padding: 0 10px;
  border: 1px solid var(--line, #dde3ec); border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--ink, #1f2733); outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%238a93a3' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.coop-single:focus { border-color: var(--brand, #1a73e8); box-shadow: 0 0 0 3px rgba(26, 115, 232, .12); }

@media (max-width: 1100px) {
  .dash-grid4 { grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(280px, auto)); height: auto; }
}

/* ============ v33：板块跳转 + 数据筛选 ============ */
.dash-card.b4 [data-jump] { cursor: pointer; transition: background .15s; }
.dash-card.b4 tr[data-jump]:hover { background: #f3f8ff; }
.dash-card.b4 .dash-kpi[data-jump]:hover { border-color: #1a73e8; box-shadow: 0 10px 22px -16px rgba(26, 115, 232, .45); }
.dash-filters label { white-space: nowrap; }

/* ============ v34：导航返回键 ============ */
.gn-tabs .dt-tab.gn-back { color: #1a73e8; font-weight: 600; background: #f2f6fd; border: 1px solid #d7e5fb; margin-right: 6px; }
.gn-tabs .dt-tab.gn-back:hover { background: #e7f0ff; }

/* ============ v36：① 客户数据（提报数 / 合作内容占比 / 新老客户） ============ */
.b4-sub { flex: none; margin: 8px 0 4px; font-size: 11.5px; font-weight: 600; color: #667085; }
.dash-kpis.mini4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 2px; flex: none; }
.b4 .dash-kpi.mini { padding: 5px 8px; border-radius: 9px; }
.b4 .dash-kpi.mini b { font-size: 15px; }
.b4 .dash-kpi.mini .dk-lab { margin-top: 1px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b4 .b4-sub { margin: 6px 0 3px; }
.b4 .dash-card.b4 { padding: 10px 12px; }
.ck-table th, .ck-table td { padding: 4px 8px; }
.ck-bar { display: inline-block; width: 78px; height: 6px; border-radius: 4px; background: #eef2f8; overflow: hidden; vertical-align: 1px; margin-right: 6px; }
.ck-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4d9bff, #1a73e8); }
.ck-pct { font-style: normal; font-size: 11px; color: #8a93a3; }
@media (max-width: 1400px) { .dash-kpis.mini4 { grid-template-columns: repeat(2, 1fr); } }

/* ============ v37：左栏=市场开发数据 / 右栏=新增客户+客户信息上下分区 ============ */
/* 右栏加宽（含新增客户表单 + 客户信息列表） */
#panel-right { width: 460px; flex: 0 0 460px; }
@media (max-width: 1440px) { #panel-right { width: 400px; flex: 0 0 400px; } }

/* 右栏上下分区 */
#side-scroll-r { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
.pr-sec { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; flex: none; }
.pr-sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: #f7f9fc; border-bottom: 1px solid #eef1f6;
}
.pr-sec-head b { font-size: 13.5px; color: #101828; }
.pr-sec-sub { font-size: 11px; color: #98a2b3; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-sec-toggle {
  flex: none; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 11.5px;
  border: 1px solid #d7e5fb; background: #fff; color: #1a73e8; cursor: pointer;
}
.pr-sec-toggle:hover { background: #f2f6fd; }
.pr-sec-head2 { border-top: 0; background: #eef4ff; }
.pr-sec-head2 b { color: #0b4ed6; }
.pr-sec-body { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.pr-sec-body[hidden] { display: none; }

/* 左栏：市场开发销售数据面板 */
.md-panel { display: flex; flex-direction: column; height: 100%; }
.md-panel .md-head {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 8px;
  border-bottom: 1px solid #eef1f6; flex: none;
}
.md-panel .md-head b { font-size: 13.5px; color: #101828; }
.md-panel .md-sub { font-size: 11px; color: #98a2b3; flex: 1; }
.md-refresh {
  flex: none; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 11.5px;
  border: 1px solid #d7e5fb; background: #fff; color: #1a73e8; cursor: pointer;
}
.md-refresh:hover { background: #f2f6fd; }
.md-panel .md-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 16px; overscroll-behavior: contain; }
.md-panel .dash-kpis.mini3 { grid-template-columns: repeat(2, 1fr); }

/* 财务板块的排行序号 */
.b4-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-right: 6px; border-radius: 5px;
  font-size: 10px; font-style: normal; background: #eef2f8; color: #667085;
}
.pr-sec-body.is-collapsed { display: none !important; }
.pr-sec.is-collapsed .pr-sec-head { border-bottom: 0; }

/* ============ v38：财务板块 客户销售排行 ============ */
.b4-rank.top { background: #fff1e6; color: #c2410c; font-weight: 700; }
#board-finance .b4-tablewrap { min-height: 90px; }
#board-finance .b4-table th, #board-finance .b4-table td { padding: 4px 8px; }
/* 财务卡片内容紧凑化（消除溢出） */
#board-finance .dash-kpis.mini3 { gap: 6px; margin-bottom: 6px; }
#board-finance .b4-sub { margin: 5px 0 3px; }
#board-finance .b4-tablewrap:last-of-type { max-height: 104px; }
#board-finance .b4-tablewrap { min-height: 0 !important; }

/* ============ v39：财务板块双排行并排 + 美化 ============ */
.fin-tables { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.45fr 1fr; gap: 10px; }
.fin-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.fin-col .b4-sub { display: flex; align-items: baseline; gap: 6px; margin: 0 0 5px; }
.fin-col .b4-sub em { font-style: normal; font-weight: 400; font-size: 10.5px; color: #98a2b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-col .b4-tablewrap { flex: 1; min-height: 0; border: 1px solid #eef1f6; border-radius: 10px; }
.fin-tbl thead th { background: #f4f7fc; font-weight: 600; }
.fin-tbl tbody tr:hover { background: #f7faff; }
.fin-tbl td.warn { color: #c2410c; }
#board-finance .b4-tablewrap:last-of-type { max-height: none; }

/* ============ v40：财务板块 日/月统计 + 布局美化 ============ */
/* KPI 卡片：渐变底 + 细边框，修复内部 5px 溢出 */
#board-finance .dash-kpi.mini {
  padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff, #f5f8fd);
  border: 1px solid #edf1f8;
}
#board-finance .dash-kpi.mini b { font-size: 15.5px; line-height: 1.25; display: block; white-space: nowrap; }
#board-finance .dash-kpi.mini .dk-lab { font-size: 10.5px; }
#board-finance .dash-kpi.mini.tone-good b { color: #0b7a55; }
#board-finance .dash-kpi.mini.tone-warn b { color: #b45309; }
#board-finance .dash-kpi.mini.tone-bad b { color: #c62828; }
#board-finance .dash-kpi.mini.tone-brand { background: linear-gradient(180deg, #f3f8ff, #e9f1fe); border-color: #d8e6fb; }
#board-finance .dash-kpi.mini.tone-brand b { color: #1a66d0; }
/* 日/月组与前 4 个 KPI 之间留呼吸感 */
#board-finance .dash-kpis.mini4 { gap: 8px; row-gap: 8px; margin-bottom: 10px; }
/* 排行标题：左侧色条 + 更清晰的层级 */
.fin-col .b4-sub { padding-left: 9px; border-left: 3px solid #1a73e8; border-radius: 2px; }
.fin-col:last-child .b4-sub { border-left-color: #d97706; }
.fin-col .b4-sub b { font-size: 12.5px; color: #1f2733; }
.fin-col .b4-sub em { flex: 1; text-align: right; }
/* 表格：行高再紧凑一点，占比条加宽 */
.fin-tbl th, .fin-tbl td { padding: 4.5px 8px; }
.fin-tbl .ck-bar { width: 110px; }
.fin-tbl td.tt { font-variant-numeric: tabular-nums; }

/* ============ v41：财务板块排行榜在上、KPI 在下；排行显示更多行 ============ */
#board-finance .fin-tables { flex: 1; min-height: 0; }
#board-finance .dash-kpis.mini4.fin-kpi-bottom { flex: none; margin: 10px 0 0; }
#board-finance .b4-tablewrap { min-height: 0 !important; max-height: none !important; }

/* ============ v42：排行榜占 2/3 高度 + 占比列缩窄 ============ */
/* 排行区与 KPI 区按 2:1 分配剩余高度 */
#board-finance .fin-tables { flex: 2 1 0; }
#board-finance .dash-kpis.mini4.fin-kpi-bottom { flex: 0 0 auto; }
#board-finance .dash-kpi.mini { padding: 6px 9px; }
#board-finance .dash-kpi.mini b { font-size: 14.5px; }
/* 占比列固定窄宽：进度条缩短、百分比紧跟其后不再被拉伸 */
.fin-tbl th:last-child, .fin-tbl td:last-child { width: 118px; }
.fin-tbl .ck-bar { width: 64px; margin-right: 5px; }
.fin-tbl .ck-pct { font-size: 10.5px; }

/* v42b：客户名过长省略号截断，确保销售排行 4 列一行全显 */
.fin-tbl th:first-child, .fin-tbl td:first-child { max-width: 168px; overflow: hidden; text-overflow: ellipsis; }
.fin-tbl th:last-child, .fin-tbl td:last-child { width: 96px; }

/* ============ v44：双排行等宽 + 内容自适应 ============ */
.fin-tables { grid-template-columns: 1fr 1fr; }
/* 欠款排行只有两列，客户名列放开宽度自适应；销售排行保持 168px 截断 */
.fin-col:last-child .fin-tbl th:first-child,
.fin-col:last-child .fin-tbl td:first-child { max-width: none; }

/* ============ v46：欢迎语移到导航栏右侧 + 删除底部说明 + 板块扩大 ============ */
.dt-hello {
  font-size: 12px; color: #667085; white-space: nowrap;
  margin-right: 10px; align-self: center;
}
.dt-hello em { font-style: normal; color: #98a2b3; }
.dt-hello b { color: #1a73e8; font-weight: 600; }
.dash-grid4 { height: calc(100vh - 168px); }

/* ============ v47：数据筛选栏（品牌蓝渐变 + 尺寸优化） ============ */
.dash-filters {
  background: linear-gradient(102deg, #eaf2ff 0%, #f2f7ff 42%, #f8fbff 78%, #ffffff 100%);
  border: 1px solid #d6e4fb;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 0 18px 10px;
  gap: 8px 12px;
  box-shadow: 0 1px 2px rgba(26, 115, 232, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
  position: relative;
  overflow: hidden;
}
/* 左侧品牌色竖条，与卡片标题色条呼应 */
.dash-filters::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #1a73e8, #4b9bff 60%, rgba(75, 155, 255, 0));
}
.dash-filters .df-title {
  font-size: 11.5px; letter-spacing: 1.2px; color: #2c62b8;
  border-right: 1px solid #cfe0fa; padding-right: 10px; margin-right: 0;
}
.dash-filters label { gap: 5px; font-size: 12px; color: #56637a; }
.dash-filters select {
  height: 30px; min-width: 92px; max-width: 150px;
  padding: 0 24px 0 9px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid #d3e2f8; background-color: rgba(255, 255, 255, .92); color: #2c3a52;
  background-position: right 7px center;
}
.dash-filters select:hover { border-color: #9fc3f2; background-color: #fff; }
.dash-filters select:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, .14); }
.dash-filters .df-reset {
  height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid #cfe0fa; background: rgba(255, 255, 255, .8); color: #3f6ba8;
}
.dash-filters .df-reset:hover { color: #c0392b; border-color: #f0c4bf; background: #fff; }
/* 窄屏自动换行时保持行距舒适 */
@media (max-width: 1320px) {
  .dash-filters { padding: 8px 10px; gap: 6px 8px; }
  .dash-filters select { min-width: 78px; max-width: 118px; }
}

/* ============ v47：KPI 迷你趋势曲线 ============ */
.dash-kpi.mini .spark {
  display: block; width: 100%; height: 20px; margin-top: 3px;
  overflow: visible; pointer-events: none;
}
#board-finance .dash-kpi.mini .spark { height: 18px; margin-top: 2px; }
/* 卡片高度自适应，避免加了曲线后溢出 */
.dash-kpi.mini { overflow: hidden; }

/* ============ v47：市场开发数据 迷你销售漏斗 + 左栏折叠优化 ============ */
.mini-funnel { flex: none; margin-bottom: 8px; padding: 8px 9px; border: 1px solid #eef1f6; border-radius: 10px; background: #fbfcfe; }
.mini-funnel .frow { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.mini-funnel .frow-lab { flex: none; width: 58px; font-size: 11.5px; color: #56637a; text-align: right; }
.mini-funnel .frow-bar { position: relative; flex: 1; height: 16px; border-radius: 4px; background: #eef2f8; overflow: hidden; }
.mini-funnel .frow-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4b9bff, #1a73e8); transition: width .4s; }
.mini-funnel .frow:first-child .frow-bar i { background: linear-gradient(90deg, #9dc5ff, #6ba6ff); }
.mini-funnel .frow:last-child .frow-bar i { background: linear-gradient(90deg, #34b57f, #0b7a55); }
.mini-funnel .frow-bar em { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 10.5px; font-weight: 700; color: #24344d; }
/* 左栏折叠后标题竖排显示 */
#app.left-closed #sidebar .sh-title { writing-mode: vertical-rl; letter-spacing: 4px; }

/* ============ v47：客户地图 新增客户/认领按钮优化 ============ */
/* 三个入口按钮做成统一卡片式：认领/拓客是主要动作（品牌色），清空重填弱化 */
.lead-row { gap: 8px; }
.lead-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  border: 1px solid #d3e2f8; background: #fff; color: #1a66d0;
  transition: box-shadow .15s, background .15s, border-color .15s;
}
.lead-btn:hover { background: #f2f7ff; border-color: #9fc3f2; box-shadow: 0 3px 10px -6px rgba(26, 115, 232, .5); }
.lead-btn.claim { background: linear-gradient(135deg, #1a73e8, #4b9bff); border-color: transparent; color: #fff; }
.lead-btn.claim:hover { background: linear-gradient(135deg, #1663cc, #3a8df5); }
.lead-btn.active, .lead-btn.on { background: #0b4ed6 !important; color: #fff; }
/* 认领/拓客模式的浮动提示条更醒目 */
.claim-hint, #claim-hint {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(90deg, #0b4ed6, #1a73e8); color: #fff;
  border-radius: 0 0 10px 10px; padding: 8px 12px; font-size: 12.5px;
  box-shadow: 0 6px 16px -8px rgba(11, 78, 214, .6);
}
/* 表单必填星号 */
#customer-form input[required], #customer-form select[required] { border-left: 3px solid #1a73e8; }

/* =====================================================================
   v48-1  全域搜索条（导航下方常驻，横跨地图 + 两侧面板）
   ===================================================================== */
/* 有搜索条时，地图容器自身高度扣掉搜索条 */
#app.v48 { position: relative; }
#app.v48 { height: calc(100vh - var(--gs-h, 58px)); margin-top: var(--gs-h, 58px); }

/* 已登录：导航 52px；搜索条改为导航下方「居中悬浮」工具条（v53），不再占满整行 */
html.authed #app.v48 {
  height: calc(100vh - 56px); padding-top: 56px; box-sizing: border-box;
  margin-top: 0;
}
html.authed #app.v48 #sidebar,
html.authed #app.v48 #map-wrap,
html.authed #app.v48 #panel-right { margin-top: 0; height: 100%; }
@media (max-width: 1280px) {
  html.authed #app.v48 { height: calc(100vh - 50px); padding-top: 50px; }
}
html:not(.authed) #app.v48 #sidebar,
html:not(.authed) #app.v48 #map-wrap,
html:not(.authed) #app.v48 #panel-right { margin-top: 0; height: 100%; }

.gsearch {
  --gs-h: 52px;
  /* v54：在客户地图内「左右对齐平铺」——起点=左栏右缘，终点=右栏左缘，绝不遮挡两栏 */
  position: absolute; left: 368px; right: 452px; transform: none;
  top: 64px; z-index: 950;   /* 导航 56px + 间距 8px（absolute 相对 #app 边缘，需自行加上导航高度） */
  width: auto; height: var(--gs-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  background: linear-gradient(102deg, #ffffff 0%, #f7faff 60%, #f2f7ff 100%);
  border: 1px solid #d9e5f8; border-radius: 13px;
  box-shadow: 0 10px 28px -12px rgba(15, 35, 80, .35), 0 2px 6px rgba(15, 35, 80, .08);
}
html:not(.authed) .gsearch { top: 10px; }
@media (max-width: 1280px) { html.authed .gsearch { top: 58px; } }
@media (max-width: 1440px) { .gsearch { left: 342px; right: 412px; } }
@media (max-width: 1280px) { .gsearch { left: 318px; right: 384px; } }
.gs-wrap { position: relative; flex: 1 1 auto; min-width: 200px; max-width: 640px; }
#search {
  width: 100%; height: 36px; border-radius: 10px;
  padding: 0 34px 0 34px;
  border: 1px solid #d7e2f4; background: #fff;
  font-size: 13px; color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
#search::placeholder { color: #a9b6c9; }
#search:hover { border-color: #bcd2f2; }
#search:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, .13); }
.gsearch .omni-ico { left: 12px; color: #7d93b3; }

/* 半径选择 */
.gs-scope {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 8px 0 10px;
  border: 1px solid #d7e2f4; border-radius: 10px; background: #fff;
}
.gs-scope-lab { font-size: 11px; color: #8494ab; letter-spacing: .3px; }
.gs-scope select {
  height: 26px; border: 0; outline: none; background: transparent;
  font-size: 12.5px; font-weight: 600; color: #12489c; cursor: pointer;
  padding-right: 2px;
}

/* 快捷品类 */
.gs-quick { flex: none; display: flex; gap: 6px; }
.gs-chip {
  height: 28px; padding: 0 11px; border-radius: 20px;
  border: 1px solid #d7e2f4; background: #fff; color: #3a5b8c;
  font-size: 12px; cursor: pointer; transition: all .14s; white-space: nowrap;
}
.gs-chip:hover { background: #eaf2ff; border-color: #a8c6f2; color: #0b4ed6; }
.gs-chip:active { transform: scale(.97); }

/* 视野内开关 */
.gs-map {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid #d7e2f4; background: #fff; color: #3a5b8c;
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .14s;
}
.gs-map:hover { background: #eaf2ff; border-color: #a8c6f2; }
.gs-map.on { background: linear-gradient(135deg, #1a73e8, #4b9bff); border-color: transparent; color: #fff; }

/* 状态提示（薄条，不抢视线） */
.gs-status {
  flex: 0 1 auto; margin: 0; padding-left: 6px;
  font-size: 11px; color: #7b8ca3; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 380px;
}
/* 拓客找店按钮引导时的高亮呼吸 */
.gsearch.flash { animation: gsFlash 1.8s ease-out; }
@keyframes gsFlash {
  0%, 100% { box-shadow: 0 2px 10px -8px rgba(15, 23, 42, .3); }
  30% { box-shadow: 0 0 0 3px rgba(26, 115, 232, .35); background: linear-gradient(102deg, #e2edff, #f2f7ff); }
}

/* 搜索下拉（fixed，横跨地图与面板） */
.gs-list { max-height: min(58vh, 440px); overflow-y: auto; z-index: 900; }
.gs-list::-webkit-scrollbar { width: 7px; }
.gs-list::-webkit-scrollbar-thumb { background: #dde5f0; border-radius: 7px; }
.oi-ico.near { background: #e8f6ee; }
.oi-ico.addr { background: #f0ecff; }
.oi-dist {
  display: inline-block; font-style: normal; font-size: 10px; font-weight: 700;
  color: #0a7d54; background: #e6f7ef; border-radius: 20px;
  padding: 0 6px; margin-right: 5px; line-height: 15px; vertical-align: 1px;
}
.omni-group .og-tip {
  margin-left: auto; font-style: normal; font-weight: 500;
  font-size: 10px; color: #a8b4c6; letter-spacing: 0;
}
.omni-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 9px 2px; margin-top: 3px; border-top: 1px solid #eef2f8;
  font-size: 10px; color: #a8b4c6;
}
.omni-foot i { font-style: normal; }

/* 无搜索条时的兼容（游客 / 未登录同样显示搜索条，仅隐藏客户结果） */
body:not(.dash-open) .gsearch { display: flex; }

/* =====================================================================
   v48-2  左栏「市场开发数据」= 三张可折叠卡片
   ===================================================================== */
#sidebar { width: 356px; flex: 0 0 356px; }
@media (max-width: 1440px) { #sidebar { width: 330px; flex: 0 0 330px; } }
@media (max-width: 1280px) { #sidebar { width: 306px; flex: 0 0 306px; } }

#side-scroll { padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 9px; }

.md-card {
  border: 1px solid #e4ebf5; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.md-card.grow { flex: 1 1 auto; }
.md-card-head {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px; background: linear-gradient(180deg, #fbfdff, #f6f9fe);
  border-bottom: 1px solid #eef2f8; flex: none;
}
.md-ico {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: #e8f0ff; color: #1a73e8;
}
.md-ico.funnel { background: #fff2e6; color: #d97706; }
.md-ico.rank { background: #fdeef1; color: #d94f70; }
.md-card-head b { font-size: 12.8px; color: #101828; letter-spacing: .2px; }
.md-card-head .md-sub {
  flex: 1; font-size: 10.5px; color: #98a2b3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.md-fold {
  flex: none; height: 21px; padding: 0 8px; border-radius: 6px;
  border: 1px solid #dbe6f6; background: #fff; color: #5b7091;
  font-size: 10.5px; cursor: pointer;
}
.md-fold:hover { background: #eef4ff; color: #1a73e8; border-color: #b9d2f5; }
.md-card-body { padding: 9px 11px 11px; min-height: 0; overflow: auto; }
.md-card.grow .md-card-body { flex: 1; }
.md-card.folded .md-card-body { display: none; }
.md-card.folded .md-card-head { border-bottom: 0; }
.md-card-body::-webkit-scrollbar { width: 6px; }
.md-card-body::-webkit-scrollbar-thumb { background: #e2e8f2; border-radius: 6px; }

/* 卡片里的 KPI：两列紧凑 */
.md-card-body .dash-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 0; }
.md-card-body .dash-kpi.mini {
  padding: 7px 9px; border-radius: 9px;
  background: linear-gradient(160deg, #f7faff, #fff);
  border: 1px solid #edf2f9;
}
.md-card-body .dash-kpi.mini b { font-size: 15px; color: #101828; display: block; line-height: 1.25; }
.md-card-body .dash-kpi.mini .dk-lab { font-size: 10.5px; color: #8494ab; }

/* 漏斗 */
.md-card-body .mini-funnel { display: flex; flex-direction: column; gap: 6px; }
.md-card-body .frow { display: flex; align-items: center; gap: 7px; }
.md-card-body .frow-lab { flex: none; width: 58px; font-size: 11px; color: #5d6b82; }
.md-card-body .frow-bar {
  position: relative; flex: 1; height: 16px; border-radius: 5px;
  background: #f1f4f9; overflow: hidden;
}
.md-card-body .frow-bar i {
  display: block; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #7db8ff, #1a73e8);
}
.md-card-body .frow:last-child .frow-bar i { background: linear-gradient(90deg, #57cf9a, #16a06a); }
.md-card-body .frow-bar em {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 10.5px; font-weight: 700; color: #0b3d91;
}

/* 成员业绩表 */
.md-card-body .b4-tablewrap { border: 0; }
.md-card-body .b4-table { width: 100%; border-collapse: collapse; }
.md-card-body .b4-table th, .md-card-body .b4-table td { padding: 5px 5px; font-size: 11.5px; }
.md-card-body .b4-table thead th {
  background: #f6f9fe; color: #7b8ca3; font-weight: 600; font-size: 10.5px;
  position: sticky; top: 0; z-index: 1;
}
.md-card-body .b4-table tbody tr:hover { background: #f7faff; }
.md-card-body .b4-table th:first-child { text-align: left; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-card-body .b4-table td { text-align: right; }
.md-card-body .b4-table td.tt.good { color: #0a7d54; font-weight: 700; }
.md-card-body .b4-note { margin: 7px 0 0; font-size: 10.5px; color: #98a2b3; }

.md-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.md-updated { font-size: 10.5px; color: #a8b4c6; }

/* =====================================================================
   v48-3  右栏「新增客户 + 客户信息」纵向配比
   ===================================================================== */
#side-scroll-r { gap: 9px; padding: 9px 10px 14px; }
#pr-sec-new .pr-sec-body { max-height: 44vh; }
#pr-sec-new .pane-top { padding: 2px 0 8px; }
#pr-sec-new .lead-row { margin-bottom: 4px; }
#pr-sec-new .lead-btn { height: 32px; font-size: 12px; }
#block-list { padding: 0 2px; }
#panel-right { width: 440px; flex: 0 0 440px; }
@media (max-width: 1440px) { #panel-right { width: 400px; flex: 0 0 400px; } }
@media (max-width: 1280px) { #panel-right { width: 372px; flex: 0 0 372px; } }

/* =====================================================================
   v48-4  响应式：窄屏折叠搜索条附属控件
   ===================================================================== */
@media (max-width: 1500px) {
  .gs-status { display: none; }
}
@media (max-width: 1280px) {
  .gs-quick { display: none; }
}
@media (max-width: 1100px) {
  .gs-map { padding: 0 9px; font-size: 0; gap: 0; }
  .gs-map svg { width: 16px; height: 16px; }
  .gs-scope { display: none; }
  .gsearch { left: 306px; right: 380px; }
}
@media (max-width: 900px) {
  .gsearch { left: 10px; right: 10px; top: 8px; padding: 0 10px; gap: 8px; }
}

/* =====================================================================
   v49-1  云端状态徽标（右下角常显，替代原「云端已同步」定期弹条）
   ===================================================================== */
#cloud-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 800;
  display: none; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 20px;
  font: 12px/1 system-ui, sans-serif; font-weight: 600; letter-spacing: .2px;
  background: #fff; border: 1px solid #c6ead6; color: #067647;
  box-shadow: 0 4px 14px -6px rgba(16, 24, 40, .25);
  cursor: pointer; transition: box-shadow .15s, transform .15s;
  animation: cbIn .5s ease both;
}
@keyframes cbIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#cloud-badge:hover { box-shadow: 0 6px 18px -6px rgba(16, 24, 40, .35); transform: translateY(-1px); }
#cloud-badge .cb-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #17b26a; box-shadow: 0 0 0 3px rgba(23, 178, 106, .18);
  animation: cbPulse 2.2s ease-in-out infinite;
}
@keyframes cbPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(23,178,106,.15); } 50% { box-shadow: 0 0 0 5px rgba(23,178,106,.07); } }
#cloud-badge span { white-space: nowrap; }
#cloud-badge.cb-off { border-color: #fedf89; color: #b54708; background: #fffaeb; }
#cloud-badge.cb-off .cb-dot { background: #f79009; box-shadow: 0 0 0 3px rgba(247,144,9,.18); animation: none; }
#cloud-badge.cb-err { border-color: #fda29b; color: #b42318; background: #fef3f2; }
#cloud-badge.cb-err .cb-dot { background: #f04438; box-shadow: 0 0 0 3px rgba(240,68,56,.15); animation: none; }
#cloud-badge.cb-sync { border-color: #d1e0f5; color: #175cd3; }
#cloud-badge.cb-sync .cb-dot { background: #2e90fa; animation: cbSpin 1s linear infinite; border-radius: 2px; }
@keyframes cbSpin { to { transform: rotate(360deg); } }
/* 仪表盘页右下角也不与内容抢位（徽标缩小一级） */
body.dash-open #cloud-badge { height: 30px; font-size: 11.5px; right: 14px; bottom: 12px; }

/* =====================================================================
   v49-2  仪表盘打开时隐藏全域搜索条（搜索条属于客户地图工具，
          之前 z-index 低于仪表盘导致「被盖住 = 搜索不可用」的错觉）
   ===================================================================== */
/* v51：仪表盘首页也常显搜索条（点结果自动切到客户地图）；embed 内嵌页打开时隐藏避免盖住 iframe */
/* v53：搜索条显隐只依赖 Dash 自身维护的 body class（严格同步，绝不丢失）——
   仪表盘打开 / 内嵌模块页 → 隐藏；客户地图（含游客态）→ 显示 */
body.dash-open .gsearch,
body.embed-open .gsearch { display: none; }
/* 仪表盘打开时给搜索条让出顶部 58px（v52 搜索条已不在仪表盘显示，保留规则兼容旧缓存页面） */
/* v53：搜索条已改为居中悬浮且仪表盘打开时隐藏，无需再给仪表盘让位 */

/* =====================================================================
   v52  高德 POI 搜索对话框（#poi-dlg）
        左列表 + 地图实时联动：选中即居中放大打点，显示距离与建档状态
   ===================================================================== */
.poi-dlg {
  position: fixed; inset: 0; z-index: 9700;
  background: rgba(16, 28, 44, .34);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 96px 20px 24px;
}
.poi-dlg[hidden] { display: none; }

.pd-box {
  width: min(560px, 94vw); max-height: calc(100vh - 132px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 35, 70, .28), 0 2px 8px rgba(15, 35, 70, .12);
  overflow: hidden;
  animation: pdIn .18s ease-out;
}
@keyframes pdIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }

.pd-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 14px 10px 16px; border-bottom: 1px solid #eef2f8;
}
.pd-title { flex: 1 1 auto; min-width: 0; }
.pd-title b { display: block; font-size: 14.5px; color: #1d2b3f; letter-spacing: .2px; }
.pd-title span { display: block; margin-top: 2px; font-size: 11.5px; color: #8494ab; }
.pd-x {
  flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent;
  background: #f4f7fc; color: #6d8099; font-size: 18px; line-height: 1; cursor: pointer;
}
.pd-x:hover { background: #e9eff9; color: #2a3a52; }

.pd-search { position: relative; padding: 12px 16px 8px; }
.pd-search input {
  width: 100%; height: 40px; border-radius: 10px; border: 1px solid #d9e3f0;
  background: #f8fbff; padding: 0 36px 0 38px; font-size: 13.5px; color: #1d2b3f; outline: none;
}
.pd-search input:focus { border-color: #8db4ee; background: #fff; box-shadow: 0 0 0 3px rgba(26, 115, 232, .1); }
.pd-ico-in { position: absolute; left: 28px; top: 24px; color: #7d93b3; pointer-events: none; }
.pd-clear {
  position: absolute; right: 26px; top: 24px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: #dfe7f2; color: #56708f; font-size: 13px; line-height: 1; cursor: pointer;
}

.pd-tools { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; flex-wrap: wrap; }
.pd-scopes { display: flex; gap: 4px; background: #f1f5fb; border-radius: 9px; padding: 3px; }
.pd-scope-btn {
  border: none; background: transparent; color: #5c7391; font-size: 12px; padding: 5px 10px;
  border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.pd-scope-btn.on { background: #fff; color: #1a6fe0; font-weight: 600; box-shadow: 0 1px 3px rgba(20, 60, 120, .14); }
.pd-radius { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #8494ab; margin-left: auto; }
.pd-radius select {
  height: 28px; border-radius: 7px; border: 1px solid #dbe4f1; background: #fff;
  font-size: 12px; color: #2a3a52; padding: 0 4px; outline: none;
}

.pd-status {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 0 16px 8px; font-size: 11px; color: #8494ab;
}
.pd-status .pd-count { color: #1a6fe0; font-weight: 600; }

.pd-list {
  list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto;
  flex: 1 1 auto; min-height: 120px; max-height: 46vh;
}
.pd-list::-webkit-scrollbar { width: 7px; }
.pd-list::-webkit-scrollbar-thumb { background: #dde5f0; border-radius: 7px; }

.pd-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
}
.pd-item:hover { background: #f5f9ff; }
.pd-item.active { background: #eaf3ff; border-color: #b9d4f7; }
.pd-ico { flex: none; font-size: 14px; line-height: 20px; }
.pd-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-main b { font-size: 13px; color: #1d2b3f; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.pd-addr { font-size: 11.5px; color: #7b8ca3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #97a6ba; }
.pd-dist { font-style: normal; color: #1a6fe0; font-weight: 600; }
.pd-type { font-style: normal; }
.pd-pill.dup {
  font-style: normal; font-size: 10px; color: #0f9d58; background: #e4f6ec;
  border-radius: 999px; padding: 1px 6px; font-weight: 600;
}
.pd-go {
  flex: none; align-self: center; font-size: 11px; color: #1a6fe0;
  border: 1px solid #c8ddf8; background: #fff; border-radius: 999px; padding: 3px 9px;
}
.pd-item.active .pd-go { background: #1a73e8; color: #fff; border-color: transparent; }

.pd-empty, .pd-loading { padding: 26px 16px; text-align: center; color: #8b9bb0; font-size: 12px; list-style: none; }
.pd-empty b { display: block; color: #55677f; font-size: 13px; margin-bottom: 4px; }
.pd-empty span { display: block; line-height: 1.6; }
.pd-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2e90fa;
  margin-right: 6px; animation: pdPulse 1s ease-in-out infinite;
}
@keyframes pdPulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.pd-more { list-style: none; padding: 4px 10px 10px; text-align: center; }
.pd-more button {
  border: 1px dashed #c9d8ec; background: #f8fbff; color: #1a6fe0; font-size: 12px;
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
}

.pd-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid #eef2f8; background: #fbfdff; }
.pd-hint { flex: 1 1 auto; margin: 0; font-size: 11.5px; color: #8494ab; line-height: 1.45; }
.pd-hint.ok { color: #0f9d58; }
.pd-acts { flex: none; display: flex; gap: 7px; }
.pd-btn {
  height: 32px; padding: 0 13px; border-radius: 8px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap;
}
.pd-btn.ghost { background: #fff; border-color: #cfdcec; color: #3d5573; }
.pd-btn.ghost:hover { background: #f2f7fd; }
.pd-btn.primary { background: linear-gradient(135deg, #1a73e8, #4b9bff); color: #fff; font-weight: 600; }
.pd-btn.primary:hover { filter: brightness(1.05); }

/* 「高德找店」入口按钮 */
.lead-btn.poi { border-color: #f0d2b8; background: #fff8f2; color: #b5641a; }
.lead-btn.poi:hover { background: #fdeee1; border-color: #e8bd96; }

@media (max-width: 720px) {
  .poi-dlg { padding: 64px 8px 8px; }
  .pd-box { width: 100%; max-height: calc(100vh - 76px); }
  .pd-list { max-height: 44vh; }
  .pd-foot { flex-direction: column; align-items: stretch; }
  .pd-acts { justify-content: flex-end; }
}

/* ================= v59 「我的城市」校准弹窗 ================= */
.mc-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(15, 35, 60, .45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: mcFade .16s ease-out;
}
@keyframes mcFade { from { opacity: 0 } to { opacity: 1 } }
.mc-box {
  width: min(480px, 96vw); background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px -18px rgba(10, 30, 60, .5);
  overflow: hidden; animation: mcPop .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes mcPop { from { transform: translateY(10px) scale(.98); opacity: .6 } to { transform: none; opacity: 1 } }
.mc-head { padding: 16px 18px 10px; }
.mc-head b { display: block; font-size: 16px; color: #12233d; }
.mc-head i { display: block; margin-top: 4px; font-size: 12px; font-style: normal; color: #8a97a8; line-height: 1.5; }
.mc-body { padding: 0 18px 4px; }
.mc-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5b6b80; margin-bottom: 10px; }
.mc-row span { color: #96a2b3; }
.mc-row em { font-style: normal; font-weight: 600; color: #e8833a; background: #fff4ea; padding: 2px 8px; border-radius: 6px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.mc-chip {
  border: 1px solid #dfe5ee; background: #fff; color: #4a5a70;
  height: 30px; padding: 0 13px; border-radius: 15px; font-size: 12.5px; cursor: pointer;
  transition: all .14s;
}
.mc-chip:hover { border-color: #9dc3f5; color: #1a73e8; background: #f5f9ff; }
.mc-chip.on { background: linear-gradient(135deg, #1a73e8, #4b9bff); border-color: transparent; color: #fff; box-shadow: 0 4px 10px -4px rgba(26,115,232,.6); }
.mc-input { display: flex; gap: 8px; }
.mc-input input {
  flex: 1 1 auto; height: 38px; padding: 0 12px; font-size: 13.5px;
  border: 1px solid #dfe5ee; border-radius: 9px; outline: none; color: #12233d;
}
.mc-input input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.mc-ok {
  flex: 0 0 auto; height: 38px; padding: 0 18px; border: 0; border-radius: 9px;
  background: linear-gradient(135deg, #1a73e8, #4b9bff); color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.mc-ok:disabled { opacity: .6; cursor: default; }
.mc-tip { margin: 10px 0 4px; font-size: 11.5px; color: #9aa6b6; line-height: 1.6; }
.mc-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 18px 16px; border-top: 1px solid #f0f3f7; margin-top: 6px; }
.mc-btn {
  height: 34px; padding: 0 15px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  border: 1px solid #dfe5ee; background: #fff; color: #4a5a70;
}
.mc-btn:hover { border-color: #9dc3f5; color: #1a73e8; }
.mc-btn.ghost { border-color: transparent; background: #f5f7fa; }
@media (max-width: 560px) {
  .mc-box { border-radius: 14px; }
  .mc-head { padding: 14px 14px 8px; }
  .mc-body { padding: 0 14px; }
  .mc-foot { padding: 10px 14px 14px; }
  .mc-chip { height: 28px; padding: 0 11px; font-size: 12px; }
}

/* ================= v61 左栏双 Tab + 客户提报中心 ================= */
.md-tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.md-tab {
  flex: 1 1 0; height: 34px; border: 1px solid var(--line, #e5eaf1); border-radius: 9px 9px 0 0;
  background: #f6f8fb; color: #5b6b80; font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: none; transition: all .15s;
}
.md-tab:hover { color: #1a73e8; background: #eef4ff; }
.md-tab.on {
  background: linear-gradient(135deg, #1a73e8, #4b9bff); color: #fff; border-color: transparent;
  box-shadow: 0 -3px 10px -5px rgba(26,115,232,.5);
}
/* 四通道卡 */
.rp-channels { padding: 12px 12px 6px; }
.rp-ch-title { font-size: 12px; color: #8a97a8; margin-bottom: 8px; font-weight: 600; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-ch {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 11px; border: 1px solid var(--line, #e5eaf1); border-radius: 11px;
  background: #fff; cursor: pointer; text-align: left; transition: all .15s;
}
.rp-ch:hover { border-color: #9dc3f5; background: #f5f9ff; transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(26,115,232,.45); }
.rp-ch .rp-ico { font-size: 17px; }
.rp-ch b { font-size: 13px; color: #1f2f45; }
.rp-ch i { font-style: normal; font-size: 11px; color: #93a0b1; }
.rp-tpl { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; font-size: 11px; color: #9aa6b6; line-height: 1.5; }
/* 表单并入左栏后的宽度适配 */
#report-form-slot .pr-sec { border: 0; margin: 0; }
#report-form-slot .pr-sec-head { padding: 8px 12px; }
#report-form-slot .field-grid { grid-template-columns: 1fr; }
#report-form-slot .field.span2 { grid-column: span 1; }
/* 右栏新增筛选行 */
.fp-row select, .fp-row input[type="month"] {
  height: 32px; border: 1px solid #dfe5ee; border-radius: 8px; padding: 0 8px;
  font-size: 12.5px; color: #2a3b52; background: #fff; min-width: 0; flex: 1 1 0;
}
/* 列表行：合同状态 / 签约时间 */
.ci-ct {
  font-size: 10.5px; padding: 1px 7px; border-radius: 8px;
  background: #e8f5ee; color: #1d8a4e; font-weight: 600;
}
.ci-time { color: #9aa6b6; }

/* ===== v64 市场开发数据重做：KPI 四宫格 + 最近开发动态 ===== */
.md-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.md-kpi { background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px; padding: 9px 6px 7px; text-align: center; }
.md-kpi b { display: block; font-size: 19px; font-weight: 700; line-height: 1.15; color: #101828; }
.md-kpi span { display: block; margin-top: 2px; font-size: 11px; color: #667085; }
.md-kpi.c-today b { color: #0b6ce0; }
.md-kpi.c-month b { color: #7a5af8; }
.md-kpi.c-follow b { color: #e8930c; }
.md-kpi.c-coop b { color: #12945a; }
.md-recent { list-style: none; margin: 0; padding: 0; }
.md-recent .md-rec { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-radius: 9px; cursor: pointer; }
.md-recent .md-rec:hover { background: #f4f7fb; }
.md-recent .mr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.md-recent .mr-main { min-width: 0; flex: 1; }
.md-recent .mr-name { font-size: 12.5px; font-weight: 600; color: #1d2939; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-recent .mr-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 11px; color: #667085; }
.md-recent .mr-meta i { font-style: normal; padding: 0 6px; border-radius: 999px; font-weight: 600; }
.md-recent .dash-empty { padding: 10px 6px; }

/* ============ v68 线索客户提报：完善客户信息卡片 / KPI 明细 / 手工提报弹窗 ============ */
.rp-fix { background: #fff; border: 1px solid #e8eef7; border-radius: 12px; padding: 12px; margin-top: 12px; }
.rp-fix .prf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rp-fix .prf-head b { font-size: 13.5px; }
.rp-fix .prf-n { color: #e56a12; font-size: 12.5px; font-weight: 600; }
.rp-fix .spacer { flex: 1; }
.rp-fix .prf-tip { color: #8a93a3; font-size: 12px; margin: 0 0 8px; }
.prf-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.prf-item { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.prf-item:hover { background: #f5f8ff; }
.prf-item .mr-main { flex: 1; min-width: 0; }
.prf-item .mr-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prf-item .mr-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8a93a3; margin-top: 3px; flex-wrap: wrap; }
.prf-tag { background: #fff3e8; color: #e56a12; border-radius: 8px; padding: 1px 8px; font-size: 11.5px; font-style: normal; font-weight: 600; }
.prf-ops { display: flex; gap: 6px; }
#md-kpi-detail { margin-top: 10px; background: #f8fafd; border: 1px solid #e8eef7; border-radius: 12px; padding: 10px; }
#md-kpi-detail .kd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
#md-kpi-detail .kd-head .spacer { flex: 1; }
.kd-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.kd-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 10px; cursor: pointer; }
.kd-row:hover { background: #eef3fd; }
.kd-row .mr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kd-row .mr-main { flex: 1; min-width: 0; }
.kd-row .mr-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd-row .mr-meta { display: flex; gap: 8px; font-size: 11.5px; color: #8a93a3; margin-top: 2px; flex-wrap: wrap; }
.kd-row .mr-meta i { font-style: normal; border-radius: 8px; padding: 1px 8px; font-weight: 600; }
.kd-more, .kd-empty { color: #8a93a3; font-size: 12px; padding: 6px; margin: 0; }
#md-kpi-grid .md-kpi { cursor: pointer; transition: transform .12s, box-shadow .12s; }
#md-kpi-grid .md-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,119,255,.14); }
.lead-modal { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-modal[hidden] { display: none; }
.lead-modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); }
.lead-modal-box { position: relative; width: min(560px, 96vw); max-height: 88vh; background: #fff; border-radius: 16px; box-shadow: 0 18px 60px rgba(16,24,40,.28); display: flex; flex-direction: column; overflow: hidden; }
.lead-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #eef1f6; background: linear-gradient(135deg, #1667e0, #2f7bff); color: #fff; }
.lead-modal-head b { font-size: 14.5px; white-space: nowrap; }
.lead-modal-tip { font-size: 11.5px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lead-modal-x { border: none; background: rgba(255,255,255,.2); color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; }
.lead-modal-body { overflow: auto; padding: 4px; }
.lead-modal-body .pr-sec { border: none; box-shadow: none; }

/* ============ v69 客户地图 · 作战指挥舱（工具条 / 聚合 / 热力 / 沉浸 / 快捷操作） ============ */
#mp-toolbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 520;
  display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 14px;
  background: rgba(255,255,255,.96); box-shadow: 0 8px 26px rgba(16,24,40,.16); border: 1px solid #e8eef7;
  backdrop-filter: blur(8px); flex-wrap: nowrap; max-width: calc(100% - 32px); overflow-x: auto; }
#mp-toolbar .mp-tb, #mp-toolbar .mp-layer-btn { border: 1px solid transparent; background: transparent; color: #475467;
  border-radius: 9px; padding: 6px 10px; font: 600 12.5px/1.2 system-ui; cursor: pointer; white-space: nowrap; }
#mp-toolbar .mp-tb:hover, #mp-toolbar .mp-layer-btn:hover { background: #f0f5ff; color: #1667e0; }
#mp-toolbar .mp-tb.on, #mp-toolbar .mp-layer-btn.on { background: linear-gradient(135deg,#1667e0,#2f7bff); color: #fff; }
#mp-toolbar .mp-tb-sep { width: 1px; height: 18px; background: #e8eef7; margin: 0 2px; }
.mp-cluster { border-radius: 50%; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(16,24,40,.28); border: 3px solid rgba(255,255,255,.9); }
.mp-cluster b { font: 700 15px/1 system-ui; }
.mp-cluster span { font: 500 9.5px/1.2 system-ui; opacity: .9; }
body.map-immersive #panel-left, body.map-immersive #panel-right { display: none !important; }
body.map-immersive #map-wrap { left: 0 !important; right: 0 !important; }
#mp-rect-result { position: absolute; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 519;
  background: #fff; border: 1px solid #e8eef7; border-radius: 14px; padding: 10px 12px; min-width: 260px;
  box-shadow: 0 10px 30px rgba(16,24,40,.18); }
#mp-rect-result .mpr-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
#mp-rect-result .spacer { flex: 1; }
.mpr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mp-box-chip { border-radius: 9px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; }
.mpr-plan { width: 100%; }
#mp-route-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 521;
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.97);
  box-shadow: 0 10px 30px rgba(16,24,40,.2); border: 1px solid #e8eef7; max-width: calc(100% - 32px); font-size: 12.5px; }
#mp-route-bar .mprb-tip { color: #6b7688; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.ci-quick { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.ci-quick button, .ci-quick a { border: 1px solid #e4e9f2; background: #fff; color: #475467; border-radius: 8px;
  padding: 3px 10px; font: 600 11.5px/1.6 system-ui; cursor: pointer; text-decoration: none; }
.ci-quick button:hover, .ci-quick a:hover { border-color: #1667e0; color: #1667e0; background: #f5f9ff; }
#mp-route-pins { position: absolute; inset: 0; pointer-events: none; }
#map-sales-funnel .mp-funnel-on { outline: 2px solid #1667e0; outline-offset: -2px; border-radius: 10px; background: #f2f7ff; cursor: pointer; }

/* ===== v70 P0：销售概览三态提示（游客 / 过期 / 网络） + 演示横幅 ===== */
.dash-empty.dash-guest, .dash-empty.dash-auth, .dash-empty.dash-retry {
  padding: 18px 14px; text-align: left; line-height: 1.65; border-radius: 12px;
  border: 1px dashed #dfe6f0; background: linear-gradient(180deg,#fbfdff,#f6f9fe); color: #64748b;
}
.dash-empty.dash-guest b { display: block; color: #1f2937; font: 700 13px/1.4 system-ui; margin: 2px 0 3px; }
.dash-empty.dash-guest p { margin: 0 0 10px; font-size: 12px; color: #8a94a6; }
.dash-empty .dg-ico { font-size: 16px; }
.dash-empty.dash-auth { border-color: #f5d6a8; background: linear-gradient(180deg,#fffdf8,#fff8ec); color: #92600a; }
.dash-empty.dash-retry { border-color: #f2c9c9; background: linear-gradient(180deg,#fffafa,#fff2f2); color: #a33a3a; }
.dash-empty .btn-mini { margin-left: 8px; }
.demo-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 12px; margin: 0 0 8px;
  background: linear-gradient(90deg,#fff8e6,#fffdf6); border: 1px solid #f5e0ae; color: #8a6516;
  font: 500 12px/1.5 system-ui; }
.demo-banner .dm-txt { flex: 1 1 260px; }
.demo-banner .dm-txt u { text-decoration-style: dotted; text-underline-offset: 2px; }
.demo-banner .dm-acts { display: flex; gap: 6px; }
.demo-banner button { border: 1px solid #e8cf94; background: #fff; color: #8a6516; border-radius: 8px;
  padding: 3px 10px; font: 600 11.5px/1.5 system-ui; cursor: pointer; }
.demo-banner button:hover { background: #fff7e2; border-color: #d9b768; }

/* ===== v70 地址匹配（人工确认地图坐标） ===== */
.md-tab-n { display: inline-block; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px;
  border-radius: 8px; background: #e56a12; color: #fff; font: 700 10px/16px system-ui; text-align: center; }
.md-tab-n[hidden] { display: none; }

.geo-stat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 10px; }
.geo-stat .gs-item { padding: 7px 4px; border-radius: 10px; background: #f6f9fe; text-align: center;
  border: 1px solid #e8eef7; }
.geo-stat .gs-item b { display: block; font: 700 16px/1.2 system-ui; color: #1f2937; }
.geo-stat .gs-item span { font: 500 10.5px/1.4 system-ui; color: #8a94a6; }
.geo-stat .gs-item.ok b { color: #16a34a; }
.geo-stat .gs-item.warn b { color: #d97706; }
.geo-stat .gs-item.bad b { color: #dc2626; }

.geo-bar { height: 7px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.geo-bar i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .4s ease; }
.geo-bar i.ok { background: linear-gradient(90deg,#22c55e,#16a34a); }
.geo-bar i.mid { background: linear-gradient(90deg,#fbbf24,#f59e0b); }
.geo-bar i.low { background: linear-gradient(90deg,#f87171,#ef4444); }
.geo-hint { margin: 8px 0 0; font: 500 11.5px/1.6 system-ui; color: #94a0b4; }

.geo-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.geo-seg { display: inline-flex; background: #f2f6fc; border-radius: 9px; padding: 2px; gap: 2px; }
.geo-seg button { border: 0; background: transparent; color: #64748b; border-radius: 7px; padding: 4px 9px;
  font: 600 11.5px/1.4 system-ui; cursor: pointer; white-space: nowrap; }
.geo-seg button.on { background: #fff; color: #1667e0; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.geo-toolbar input[type="search"] { flex: 1 1 130px; min-width: 100px; padding: 5px 9px; border-radius: 9px;
  border: 1px solid #e2e8f2; font: 500 12px/1.5 system-ui; outline: none; }
.geo-toolbar input[type="search"]:focus { border-color: #1667e0; }

.geo-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.geo-list li { padding: 9px 10px; border-radius: 10px; border: 1px solid #eef2f8; margin-bottom: 6px; cursor: pointer;
  transition: border-color .15s, background .15s; }
.geo-list li:hover { border-color: #bcd4fb; background: #fafcff; }
.geo-list li.has { border-left: 3px solid #22c55e; }
.geo-list .gl-top { display: flex; align-items: center; gap: 6px; }
.geo-list .gl-name { flex: 1; font: 700 12.5px/1.4 system-ui; color: #1f2937;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-tag { flex: 0 0 auto; padding: 1px 6px; border-radius: 6px; font: 600 10px/1.6 system-ui; }
.gl-tag.manual { background: #e8f8ee; color: #16a34a; }
.gl-tag.auto { background: #eaf2ff; color: #1667e0; }
.gl-tag.bad { background: #fdeaea; color: #dc2626; }
.gl-tag.none { background: #f2f4f8; color: #94a0b4; }
.gl-addr { margin: 3px 0 0; font: 500 11.5px/1.5 system-ui; color: #64748b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-noaddr { color: #c0c8d6; font-style: normal; }
.gl-note { margin: 3px 0 0; font: 500 11px/1.5 system-ui; color: #a0aabb;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-acts { display: flex; gap: 5px; margin-top: 6px; }
.geo-empty { padding: 22px 0; text-align: center; font: 500 12px/1.6 system-ui; color: #a3adbd; }
.geo-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 2px;
  font: 500 11.5px/1.4 system-ui; color: #8a94a6; }

.geo-edit .ge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.geo-edit .ge-row > label { flex: 0 0 46px; font: 600 11.5px/1.5 system-ui; color: #64748b; }
.geo-edit .ge-row > span { font: 600 12.5px/1.5 system-ui; color: #1f2937; }
.geo-edit .ge-row > input { flex: 1; min-width: 0; padding: 5px 9px; border-radius: 9px;
  border: 1px solid #e2e8f2; font: 500 12px/1.5 system-ui; outline: none; }
.geo-edit .ge-row > input:focus { border-color: #1667e0; }
.geo-cand { margin: 4px 0 10px; }
.geo-cand .gc-head { font: 600 11px/1.6 system-ui; color: #94a0b4; margin-bottom: 4px; }
.gc-item { display: block; width: 100%; text-align: left; padding: 7px 9px; margin-bottom: 5px;
  border: 1px solid #eef2f8; border-radius: 9px; background: #fff; cursor: pointer; }
.gc-item:hover { border-color: #bcd4fb; background: #fafcff; }
.gc-item.on { border-color: #1667e0; background: #f2f7ff; }
.gc-item b { font: 600 12px/1.4 system-ui; color: #1f2937; }
.gc-item .gc-s { float: right; font: 700 10.5px/1.4 system-ui; color: #16a34a; }
.gc-item .gc-addr { font: 500 11px/1.5 system-ui; color: #8a94a6; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-acts { display: flex; gap: 8px; }

/* v73c 聚合气泡点击卡 */
.cc-cats { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.cc-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 9px; font-weight: 500; }
.cc-list { list-style: none; margin: 4px 0; max-height: 168px; overflow: auto; }
.cc-list li { padding: 6px 4px; border-bottom: 1px dashed #eee; font-size: 13.5px; cursor: pointer; border-radius: 6px; }
.cc-list li:hover { background: #eef4ff; color: #1a73e8; }
.cc-more { font-size: 12px; color: #999; margin: 4px 0 0; text-align: center; }

/* ============================================================
   客户池（v1.10.11 P1）—— 四视图外壳 / 工作台 / 列表 / 看板占位
   设计参照：HubSpot CRM index、Salesforce Lightning list view
   原则：信息密度高但不拥挤；表头 sticky；行内操作 2 次点击内完成
   ============================================================ */
:root {
  --pool-bg: #f7f8fa;
  --pool-line: #e8ebef;
  --pool-ink: #1c2530;
  --pool-sub: #6b7684;
  --pool-brand: #2563eb;
  --pool-brand-soft: #eef3ff;
  --pool-warn: #b45309;
  --pool-bad: #b91c1c;
  --pool-ok: #047857;
}

/* ---------- 页面容器：默认隐藏，点「客户池」时 .show ---------- */
.pool-page { display: none; height: 100vh; overflow: hidden; flex-direction: column; background: var(--pool-bg); }
.pool-page.show { display: flex; }
/* 登录后避开固定顶栏（56px），与 #app 同一套偏移规则 */
html.authed .pool-page.show { height: calc(100vh - 56px); padding-top: 56px; box-sizing: border-box; }
@media (max-width: 760px) { html.authed .pool-page.show { height: calc(100vh - 50px); padding-top: 50px; } }
/* 地图视图时隐藏外壳，反之隐藏地图 */
#app.pool-hidden { display: none !important; }
.pool-shell.pool-hidden { display: none !important; }


/* ---------- 地图视图：外壳塌缩为仅 Tab 高度，地图层接管剩余空间 ---------- */
html.pool-map .pool-page.show { height: auto; min-height: 0; overflow: visible; }
html.pool-map #app {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: auto !important; padding-top: 0 !important;
  z-index: 30; background: #fff;
}


/* ---------- 列表：省 / 市筛选列 ---------- */
.pl-table th.pl-geo { width: 132px; min-width: 132px; padding: 5px 6px; }
.pl-table td.pl-geo { white-space: nowrap; max-width: 132px; overflow: hidden; text-overflow: ellipsis; }
.pl-table td.pl-geo small { color: var(--muted, #8a94a6); font-size: 12px; }
.pl-table td.pl-geo small.pl-geo-none { color: #c2c9d4; font-style: italic; }
.pl-geo-f { display: flex; gap: 4px; }
.pl-geo-f select {
  flex: 1 1 0; min-width: 0; max-width: 62px;
  font-size: 12px; padding: 3px 1px 3px 3px; border: 1px solid var(--pool-line, #dfe5ee);
  border-radius: 6px; background: #fff; color: var(--ink, #2b3446); cursor: pointer;
  text-overflow: ellipsis;
}
.pl-geo-f select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.pl-geo-f select:disabled { background: #f6f8fb; color: #b6bdc9; cursor: not-allowed; border-style: dashed; }
/* 已选地域回显标签 */
.pl-geo-chip {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 4px 6px 4px 9px; border-radius: 999px;
  background: #eef4ff; color: #2563eb; font-size: 12.5px; font-weight: 600;
  border: 1px solid #d6e4ff; white-space: nowrap;
}
.pl-geo-chip i { font-style: normal; font-size: 10px; opacity: .8; }
.pl-geo-chip b {
  cursor: pointer; font-weight: 400; font-size: 14px; line-height: 1;
  padding: 0 3px; border-radius: 50%; color: #7c96c9;
}
.pl-geo-chip b:hover { background: #2563eb; color: #fff; }

/* ---------- 四视图 Tab ---------- */
.pool-tabs {
  display: flex; gap: 4px; padding: 10px 20px 0; background: #fff;
  border-bottom: 1px solid var(--pool-line); flex-shrink: 0;
}
.pool-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px 11px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--pool-sub);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
  border-radius: 6px 6px 0 0;
}
.pool-tab i { font-style: normal; font-size: 13px; opacity: .8; }
.pool-tab:hover { color: var(--pool-ink); background: #f4f6f9; }
.pool-tab.on { color: var(--pool-brand); border-bottom-color: var(--pool-brand); font-weight: 600; }
.pool-tab.on i { opacity: 1; }

.pool-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pool-head { flex-shrink: 0; padding: 14px 20px 0; }
.pool-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 20px 24px; }

/* ---------- 工作台 ---------- */
.pd-hero { padding: 4px 2px 14px; }
.pd-hero h2 { margin: 0 0 4px; font-size: 20px; font-weight: 650; color: var(--pool-ink); letter-spacing: -.2px; }
.pd-hero p { margin: 0; font-size: 13px; color: var(--pool-sub); }
.pd-hero b { color: var(--pool-ink); }

.pd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.pd-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 16px 16px 14px; background: #fff; border: 1px solid var(--pool-line);
  border-radius: 12px; transition: box-shadow .16s, transform .16s, border-color .16s;
  display: flex; flex-direction: column; gap: 2px;
}
.pd-card:hover { box-shadow: 0 6px 20px rgba(16, 24, 40, .08); transform: translateY(-1px); border-color: #d3dae2; }
.pd-card i { font-style: normal; font-size: 17px; opacity: .55; margin-bottom: 6px; }
.pd-card b { font-size: 27px; font-weight: 680; color: var(--pool-ink); line-height: 1.1; letter-spacing: -.5px; }
.pd-card span { font-size: 13.5px; font-weight: 550; color: var(--pool-ink); }
.pd-card em { font-style: normal; font-size: 12px; color: var(--pool-sub); margin-top: 2px; }

.pd-sec { background: #fff; border: 1px solid var(--pool-line); border-radius: 12px; overflow: hidden; }
.pd-sec h3 { margin: 0; padding: 14px 18px; font-size: 14px; font-weight: 600; color: var(--pool-ink); border-bottom: 1px solid var(--pool-line); }
.pd-sec h3 em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--pool-sub); margin-left: 6px; }
.pd-list { display: flex; flex-direction: column; }
.pd-row {
  display: grid; grid-template-columns: 40px 1fr auto 92px 82px; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid #f1f3f6; cursor: pointer; transition: background .12s;
}
.pd-row:last-child { border-bottom: 0; }
.pd-row:hover { background: #f8fafd; }
.pd-row.warm { box-shadow: inset 3px 0 0 #f59e0b; }
.pd-score {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 680;
  background: var(--pool-brand-soft); color: var(--pool-brand);
}
.pd-info { min-width: 0; }
.pd-info b { display: block; font-size: 13.5px; font-weight: 560; color: var(--pool-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-info small { display: block; font-size: 12px; color: var(--pool-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pd-cat { font-size: 11.5px; padding: 3px 9px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.pd-touch { font-size: 12px; color: var(--pool-sub); text-align: right; }
.pd-touch.bad { color: var(--pool-warn); font-weight: 550; }
.pd-own { font-size: 12px; color: var(--pool-sub); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 列表视图：顶部栏 ---------- */
.pl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-bar input[type=search] {
  width: 280px; padding: 8px 12px; font-size: 13px; color: var(--pool-ink);
  border: 1px solid var(--pool-line); border-radius: 8px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.pl-bar input[type=search]:focus { border-color: var(--pool-brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.pl-views { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.sv-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  background: #fff; color: var(--pool-sub); border: 1px solid var(--pool-line); border-radius: 16px;
  transition: all .15s; white-space: nowrap;
}
.sv-chip i { font-style: normal; font-size: 11px; opacity: .7; }
.sv-chip:hover { border-color: #cdd5df; color: var(--pool-ink); background: #fafbfc; }
.sv-chip.on { background: var(--pool-brand); border-color: var(--pool-brand); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
.sv-chip.on i { opacity: 1; }
.pl-count { font-size: 12.5px; color: var(--pool-sub); font-weight: 500; }

/* ---------- 批量操作条 ---------- */
.pl-bulk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 10px; font-size: 13px; color: var(--pool-ink);
  background: var(--pool-brand-soft); border: 1px solid #cddffb; border-radius: 9px;
}
.pl-bulk b { color: var(--pool-brand); font-weight: 650; }
.pl-bulk button {
  padding: 5px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  background: #fff; color: var(--pool-brand); border: 1px solid #c3d7f7; border-radius: 7px;
  transition: all .14s;
}
.pl-bulk button:hover { background: var(--pool-brand); color: #fff; border-color: var(--pool-brand); }
.pl-bulk button.ghost { color: var(--pool-sub); border-color: #d8dee6; }
.pl-bulk button.ghost:hover { background: #eef1f5; color: var(--pool-ink); border-color: #c8d0da; }

/* ---------- 列表表格 ---------- */
.pl-wrap { background: #fff; border: 1px solid var(--pool-line); border-radius: 12px; overflow: auto; }
.pl-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.pl-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600;
  color: var(--pool-sub); background: #fafbfc; border-bottom: 1px solid var(--pool-line);
  white-space: nowrap; user-select: none;
}
.pl-table thead th[data-sort] { cursor: pointer; }
.pl-table thead th[data-sort]:hover { color: var(--pool-ink); background: #f2f4f7; }
.pl-table thead th.on { color: var(--pool-brand); }
.pl-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f2f4f6; vertical-align: middle; }
.pl-table tbody tr { transition: background .12s; cursor: pointer; }
.pl-table tbody tr:hover { background: #f8fafd; }
.pl-table tbody tr.sel { background: #f2f7ff; }
.pl-table tbody tr:last-child td { border-bottom: 0; }
.pl-chk { width: 38px; text-align: center; }
.pl-chk input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--pool-brand); }
.pl-name { min-width: 240px; }
.pl-name b { display: block; font-size: 13.5px; font-weight: 560; color: var(--pool-ink); }
.pl-name small { display: block; font-size: 11.5px; color: var(--pool-sub); margin-top: 2px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 10.5px; font-style: normal; border-radius: 5px; background: #fef3c7; color: #92400e; }
.pl-cat { font-size: 11.5px; padding: 3px 9px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.pl-num { text-align: center; }
.pl-v { display: inline-block; min-width: 26px; font-size: 13px; font-weight: 650; }
.pl-v.t2 { color: #b45309; }
.pl-v.t1 { color: var(--pool-brand); }
.pl-v.t0 { color: #94a3b8; }
.pl-bad { color: var(--pool-bad); font-weight: 550; }
.pl-warn { color: var(--pool-warn); font-weight: 550; }
.pl-ok { color: var(--pool-ok); font-size: 12px; }
.pl-no { color: #b0b8c2; font-size: 12px; }
.pl-ops { white-space: nowrap; text-align: right; }
.pl-ops button {
  padding: 4px 10px; margin-left: 4px; font-size: 12px; cursor: pointer;
  background: #fff; color: var(--pool-sub); border: 1px solid var(--pool-line); border-radius: 6px;
  transition: all .13s;
}
.pl-ops button:hover { color: var(--pool-brand); border-color: #c3d7f7; background: var(--pool-brand-soft); }
.pl-empty { padding: 60px 20px; text-align: center; color: var(--pool-sub); font-size: 14px; }
.pl-empty small { font-size: 12.5px; color: #9aa4b2; }
.pl-more { padding: 14px; text-align: center; }
.pl-more button {
  padding: 8px 24px; font-size: 13px; cursor: pointer; color: var(--pool-brand);
  background: #fff; border: 1px solid #c3d7f7; border-radius: 8px;
}
.pl-more button:hover { background: var(--pool-brand); color: #fff; }

/* ---------- 看板占位 ---------- */
.pb-placeholder { max-width: 720px; margin: 40px auto; padding: 40px; text-align: center; background: #fff; border: 1px solid var(--pool-line); border-radius: 14px; }
.pb-ico { font-size: 40px; color: #cbd5e1; margin-bottom: 12px; }
.pb-placeholder h3 { margin: 0 0 12px; font-size: 18px; font-weight: 620; color: var(--pool-ink); }
.pb-placeholder p { margin: 8px 0; font-size: 13.5px; color: var(--pool-sub); line-height: 1.7; }
.pb-stages { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.pb-stages span { padding: 7px 14px; font-size: 12.5px; font-weight: 550; border-radius: 8px; }
.pb-stages i { font-style: normal; color: #cbd5e1; font-size: 12px; }
.pb-stages .s1 { background: #f1f5f9; color: #475569; }
.pb-stages .s2 { background: #dbeafe; color: #1d4ed8; }
.pb-stages .s3 { background: #cffafe; color: #0e7490; }
.pb-stages .s4 { background: #ffedd5; color: #c2410c; }
.pb-stages .s5 { background: #d1fae5; color: #047857; }
.pb-stages .s6 { background: #ede9fe; color: #6d28d9; }
.pb-note { font-size: 12.5px !important; color: #94a3b8 !important; margin-top: 16px !important; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 900px) {
  .pool-tabs { padding: 8px 12px 0; overflow-x: auto; }
  .pool-head { padding: 10px 12px 0; }
  .pool-body { padding: 10px 12px 20px; }
  .pl-bar input[type=search] { width: 100%; }
  .pd-row { grid-template-columns: 34px 1fr 72px; }
  .pd-cat, .pd-own { display: none; }
  .pl-table { font-size: 12px; }
  .pl-name { min-width: 150px; }
}

/* ============================================================
   客户池看板视图（P2）—— 阶段流水线 / 拖拽 / 阶段门
   ============================================================ */
.kb-wrap { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; min-height: 420px; }
.kb-col {
  flex: 0 0 236px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--pool-line); border-radius: 12px; overflow: hidden;
}
.kb-head {
  display: flex; align-items: center; gap: 7px; padding: 11px 13px;
  border-bottom: 1px solid var(--pool-line); background: #fcfcfd;
}
.kb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex-shrink: 0; }
.kb-head b { font-size: 13px; font-weight: 600; color: var(--pool-ink); flex: 1; }
.kb-head em {
  font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--sc);
  background: color-mix(in srgb, var(--sc) 12%, transparent);
  padding: 1px 7px; border-radius: 9px;
}
.kb-sum { padding: 6px 13px; font-size: 11px; color: #9aa4b2; border-bottom: 1px solid #f4f6f8; }
.kb-body { flex: 1; padding: 8px; min-height: 120px; max-height: calc(100vh - 320px); overflow-y: auto; transition: background .15s; }
.kb-body.over { background: var(--pool-brand-soft); box-shadow: inset 0 0 0 2px #c3d7f7; }
.kb-empty { padding: 26px 8px; text-align: center; font-size: 12px; color: #c2cad4; border: 1px dashed #e4e9f0; border-radius: 8px; }
.kb-card {
  padding: 10px 11px; margin-bottom: 7px; background: #fff; cursor: grab;
  border: 1px solid var(--pool-line); border-radius: 9px;
  transition: box-shadow .14s, border-color .14s, transform .14s;
}
.kb-card:hover { box-shadow: 0 3px 12px rgba(16, 24, 40, .09); border-color: #cdd6e1; transform: translateY(-1px); }
.kb-card.dragging { opacity: .45; cursor: grabbing; }
.kb-card.warm { box-shadow: inset 3px 0 0 #f59e0b; }
.kb-c-name { font-size: 12.5px; font-weight: 550; color: var(--pool-ink); line-height: 1.4; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-c-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kb-v { font-size: 11px; font-weight: 700; color: var(--pool-brand); background: var(--pool-brand-soft); padding: 0 6px; border-radius: 5px; }
.kb-room { font-size: 11px; color: #6b7684; }
.kb-dry { font-size: 10.5px; color: #b45309; margin-left: auto; }
.kb-c-own { font-size: 11px; color: #9aa4b2; }
.kb-more { padding: 8px; text-align: center; font-size: 11px; color: #9aa4b2; }
.kb-off { margin-top: 10px; font-size: 12px; color: var(--pool-sub); }

/* 漏斗概览 */
.fn-bar { margin-bottom: 14px; }
.fn-track { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: #eef1f5; }
.fn-seg { height: 100%; transition: width .4s ease; }
.fn-seg:first-child { border-radius: 5px 0 0 5px; }
.fn-seg:last-child { border-radius: 0 5px 5px 0; }
.fn-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px; }
.fn-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--pool-sub); }
.fn-lg i { width: 8px; height: 8px; border-radius: 2px; }
.fn-lg b { color: var(--pool-ink); font-weight: 600; }
.fn-tip { margin: 8px 0 0; font-size: 11.5px; color: #9aa4b2; }

/* 权限边界说明（账号与权限页） */
.ac-gate { margin: 12px 0 16px; padding: 14px 18px; background: #fbfcfe; border: 1px solid var(--pool-line); border-radius: 11px; }
.ac-gate-h { font-size: 13px; font-weight: 620; color: var(--pool-ink); margin-bottom: 8px; }
.ac-gate ul { margin: 0; padding-left: 3px; list-style: none; }
.ac-gate li { position: relative; padding: 5px 0 5px 16px; font-size: 12.5px; color: #55606e; line-height: 1.65; }
.ac-gate li::before { content: '·'; position: absolute; left: 4px; color: var(--pool-brand); font-weight: 700; }
.ac-gate li b { color: var(--pool-ink); font-weight: 600; }

/* ==================== 客户池 · 线索提报（内嵌新增行） ==================== */
.ld-entry > td { padding: 0 !important; border-bottom: 1px solid #eef1f5; }
.ld-entry #ld-open {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 9px 14px; margin: 6px 0; border: 1px dashed #cfd8e3; border-radius: 6px;
  background: #fbfcfe; color: #5b6675; font-size: 13px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.ld-entry #ld-open:hover { border-color: #2563eb; background: #f2f6ff; color: #1d4ed8; }
.ld-entry #ld-open i { font-style: normal; font-size: 15px; font-weight: 600; line-height: 1; }
.ld-entry #ld-open small { color: #98a3b3; font-size: 11.5px; margin-left: 4px; }

.ld-panel-row > td { padding: 0 !important; background: #f8fafc; border-bottom: 1px solid #e3e9f2; }
.ld-panel { padding: 12px 16px 13px; }
.ld-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ld-head b { font-size: 14px; color: #1f2937; }
.ld-head-tip { font-size: 11.5px; color: #94a3b8; }
.ld-x {
  margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 5px;
  background: transparent; color: #94a3b8; font-size: 17px; line-height: 1; cursor: pointer;
}
.ld-x:hover { background: #eef2f7; color: #475569; }

.ld-tabs { display: flex; gap: 4px; margin-bottom: 11px; border-bottom: 1px solid #e5eaf1; }
.ld-tabs button {
  padding: 6px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: #64748b; font-size: 12.5px; cursor: pointer; margin-bottom: -1px;
}
.ld-tabs button.on { color: #1d4ed8; border-bottom-color: #2563eb; font-weight: 600; }

.ld-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 12px; }
.ld-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ld-f.span2 { grid-column: span 2; }
.ld-f > span { font-size: 11.5px; color: #64748b; }
.ld-f .req { color: #e5484d; font-style: normal; margin-left: 2px; }
.ld-f input, .ld-f select, .ld-f textarea {
  width: 100%; box-sizing: border-box; padding: 6px 9px; border: 1px solid #d7dee8; border-radius: 5px;
  font-size: 12.5px; color: #1f2937; background: #fff; font-family: inherit;
}
.ld-f input:focus, .ld-f select:focus, .ld-f textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}
.ld-f input.ld-invalid { border-color: #e5484d; background: #fff5f5; }
.ld-f textarea { resize: vertical; }

.ld-hint { margin: 9px 0 0; font-size: 11.5px; color: #8a95a5; line-height: 1.6; }

.ld-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #e8edf4; }
.ld-spacer { flex: 1; }
.ld-ok { font-size: 11.5px; color: #059669; }
.ld-miss { font-size: 11.5px; color: #b45309; }
.ld-btn {
  padding: 6px 13px; border: 1px solid #d7dee8; border-radius: 5px; background: #fff;
  color: #475569; font-size: 12.5px; cursor: pointer;
}
.ld-btn:hover { border-color: #b8c4d3; background: #f8fafc; }
.ld-btn.ghost { border-color: transparent; background: transparent; }
.ld-btn.primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.ld-btn.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

.ld-map-bar { display: flex; gap: 8px; margin-bottom: 8px; }
.ld-map-bar input { flex: 1; padding: 6px 10px; border: 1px solid #d7dee8; border-radius: 5px; font-size: 12.5px; }
.ld-poi-list { max-height: 196px; overflow-y: auto; border: 1px solid #e5eaf1; border-radius: 6px; background: #fff; }
.ld-poi-empty { padding: 18px; text-align: center; font-size: 12px; color: #98a3b3; }
.ld-poi {
  display: block; width: 100%; text-align: left; padding: 8px 11px; border: 0;
  border-bottom: 1px solid #f1f4f8; background: transparent; cursor: pointer; position: relative;
}
.ld-poi:last-child { border-bottom: 0; }
.ld-poi:hover { background: #f5f8ff; }
.ld-poi b { display: block; font-size: 12.5px; color: #1f2937; font-weight: 600; }
.ld-poi small { display: block; font-size: 11.5px; color: #8a95a5; margin-top: 2px; }
.ld-poi em { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11.5px; color: #2563eb; }
.ld-map-manual { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11.5px; color: #64748b; }
.ld-map-manual input { width: 108px; padding: 5px 8px; border: 1px solid #d7dee8; border-radius: 5px; font-size: 12px; }

.ld-import p { margin: 0 0 10px; font-size: 12.5px; color: #475569; line-height: 1.7; }
.ld-import-acts { display: flex; gap: 8px; }

@media (max-width: 1200px) {
  .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ld-grid { grid-template-columns: 1fr; }
  .ld-f.span2 { grid-column: span 1; }
}

/* ==================== 客户池 · 左栏筛选器 ==================== */
#md-filter { padding: 10px 12px 14px; }
.pf-sum { margin-bottom: 10px; padding: 9px 11px; border-radius: 7px; background: #fff; border: 1px solid #e8edf4; }
.pf-sum-n { display: flex; align-items: baseline; gap: 5px; }
.pf-sum-n b { font-size: 21px; font-weight: 680; color: #1f2937; letter-spacing: -.3px; }
.pf-sum-n span { font-size: 11.5px; color: #8a95a5; }
.pf-sum-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pf-sum-chips i { font-style: normal; padding: 2px 7px; border-radius: 10px; background: #eef4ff; color: #1d4ed8; font-size: 10.5px; }
.pf-sum-chips i.none { background: #f2f4f7; color: #8a95a5; }

.pf-card { margin-bottom: 9px; }
.pf-card .md-card-head { display: flex; align-items: center; gap: 8px; }
.pf-card .md-card-head b { font-size: 12.5px; color: #1f2937; }
.pf-card .md-card-head .md-sub { font-size: 10.5px; color: #98a3b3; margin-left: auto; }

.pf-sv { display: flex; flex-direction: column; gap: 2px; }
.pf-sv-btn {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 5px 8px;
  border: 0; border-radius: 5px; background: transparent; cursor: pointer; text-align: left;
}
.pf-sv-btn:hover { background: #f3f6fb; }
.pf-sv-btn.on { background: #eef4ff; }
.pf-sv-btn i { font-style: normal; width: 14px; text-align: center; color: #94a3b8; font-size: 11px; }
.pf-sv-btn.on i { color: #2563eb; }
.pf-sv-btn b { font-size: 12px; font-weight: 500; color: #3d4859; flex: 1; }
.pf-sv-btn.on b { color: #1d4ed8; font-weight: 600; }
.pf-sv-btn em { font-style: normal; font-size: 10.5px; color: #98a3b3; }
.pf-sv-btn.on em { color: #2563eb; font-weight: 600; }

.pf-stage { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-st {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 11px;
  border: 1px solid #e2e8f0; background: #fff; color: #5b6675; font-size: 11.5px; cursor: pointer;
}
.pf-st:hover { border-color: #c3cfdf; }
.pf-st.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 10%, #fff); color: var(--sc); font-weight: 600; }
.pf-st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sc); }
.pf-st em { font-style: normal; font-size: 10.5px; color: #98a3b3; }
.pf-st.on em { color: var(--sc); }
.pf-st-off { width: 100%; margin-top: 5px; font-size: 10.5px; color: #98a3b3; line-height: 1.5; }

.pf-geo { display: flex; gap: 6px; }
.pf-geo select {
  flex: 1; min-width: 0; padding: 5px 7px; border: 1px solid #d7dee8; border-radius: 5px;
  font-size: 11.5px; color: #3d4859; background: #fff;
}
.pf-geo select:disabled { background: #f6f8fb; border-style: dashed; color: #a8b2c1; }
.pf-geo-top { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.pf-geo-tag {
  padding: 2px 8px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;
  color: #64748b; font-size: 10.5px; cursor: pointer;
}
.pf-geo-tag:hover { border-color: #c3cfdf; }
.pf-geo-tag.on { border-color: #2563eb; background: #eef4ff; color: #1d4ed8; font-weight: 600; }
.pf-geo-tag em { font-style: normal; color: #98a3b3; }
.pf-geo-tag.on em { color: #2563eb; }

.pf-metric { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pf-m {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 7px 9px; border: 1px solid #e8edf4; border-radius: 6px; background: #fff;
  cursor: pointer; text-align: left;
}
.pf-m:hover { border-color: #c3cfdf; background: #fbfcfe; }
.pf-m b { font-size: 16px; font-weight: 660; color: #1f2937; line-height: 1.15; }
.pf-m span { font-size: 10.5px; color: #8a95a5; }
.pf-m.warn b { color: #b45309; }
.pf-m.bad b { color: #dc2626; }
.pf-m.hi b { color: #7c3aed; }
.pf-m.ok b { color: #059669; }

.pf-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pf-foot .md-refresh {
  padding: 5px 11px; border: 1px solid #d7dee8; border-radius: 5px; background: #fff;
  color: #5b6675; font-size: 11.5px; cursor: pointer;
}
.pf-foot .md-refresh:hover { border-color: #b8c4d3; background: #f8fafc; }
.pf-foot .md-updated { font-size: 10.5px; color: #a8b2c1; margin-left: auto; }

/* ==================== 全域搜索 · 双模式切换 ==================== */
.gs-mode { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: #eef2f7; flex-shrink: 0; }
.gs-mode-b {
  padding: 5px 11px; border: 0; border-radius: 5px; background: transparent;
  color: #64748b; font-size: 12px; white-space: nowrap; cursor: pointer; transition: all .15s;
}
.gs-mode-b:hover { color: #334155; }
.gs-mode-b.on { background: #fff; color: #1d4ed8; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
@media (max-width: 900px) {
  .gs-mode-b { padding: 5px 8px; font-size: 11.5px; }
}
