:root {
  --bg: #ffffff;
  --line: #ececec;
  --line-soft: #f4f4f4;
  --text: #2b2b2b;
  --text-soft: #8a8a8a;
  --primary: #1c64d6;
  --primary-soft: #e7f0ff;
  --danger: #e6492d;
}

* { box-sizing: border-box; }

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

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* iter343：顶栏整体删除（左功能栏与地图区都顶到屏幕最上沿），品牌移入左栏顶部
   iter344：品牌文字换成 logo 图（logo.jpg，白底与侧栏同色无缝）
   iter345：用户反馈 logo 太大 → 缩小并居中（不占满侧栏宽） */
.tb-brand {
  padding: 0; /* iter346：上下白框去除——logo 贴顶、下方与胶囊间距交给胶囊自身 margin */
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}
.tb-logo {
  display: block;
  width: auto;
  max-width: 118px;
  max-height: 88px;
  height: auto;
  border-radius: 6px;
}
.btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #f6f8fb; border-color: #dadada; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #1757bd; }
.btn-ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-ico .fill { fill: none; stroke: currentColor; }
.btn { display: inline-flex; align-items: center; gap: 5px; }

/* 侧栏功能按钮区（原顶栏按钮迁移至此，紧凑换行网格） */
.sb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.sb-actions .btn {
  flex: 1 1 calc(20% - 6px);
  min-width: 0;
  height: 28px;
  padding: 0 4px;
  font-size: 11.5px;
  border-radius: 7px;
  justify-content: center;
  white-space: nowrap;
}
.sb-actions .btn .btn-ico { width: 13px; height: 13px; }
.sb-actions .btn.sb-wide { flex: 2 1 calc(40% - 6px); }

