:root {
  --wx-green: #07c160;
  --wx-green-dark: #06ad56;
  --wx-blue: #10aeff;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #e6e8eb;
  --text: #1f2329;
  --text-2: #8a8f99;
  --danger: #fa5151;
  --warn: #ffc300;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
button {
  font-family: inherit; cursor: pointer; border: none; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; background: #eef0f3; color: var(--text);
  transition: .15s;
}
button:hover { filter: brightness(.96); }
button.primary { background: var(--wx-green); color: #fff; }
button.primary:hover { background: var(--wx-green-dark); }
button.ghost { background: transparent; border: 1px solid var(--border); }
button.danger { background: #fff0f0; color: var(--danger); }
button.sm { padding: 4px 9px; font-size: 12px; }
input, select, textarea {
  font-family: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 8px; outline: none; background: #fff; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--wx-green); }
.row { display: flex; gap: 8px; align-items: center; }
.muted { color: var(--text-2); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px;
  background: #e8f8ef; color: var(--wx-green-dark); margin: 2px 4px 2px 0;
}
.tag.gray { background: #f0f1f3; color: var(--text-2); }
.tag.blue { background: #e8f5ff; color: #0a84c9; }
.tag.orange { background: #fff4e5; color: #d98200; }
.tag.red { background: #ffeced; color: #e04646; }
.tag.purple { background: #f3edff; color: #7b52d1; }

/* ---------- 客户卡片（对齐设计稿） ---------- */
.cus-card { padding: 12px 14px; }
.cus-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cus-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.cus-subname { font-size: 13px; font-weight: 400; color: var(--text-2); }
.cus-code {
  font-size: 12px; color: var(--text-2); background: #f2f3f5;
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
  font-family: Consolas, Monaco, "Courier New", monospace;
}
.cus-date { font-size: 13px; color: var(--text-2); }
.cus-head .tag { margin: 0; }
.cus-head > .tag.cus-status { margin-left: auto; }
/* 卡片右上角：「客户状态 + 客户意向」固定竖排 —— 意向恒在状态正下方（右对齐），
   且始终贴顶。配合左侧 cus-head-main 两栏结构，不管左侧文字折成几行，
   每张卡片这两个标签的位置都完全一致、整齐（原来散落在 flex 流里会随内容长短漂移到不同行） */
.cus-head-main {
  flex: 1 1 0; min-width: 0; align-self: flex-start;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.cus-head-tags {
  margin-left: auto; flex: none; align-self: flex-start;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.cus-head-tags .tag { margin: 0; }
/* 意向等级标签：卡片上可点击 → 一键按该意向筛选客户（再次点击取消） */
.cus-head .tag.lvl-tag { cursor: pointer; transition: filter .12s, box-shadow .12s; }
.cus-head .tag.lvl-tag:hover { filter: brightness(0.95); box-shadow: 0 0 0 2px rgba(10, 132, 201, .18); }
/* 空态里的「显示全部意向」清除链接 */
.lvl-clear { color: var(--wx-green-dark); font-weight: 600; cursor: pointer; text-decoration: underline; }
.cus-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.cus-line .plain { color: var(--text); }
.cus-line .plain.dim { color: var(--text-2); }
.cus-chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 9px; font-size: 12px; color: var(--text); background: #fff;
  white-space: nowrap;
}
.cus-chip.match { border-color: #f0b76a; color: #d98200; background: #fffdf8; font-weight: 600; }
.cus-chip.wx { border-color: #a9d5ff; color: #0a84c9; background: #f4faff; }
.cus-chip.ref { border-color: #cbb8f5; color: #7b52d1; background: #faf7ff; flex: 0 0 auto; align-self: center; }
.cus-chip.ref.none { border-style: dashed; color: var(--text-2); background: #fff; }
/* 配房状态小标签：按「配房状态」着色（默认灰虚线=未配房，避免与绿色「跟进中」撞色） */
.cus-chip.nomatch { border-style: dashed; color: var(--text-2); }
.cus-chip.m-blue { border-color: #a9d5ff; color: #0a84c9; background: #f4faff; }
.cus-chip.m-green { border-color: #bfe8d2; color: var(--wx-green-dark); background: #f6fdf9; }
.cus-chip.m-orange { border-color: #f0b76a; color: #d98200; background: #fffdf8; }
.cus-chip.m-purple { border-color: #cbb8f5; color: #7b52d1; background: #faf7ff; }
/* 账号筛选（仅管理员可见）：页签顶部的「账号」下拉容器 */
.acc-wrap { display: inline-flex; align-items: center; gap: 4px; }
.acc-wrap .cal-label { white-space: nowrap; }
/* 意向快捷筛选（客户跟进工具栏）：与「账号」下拉同款容器 */
.cus-level-wrap { display: inline-flex; align-items: center; gap: 4px; }
.cus-level-wrap .cal-label { white-space: nowrap; }
/* 卡片上的「归属账号」标签：一眼看出这条数据是谁录入的 */
.acc-chip {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid #9fd0ff; border-radius: 6px;
  padding: 2px 8px; font-size: 12px; color: #0a6cbf; background: #f2f9ff;
  white-space: nowrap; flex: 0 0 auto; align-self: center;
}
/* 微信名可点击复制 */
.cus-copy { cursor: pointer; border-radius: 6px; padding: 1px 6px; margin-left: -6px; transition: background .15s, color .15s; user-select: none; }
.cus-copy:hover { background: #e9f8f0; color: var(--wx-green-dark); }
.cus-copy:active { background: #d3f0e0; }
.cus-copy .copy-ico { font-style: normal; font-size: 12px; margin-left: 4px; opacity: .35; }
.cus-copy:hover .copy-ico { opacity: 1; }
.cus-copy.copied { background: #cdf3de; color: var(--wx-green-dark); }
.cus-copy.copied .copy-ico { opacity: 1; }
.cus-movein { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 13px; }
.cus-movein .k { color: var(--text-2); }
.cus-note {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 8px; font-size: 13px; line-height: 1.5;
  background: #fafbfc; border: 1px dashed var(--border);
  border-radius: 8px; padding: 6px 10px;
}
.cus-note .k { color: var(--text-2); white-space: nowrap; flex: none; }
.cus-note .v {
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cus-note.none { background: #fff; }
.cus-note.none .v { color: var(--text-2); }
.cus-actions { display: flex; gap: 10px; margin-top: 12px; }
.cus-actions .btn-blue {
  flex: 1; background: #3d7eff; color: #fff; padding: 9px 12px;
  font-size: 14px; border-radius: 8px; font-weight: 500;
}
.cus-actions .btn-blue:hover { background: #2f6ae6; }
.cus-actions .btn-edit {
  flex: 1; background: #fff; border: 1px solid var(--border);
  padding: 9px 12px; font-size: 14px; border-radius: 8px;
}
.cus-actions .btn-edit:hover { border-color: #c9ced6; }

/* ---------- 面板布局 ---------- */
.panel { display: flex; flex-direction: column; height: 100vh; background: var(--panel); }
.panel-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.panel-head h1 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-head .sub { font-size: 12px; color: var(--text-2); }
.panel-head h1 { white-space: nowrap; }
.panel-head .ghost.xs { white-space: nowrap; flex: 0 0 auto; }
.panel-body { flex: 1; overflow: auto; padding: 14px 16px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--border); background: var(--panel); flex-shrink: 0; }
.footer-time { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- 左右并排（整体演示视图） ---------- */
.split { display: grid; grid-template-columns: 360px 6px 1fr; height: 100vh; gap: 0; }
.split > .side { border-right: none; }
.split > .side:last-child { border-right: none; }
/* 中间拖拽分隔条：自身画 1px 竖线，悬停/拖动时高亮变粗，可左右拖调整左栏宽度 */
.split-resizer { position: relative; cursor: col-resize; z-index: 5; touch-action: none; }
.split-resizer::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); background: var(--border); transition: background .15s, width .15s; }
.split-resizer::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 3px; height: 34px; border-radius: 3px; background: transparent; z-index: 1; }
.split-resizer:hover::after, .split-resizer.active::after { background: #0958d9; width: 3px; }
.split-resizer:hover::before, .split-resizer.active::before { background: #b8d3fb; }

/* ---------- 列表 / 卡片 ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
  background: #fff; box-shadow: var(--shadow);
}
.card.active { border-color: var(--wx-green); box-shadow: 0 0 0 2px rgba(7,193,96,.12); }
.group-item, .village-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.group-item:hover, .village-item:hover { border-color: var(--wx-green); }
.group-item .name { font-weight: 600; }
.group-item .meta { font-size: 12px; color: var(--text-2); }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 16px 0 8px; }
.empty { text-align: center; color: var(--text-2); padding: 30px 10px; }
.pill { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #f0f1f3; color: var(--text-2); }

/* 客户卡片列表 */
.cus-card-list { gap: 6px; }
/* 默认隐藏「已流失」客户时的提示条 */
.cus-hint {
  font-size: 12px; color: var(--text-2); background: #f6f8fb;
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 6px 10px;
}
.cus-hint b { color: #d98200; }
.cus-card {
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  padding: 8px 12px; cursor: pointer; transition: .12s;
}
.cus-card:hover { border-color: var(--wx-green); background: #f8fdfb; }
.cus-card:active { transform: scale(.99); }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tab {
  padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-2);
  font-size: 14px;
}
.tab.active { color: var(--wx-green); border-bottom-color: var(--wx-green); font-weight: 600; }

/* status colors */
.st-free { background: #e8f8ef; color: #07a04a; }
.st-rented { background: #fdeaea; color: #e04646; }
.st-reserved { background: #fff5e0; color: #c98a00; }
.st-bookable { background: #e8f5ff; color: #0a84c9; }
.st-repair { background: #eef0f3; color: #8a8f99; }

/* 带看日历 */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 12px; color: var(--text-2); padding: 4px; font-weight: 600; }
.cal-cell { min-height: 72px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #fff; font-size: 12px; }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--wx-green); background: #f8fdfb; }
.cal-cell.today .cal-date { color: var(--wx-green); font-weight: 700; }
.cal-cell.has-appt { background: #fff9f0; }
.cal-date { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.cal-appts { display: flex; flex-direction: column; gap: 2px; }
.cal-appt { display: flex; align-items: center; gap: 3px; padding: 1px 3px; border-radius: 3px; background: rgba(7,193,96,.08); cursor: pointer; font-size: 11px; overflow: hidden; }
.cal-appt:hover { background: rgba(7,193,96,.18); }
.cal-appt-time { color: var(--wx-green); font-weight: 600; flex-shrink: 0; }
.cal-appt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-appt-status { font-size: 9px; padding: 0 3px; flex-shrink: 0; }

/* 预约详情折叠 */
#calDetail > details { margin-top: 10px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
#calDetail > details > summary { cursor: pointer; font-weight: bold; padding: 8px 12px; background: rgba(0,0,0,.03); user-select: none; list-style: none; }
#calDetail > details > summary::-webkit-details-marker { display: none; }
#calDetail > details > summary::before { content: '▶'; display: inline-block; margin-right: 6px; font-size: 10px; transition: transform .2s; }
#calDetail > details[open] > summary::before { transform: rotate(90deg); }
#calDetail > details > div { padding: 8px 12px; }

/* 房态图 */
.floorplan { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.floorplan .bld { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; }
.floorplan .bld .bh { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.floorplan .fl { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.floorplan .fl .fl-no { width: 42px; font-size: 12px; color: var(--text-2); }
.floorplan .rooms { display: flex; gap: 6px; flex-wrap: wrap; }
.room-cell {
  min-width: 64px; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 12px;
  border: 1px solid var(--border);
}
.room-cell .rn { font-weight: 600; }

/* 表格 */
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
table.grid th { background: #fafbfc; color: var(--text-2); font-weight: 600; }
table.grid tr:hover td { background: #fafbfc; }
table.grid th:first-child, table.grid td:first-child { width: 36px; text-align: center; }
/* 房号列表：有备注的房号加橙色虚线提示，鼠标悬停显示原生 tooltip */
table.grid td.has-remark { text-decoration: underline dotted #fa8c16; text-underline-offset: 3px; cursor: help; color: #d46b08; font-weight: 600; }

/* 批量操作栏 */
.batch-bar { animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(31,35,41,.92); color: #fff; padding: 10px 18px; border-radius: 22px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 999;
}
#toast.show { opacity: 1; }

.modal-mask {
  position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.35); display: none;
  align-items: center; justify-content: center; z-index: 1000;
  /* 手机端：vh = 「大视口」（含被浏览器工具栏遮住的部分），用它居中会让弹窗底部
     （取消/确定）跑到屏幕外、点不到 → 用 dvh = 当前可见高度，保证按钮永远在屏内。
     （老浏览器不支持 dvh 时自动退回上面的 inset:0，不会更差。） */
  height: 100dvh;
}
.modal-mask.show { display: flex; }
.modal-mask.modal-dark { background: rgba(0,0,0,.85); }
.modal-mask.modal-dark .modal { background: transparent; box-shadow: none; padding: 0; }
.modal {
  background: #fff; border-radius: 14px; padding: 20px; width: 420px; max-width: 92vw;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
}
/* 弹窗右上角关闭按钮（绝对定位于最近的 position:relative 容器内），
   用于「视频预览」这类内容撑满、底部按钮容易被顶出屏幕的弹窗 */
.modal-x {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 34px; height: 34px; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  background: rgba(0,0,0,.55); border: none; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.modal-x:active { background: rgba(0,0,0,.75); }
/* 手机端视频预览：WeChat/QQ 的 X5 内核会把内联视频层盖在弹窗 ✕ / 底部按钮之上，
   导致「关闭」点不到、弹窗一直悬浮。这条视口底部最高层级的红色关闭条浮在视频层之上，
   保证随时能关掉弹窗；只在手机端由 JS 渲染（IS_HANDHELD 控制）。 */
.v-close-fab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 50px; font-size: 16px; font-weight: 700; color: #fff;
  background: #e04646; border: none; cursor: pointer;
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
  padding: 0; -webkit-appearance: none; appearance: none;
}
.v-close-fab:active { background: #c23333; }
.v-wrap { position: relative; }
.modal.modal-wide { width: auto; max-width: 94vw; }
.modal h3 { margin: 0 0 14px; flex-shrink: 0; }
.modal .modal-body { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.modal .field { margin-bottom: 12px; }
.modal .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-shrink: 0; }

/* ---- 弹窗「选项组」（销控表生成弹窗的房态多选 / 水印 / 排列模式等）：整齐等宽排布 ----
   根因：全局 `input, select, textarea { width: 100% }` 会把复选框/单选框也撑成 100% 宽，
   放在 flex 行里互相挤压 → 每个字被迫换行（手机上看起来就「全部堆在一起」）。
   这里统一：固定控件尺寸 + 等宽网格 + 文字不换行。 */
.modal .field .st-opts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px; align-items: center; padding: 6px 0; max-width: 100%;
}
/* 3 项 / 2 项选项组（水印类型、水印数量位置）：等宽各占一列 */
.modal .field .st-opts.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modal .field .st-opts.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal .field .st-opts > label {
  display: flex; align-items: center; gap: 6px; width: auto; margin: 0;
  color: var(--text); font-size: 14px; line-height: 1.4; min-width: 0; white-space: nowrap;
}
.modal .field .st-opts > label > input[type="checkbox"],
.modal .field .st-opts > label > input[type="radio"] {
  flex: 0 0 auto; width: 18px; height: 18px; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: none;
}
.modal .field .st-opts > label > select { flex: 1 1 auto; width: auto; min-width: 0; }
.modal .field .st-opts .st-chip { padding: 1px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
/* 长文案选项（如「排列模式」）：整行一条，右侧灰色小字说明 */
.modal .field .st-opts.col { display: flex; flex-direction: column; gap: 2px; }
.modal .field .st-opts.col > label { width: 100%; padding: 7px 2px; gap: 8px; }
.modal .field .st-opts.col > label .st-hint { margin-left: auto; color: var(--text-2); font-size: 12px; font-weight: 400; }
@media (max-width: 560px) {
  .modal .field .st-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; padding: 4px 0; }
  .modal .field .st-opts > label { font-size: 13px; padding: 6px 0; }
  .modal .field .st-opts > label > input[type="checkbox"],
  .modal .field .st-opts > label > input[type="radio"] { width: 20px; height: 20px; }
  .modal .field .st-opts .st-chip { padding: 2px 8px; }
}

/* 公寓电梯/步梯切换按钮 */
.apt-type-btn {
  padding: 5px 14px; border: 1.5px solid var(--border); border-radius: 20px;
  background: #fff; font-size: 13px; cursor: pointer; transition: all .15s;
  color: var(--text-2); user-select: none;
}
.apt-type-btn:hover { border-color: var(--wx-green); color: var(--wx-green); }
.apt-type-btn.active {
  background: var(--wx-green); color: #fff; border-color: var(--wx-green);
  box-shadow: 0 2px 8px rgba(7,193,96,.25);
}

/* 销控图栏电梯/步梯标签 */
.elevator-tag {
  display:inline-flex;align-items:center;gap:2px;padding:1px 8px;
  border-radius:10px;font-size:11px;font-weight:600;white-space:nowrap;
}
.elevator-tag.elev { background:#e8f5e9;color:#2e7d32;border:1px solid#a5d6a7; }
.elevator-tag.stairs { background:#fff3e0;color:#e65100;border:1px solid#ffcc80; }

.kv { display: grid; grid-template-columns: 72px 1fr; gap: 6px 10px; font-size: 13px; }
.kv .k { color: var(--text-2); }

/* ----- 客户资料：横向多列紧凑网格（一屏看清，纵向不再堆 14 行） ----- */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 4px 6px; margin: 8px 0 10px; font-size: 12px; line-height: 1.45;
}
.kv-grid .kvi {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  padding: 3px 7px; border-radius: 6px; background: #f7f8fa;
}
.kv-grid .kvi-k { color: var(--text-2); flex: 0 0 auto; }
.kv-grid .kvi-v {
  flex: 1 1 auto; min-width: 0; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kv-grid .kvi.empty .kvi-v { color: #c3c7cf; }
.kv-grid .kvi-wide { grid-column: 1 / -1; }
.kv-grid .kvi-wide .kvi-v { white-space: normal; word-break: break-word; }
.followup { border-left: 3px solid var(--wx-green); padding: 8px 10px; margin: 8px 0; background: #fafbfc; border-radius: 6px; }
.followup .fh { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.toolbtn { font-size: 12px; padding: 4px 8px; }
.hint { font-size: 12px; color: var(--text-2); line-height: 1.6; }

/* ---------- Electron 停靠栏（仅 Electron 窗口内出现） ---------- */
/* 右上角按钮：⚓ 贴边 / ⬇ 下侧（最小化到屏幕下方）/ ✕ 关闭；整条空白处可按住拖动窗口 */
body:has(.electron-bar) { display: flex; flex-direction: column; }
.electron-bar {
  position: sticky; top: 0; z-index: 2147483647; flex: 0 0 auto; height: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 0 6px 0 8px; background: var(--wx-green); color: #fff; font-size: 12px; user-select: none;
  -webkit-app-region: drag;             /* 整条空白处 = 拖动区（按住可移动窗口） */
}
.electron-bar .eb-drag {
  flex: 1 1 auto; min-width: 0; cursor: move; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; -webkit-app-region: drag;
}
.electron-bar .eb-actions { display: flex; gap: 4px; flex: 0 0 auto; -webkit-app-region: no-drag; }
.electron-bar .eb-actions button {
  height: 22px; padding: 0 8px; line-height: 1; font-size: 12px; white-space: nowrap;
  background: rgba(255,255,255,.18); color: #fff; border: none; border-radius: 6px;
  cursor: pointer; -webkit-app-region: no-drag;
}
.electron-bar .eb-actions button:hover { background: rgba(255,255,255,.34); }
.electron-bar .eb-actions button:active { background: rgba(0,0,0,.2); }
.electron-bar ~ .panel, .electron-bar ~ .split { height: auto; flex: 1 1 auto; min-height: 0; }

/* 标题行（📁 微信群分组 / 📊 CRM 工作栏 那一行）也是拖动区；按钮/输入框/账号栏照常可点 */
body.eb-on .panel-head { -webkit-app-region: drag; }
body.eb-on .panel-head button,
body.eb-on .panel-head input,
body.eb-on .panel-head select,
body.eb-on .panel-head a,
body.eb-on .panel-head .acc-bar { -webkit-app-region: no-drag; }

/* 登录窗（右栏未登录时显示）也能拖动 / 最小化 / 关闭 */
body.login-page:has(.electron-bar) { justify-content: flex-start; align-items: stretch; }
body.login-page:has(.electron-bar) .login-card { margin: auto; align-self: center; }

/* ---------- 左侧村→群树形结构 ---------- */
.village-tree { display: flex; flex-direction: column; gap: 2px; }
.vtree-node { margin-bottom: 2px; }
.vtree-village {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border); cursor: pointer; transition: .15s;
  user-select: none;
}
.vtree-village:hover { border-color: var(--wx-green); background: #f8fdfb; }
.vtree-village.active { border-color: var(--wx-green); background: #e8f8ef; }
.vtree-arrow { width: 14px; font-size: 10px; color: var(--text-2); text-align: center; flex-shrink: 0; }
.vtree-icon { font-size: 14px; flex-shrink: 0; }
.vtree-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtree-count { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #f0f1f3; color: var(--text-2); flex-shrink: 0; }
.vtree-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 拖拽排序 */
.vtree-node.sortable { transition: opacity .15s, transform .15s, box-shadow .15s; cursor: grab; }
.vtree-node.sortable * { user-select: none; }
.sort-drag-handle { cursor: grab; color: #aaa; font-size: 16px; flex-shrink: 0; margin-right: 2px; user-select: none; line-height: 1; padding: 0 2px; }
.sort-drag-handle:hover { color: var(--wx-green); }
.vtree-node.sortable { transition: opacity .15s, transform .15s, box-shadow .15s; }
.vtree-node.sortable.dragging { opacity: 0.4; transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 10; position: relative; }
.vtree-node.sortable.drag-over-before { border-top: 3px solid var(--wx-green); }
.vtree-node.sortable.drag-over-after { border-bottom: 3px solid var(--wx-green); }
.vtree-groups { padding: 4px 0 4px 28px; display: flex; flex-direction: column; gap: 4px; }
.vtree-group {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 10px; border-radius: 6px; background: #fafbfc; border: 1px solid transparent;
  transition: .15s; flex-wrap: wrap;
}
.vtree-group:hover { border-color: var(--wx-green); background: #fff; }
.vg-header { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: .15s; }
.vg-header:hover { background: #eef0f3; }
.vg-arrow { font-size: 10px; color: var(--text-2); width: 12px; text-align: center; flex-shrink: 0; }
.vg-name { font-size: 13px; font-weight: 500; flex: 1 1 auto; min-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-link { font-size: 11px; color: var(--wx-green-dark); flex-shrink: 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-stats-hint { font-size: 10px; color: #999; flex-shrink: 0; max-width: 0; overflow: hidden; transition: max-width .25s, opacity .2s; opacity: 0; white-space: nowrap; }
.vg-header:hover .vg-stats-hint { max-width: 280px; opacity: 1; color: #666; }
.vg-update-time { font-size: 11px; color: #888; flex-shrink: 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; padding-right: 4px; }
.vg-actions { display: flex; gap: 3px; flex-shrink: 0; }
.vg-actions button.sm { padding: 3px 7px; }
.vg-header { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: .15s; }
.vg-header:hover { background: #eef0f3; }
.vg-arrow { font-size: 10px; color: var(--text-2); width: 12px; text-align: center; flex-shrink: 0; }
.vg-apt-list { margin: 4px 0 6px 28px; border-left: 2px solid var(--border); padding-left: 8px; }
.vg-apt-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: .15s; }
.vg-apt-item:hover { background: #eef0f3; }
.vg-apt-icon { font-size: 13px; }
.vg-apt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-apt-rooms { font-size: 11px; color: var(--text-2); flex-shrink: 0; }
.vg-full-tag { font-size: 11px; color: #fff; background: #e53935; padding: 1px 7px; border-radius: 10px; flex-shrink: 0; font-weight: 600; letter-spacing: 0.5px; }
/* 村节点下「直接归属本村」的公寓块（公寓多选所属村后，除挂在群里之外也要能在每个村下面找到） */
.vtree-direct { padding: 2px 0 6px 28px; }
.vat-head { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2); padding: 2px 4px 4px; }
.vat-title { font-weight: 600; color: var(--wx-green-dark); flex-shrink: 0; }
.vat-hint { font-size: 10px; color: #aaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vat-list { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--border); padding-left: 8px; margin-left: 2px; }
.vtree-count-apt { font-size: 10px; color: var(--wx-green-dark); margin-left: 3px; }
.check-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.check-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: .15s; }
.check-item:hover { background: #eef0f3; }
.check-item input { cursor: pointer; }
.muted { color: var(--text-2); }
.vtree-empty { font-size: 12px; color: var(--text-2); padding: 6px 10px; }

/* ---------- 左侧：分组模式切换（📁 微信群分组 / 👤 房东分组） ---------- */
.tree-mode-toggle { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tm-btn {
  flex: 1; padding: 6px 8px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-2);
  transition: .15s; white-space: nowrap;
}
.tm-btn:hover { border-color: var(--wx-green); color: var(--wx-green); }
.tm-btn.active { background: var(--wx-green); border-color: var(--wx-green); color: #fff; }

/* ---------- 左侧：房东分组（房东 → 公寓 → 每间房房态） ---------- */
.tm-add { flex: 1 0 100%; background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.tm-add:hover { background: #eaffd6; border-color: var(--wx-green); color: var(--wx-green); }
.ll-phone { font-size: 10.5px; color: var(--text-2); margin-left: 5px; font-weight: 400; }
.ll-edit-btn {
  flex-shrink: 0; margin-left: 4px; padding: 0 6px; line-height: 18px; font-size: 12px;
  border: 1px solid var(--border); background: #fff; border-radius: 5px; cursor: pointer; color: var(--text-2);
}
.ll-edit-btn:hover { border-color: var(--wx-green); color: var(--wx-green); }
.ll-empty { font-size: 11.5px; color: var(--text-2); line-height: 1.7; padding: 6px 10px; }
.ll-tip {
  font-size: 11.5px; line-height: 1.7; color: #8a6d3b; background: #fffbe6;
  border: 1px solid #ffe58f; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
}
.ll-apt { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 2px; }
.ll-apt-head {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px;
  cursor: pointer; font-size: 12px; transition: .15s; flex-wrap: wrap;
}
.ll-apt-head:hover { background: #eef0f3; }
.ll-apt-stats { display: inline-flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.ll-st { font-size: 10px; padding: 0 5px; border-radius: 8px; border: 1px solid; background: #fff; line-height: 15px; flex-shrink: 0; }
.ll-open-btn { flex-shrink: 0; padding: 2px 8px !important; }
.ll-room-list {
  margin: 2px 0 6px 26px; border-left: 2px dashed var(--border); padding-left: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.ll-room { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 6px; border-radius: 5px; }
.ll-room:hover { background: #f6f7f9; }
.ll-room-no { font-weight: 600; min-width: 46px; }
.ll-room-layout { font-size: 11px; color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-room-st { font-size: 10.5px; padding: 0 6px; border-radius: 8px; border: 1px solid; background: #fff; line-height: 16px; flex-shrink: 0; }

/* ---------- 可搜索下拉框 ---------- */
.searchable-select { position: relative; }

/* ---------- 筛选折叠面板 ---------- */
.filter-panel { position: relative; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 5px 12px;
}
.filter-toggle:hover { border-color: var(--wx-green); color: var(--wx-green); }
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px;
  background: var(--wx-green); color: #fff; font-size: 10px; font-weight: 600;
}
.filter-body {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  background: #fafbfc; margin-top: 6px; animation: filterSlideIn .15s ease;
}
@keyframes filterSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.searchable-select .ss-display {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; min-height: 36px;
}
.searchable-select .ss-display:hover { border-color: var(--wx-green); }
.searchable-select .ss-arrow { font-size: 10px; color: var(--text-2); }
.searchable-select .ss-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-top: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1); max-height: 240px; overflow: hidden; flex-direction: column;
}
.searchable-select.open .ss-dropdown { display: flex; }
/* 下方空间不足（如弹窗里最后一个字段）时向上展开，否则选项列表会被 modal-body 裁掉 */
.searchable-select.drop-up .ss-dropdown { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
.searchable-select .ss-search { padding: 8px; border-bottom: 1px solid var(--border); }
.searchable-select .ss-search input { width: 100%; }
.searchable-select .ss-list { overflow-y: auto; max-height: 180px; }
.searchable-select .ss-option { padding: 8px 12px; cursor: pointer; font-size: 13px; }
.searchable-select .ss-option:hover { background: #f0f5f3; }
.searchable-select .ss-option.selected { background: #e8f8ef; color: var(--wx-green-dark); font-weight: 600; }
.searchable-select .ss-option.ss-create { color: var(--wx-green-dark); font-weight: 600; border-top: 1px solid var(--border); }
.searchable-select .ss-empty { padding: 12px; text-align: center; color: var(--text-2); font-size: 12px; }

/* ---------- 多选下拉（村筛选）：勾选项 + 显示框内 chips ---------- */
.searchable-select .ss-display .ss-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.searchable-select .ss-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: #e8f8ef; color: var(--wx-green-dark); border: 1px solid #bfe8d2;
  border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 600; line-height: 17px;
  max-width: 100%;
}
.searchable-select .ss-tag-x { cursor: pointer; color: #86a496; font-size: 12px; padding: 0 1px; }
.searchable-select .ss-tag-x:hover { color: #e04646; }
.searchable-select .ss-option.checked { background: #e8f8ef; color: var(--wx-green-dark); font-weight: 600; }
.searchable-select .ss-option.checked::before { content: '✓ '; font-weight: 700; }
.searchable-select .ss-option.ss-clear { border-top: 1px solid var(--border); color: var(--text-2); }
/* 多选下拉的占位文案（未选择时） */
.searchable-select .ss-display .ss-ph { color: var(--text-2); }
/* 房号表「配置」列：标签不换行、单元格不被撑高 */
table.grid td.room-tags-cell { white-space: nowrap; }
.searchable-select.vil-filter .ss-list { max-height: 210px; }

/* 销控图栏：hover 显示操作按钮 */
.fp-thumb-wrap:hover .fp-actions,
.floorplan-bar:hover .fp-actions {
  display: flex !important;
}
.fp-thumb-wrap #fpThumb:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transform: scale(1.05);
}

/* 公寓信息行下方的快捷条：📍 定位导航 + 🎬 指引视频/图片 */
.apt-quick-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 10px; padding: 6px 8px;
  background: #f7f9fc; border: 1px solid #e8edf3; border-radius: 8px;
}
.apt-qb-btn { position: relative; }
.apt-qb-btn.is-empty { color: #fa8c16; border-color: #ffd591; background: #fff7e6; }
.apt-qb-btn .aqb-badge {
  margin-left: 4px; font-size: 11px; line-height: 1; padding: 2px 5px;
  border-radius: 8px; background: #e6f4ff; color: #1677ff; font-weight: 600;
}
.apt-qb-thumbs { display: inline-flex; align-items: center; gap: 4px; }
.apt-qb-thumb {
  height: 34px; width: 34px; object-fit: cover; border-radius: 6px;
  border: 1px solid #e0e0e0; cursor: pointer; background: #fff;
}
.apt-qb-thumb:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.aqb-more {
  font-size: 11px; color: #888; background: #eef0f3; border-radius: 8px;
  padding: 1px 6px; align-self: center;
}

/* ---------- 媒体全屏预览层（手机端「保存相册」/ 指引图片视频） ----------
   纯 H5 不能把文件写进手机相册，唯一可靠路径 = 全屏显示 + 长按调起
   微信/系统原生的「保存到相册」菜单。规则放这里，桌面页/手机页共用。 */
/* 纵向流式布局：视频占中间自适应，按钮 + 提示依次排在底部，绝不重叠 */
.m-media-preview-mask {
  position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; display: none;
  flex-direction: column; align-items: stretch;
  padding: 14px; background: rgba(0,0,0,.92);
  height: 100dvh;                 /* 可见视口高度，保证底部按钮在屏内 */
  box-sizing: border-box;
}
.m-media-preview-mask.show { display: flex; }
/* 关闭按钮：以前这层只有「点空白处关闭」，而 .m-media-box 是 flex:1 几乎铺满整屏
   → 手机上根本点不到空白处，看完视频出不去。固定右上角 ✕ 常驻。 */
.m-media-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; z-index: 2;
  width: 40px; height: 40px; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; cursor: pointer;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.m-media-close:active { background: rgba(255,255,255,.34); }
.m-media-preview-mask .m-media-box {
  flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center;
}
.m-media-preview-mask video {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  border-radius: 8px; object-fit: contain; background: #000;
  -webkit-user-select: none; user-select: none;
  /* 长按不要弹出「复制/翻译」等系统菜单，避免挡住「保存到相册」 */
  -webkit-touch-callout: default;
}
.m-media-preview-mask img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px; object-fit: contain; background: #000;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: default;
}
.m-media-tip {
  flex: 0 0 auto; padding: 8px 4px 2px; color: #fff; font-size: 12.5px; line-height: 1.45; text-align: center;
}

/* 全屏预览里的操作按钮（一键保存=系统分享 / 用浏览器打开 / 下载文件） */
.m-media-actions {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 0 2px;
}
.m-media-action {
  padding: 10px 22px; font-size: 15px; font-weight: 600; line-height: 1.3;
  color: #fff; background: #07c160; border: none; border-radius: 22px;
  box-shadow: 0 3px 12px rgba(0,0,0,.45); white-space: nowrap; cursor: pointer;
}
.m-media-action.primary { font-size: 15px; font-weight: 700; padding: 11px 28px; }
.m-media-action.ghost {
  background: rgba(255,255,255,.94); color: #07c160;
  text-decoration: none; display: inline-block;
  font-size: 13px; padding: 8px 18px;
}
.m-media-action:active { background: #06ad56; }
.m-media-action.ghost:active { background: #e8f8ee; }

/* 微信内访问的一次性顶部提示条：视频存相册的正确路径 */
#wechatMediaTip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
  padding: 10px 14px; font-size: 13px; line-height: 1.5; color: #5c3b00;
  background: #fff7e6; border-bottom: 1px solid #ffd591;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* ---------- 房东销控（搜索房东 → 多选旗下公寓 → 合并生成销控表） ---------- */
.st-apt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-apt-chip {
  font-size: 12px; background: #eef6ff; color: #0a5eb0;
  border: 1px solid #cfe4fb; border-radius: 999px; padding: 2px 10px;
}
.ls-ll { border-bottom: 1px solid var(--border); }
.ls-ll:last-child { border-bottom: none; }
.ls-ll-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #f7f9fc; cursor: pointer; user-select: none;
}
.ls-ll-head:hover { background: #eef3fa; }
.ls-arrow { width: 14px; flex: none; text-align: center; font-size: 12px; color: #8a94a6; }
.ls-name { font-weight: 600; color: var(--text-1); }
.ls-meta { margin-left: auto; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ls-ll-chk, .ls-chk { width: 16px; height: 16px; flex: none; cursor: pointer; accent-color: #07c160; }
.ls-apts { padding: 2px 0 6px; }
.ls-apt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 32px; cursor: pointer; border-top: 1px dashed #f0f0f0;
}
.ls-apt:hover { background: #fafcff; }
.ls-apt.is-empty { opacity: .6; }
.ls-apt-name { color: var(--text-1); }
.ls-apt-meta { margin-left: auto; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ls-none { padding: 10px 32px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
#ls_list { -webkit-overflow-scrolling: touch; }

/* ---------- 销控表图片生成 ---------- */
#st_previewWrap {
  max-height: 55vh;
  background: #f5f6f8;
}
#st_previewWrap img {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.modal-footer a#st_download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
}

/* ---------- 客户「期望户型」多选芯片 ---------- */
.layout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  min-height: 38px;
  align-items: center;
}
.layout-chips .layout-chip {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  transition: .15s;
}
.layout-chips .layout-chip:hover { border-color: var(--wx-green); }
.layout-chips .layout-chip.active {
  background: #e8f8ef;
  border-color: var(--wx-green);
  color: var(--wx-green-dark);
  font-weight: 600;
}
.layout-chips .layout-empty {
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- 客户需求表单（两列表格布局） ---------- */
.modal .cust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.modal .cust-grid .field { margin-bottom: 12px; min-width: 0; }
.modal .cust-grid .field.full { grid-column: 1 / -1; }
.modal .cust-grid .field > label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.modal .cust-grid .grid-divider {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-2);
  margin: 2px 0 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.modal .cust-grid .layout-chips { padding: 6px 8px; min-height: 36px; gap: 5px; }
.modal .cust-grid .layout-chips .layout-chip { padding: 3px 9px; font-size: 12px; }
@media (max-width: 560px) {
  .modal .cust-grid { grid-template-columns: 1fr; }
}

/* ---------- 带看列表（原带看日历） ---------- */
.cal-page-title { font-size: 17px; margin: 0; font-weight: 700; }
.cal-label { font-size: 12px; color: var(--text-2); }
.cal-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cal-filter-bar input, .cal-filter-bar select { width: auto; }
.cal-time-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: #3d7eff;
  background: #f2f7ff; border: 1px solid #bcd6ff; border-radius: 8px;
  padding: 3px 10px; white-space: nowrap;
}
.cal-card { cursor: pointer; }
.cal-card .cus-head .tag.cal-status { flex: none; }
.cal-card .cus-head .tag.cal-transfer { flex: none; font-weight: 600; }
.cal-assign-line { font-size: 12px; color: var(--text-2); padding: 2px 0; }
.cal-assign-line b { color: var(--text); font-weight: 600; }
.cal-assign-line .cal-todo-text { color: #fa8c16; font-weight: 600; }
.cal-assign-line .cal-from-text { color: #7b52d1; }
.cal-metas { gap: 14px; }
.cal-meta { color: var(--text-2); }
.cal-meta b { color: var(--text); font-weight: 600; }
.cus-actions .btn-done {
  flex: 1; background: var(--wx-green); color: #fff; border: none;
  padding: 9px 12px; font-size: 14px; border-radius: 8px; font-weight: 500;
}
.cus-actions .btn-done:hover { background: var(--wx-green-dark); }
/* 右下角悬浮新增按钮 */
.fab {
  position: fixed; right: 20px; bottom: 62px; width: 52px; height: 52px;
  border-radius: 50%; background: #3d7eff; color: #fff; font-size: 26px;
  line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(61,126,255,.45); z-index: 60;
}
.fab:hover { background: #2f6ae6; }
/* 安排带看：房源勾选 */
.bw-room-list {
  max-height: 190px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; padding: 4px;
}
.bw-room-list:empty { display: none; }
.bw-room-item {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 8px; border-radius: 7px; font-size: 12px; user-select: none;
}
.bw-room-item:hover { background: #f6f8fb; }
.bw-room-item:active { background: #e8f0fb; }
.bw-room-tick {
  flex: none; width: 16px; height: 16px; border-radius: 4px;
  border: 1px solid #c9ced6; background: #fff; color: transparent;
  font-size: 11px; line-height: 15px; text-align: center;
}
.bw-room-item.on .bw-room-tick { background: var(--wx-green); border-color: var(--wx-green); color: #fff; }
.bw-room-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-room-meta { color: var(--text-2); white-space: nowrap; }
.bw-room-item .tag { margin-left: auto; flex: none; }
/* 新增带看：选客户 */
.cal-add-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.cal-add-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px;
}
.cal-add-item:last-child { border-bottom: none; }
.cal-add-item:hover { background: #f6f8fb; }
.cal-add-item:active { background: #e8f0fb; }
.cal-add-phone { margin-left: auto; font-size: 12px; }

/* ---------- 带看页 · 客户详情 ---------- */
.cal-appt-bar {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--text-2);
  background: #f5f8ff; border: 1px solid #dbe7ff; border-radius: 8px;
  padding: 8px 10px; margin: 10px 0 0;
}
.cal-appt-bar b { color: #2f6ae6; }
.fb-line { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; color: var(--text); }
.fb-line .fk { flex: none; color: var(--text-2); }

/* ---------- 完成带看：结果选择 + 表单 ---------- */
.res-title { text-align: center; font-size: 13px; color: var(--text-2); margin: 2px 0 12px; }
.cal-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cal-opt {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 10px;
  text-align: center; cursor: pointer; background: #f7f8fa; transition: .15s;
}
.cal-opt b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.cal-opt span { font-size: 12px; color: var(--text-2); }
.cal-opt:hover { border-color: #bcd6ff; }
.cal-opt:active { transform: scale(.985); }
.cal-opt.on { background: #eaf2ff; border-color: #3d7eff; box-shadow: 0 0 0 1px #3d7eff inset; }
.cal-opt.on b { color: #2f6ae6; }
.res-sub { font-size: 12px; color: var(--text-2); margin: 12px 0 8px; }
.room-fb-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  margin-bottom: 10px; background: #fafbfc;
}
.room-fb-head { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.room-fb-meta { font-size: 12px; color: var(--text-2); margin-bottom: 7px; }
.room-fb-card textarea { font-size: 12px; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- 成交订单（房源成交 + 分佣） ---------- */
/* 标签栏可横向滚动，容纳 4 个以上标签 */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; white-space: nowrap; }

/* 顶部四个统计卡 */
.deal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.deal-stat {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 10px; box-shadow: var(--shadow); min-width: 0;
  cursor: pointer; position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.deal-stat:hover { border-color: var(--wx-green); }
.deal-stat:active { transform: scale(.985); }
/* 选中态：点击统计卡联动下方列表 */
.deal-stat.on {
  border-color: var(--wx-green); background: #f2fcf6;
  box-shadow: 0 0 0 1px var(--wx-green) inset, var(--shadow);
}
.deal-stat.on::after {
  content: '✓'; position: absolute; top: 6px; right: 8px;
  font-size: 11px; font-weight: 700; color: var(--wx-green);
}
.deal-stat .ds-l { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-stat .ds-v { font-size: 16px; font-weight: 700; margin-top: 5px; }
.deal-stat .ds-v.warn { color: #d98200; }
.deal-stat .ds-v.ok { color: var(--wx-green-dark); }
/* 带看日历的 5 张汇总卡：宽栏一行 5 张，窄栏自动折行（3+2 / 2+2+1） */
#calStats.deal-stats { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
@media (max-width: 420px) {
  .deal-stats { grid-template-columns: repeat(2, 1fr); }
}
/* ===== 手机版 Web（云部署后手机浏览器 / 加到主屏幕访问） ===== */
@media (max-width: 480px) {
  .panel { height: 100vh; }
  .panel-head { gap: 6px; padding: 8px 10px; flex-wrap: wrap; }
  .panel-head h1 { font-size: 15px; }
  .panel-head .sub { display: none; }
  .panel-head .ghost.xs, .panel-head #rightRefreshBtn { padding: 4px 8px; font-size: 12px; }
  .panel-head .acc-bar { order: 5; width: 100%; margin: 0; max-width: none; text-align: left; }
  /* tabs 横向滚动，不挤压换行 */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 4px; padding-bottom: 2px; }
  .tabs .tab { flex: 0 0 auto; white-space: nowrap; font-size: 13px; padding: 6px 10px; }
  .tabs .tab .tab-dot { display: inline-block; }
  .row { flex-wrap: wrap; }
  .filter-row { gap: 4px; }
  .filter-row input, .filter-row select { flex: 1 1 120px; min-width: 0; }
  .cal-filter-bar { gap: 4px; }
  .cal-filter-bar input, .cal-filter-bar select { flex: 1 1 110px; min-width: 0; }
  .acc-wrap { flex-wrap: wrap; gap: 4px; }
  .acc-wrap .acc-filter { flex: 1 1 120px; min-width: 0; }
  .modal { padding: 14px; border-radius: 12px; }
  .modal .cust-grid .field { margin-bottom: 10px; }
  .cus-card, .cal-card, .deal-card { padding: 10px; }
  .deal-info { grid-template-columns: 1fr; }
  /* 客户/带看/成交卡片里的操作按钮在窄屏换行长按友好 */
  .cus-actions, .cal-actions, .deal-actions { flex-wrap: wrap; }
  .kv-grid { grid-template-columns: 1fr; }
  /* index.html 整合页：手机上左右两栏改为上下堆叠、各自可滚动 */
  .split { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
  .split-resizer { display: none; }
  .split > .side { flex: 1 1 50%; min-height: 0; width: 100%; max-width: 100%; border-right: none; border-bottom: 1px solid var(--border); overflow: hidden; }
  .split > .side .panel { height: 100%; }
  /* 左侧微信群分组树手机适配 */
  .village-tree .vg-row { flex-wrap: wrap; }
  .village-tree .vg-actions { flex-wrap: wrap; }
  .side .row { flex-wrap: wrap; }
  .village-tree .vg-search input { flex: 1 1 100%; }
}

/* ============ 手机版独立页 mobile.html（底部 Tab 导航，每个板块一个整屏页） ============ */
.m-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); }
.m-page { display: none; flex-direction: column; min-height: 0; height: 100%; }
.m-page.show { display: flex; }
.m-head { flex: none; padding: 13px 14px; font-size: 16px; font-weight: 700; background: var(--wx-green); color: #fff; position: sticky; top: 0; z-index: 5; }
.m-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 20px; }
.m-bar { display: flex; gap: 6px; margin-bottom: 10px; align-items: center; }
.m-bar input { flex: 1; min-width: 0; }
.m-tabbar { flex: none; display: flex; border-top: 1px solid var(--border); background: #fff; padding-bottom: env(safe-area-inset-bottom); }
.m-tabbar button {
  flex: 1; border: none; background: none; padding: 7px 0 6px; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-2); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.m-tabbar button span:not(.m-ico) { line-height: 1; }
.m-tabbar button.active { color: var(--wx-green); font-weight: 700; }
.m-ico { font-size: 20px; line-height: 1.1; }
/* 租房页底部「更新时间」状态条（联动当前公寓） */
.m-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--panel); }
.m-foot .footer-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* 悬浮新增按钮上移，避开底部 Tab 栏 */
.m-page .fab { position: fixed; right: 14px; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 20; }
@media (max-width: 480px) {
  /* mobile.html 隐藏桌面顶部 tab 条（已用底部导航替代） */
  .m-app .tabs { display: none !important; }
  /* 带看/需求/成交汇总卡在手机窄栏排成整齐一行（带看含「待接单」共 6 张） */
  #calStats.deal-stats { grid-template-columns: repeat(6, 1fr); }
  #demandStats.deal-stats, #dealStats.deal-stats { grid-template-columns: repeat(5, 1fr); }
  #calStats .deal-stat .ds-l, #demandStats .deal-stat .ds-l, #dealStats .deal-stat .ds-l { font-size: 10px; }
  #calStats .deal-stat .ds-v, #demandStats .deal-stat .ds-v, #dealStats .deal-stat .ds-v { font-size: 15px; }
  /* 待接单汇总卡高亮（区别于其他统计卡） */
  .deal-stat.todo { background: #fff7e6; border-color: #ffd591; }
  .deal-stat.todo.on { background: #fff1d6; border-color: #fa8c16; box-shadow: 0 0 0 1px #fa8c16 inset, var(--shadow); }
  .deal-stat.todo .ds-v { color: #fa8c16; }
  /* 带看卡片里的「负责账号 / 待接单 / 实际带看人」行 */
  .cal-assign-line { font-size: 12px; color: var(--text-2); padding: 2px 0; }
  .cal-assign-line b { color: var(--text-1); }
  .cal-todo-text { color: #fa8c16; font-weight: 600; }
}

/* 成交卡片 */
.deal-card .deal-title { font-size: 15px; }
.deal-head-right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.deal-head-status { flex: none; }
/* 成交时间（年月日） */
.deal-dealdate { font-size: 12px; color: var(--text-2); white-space: nowrap; }
/* 行2：客户微信名（点击复制）+ 客户名 */
.deal-wx {
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; white-space: nowrap;
}
.deal-wx .copy-ico { font-style: normal; font-size: 12px; margin-left: 4px; opacity: .35; }
.deal-wx:hover .copy-ico, .deal-wx.copied .copy-ico { opacity: 1; }
.deal-wx.copied { color: var(--wx-green); }
/* 业务员成交备注：客户订单的特殊注意事项（押金付法 / 起租日 / 特殊要求…）
   —— 成交订单卡片整行 + 分佣详情「订单信息」下方整块，网页 / 电脑端 / 手机端统一展示 */
.deal-note-line {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 8px;
  padding: 6px 9px; border-radius: 8px;
  background: #fffaf0; border: 1px solid #f0d9a8;
  font-size: 12px; line-height: 1.6;
}
.deal-note-line .k { flex: 0 0 auto; color: #b8770a; font-weight: 600; }
.deal-note-line .v {
  flex: 1 1 auto; min-width: 0; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.deal-note-block {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 4px;
  padding: 8px 11px; border-radius: 9px;
  background: #fffaf0; border: 1px solid #f0d9a8;
  font-size: 13px; line-height: 1.65;
}
.deal-note-block .k { flex: 0 0 auto; color: #b8770a; font-weight: 600; }
.deal-note-block .v {
  flex: 1 1 auto; min-width: 0; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.deal-note-block.empty .v { color: var(--text-2); font-weight: 400; }
@media (max-width: 560px) {
  .deal-note-line, .deal-note-block { flex-direction: column; gap: 2px; }
}
.deal-hint {
  font-size: 12px; color: var(--text-2); line-height: 1.6;
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.req { color: var(--danger); }

/* 分佣详情弹窗 */
.deal-split-head { margin-bottom: 6px; }
.deal-split-head .dsh-title { font-size: 17px; font-weight: 700; }
.deal-split-head .dsh-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.deal-split-head .dsh-acts { display: flex; gap: 8px; margin-top: 8px; }
.deal-sec {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 16px 0 8px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.deal-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; padding: 10px;
}
.deal-info-l { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.deal-kv { font-size: 12px; }
.deal-kv .k { color: var(--text-2); display: block; margin-bottom: 3px; }
.deal-kv .v { color: var(--text); font-size: 13px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.deal-kv .v b { color: #d98200; }
.deal-info-r {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.deal-room-name { font-size: 14px; font-weight: 700; }
.deal-room-sub { font-size: 12px; color: var(--text-2); line-height: 1.5; word-break: break-word; }
/* 「订单房源」卡片：可点击 → 跳租房数据库该房源（hover 反馈 + 提示） */
.deal-room-card { display: flex; flex-direction: column; gap: 4px; border-radius: 6px; }
.deal-room-card.clickable { cursor: pointer; padding: 5px 7px; margin: -5px -7px 0; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.deal-room-card.clickable:hover { background: #f0f7ff; border-color: #cfe2ff; }
.deal-room-card.clickable:active { background: #e6f0ff; }
.deal-room-card.clickable:focus-visible { outline: 2px solid #3d7eff; outline-offset: 1px; }
.deal-room-go { font-size: 11px; color: #3d7eff; font-weight: 600; margin-top: 2px; }
/* 该公寓销控图 + 销控备注说明（与公寓档案 floorplan_image / sales_note 关联） */
.deal-aptfp { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 5px; }
.deal-aptfp .daf-head { font-size: 12px; font-weight: 600; color: var(--text); }
.deal-aptfp .daf-head .daf-apt { font-weight: 400; font-size: 11px; margin-left: 4px; }
.deal-aptfp .daf-stats { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.deal-aptfp .daf-fp-img { max-width: 100%; max-height: 150px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; cursor: zoom-in; background: #f7f7f8; display: block; }
.deal-aptfp .daf-empty { font-size: 11px; padding: 6px 2px; }
.deal-aptfp .daf-note { font-size: 12px; line-height: 1.5; background: #fffaf0; border: 1px solid #f0d9a8; border-radius: 6px; padding: 5px 7px; }
.deal-aptfp .daf-note .k { display: block; color: #b8770a; font-weight: 600; font-size: 11px; margin-bottom: 2px; }
.deal-aptfp .daf-note .v { color: var(--text); word-break: break-word; }
/* 从成交订单跳转后：高亮目标房号所在行 */
tr.deal-jump-hl td { background: #fff7e6 !important; box-shadow: inset 0 0 0 2px #f0b429; }
/* 分佣详情销控图轻量大图灯箱（独立于 #modalMask，关闭后仍停在成交详情） */
.deal-fp-lightbox {
  position: fixed; inset: 0; z-index: 3000; display: none;
  align-items: center; justify-content: center; background: rgba(0,0,0,.82); padding: 14px;
  cursor: zoom-out;
}
.deal-fp-lightbox.show { display: flex; }
.deal-fp-lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
@media (max-width: 560px) {
  .deal-info { grid-template-columns: 1fr; }
}

/* 房东结佣回馈（分佣详情 / 后台成交明细里展示房东端填写与上传的内容） */
.llfb-tip { font-size: 11px; font-weight: 400; color: var(--text-2); margin-left: 6px; }
.llfb-empty {
  font-size: 12px; color: var(--text-2); padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: 9px; background: #fafbfc;
}
.llfb {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  border: 1px solid #cdebd8; background: #f7fbf8; border-radius: 10px; padding: 9px 12px;
}
.llfb-row { font-size: 12px; display: flex; align-items: baseline; gap: 6px; }
.llfb-row .k { color: var(--text-2); }
.llfb-row .v { color: var(--text); font-weight: 600; }
.llfb-row .v.comm { color: #0a8a4c; font-size: 15px; }
.llfb-note {
  font-size: 12px; color: #8a6d00; background: #fffbe6; border-radius: 8px;
  padding: 7px 9px; margin-top: 8px; white-space: pre-wrap; word-break: break-word;
}
.cus-chip.llfb-chip { border-color: #cdebd8; color: #0a8a4c; background: #e8f8ef; font-weight: 600; }

/* 佣金分配表 */
.deal-table {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff;
}
.deal-tr {
  display: grid; grid-template-columns: 1.6fr 0.7fr 0.9fr; gap: 8px;
  align-items: center; padding: 9px 12px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.deal-tr:last-child { border-bottom: none; }
.deal-tr.deal-th { background: #f7f8fa; font-size: 12px; color: var(--text-2); font-weight: 600; }
.deal-party { min-width: 0; word-break: break-word; }
.deal-party-sub { display: block; font-style: normal; font-size: 11px; color: var(--text-2); margin-top: 1px; }
.deal-amt { text-align: right; font-weight: 600; }
.deal-tr.deal-total { background: #f7f8fa; font-weight: 700; }
.deal-tr.deal-total .deal-amt { color: #2f6ae6; }
.deal-rule {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; margin-top: 8px;
}

/* 签约与结佣 */
.deal-status-box { border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; padding: 4px 10px; }
.deal-st-row {
  display: grid; grid-template-columns: 70px auto 1fr; gap: 8px;
  align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.deal-st-row:last-child { border-bottom: none; }
.deal-st-row .k { font-size: 13px; color: var(--text); }
.deal-st-row .tag { margin: 0; flex: none; justify-self: start; }
.deal-st-row input { justify-self: end; width: 140px; font-size: 12px; padding: 5px 8px; }
.deal-close-btn { width: 100%; margin-top: 16px; padding: 10px; font-size: 14px; }
.modal-footer.deal-footer { justify-content: stretch; }
.modal-footer.deal-footer .deal-mark-btn { flex: 1; font-size: 13px; padding: 9px 6px; min-width: 0; }
button.deal-btn-purple { background: #a173e8; color: #fff; }
button.deal-btn-purple:hover { background: #8f5fdd; }
/* 签约与结佣：状态可手动下拉修改（误点标记按钮后可改回来） */
.deal-st-row .deal-st-sel {
  justify-self: start; width: 108px; margin: 0; flex: none;
  font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: #f0f1f3; color: var(--text-2);
  cursor: pointer; text-align: center;
}
.deal-st-row .deal-st-sel.st-green { background: #eafaf0; color: #14874c; border-color: #b6e5c9; }
.deal-st-row .deal-st-sel.st-orange { background: #fff4e5; color: #d98200; border-color: #f2d9b0; }
.deal-st-hint { font-size: 11px; color: var(--text-2); line-height: 1.6; margin-top: 7px; }
button.deal-save-status { width: 100%; margin-top: 8px; padding: 9px; font-size: 13px; }
@media (max-width: 560px) {
  .deal-st-row { grid-template-columns: 68px 1fr; row-gap: 6px; }
  .deal-st-row .deal-st-sel { grid-column: 2; }
  .deal-st-row input { grid-column: 2; justify-self: stretch; width: auto; }
}

/* ============ 完成带看 · 成交截图（粘贴 / 上传） ============ */
#resShotBox { margin-top: 14px; }
.shot-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.shot-head .shot-label { font-size: 13px; font-weight: 600; color: var(--text); }
.shot-head .shot-count { font-size: 12px; color: var(--text-2); margin-left: auto; }
.shot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.shot-thumb {
  position: relative; width: 76px; height: 76px; flex: none;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff;
}
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot-thumb .shot-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; line-height: 18px; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.shot-thumb:hover .shot-del { opacity: 1; }
.shot-add {
  width: 76px; height: 76px; flex: none; cursor: pointer;
  border: 1px dashed #c8ccd4; border-radius: 8px; background: #fafbfc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: all .15s;
}
.shot-add:hover { border-color: var(--wx-green); background: #f2fbf6; }
.shot-add-ico { font-size: 20px; color: #9aa0aa; line-height: 1; }
.shot-add-txt { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.shot-tip { margin-top: 6px; font-size: 11px; color: var(--text-2); }
.shot-tip b { color: var(--wx-green-dark); }
.shot-grid.readonly { margin-bottom: 4px; }

/* 截图大图预览（独立遮罩，不干扰已打开的弹窗） */
.shot-preview-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  cursor: zoom-out;
}
.shot-preview-mask img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,.5); }

/* ============ 客户需求订阅（按需求自动匹配 + 每日新匹配红点） ============ */
/* 标签栏红点 */
.tab .tab-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; vertical-align: 2px;
  box-shadow: 0 0 0 2px var(--panel);
  animation: demandPulse 1.8s ease-in-out infinite;
}
@keyframes demandPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.demand-card { cursor: pointer; }
.demand-card.has-new { border-left: 3px solid var(--danger); }
.demand-card .demand-new {
  font-size: 12px; font-weight: 700; color: #e04646;
  background: #ffeced; border: 1px solid #ffc9cb; border-radius: 10px;
  padding: 1px 8px; white-space: nowrap;
}
.demand-card .cus-actions { flex-wrap: wrap; gap: 8px; }
.demand-card .cus-actions .btn-blue { flex: 1 1 120px; }
.demand-card .cus-actions .btn-edit { flex: 1 1 72px; }
.demand-card .cus-actions .ghost { flex: 0 0 auto; }
.demand-card .cus-actions .demand-refresh-btn {
  flex: 0 0 auto; font-size: 13px; white-space: nowrap;
  border-color: #c7d8f5; color: #2f6ae6; background: #f4f8ff;
}
.demand-card .cus-actions .demand-refresh-btn:hover { background: #e8f0ff; border-color: #9dbdf0; }
.demand-card .cus-actions .demand-refresh-btn:disabled { opacity: .65; cursor: default; }
.demand-empty-box {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  background: #fffaf3; border: 1px dashed #f0d9b5; border-radius: 8px; padding: 8px 10px;
}
.demand-empty-box .de-title { font-weight: 700; color: #b06a12; margin-bottom: 3px; font-size: 13px; }
.demand-empty-box .de-cond { color: var(--text); margin-bottom: 4px; word-break: break-all; }
.demand-empty-box .de-hint { color: var(--text-2); }
.demand-body { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.demand-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.demand-table-wrap table.grid th { position: sticky; top: 0; background: #f7f8fa; z-index: 1; }
.demand-row-new { background: #fffafa; }
.demand-row-new td:first-child { font-weight: 700; color: #e04646; }
.demand-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); vertical-align: middle; margin-left: 3px;
  box-shadow: 0 0 0 2px #ffecec;
}
.demand-tip { font-size: 12px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.demand-tip b { color: #e04646; }
.cus-chip.vil { border-color: #bfe8d2; color: var(--wx-green-dark); background: #f6fdf9; }
/* 卡片内「配置区域」折叠块（订阅村标签，默认收起） */
.demand-conds { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd; }
.demand-conds .dc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 9px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none;
}
.demand-conds .dc-head:hover { color: var(--wx-green-dark); }
.demand-conds .dc-title { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.demand-conds .dc-title b { color: var(--wx-green-dark); font-weight: 700; margin: 0 1px; }
.demand-conds .dc-arrow { font-size: 11px; opacity: .85; flex: 0 0 auto; }
.demand-conds .dc-body {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 9px 9px; border-top: 1px dashed var(--border);
}
.demand-form-tip {
  font-size: 12px; color: var(--text-2); line-height: 1.6;
  background: #f7f9fc; border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px;
}

/* ===== 已配房源：按公寓分组（默认折叠成一行）+ 折叠销控图 + 跳转公寓房态 ===== */
.mag-sec-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mag-sec-title .mag-sec-cnt { font-weight: 400; font-size: 11px; }
.mag-sec-title .ghost.xs { margin-left: auto; flex: 0 0 auto; }
.mag-block {
  margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #fff;
}
/* 收起态：一行摘要（公寓名 · 房号 · 价格 · 房态 · 间数 · 跳转） */
.mag-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; background: #f6f8fb;
  cursor: pointer; user-select: none;
}
.mag-head:hover { background: #eef3f9; }
.mag-block.open .mag-head { background: #edf4ff; border-bottom: 1px solid var(--border); }
.mag-head .mh-arrow { flex: 0 0 auto; font-size: 9px; color: var(--text-2); width: 10px; }
.mag-head .mh-name {
  flex: 1 1 auto; min-width: 30px; font-size: 12px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mag-head .mh-name b { color: var(--wx-green-dark); }
.mag-head .mh-nos {
  flex: 0 1 auto; min-width: 0; font-size: 11px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px;
}
.mag-head .mh-price { flex: 0 0 auto; font-size: 11px; color: #d97706; }
.mag-head .mh-st { flex: 0 0 auto; display: inline-flex; gap: 3px; align-items: center; }
.mag-head .mh-cnt { flex: 0 0 auto; font-size: 11px; }
.mag-head .ghost.xs { flex: 0 0 auto; white-space: nowrap; }
.mag-body { border-top: 0; }
.mag-block.open .mag-body { border-top: 0; }
.mag-fp { border-top: 1px dashed var(--border); }
.mag-fp-head {
  display: flex; align-items: center; gap: 6px; padding: 5px 9px;
  font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none;
}
.mag-fp-head:hover { color: var(--wx-green-dark); }
.mag-fp-title { font-weight: 600; flex: 0 0 auto; }
.mag-fp-hint { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mag-fp-body { padding: 8px 9px 9px; }
.mag-fp-stats { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; }
.mag-fp-img {
  display: block; width: 100%; max-height: 260px; object-fit: contain;
  border: 1px solid var(--border); border-radius: 6px; background: #fafafa; cursor: zoom-in;
}

/* 从「客户配房」跳去公寓房态时的返回条 */
.rental-return-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  padding: 6px 9px; background: #fff7e6; border: 1px solid #ffe0a3; border-radius: 8px;
}

/* 租房数据库：公寓名可点击 → 跳该公寓房态页（鼠标停留 title 显示最新更新时间） */
#rentalBody td .apt-link { color: #0958d9; cursor: pointer; border-bottom: 1px dashed rgba(9,88,217,.45); white-space: nowrap; }
#rentalBody td .apt-link:hover { color: #0747a6; border-bottom-style: solid; }
#rentalBody td .apt-link::after { content: ' ›'; font-weight: 700; opacity: .8; }

/* 顶栏当前账号标识 */
.acc-bar { margin-left: auto; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; cursor: pointer; }
.acc-bar:hover { color: #07c160; text-decoration: underline; }
/* 弹窗内错误/提示文字（login.html 里另有一套同名的局部样式） */
.login-msg { display: block; color: #fa5151; font-size: 12px; min-height: 16px; margin-top: 4px; }
.acc-row-btns { display: flex; gap: 5px; align-items: center; flex: none; }

/* 账号管理弹窗 */
.acc-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 9000; }
.acc-card { width: 350px; max-width: 92vw; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.acc-card .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.acc-card .modal-body { padding: 12px 14px; max-height: 70vh; overflow: auto; }
.acc-list { display: flex; flex-direction: column; gap: 6px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.acc-row .role { font-size: 11px; color: #8a8f99; }
.acc-new { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.acc-new input, .acc-new select { padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 13px; }
.acc-new h4 { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }

/* 通用输入对话框（替代 Electron 不支持的 window.prompt） */
.input-dlg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 10000; }
.input-dlg { width: 340px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.input-dlg-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.input-dlg-hint { font-size: 12px; color: #8a8f99; margin-bottom: 8px; word-break: break-all; }
.input-dlg input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 13px; }
.input-dlg-msg { min-height: 16px; margin-top: 6px; font-size: 12px; color: #e04646; }
.input-dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ===== 楼栋定位 / 楼栋指引（新建·编辑公寓） ===== */
.apt-loc-row { display: flex; gap: 6px; align-items: center; }
.apt-loc-row input { flex: 1; padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 13px; background: #fff; color: var(--text-1); }
.apt-guide-tools { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.apt-guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 2px; }
.apt-guide-item { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #f7f7f8; }
.apt-guide-item img, .apt-guide-item video { display: block; width: 100%; height: 84px; object-fit: cover; background: #000; }
.apt-guide-item .agi-name { font-size: 11px; color: var(--text-2); padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-guide-item .agi-ops { position: absolute; top: 3px; right: 3px; display: flex; gap: 3px; }
.apt-guide-item .agi-ops button { border: none; border-radius: 5px; padding: 1px 6px; font-size: 12px; line-height: 1.4; cursor: pointer; background: rgba(0,0,0,.55); color: #fff; }
.apt-guide-item .agi-ops .agi-send { background: #07c160; }
.apt-guide-empty { grid-column: 1 / -1; color: var(--text-2); font-size: 12px; padding: 6px 0; }
.apt-guide-sec { margin-bottom: 14px; }
.apt-guide-sec:last-child { margin-bottom: 0; }
.ags-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-1); }

/* ===== 楼栋定位：搜索定位 + 地图手动选点 ===== */
.apt-loc-results { margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; max-height: 190px; overflow: auto; background: #fff; }
.apt-loc-results .alr-item { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--border); }
.apt-loc-results .alr-item:last-child { border-bottom: none; }
.apt-loc-results .alr-item:hover { background: #f2f8ff; }
.alr-name { font-size: 13px; color: var(--text); }
.alr-addr { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.alr-empty { padding: 9px 10px; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.alr-keyrow { display: flex; gap: 6px; padding: 0 10px 8px; }
.alr-keyrow input { flex: 1; padding: 7px 9px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 12px; }
.apt-map-wrap { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.apt-map { height: 280px; width: 100%; background: #eaeaea; }
.apt-map-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fafbfc; border-top: 1px solid var(--border); }
.apt-map-bar #m_aLocMapTip { flex: 1 1 auto; min-width: 0; font-size: 11px; }
.apt-loc-pin { background: transparent; border: none; }
.apt-loc-pin-dot { width: 14px; height: 14px; border-radius: 50%; background: #fa5151; border: 3px solid #fff; box-shadow: 0 0 6px rgba(0,0,0,.45); }

/* ===== 权限不足提示框（配房/上传/修改/编辑 被禁用时） ===== */
.perm-lockbox {
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px dashed #d0d4da;
  background: #f6f7f9;
  border-radius: 10px;
  color: #8a909a;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-lockbox i { font-style: normal; color: #aab0ba; font-size: 12px; }

