:root {
  --primary: #2b6de8;
  --primary-hover: #1f5cc9;
  --primary-light: #eaf1fd;
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #1e2430;
  --text-sub: #6b7480;
  --border: #e5e8ed;
  --success: #00a05a;
  --warning: #e37318;
  --danger: #d54941;
  --gray-btn: #f1f3f5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;   /* 全站数字等宽对齐 */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 布局 ---------- */
#root { display: flex; min-height: 100vh; }

.sidebar {
  width: 208px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 20;
}

.logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
}

.logo-img {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

.nav { padding: 10px 10px; flex: 1; overflow: auto; }
.nav-title { color: var(--text-sub); font-size: 12px; padding: 10px 10px 6px; }

.nav-group + .nav-group { margin-top: 10px; }
.nav-group-title { color: #9aa3af; font-size: 12px; font-weight: 600; padding: 8px 12px 4px; letter-spacing: .02em; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text);
  margin-bottom: 2px;
}

.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item svg { flex: none; opacity: .85; }

.nav-count {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  font-weight: 500;
}

.main {
  flex: 1;
  margin-left: 208px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 15;
}

.page-title { font-size: 16px; font-weight: 600; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 14px; color: var(--text-sub); }
.bell-btn {
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-sub);
}
.bell-btn:hover { background: var(--bg); color: var(--text); }
.bell-btn.active { background: var(--primary-light); color: var(--primary); }
.bell-btn svg { width: 20px; height: 20px; }
.bell-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}

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

/* ---------- 卡片 / 工具栏 ---------- */
.card {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar .grow { flex: 1; }

/* 线索列表筛选栏 */
.filter-card { padding: 12px 16px; }
.filter-bar { margin-bottom: 0; gap: 8px; flex-wrap: wrap; }
/* 时间区间筛选 */
.date-range { display: inline-flex; align-items: center; gap: 4px; }
.date-range input[type="date"] { width: 132px; }
.range-sep { color: var(--text-sub); font-size: 12px; }
.filter-bar select,
.filter-bar input {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text);
  border-color: #e3e7ec;
  border-radius: 8px;
}
.filter-bar select { cursor: pointer; }
.filter-bar input::placeholder { color: #a6adb8; }
.search-box { position: relative; display: inline-flex; align-items: center; }
.search-box svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: #9aa3af;
  pointer-events: none;
}
.search-box input { width: 240px; padding-left: 30px; }

.batch-bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--primary-light);
  border: 1px solid #c9dcfa;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  color: var(--primary);
}

.batch-bar.show { display: flex; }

/* ---------- 表单 ---------- */
input, select, textarea {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  border: 1px solid #d7dbe0;
  border-radius: 6px;
  padding: 7px 10px;
  outline: none;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; line-height: 1.6; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--text-sub); }
.field label .req { color: var(--danger); }
/* 意向考试多选 chip */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dfe3e8;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.chip input { accent-color: var(--primary); margin: 0; }
.chip:hover { border-color: var(--primary); }
.chip:has(input:checked) { border-color: var(--primary); background: #e8f1ff; color: var(--primary); font-weight: 500; }
.hint { font-size: 12px; color: var(--text-sub); }

/* ---------- 录入线索页 ---------- */
.upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
/* 分段切换控件 */
.seg-group {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg-btn.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}
/* ---------- 线索图片 ---------- */
/* 列表里的线索缩略图 */
.thumb-wrap { display: inline-block; vertical-align: middle; line-height: 0; }
.thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #f5f7fa;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.thumb-wrap:hover .thumb { transform: scale(1.06); box-shadow: 0 2px 8px rgba(16, 24, 40, .18); }
/* 悬停放大的浮层（fixed 定位，不受表格 overflow 影响） */
.img-tip {
  position: fixed;
  z-index: 900;
  display: none;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .2);
}
.img-tip img { display: block; max-width: 420px; max-height: 340px; border-radius: 6px; }
/* ---------- 录入线索：文本 / 图片 ---------- */
.lead-type-field label { display: inline-block; }
/* 分段控件在 flex 纵向布局里会被拉伸到整行，保持自身内容宽度 */
.lead-type-field .seg-group { align-self: flex-start; }
.seg-group.sm .seg-btn { padding: 4px 14px; font-size: 12.5px; }
.lead-pane { margin-top: 10px; }
/* 线索查重提示 */
.dup-tip {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  font-size: 12.5px;
  line-height: 1.5;
}
/* 图片拖拽 / 点击上传区 */
.img-drop {
  border: 1.5px dashed #c9d2dd;
  border-radius: 10px;
  background: #fafbfc;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.img-drop:hover, .img-drop.drag-on { border-color: var(--primary); background: var(--primary-light); }
.drop-icon { font-size: 22px; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.drop-txt { font-size: 13.5px; color: var(--text); }
.drop-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.img-preview { display: flex; gap: 12px; align-items: flex-start; }
.img-preview img {
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f5f7fa;
}
.img-preview-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-top: 2px; }

/* 表单网格限宽，字段不至于拉得太长 */
.upload-grid { max-width: 780px; }
/* 底部操作条：按钮 + 说明文字，上边框分隔 */
.upload-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* 表单主提交按钮保持大尺寸（不受全局小按钮影响） */
.upload-foot .btn { padding: 8px 16px; font-size: 14px; }
/* 批量导入的多行输入用等宽字体，方便对齐逗号分隔格式 */
.mono-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.8; }

