/* ===================================================================
   公众号 H5 · 销售工作台
   对标竞品 web.huokexitong.com 的移动端：浅灰底、白卡、细分割线、
   标签小字 / 数值大字。只在 #/wx/* 里生效，不影响后台。
   =================================================================== */

.wx-app {
  min-height: 100vh;
  background: #f2f3f5;
  color: #1d2129;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---- 顶部导航 ---- */
.wx-nav {
  position: sticky; top: 0; z-index: 30;
  height: 46px; display: flex; align-items: center;
  background: #fff; border-bottom: 1px solid #ededed;
  padding: 0 6px;
}
.wx-nav-b {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; color: #1d2129; text-decoration: none;
  padding-bottom: 4px;
}
.wx-nav-t { flex: 1; text-align: center; font-size: 16px; font-weight: 500; }
.wx-nav-r { width: 40px; text-align: center; color: #4e5969; letter-spacing: 1px; }

.wx-body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

/* ---- 页头：销售工作台 / 标题 / 微信用户 ---- */
.wx-head { padding: 16px 14px 0; }
.wx-crumb { font-size: 12.5px; color: #86909c; letter-spacing: .3px; }
.wx-head h1 {
  margin: 5px 0 4px; font-size: 25px; font-weight: 700; letter-spacing: .5px; color: #1d2129;
}
.wx-who {
  font-size: 13px; color: #86909c; display: flex; align-items: center; gap: 8px;
}
.wx-who-a { color: #1677ff; font-size: 12.5px; cursor: pointer; }

.wx-scope {
  display: inline-flex; margin-top: 12px; background: #e8eaed; border-radius: 16px; padding: 3px;
}
.wx-scope span {
  padding: 5px 16px; border-radius: 14px; font-size: 13px; color: #4e5969; cursor: pointer;
  transition: all .18s;
}
.wx-scope span.on { background: #fff; color: #1677ff; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---- 九宫格 ---- */
.wx-grid {
  margin: 14px 14px 0; background: #fff; border-radius: 8px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.wx-grid.three { grid-template-columns: repeat(3, 1fr); }
.wx-cell {
  padding: 15px 12px 14px;
  border-right: 1px solid #f0f1f3;
  border-bottom: 1px solid #f0f1f3;
  min-width: 0;
}
.wx-cell:nth-child(3n) { border-right: none; }
.wx-cell.wide2 { grid-column: span 2; }
.wx-cell .k { font-size: 12.5px; color: #86909c; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-cell .v {
  margin-top: 5px; font-size: 23px; font-weight: 700; color: #1d2129;
  line-height: 1.15; letter-spacing: -.3px;
}
.wx-cell .v.small { font-size: 19px; }
.wx-cell .v.green { color: #0e9f6e; }
.wx-cell .v.hot { color: #e02e2e; }
.wx-cell .sub { margin-top: 3px; font-size: 11.5px; color: #a0a6b0; }

/* ---- 筛选区 ---- */
.wx-filter { margin: 16px 14px 0; }
.wx-flabel { font-size: 13px; color: #4e5969; margin: 14px 0 8px; }

.wx-dates { display: flex; align-items: center; gap: 8px; }
.wx-dates > b { color: #c0c6cf; font-weight: 400; flex: none; }
.wx-date {
  flex: 1; min-width: 0; position: relative;
  height: 42px; background: #fff; border: 1px solid #e5e6eb; border-radius: 6px;
  display: flex; align-items: center; padding: 0 10px; gap: 6px;
  overflow: hidden;
}
.wx-date i { font-style: normal; color: #a0a6b0; font-size: 14px; flex: none; }
.wx-date input[type="date"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; background: transparent;
  font-size: 15px; padding: 0 8px 0 26px;
  color: #1d2129; text-align: center; font-family: inherit;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
/* 空值时不显示浏览器自带的「年/月/日」，只显示我们自己的占位字 */
.wx-date input[type="date"]:not(.filled) { color: transparent; }
.wx-date input[type="date"]::-webkit-datetime-edit { padding: 0; }
.wx-date input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.wx-date span {
  position: absolute; left: 30px; right: 10px;
  font-size: 14px; color: #a9aeb8; text-align: center;
  pointer-events: none; white-space: nowrap;
}

.wx-sel { margin-top: 10px; position: relative; }
.wx-sel::after {
  content: ''; position: absolute; right: 15px; top: 50%;
  width: 7px; height: 7px; border-right: 1.5px solid #c0c6cf; border-bottom: 1.5px solid #c0c6cf;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.wx-sel select {
  width: 100%; height: 44px; border: 1px solid #e5e6eb; border-radius: 6px;
  background: #fff; padding: 0 34px 0 14px; font-size: 15px; color: #1d2129;
  -webkit-appearance: none; appearance: none;
  font-family: inherit;
}
.wx-sel select:invalid, .wx-sel select option[value=""] { color: #a9aeb8; }
.wx-sel select option { color: #1d2129; }

.wx-input { margin-top: 10px; }
.wx-input input {
  width: 100%; height: 44px; border: 1px solid #e5e6eb; border-radius: 6px;
  background: #fff; padding: 0 14px; font-size: 16px; color: #1d2129;
  font-family: inherit;
}
.wx-input input::placeholder { color: #a9aeb8; font-size: 15px; }

.wx-btn {
  width: 100%; height: 44px; margin-top: 12px;
  border: 1px solid #e5e6eb; border-radius: 6px; background: #fff;
  font-size: 16px; color: #1d2129; font-family: inherit;
  cursor: pointer; transition: opacity .15s;
}
.wx-btn:active { opacity: .75; }
.wx-btn.primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.wx-btn.big { height: 48px; font-size: 16.5px; }
.wx-btn.primary.big { margin-top: 18px; }

/* ---- 结果条 ---- */
.wx-result-bar {
  margin: 20px 14px 0; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: #86909c;
}
.wx-result-bar b { color: #1d2129; font-size: 15px; }
.wx-result-bar a { color: #1677ff; cursor: pointer; }

/* ---- 线索卡片 ---- */
.wx-list { margin: 10px 14px 0; }
.wx-card {
  background: #fff; border-radius: 8px; padding: 13px 14px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  cursor: pointer; transition: transform .12s;
}
.wx-card:active { transform: scale(.99); }
.wx-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wx-card-h b { font-size: 16px; font-weight: 600; color: #1d2129; }
.wx-card-r {
  margin-top: 6px; font-size: 13px; color: #86909c;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.wx-card-r .dot { color: #d6dae1; }
.wx-card-f {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid #f4f5f7;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: #a0a6b0;
}
.wx-card-f .mut { margin-right: auto; }

.wx-tag {
  display: inline-block; flex: none; padding: 2px 8px; border-radius: 4px;
  font-size: 11.5px; line-height: 1.5; font-weight: 500;
  background: #f2f3f5; color: #4e5969;
}
.wx-tag.sm { padding: 1px 6px; font-size: 11px; }
.wx-tag.blue { background: #e8f3ff; color: #1677ff; }
.wx-tag.green { background: #e8f8f1; color: #0e9f6e; }
.wx-tag.amber { background: #fff4e6; color: #d25f00; }
.wx-tag.gray { background: #f2f3f5; color: #4e5969; }

/* ---- 空状态 ---- */
.wx-empty { padding: 44px 20px 30px; text-align: center; }
.wx-empty p { color: #a0a6b0; font-size: 14px; margin: 8px 0 10px; }
.wx-empty a { color: #1677ff; font-size: 13.5px; cursor: pointer; }

/* ---- 底部分页 ---- */
.wx-pager {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: 50px; display: flex; align-items: center; justify-content: center; gap: 40px;
  background: #fff; border-top: 1px solid #ededed;
  padding-bottom: env(safe-area-inset-bottom);
  font-size: 13px; color: #86909c;
}
.wx-pager a { font-size: 22px; color: #1d2129; cursor: pointer; padding: 0 14px; line-height: 1; }
.wx-pager a.dis { color: #d6dae1; }

/* ---- 详情页 ---- */
.wx-hero { margin: 14px; background: #fff; border-radius: 10px; padding: 16px; }
.wx-hero.me { display: flex; align-items: center; gap: 13px; }
.wx-hero-t { display: flex; align-items: center; gap: 9px; }
.wx-hero-t b { font-size: 20px; font-weight: 700; }
.wx-hero-p { margin-top: 7px; font-size: 16px; color: #1d2129; letter-spacing: .3px; }
.wx-hero-p .mut { font-size: 13px; color: #86909c; margin-left: 8px; }
.wx-acts { display: flex; gap: 8px; margin-top: 14px; }
.wx-acts > a, .wx-acts > div {
  flex: 1; height: 58px; border-radius: 8px; background: #f7f8fa;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #1677ff; font-size: 12px; text-decoration: none; cursor: pointer;
}
.wx-acts > a { background: #e8f3ff; }
.wx-acts svg { display: block; }

.wx-block { margin: 12px 14px 0; background: #fff; border-radius: 10px; padding: 5px 14px 14px; }
.wx-block-t {
  font-size: 14px; font-weight: 600; color: #1d2129;
  padding: 12px 0 10px; border-bottom: 1px solid #f4f5f7; margin-bottom: 4px;
}
.wx-block-t i { font-style: normal; color: #a0a6b0; font-weight: 400; font-size: 12.5px; }
.wx-kv {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid #f7f8fa;
}
.wx-kv:last-child { border-bottom: none; }
.wx-kv > span { color: #86909c; flex: none; }
.wx-kv > b { font-weight: 500; color: #1d2129; text-align: right; word-break: break-all; }
.wx-kv > b.green { color: #0e9f6e; }
.wx-kv.link { cursor: pointer; }
.wx-kv.link:active { opacity: .65; }

/* 时间线 */
.wx-tl { padding: 6px 0 0 4px; }
.wx-tl-i { display: flex; gap: 11px; position: relative; padding-bottom: 14px; }
.wx-tl-i:not(:last-child)::before {
  content: ''; position: absolute; left: 3px; top: 12px; bottom: 0;
  width: 1px; background: #eceef2;
}
.wx-tl-d {
  width: 7px; height: 7px; border-radius: 50%; background: #1677ff;
  margin-top: 6px; flex: none; position: relative; z-index: 1;
}
.wx-tl-c { flex: 1; min-width: 0; }
.wx-tl-h { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.wx-tl-h b { font-weight: 600; }
.wx-tl-h span { font-size: 11.5px; color: #1677ff; background: #e8f3ff; padding: 1px 6px; border-radius: 3px; }
.wx-tl-c p { margin: 5px 0 4px; font-size: 13.5px; color: #4e5969; line-height: 1.6; }
.wx-tl-t { font-size: 11.5px; color: #a0a6b0; }

.wx-none { padding: 22px 0; text-align: center; font-size: 13px; color: #a0a6b0; }

/* 跟进表单 */
.wx-ta {
  width: 100%; border: 1px solid #e5e6eb; border-radius: 8px; padding: 11px 12px;
  font-size: 16px; font-family: inherit; color: #1d2129; resize: vertical;
  margin-top: 12px; line-height: 1.6;
}
.wx-ta::placeholder { color: #a9aeb8; font-size: 14px; }
.wx-radios { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.wx-radios label {
  flex: 1 1 0; min-width: 0; text-align: center; padding: 10px 2px; border-radius: 6px;
  border: 1px solid #e5e6eb; font-size: 12.5px; color: #4e5969; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  white-space: nowrap;
}
.wx-radios label.on { border-color: #1677ff; color: #1677ff; background: #f0f7ff; font-weight: 500; }
.wx-radios input { display: none; }

/* ---- 完善资料 / 绑定 ---- */
.wx-prof { padding: 30px 22px 20px; }
.wx-avatar {
  width: 62px; height: 62px; border-radius: 50%; background: #1677ff; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 600; margin: 0 auto;
}
.wx-avatar.big { width: 54px; height: 54px; font-size: 21px; margin: 0; flex: none; }
.wx-prof-p { margin: 16px 0 4px; font-size: 13.5px; color: #86909c; line-height: 1.75; text-align: center; }
.wx-form { margin-top: 22px; background: #fff; border-radius: 10px; padding: 0 14px; }
.wx-form-i { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid #f4f5f7; }
.wx-form-i:last-child { border-bottom: none; }
.wx-form-i label { width: 74px; flex: none; font-size: 14px; color: #4e5969; }
.wx-form-i input {
  flex: 1; height: 48px; border: none; background: transparent;
  font-size: 16px; color: #1d2129; font-family: inherit; text-align: right;
}
.wx-form-i input::placeholder { color: #b8bdc7; font-size: 14.5px; }
.wx-tip { margin-top: 16px; font-size: 12.5px; color: #a0a6b0; line-height: 1.7; text-align: center; }
.wx-ok {
  width: 62px; height: 62px; border-radius: 50%; background: #e8f8f1; color: #0e9f6e;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto;
}

/* ---- 公众号会话 ---- */
.mp-chat { padding: 12px 0 90px; min-height: calc(100vh - 140px); }
.mp-time { text-align: center; font-size: 12px; color: #a0a6b0; margin: 6px 0 16px; }
.mp-msg { display: flex; gap: 9px; padding: 0 14px; margin-bottom: 16px; align-items: flex-start; }
.mp-ava {
  width: 38px; height: 38px; border-radius: 6px; background: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.mp-bub {
  background: #fff; border-radius: 6px; padding: 12px 14px; max-width: 285px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative;
}
.mp-bub::before {
  content: ''; position: absolute; left: -5px; top: 13px;
  width: 9px; height: 9px; background: #fff; transform: rotate(45deg);
  border-radius: 1px;
}
.mp-bub p { margin: 0 0 11px; font-size: 14.5px; line-height: 1.7; color: #1d2129; }
.mp-bub p:last-child { margin-bottom: 0; }
.mp-bub a { color: #576b95; text-decoration: none; cursor: pointer; }

.mp-menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: 52px; display: flex; align-items: center;
  background: #f7f7f7; border-top: 1px solid #e5e5e5;
  padding-bottom: env(safe-area-inset-bottom);
}
.mp-menu-k {
  width: 56px; flex: none; text-align: center; font-size: 19px; color: #4e5969;
  border-right: 1px solid #e5e5e5; line-height: 52px;
}
.mp-menu-i {
  flex: 1; text-align: center; font-size: 14.5px; color: #1d2129; cursor: pointer;
  padding: 8px 4px;
}
.mp-menu-i:active { background: #ededed; }

/* 宽屏：收成手机宽度居中 */
@media (min-width: 640px) {
  .wx-app {
    max-width: 468px; margin: 0 auto;
    box-shadow: 0 0 0 1px #dfe3ea, 0 30px 80px -30px rgba(15, 23, 42, .35);
    min-height: 100vh;
  }
  .wx-pager, .mp-menu {
    left: 50%; right: auto; transform: translateX(-50%);
    width: 100%; max-width: 468px;
  }
}

/* 小屏兜底 */
@media (max-width: 360px) {
  .wx-cell { padding: 13px 9px 12px; }
  .wx-cell .v { font-size: 21px; }
  .wx-cell .v.small { font-size: 17px; }
  .wx-radios label { flex: 1 1 46%; }
  .wx-pager { gap: 26px; }
}

/* ============================================================
   公众号工作台 · 追加样式（对齐竞品 H5 的卡片、弹层、回传页）
   ============================================================ */
.wx-tag.red { background: #ffece8; color: #d93026; }

.wx-card.is-flex { display: block; }
.wx-card-sub { margin-top: 3px; font-size: 12px; color: #86909c; }
.wx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wx-dl { margin-top: 10px; border-top: 1px dashed #eef0f3; padding-top: 8px; }
.wx-dl > div { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.85; }
.wx-dl > div > span { color: #86909c; flex: none; width: 54px; }
.wx-dl > div > b { font-weight: 400; color: #1d2129; flex: 1; word-break: break-all; }
.wx-card-f { flex-wrap: wrap; }

.wx-mini {
  font-size: 12.5px; color: #4e5969; padding: 4px 8px; border-radius: 6px;
  background: #f7f8fa; cursor: pointer; white-space: nowrap;
}
.wx-mini.blue { color: #1677ff; background: #e8f3ff; }
.wx-mini:active { opacity: .7; }

.wx-sum { padding: 10px 0; border-top: 1px solid #f2f3f5; }
.wx-sum:first-of-type { border-top: none; }
.wx-sum-h { display: flex; align-items: center; justify-content: space-between; }
.wx-sum-h b { font-size: 14.5px; }
.wx-sum-b { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: #4e5969; }

/* 底部弹层 */
.wx-mask {
  position: fixed; inset: 0; z-index: 9990; background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.wx-sheet {
  width: 100%; max-width: 480px; max-height: 86vh; background: #fff;
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column;
  animation: wxUp .2s ease-out; padding-bottom: env(safe-area-inset-bottom);
}
@keyframes wxUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.wx-sheet-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid #f2f3f5;
}
.wx-sheet-h b { font-size: 16px; }
.wx-sheet-h a { color: #86909c; font-size: 16px; cursor: pointer; }
.wx-sheet-b { padding: 4px 16px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wx-sheet-f {
  display: flex; gap: 10px; padding: 10px 16px 14px; border-top: 1px solid #f2f3f5;
}
.wx-sheet-f .wx-btn { flex: 1; height: 44px; font-size: 16px; margin: 0; }
.wx-sub { text-align: right; font-size: 11.5px; color: #a0a6b0; margin-top: 4px; }

.wx-cb-hint {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: #f0f7ff; color: #cf5a0c; font-size: 12.5px; line-height: 1.7;
}
.wx-cb-hint b { color: #1677ff; }

/* 回传页 */
.wx-cb-hero { padding: 18px 14px 6px; }
.wx-cb-t { font-size: 20px; font-weight: 600; }
.wx-cb-hero p { margin: 8px 0 0; font-size: 13px; color: #4e5969; }
.wx-cb-warn {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 12px;
  color: #b45309; background: #fffbeb; border: 1px solid #fde68a; line-height: 1.7;
}
.wx-tl-h span.red { color: #d93026; }

/* 选项多的时候（回传状态 / 原因标签）按内容宽度排，别挤成一团 */
.wx-radios.wrap { gap: 8px; }
.wx-radios.wrap label { flex: 0 0 auto; }