/* 主体 */
.body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* 左侧统一工具栏（iter 185 五板块；iter 215 168→84；iter 216 微调至96；iter 248 深色改白色底；iter337 ERP改版 96→184 大胶囊侧栏） */
.toolbar {
  width: 184px;
  flex: 0 0 184px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 18px rgba(15,30,60,.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 0 14px; /* iter346：顶白框随 logo 贴顶去除（原 10px） */
  overflow-y: auto;
  position: relative;
}
.toolbar::-webkit-scrollbar { width: 5px; }
.toolbar::-webkit-scrollbar-thumb { background: #d7dee9; border-radius: 3px; }
.tool-sec {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #3c4a5e;
  padding: 13px 12px 11px;
  user-select: none;
  border-bottom: 1px solid rgba(15,40,80,.08);
  flex: 0 0 auto;
}
/* iter 190：标注工具折叠开关（iter 245：改为胶囊触发器，箭头已删） */
.tool-sec-tgl { cursor: pointer; display: flex; align-items: center; }
#toolsGroup { display: flex; flex-direction: column; gap: 0; }
#toolsGroup[hidden] { display: none; }
.tool-btn {
  width: 100%;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  font-size: 12px;
  color: #3c4a5e;
  position: relative;
  transition: background .12s, color .12s;
}
/* 行间发丝分隔线（iter 248 白底适配） */
.tool-btn + .tool-btn { border-top: 1px solid rgba(15,40,80,.07); }
.tool-btn .ico { font-size: 16px; line-height: 1; }
.tool-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-btn svg .fill { fill: currentColor; stroke: none; }
.tool-btn:hover { background: rgba(47,123,255,.07); color: #1f2c3d; }
.tool-btn.active { background: rgba(47,123,255,.10); color: #2f7bff; }
.tool-btn.active::before {
  content: '';
  position: absolute;
  left: 0; top: 7px; bottom: 7px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #2f7bff;
}
/* iter 236：设置/图层/客源 改胶囊按钮样式（用户参考图：实心紫蓝底+白字+全圆角；iter 245：标注工具触发器并入同款胶囊；iter 248：房贷计算器胶囊）
   iter337：ERP 模板改版——大号蓝→紫渐变胶囊（46px 高、左对齐 图标+文字、全宽） */
/* iter363：#btnEstate（iter354 漏加）并入四组胶囊选择器，与首页/客源等完全同款 */
#toolsSecHead, #btnHome, #btnSettings, #btnLayersOpen, #btnLoan, #btnCust, #btnHouseNote, #btnMapHome, #btnEstate {
  width: auto; /* align-items:stretch 下 auto 即全宽（扣除左右 margin），与模板一致 */
  height: 46px;
  flex: 0 0 auto;
  margin: 5px 10px 0;
  border-radius: 999px;
  border-top: none;
  border-bottom: none; /* 覆盖 .tool-sec 的底部分隔线 */
  background: linear-gradient(90deg, #2e6cf6 0%, #7a5af5 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: normal; /* 覆盖 .tool-sec 的 2px 字距 */
  justify-content: flex-start; /* 模板：图标+文字左对齐 */
  gap: 10px;
  padding: 0 16px; /* 覆盖 .tool-sec 的 13/12/11 内边距 */
  box-shadow: 0 2px 8px rgba(46,108,246,.28);
}
#toolsSecHead:hover, #btnHome:hover, #btnSettings:hover, #btnLayersOpen:hover, #btnLoan:hover, #btnCust:hover, #btnHouseNote:hover, #btnMapHome:hover, #btnEstate:hover {
  background: linear-gradient(90deg, #1f5ce8 0%, #6b4bef 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(46,108,246,.38);
}
/* iter337：恢复胶囊内图标；iter338：统一白色线性 SVG 图标（currentColor，手机端自动变深色），
   固定 20px 图标槽位 → 所有胶囊文字左缘严格对齐（修复 emoji 大小不一/账号·标注工具无图标导致的歪歪扭扭） */
#toolsSecHead .ico, #btnHome .ico, #btnSettings .ico, #btnLayersOpen .ico, #btnLoan .ico, #btnCust .ico, #btnHouseNote .ico, #btnMapHome .ico, #btnEstate .ico, .user-chip-btn .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
#toolsSecHead .ico svg, #btnHome .ico svg, #btnSettings .ico svg, #btnLayersOpen .ico svg, #btnLoan .ico svg, #btnCust .ico svg, #btnHouseNote .ico svg, #btnMapHome .ico svg, #btnEstate .ico svg, .user-chip-btn .ico svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-sep { width: 100%; height: 1px; background: rgba(255,255,255,.1); margin: 6px 0; flex: 0 0 auto; }
/* iter 244：标注工具改为可拖动浮动工具栏（点击「标注工具」标题弹出；position:fixed 不受工具栏 overflow 裁剪） */
.tools-float {
  position: fixed;
  left: 192px; /* iter337：侧栏 96→184 后同步右移 */
  top: 56px;
  z-index: 900;
  display: none;
  width: 112px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15,30,60,.16);
  overflow: hidden;
}
.tools-float.show { display: block; }
.tf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #3c4a5e;
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid rgba(15,40,80,.08);
  touch-action: none; /* 拖动期间不触发页面滚动/手势 */
}
.tf-close { border: none; background: transparent; color: #98a4b3; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tf-close:hover { color: #2f7bff; }
/* iter 246：紫蓝胶囊支持上下拖动排序（拖动中禁过渡/禁选中，拖起时加投影） */
.toolbar.pill-reordering .tool-sec, .toolbar.pill-reordering .tool-btn, .toolbar.pill-reordering .user-chip { transition: none !important; user-select: none; }
.toolbar .pill-drag { opacity: .92; box-shadow: 0 4px 16px rgba(9,14,24,.55); }
/* 板块内的普通按钮：左对齐整行（地图板块从右侧设置菜单移入） */
.toolbar .btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-size: 12px;
  padding: 7px 10px;
  gap: 8px;
  border-radius: 8px;
}
.toolbar .btn-ico { width: 15px; height: 15px; flex: 0 0 auto; }
/* 账号板块 */
.toolbar .user-area {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin: 0;
  width: 100%;
}
.toolbar .user-info {
  font-size: 11px;
  color: #6b7488;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
/* 图层板块在窄栏内的行布局：操作按钮换行到第二行 */
.toolbar .sb-layers { width: 100%; border-bottom: none; background: transparent; padding: 0 2px; }
.toolbar .sb-layers .ly-row {
  grid-template-columns: 14px 22px 1fr;
  grid-template-areas:
    "handle eye name"
    "act act act";
}
.toolbar .sb-layers .ly-act { flex-wrap: wrap; justify-content: flex-start; }
.btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 地图 */
.map-wrap {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
}
#map { position: absolute; inset: 0; touch-action: none; } /* 移动端关闭浏览器默认手势，避免拖拽/手绘时页面被滚动或缩放劫持 */

/* iter341：地图底部悬浮统计卡已按用户要求移除（统计入口保留在「首页」工作台） */


/* 底部状态条 */
.status {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1001; /* 高于地图内部图层，否则完成/取消按钮被地图透明层盖住点不到 */
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  padding: 7px 14px;
  border-radius: 22px;
  font-size: 13px;
  max-width: 80%;
}
.status button {
  height: 26px;
  padding: 0 12px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 12px;
  background: #fff;
  color: #222;
}
.status button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }

/* 右侧列表面板 */
.sidebar {
  width: 286px;
  flex: 0 0 286px;
  border-left: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar .sb-head {
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* 面板收起/展开 */
.sb-toggle {
  margin-left: auto;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 5px;
}
.sb-toggle:hover { background: #f0f3f8; color: var(--text); }
.sidebar.collapsed { display: none; }
.sb-expand {
  position: absolute;
  top: 14px;
  right: 0;
  z-index: 1000;
  width: 26px;
  height: 46px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: var(--text-soft);
  font-size: 15px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 8px rgba(0,0,0,.06);
}
.sb-expand:hover { color: var(--primary); background: #f6f9ff; }
.sb-expand.show { display: flex; }
.sb-expand .sbxt { display: none; }

/* 演示模式：隐藏一切编辑 UI，只留地图（外出展示用） */
.app--present .toolbar,
.app--present .sidebar,
.app--present .sb-expand { display: none !important; }
.app--present .anno-dialog { display: none !important; }
.app--present .status { display: none !important; }

/* 演示模式浮层退出按钮（顶栏被隐藏时仍需可见） */
.exit-demo {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1300;
  display: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
}
.exit-demo:hover { background: #fff; }
.app--present .exit-demo { display: flex; }

/* 手机端画笔浮动按钮（iter 92）：工具栏在手机只读时隐藏，故独立提供 */
.brush-fab {
  position: absolute;
  right: 14px;
  bottom: 76px;
  z-index: 1300;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: #fa8c16;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.32);
  cursor: pointer;
}
.brush-fab.active {
  background: #e8590c;
  box-shadow: 0 0 0 3px rgba(250,140,22,.45), 0 4px 14px rgba(0,0,0,.32);
}

/* 画笔面板（iter 93）：换色 + 清空手绘；仅画笔模式显示，浮在画笔按钮上方 */
.brush-panel {
  display: none;
  position: absolute;
  right: 14px;
  bottom: 140px;
  z-index: 1300;
  width: 168px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
}
.brush-panel.show { display: block; }
.brush-panel .bp-title {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 7px;
}
.brush-panel .bp-colors {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-bottom: 9px;
}
.brush-panel .bp-swatch {
  width: 100%;
  height: 17px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 3px;
  cursor: pointer;
}
.brush-panel .bp-swatch.on {
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--text);
}
.brush-panel .bp-clear {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.brush-panel .bp-clear:hover { background: var(--line-soft); }
.brush-panel .bp-weight { margin-top: 4px; }
.brush-panel .bp-wrow { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.brush-panel .bp-wval { font-weight: 600; color: var(--text); min-width: 14px; text-align: right; }
.brush-panel #lineWeight { width: 100%; margin: 0 0 8px; accent-color: #1c7ed6; }
.brush-panel .bp-wprev { display: flex; justify-content: center; align-items: center; height: 32px; }
.brush-panel .bp-wprev-bar { display: block; height: 6px; width: 18px; background: #1c7ed6; border-radius: 3px; }

/* 分享二维码弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.4);
}
.modal.show { display: flex; }
.modal-card {
  width: 300px;
  max-width: 90vw;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head .ad-x {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: none; border-radius: 8px;
  background: #f1f3f5; color: #555;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-head .ad-x:hover { background: #ffe3e3; color: #e03131; }
.modal-body { padding: 16px 18px 20px; text-align: center; }
.modal-tip { margin: 0 0 14px; font-size: 12px; color: var(--text-soft); line-height: 1.5; text-align: left; }
.qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr img, .qr canvas { display: block; }
.qr-fail { font-size: 12px; color: var(--danger); margin: 0; }
.modal-url {
  font-size: 12px;
  color: var(--text-soft);
  word-break: break-all;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ============ 手机版（窄屏 ≤760px 自动切换移动布局） ============ */
@media (max-width: 760px) {
  .app { height: 100vh; height: 100dvh; }

  /* 顶栏：标题与搜索框同一行，搜索框弹性缩短，右侧「登录」按钮（手机未登录时显示） */
  /* iter342：原顶栏分享按钮手机端还原规则已随按钮移入 .map-float-bar 删除 */
  .top-search { flex: 1 1 0; min-width: 0; margin-left: 0; max-width: 220px; } /* 弹性缩短：不再撑满整行，给「登录」按钮留出同行空间 */

  /* 主体改竖向：地图在上，工具栏固定底部；底部避让固定导航栏（iter 213） */
  .body { flex-direction: column; padding-bottom: calc(50px + env(safe-area-inset-bottom)); }

  /* 左侧工具栏 → 底部横向条 */
  .toolbar {
    order: 3;
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 2px;
    padding: 6px 4px;
    border-right: none;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: visible;
  }
  .tool-btn { width: 58px; flex: 0 0 auto; flex-direction: column; justify-content: center; font-size: 11px; gap: 2px; padding: 4px 0; border-radius: 8px; }
  .tool-btn + .tool-btn { border-top: none; } /* iter 234：横条下取消竖排分隔线 */
  /* iter 236：手机端横条里 设置/图层/客源 恢复普通工具钮（ID 选择器优先级高于媒体查询类规则，须显式还原；iter 248 白底配深色字） */
  #btnSettings, #btnLayersOpen, #btnLoan, #btnCust {
    width: 58px; height: auto; margin: 0; padding: 4px 0;
    border-radius: 8px; background: transparent; color: #3c4a5e; font-weight: 400;
    flex-direction: column; gap: 2px;
  }
  #btnSettings:hover, #btnLayersOpen:hover, #btnLoan:hover, #btnCust:hover { background: rgba(47,123,255,.07); color: #1f2c3d; }
  #btnSettings .ico, #btnLayersOpen .ico, #btnLoan .ico, #btnCust .ico, #btnHouseNote .ico { display: inline; } /* iter 239：手机端横条恢复图标 */
  /* iter 238：手机端账号钮恢复普通工具钮样式，菜单从底栏上方弹出 */
  #userChip { margin: 0; }
  #userChip .user-chip-btn { width: 58px; height: auto; padding: 4px 0; border-radius: 8px; background: transparent; color: #3c4a5e; font-weight: 400; flex-direction: column; gap: 2px; font-size: 11px; }
  #userChip .user-chip-btn:hover { background: rgba(47,123,255,.07); color: #1f2c3d; }
  .tool-btn svg { width: 18px; height: 18px; }
  /* iter 213：工具按钮本体改横排（此前 .toolbar 已 row 但 #toolsGroup 仍是 column → 竖排），放最底部，横向可滑 */
  #toolsGroup { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; }
  .tool-sec { display: none; } /* iter 185：手机端横条不显示板块标题 */
  .tool-sep { display: none; }
  /* iter 244：手机端还原内联横排——浮层壳 display:contents 让 #toolsGroup 继续作为底栏 flex 子项（iter214 横排不变） */
  .tools-float { display: contents !important; }
  .tf-head { display: none !important; }
  .toolbar .btn { width: 58px; flex: 0 0 auto; flex-direction: column; justify-content: center; text-align: center; font-size: 11px; gap: 2px; padding: 4px 0; }
  .toolbar .user-area { flex-direction: column; align-items: center; }
  .toolbar .sb-layers .ly-row { grid-template-columns: 14px 22px 1fr; grid-template-areas: "handle eye name" "act act act"; }

  /* iter 262：标注工具 → 地图左侧竖排工具条（用户截图圈「房贷/账号」：与底部 tab 重复，手机端移除） */
  .toolbar {
    position: fixed;
    left: 6px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 56px;
    max-height: calc(100dvh - 140px - env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(15,40,80,.12);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1190;
  }
  #toolsGroup { flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 0; }
  .tool-btn, .toolbar .btn {
    width: 100%; height: auto; flex: 0 0 auto; margin: 0;
    flex-direction: column; justify-content: center; align-items: center;
    text-align: center; font-size: 10px; gap: 3px; padding: 7px 0;
    border-radius: 8px; border-top: none;
  }
  .tool-btn svg { width: 18px; height: 18px; }
  #btnSettings, #btnLayersOpen {
    width: 100%; height: auto; margin: 0; padding: 7px 0;
    border-radius: 8px; flex-direction: column; gap: 3px;
  }
  /* iter337：手机端「地图」钮与设置/图层同款普通工具钮（还原桌面渐变胶囊）；iter340：首页钮同款还原；iter363：二手房钮同款还原 */
  #btnHome, #btnMapHome, #btnEstate {
    width: 100%; height: auto; margin: 0; padding: 7px 0;
    border-radius: 8px; flex-direction: column; gap: 3px;
    background: transparent; color: #3c4a5e; font-weight: 400; box-shadow: none;
  }
  #btnHome:hover, #btnMapHome:hover, #btnEstate:hover { background: rgba(47,123,255,.07); color: #1f2c3d; box-shadow: none; }
  /* 底部 tab 已有「客源 / 笔记 / 我的」→ 工具条里的重复入口手机端移除
     （iter304 房贷入「我的」页；iter305 笔记入底栏 #mtabNote，隐藏不影响其复用 btnHouseNote.click()） */
  #btnLoan, #btnCust, #userChip, #btnHouseNote { display: none !important; }
  /* 普通用户（只读）本就无工具可显示（role-user 隐藏 #toolsFloat）→ 不渲染空工具条 */
  body.role-user .toolbar { display: none !important; }

  /* 地图占满中间 */
  .map-wrap { order: 2; flex: 1 1 auto; min-height: 0; }

  /* 右侧列表 → 底部抽屉（不盖住底栏：抽屉自底栏之上浮起） */
  .sidebar {
    order: 4;
    position: fixed;
    left: 0; right: 0; bottom: 70px;
    width: 100%;
    flex: 0 0 auto;
    height: 64vh;
    max-height: 64vh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 22px rgba(0,0,0,.14);
    transform: translateY(calc(100% + 70px));
    transition: transform .25s ease;
    z-index: 1200;
  }
  .sidebar.collapsed { display: block; transform: translateY(calc(100% + 70px)); }
  .sidebar:not(.collapsed) { transform: translateY(0); }
  .sb-head { padding-top: 14px; }

  /* 展开把手：手机上变底部居中圆钮「列表」，置于底栏之上（下移 10px 更贴底栏） */
  .sb-expand {
    top: auto; bottom: 74px; left: 50%; right: auto;
    transform: translateX(-50%);
    width: auto; height: 42px; padding: 0 18px;
    border: 1px solid var(--line); border-radius: 21px;
    font-size: 13px;
  }
  .sb-expand .sbxt-ico { display: none; }
  .sb-expand .sbxt { display: inline; }

  /* 状态提示条移到地图顶部，避免与底部工具栏/列表把手打架；
     手机上默认隐藏那个黑色提示框，只有绘制/裁剪出现「完成/取消」按钮时才显形 */
  .status {
    top: 10px; bottom: auto; left: 10px; right: 10px;
    font-size: 12px; justify-content: flex-start; gap: 8px;
    display: none;
  }
  .status.has-action { display: flex; }

  /* 文字工具输入框在手机上变固定条（抽屉默认收起，避免看不见） */
  .text-input-wrap.show {
    position: fixed;
    top: 52px; left: 10px; right: 10px;
    z-index: 1150;
  }

  /* 楼盘对话框全屏 */
  .anno-dialog {
    top: 0; right: 0; left: 0; bottom: 0;
    width: auto; max-height: none;
    transform: none;
    border: none; border-radius: 0;
  }
}
.sb-list {
  flex: 1 1 auto;
  overflow-y: auto;
}
.empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}
.item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
/* 图层面板（按视野范围显隐） */
.sb-layers {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 10px;
  background: #fcfcfd;
  flex: 0 0 auto;
}
.sb-layers .ly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
}
.sb-layers .ly-head:hover { color: var(--text); }
.sb-layers .ly-arrow { flex: 0 0 auto; margin-right: 4px; font-size: 11px; }
.sb-layers .ly-km { color: var(--primary); font-weight: 500; }
.sb-layers .ly-row {
  display: grid;
  grid-template-columns: 14px 22px 1fr auto;
  grid-template-areas:
    "handle eye name act"
    "range range range range";
  align-items: center;
  gap: 4px 6px;
  padding: 5px 6px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: #fff;
  border: 1px solid var(--line);
}
.sb-layers .ly-row.off { opacity: .45; }
.sb-layers .ly-row.dragging { opacity: .4; }
.sb-layers .ly-row.over { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(28, 100, 214, .18); }
.sb-layers .ly-handle {
  grid-area: handle;
  color: #b8bcc2;
  cursor: grab;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  user-select: none;
}
.sb-layers .ly-handle:active { cursor: grabbing; }
.sb-layers .ly-eye {
  grid-area: eye;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
.sb-layers .ly-name {
  grid-area: name;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  padding: 2px 0;
}
.sb-layers .ly-name:focus { outline: none; border-bottom: 1px solid var(--primary); }
.sb-layers .ly-act {
  grid-area: act;
  display: flex;
  gap: 4px;
  align-items: center;
}
.sb-layers .ly-cur,
.sb-layers .ly-del,
.sb-layers .ly-dup,
.sb-layers .ly-cat {
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 6px;
  font-size: 11px;
  height: 20px;
  padding: 0 6px;
  cursor: pointer;
  color: var(--text-soft);
  white-space: nowrap;
}
.sb-layers .ly-cat:hover { color: var(--primary); border-color: rgba(28,100,214,.35); background: var(--primary-soft); }
.ly-cat-menu {
  position: fixed;
  z-index: 3000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  padding: 6px;
  width: 210px;
  max-height: 340px;
  overflow: auto;
}
.ly-cat-head { font-size: 11px; color: var(--text-soft); padding: 4px 6px 6px; }
.ly-cat-opt {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; border: none; background: none; border-radius: 6px;
  font-size: 13px; padding: 6px 8px; cursor: pointer; color: var(--text);
}
.ly-cat-opt:hover { background: var(--primary-soft); }
.ly-cat-opt em { font-style: normal; font-size: 11px; color: var(--text-soft); }
.ly-cat-clr { color: var(--text-soft); }
.ly-cat-new { padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.ly-cat-new input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 12px; padding: 5px 8px;
}
.ly-cat-new input:focus { outline: none; border-color: var(--primary); }
.sb-layers .ly-cur.on { background: var(--primary-soft); border-color: rgba(28,100,214,.4); color: var(--primary); }
.sb-layers .ly-del:hover { color: #e03131; background: #fff0ee; }
.sb-layers .ly-dup:hover { color: var(--primary); border-color: rgba(28,100,214,.35); background: var(--primary-soft); }
.sb-layers .ly-range {
  grid-area: range;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-soft);
}
.sb-layers .ly-km-in {
  width: 52px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  color: var(--text);
}
.sb-layers .ly-km-in:focus { outline: none; border-color: var(--primary); }
.sb-layers .ly-add {
  width: 100%;
  height: 26px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
}
.sb-layers .ly-add:hover { color: var(--primary); border-color: rgba(28,100,214,.45); background: var(--primary-soft); }

.item:hover { background: #fafbfc; }
.item.selected { background: var(--primary-soft); }
.item.hidden-l { opacity: .5; }
.item.dragging { opacity: .4; }
.folder-head.drop-hover,
.folder-body.drop-hover {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px rgba(28, 100, 214, .4);
}
.item[draggable="true"] { cursor: grab; }
.item[draggable="true"]:active { cursor: grabbing; }
/* 拖拽排序落点指示：上半=插入到上方，下半=插入到下方 */
.item.drop-above { box-shadow: inset 0 2px 0 0 #fa8c16; }
.item.drop-below { box-shadow: inset 0 -2px 0 0 #fa8c16; }
/* iter 408：文件夹同级重排落点指示（拖到文件夹头的上/下半区） */
.folder-head.f-drop-above::before,
.folder-head.f-drop-below::after {
  content: ''; position: absolute; left: 4px; right: 4px; height: 3px;
  background: var(--primary); border-radius: 2px; z-index: 6; pointer-events: none;
}
.folder-head.f-drop-above::before { top: -2px; }
.folder-head.f-drop-below::after { bottom: -2px; }

/* 标注列表工具行 + 文件夹 */
.sb-tools { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); }
/* 顶栏搜索框：输入即过滤标注列表，回车定位第一个匹配（原在侧栏，按用户要求移至顶栏） */
.top-search { flex: 0 1 340px; margin-left: 14px; }
/* 手机端「登录」按钮：仅窄屏显示（桌面隐藏），登录后由 JS 隐藏 */
#btnMobileLogin { display: none; }
.top-search input {
  width: 100%; height: 32px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px; font-size: 13px;
  background: #fff; color: var(--text);
}
.top-search input:focus { outline: none; border-color: var(--primary, #1677ff); box-shadow: 0 0 0 2px rgba(28, 100, 214, .12); }
.sb-search-empty { padding: 14px 10px; font-size: 12px; color: var(--text-soft); text-align: center; }
.sb-tools .mini-btn {
  width: 100%;
  height: 28px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
}
.sb-tools .mini-btn:hover { color: var(--primary); border-color: rgba(28, 100, 214, .45); background: var(--primary-soft); }
.folder-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #f6f8fb;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 5;
}
.folder-head .f-arrow {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-soft);
  width: 16px;
  padding: 0;
  flex: 0 0 16px;
}
.folder-head .f-name {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.folder-head .f-name:focus { outline: none; border-bottom: 1px solid var(--primary); }
.folder-head .f-ren {
  flex: 0 0 20px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 12px;
  border-radius: 6px;
}
.folder-head .f-ren:hover { color: var(--primary); background: var(--primary-soft); }
.folder-head .f-count {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 1px 7px;
}
.folder-head .f-del {
  flex: 0 0 20px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px;
}
.folder-head .f-del:hover { color: var(--danger); background: #fff0ee; }
.folder-head .f-add {
  flex: 0 0 20px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  border-radius: 6px;
}
.folder-head .f-add:hover { color: var(--primary); background: var(--primary-soft); }
.folder-head .f-eye {
  flex: 0 0 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}
.folder-head .f-eye:hover { opacity: .7; }
.folder-head.f-hidden .f-name { color: var(--text-soft); text-decoration: line-through; }
.folder-head.dragging, .folder-body.dragging { opacity: .4; }
.folder-head { cursor: grab; }
.folder-head:active { cursor: grabbing; }
.folder-body { padding-left: 10px; background: #fdfdfe; }

/* 所属类型（iter 112）：类型分组头 / 名称标签 / 筛选下拉 / 弹窗自定义输入 */
.cat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #f2f7f2;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 5;
}
.cat-head .cat-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-tag {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  color: #2f9e44;
  background: #e6f4ea;
  border-radius: 8px;
  padding: 2px 7px;
  margin-left: 6px;
}
.anno-dialog .ad-inp {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
}
.anno-dialog .ad-inp:focus { outline: none; border-color: var(--primary); }

/* iter 163：设置收纳菜单（工具按钮 + 图层面板） */
#toolsMenu[hidden] { display: none; }
#toolsMenu { border-bottom: 1px solid var(--line-soft); }
#toolsMenu .sb-layers { border-top: 1px solid var(--line-soft); }

/* iter 165：模板编辑框必须盖在模板列表之上（同 .modal，列表在 DOM 靠后会盖住编辑框） */
#tplModal.show { z-index: 1420; }

/* 邀请码门禁开关（iter 113） */
.inv-req-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.inv-req-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.item .row1 { display: flex; align-items: center; gap: 8px; }
/* iter419：行详情（row2 类型/面积行、透明度滑杆、展开详情容器）已删除，样式一并清理 */
.item .swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, .12);
  cursor: pointer;
  flex: 0 0 16px;
  padding: 0;
}
.item .swatch:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .28); }
.item .nm {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  padding: 2px 0;
}
.item .nm::placeholder { color: #bbb; }
.item .nm:focus { outline: none; background: #fff; border-bottom: 1px solid var(--primary); }
.item .del {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
  flex: 0 0 20px;
  border-radius: 6px;
}
.item .del:hover { color: var(--danger); background: #fff0ee; }
/* 列表行：眼睛显隐按钮 + 纯文本名称（不可编辑） */
.item .eye {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  color: var(--text-soft);
}
.item .eye:hover { background: rgba(0, 0, 0, .06); }
/* iter 260：区域行「⚙ 设置」等胶囊按钮；iter420：侧栏行设置按钮移除，pop-tgl 类随之清退 */
.item .nm-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0;
  cursor: default;
}
.item .hgt {
  width: 46px;
  flex: 0 0 46px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  color: var(--text);
}
.item .hgt:focus { outline: none; border-color: var(--primary); }

/* 楼盘图片区 */
.item .imgs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding-left: 24px;
}
.item .imgs .th {
  width: 46px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  display: block;
}
.item .imgs .th:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .28); }
.item .upbtn {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px dashed rgba(28, 100, 214, .45);
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}
.item .upbtn:hover { background: rgba(28, 100, 214, .14); }

/* 图片灯箱 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500; /* 高于弹窗(1400)：从信息页点缩略图时大图正常盖在弹窗上 */
  background: rgba(0, 0, 0, .72);
  align-items: center;
  justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox .lb-body {
  position: relative; /* 大图水印叠加层定位基准 */
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 展示水印已全部下线（iter313）：相关叠加层与满屏层样式均已删除 */
.lightbox img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.lightbox .lb-bar {
  position: relative;
  z-index: 3; /* 水印层之上，保证底栏文字/按钮清晰 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 13px;
}
/* 防复制（iter 302）：非管理员禁止选中/复制文字 */
body.no-copy, body.no-copy * { -webkit-user-select: none !important; user-select: none !important; }
/* 邀请码门禁（iter 98）：手机端必须先输入有效邀请码 */
.gate { position: fixed; inset: 0; z-index: 500; background: #f4f6f9; display: flex;
        align-items: center; justify-content: center; padding: 24px; }
.gate-card { width: 100%; max-width: 340px; background: #fff; border-radius: 16px; padding: 28px 22px;
             box-shadow: 0 6px 24px rgba(20,40,80,.10); text-align: center; }
.gate-logo { font-size: 22px; font-weight: 700; color: #1c7ed6; }
.gate-sub { font-size: 14px; color: #6b7486; margin-top: 8px; margin-bottom: 18px; }
.gate-input { margin-bottom: 12px; }
.gate-input input { width: 100%; height: 44px; text-align: center; letter-spacing: 4px; font-size: 18px;
                   text-transform: uppercase; border: 1px solid #d9dee7; border-radius: 10px; outline: none; }
.gate-input input:focus { border-color: #1c7ed6; }
.gate-btn { width: 100%; height: 44px; border: 0; border-radius: 10px; background: #1c7ed6; color: #fff;
            font-size: 16px; font-weight: 600; cursor: pointer; }
.gate-btn:active { background: #1668b3; }
.gate-btn:disabled { opacity: .6; }
.gate-err { color: #e03131; font-size: 13px; margin-top: 12px; min-height: 16px; }
.gate-err.has-err { font-weight: 600; background: #fff0f0; border: 1px solid #ffd0d0; border-radius: 8px; padding: 7px 8px; text-align: center; }
.gate-tip { color: #adb4c1; font-size: 11px; margin-top: 14px; line-height: 1.6; }
/* iter 272：邀请码有效性提示 + 临期横幅（不擦除已填码，便于重试） */
.gate-valhint { color: #2f9e44; font-size: 12px; margin-top: 8px; min-height: 14px; line-height: 1.5; }
.gate-valhint.has-expired { color: #e8590c; }
.invite-warn { background: #fff8e1; border: 1px solid #ffe082; color: #8a6d00; font-size: 13px;
               line-height: 1.6; padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; }
.gate-link { display: inline-block; margin-top: 18px; color: #4dabf7; font-size: 14px; text-decoration: none; cursor: pointer; }
.gate-link:active { color: #1c7ed6; }
/* 手机端「登录后编辑」按钮（门禁页内，邀请码查看下方） */
.gate-login-btn { width: 100%; height: 44px; margin-top: 10px; border: 1px solid #1c7ed6; border-radius: 10px;
  background: #fff; color: #1c7ed6; font-size: 15px; font-weight: 600; cursor: pointer; }
.gate-login-btn:active { background: #e7f1fb; }
/* 「水印设置」面板样式已下线（iter313） */
.lightbox .lb-actions { display: flex; gap: 8px; }
.lightbox .lb-btn {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: #333;
  font-size: 13px;
  cursor: pointer;
}
.lightbox .lb-btn.danger { background: #e6492d; color: #fff; }

/* 水印样式弹窗（iter315）：独立弹窗配置编辑框盖章水印文字 */
.set-wm-block { margin: 0; padding: 0; }
.set-wm-title { font-size: 16px; font-weight: 600; color: var(--text); }
.set-wm-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.7; margin: 8px 0 12px; }
.set-wm-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.set-wm-lbl { font-size: 14px; color: var(--text); flex: none; }
.set-wm-input { flex: 1; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
                font-size: 15px; color: var(--text); }
.set-wm-input:focus { outline: none; border-color: var(--primary); }
.set-wm-prev { display: block; width: 100%; max-width: 320px; height: 120px; border-radius: 8px; margin-bottom: 12px;
                border: 1px solid var(--line); }
.set-wm-save { width: 100%; max-width: 320px; }

/* 楼盘信息对话框（点击色块/楼号标签右侧弹出） */
.anno-dialog {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1100;
  width: min(560px, calc(100vw - 32px)); /* iter411：固定 560×560 正方形 */
  height: 560px;
  max-height: calc(100vh - 80px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .18);
  overflow: hidden;
  flex-direction: column;
}
.anno-dialog.show { display: flex; }
.anno-dialog .ad-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.anno-dialog .ad-name-wrap { flex: 1 1 auto; min-width: 0; } /* iter390：标题撑满 → 「设置」按钮靠最右 */
.anno-dialog .ad-head .ip-color { flex: 0 0 auto; } /* iter403：标注颜色色块常驻标题栏（点击调出调色板） */
.anno-dialog .ad-name {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-bottom: 1px solid transparent;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
  cursor: text; /* iter404：标题可点击改名 */
}
.anno-dialog .ad-name:focus { outline: none; border-bottom-color: var(--primary); }
.anno-dialog .ad-x {
  flex: 0 0 auto;
  width: 35px; height: 35px;
  border: none;
  border-radius: 8px;
  background: #f1f3f5;
  color: #555;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.anno-dialog .ad-x:hover { background: #ffe3e3; color: #e03131; }
.anno-dialog .ad-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1 1 auto; /* iter411：固定高度弹窗内撑满并滚动 */
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* iter396：设置按钮只缩「宽度」到原一半（高度/字号还原 22px/12px——用户反馈全缩过小） */
.anno-dialog .ad-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f3f5;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}
.anno-dialog .ad-meta:hover { background: #e9ecef; }
.anno-dialog .ad-head .ad-save-btn { flex: 0 0 auto; } /* iter425：💾 保存自底部按钮行移入头部（样式复用 .ad-meta 芯片） */
.anno-dialog .ad-row { display: flex; align-items: center; gap: 13px; }
.anno-dialog .ad-row .swatch {
  width: 21px; height: 21px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .12);
  cursor: pointer;
  flex: 0 0 21px;
  padding: 0;
}
.anno-dialog .ad-row .swatch:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .28); }
.anno-dialog .ad-lbl { font-size: 16px; color: var(--text-soft); }
.anno-dialog .ad-lbl-ig { display: flex; align-items: center; gap: 8px; }
.anno-dialog .ig-sel {
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; padding: 4px 8px; background: #fff; color: var(--text);
}
.anno-dialog .ig-sel:focus { outline: none; border-color: var(--primary); }
.anno-dialog .ig-mgr {
  border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 8px 10px; margin: 2px 0 8px; background: #fafbfc;
}
.anno-dialog .ig-mgr-tip { font-size: 11px; color: var(--text-soft); margin-bottom: 6px; }
/* iter 129：模板管理总面板的小节标题 */
.anno-dialog .ig-mgr-sec {
  font-size: 12px; font-weight: 600; color: var(--primary);
  padding: 2px 0 4px; margin-top: 4px;
  border-bottom: 1px dashed var(--line); margin-bottom: 4px;
}
.anno-dialog .ig-mgr-row { display: flex; align-items: center; gap: 4px; padding: 3px 0; font-size: 13px; color: var(--text); }
.anno-dialog .ig-mgr-row > span:first-child { flex: 1; min-width: 0; }
.anno-dialog .ig-mgr-add {
  margin-top: 6px; border: 1px dashed var(--line); background: none;
  border-radius: 6px; font-size: 12px; padding: 4px 10px; cursor: pointer; color: var(--text-soft);
}
.anno-dialog .ig-mgr-add:hover { color: var(--primary); border-color: var(--primary); }
.anno-dialog .ad-empty { font-size: 12px; color: var(--text-soft); padding: 10px 2px; }
.anno-dialog .ig-btn {
  border: none; background: none; cursor: pointer;
  font-size: 12px; color: var(--text-soft); padding: 2px 5px; border-radius: 5px;
}
.anno-dialog .ig-btn:hover { background: var(--line-soft); color: var(--primary); }
.anno-dialog .ig-btn.ig-del:hover { background: #fff0ee; color: #e03131; }
/* iter 126：文本模板内容编辑器（展开式，多行） */
.anno-dialog .ad-meta.on { background: var(--primary-soft, #eef3ff); color: var(--primary); }
.anno-dialog .ad-collapsible-h {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 45px; padding: 0 16px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 16px; color: var(--text-soft); text-align: left;
}
.anno-dialog .ad-collapsible-h:hover { color: var(--primary); }
.anno-dialog .ad-chev { display: inline-block; width: 16px; color: var(--primary); transition: transform .15s; }
.anno-dialog .ad-collapsible-b { display: none; padding: 5px 16px 16px; }
.anno-dialog .ad-collapsible.open .ad-collapsible-b { display: block; }
.anno-dialog .ad-collapsible.open .ad-collapsible-h { border-bottom: 1px solid var(--line); }
.anno-dialog .ad-sel {
  flex: 1 1 auto;
  min-width: 0;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 16px;
  color: var(--text);
}
.anno-dialog .ad-sel:focus { outline: none; border-color: var(--primary); }
/* iter394：设置弹窗（透明度/所属图层/所属文件夹合并为浮层卡片，挂 #annoDialog 绝对定位，锚在「设置」按钮下方） */
/* iter413：浮层放大 320→480 + 卡片化美化（纯样式，功能不变） */
.anno-dialog > .ad-collapsible {
  position: absolute;
  top: 66px; right: 12px;
  z-index: 30;
  width: min(480px, calc(100% - 24px));
  max-height: calc(100% - 84px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(23, 43, 77, .16), 0 2px 8px rgba(23, 43, 77, .07);
  animation: adPopIn .16s ease-out;
}
@keyframes adPopIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.anno-dialog > .ad-collapsible .ad-collapsible-b { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 15px; }
.anno-dialog > .ad-collapsible .ad-row { gap: 14px; }
.anno-dialog > .ad-collapsible .ad-lbl { font-size: 14px; flex: 0 0 72px; color: var(--text-soft); }
.anno-dialog > .ad-collapsible .ad-sel { height: 40px; border-radius: 10px; font-size: 15px; }
/* iter413：透明度滑杆与数值 */
.anno-dialog .ad-opr { flex: 1 1 auto; min-width: 0; accent-color: var(--primary); cursor: pointer; }
.anno-dialog .ad-val { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--primary); min-width: 46px; text-align: right; }
/* iter382：所属图层多选（复选列表，替代原单选 .ad-sel） */
.anno-dialog .ad-ly-list { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.anno-dialog .ad-ly-item { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); cursor: pointer; min-width: 0; padding: 2px 0; } /* iter413：复选项微调 */
.anno-dialog .ad-ly-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anno-dialog .ad-ly-item input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
/* iter405：地图标题标签样式选择器（每标注自选） */
.anno-dialog .ad-ls-list { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anno-dialog .ad-ls-btn {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 9px; padding: 6px 14px; font-size: 14px; cursor: pointer; line-height: 1.4;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s; /* iter413：放大 + 过渡 */
}
.anno-dialog .ad-ls-btn:hover { border-color: var(--primary); }
.anno-dialog .ad-ls-btn.on { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(28, 100, 214, .32); }
/* iter414：快捷操作——删除按钮红色警示变体 */
.anno-dialog .ad-ls-btn.danger { color: #d3392f; border-color: #f0b6b2; }
.anno-dialog .ad-ls-btn.danger:hover { border-color: #d3392f; background: #fdf1f0; }
/* iter415：侧栏行「⚙ 设置」独立浮层（复用弹窗浮层内容样式，固定定位锚在行左侧） */
/* iter422：z-index 1380→1455——iter420 起浮层从详情页（.modal z1400）头部 ⚙ 打开，曾被详情页盖住只露底部；提到其上完全可见。尺寸 480→固定 560×560（矮屏 min() 兜底，内容多时内部滚动） */
.sb-ad-pop {
  position: fixed;
  top: 50%; left: 50%; /* iter424：视口居中（不再锚定 ⚙ 按钮），transform 由 JS 兜底清除内联 top/right */
  transform: translate(-50%, -50%);
  z-index: 1455;
  width: min(560px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 24px));
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(23, 43, 77, .16), 0 2px 8px rgba(23, 43, 77, .07);
  animation: sbPopIn .16s ease-out; /* iter424：居中版入场动画（adPopIn 的 translateY 会与居中 transform 冲突） */
}
@keyframes sbPopIn { from { opacity: 0; transform: translate(-50%, calc(-50% - 6px)) scale(.98); } }
.sb-ad-pop .ad-collapsible-b { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 15px; }
.sb-ad-pop .ad-row { gap: 14px; }
.sb-ad-pop .ad-lbl { font-size: 14px; flex: 0 0 72px; color: var(--text-soft); }
.sb-ad-pop .ad-sel { height: 40px; border-radius: 10px; font-size: 15px; }
.sb-ad-pop .ad-opr { flex: 1 1 auto; min-width: 0; accent-color: var(--primary); cursor: pointer; }
.sb-ad-pop .ad-val { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--primary); min-width: 46px; text-align: right; }
.sb-ad-pop .ad-ly-list { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.sb-ad-pop .ad-ly-item { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); cursor: pointer; min-width: 0; padding: 2px 0; }
.sb-ad-pop .ad-ly-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ad-pop .ad-ly-item input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.sb-ad-pop .ad-ls-list { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sb-ad-pop .ad-ls-btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 9px; padding: 6px 14px; font-size: 14px; cursor: pointer; line-height: 1.4; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.sb-ad-pop .ad-ls-btn:hover { border-color: var(--primary); }
.sb-ad-pop .ad-ls-btn.on { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(28, 100, 214, .32); }
.sb-ad-pop .ad-ls-btn.danger { color: #d3392f; border-color: #f0b6b2; }
.sb-ad-pop .ad-ls-btn.danger:hover { border-color: #d3392f; background: #fdf1f0; }
.anno-dialog .ad-note {
  width: 100%;
  min-height: 110px; /* iter411：适配 560×560 正方形 */
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px;
  font-size: 17px;
  font-family: inherit;
  color: var(--text);
}
.anno-dialog .ad-note:focus { outline: none; border-color: var(--primary); }
/* iter 296：项目信息框升级为类「楼盘笔记」富文本编辑器（复用 .hn-editor 管线，缩矮高度适配弹窗） */
.anno-dialog .ad-richwrap { margin: 0 0 12px; }
.anno-dialog .ad-rich { min-height: 200px; max-height: 46vh; overflow: auto; } /* iter411：适配 560×560 正方形 */
.anno-dialog .ad-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.anno-dialog .ad-th {
  width: 75px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.anno-dialog .ad-th:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .3); }
.anno-dialog .ad-up {
  align-self: flex-start;
  height: 37px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px dashed rgba(28, 100, 214, .45);
  border-radius: 9px;
  cursor: pointer;
}
.anno-dialog .ad-up:hover { background: rgba(28, 100, 214, .14); }

/* 选中楼盘的信息卡（点击地图楼盘名/色块后弹出） */
.item .detail {
  margin: 8px 0 2px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
.item .detail .dtitle {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 5px;
}
.item .detail .drow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  color: var(--text-soft);
}
.item .detail .drow b { font-weight: 500; color: var(--text); }
.item .detail .dbtns { display: flex; gap: 6px; margin-top: 7px; }
.item .detail .dbtn {
  flex: 1 1 auto;
  height: 26px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
  color: var(--text);
  cursor: pointer;
}
.item .detail .dbtn:hover { background: var(--primary-soft); border-color: rgba(28, 100, 214, .4); color: var(--primary); }

/* 颜色选择面板 */
.palette {
  display: none;
  position: fixed;
  z-index: 1450; /* 高于弹窗(1400)：从信息页/编辑弹窗里点色块时面板正常盖在弹窗上（低于大图 1500） */
  width: 184px;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
}
.palette.show { display: flex; }
.palette .pc {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .1);
  cursor: pointer;
  padding: 0;
  transition: transform .1s;
}
.palette .pc:hover { transform: scale(1.15); }
.palette input.pc { width: 24px; height: 24px; padding: 0; border: none; background: none; cursor: pointer; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* 文本输入（文本工具激活时） */
.text-input-wrap {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #fafbfc;
}
.text-input-wrap.show { display: flex; }
.text-input-wrap input {
  flex: 1 1 auto;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  font-size: 13px;
}

/* 隐藏的文件选择 */
#fileInput { display: none; }

/* 地图加载失败提示 */
#mapError {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1002;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: #666;
  background: #f7f8fa;
  font-size: 13px;
  line-height: 1.8;
}

/* 小区房源信息页面（点击色块弹出，只读展示） */
/* 小区房源信息页：卡片版（较最初放大版缩小三分之一，超高时内部滚动） */
.ip-card {
  max-width: 588px;
  width: calc(100% - 48px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.ip-body { text-align: left; overflow-y: auto; }
.ip-name { margin: 2px 0 16px; font-size: 26px; color: var(--text); line-height: 1.3; }
.ip-meta {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--bg-soft, #f5f6f8); border-radius: 10px;
}
.ip-meta > div { display: flex; justify-content: space-between; font-size: 15px; color: var(--text-soft); }
.ip-meta b { color: var(--text); font-weight: 500; }
/* 长值字段（如多期交付时间）：标签+内容同行，内容自然换行 */
.ip-meta > div.long { display: block; line-height: 1.7; }
.ip-meta > div.long b { white-space: pre-wrap; word-break: break-word; }
.ip-note {
  font-size: 16px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word; margin-bottom: 16px;
}
.ip-gal-title { font-size: 14px; color: var(--text-soft); margin-bottom: 10px; }
.ip-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ip-th {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 8px; cursor: pointer; border: 1px solid var(--border, #e4e7ec);
  background: #f0f2f5;
}
.ip-th:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .3); }
.ip-empty { font-size: 15px; color: var(--text-soft); padding: 14px 0; }
/* 编辑表单：小区信息（小区 / 容积率 / 户数 / 物业费） */
.anno-dialog .ad-attrs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px;
  margin-bottom: 10px;
}
.anno-dialog .ad-attr {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--text-soft, #888);
}
.anno-dialog .ad-inp {
  height: 28px; min-width: 0;
  border: 1px solid var(--line, #e0e0e0); border-radius: 7px;
  padding: 0 8px; font-size: 13px;
  background: #fff; color: var(--text, #222);
}
.anno-dialog .ad-inp:focus { outline: none; border-color: var(--primary, #1677ff); }
.anno-dialog .ad-attr--full { grid-column: 1 / -1; }
.ip-card .ip-body { padding: 20px 24px 24px; }
.ip-head .ip-edit-btn { flex: 0 0 auto; } /* iter397：顺序为 编辑→分享→设置→×（iter403 色块移入编辑弹窗标题栏；iter420 增设置） */
.ip-head .ip-share-btn { flex: 0 0 auto; }
.ip-head .ip-set-btn { flex: 0 0 auto; } /* iter420：详情页头部「⚙ 设置」，样式与 编辑/分享 一致 */
.ip-head .ad-x { margin-left: 0; }
.ip-head .ip-name { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 19px; line-height: 1.3; } /* iter427 恢复：iter142d 的规则误随注释删除，标题「XX」仍需此布局 */
/* iter 144：模板编辑弹窗（三栏表单，栏名点击直接改） */
/* iter 166：弹窗栏名改纯展示（取消点击改名），去掉文本光标与下划线手势 */
.ad-sec-head .sec-name { outline: none; }
.ad-sec-head .sec-name.static { cursor: default; }
/* 信息页：标注颜色入口（点击调出调色板）——旧行内布局保留兜底 */
.ip-color-row { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; }
.ip-color-row .ip-share-btn { margin-left: auto; }
.ip-color-lbl { font-size: 13px; color: var(--text-soft, #888); }
.ip-color {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; padding: 0;
}
.ip-color:hover { box-shadow: 0 0 0 2px rgba(28, 100, 214, .28); }
/* 调色板：常用色收藏按钮（★/☆） */
.palette .pc-star { font-size: 15px; line-height: 1; color: #f5a623; display: flex; align-items: center; justify-content: center; }
@media (max-width: 640px) {
  /* 手机端信息页卡片缩小一圈：四周留出更多地图，头部 × 常显可关 */
  .ip-card { width: calc(100% - 64px); max-height: calc(100vh - 96px); }
  .modal-head { padding: 10px 12px; font-size: 14px; }
  .ip-card .ip-body { padding: 16px 14px 18px; }
  .ip-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ip-name { font-size: 20px; margin: 2px 0 12px; }
  .ip-meta > div { font-size: 14px; }
  .ip-note { font-size: 15px; }
}
/* 手机端：永久只读展示（隐藏全部编辑入口，只保留搜索 + 地图展示）。
   「手机编辑」开关是电脑端专属控制（iter 87）：手机上永不显示该按钮，
   手机状态由电脑端切换并被记住，手机本身不再暴露任何编辑控制。 */
@media (max-width: 640px) {
  body:not(.m-edit) .toolbar { display: none !important; }
  body:not(.m-edit) .sidebar { display: none !important; }
  body:not(.m-edit) .status { display: none !important; }
  body:not(.m-edit) .status.has-action { display: flex !important; } /* 画笔提示在手机只读时也保持可见 */
  body:not(.m-edit) .map-float-bar .btn#btnSave,
  body:not(.m-edit) .map-float-bar .btn#btnDemo { display: none !important; }
  .map-float-bar .btn#btnShare { display: none !important; } /* iter261：手机端分享已移入「我的」页，不显示（桌面端保持原样） */
  body:not(.m-edit) #palette { display: none !important; }
  body:not(.m-edit) .lightbox #lbDel,
  body:not(.m-edit) .lightbox #lbMove { display: none !important; } /* 只读：图片互移/删除隐藏 */
  body:not(.m-edit) #infoPage #ipEdit { display: none !important; }
  body:not(.m-edit) .ip-head .ad-x { margin-left: auto; } /* 编辑隐藏后由 × 补位右推到右上角 */
}
/* 大图查看：滚轮缩放 + 拖拽平移 */
.lightbox img {
  transition: transform .08s ease-out;
  will-change: transform;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox img.dragging { transition: none; }
.lightbox .lb-hint { color: rgba(255,255,255,.65); font-size: 12px; }
@media (max-width: 640px) { .lightbox .lb-hint { display: none; } }

/* 工具栏：绘制颜色按钮 */
.tool-btn .tool-color-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);
  margin-bottom: -1px;
}
.palette .pal-tip {
  width: 100%; font-size: 12px; color: var(--text-soft, #888);
  margin-bottom: 2px;
}
.palette .pc.on { box-shadow: 0 0 0 2px var(--primary, #1677ff); }

/* 信息页标题：纯展示（iter403 不可点击改名） */

/* 侧栏条目：默认只显示名字，点箭头展开详情（透明度/面积/图片） */
.item .exp {
  width: 22px; height: 22px; flex: 0 0 auto;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-soft, #999); font-size: 12px; line-height: 1;
  padding: 0; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
}
.item .exp:hover { background: rgba(0,0,0,.06); color: var(--text, #333); }

/* 调色板：屏幕吸色按钮 */
.palette .pc-picker {
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6;
}
.palette .pc-picker svg { width: 15px; height: 15px; fill: #555; }
.palette .pc-picker:hover { background: #e8eaed; }

/* 调色板：窄屏（手机）底部居中弹层 */
.palette.sheet {
  left: 50% !important; right: auto !important;
  top: auto !important; bottom: 84px !important;
  transform: translateX(-50%);
  width: min(360px, 92vw);
}

/* ---------- 裁剪区位图 ---------- */
#cropRect {
  position: absolute;
  display: none;
  border: 2px dashed #fa8c16;
  background: rgba(250, 140, 22, 0.12);
  pointer-events: none;
  z-index: 600;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.08);
}
.map-wrap.tool-crop #map { cursor: crosshair !important; }
.map-wrap.tool-brush #map { cursor: crosshair; touch-action: none; } /* 画笔：关掉浏览器默认手势，避免拖拽时页面滚动/缩放 */
.crop-card { max-width: min(860px, calc(100vw - 48px)); }
.crop-img {
  display: block;
  max-width: 100%;
  max-height: 62vh;
  margin: 0 auto 14px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: #f6f7f9;
}
.crop-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.crop-tip { margin: 12px 0 0; font-size: 12px; color: var(--text-soft, #8a919f); line-height: 1.5; text-align: left; }

/* 裁剪导出期间：把地图容器临时放大到 16 级所需尺寸，裁掉溢出部分，不影响页面布局 */
.map-wrap.cropping { overflow: hidden; }
.map-wrap.cropping #map { z-index: 5; }

/* 裁剪选框：8 个拉伸手柄（选框本体 pointer-events:none，只有手柄可点） */
#cropRect .crop-handle {
  position: absolute;
  width: 12px; height: 12px;
  background: #fff;
  border: 2px solid #fa8c16;
  border-radius: 2px;
  box-sizing: border-box;
  pointer-events: auto;
}
#cropRect .ch-nw { left: -7px; top: -7px; cursor: nwse-resize; }
#cropRect .ch-n  { left: 50%; top: -7px; margin-left: -6px; cursor: ns-resize; }
#cropRect .ch-ne { right: -7px; top: -7px; cursor: nesw-resize; }
#cropRect .ch-e  { right: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }
#cropRect .ch-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
#cropRect .ch-s  { left: 50%; bottom: -7px; margin-left: -6px; cursor: ns-resize; }
#cropRect .ch-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
#cropRect .ch-w  { left: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }

/* ---------- 登录 / 账号 ---------- */
.login-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.55); }
.login-card { width: 320px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 26px 24px 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28); text-align: center; }
.login-logo { font-size: 22px; font-weight: 700; color: #1f2937; letter-spacing: 2px; }
.login-sub { margin: 6px 0 18px; font-size: 13px; color: #8a919f; }
.login-input { width: 100%; box-sizing: border-box; height: 42px; margin-bottom: 12px; padding: 0 12px;
  border: 1px solid #e2e6ee; border-radius: 8px; font-size: 14px; outline: none; }
.login-input:focus { border-color: #fa8c16; }
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5b6472; margin-bottom: 14px; justify-content: flex-start; }
.login-btn { width: 100%; height: 44px; border: none; border-radius: 8px; background: #fa8c16; color: #fff;
  font-size: 16px; letter-spacing: 4px; cursor: pointer; }
.login-btn:hover { background: #e8590c; }
.login-err { color: #e03131; font-size: 13px; min-height: 18px; margin-top: 8px; }
.login-note { margin-top: 10px; font-size: 12px; color: #aab1bd; }
.login-link { display: inline-block; margin-top: 12px; color: #4dabf7; font-size: 14px; text-decoration: none; cursor: pointer; }
.login-link:active { color: #1c7ed6; }
/* 仅在手机端显示的元素（桌面端登录为强制，不提供口头跳过入口） */
.m-only { display: none; }
@media (max-width: 640px) { .m-only { display: inline-block; } }
/* 手机端：登录遮罩默认隐藏（不再在鉴权请求期间一闪而过）；仅在显式点击「登录」时由 JS 置 display:flex 显示 */
@media (max-width: 640px) { .login-overlay { display: none; } }

.user-area { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; } /* auto：推到顶栏最右 */
.user-info { font-size: 13px; color: #5b6472; }
/* iter 238：账号移入左侧工具栏（与设置/图层/客源同款紫蓝胶囊；原顶栏右上角 chip 废弃）；iter337：与其他胶囊同步放大为渐变大胶囊 */
.user-chip { position: relative; margin: 5px 10px 0; flex: 0 0 auto; display: flex; }
.user-chip-btn {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #2e6cf6 0%, #7a5af5 100%);
  box-shadow: 0 2px 8px rgba(46,108,246,.28);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip-btn:hover { background: linear-gradient(90deg, #1f5ce8 0%, #6b4bef 100%); color: #fff; }
/* iter 243：账号菜单改为居中对话框（复用 .modal 遮罩；不再工具栏 fixed 弹出） */
.user-menu-card { width: 220px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.user-menu-card .btn { width: 100%; margin: 0; justify-content: center; }

.user-modal-card { width: min(450px, 92vw); } /* iter 231：放大一半（300→450） */
.um-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.um-add input, .um-add select { height: 34px; padding: 0 8px; border: 1px solid #e2e6ee; border-radius: 6px; font-size: 13px; }
.um-add input { width: 130px; }
.um-list { display: flex; flex-direction: column; gap: 8px; }
.um-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eef0f4; border-radius: 8px; }
.um-row .um-name { font-size: 14px; font-weight: 600; color: #1f2937; }
.um-row .um-tag { font-size: 12px; color: #8a919f; }
.um-row .um-tag.admin { color: #fa8c16; }
.um-row .um-tag.ok { color: #1c7ed6; }
.um-row .um-tag.expired { color: #98a1b0; background: #f4f5f7; padding: 1px 8px; border-radius: 10px; }
.inv-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px; }
.um-row .um-actions { margin-left: auto; display: flex; gap: 6px; }
.um-row .mini-btn { padding: 5px 10px; font-size: 12px; }
.um-row .mini-btn.danger { background: #fff0f0; color: #e03131; border: 1px solid #ffd0d0; }
/* iter 231：权限对照表 UI 已移除（.feat-* 样式删除）；保留 .inv-feats 供每行「可访问」提示 */
.inv-feats { flex-basis: 100%; font-size: 12px; color: #8a919f; margin-top: 3px; }

.pw-body { display: flex; flex-direction: column; gap: 10px; }
.pw-body input { height: 40px; padding: 0 12px; border: 1px solid #e2e6ee; border-radius: 8px; font-size: 14px; outline: none; }
.pw-body input:focus { border-color: #fa8c16; }

/* iter 158：复制弹窗（名称 + 文件夹点选） */
.dup-card { width: 320px; max-width: 92vw; }
.dup-body { text-align: left; padding: 14px 18px 18px; }
.dup-label { font-size: 12px; color: var(--text-soft); margin: 12px 0 6px; }
.dup-body .dup-label:first-child { margin-top: 0; }
.dup-name { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; color: var(--text); }
.dup-name:focus { border-color: var(--primary); }
.dup-folders { max-height: 210px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 8px; }
.dup-opt { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.dup-opt:last-child { border-bottom: none; }
.dup-opt:hover { background: var(--line-soft); }
.dup-opt.sel { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dup-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dup-ok { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 8px 20px; font-size: 13px; cursor: pointer; }
.dup-ok:hover { filter: brightness(1.08); }
.dup-cancel { background: #f1f3f5; color: var(--text); border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.dup-cancel:hover { background: var(--line-soft); }

/* iter 171：客源入口移到顶栏，侧栏恢复为普标题 */
.sb-title { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 客源管理（iter 170 全屏页 → iter 192 弹窗 → iter 193 桌面端也全屏） ===== */
/* iter 177：z-index 1350——高于画笔FAB(1300)/底部状态条(1001)，低于弹窗(1400+) */
/* iter 193：恢复满屏（.cp-panel 外壳保留，× 关闭 / Esc 关闭保留；点遮罩关闭因无遮罩自然失效） */
/* iter 197：手机端「我的」页 #mUserPage 复用同一套满屏外壳 */
#custPage, #mUserPage, #esPage { position: fixed; inset: 0; z-index: 1350; background: #f5f6f8; }
#custPage[hidden], #mUserPage[hidden], #esPage[hidden] { display: none; }
/* iter 250：桌面端客源页避让左侧工具栏（96px）——紫蓝胶囊栏保持可见可点；手机端还原全屏 */
#custPage { left: 184px; } /* iter337：侧栏加宽同步 */
#esPage { left: 184px; } /* iter354：二手房页避让左侧工具栏 */
@media (max-width: 760px) { #custPage, #esPage { left: 0; } }

/* ===== 楼盘笔记（iter 273）：复用 .cp-panel/.cp-* 满屏外壳 ===== */
/* iter266 铁律：新全屏容器必须挂 position:fixed;inset:0;z-index:1350 定位规则，否则 hidden=false 后在文档流里不可见 */
#houseNotePage { position: fixed; inset: 0; z-index: 1350; background: #f5f6f8; }
#houseNotePage[hidden] { display: none; }
#houseNotePage { left: 184px; } /* iter337：侧栏加宽同步 */
@media (max-width: 760px) { #houseNotePage { left: 0; } }
#btnHouseNote { white-space: nowrap; }
#btnEstate { white-space: nowrap; }

/* ===== 二手房（iter 354）：复用 .cp-panel/.cp-* 满屏外壳，列表 + 右侧详情/编辑表单 ===== */
.cp-stat.on span { color: #2f9e44; }
.cp-stat.off span { color: #adb5bd; }
.es-item { background: #fff; border: 1px solid #e8eaed; border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.es-item:hover { border-color: #b7c2d0; box-shadow: 0 4px 14px rgba(31,42,68,.06); }
.es-item.on { border-color: #2f9e44; box-shadow: 0 4px 14px rgba(47,158,68,.12); }
.es-item-top { display: flex; align-items: center; gap: 8px; }
.es-item-title { font-size: 14px; font-weight: 600; color: #1f2733; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-mini-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; flex: 0 0 auto; }
.es-mini-tag.on { color: #2f9e44; background: #e7f6ec; }
.es-mini-tag.off { color: #adb5bd; background: #f1f3f5; }
.es-item-meta { font-size: 12px; color: #6b7488; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-item-price { font-size: 14px; font-weight: 700; color: #e8590c; margin-top: 6px; }
.es-empty { color: #9aa3b2; font-size: 14px; padding: 40px 10px; text-align: center; }
.es-view { padding: 4px; }
.es-view-head { display: flex; align-items: center; gap: 10px; }
.es-view-title { font-size: 19px; font-weight: 700; color: #1f2733; flex: 1; min-width: 0; }
.es-tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; flex: 0 0 auto; }
.es-tag.on { color: #2f9e44; background: #e7f6ec; }
.es-tag.off { color: #adb5bd; background: #f1f3f5; }
.es-price-line { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; }
.es-price { font-size: 26px; font-weight: 800; color: #e8590c; }
.es-price small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.es-unit { font-size: 13px; color: #8a93a3; }
.es-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 12px 0; }
.es-info-row { display: flex; gap: 8px; font-size: 13px; }
.es-info-k { color: #8a93a3; flex: 0 0 auto; }
.es-info-v { color: #1f2733; font-weight: 600; min-width: 0; }
.es-desc { font-size: 13px; color: #4a5366; line-height: 1.7; white-space: pre-wrap; word-break: break-word; background: #f7f9fb; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.es-sub { font-size: 13px; font-weight: 700; color: #1f2733; margin: 14px 0 8px; }
.es-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.es-dimg { border: 1px solid #e8eaed; border-radius: 10px; overflow: hidden; background: #f3f5f8; aspect-ratio: 4 / 3; }
.es-dimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-view-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn.danger { background: #fff; color: #e03131; border: 1px solid #ffc9c9; }
.btn.danger:hover { background: #fff5f5; }
.es-edit { padding: 2px; }
.es-edit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.es-edit-head > span { font-size: 16px; font-weight: 700; color: #1f2733; flex: 1; }
.es-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.es-field { display: flex; flex-direction: column; gap: 5px; }
.es-field:last-of-type, .es-edit > .es-field:nth-last-child(2) { /* 整行字段占位 */ }
.es-lab { font-size: 13px; color: #6b7488; }
.es-in { height: 36px; padding: 0 10px; border: 1px solid #d8dce3; border-radius: 8px; font-size: 14px; color: #1f2733; outline: none; box-sizing: border-box; width: 100%; background: #fff; }
.es-in:focus { border-color: #2f9e44; }
.es-ta { height: auto; padding: 8px 10px; resize: vertical; font-family: inherit; line-height: 1.6; }
.es-row { display: flex; align-items: center; gap: 16px; margin: 14px 0 4px; }
.es-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: #1f2733; cursor: pointer; }
.es-img-block { margin-top: 16px; }
.es-img-title { font-size: 13px; font-weight: 700; color: #1f2733; margin-bottom: 8px; }
.es-up { font-size: 13px; }
.es-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.es-thumb { position: relative; border: 1px solid #e8eaed; border-radius: 8px; overflow: hidden; background: #f3f5f8; aspect-ratio: 1 / 1; }
.es-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-thumb-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(20,24,31,.62); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.es-thumb-x:hover { background: rgba(224,49,49,.85); }
.es-thumb-empty { font-size: 12px; color: #9aa3b2; padding: 6px 0; }
@media (max-width: 760px) {
  #esPage { left: 0; }
  .es-fgrid { grid-template-columns: 1fr; }
  .es-info { grid-template-columns: 1fr; }
}
/* iter331：楼盘笔记桌面端回归客源同款外壳——基础规则(left:96px 满屏壳、#f5f6f8)即客源样式，
   删除 iter329/330 的暗色浮层弹窗；主体两栏（左 320px 列表 + 右详情内联）走 .cp-list/.cp-detail 基础规则 */
/* iter331：文件夹条独立行（#hnChips，与客源 #cpChips 同构；不用 .cp-chips 类避免手机端被其 display:none 隐藏） */
.hn-chips { display: flex; gap: 6px; padding: 10px 18px 0; flex-wrap: wrap; }
.hn-chips .hn-folders { margin-bottom: 0; flex: 1 1 auto; }
.hn-item { background: #fff; border: 1px solid #e8eaed; border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.hn-item.sel { border-color: #1c64d6; box-shadow: 0 0 0 2px rgba(28,100,214,.12); }
.hn-item-t { font-size: 15px; font-weight: 600; color: #1f2733; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-item-d { font-size: 11px; color: #adb4c1; margin-top: 4px; }
.hn-empty { color: #8a93a3; font-size: 13px; text-align: center; padding: 30px 0; }
/* iter 279：楼盘笔记文件夹条（列表顶端：全部 / 各文件夹 / ＋新建文件夹） */
.hn-folders { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hn-fchip { border: 1px solid #e0e4ea; background: #fff; color: #3c4a5e; font-size: 12px; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.hn-fchip.on { background: #2f7bff; border-color: #2f7bff; color: #fff; }
.hn-fadd { border: 1px dashed #b9c3d2; background: transparent; color: #5b6b80; font-size: 12px; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.hn-fadd:hover { color: #2f7bff; border-color: #2f7bff; }
/* iter320：所属文件夹下拉与标题同一行（右侧固定宽） */
.hn-titlerow { display: flex; gap: 8px; }
.hn-titlerow #hnTitle { flex: 1 1 auto; min-width: 0; }
.hn-titlerow select { flex: 0 0 auto; width: 170px; }
/* iter 280：文件夹重命名/删除 + 拖拽笔记进文件夹 */
.hn-fwrap { display: inline-flex; align-items: center; border-radius: 999px; }
.hn-fops { display: none; align-items: center; margin-left: 1px; }
.hn-fwrap:hover .hn-fops, .hn-fwrap.on .hn-fops { display: inline-flex; }

/* ============ iter388：二手房「固定格式」表单（编辑弹窗 + 只读详情页通用） ============ */
.hn-fact { border: none; background: transparent; color: #8a93a3; font-size: 12px; line-height: 1; padding: 2px 3px; cursor: pointer; border-radius: 4px; }
.hn-fact:hover { background: rgba(0,0,0,.06); color: #2f7bff; }
.hn-fwrap.dragover .hn-fchip { box-shadow: 0 0 0 2px #2f7bff; }
.hn-fall.dragover { box-shadow: 0 0 0 2px #2f7bff; }
.hn-item[draggable="true"] { cursor: grab; }
.hn-item[draggable="true"]:active { cursor: grabbing; }
.hn-empty-big { color: #8a93a3; font-size: 14px; text-align: center; padding: 60px 0; }
/* iter324：查看态信息在上、正文在下（「一分为二」由页面级「列表|详情各半」承担，见 .cp-detail 处） */
.hn-view { display: block; }
.hn-view-info { min-width: 0; }
/* iter332：标题 + 编辑/删除按钮同一行（按钮靠右）；窄屏 wrap 换行 */
.hn-view-titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hn-view-titlerow .hn-view-ops { margin-left: auto; }
.hn-view-body { min-width: 0; margin-top: 4px; }
.hn-view-t { font-size: 18px; font-weight: 700; color: #1f2733; word-break: break-word; }
.hn-view-ops { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }
.hn-view-time { font-size: 12px; color: #adb4c1; margin: 8px 0 14px; line-height: 1.7; }
.hn-view-c { font-size: 14px; color: #1f2733; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.hn-form { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.hn-in { height: 40px; border: 1px solid #d8dce3; border-radius: 8px; padding: 0 12px; font-size: 15px; outline: none; color: #1f2733; background: #fff; }
.hn-in:focus { border-color: #1c64d6; }
.hn-ta { min-height: 300px; border: 1px solid #d8dce3; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.7; outline: none; resize: vertical; color: #1f2733; background: #fff; font-family: inherit; }
.hn-ta:focus { border-color: #1c64d6; }
/* iter 285：图文混排编辑器（contenteditable）——粘贴的图片以 <img> 直接内联显示 */
.hn-editor { min-height: 300px; max-height: 62vh; overflow: auto; border: 1px solid #d8dce3; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.7; outline: none; color: #1f2733; background: #fff; font-family: inherit; white-space: pre-wrap; word-break: break-word; }
.hn-editor:focus { border-color: #1c64d6; }
.hn-editor:empty::before { content: attr(data-ph); color: #adb4c1; }
.hn-editor img.hn-inline-img { cursor: default; max-width: min(360px, 100%); }
.hn-editor img.hn-pending { display: inline-block; min-width: 140px; min-height: 90px; background: linear-gradient(90deg, #f0f2f6 0%, #e6eaf1 50%, #f0f2f6 100%); border: 1px dashed #c9d2e0; }
.hn-tip { font-size: 12px; color: #adb4c1; }
/* iter322：保存/取消移入格式化工具条右端；「导入图片」按钮复用 .hn-ed-btn */
.hn-ed-spring { flex: 1 1 auto; min-width: 12px; }
.hn-ed-save, .hn-ed-cancel { height: 28px; padding: 0 14px; border: none; border-radius: 7px; font-size: 13px; cursor: pointer; flex: 0 0 auto; }
.hn-ed-save { background: #1c64d6; color: #fff; }
.hn-ed-save:hover { background: #1a5ac2; }
.hn-ed-cancel { background: transparent; color: #3a4252; border: 1px solid #d8dce3; }
.hn-ed-cancel:hover { background: #eef2f8; }
/* iter 286：类微信格式化工具条 */
.hn-edbar { position: relative; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 8px; background: #f6f8fb; border: 1px solid #d8dce3; border-bottom: none; border-radius: 8px 8px 0 0; }
.hn-editor { border-radius: 0 0 8px 8px; }
.hn-ed-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 7px; cursor: pointer; color: #3a4252; }
.hn-ed-btn:hover { background: #e7ebf2; }
.hn-ed-btn.active { background: #dde6ff; color: #2b59ff; }
.hn-ed-sel { height: 30px; border: none; background: transparent; border-radius: 7px; padding: 0 4px; cursor: pointer; color: #3a4252; font-size: 13px; }
.hn-ed-sel:hover { background: #e7ebf2; }
.hn-ed-sep { width: 1px; height: 20px; background: #d8dce3; margin: 0 4px; }
.hn-ed-pop { position: absolute; top: 40px; left: 60px; display: none; background: #fff; border: 1px solid #e0e4ec; border-radius: 10px; padding: 8px; box-shadow: 0 8px 22px rgba(20, 30, 60, .16); z-index: 6; }
/* iter387：模板管理——「模板」按钮位于弹窗标题旁（.ad-head 内静态常驻），弹层在按钮下方展开 */
/* iter311：水印盖章弹层（贴工具条右缘） */
.hn-wm-pop { left: auto; right: 8px; width: 216px; }
.hn-wm-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #3c4a5e; margin-bottom: 8px; white-space: nowrap; }
.hn-wm-row input[type="range"] { flex: 1; min-width: 0; }
.hn-wm-row b { min-width: 34px; text-align: right; color: #1c64d6; }
.hn-wm-apply { width: 100%; padding: 7px 0; font-size: 13px; }
/* iter312：水印开关（工具条水滴按钮旁，开=带水印，关=恢复原图） */
.hn-wm-sw { display: inline-flex; align-items: center; margin-left: 3px; cursor: pointer; vertical-align: middle; }
.hn-wm-sw input { display: none; }
.hn-wm-sw .hn-wm-track { width: 26px; height: 15px; border-radius: 8px; background: #c9d2de; position: relative; transition: background .15s; flex: none; }
.hn-wm-sw .hn-wm-track::after { content: ''; position: absolute; top: 1.5px; left: 1.5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.hn-wm-sw input:checked + .hn-wm-track { background: #1c64d6; }
.hn-wm-sw input:checked + .hn-wm-track::after { left: 12.5px; }
.hn-ed-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #e0e4ec; cursor: pointer; margin: 2px; vertical-align: middle; }
.hn-ed-dot:hover { box-shadow: 0 0 0 2px #1c64d6; }
/* iter 275：正文内联图片（粘在哪显示在哪，图文混排）+ 旧版缩略图兜底 + 大图遮罩 */
.hn-inline-img { display: inline-block; max-width: 100%; max-height: 320px; margin: 6px 0; border-radius: 8px; border: 1px solid #e3e7ee; vertical-align: middle; cursor: zoom-in; }
.hn-muted { color: #adb4c1; }
.hn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.hn-thumbs.view { margin-top: 12px; }
.hn-th { position: relative; width: 108px; height: 82px; border: 1px solid #e3e7ee; border-radius: 8px; overflow: hidden; background: #f5f7fa; cursor: zoom-in; flex: 0 0 auto; }
.hn-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hn-th.up img { opacity: .4; }
.hn-th.fail { border-color: #ffb3b3; }
.hn-th-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 20px; text-align: center; cursor: pointer; z-index: 2; }
.hn-th-x:active { background: rgba(0,0,0,.75); }
.hn-th-up { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff; background: rgba(0,0,0,.45); text-align: center; padding: 1px 0; }
/* iter 276：大图查看支持缩放/平移（滚轮/双指缩放、拖动平移、双击放大、右上工具条） */
#hnLb { position: fixed; inset: 0; z-index: 1500; background: rgba(10,14,22,.78); align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
#hnLb img { max-width: 94vw; max-height: 94vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); transform-origin: center; cursor: grab; user-select: none; -webkit-user-drag: none; touch-action: none; }
#hnLbBar { position: absolute; top: 14px; right: 16px; display: flex; gap: 6px; align-items: center; background: rgba(17,23,34,.72); border-radius: 8px; padding: 4px 8px; }
#hnLbBar button { border: none; background: rgba(255,255,255,.14); color: #fff; border-radius: 6px; height: 26px; min-width: 26px; padding: 0 8px; font-size: 13px; cursor: pointer; }
#hnLbBar button:hover { background: rgba(255,255,255,.28); }
#hnLbPct { color: #fff; font-size: 12px; min-width: 42px; text-align: center; }
/* 手机端（iter307）：列表满屏；点笔记卡片 → 全屏阅读页（复用客源页 m-open + .cp-dback 机制）；
   右上 ❌ 移除（关闭走底部「地图」tab / 返回胶囊） */
@media (max-width: 720px) {
  #houseNotePage .cp-body { flex-direction: column; overflow-y: auto; }
  #houseNotePage .cp-list { flex: 1 1 auto; max-height: none; display: grid; grid-template-columns: 1fr 1fr; align-items: start; align-content: start; } /* iter308：align-content:start——列表被 flex 拉满屏时行间不再被撑开大空隙 */
  #houseNotePage .cp-list .hn-item { min-width: 0; } /* 卡片内 nowrap 文本不许撑破 1fr 列 */
  #houseNotePage .cp-list .hn-folders,
  #houseNotePage .cp-list .hn-empty { grid-column: 1 / -1; }
  /* 列表页不再下方铺详情：默认隐藏，点卡片后全屏覆盖展开（z260，与客源页一致；底部导航 1360 悬浮其上） */
  #houseNotePage .cp-detail { display: none; }
  #houseNotePage.m-open .cp-detail {
    display: block; position: fixed; inset: 0; z-index: 260;
    border: none; border-radius: 0; background: #f5f6f8;
    overflow-y: auto; padding: 12px 14px 100px;
  }
  #hnpClose { display: none; }
}
.cp-panel { width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; }

/* iter 197：「我的」页内容；iter 198 重设计：渐变头像横幅 + 列表式菜单（仿 App 个人中心） */
.mup-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.mup-hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #1c64d6, #5a9cf8); border-radius: 14px; padding: 18px 16px; cursor: pointer; color: #fff; box-shadow: 0 6px 18px rgba(28,100,214,.22); }
.mup-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: 0 0 auto; }
.mup-hero-txt { flex: 1; min-width: 0; }
.mup-hero-title { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mup-hero-sub { font-size: 12px; opacity: .85; margin-top: 3px; }
.mup-hero .mup-arrow { color: rgba(255,255,255,.8); font-size: 16px; flex: 0 0 auto; }
.mup-menu { background: #fff; border: 1px solid #e8eaed; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mup-row { display: flex; align-items: center; gap: 10px; padding: 14px; border: none; background: #fff; font-size: 15px; color: #1f2733; cursor: pointer; text-align: left; width: 100%; }
.mup-row + .mup-row { border-top: 1px solid #f0f2f5; }
.mup-row:active { background: #f5f7fa; }
.mup-row-ico { font-size: 18px; flex: 0 0 auto; }
.mup-row-txt { flex: 1; min-width: 0; }
.mup-row-tag { font-size: 11px; color: #8a93a3; border: 1px solid #e3e7ee; border-radius: 999px; padding: 2px 8px; flex: 0 0 auto; }
.mup-row .mup-arrow { color: #c3cad6; font-size: 15px; flex: 0 0 auto; }
.mup-inv-panel { padding: 12px 14px 14px; border-top: 1px solid #f0f2f5; display: flex; flex-direction: column; gap: 8px; }
.mup-inv-row { display: flex; gap: 8px; }
.mup-inv-row input { flex: 1; min-width: 0; border: 1px solid #d8dce3; border-radius: 8px; padding: 9px 10px; font-size: 14px; outline: none; color: #1f2733; }
.mup-inv-row input:focus { border-color: #1c64d6; }
.mup-inv-row .btn { flex: 0 0 auto; }
.mup-msg { font-size: 12px; color: #8a93a3; min-height: 16px; }

/* iter 192：右上角 × 关闭钮（替代「← 返回地图」） */
.cp-x { border: none; background: #f0f3f8; color: #4a5468; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.cp-x:hover { background: #e3e8f0; color: #1f2733; }

.cp-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 70px; background: #fff; border-bottom: 1px solid #e8eaed; flex-wrap: wrap; } /* iter351：顶栏高度定为 70px */
.cp-title { font-size: 17px; font-weight: 700; color: #1f2733; white-space: nowrap; }
.cp-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cp-search { flex: 1 1 240px; width: auto; max-width: 640px; border: 1px solid #d8dce3; border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; color: #1f2733; background: #fff; } /* iter348：拉长占满标题与统计之间的空隙 */
.cp-search:focus { border-color: #1c64d6; }

/* iter 174：统计卡收进顶栏（数字+标签横排小卡，紧邻工具按钮左侧） */
.cp-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-stat { background: #fff; border: 1px solid #e8eaed; border-radius: 10px; padding: 5px 12px; display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #8a93a3; white-space: nowrap; }
.cp-stat span { font-size: 17px; font-weight: 700; color: #1f2733; line-height: 1; }
.cp-stat.over span { color: #e8590c; }
.cp-stat.today span { color: #1c7ed6; }

.cp-chips { display: flex; gap: 8px; padding: 8px 18px; flex-wrap: wrap; }
/* iter 179：筛选下拉（仅手机端显示；桌面隐藏） */
.cp-fsel-wrap { display: none; }
.cp-chip { border: 1px solid #d8dce3; background: #fff; color: #4a5468; border-radius: 999px; padding: 5px 13px; font-size: 13px; cursor: pointer; transition: all .12s; }
.cp-chip:hover { border-color: #1c64d6; color: #1c64d6; }
/* iter 183：筛选标签拖拽排序反馈 */
.cp-chip.dragging { opacity: .35; }
.cp-chip.drop-before { box-shadow: -3px 0 0 0 #1c64d6; }
.cp-chip.drop-after { box-shadow: 3px 0 0 0 #1c64d6; }
.cp-chip.on { background: #1c64d6; border-color: #1c64d6; color: #fff; }
/* iter336：跟进排序控件（桌面 chips 行尾部，推到最右） */
.cp-sort { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; align-self: center; }
.cp-sort-lbl { font-size: 13px; color: #6b7488; }
.cp-sort-sel { border: 1px solid #d8dce3; background: #fff; color: #4a5468; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.cp-sort-sel:focus { border-color: #1c64d6; outline: none; }

.cp-body { flex: 1; display: flex; gap: 14px; padding: 6px 18px 18px; min-height: 0; }
.cp-list { width: 320px; flex: 0 0 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.cp-detail { flex: 1; overflow-y: auto; background: #fff; border: 1px solid #e8eaed; border-radius: 12px; padding: 16px 18px; min-width: 0; }

/* iter331：桌面端不再有多列网格/全屏阅读层——基础 .cp-list(320px 竖排)+.cp-detail(内联详情) 即客源同款两栏；
   全屏阅读层(m-open) 仅手机 ≤720px 使用（见上方 max-width:720px 块）。iter328 的 min-width:721px 覆盖块整体删除 */

.cp-card { background: #fff; border: 1px solid #e8eaed; border-radius: 10px; padding: 11px 13px; cursor: pointer; transition: all .12s; }
.cp-card:hover { border-color: #b9c2d0; }
.cp-card.sel { border-color: #1c64d6; box-shadow: 0 0 0 2px rgba(28,100,214,.15); }
.cp-card.over { border-left: 3px solid #e8590c; }
.cp-card-r1 { display: flex; align-items: center; gap: 8px; }
.cp-card-name { font-size: 14px; font-weight: 600; color: #1f2733; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-card-phone { margin-left: auto; font-size: 12px; color: #8a93a3; }
/* iter 176：电话隐私——眼睛按钮切换明文/打码 */
.cp-eye { border: none; background: none; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 3px; border-radius: 5px; opacity: .55; }
.cp-eye:hover { opacity: 1; background: #f0f3f8; }
.cp-card-info { font-size: 12px; color: #6b7488; margin-top: 4px; }
.cp-card-r3 { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.cp-card-next { font-size: 12px; color: #8a93a3; margin-left: auto; }
/* iter335：卡片第三行内联最新跟进预览（状态徽章右侧，超长省略；手机端隐藏走下方预览框） */
.cp-card-fupline { margin-left: auto; flex: 1 1 auto; min-width: 0; font-size: 12px; color: #6b7488; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
/* iter 177：卡片快捷操作行（仅手机端显示；桌面隐藏）+ 详情返回按钮（同） */
.cp-card-acts { display: none; }
.cp-dback { display: none; }
/* iter 181：卡片状态下拉已移除（iter 178 遗留样式清除）；最新跟进预览保留 */
.cp-card-lastfup { display: none; }
/* iter 195：卡片状态下拉 .cp-card-stsel 已彻底删除（手机端也不再显示，状态在详情页切换） */

.cp-d-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #eef0f3; flex-wrap: wrap; }
.cp-d-name { font-size: 18px; font-weight: 700; color: #1f2733; }
/* iter 182：状态单标签 + 下拉类型菜单（原整排 chips 移除） */
.cp-d-tagwrap { position: relative; }
.cp-d-tag { cursor: pointer; font-size: 12px; }
.cp-d-tagmenu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 1370;
  background: #fff; border: 1px solid #e2e6ee; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px;
  display: flex; flex-direction: column; min-width: 120px;
}
.cp-d-tagitem {
  border: none; background: none; text-align: left; padding: 8px 12px;
  font-size: 13px; color: #1f2733; cursor: pointer; border-radius: 6px; white-space: nowrap;
}
.cp-d-tagitem:hover { background: #f5f6f8; }
.cp-d-tagitem.cur { color: #1c64d6; font-weight: 600; }
.cp-d-tagitem.mg { color: #6b7488; border-top: 1px solid #eef0f3; border-radius: 0 0 6px 6px; margin-top: 2px; }
.cp-d-ops { margin-left: auto; display: flex; gap: 8px; }
.cp-dbtn { border: 1px solid #d8dce3; background: #fff; color: #4a5468; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.cp-dbtn:hover { border-color: #b9c2d0; }
.cp-dbtn.primary { background: #1c64d6; border-color: #1c64d6; color: #fff; }
.cp-dbtn.primary:hover { background: #1857bd; }
.cp-dbtn.danger { color: #e03131; border-color: #ffc9c9; }
.cp-dbtn.danger:hover { background: #fff0f0; }

/* iter 173：档案两列字段网格 + 内联编辑表单 */
.cp-arc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px;
  background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 10px;
  padding: 14px 16px; margin: 12px 0;
}
.cp-arc-item { display: flex; align-items: baseline; gap: 10px; font-size: 14px; min-width: 0; }
.cp-arc-grid .cp-arc-lbl { flex: 0 0 56px; color: #8a93a3; font-size: 13px; margin-right: 0; }
.cp-arc-val { color: #1f2733; font-weight: 600; word-break: break-all; }
.cp-arc-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px;
  background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 10px;
  padding: 14px 16px; margin: 12px 0;
}
.cp-af-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cp-af-item.full { grid-column: 1 / -1; }
.cp-af-item > label { font-size: 12px; color: #6b7488; font-weight: 600; }
.cp-af-item input, .cp-af-item select, .cp-af-item textarea {
  width: 100%; border: 1px solid #d8dce3; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; color: #1f2733; outline: none; background: #fff; font-family: inherit; box-sizing: border-box;
}
.cp-af-item input:focus, .cp-af-item select:focus, .cp-af-item textarea:focus { border-color: #1c64d6; }
.cp-af-item textarea { resize: vertical; min-height: 64px; }
.cp-af-note { font-size: 12px; color: #8a93a3; margin: -6px 0 10px; }
/* iter 208：备忘录按钮 + 弹窗 */
/* iter 209：备忘录按钮紧贴「＋跟进」（仅左侧按钮推到右侧，二者之间留小间距） */
.cp-memobtn { margin-left: auto; margin-right: 8px; }
.cp-memobtn.hasmemo { border-color: #1c64d6; color: #1c64d6; }
.memo-who { font-size: 12px; color: #8a93a3; font-weight: 400; margin-left: 6px; }
/* iter 209：备忘录弹窗放大两倍（宽度 300→600，高度 180→360） */
#memoModal .modal-card { width: min(600px, 94vw); }
.memo-ta { width: 100%; min-height: 360px; border: 1px solid #d8dce3; border-radius: 8px; padding: 12px; font-size: 15px; line-height: 1.7; color: #1f2733; outline: none; resize: vertical; font-family: inherit; box-sizing: border-box; }
.memo-ta:focus { border-color: #1c64d6; }
.memo-saved { font-size: 12px; color: #2f9e44; min-height: 16px; }
/* iter 204：编辑表单底部删除客户 */
.cp-af-delrow { display: flex; justify-content: flex-end; margin-top: -2px; }

.cp-d-status { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.cp-st { border: 1px solid #d8dce3; background: #fff; color: #4a5468; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.cp-st.on { background: #1c64d6; border-color: #1c64d6; color: #fff; }

.cp-d-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; position: relative; }
/* iter 202：下次跟进收敛为一个按钮 + 弹出日期面板 */
.cp-next-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8dce3; background: #fff; color: #1f2733; border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.cp-next-btn:hover { border-color: #1c64d6; color: #1c64d6; }
.cp-next-btn b { font-weight: 600; }
.cp-next-none { color: #8a93a3; font-weight: 400; }
.cp-next-caret { font-size: 11px; color: #8a93a3; }
/* iter 203：按钮+面板整体移入头部操作区（档案/编辑/删除客户 左侧），面板右对齐弹出 */
.cp-next-wrap { position: relative; display: inline-flex; }
.cp-next-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1370; background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.14); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 320px; max-width: min(92vw, 420px); }
.cp-next-menu[hidden] { display: none; }
.cp-next-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-next-inrow { display: flex; align-items: center; gap: 8px; }
.cp-next-inrow input { border: 1px solid #d8dce3; border-radius: 8px; padding: 6px 8px; font-size: 13px; color: #1f2733; outline: none; }
.cp-next-inrow input:focus { border-color: #1c64d6; }
.cp-lbl { font-size: 13px; color: #4a5468; font-weight: 600; }
.cp-next-input { border: 1px solid #d8dce3; border-radius: 8px; padding: 6px 9px; font-size: 13px; color: #1f2733; outline: none; }
.cp-next-input:focus { border-color: #1c64d6; }
.cp-quick { border: 1px solid #d8dce3; background: #fff; color: #4a5468; border-radius: 8px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.cp-quick:hover { border-color: #1c64d6; color: #1c64d6; }
/* iter 202：.cp-cur（当前: …）已删——当前值直接显示在按钮上 */

.cp-d-fups { margin-top: 6px; }
.cp-fups-head { display: flex; align-items: center; margin-bottom: 10px; }
.cp-lbl2 { font-size: 14px; font-weight: 700; color: #1f2733; }
.cp-addfup { border: 1px solid #1c64d6; background: #fff; color: #1c64d6; border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.cp-addfup:hover { background: #f0f5ff; }
.cp-fup-form { background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.cp-fup-row { display: flex; gap: 8px; margin-bottom: 8px; }
.cp-fup-type { border: 1px solid #d8dce3; border-radius: 8px; padding: 6px 9px; font-size: 13px; color: #1f2733; outline: none; }
.cp-fup-time { border: 1px solid #d8dce3; border-radius: 8px; padding: 6px 9px; font-size: 13px; color: #1f2733; outline: none; flex: 1; min-width: 0; }
.cp-fup-ta { width: 100%; border: 1px solid #d8dce3; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #1f2733; outline: none; resize: vertical; min-height: 56px; font-family: inherit; box-sizing: border-box; }
.cp-fup-ta:focus, .cp-fup-type:focus, .cp-fup-time:focus { border-color: #1c64d6; }

.cp-fup { border: 1px solid #eef0f3; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafbfc; }
.cp-fup-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.cp-dot { width: 8px; height: 8px; border-radius: 50%; background: #1c64d6; flex: 0 0 auto; }
.cp-fup-type-lbl { font-size: 12px; font-weight: 600; color: #1c7ed6; }
.cp-fup-when { font-size: 12px; color: #8a93a3; }
.cp-fup-del { margin-left: auto; border: none; background: #f1f3f5; color: #98a1b0; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.cp-fup-del:hover { background: #ffe3e3; color: #e03131; }
.cp-fup-content { font-size: 13px; color: #1f2733; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

.cp-empty { color: #8a93a3; font-size: 13px; text-align: center; padding: 30px 10px; line-height: 1.7; }
.cp-empty.small { padding: 14px 10px; font-size: 12px; }

/* 状态徽章（与 snapshot 字段 status 对应） */
.cust-badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; line-height: 18px; white-space: nowrap; }
.cust-badge.st-new    { background: #eef2ff; color: #3b5bdb; }
.cust-badge.st-ing    { background: #fff3e0; color: #fa8c16; }
.cust-badge.st-intent { background: #e7f1ff; color: #1c7ed6; }
.cust-badge.st-deal   { background: #e6f7ed; color: #15a05a; }
.cust-badge.st-lost   { background: #f1f3f5; color: #98a1b0; }
/* iter 175：自定义状态循环配色 st-x0..x5 */
.cust-badge.st-x0 { background: #e6f7ed; color: #15a05a; }
.cust-badge.st-x1 { background: #fff3e0; color: #fa8c16; }
.cust-badge.st-x2 { background: #e7f1ff; color: #1c7ed6; }
.cust-badge.st-x3 { background: #f3e8ff; color: #9c36b5; }
.cust-badge.st-x4 { background: #e6fcf5; color: #0c8599; }
.cust-badge.st-x5 { background: #fff0f6; color: #d6336c; }
.cp-st-gear { color: #8a93a3; }
.cp-st-gear:hover { border-color: #1c64d6; color: #1c64d6; }

/* iter 175：状态标签管理弹窗 */
.st-modal-card { width: 400px; max-width: 94vw; }
.st-m-body { text-align: left; padding: 14px 18px 18px; }
.st-m-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 320px; overflow-y: auto; }
.st-m-row { display: flex; align-items: center; gap: 10px; border: 1px solid #eef0f3; border-radius: 8px; padding: 7px 10px; background: #fafbfc; }
.st-m-name { font-size: 14px; font-weight: 600; color: #1f2733; cursor: pointer; min-width: 0; }
.st-m-name:hover { color: #1c64d6; }
.st-m-inp { flex: 0 0 auto; width: 110px; border: 1px solid #1c64d6; border-radius: 6px; padding: 4px 8px; font-size: 13px; outline: none; }
.st-m-cnt { margin-left: auto; font-size: 12px; color: #8a93a3; }
.st-m-del { border: none; background: #f1f3f5; color: #98a1b0; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.st-m-del:hover { background: #ffe3e3; color: #e03131; }
.st-m-add { display: flex; gap: 8px; margin-bottom: 10px; }
.st-m-add input { flex: 1; min-width: 0; border: 1px solid #d8dce3; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; }
.st-m-add input:focus { border-color: #1c64d6; }
.st-m-tip { font-size: 12px; color: #8a93a3; line-height: 1.6; }
#stModal.show { z-index: 1430; } /* 与 #custEditModal 叠用时的分层兜底（iter165 铁律） */

/* 编辑弹窗（复用 .modal / .modal-card） */
#custEditModal .modal-card { width: 440px; max-width: 94vw; }
#custEditModal .modal-body { text-align: left; padding: 16px 20px 20px; }
.ce-fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.ce-fld > label { font-size: 12px; color: #6b7488; font-weight: 600; }
.ce-fld input, .ce-fld textarea { width: 100%; border: 1px solid #d8dce3; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; color: #1f2733; background: #fff; font-family: inherit; box-sizing: border-box; }
.ce-fld input:focus, .ce-fld textarea:focus { border-color: #1c64d6; }
.ce-fld textarea { resize: vertical; min-height: 60px; }
.ce-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* iter 186：设置弹框（两列功能按钮网格） */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-grid .btn { justify-content: flex-start; }
@media (max-width: 480px) { .set-grid { grid-template-columns: 1fr; } }
/* iter 187：设置弹框内的账号板块 */
.set-sec-title {
  font-size: 12px; font-weight: 600; color: #6b7488;
  border-top: 1px solid #eef0f3; margin: 16px 0 10px; padding-top: 14px;
}
.user-area-modal { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
.user-area-modal .user-info {
  font-size: 13px; color: #1f2733; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* iter 188：图层管理弹框 */
#layersModal .modal-card { width: 480px; max-width: 94vw; }
#layersModal .modal-body { text-align: left; padding: 8px 16px 16px; }
#layersModal .sb-layers { border-bottom: none; background: transparent; padding: 4px 0; }

/* 窄屏适配 */
/* iter 180：手机端底部三按钮导航（桌面隐藏） */
.m-tabbar { display: none; }
/* iter 177：手机端极简化（参考来客页）——顶栏只留 标题/返回+搜索+新建，
   统计卡与导入导出隐藏，筛选单行横滑，列表满屏，点卡片详情全屏展开 */
@media (max-width: 720px) {
  /* 顶栏 */
  .cp-head { padding: 10px 12px; gap: 8px 10px; min-height: 60px; } /* iter350：手机端同比加高 */
  .cp-stats, #cpExport, #cpImportBtn { display: none; }
  #cpClose { display: none; } /* iter 181：底部导航已有「地图」，删返回地图键 */
  .cp-tools { width: 100%; margin-left: 0; }
  .cp-search { flex: 1 1 auto; width: auto; max-width: none; }
  /* iter 213：手机端「设置/图层」撤出侧栏，挪进「我的」页（登录后显示） */
  #btnSettings, #btnLayersOpen { display: none; }
  /* 状态筛选：手机端收进下拉框（chips 隐藏，iter 179；iter 181 缩小到 1/5 宽）；
     iter 196：筛选行改 flex，「＋新建客户」从顶栏下移到本行右侧 */
  .cp-chips { display: none; }
  .cp-fsel-wrap { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; }
  .cp-fsel-wrap select {
    width: 20%; min-width: 0; border: 1px solid #d8dce3; background: #fff; color: #1f2733;
    border-radius: 10px; padding: 6px 8px; font-size: 12px; outline: none;
  }
  .cp-fsel-wrap select:focus { border-color: #1c64d6; }
  .cp-fsel-wrap #cpNew { margin-left: auto; flex: 0 0 auto; }
  /* iter 196：手机端卡片不显示楼盘名（圈选删除项） */
  .cp-card-info { display: none; }
  /* iter335：手机端第三行不显示内联跟进预览（保留原下方 .cp-card-lastfup 预览框） */
  .cp-card-fupline { display: none; }
  /* 主体：列表满屏 */
  .cp-body { padding: 10px 12px 16px; }
  .cp-list { width: 100%; flex: 1 1 auto; max-height: none; padding-right: 0; }
  /* 详情默认隐藏，点卡片后全屏覆盖展开 */
  .cp-detail { display: none; }
  #custPage.m-open .cp-detail {
    display: block; position: fixed; inset: 0; z-index: 260;
    border: none; border-radius: 0; background: #f5f6f8;
    overflow-y: auto; padding: 12px 14px 24px;
  }
  /* iter 206：返回列表改右下角悬浮胶囊（原详情顶部通栏返回条删除；避开底部导航） */
  .cp-dback {
    display: block; /* iter 206 补回——桌面基础规则 display:none 会被继承覆盖，丢了就不显示 */
    position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 261;
    width: auto; text-align: center; border: 1px solid #d8dce3; background: #fff;
    color: #1c64d6; font-size: 13px; font-weight: 600; padding: 9px 16px;
    border-radius: 999px; cursor: pointer; box-shadow: 0 6px 18px rgba(15,23,42,.16);
  }
  .cp-dback:active { background: #f0f3f8; }
  /* 卡片：更大点击区域 + 快捷操作行 */
  .cp-card { padding: 13px 14px; border-radius: 12px; }
  .cp-card-name { font-size: 16px; }
  .cp-card-phone { font-size: 13px; }
  .cp-eye { font-size: 16px; padding: 4px 6px; display: none; } /* iter 181：手机端删眼睛按钮 */
  /* iter 184：手机端电话彻底隐藏；r3 徽章移除（已挪到 r1 下拉） */
  .cp-card-phone { display: none; }
  .cp-card-r3 .cust-badge { display: none; }
  /* iter 195：卡片状态下拉 .cp-card-stsel 已删除 */
  /* iter 178：最新跟进预览（状态下拉已在 iter 181 移除） */
  .cp-card-lastfup {
    display: block; margin-top: 9px; background: #f7f8fa; border: 1px solid #eef0f3;
    border-radius: 8px; padding: 7px 9px; font-size: 12px; color: #6b7488;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* iter 194：快捷操作缩小并入首行；iter 195：右移到行尾（margin-left:auto） */
  .cp-card-acts { display: flex; gap: 6px; margin-left: auto; flex: 0 0 auto; }
  .cp-cact {
    border: 1px solid #d8dce3; background: #fff; color: #4a5468;
    border-radius: 999px; padding: 4px 9px; font-size: 11px; line-height: 1.2;
    cursor: pointer; flex: 0 0 auto; white-space: nowrap;
  }
  .cp-cact:active { background: #f0f3f8; }
  .cp-cact.call { color: #e8590c; border-color: #ffc9c9; }
  /* iter 180：底部三按钮导航 + 底部避让 */
  /* iter 252：底部导航改 App Store 风格半透明悬浮胶囊（纯文字无图标，圆角毛玻璃，左右留边悬浮）；iter 253：整体上移至 24px */
  .m-tabbar {
    display: flex; position: fixed; left: 14px; right: 14px;
    bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 1360;
    background: rgba(255,255,255,.68);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(15,40,80,.18);
    padding: 4px;
  }
  .mtab {
    flex: 1; display: flex; align-items: center; justify-content: center;
    border: none; background: none; padding: 11px 0;
    font-size: 13px; color: #3c4a5e; cursor: pointer;
    border-radius: 999px;
    transition: background .15s, color .15s;
  }
  /* iter 253：激活滑块改半透明白（毛玻璃透出地图，不再死白） */
  .mtab.on {
    color: #1c64d6; font-weight: 600;
    background: rgba(255,255,255,.55);
    box-shadow: 0 2px 8px rgba(15,40,80,.08);
  }
  /* 顶栏同功能按钮隐藏（已移到底部导航） */
  #btnMobileLogin, #btnCust { display: none !important; }
  /* 底部元素避让导航栏（iter 253：胶囊整体上移 12px，避让同步 +12） */
  .status { bottom: 84px; }
  .brush-fab { bottom: 152px; }
  .brush-panel { bottom: 216px; }
  .cp-body { padding-bottom: 88px; }
  #custPage.m-open .cp-detail { padding-bottom: 100px; }
}

/* ---------- 角色权限：仅管理员可见（前端隐藏层；真正校验在后端）----------
   注意：admin-only 的显隐完全由 app.js showUserBar() 内联控制（管理员清空内联样式→按各自类正常显示；
   非管理员置 display:none）。此处绝不能再写 .admin-only{display:none}——同优先级下它排在
   .tool-btn/.btn/.mtab 之后永远获胜，而 JS 的 style.display='' 清不掉类规则，会导致管理员也看不到（iter226 根因）。 */

/* ---------- iter 255：普通用户（登录但非管理员）地图只读——隐藏编辑入口，保留 客源/设置/图层/账号 胶囊 ---------- */
body.role-user #toolsSecHead,
body.role-user #toolsFloat,
body.role-user #btnSave,
body.role-user .brush-fab { display: none !important; }

/* ---------- 操作日志弹框 ---------- */
.logs-tip { font-size: 12px; color: #8a93a3; margin-bottom: 10px; }
.logs-list { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.log-row { display: grid; grid-template-columns: 150px 84px 84px 1fr; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #f0f1f4; align-items: baseline; }
.log-time { color: #8a93a3; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.log-act { color: #1c7ed6; font-weight: 600; }
.log-user { color: #495057; }
.log-detail { color: #868e96; word-break: break-all; }
.logs-empty { color: #8a93a3; text-align: center; padding: 20px; }

/* ---------- 邀请码管理增强 ---------- */
.inv-add select { height: 34px; padding: 0 8px; border: 1px solid #e2e6ee; border-radius: 6px; font-size: 13px; }
.um-foot { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ---------- iter 248：房贷计算器弹窗 ---------- */
.loan-card { width: min(360px, 92vw); }
.loan-type, .loan-mode { display: flex; gap: 8px; margin-bottom: 12px; }
.loan-type .btn, .loan-mode .btn { flex: 1; justify-content: center; padding: 0 4px; }
.loan-type .btn { font-size: 12px; }
.loan-type .btn.active, .loan-mode .btn.active { background: #2f7bff; border-color: #2f7bff; color: #fff; }
.loan-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #3c4a5e; margin: 10px 0; }
.loan-row input { width: 130px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 14px; text-align: right; box-sizing: border-box; }
.loan-row input:focus { outline: none; border-color: #2f7bff; }
.loan-result { margin-top: 14px; padding: 14px; background: #f2f7ff; border-radius: 10px; text-align: center; }
.loan-main { font-size: 14px; color: #3c4a5e; }
.loan-main b { font-size: 22px; color: #2f7bff; margin-left: 4px; font-weight: 700; }
.loan-sub { font-size: 12px; color: #7b8a9e; margin-top: 6px; }
.loan-err { color: #d64545; font-size: 13px; }

/* ===== 房产工作台首页（iter339）：全屏首页页 ===== */
#homePage { position: fixed; inset: 0; z-index: 1350; background: #f5f6f8; left: 184px; }
#homePage[hidden] { display: none; }
@media (max-width: 760px) { #homePage { left: 0; } }
.hp-panel { height: 100%; display: flex; flex-direction: column; overflow: hidden; background: #f6f3ec; }
/* iter353 问候区（金棕质感工作台参考） */
.hp-hero { padding: 22px 22px 4px; }
.hp-greet-title { font-size: 24px; font-weight: 700; color: #1f2a44; letter-spacing: .5px; }
.hp-greet-sub { margin-top: 6px; font-size: 13px; color: #8a8478; }
/* 主区：左（区域导航 + 待跟进） 右（今日动态快捷入口） */
.hp-main { flex: 1; display: flex; gap: 16px; padding: 14px 22px 0; min-height: 0; }
.hp-left { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hp-side { flex: 0 0 252px; background: #fff; border-radius: 14px; padding: 16px 16px 8px; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(31, 42, 68, .05); }
.hp-side-title { font-size: 15px; font-weight: 700; color: #1f2a44; padding-left: 10px; border-left: 3px solid #b98a2f; margin: 0 0 6px; }
.hp-act { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; border-bottom: 1px dashed #eee7d9; padding: 13px 2px; font-size: 14px; color: #3a4560; cursor: pointer; text-align: left; font-family: inherit; }
.hp-act:last-child { border-bottom: none; }
.hp-act:hover { color: #a3771c; }
.hp-act-ico { flex: 0 0 26px; height: 26px; border-radius: 8px; background: #f6efdd; color: #b98a2f; display: flex; align-items: center; justify-content: center; }
.hp-act-ico svg { width: 15px; height: 15px; }
.hp-act small { margin-left: auto; font-size: 12px; color: #b7b0a2; font-weight: 400; }
/* 区域导航：金棕胶囊 */
.hp-zones { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-zone { border: 1px solid #e3dcc9; background: #fffdf7; color: #8a6d1f; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.hp-zone:hover { background: #b98a2f; color: #fff; border-color: #b98a2f; }
/* 区块标题 / 列表 */
.hp-sect { font-size: 14px; font-weight: 700; color: #1f2a44; margin: 2px 0 8px; }
.hp-sect small { font-weight: 400; color: #8a8478; margin-left: 6px; }
.hp-sect-gap { margin-top: 16px; }
.hp-list { flex: 1; overflow-y: auto; background: #fff; border: none; border-radius: 12px; box-shadow: 0 6px 18px rgba(31, 42, 68, .05); min-height: 60px; }
.hp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f4f0e6; }
.hp-item:last-child { border-bottom: none; }
.hp-item-name { font-size: 14px; color: #1f2a44; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-item-name small { display: block; font-size: 12px; color: #8a8478; font-weight: 400; margin-top: 2px; }
.hp-item-meta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hp-item-meta span { font-size: 12px; color: #8a8478; }
.hp-go { border: 1px solid rgba(185, 138, 47, .45); background: #fff; color: #a3771c; font-size: 12px; border-radius: 999px; padding: 4px 12px; cursor: pointer; flex: 0 0 auto; }
.hp-go:hover { background: #b98a2f; color: #fff; }
.hp-empty { padding: 22px 14px; text-align: center; color: #a89f8d; font-size: 13px; }
/* 底部大统计卡（参考图底部四卡：金棕底缀 + 右上角线性图标） */
.hp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px 22px 20px; }
.hp-stat { position: relative; background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 6px 18px rgba(31, 42, 68, .05); overflow: hidden; min-width: 0; }
.hp-stat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #d9b56a, #b98a2f); }
.hp-stat-top { display: flex; align-items: center; justify-content: space-between; }
.hp-stat-top label { font-size: 13px; color: #6b6455; font-weight: 600; }
.hp-stat-ico { color: #c9a063; display: flex; }
.hp-stat-ico svg { width: 20px; height: 20px; }
.hp-stat-num { margin-top: 8px; font-size: 30px; font-weight: 700; color: #1f2a44; line-height: 1.1; }
.hp-stat-num small { font-size: 13px; color: #8a8478; margin-left: 4px; font-weight: 400; }
.hp-stat.today .hp-stat-num, .hp-stat.today .hp-stat-ico { color: #b98a2f; }
@media (max-width: 760px) {
  .hp-main { flex-direction: column; overflow-y: auto; }
  .hp-side { flex: 0 0 auto; }
  .hp-list { max-height: 300px; flex: 0 0 auto; }
  .hp-stats { grid-template-columns: repeat(2, 1fr); }
}

/* iter341：桌面状态条空闲不展示（用户要求去掉「选择模式：点击标注查看详情」黑条）；
   有「完成/取消」等操作按钮时才显形（同手机端 has-action 机制，JS updateStatus 维护） */
.map-wrap > .status { display: none; }
.map-wrap > .status.has-action { display: flex; }

/* ---------- iter342：搜索 + 分享/演示/保存 悬浮条（原顶栏元素移至地图上方悬浮，ID 不变 JS 零改动）
   iter342b：用户反馈「太大太长」→ 缩为紧凑小条：不再通栏，宽度自适应内容（约为地图宽 1/3），高度 30px ---------- */
.map-float-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 890; /* 低于弹出的标注工具浮层(900)/状态条(1001)/侧栏展开把手(1000)，高于地图画布 */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line-soft, #e5e8ee);
  border-radius: 8px;
  padding: 3px 6px;
  box-shadow: 0 3px 12px rgba(20, 30, 60, .14);
  max-width: calc(100% - 24px);
}
.map-float-bar .top-search { flex: 0 1 240px; margin-left: 0; }
.map-float-bar .top-search input { height: 22px; font-size: 12px; padding: 0 8px; border-radius: 6px; }
.map-float-bar .btn { flex: 0 0 auto; height: 22px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.app--present .map-float-bar { display: none !important; } /* 演示模式只留地图 */

@media (max-width: 640px) {
  .map-float-bar { top: 8px; left: 10px; right: 10px; padding: 4px 6px; gap: 5px; border-radius: 8px; }
  .map-float-bar .top-search { flex: 1 1 120px; max-width: none; }
  .map-float-bar .top-search input { height: 28px; font-size: 12px; }
  .map-float-bar .btn { height: 28px; font-size: 12px; padding: 0 10px; }
}

/* iter343：手机端工具栏转底部横排时品牌块隐藏（不占底栏空间） */
@media (max-width: 760px) {
  .tb-brand { display: none; }
}

/* ===== iter355b：客源管理页「高端大气上档次」质感升级（布局零改动；全部 #custPage 作用域，靠后声明覆盖生效） ===== */
/* 页面底：多层径向渐变营造纵深与高级灰质感 */
#custPage {
  background:
    radial-gradient(140% 92% at 50% -14%, #f5f8fc 0%, #e9eef6 40%, #e0e7f1 100%) fixed;
}
/* 顶栏：高光白 + 香槟金内描边 + 强签名投影（高度不变，仅视觉） */
#custPage .cp-head {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border-bottom: 1px solid #e6ecf4;
  box-shadow:
    0 2px 0 rgba(31, 42, 68, .04),
    0 16px 36px -18px rgba(31, 42, 68, .34),
    inset 0 -3px 0 0 rgba(201, 163, 90, .9);
}
/* 标题：蓝金渐变文字，显身份感 */
#custPage .cp-title {
  letter-spacing: 1.2px;
  background: linear-gradient(90deg, #1f3a6e 0%, #1c64d6 55%, #b98a3c 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #1f3a6e;
}
/* 搜索框：更圆润 + 聚焦金色光晕 */
#custPage .cp-search {
  border-radius: 12px; background: #f2f5fb; border-color: #dde4ef;
  box-shadow: inset 0 1px 2px rgba(31, 42, 68, .05);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#custPage .cp-search:focus {
  background: #fff; border-color: #c9a35a;
  box-shadow: 0 0 0 3px rgba(201, 163, 90, .18), inset 0 1px 2px rgba(31, 42, 68, .04);
}
/* 统计小卡：玻璃质感 + 顶部高光 + 香槟金细描边 + 悬浮轻抬 */
#custPage .cp-stat {
  border: 1px solid #e6ecf4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fc 100%);
  box-shadow: 0 2px 5px rgba(31, 42, 68, .06), 0 10px 22px -14px rgba(31, 42, 68, .22), inset 0 1px 0 #ffffff;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
#custPage .cp-stat:hover {
  border-color: #d9b878;
  box-shadow: 0 3px 8px rgba(31, 42, 68, .08), 0 14px 30px -16px rgba(201, 163, 90, .42), inset 0 1px 0 #ffffff;
  transform: translateY(-2px);
}
/* 主按钮：深邃蓝金渐变 + 立体高光 + 强投影 + 悬浮微抬 */
#custPage .btn.primary {
  background: linear-gradient(180deg, #2b6fe0 0%, #1847a8 100%);
  border-color: #1847a8;
  box-shadow: 0 6px 16px -5px rgba(24, 71, 168, .6), inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(0, 0, 0, .12);
  transition: filter .15s, transform .12s, box-shadow .18s;
}
#custPage .btn.primary:hover {
  background: linear-gradient(180deg, #2763cc 0%, #143e93 100%);
  box-shadow: 0 10px 22px -6px rgba(24, 71, 168, .72), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}
#custPage .btn.primary:active { transform: translateY(1px); box-shadow: 0 3px 8px -4px rgba(24, 71, 168, .6); }
/* 关闭按钮：悬浮旋转 + 金色描边 */
#custPage .cp-x {
  color: #8893a5; border: 1px solid transparent;
  transition: background .15s, color .15s, transform .22s, border-color .15s;
}
#custPage .cp-x:hover { transform: rotate(90deg); color: #c9a35a; border-color: rgba(201, 163, 90, .4); background: rgba(201, 163, 90, .08); }
/* 筛选 chips：玻璃白卡 + 悬浮轻抬 + 金色描边；选中态金蓝渐变 */
#custPage .cp-chip {
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  border: 1px solid #dde4ef; color: #51607a;
  box-shadow: 0 1px 2px rgba(31, 42, 68, .05);
  transition: border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
#custPage .cp-chip:hover {
  border-color: #d9b878; color: #9a6f1f;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -3px rgba(201, 163, 90, .35);
}
#custPage .cp-chip.on {
  background: linear-gradient(180deg, #2b6fe0, #1847a8);
  border-color: #1847a8; color: #fff;
  box-shadow: 0 6px 14px -4px rgba(24, 71, 168, .65), inset 0 1px 0 rgba(255, 255, 255, .22);
}
#custPage .cp-sort-sel {
  border-color: #dde4ef; border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
#custPage .cp-sort-sel:hover { border-color: #d9b878; box-shadow: 0 0 0 3px rgba(201, 163, 90, .12); }
/* 列表卡片：大圆角 + 玻璃立体 + 悬浮明显抬升+微缩放；选中态金蓝双环 */
#custPage .cp-card {
  border-radius: 16px; border: 1px solid #e6ecf4;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
  box-shadow: 0 2px 6px rgba(31, 42, 68, .06), 0 12px 28px -14px rgba(31, 42, 68, .2);
  transition: border-color .18s, box-shadow .2s, transform .2s;
}
#custPage .cp-card:hover {
  border-color: #cdd9ec;
  box-shadow: 0 8px 20px -8px rgba(28, 100, 214, .3), 0 20px 44px -20px rgba(31, 42, 68, .24);
  transform: translateY(-3px) scale(1.012);
}
#custPage .cp-card.sel {
  border-color: #1c64d6;
  box-shadow: 0 0 0 2px rgba(28, 100, 214, .18), 0 0 0 4px rgba(201, 163, 90, .22), 0 12px 28px -12px rgba(28, 100, 214, .32);
}
#custPage .cp-card.over { border-left: 4px solid #e8590c; } /* 逾期左条保留 */
/* 详情面板：大圆角 + 纵渐变 + 深邃远景投影 + 顶部香槟金内描边（视觉尊贵感） */
#custPage .cp-detail {
  border-radius: 18px; border: 1px solid #e6ecf4;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  box-shadow:
    inset 0 3px 0 0 rgba(201, 163, 90, .85),
    0 2px 6px rgba(31, 42, 68, .06),
    0 28px 70px -34px rgba(31, 42, 68, .42);
}
#custPage .cp-d-name { letter-spacing: .6px; color: #1f3a6e; }
#custPage .cp-d-head { border-bottom: 1px solid #eef1f6; }
/* 详情按钮组：玻璃白卡 + 悬浮轻抬；主按钮金蓝渐变 */
#custPage .cp-dbtn {
  border-radius: 11px; border: 1px solid #dde4ef; color: #51607a;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  box-shadow: 0 1px 2px rgba(31, 42, 68, .05);
  transition: border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
#custPage .cp-dbtn:hover {
  border-color: #d9b878; color: #9a6f1f;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -3px rgba(201, 163, 90, .3);
}
#custPage .cp-dbtn.primary {
  background: linear-gradient(180deg, #2b6fe0, #1847a8);
  border-color: #1847a8; color: #fff;
  box-shadow: 0 6px 14px -5px rgba(24, 71, 168, .6), inset 0 1px 0 rgba(255, 255, 255, .28);
}
#custPage .cp-dbtn.primary:hover { color: #fff; box-shadow: 0 9px 20px -6px rgba(24, 71, 168, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
#custPage .cp-next-btn {
  border-radius: 11px; border: 1px solid #dde4ef;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  box-shadow: 0 1px 2px rgba(31, 42, 68, .05);
  transition: border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
#custPage .cp-next-btn:hover { border-color: #d9b878; color: #9a6f1f; transform: translateY(-1px); box-shadow: 0 4px 10px -3px rgba(201, 163, 90, .3); }
#custPage .cp-quick { transition: border-color .15s, color .15s; }
#custPage .cp-quick:hover { border-color: #d9b878; color: #9a6f1f; }
/* 跟进记录条目：玻璃白卡 + 悬浮金边柔影 */
#custPage .cp-fup {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid #edf0f5; border-radius: 13px;
  box-shadow: 0 1px 2px rgba(31, 42, 68, .04);
  transition: border-color .15s, box-shadow .18s, transform .18s;
}
#custPage .cp-fup:hover {
  border-color: #e6dcc4;
  box-shadow: 0 4px 14px -6px rgba(201, 163, 90, .3);
  transform: translateY(-1px);
}
#custPage .cp-fup-form { background: #f6f9fd; border: 1px solid #e3ecf8; border-radius: 13px; }
/* 空态与滚动条 */
#custPage .cp-empty { color: #9aa5b5; }
#custPage .cp-list::-webkit-scrollbar, #custPage .cp-detail::-webkit-scrollbar { width: 8px; }
#custPage .cp-list::-webkit-scrollbar-thumb, #custPage .cp-detail::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9d3e0, #aeb9cc); border-radius: 999px;
}
#custPage .cp-list::-webkit-scrollbar-thumb:hover, #custPage .cp-detail::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #b3c0d2, #97a4ba); }
#custPage .cp-list::-webkit-scrollbar-track, #custPage .cp-detail::-webkit-scrollbar-track { background: transparent; }

/* ===== iter356：客源管理 + 客源跟进「高端大气」重做（列表头像 / 详情英雄头 / 跟进时间轴；布局零改，#custPage 作用域，靠后声明覆盖 355b） ===== */
/* 头像基类（列表 + 详情共用，按状态着色） */
.cp-card-ava, .cp-d-ava {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; letter-spacing: 1px; flex: 0 0 auto;
  background: linear-gradient(135deg, #2b6fe0, #1847a8);
  box-shadow: 0 3px 8px -2px rgba(24, 71, 168, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.cp-card-ava { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.cp-d-ava { width: 56px; height: 56px; border-radius: 16px; font-size: 21px; border: 2px solid rgba(255, 255, 255, .55); position: relative; z-index: 1; box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .3); }
.cp-card-ava.ava-st-ing, .cp-d-ava.ava-st-ing { background: linear-gradient(135deg, #f0a02a, #e8830f); }
.cp-card-ava.ava-st-intent, .cp-d-ava.ava-st-intent { background: linear-gradient(135deg, #38a6f0, #1c7ed6); }
.cp-card-ava.ava-st-deal, .cp-d-ava.ava-st-deal { background: linear-gradient(135deg, #2fb56a, #138a4e); }
.cp-card-ava.ava-st-lost, .cp-d-ava.ava-st-lost { background: linear-gradient(135deg, #9aa5b5, #6b7488); }
.cp-card-ava.ava-st-x, .cp-d-ava.ava-st-x { background: linear-gradient(135deg, #7a5af5, #5a3fd0); }

/* 列表卡片：头像 + 主区独立成列 */
#custPage .cp-card { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; }
#custPage .cp-card-main { min-width: 0; flex: 1 1 auto; }
#custPage .cp-card-r1 { align-items: center; }

/* 详情英雄头：深蓝金渐变 + 大头像 + 白字（覆盖 355b 的浅色描边头） */
#custPage .cp-d-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 18px;
  border: none; border-radius: 14px; overflow: visible; position: relative;
  background: linear-gradient(120deg, #1f3a6e 0%, #1c64d6 55%, #2b6fe0 100%);
  box-shadow: 0 10px 26px -14px rgba(28, 100, 214, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
#custPage .cp-d-head::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(217, 184, 120, .35), transparent 70%);
  border-radius: 14px; pointer-events: none;
}
#custPage .cp-d-name { color: #fff; font-size: 19px; letter-spacing: .5px; }
#custPage .cp-d-head .cp-d-tagwrap { z-index: 1; }
#custPage .cp-d-head .cp-d-tag {
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px; padding: 3px 12px; backdrop-filter: blur(2px);
}
#custPage .cp-d-head .cp-d-tag:hover { background: rgba(255, 255, 255, .26); }
#custPage .cp-d-ops { z-index: 1; }
#custPage .cp-d-head .cp-dbtn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .26); color: #fff; }
#custPage .cp-d-head .cp-dbtn:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .4); color: #fff; }
#custPage .cp-d-head .cp-dbtn.primary { background: linear-gradient(180deg, #f3d79a, #d9b878); border-color: #caa45f; color: #5a3d0c; }
#custPage .cp-d-head .cp-dbtn.primary:hover { color: #4a320a; }
#custPage .cp-d-head .cp-dbtn.danger { background: rgba(255, 255, 255, .1); border-color: rgba(255, 160, 160, .4); color: #ffd9d9; }

/* 跟进记录：竖向时间轴（金节点 + 白卡内容） */
#custPage .cp-fups-head { margin-bottom: 14px; }
#custPage .cp-lbl2 { position: relative; padding-left: 14px; }
#custPage .cp-lbl2::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #d9b878, #c9a35a); }
#custPage .cp-addfup { border: 1px solid #c9a35a; background: #fff; color: #9a6f1f; border-radius: 9px; padding: 5px 14px; font-weight: 600; transition: background .15s, box-shadow .15s, transform .12s; }
#custPage .cp-addfup:hover { background: #fbf3e0; box-shadow: 0 3px 10px -3px rgba(201, 163, 90, .5); transform: translateY(-1px); }
#custPage .cp-memobtn { border-color: #dde4ef; color: #51607a; }
#custPage .cp-memobtn.hasmemo { border-color: #d9b878; color: #9a6f1f; background: #fbf3e0; }
#custPage .cp-fup {
  position: relative; padding: 0 0 20px 42px; margin: 0;
  border: none; background: transparent; border-radius: 0;
}
#custPage .cp-fup:hover { transform: none; box-shadow: none; }
#custPage .cp-fup::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 0; width: 2px; background: linear-gradient(180deg, #d9b878 0%, #cdd9ec 100%); }
#custPage .cp-fup:last-child::before { bottom: auto; height: 12px; }
#custPage .cp-fup-meta { position: relative; margin-bottom: 7px; }
#custPage .cp-dot {
  position: absolute; left: 7px; top: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; border: 3px solid #c9a35a;
  box-shadow: 0 0 0 3px #f7f9fd; flex: 0 0 auto;
}
#custPage .cp-fup-type-lbl { color: #9a6f1f; background: #fbf3e0; padding: 1px 9px; border-radius: 999px; font-weight: 600; }
#custPage .cp-fup-content {
  background: #ffffff; border: 1px solid #edf0f5; border-radius: 12px;
  padding: 11px 13px; margin-top: 4px; box-shadow: 0 2px 6px -2px rgba(31, 42, 68, .1);
}
#custPage .cp-fup:hover .cp-fup-content { border-color: #e6dcc4; box-shadow: 0 4px 14px -6px rgba(201, 163, 90, .3); }
#custPage .cp-fup-form { background: #f6f9fd; border: 1px solid #e3ecf8; border-radius: 13px; }

/* ===== iter357：客源「客户阶段管道」——状态分布看板 + 筛选（替换原 chips；#custPage 作用域，靠后声明覆盖） ===== */
#custPage .cp-pipeline {
  display: flex; gap: 10px; padding: 14px 18px 6px; align-items: stretch;
}
#custPage .cp-pipe-seg {
  flex: 1 1 0; min-width: 0; cursor: pointer; text-align: left; font: inherit;
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 14px; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f8fafd);
  border: 1px solid #e6ecf4; box-shadow: 0 2px 6px rgba(31, 42, 68, .05);
  transition: border-color .15s, box-shadow .18s, transform .15s;
  --pc: #1c64d6;
}
#custPage .cp-pipe-seg::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--pc);
}
#custPage .cp-pipe-seg:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(31, 42, 68, .28); border-color: #cdd9ec; }
#custPage .cp-pipe-num { font-size: 23px; font-weight: 800; color: #1f2733; letter-spacing: .5px; line-height: 1.1; }
#custPage .cp-pipe-lbl { font-size: 12px; color: #6b7488; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#custPage .cp-pipe-seg.on {
  border-color: #c9a35a;
  box-shadow: 0 0 0 2px rgba(201, 163, 90, .28), 0 10px 22px -12px rgba(201, 163, 90, .45);
}
#custPage .cp-pipe-seg.on .cp-pipe-num { color: #9a6f1f; }
#custPage .cp-pipe-seg.on::before { background: #c9a35a; }
/* 状态色（与头像/徽章同轴） */
#custPage .cp-pipe-seg.pipe-st-all { --pc: #1c64d6; }
#custPage .cp-pipe-seg.pipe-st-new { --pc: #3b5bdb; }
#custPage .cp-pipe-seg.pipe-st-ing { --pc: #fa8c16; }
#custPage .cp-pipe-seg.pipe-st-intent { --pc: #1c7ed6; }
#custPage .cp-pipe-seg.pipe-st-deal { --pc: #15a05a; }
#custPage .cp-pipe-seg.pipe-st-lost { --pc: #98a1b0; }
#custPage .cp-pipe-seg.pipe-st-pending { --pc: #c9a35a; }
#custPage .cp-pipe-seg.pipe-st-x { --pc: #9c36b5; }
#custPage .cp-pipe-seg.pipe-st-x0 { --pc: #15a05a; }
#custPage .cp-pipe-seg.pipe-st-x1 { --pc: #fa8c16; }
#custPage .cp-pipe-seg.pipe-st-x2 { --pc: #1c7ed6; }
#custPage .cp-pipe-seg.pipe-st-x3 { --pc: #9c36b5; }
#custPage .cp-pipe-seg.pipe-st-x4 { --pc: #0c8599; }
#custPage .cp-pipe-seg.pipe-st-x5 { --pc: #d6336c; }
/* 排序控件推到管道行最右 */
#custPage .cp-pipeline .cp-sort { margin-left: auto; flex: 0 0 auto; align-self: center; display: flex; align-items: center; gap: 6px; }
#custPage .cp-pipeline .cp-sort-lbl { font-size: 12px; color: #8a93a3; }
/* 手机端用下拉筛选，管道隐藏 */
@media (max-width: 760px) {
  #custPage .cp-pipeline { display: none; }
}

/* iter358：成交概率环形 + 一键推进阶段按钮（置于头部右侧，与操作组构成右簇） */
#custPage .cp-d-ring { margin-left: auto; position: relative; width: 56px; height: 56px; flex: 0 0 auto; }
#custPage .cp-d-ring-svg { width: 56px; height: 56px; transform: rotate(-90deg); display: block; }
#custPage .cp-ring-track { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 4; }
#custPage .cp-ring-fill { fill: none; stroke: #f3d79a; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1); }
#custPage .cp-d-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; line-height: 1.05; }
#custPage .cp-d-ring-num b { font-size: 16px; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
#custPage .cp-d-ring-num .cp-pct { font-size: 10px; font-weight: 700; margin-left: 1px; }
#custPage .cp-d-ring-num em { font-size: 9px; font-style: normal; opacity: .82; margin-top: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
#custPage .cp-d-head .cp-advance { background: linear-gradient(180deg, #f3d79a, #d9b878); border-color: #caa45f; color: #5a3d0c; font-weight: 600; }
#custPage .cp-d-head .cp-advance:hover { color: #4a320a; }
#custPage .cp-d-head .cp-advance-done { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .85); cursor: default; }
/* 推进时的流动脉冲动画（作用于状态标签） */
#custPage .cp-d-head .cp-st-advancing { animation: cpAdvancePulse .6s ease; }
@keyframes cpAdvancePulse { 0% { transform: scale(1); } 35% { transform: scale(1.14); box-shadow: 0 0 0 6px rgba(243, 215, 154, .5); } 100% { transform: scale(1); } }
@media (max-width: 760px) {
  #custPage .cp-d-ring { margin-left: 0; }
}

/* iter361：首页奢华工作台重做（深蓝金英雄横幅 + 衬线大数字 KPI + 待跟进/快捷入口/区域导航） */
#homePage { background: #f2eee3; }
#homePage .hw-panel { background: radial-gradient(120% 90% at 50% -10%, #f8f5ee, #f0ebdd); }
.hw-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
/* 英雄横幅：深蓝金渐变 + 内嵌金细框 + 金光晕 + 房子水印 */
.hw-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 30px 34px;
  background: linear-gradient(120deg, #16294f 0%, #1c3f86 55%, #1c64d6 100%);
  box-shadow: 0 18px 40px -20px rgba(22, 41, 79, .6), inset 0 1px 0 rgba(255, 255, 255, .15); }
.hw-hero::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(217, 184, 120, .35); border-radius: 11px; pointer-events: none; }
.hw-hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(217, 184, 120, .4), transparent 70%); pointer-events: none; }
.hw-hello { color: #fff; font-size: 27px; font-weight: 700; letter-spacing: 1px; font-family: Georgia, 'Times New Roman', 'STSong', 'SimSun', serif; }
.hw-date { color: rgba(255, 255, 255, .78); font-size: 13px; margin-top: 7px; letter-spacing: 2px; }
.hw-sub { color: #e9d9ae; font-size: 14px; margin-top: 10px; letter-spacing: .5px; }
.hw-hero-deco { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); width: 118px; height: 118px; color: rgba(217, 184, 120, .3); }
/* KPI 卡：衬线大数字 + 金顶线悬浮 */
.hw-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.hw-kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  background: #fff; border: 1px solid #eee8d9; border-radius: 14px; padding: 16px 18px 14px;
  cursor: pointer; font-family: inherit; text-align: left;
  box-shadow: 0 8px 22px -14px rgba(31, 42, 68, .25); transition: transform .15s, box-shadow .15s, border-color .15s; }
.hw-kpi::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, #d9b878, #c9a35a); opacity: 0; transition: opacity .15s; }
.hw-kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -16px rgba(31, 42, 68, .4); border-color: #d9b878; }
.hw-kpi:hover::before { opacity: 1; }
.hw-kpi-ico { width: 30px; height: 30px; border-radius: 9px; background: #f6efdd; color: #b98a2f; display: flex; align-items: center; justify-content: center; }
.hw-kpi-ico svg { width: 16px; height: 16px; }
.hw-kpi-num b { font-family: Georgia, 'Times New Roman', 'STSong', 'SimSun', serif; font-size: 32px; font-weight: 700; color: #1f2a44; line-height: 1; }
.hw-kpi-num small { font-size: 12px; color: #8a8478; margin-left: 4px; }
.hw-kpi.today .hw-kpi-num b { color: #b98a2f; }
.hw-kpi-lbl { font-size: 13px; color: #6b7280; letter-spacing: 1px; }
/* 双栏：今日待跟进 + 右侧快捷入口/区域导航 */
.hw-cols { flex: 1; min-height: 0; display: flex; gap: 16px; }
.hw-pendcard { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hw-sidecol { flex: 0 0 264px; display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow-y: auto; }
.hw-card { background: #fff; border: 1px solid #eee8d9; border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 22px -14px rgba(31, 42, 68, .2); }
.hw-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hw-card-title { font-size: 15px; font-weight: 700; color: #1f2a44; padding-left: 10px; border-left: 3px solid #c9a35a; letter-spacing: 1px; }
.hw-tag { font-size: 12px; font-weight: 700; color: #9a6f1f; background: #fbf3e0; border: 1px solid #e8d9b0; border-radius: 999px; padding: 2px 10px; }
.hw-pendlist { flex: 1; overflow-y: auto; min-height: 80px; }
.hw-pend { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed #eee7d9; }
.hw-pend:last-child { border-bottom: none; }
.hw-pend-name { font-size: 15px; font-weight: 700; color: #1f2a44; }
.hw-pend-sub { font-size: 12px; color: #8a8478; margin-top: 3px; }
.hw-pend-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.hw-pend-time { font-size: 12px; color: #8a8478; }
.hw-go { border: 1px solid #c9a35a; background: #fff; color: #9a6f1f; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-family: inherit; transition: all .15s; }
.hw-go:hover { background: linear-gradient(180deg, #f3d79a, #d9b878); color: #5a3d0c; box-shadow: 0 4px 12px -4px rgba(201, 163, 90, .6); }
.hw-acts .hp-act-ico { width: 30px; height: 30px; border-radius: 9px; }
.hw-zones { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-zone { border: 1px solid #e3dcc9; background: #fffdf7; color: #8a6d1f; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-family: inherit; transition: all .15s; }
.hw-zone:hover { background: linear-gradient(180deg, #f3d79a, #d9b878); color: #5a3d0c; border-color: #caa45f; }
@media (max-width: 1100px) {
  .hw-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .hw-body { padding: 12px 12px 16px; }
  .hw-hero { padding: 22px 18px; }
  .hw-hello { font-size: 22px; }
  .hw-kpis { grid-template-columns: repeat(2, 1fr); }
  .hw-cols { flex-direction: column; }
  .hw-sidecol { flex: 0 0 auto; overflow: visible; }
  .hw-pendlist { max-height: 320px; }
  .hw-hero-deco { display: none; }
}

/* ===== iter364：账号功能并入设置弹窗——弹窗加宽 + 账号分区（覆盖 2538 行 iter187 旧规则） ===== */
#settingsModal .modal-card { width: 420px; }
.set-sec { margin-top: 4px; }
.set-sec-title {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 700; color: #8a94a6; letter-spacing: 2px;
  border-top: 1px solid #eef1f6; margin: 16px 0 10px; padding-top: 14px;
}
.set-sec-title em {
  font-style: normal; font-weight: 500; letter-spacing: 0;
  color: #2e6cf6; font-size: 12px;
}

/* ===== iter367：首页质感重做（深空蓝金分层渐变 + 玻璃质感卡 + 衬线大数字 + 金细框 + 呼吸留白） ===== */
#homePage { background: linear-gradient(180deg, #faf6ee 0%, #f1e9da 100%); }
#homePage .hw-panel { background:
    radial-gradient(140% 80% at 50% -22%, #fbf8f1, #efe7d7 72%),
    linear-gradient(180deg, #f7f2e9, #f1e9da); }
.hw-body { padding: 24px 30px 30px; gap: 20px; }

/* 英雄横幅：多层深空蓝金 + 双金框 + 顶部高光 + 右侧柔光 */
.hw-hero { padding: 36px 42px; border-radius: 20px;
  background:
    radial-gradient(120% 140% at 88% -12%, rgba(28,100,214,.55), transparent 56%),
    linear-gradient(115deg, #11203f 0%, #1b356f 48%, #234b9e 78%, #2f6fd0 100%);
  box-shadow: 0 26px 60px -28px rgba(17,32,63,.7), inset 0 1px 0 rgba(255,255,255,.18); }
.hw-hero::before { inset: 11px; border: 1px solid rgba(220,188,120,.4); border-radius: 14px; }
.hw-hero::after { right: -50px; top: -70px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(220,188,120,.45), transparent 70%); }
.hw-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 2px; color: #f0d9a8;
  border: 1px solid rgba(220,188,120,.45); border-radius: 999px; padding: 5px 14px;
  background: rgba(255,255,255,.06); backdrop-filter: blur(2px); }
.hw-brand-dot { width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(180deg,#e9cf94,#c9a35a); box-shadow: 0 0 8px rgba(220,188,120,.9); }
.hw-hello { font-size: 32px; letter-spacing: 1.5px; }
.hw-date { font-size: 13px; letter-spacing: 3px; margin-top: 8px; }
.hw-sub { font-size: 14px; margin-top: 12px; letter-spacing: .5px; color: #ecd9a6; }
.hw-hero-deco { right: 34px; width: 132px; height: 132px; color: rgba(220,188,120,.28); }

/* KPI 卡：常驻金顶线 + 渐变金图标 + 衬线大数字 + 悬浮抬升 */
.hw-kpis { gap: 16px; }
.hw-kpi { border-radius: 16px; padding: 18px 20px 16px; border: 1px solid #ece3d2;
  box-shadow: 0 10px 26px -16px rgba(31,42,68,.28), inset 0 1px 0 rgba(255,255,255,.9); }
.hw-kpi::before { height: 3px; opacity: 1;
  background: linear-gradient(90deg, #e6c989, #c9a35a 60%, #b98a2f);
  box-shadow: 0 1px 4px rgba(201,163,90,.4); }
.hw-kpi:hover { transform: translateY(-4px); box-shadow: 0 18px 38px -18px rgba(31,42,68,.45); border-color: #d9b878; }
.hw-kpi-ico { width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(180deg, #e7c97f, #c9a35a); color: #fff;
  box-shadow: 0 4px 10px -3px rgba(201,163,90,.6), inset 0 1px 0 rgba(255,255,255,.4); }
.hw-kpi-ico svg { width: 18px; height: 18px; }
.hw-kpi-num b { font-size: 34px; letter-spacing: .5px; }
.hw-kpi-num small { font-size: 12px; }
.hw-kpi-lbl { font-size: 13px; letter-spacing: 1.5px; color: #717a88; }
.hw-kpi.today { background: linear-gradient(180deg, #fffaf0, #fdf2dc); border-color: #ecd9a8; }
.hw-kpi.today .hw-kpi-num b { color: #b8842c; }
.hw-kpi.today .hw-kpi-ico { background: linear-gradient(180deg, #f0c873, #d39a36); }
.hw-kpi.today::before { background: linear-gradient(90deg, #f0c873, #d39a36 60%, #b8842c); }

/* 双栏卡片：精致阴影 + 金色标题条 */
.hw-cols { gap: 18px; }
.hw-pendcard { flex: 1.25; }
.hw-sidecol { flex: 0 0 300px; }
.hw-card { border-radius: 16px; padding: 20px 22px; border: 1px solid #ece3d2;
  box-shadow: 0 10px 26px -16px rgba(31,42,68,.22), inset 0 1px 0 rgba(255,255,255,.9); }
.hw-card-title { font-size: 16px; padding-left: 12px; border-left: 4px solid #c9a35a; letter-spacing: 1.5px; }
.hw-tag { font-size: 12px; padding: 3px 12px; border-radius: 999px;
  background: linear-gradient(180deg,#fbf2dd,#f3e3bf); border-color: #e6d2a3; color: #8a6316; }
.hw-pendlist { min-height: 120px; }
.hw-pend { padding: 14px 4px; border-bottom: 1px solid #f1ebdd; }
.hw-pend-name { font-size: 15px; }
.hw-pend-sub { font-size: 12px; margin-top: 4px; }
.hw-go { border-radius: 999px; padding: 6px 16px; border: 1px solid #c9a35a;
  background: linear-gradient(180deg,#fff,#fdf6e7); color: #8a6316;
  box-shadow: 0 2px 6px -2px rgba(201,163,90,.4); }
.hw-go:hover { background: linear-gradient(180deg,#f3d79a,#d9b878); color: #5a3d0c; }

/* 快捷入口：渐变金图标 + 标题/小注 + 悬浮金条 */
.hw-acts { display: flex; flex-direction: column; gap: 4px; }
.hw-acts .hp-act { gap: 12px; padding: 13px 8px; border-bottom: 1px solid #f1ebdd; border-radius: 10px;
  transition: background .15s, transform .15s; }
.hw-acts .hp-act:hover { background: #fbf5e9; color: #1f2a44; transform: translateX(2px); }
.hw-acts .hp-act-ico { width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(180deg, #e7c97f, #c9a35a); color: #fff;
  box-shadow: 0 4px 10px -3px rgba(201,163,90,.55), inset 0 1px 0 rgba(255,255,255,.4); }
.hw-acts .hp-act-ico svg { width: 18px; height: 18px; }
.hp-act span { font-size: 14px; font-weight: 600; color: #2c3550; }
.hp-act small { font-size: 12px; color: #a59c8c; }

/* 响应式 */
@media (max-width: 1100px) {
  .hw-kpis { grid-template-columns: repeat(3, 1fr); }
  .hw-sidecol { flex: 0 0 260px; }
}
@media (max-width: 760px) {
  .hw-body { padding: 14px 14px 18px; gap: 16px; }
  .hw-hero { padding: 24px 20px; }
  .hw-hello { font-size: 26px; }
  .hw-kpis { grid-template-columns: repeat(2, 1fr); }
  .hw-cols { flex-direction: column; }
  .hw-sidecol { flex: 0 0 auto; }
  .hw-pendlist { max-height: 320px; }
  .hw-hero-deco { display: none; }
}

/* ===== iter368：客源卡片第二行「最新跟进」——内容左省略 + 时间右对齐；无跟进浅灰占位（手机端仍走 .cp-card-lastfup 预览框） ===== */
.cp-card-info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-card-fup2 { display: flex; align-items: baseline; gap: 8px; }
.cp-card-fup2 .f2c { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-card-fup2 .f2t { flex: 0 0 auto; font-size: 11px; color: #9aa3b2; }
.cp-card-nofup { color: #b3bac6; }
/* 手机端隐藏第二行（末尾规则晚于 2577 媒体查询，需显式再藏——否则 display:flex 反杀） */
@media (max-width: 760px) {
  .cp-card-fup2 { display: none; }
}

/* ===== iter369：客源卡片改纵向——名字行(徽章挪行尾) / 第二行通栏最新跟进 / 第三行仅下次跟进时间 ===== */
#custPage .cp-card { display: block; }
@media (max-width: 760px) {
  #custPage .cp-card-r1 .cust-badge { display: none; } /* 手机端徽章维持隐藏（iter184 决定，徽章已挪进 r1） */
}

/* ===== iter371：首页 KPI 统计卡支持拖动前后排序（grid 网格任意位置插入） ===== */
.hw-kpi { touch-action: pan-y; } /* 手机端横向拖=排序，纵向滚=页面滚动，互不抢 */
.hw-kpis.kpi-reordering .hw-kpi { transition: none !important; }
.hw-kpi.kpi-drag { opacity: .95; box-shadow: 0 16px 34px -14px rgba(9,14,24,.55); cursor: grabbing; z-index: 5; }
.hw-kpi.kpi-drag:hover, .hw-kpi.kpi-drag:hover::before { transform: none; opacity: 1; }

/* ===== iter372：楼盘笔记「从腾讯文档导入」编辑态横幅（复用粘贴/序列化/图片上传管线，不另写解析） ===== */
.hn-imp-banner {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 10px 14px;
  background: linear-gradient(90deg, rgba(185,138,47,.14), rgba(28,100,214,.10));
  border: 1px solid rgba(185,138,47,.35); border-radius: 10px;
  color: #5a4a1d; font-size: 13px; font-weight: 500;
}
.hn-imp-banner::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b98a2f; flex: 0 0 auto; }

/* ===== iter375：楼盘笔记分享弹窗（body 层级，.on 显隐） ===== */
#hnSharePop { display: none; position: fixed; inset: 0; z-index: 1700; align-items: center; justify-content: center; }
#hnSharePop.on { display: flex; }
#hnSharePop .hn-share-mask { position: absolute; inset: 0; background: rgba(20,16,8,.45); }
#hnSharePop .hn-share-card {
  position: relative; width: min(480px, calc(100vw - 40px));
  background: #fff; border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px -24px rgba(9,14,24,.5);
}
#hnSharePop .hn-share-t { font-size: 16px; font-weight: 700; color: #1f2733; margin-bottom: 12px; }
#hnSharePop .hn-share-in {
  width: 100%; padding: 10px 12px; border: 1px solid #e2ddcf; border-radius: 9px;
  font-size: 13px; color: #4a4436; background: #faf8f2; outline: none;
}
#hnSharePop .hn-share-tip { font-size: 12px; color: #a9a294; margin: 8px 0 14px; }
#hnSharePop .hn-share-ops { display: flex; gap: 10px; justify-content: flex-end; }



/* ===== iter423：⚙ 设置浮层紧凑重排——8 行改 2 列网格（480→560 内不再滚动堆叠），图层/快捷操作通栏 ===== */
/* 两个作用域（编辑弹窗内 .anno-dialog > .ad-collapsible / 详情页锚定 .sb-ad-pop）同步生效 */
.anno-dialog > .ad-collapsible .ad-collapsible-b,
.sb-ad-pop .ad-collapsible-b {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
  align-content: start;
  padding: 16px 18px 18px;
}
/* 行=格：标签占满一行（小号灰字），控件在其下占满整格 */
.anno-dialog > .ad-collapsible .ad-row,
.sb-ad-pop .ad-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.anno-dialog > .ad-collapsible .ad-lbl,
.sb-ad-pop .ad-lbl {
  flex: 0 0 100%;
  font-size: 12px;
  letter-spacing: .5px;
  color: #98a1ad;
}
/* 控件统一窄身 */
.anno-dialog > .ad-collapsible .ad-ls-list,
.sb-ad-pop .ad-ls-list { flex: 1 1 100%; gap: 7px; }
.anno-dialog > .ad-collapsible .ad-ls-btn,
.sb-ad-pop .ad-ls-btn { padding: 4px 11px; font-size: 12px; border-radius: 8px; line-height: 1.5; }
.anno-dialog > .ad-collapsible .ad-sel,
.sb-ad-pop .ad-sel { flex: 1 1 auto; height: 34px; font-size: 13px; border-radius: 8px; }
.anno-dialog > .ad-collapsible .ad-opr,
.sb-ad-pop .ad-opr { flex: 1 1 auto; }
.anno-dialog > .ad-collapsible .ad-val,
.sb-ad-pop .ad-val { font-size: 13px; min-width: 42px; }
/* 通栏块：所属图层（复选项横排）+ 快捷操作 */
.anno-dialog > .ad-collapsible .ad-span2,
.sb-ad-pop .ad-span2 { grid-column: 1 / -1; }
.anno-dialog > .ad-collapsible .ad-span2 .ad-ly-list,
.sb-ad-pop .ad-span2 .ad-ly-list { flex-direction: row; flex-wrap: wrap; gap: 6px 20px; }
.anno-dialog > .ad-collapsible .ad-ly-item,
.sb-ad-pop .ad-ly-item { font-size: 13px; gap: 7px; padding: 0; }
.anno-dialog > .ad-collapsible .ad-ly-item input[type="checkbox"],
.sb-ad-pop .ad-ly-item input[type="checkbox"] { width: 14px; height: 14px; }

/* ===== iter426：编辑器框撑到弹窗底部（工具条+编辑区+提示整体填充剩余高度） ===== */
.anno-dialog .ad-richwrap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; margin: 0; }
.anno-dialog .ad-richwrap #annoEdBar { flex: 0 0 auto; }
.anno-dialog .ad-rich { flex: 1 1 auto; min-height: 200px; max-height: none; } /* 覆盖 iter411 的 200px/46vh 写死高度 */
.anno-dialog .ad-richwrap .hn-tip { flex: 0 0 auto; margin: 6px 0 0; }