.btn {
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  background: var(--primary);
  color: #fff;
  transition: .15s;
}

.btn:hover { background: var(--primary-hover); }
.btn.ghost { background: var(--gray-btn); color: var(--text); }
.btn.ghost:hover { background: #e6e9ec; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f2c4c1; }
.btn.danger:hover { background: #fdf1f0; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  padding: 2px 6px;
  font-size: 13px;
  border-radius: 4px;
}

.btn-link:hover { background: var(--primary-light); }
.btn-link.red { color: var(--danger); }
.btn-link.red:hover { background: #fdf1f0; }
.btn-link:disabled { color: #b6bcc4; cursor: not-allowed; background: none; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }

/* 表格卡片：表格铺满卡片、圆角裁剪 */
.card.table-wrap { padding: 0; overflow: hidden; }

th {
  text-align: left;
  font-weight: 600;
  color: #8a93a0;
  font-size: 13px;
  letter-spacing: .02em;
  padding: 10px 12px;
  border-bottom: 1px solid #e9edf2;
  white-space: nowrap;
  background: #f7f8fa;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f3f6;
  vertical-align: middle;
  white-space: nowrap;
  cursor: default;
  color: #4a5261;   /* 正文用柔和深灰，降低黑色饱和度 */
  font-size: 13px;  /* 表格正文 13px，紧凑 */
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f7faff; }

/* ---------- 分页条 ---------- */
/* 表格底部分页条：贴在卡片最底部 */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 16px;
  border-top: 1px solid #eef1f4;
  background: #fafbfc;
  font-size: 13px;
  justify-content: flex-end;
}
.pg-left, .pg-right { display: flex; align-items: center; gap: 6px; }
.pg-size-wrap { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.pager-btn {
  border: none;
  background: none;
  border-radius: 6px;
  padding: 4px 10px;
  min-width: 28px;
  font-size: 13px;
  color: var(--text);
  transition: background .15s, color .15s;
}
.pager-btn:hover:not(:disabled) { background: #eceff3; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-btn.active { background: #e8f1ff; color: var(--primary); font-weight: 600; }
.pager-size {
  height: 22px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--text-sub);
  border: 1px solid #e3e7ec;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}
.pager-size:hover { border-color: #cbd2d9; }
.pager-ellipsis { color: var(--text-sub); padding: 0 2px; }
/* 截断内容的全文悬浮提示 */
.full-tip {
  position: fixed;
  z-index: 9999;
  max-width: 380px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  white-space: pre-wrap;      /* 保留换行，自动折行显示全文 */
  word-break: break-all;
  pointer-events: none;
}

.remark-cell {
  display: inline-block;      /* 截断需要块级化 */
  max-width: 10em;            /* 约 10 个中文字宽度，超出省略 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;        /* 不折行 */
  vertical-align: bottom;
}
.actions { display: flex; gap: 2px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--text-sub); padding: 46px 0; }

/* ---------- 标签 ---------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
}

.b-blue { background: #eaf1fd; color: var(--primary); }
.b-green { background: #e8f6ef; color: var(--success); }
.b-orange { background: #fdf1e4; color: var(--warning); }
.b-red { background: #fdf1f0; color: var(--danger); }
.b-gray { background: #f1f3f5; color: var(--text-sub); }
.b-purple { background: #f1ecfd; color: #8b5cf6; }

.money { color: var(--danger); font-weight: 600; }
.muted { color: var(--text-sub); }
.date-over { color: var(--danger); }

.contact-link { color: var(--primary); cursor: default; border-radius: 4px; }
.contact-link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }

/* 号码列：预留左侧图标位，保证所有行号码左对齐一致 */
.contact-cell { position: relative; display: inline-block; padding-left: 24px; }
/* 表头「线索」与号码文字左对齐（跳过图标位） */
.th-contact { display: inline-block; padding-left: 24px; }
/* 无标记页面（今日跟进/创建未转化/创建已转化）：仅保留少量缩进 */
.contact-cell.no-ico, .th-contact.no-ico { padding-left: 12px; }
/* 创建时间列：与无标记页面首列（线索）缩进一致 */
.created-cell, .th-created { display: inline-block; padding-left: 12px; }

.coin-ico {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  object-fit: contain;
  cursor: default;
}
/* NEW 标记：对齐金币的视觉墨迹中心（coin.png 画布非正方，内容偏左，视觉中心在盒内约 7.4px 处） */
.coin-ico.new-ico { width: 14px; height: 14px; left: 0; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 760px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;              /* 头部/底部固定，中间内容区滚动 */
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.modal.small { width: 460px; }
.modal.wide { width: 1040px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  flex: none;
  background: #fff;
}

/* 弹窗头右侧的跟进登记项（意向程度 / 微信状态 / 调整分配）：轻量文字式，点击数值即改 */
.head-regs {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 400;
}
.head-reg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 6px;
  padding: 3px 6px;
}
.head-reg:hover {
  background: var(--bg, #f5f7fa);
}
.head-reg .hk {
  color: var(--text-sub);
}
.head-reg .ie-trigger-value {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
}
.head-reg .ie-trigger-value:hover {
  opacity: .7;
}
.head-reg .ie-select {
  max-width: 120px;
  padding: 2px 6px;
  font-size: 12px;
}
.head-reg .badge {
  margin-right: 0;
}

.modal-body {
  padding: 4px 22px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-foot {
  flex: none;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.close-x {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-sub);
}

/* ---------- 详情 ---------- */
.detail-sec {
  background: #fafbfd;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin-top: 12px;
}
.detail-sec .section-title { margin-top: 0; }

/* 详情弹窗左右两栏：左侧信息+登记，右侧跟进记录 */
.detail-cols { display: flex; gap: 16px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-side {
  width: 420px;
  flex: none;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}
.detail-side .detail-sec { margin-top: 0; }
.detail-side .tl-content { word-break: break-word; }

/* 点击才编辑：文本态 + 修改按钮，统一 28px 行高，切换不跳动 */
.inline-edit { display: inline-flex; align-items: center; gap: 6px; height: 28px; }
.ie-value { font-size: 14px; font-weight: 500; border-bottom: 1px dashed #c9d4e5; padding-bottom: 1px; }
.ie-trigger {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.ie-trigger:hover { background: #eef4ff; }
.ie-static { font-size: 14px; font-weight: 500; line-height: 28px; }
/* 行内小号下拉框 */
.ie-select {
  font-size: 14px;
  padding: 0 22px 0 8px;
  height: 28px;
  width: auto;
  min-width: 0;
  border-radius: 6px;
}
/* 空值时「+ 填写」虚线按钮 */
.ie-add {
  border: 1px dashed #c9d4e5;
  background: none;
  color: var(--text-sub);
  font-size: 14px;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
}
.ie-add:hover { color: var(--primary); border-color: var(--primary); background: #f5f9ff; }
/* 日期框：紧凑尺寸但保持常规灰边框，无高亮 */
.ie-date {
  font-size: 14px;
  height: 28px;
  padding: 0 10px;
  min-width: 140px;
  border: 1px solid #d7dbe0;
  border-radius: 6px;
  background: #fff;
  outline: none;
}
.ie-date:focus { border-color: #d7dbe0; box-shadow: none; }
/* 行内编辑输入框：高亮边框，回车/失焦保存 */
.ie-input {
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  min-width: 150px;
  height: 28px;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, .12);
}

.btn.ghost-danger { background: #fff; border: 1px solid #f3c1bd; color: var(--danger); }
.btn.ghost-danger:hover { background: #fdf1f0; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

.section-title:first-child { margin-top: 0; }

/* 卡片标题行：左侧标题 + 右侧辅助说明 */
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head .section-title { margin: 0; }
.card-sub { font-size: 12px; color: var(--text-sub); }

/* ---------- 成员管理 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.page-desc { margin: 0; font-size: 13px; color: var(--text-sub); }

.mgmt-layout { display: flex; gap: 20px; align-items: flex-start; }
.member-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.side { width: 320px; flex: none; }

.member-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.mc-top { display: flex; align-items: center; gap: 12px; }
.u-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; color: #fff; padding: 0; }
.u-avatar.b-red { background: #d54941; }
.u-avatar.b-blue { background: #2b6de8; }
.u-avatar.b-green { background: #00a05a; }
.u-avatar.b-orange { background: #e37318; }
.u-avatar.b-purple { background: #8b5cf6; }
.mc-id { flex: 1; min-width: 0; }
.mc-name { font-size: 15px; font-weight: 600; color: var(--text); }
.mc-user { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.mc-role { flex: none; }
.mc-info { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mc-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mc-label { color: var(--text-sub); width: 56px; flex: none; }
.mc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* 分配顺序输入框 */
.order-input { border-color: #e3e7ec; border-radius: 8px; }
/* 说明信息框 */
.note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 12px; padding: 10px 12px;
  background: #f7f9fc; border-radius: 8px;
  font-size: 12px; color: var(--text-sub); line-height: 1.6;
}
.note svg { flex: none; margin-top: 3px; }

@media (max-width: 980px) {
  .mgmt-layout { flex-direction: column; }
  .side { width: 100%; }
}

/* ---------- 选项与标签 ---------- */
.opt-section { margin-bottom: 22px; }
.opt-note { margin-top: 10px; }
.opt-section > .section-title { margin-bottom: 12px; }
.opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.opt-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.opt-list li { display: flex; align-items: center; padding: 8px 10px; background: #f7f9fc; border-radius: 8px; }
.opt-order { flex: none; width: 56px; margin-right: 10px; border: 1px solid #e3e7ec; border-radius: 6px; padding: 4px 6px; text-align: center; font-size: 13px; color: var(--text); }
.opt-name { font-size: 13px; color: var(--text); }
.opt-ops { display: flex; gap: 8px; margin-left: auto; }
.opt-empty { justify-content: center; color: var(--text-sub); background: none; padding: 16px 0; }

/* 标签与颜色：卡片行布局（替代原表格） */
.badge-list { display: flex; flex-direction: column; gap: 8px; }
.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color .15s;
}
.badge-row:hover { border-color: #e6eaf0; }
/* 圆形色块预览，内部为取色器（透明覆盖） */
.badge-color-pick {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c, #6b7480);
  flex: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), 0 0 0 1px rgba(0,0,0,.06);
}
.badge-color-pick input[type="color"] {
  position: absolute;
  inset: -4px;
  width: 140%; height: 140%;
  border: none; padding: 0; margin: 0;
  cursor: pointer;
  opacity: 0;
}
.badge-main { flex: 1; min-width: 0; }
.badge-text-val { font-size: 13px; color: var(--text); font-weight: 500; }
.badge-label {
  width: 100%;
  border: 1px solid #e3e7ec;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}
.badge-sort-wrap { display: flex; align-items: center; gap: 6px; flex: none; }
.badge-sort-label { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.badge-sort {
  width: 56px;
  border: 1px solid #e3e7ec;
  border-radius: 6px;
  padding: 5px 6px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
}
.badge-ops { display: flex; gap: 8px; flex: none; align-items: center; }

@media (max-width: 1100px) {
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .opt-grid, .badge-grid { grid-template-columns: 1fr; }
  /* 搜索框在手机端占满一行，输入框自适应宽度（课程顾问/新媒体共用） */
  .filter-bar .search-box { flex: 1 1 100%; }
  .filter-bar .search-box input { width: 100%; }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}

.info-item { font-size: 13px; }
.info-item .k { color: #8a93a0; font-size: 12px; margin-bottom: 5px; }
.info-item > :not(.k) { font-size: 14px; font-weight: 500; }

.timeline { list-style: none; }
.timeline li {
  border-left: 2px solid #e5e8ed;
  padding: 0 0 16px 14px;
  position: relative;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -5px; top: 5px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.tl-meta { font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.tl-content { font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.tl-next { font-size: 12px; color: var(--warning); margin-top: 4px; }

/* ---------- 提醒中心 ---------- */
.notify-list { list-style: none; }

.notify-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}

.notify-item.unread { background: #f7faff; border-color: #c9dcfa; }
.notify-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.notify-item.unread .dot { background: var(--danger); }
.notify-title { font-weight: 600; margin-bottom: 4px; }
.notify-content { color: var(--text-sub); font-size: 13px; line-height: 1.6; }
.notify-time { font-size: 12px; color: var(--text-sub); margin-top: 6px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(30, 36, 48, .92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

#toast.show { opacity: 1; }

/* ---------- 登录页 ---------- */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3f5f7, #e8eefb);
}

.login-card {
  width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 36px;
  box-shadow: 0 4px 12px rgba(31, 56, 88, .04), 0 20px 48px rgba(31, 56, 88, .10);
}

.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.login-logo {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.login-title { font-size: 22px; font-weight: 700; letter-spacing: .5px; text-align: center; margin-top: 14px; }
.login-sub { text-align: center; color: var(--text-sub); font-size: 13px; margin-top: 4px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 16px; }
.login-card input {
  padding: 10px 12px;
  border-radius: 8px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
/* 保留 Chrome 原生自动填充淡蓝色背景（不覆盖） */
.login-card input:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.login-card .btn {
  width: 100%; margin-top: 10px; padding: 11px;
  border-radius: 8px; font-size: 15px; letter-spacing: 6px; text-indent: 6px;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.login-card .btn:hover { box-shadow: 0 6px 14px rgba(37, 99, 235, .28); }
.login-card .btn:active { transform: translateY(1px); box-shadow: none; }
.login-err { color: #d54941; font-size: 12px; margin-top: 10px; min-height: 16px; }

@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}

/* ================= 移动端适配（手机常用页面，重点录入线索） ================= */
/* 汉堡按钮：桌面隐藏，窄屏显示 */
.menu-btn {
  display: none;
  border: none;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 8px;
}
.menu-btn:active { background: var(--gray-btn); }
/* 抽屉遮罩：桌面隐藏 */
.nav-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .4);
  z-index: 45;
  opacity: 0;
  transition: opacity .2s;
}

@media (max-width: 768px) {
  /* ---- 布局骨架：侧边栏改为抽屉 ---- */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 248px;
    z-index: 50;
  }
  body.nav-open .sidebar {
    transform: none;
    box-shadow: 8px 0 30px rgba(16, 24, 40, .18);
  }
  body.nav-open .nav-mask { display: block; opacity: 1; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }  /* 顶栏单行极简：汉堡+标题 ··· 铃铛+用户信息+退出登录 一条线排完 */
  .topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    min-height: 0;
  }
  .topbar-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
  .page-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bell-btn { flex: none; margin-left: 0; }
  /* 角标加白描边并置顶，贴着铃铛也醒目 */
  .bell-btn .bell-badge { z-index: 2; box-shadow: 0 0 0 2px #fff; }
  .topbar-right { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; }
  #me-info { display: inline-flex; align-items: center; gap: 6px; }
  #me-info .badge { font-size: 12px; line-height: 16px; padding: 1px 7px; }
  #logout { font-size: 12px; }
  .content { padding: 12px; }

  /* ---- 表单控件：字号 16px 是 iOS 硬要求（<16px 聚焦时页面会被强制放大），
         视觉上通过收紧 padding 保持紧凑 ---- */
  input, select, textarea { font-size: 16px; padding: 8px 12px; }
  .field input:not([type=checkbox]), .field select, .field textarea { width: 100%; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .btn { padding: 10px 16px; }
  .btn.small { padding: 7px 12px; font-size: 13px; }
  .seg-btn { padding: 7px 16px; font-size: 13.5px; }
  .seg-group.sm .seg-btn { padding: 6px 15px; font-size: 13px; }

  /* ---- 录入线索页 ---- */
  .upload-grid { max-width: none; }
  .form-grid { gap: 12px; }
  .upload-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: var(--card);
    margin: 16px -12px -12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
  }
  .card { padding: 14px; border-radius: 10px; }
  /* 提交按钮全宽，方便拇指点按 */
  .upload-foot .btn { width: 100%; font-size: 15.5px; }
  /* 图片上传区加大触控，预览窄屏竖排 */
  .img-drop { padding: 34px 16px; }
  .img-preview { flex-direction: column; }
  .img-preview img { max-width: 100%; }
  /* 线索缩略图稍大，方便看清 */
  .thumb { width: 40px; height: 40px; }

  /* ---- 表格：横向滚动，卡片不出血 ---- */
  .card.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 640px; }

  /* ---- 弹窗 ---- */
  .modal { width: calc(100vw - 24px) !important; max-height: 88vh; overflow: auto; }
  /* 线索详情弹窗：头部允许换行、两栏改上下堆叠，避免字段标签被挤成竖排 */
  .modal-head { position: relative; flex-wrap: wrap; row-gap: 8px; padding: 12px 36px 12px 14px; }
  .modal-head > span:first-child { flex-basis: 100%; }
  /* 关闭按钮固定弹窗右上角：线索详情的 × 在 head-regs 内，换行后会跟在徽章后面 */
  .modal-head .close-x { position: absolute; top: 10px; right: 10px; }
  .head-regs { flex-wrap: wrap; gap: 8px; }
  .modal-body { padding: 4px 14px 16px; }
  .detail-cols { flex-direction: column; gap: 14px; }
  .detail-side { width: auto; max-height: none; overflow: visible; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .modal-foot { flex-wrap: wrap; padding: 10px 14px; }
  .modal-foot .btn { white-space: nowrap; }
}

/* 分页行左侧的统计信息（创建已转化等），把右侧分页控件推到最右 */
.pg-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

/* ---- 企业微信成员映射 ---- */
.wecom-map { display: flex; flex-direction: column; gap: 8px; }
.wecom-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f7f9fc;
  border-radius: 8px;
}
.wm-name { font-size: 13px; color: var(--text); }
.wm-user { color: var(--text-sub); margin-left: 4px; font-size: 12px; }
.wm-input { width: 200px; }

/* 提醒中心顶部操作行 */
.notify-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.notify-toolbar .btn {
  background: none;
  color: var(--primary);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
}
.notify-toolbar .btn:hover { background: var(--primary-light); }

/* ================= 雷达监控（新 UI） ================= */
.radar-page { animation: rdFade .4s ease both; }
@keyframes rdFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* —— 顶部渐变横幅 —— */
.radar-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 20px 24px;
  background: linear-gradient(115deg, #1d5fd0 0%, #2b6de8 55%, #5b93f2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  box-shadow: 0 10px 28px -14px rgba(43, 109, 232, .55);
}
.radar-hero::before, .radar-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}
.radar-hero::before { width: 230px; height: 230px; right: -50px; top: -80px; }
.radar-hero::after { width: 130px; height: 130px; right: 70px; bottom: -70px; border-color: rgba(255, 255, 255, .12); }

.rh-left { position: relative; z-index: 1; min-width: 260px; }
.rh-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-title-row > b { font-size: 17px; letter-spacing: .5px; }
.rh-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  display: inline-flex; align-items: center; justify-content: center;
}
.rh-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 12px; font-weight: 600;
}
.rh-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #9fe0bd; }
.rh-pill.off .dot { background: #ffd08a; }
.rh-desc { margin-top: 7px; font-size: 12.5px; color: rgba(255, 255, 255, .82); }

.rh-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rh-freq select {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
.rh-freq select option { color: var(--text); background: #fff; }
.rd-btn {
  border: none; border-radius: 9px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.rd-btn:active { transform: scale(.96); }
.rd-btn:disabled { opacity: .55; cursor: not-allowed; }
.rd-btn-light { background: #fff; color: var(--primary); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .35); }
.rd-btn-light:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4); }
.rd-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .38); }
.rd-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .24); }

/* —— 警示提示条 —— */
.rd-alert {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 12px; padding: 10px 14px;
  border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: #fdf1f0; color: var(--danger);
  border: 1px solid #f6d5d2;
}

/* —— 状态指标卡 —— */
.radar-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.rd-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.rd-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -12px rgba(30, 36, 48, .25); }
.rd-stat .lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-sub); }
.rd-stat .lbl svg { color: var(--primary); opacity: .75; }
.rd-stat .val { margin-top: 7px; font-size: 19px; font-weight: 700; line-height: 1.2; }

/* —— 主体两栏 —— */
.radar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.rd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.rd-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rd-chip {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
}
.rd-card-head b { font-size: 14.5px; }
.rd-card-head .sub { font-size: 12px; color: var(--text-sub); margin-top: 1px; }
.rd-card .hint {
  background: #f7f9fc; border-radius: 8px; padding: 8px 12px;
  font-size: 12.5px; color: var(--text-sub); margin-bottom: 12px; line-height: 1.6;
}

/* —— 扫码登录卡 —— */
.rd-login-visual { display: flex; flex-direction: column; align-items: center; padding: 14px 0 4px; text-align: center; }
.rd-login-ring {
  width: 84px; height: 84px; border-radius: 50%;
  border: 2px dashed #c8dbfa;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  background: radial-gradient(circle at 50% 38%, var(--primary-light), transparent 72%);
  animation: rdSpin 16s linear infinite;
}
@keyframes rdSpin { to { transform: rotate(360deg); } }
.rd-login-tip { margin-top: 12px; font-size: 12.5px; color: var(--text-sub); line-height: 1.7; }

/* —— 通知历史时间线 —— */
.rd-timeline { position: relative; padding-left: 20px; }
.rd-timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--border);
}
.rd-tl-item { position: relative; padding: 0 0 18px 8px; }
.rd-tl-item:last-child { padding-bottom: 2px; }
.rd-tl-item::before {
  content: ""; position: absolute; left: -20px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-light);
}
.rd-tl-item.warn::before { background: var(--warning); box-shadow: 0 0 0 3.5px #fdf1e4; }
.rd-tl-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.rd-tl-head b { font-size: 13.5px; }
.rd-tl-head .meta { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.rd-tl-list { margin: 8px 0 0; padding: 0; list-style: none; }
.rd-tl-list li { margin: 4px 0; font-size: 13px; padding-left: 14px; position: relative; }
.rd-tl-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.rd-tl-list a { color: var(--primary); text-decoration: none; }
.rd-tl-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rd-tl-empty { color: var(--text-sub); font-size: 13px; text-align: center; padding: 26px 0; }

@media (max-width: 1080px) {
  .radar-grid { grid-template-columns: 1fr; }
  .radar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================= 线索详情弹窗重设计（lead-detail） ================= */
/* —— 布局：左侧不滚、右侧独立滚；弹窗本体不滚动 —— */
.lead-detail .modal-body { padding: 14px 22px; overflow: hidden; display: flex; }
.lead-detail .detail-cols { flex: 1; min-width: 0; min-height: 0; align-items: stretch; }
.lead-detail .detail-main { overflow-y: auto; min-height: 0; }
.lead-detail .detail-side { width: 420px; flex: none; display: flex; flex-direction: column; min-height: 0; overflow: visible; max-height: none; }

/* —— 左栏卡片 —— */
.nl-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.nl-hero { padding: 15px 18px 14px; background: linear-gradient(180deg, #f6f9ff, #fcfdff); border-bottom: 1px solid #edf0f5; }
.nl-lead-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nl-lead { font-size: 19px; font-weight: 700; letter-spacing: .3px; line-height: 1.25; word-break: break-all; color: var(--text); }
.nl-ico { border: none; background: none; color: #a7b0bc; width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease; flex: none; cursor: pointer; padding: 0; }
.nl-lead-row:hover .nl-ico, .nl-chip:hover .nl-ico, .nl-ico:focus-visible { opacity: 1; }
.nl-ico:hover { background: #e3eeff; color: var(--primary); }
.nl-ico svg { width: 13px; height: 13px; }
.nl-copied { font-size: 11px; color: var(--success); opacity: 0; transition: opacity .25s; flex: none; }
.nl-copied.show { opacity: 1; }
.nl-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; background: #e8f0fe; color: var(--primary); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; line-height: 16px; flex: none; margin-left: auto; }
.nl-chip em { font-style: normal; font-weight: 500; color: #82a7ea; font-size: 11px; }
.nl-chip .nl-ico { width: 18px; height: 18px; border-radius: 50%; }
.nl-chip .nl-ico svg { width: 11px; height: 11px; }
.nl-rows { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 10px 10px; }
.nl-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; min-width: 0; transition: background .12s ease; }
.nl-row:hover { background: #f6f8fb; }
.nl-row-full { grid-column: 1 / -1; }
.nl-k { flex: none; width: 60px; font-size: 12px; color: #8a93a0; }
.nl-v { font-size: 13.5px; font-weight: 500; color: var(--text); min-width: 0; word-break: break-all; line-height: 1.5; }
.nl-ie { display: inline-flex; align-items: center; gap: 8px; height: auto; min-width: 0; flex: 1; }
.nl-ie .ie-value { font-size: 13.5px; font-weight: 500; color: var(--text); border-bottom: none; padding-bottom: 0; word-break: break-all; line-height: 1.5; }
.nl-edit { border: none; background: none; color: var(--primary); font-size: 11.5px; cursor: pointer; padding: 1px 6px; border-radius: 4px; opacity: 0; transition: opacity .15s ease, background .15s ease; flex: none; }
.nl-row:hover .nl-edit, .nl-edit:focus-visible { opacity: 1; }
.nl-edit:hover { background: #e3eeff; }
.nl-intent { display: flex; border-top: 1px solid #edf0f5; background: #fafbfd; padding: 11px 18px; }
.nl-stat { flex: 1; min-width: 0; }
.nl-stat + .nl-stat { border-left: 1px solid #e7ebf0; padding-left: 16px; margin-left: 16px; }
.nl-stat .k { font-size: 11px; color: #98a1ac; margin-bottom: 3px; letter-spacing: .3px; }
.nl-stat .v { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; word-break: break-all; }
.nl-compose { border-top: 1px solid #edf0f5; padding: 12px 18px 14px; }
.nl-compose textarea { width: 100%; font-size: 13px; line-height: 1.6; border: 1px solid #d7dbe0; border-radius: 8px; padding: 8px 10px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; resize: vertical; }
.nl-compose textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 109, 232, .1); outline: none; }
.nl-compose-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.nl-compose-foot .lbl { font-size: 12px; color: #8a93a0; flex: none; }
.nl-compose-foot .spacer { flex: 1; }

/* —— 右栏卡片（跟进 / 操作记录） —— */
.ns-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ns-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #edf0f5; flex: none; }
.ns-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ns-count { font-size: 12px; font-weight: 600; color: var(--primary); background: #e8f0fe; border-radius: 999px; padding: 1px 9px; line-height: 18px; }
.ns-scroll { overflow-y: auto; padding: 4px 18px 14px; flex: 1; min-height: 0; }
.ns-timeline { list-style: none; position: relative; margin: 0; padding: 12px 0 0; }
.ns-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: #eef1f5; }
.ns-item { position: relative; padding: 0 0 16px 24px; }
.ns-item:last-child { padding-bottom: 2px; }
.ns-dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-sizing: border-box; }
.ns-dot-op { background: #fff; border-color: #e0b15a; }
.ns-meta { font-size: 12px; color: #9aa3af; margin-bottom: 5px; display: flex; align-items: center; gap: 7px; line-height: 18px; }
.ns-tag { font-size: 11px; color: #8a6d3b; background: #fdf3e3; border-radius: 4px; padding: 0 6px; line-height: 16px; flex: none; }
.ns-content { font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.55; word-break: break-word; }
.ns-op-text { color: #7b8490; font-weight: 400; }
.ns-next { font-size: 12px; color: #3b6fd4; background: #eef4ff; border-radius: 6px; padding: 3px 8px; margin-top: 7px; display: inline-block; font-weight: 500; line-height: 16px; }
.ns-scroll::-webkit-scrollbar { width: 8px; }
.ns-scroll::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 8px; }
.ns-scroll::-webkit-scrollbar-track { background: transparent; }

/* —— 移动端：左右改为上下堆叠，弹窗整体可滚，右栏限高内部滚 —— */
@media (max-width: 768px) {
  .lead-detail .modal-body { display: block; overflow-y: auto; padding: 12px 14px; }
  .lead-detail .detail-cols { flex-direction: column; align-items: stretch; }
  .lead-detail .detail-main { overflow: visible; }
  .lead-detail .detail-side { width: 100%; }
  .nl-rows { grid-template-columns: 1fr; }
  .nl-intent { flex-wrap: wrap; gap: 10px; }
  .nl-stat + .nl-stat { border-left: none; padding-left: 0; margin-left: 0; }
  .ns-card { max-height: 62vh; }
  .modal-mask { padding: 10px; }
}
