:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e4e8f0;
  --text: #1b2331;
  --text-2: #5c6878;
  --text-3: #8b96a8;
  --primary: #0a84ff;
  --primary-dark: #0069d9;
  --primary-soft: #e8f2ff;
  --danger: #e5484d;
  --warn: #f5a623;
  --success: #17a673;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }
.grow { flex: 1; }

/* ===== 顶部 ===== */
.topbar {
  flex: 0 0 auto;
  height: 62px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0a84ff, #00c2ff);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(10, 132, 255, .32);
}

.brand-text h1 { margin: 0; font-size: 16px; font-weight: 600; }
.brand-text p { margin: 0; font-size: 12px; color: var(--text-3); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b26a00;
  border: 1px solid #ffdca8;
  white-space: nowrap;
}
.badge-ok { background: #e7f8f1; color: #0f7a55; border-color: #b7e9d4; }
.badge-warn { background: #fff4e5; color: #b26a00; border-color: #ffdca8; }

/* ===== 按钮 ===== */
.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  background: #eef1f6;
  color: var(--text);
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(10, 132, 255, .28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn-outline.danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-row { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-grid .btn { width: 100%; }
.btn-grid .span2 { grid-column: span 2; }
.btn-note { grid-column: span 2; margin: 2px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.5; }

.icon-btn {
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 0 4px;
}

/* ===== 进度条 ===== */
.progress-wrap {
  position: fixed; top: 62px; left: 0; right: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 8px 20px;
  display: flex; align-items: center; gap: 12px;
}
.progress-bar { flex: 1; height: 6px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0a84ff, #00c2ff); transition: width .25s; }
.progress-text { font-size: 12px; color: var(--text-2); white-space: nowrap; }

/* ===== 布局 ===== */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 16px;
  padding: 16px;
  min-height: 0;
}

.panel { overflow-y: auto; padding-right: 2px; }
.content { display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card-title { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }

/* ===== 表单 ===== */
.field-label { display: block; font-size: 12px; color: var(--text-2); margin: 10px 0 6px; }
.field-label:first-of-type { margin-top: 0; }

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 132, 255, .12); }
.textarea { resize: vertical; line-height: 1.5; }
.select { width: auto; min-width: 130px; }

.row { display: flex; gap: 10px; }
.col { flex: 1; min-width: 0; }

.check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); margin-top: 10px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 15px; height: 15px; }
.check.inline { margin-top: 0; }

.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-head .card-title { margin-bottom: 10px; }

.diag {
  max-height: 190px;
  overflow: auto;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  font: 12px/1.7 Consolas, Menlo, "Courier New", monospace;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-all;
}
.diag div { padding: 1px 0; border-bottom: 1px dashed #eaeef5; }
.diag .ok { color: #0f7a55; }
.diag .err { color: var(--danger); }
.diag .warn { color: #b26a00; }
.diag .dim { color: var(--text-3); }

.test-result {
  margin-top: 10px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-all;
}

.hint { font-size: 12px; color: var(--text-3); margin: 8px 0 0; }
.kw-preview { color: var(--primary); word-break: break-all; }

/* ===== 分段控件 & chips ===== */
.seg { display: flex; flex-wrap: wrap; background: #eef1f6; border-radius: 9px; padding: 3px; gap: 3px; margin-bottom: 10px; }
.seg-item {
  flex: 1 1 calc(33.33% - 3px);
  border: none; background: transparent; padding: 7px 6px;
  border-radius: 7px; font-size: 12.5px; cursor: pointer; color: var(--text-2);
  font-family: inherit;
}
.seg-item.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.08); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-2);
  font-family: inherit;
  transition: .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-soft); border-color: #bcdcff; color: var(--primary); font-weight: 600; }
/* 货源工厂组用暖色区分「找供应商」与「找客户」两种意图 */
.chips-alt .chip:hover { border-color: #ea580c; color: #ea580c; }
.chips-alt .chip.active { background: #fff7ed; border-color: #fdba74; color: #c2410c; font-weight: 600; }
.chips-belt .chip { font-size: 11px; padding: 3px 9px; }
.chips-belt .chip:hover { border-color: #0d9488; color: #0d9488; }
.chips-belt .chip.active { background: #f0fdfa; border-color: #5eead4; color: #0f766e; font-weight: 600; }

/* ===== 统计 ===== */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.3; }
.stat span { font-size: 12px; color: var(--text-3); }

/* ===== 地图 ===== */
.map {
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #eef1f6;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.map-placeholder {
  height: 320px;
  margin-top: -322px;
  position: relative;
  z-index: 3;
  border-radius: var(--radius);
  border: 1px dashed #cfd8e6;
  background: #f7f9fc;
  color: var(--text-3);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 20px;
}

/* ===== 工具条 ===== */
.status-sel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  outline: none;
  width: 100%;
}
.status-sel.s-contact { color: #0060c8; background: var(--primary-soft); border-color: #bcdcff; }
.status-sel.s-intent { color: #b26a00; background: #fff4e5; border-color: #ffdca8; }
.status-sel.s-deal { color: #0f7a55; background: #e7f8f1; border-color: #b7e9d4; }
.status-sel.s-void { color: #98a2b3; text-decoration: line-through; }

.note-btn { color: var(--text-3) !important; font-size: 12px; }
.note-btn.has { color: var(--text) !important; }

/* ===== 公司调查 ===== */
.probe-card { border-color: #cfe4ff; background: linear-gradient(180deg, #fbfdff 0%, #ffffff 60%); }
.probe-card .card-title { margin: 0; }

.probe-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.probe-icon {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
}
.probe-headtext { min-width: 0; }
.probe-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.5; }

.probe-bar { display: flex; gap: 8px; }
.probe-input {
  flex: 1; font-size: 14px; padding: 9px 12px;
  border-color: #cfe0f5; background: #fff;
}
.probe-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 132, 255, .12); }
.probe-bar .btn { flex: 0 0 auto; padding: 8px 22px; }

.probe-tips { margin-top: 8px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.probe-tip {
  border: 1px dashed var(--line); background: #fff; color: var(--text-2);
  border-radius: 20px; padding: 2px 10px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.probe-tip:hover { border-color: var(--primary); color: var(--primary); border-style: solid; }

.probe-hist { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.probe-hist:empty { display: none; }
.probe-hist-chip {
  border: 1px solid var(--line); background: #f7f9fc; color: var(--text-2);
  border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer;
  font-family: inherit; max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.probe-hist-chip:hover { border-color: var(--primary); color: var(--primary); }

.probe-result { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }

.probe-loading { font-size: 13px; color: var(--text-3); padding: 6px 0; }
.probe-empty { font-size: 13px; color: var(--text-2); background: #fff8ec; border: 1px solid #ffe0b2; border-radius: 8px; padding: 10px 12px; line-height: 1.7; margin: 0 0 16px; }

.probe-title {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 2px;
}
.probe-badge {
  font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary); border: 1px solid #cfe4ff;
}
.probe-badge.warn { background: #fff5e6; color: #b45309; border-color: #fde3b2; }
.probe-match { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }

.probe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 14px; padding-top: 2px; }
.probe-field { display: flex; gap: 8px; font-size: 13px; align-items: flex-start; }
.probe-k { flex: 0 0 62px; color: var(--text-3); }
.probe-v { flex: 1; color: var(--text); word-break: break-all; min-width: 0; }
.probe-v a { color: var(--primary); text-decoration: none; }
.probe-v a:hover { text-decoration: underline; }
.probe-v.tel { font-family: Consolas, Menlo, monospace; font-weight: 600; }
.probe-v.mute { color: var(--text-3); }

.probe-sect { margin-top: 12px; }
.probe-sect-t { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.probe-links { display: flex; gap: 6px; flex-wrap: wrap; }
.probe-link {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 4px 10px; font-size: 12px; color: var(--text-2);
  text-decoration: none; font-family: inherit;
}
.probe-link:hover { border-color: var(--primary); color: var(--primary); background: #f5faff; }
.probe-link.ali { border-color: #ffd9b0; color: #c2410c; }
.probe-link.ali:hover { background: #fff7ed; border-color: #ea580c; }
.probe-link.gs { border-color: #bfe3d0; color: #15803d; }
.probe-link.gs:hover { background: #f2fbf6; border-color: #17a673; }

.probe-cands { display: flex; flex-direction: column; gap: 4px; }
.probe-cand {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 5px 9px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--text-2);
}
.probe-cand:hover { border-color: var(--primary); color: var(--primary); }
.probe-cand .cn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.probe-cand .ca { flex: 0 0 auto; color: var(--text-3); font-size: 11px; }
.probe-cand.cur { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.probe-acts { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.probe-note { margin: 8px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.6; }

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow);
}
.toolbar .input { width: auto; flex: 0 1 240px; }
.count-text { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.count-text b { color: var(--text); }

/* ===== 表格 ===== */
.table-wrap {
  flex: 1;
  min-height: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
}

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  position: sticky; top: 0; z-index: 2;
  background: #fafbfd;
  text-align: left;
  font-weight: 600;
  color: var(--text-2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid #f0f2f7; vertical-align: top; }
.table tbody tr:hover { background: #f7fbff; }
.table .empty { text-align: center; color: var(--text-3); padding: 40px 12px; }

.name-cell { font-weight: 600; color: var(--text); }
.tel-cell { font-family: Consolas, Menlo, monospace; color: var(--success); white-space: nowrap; }
.tel-cell.none { color: var(--text-3); font-family: inherit; }
.tel-cell a { color: var(--success); text-decoration: none; font-family: Consolas, Menlo, monospace; }
.tel-cell a:hover { text-decoration: underline; }
.addr-cell { color: var(--text-2); }
.area-cell { color: var(--text-3); }
.tag {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  border-radius: 6px; padding: 2px 7px; font-size: 12px; white-space: nowrap;
}
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 0 6px 0 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
/* 1688 直达链接用橙色，和高德的蓝色区分开 */
a.ali-btn { color: #ea580c; text-decoration: none; font-weight: 600; }
a.ali-btn:hover { text-decoration: underline; }

/* ===== 弹窗 ===== */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  width: 520px; max-width: 100%; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(16,24,40,.24);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.notice { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.notice ol { margin: 8px 0 0; padding-left: 18px; }
.notice li { margin-bottom: 4px; }
.notice a { color: var(--primary); }
.notice .tip { margin: 10px 0 0; color: var(--text-3); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #1b2331; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 70vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--success); }

/* ===== 工商调查服务指示 ===== */
.gs-dot {
  margin-left: auto; flex-shrink: 0;
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid #e4e8f0; background: #f7f9fc; color: #8b96a8;
  white-space: nowrap; cursor: default;
}
.gs-dot.online { background: #e9f9f1; color: #0f8a5f; border-color: #b7e6cd; }
.gs-dot.offline { background: #fff8ec; color: #8a5a00; border-color: #ffe0b2; }
.gs-tip {
  margin-top: 8px; font-size: 12.5px; line-height: 1.7;
  background: #fff8ec; border: 1px solid #ffe0b2; color: #8a5a00;
  border-radius: 9px; padding: 9px 12px;
}
.gs-tip code {
  background: #fff; border: 1px solid #f0dcc0; border-radius: 5px;
  padding: 1px 6px; font-size: 12px; color: #6b4a00;
}
.gs-tip a { color: #0a84ff; }

/* ===== 工商档案卡 ===== */
.probe-gs { margin: 14px 0 18px; }
.probe-gs::after { content: ''; display: block; height: 1px; background: #eef1f6; margin-top: 16px; }
.probe-gs-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 600; color: #1b2331; margin-bottom: 10px;
  line-height: 1.5; min-height: 24px;
}
.probe-gs-tag {
  font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 20px;
  background: #e9f9f1; color: #0f8a5f; border: 1px solid #b7e6cd;
  display: inline-block; position: static; white-space: nowrap; flex: 0 0 auto;
}
.probe-gs-tag.warn { background: #fff8ec; color: #8a5a00; border-color: #ffe0b2; }
.probe-gs-kpi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-bottom: 10px;
}
.probe-gs-kpi div {
  background: #f7f9fc; border-radius: 9px; padding: 8px 11px;
}
.probe-gs-kpi b { display: block; font-size: 15px; font-weight: 600; word-break: break-all; }
.probe-gs-kpi span { font-size: 11.5px; color: #8b96a8; }
.probe-gs-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 2px; }
.probe-gs-table th, .probe-gs-table td {
  border-bottom: 1px solid #eef1f6; padding: 7px 8px; text-align: left; vertical-align: top;
}
.probe-gs-table th { width: 108px; color: #8b96a8; font-weight: 500; background: #fafbfd; }
.probe-gs-table td { word-break: break-all; }
.probe-gs-table td.scope { background: #fafbfd; font-size: 12.5px; line-height: 1.75; }
.probe-gs-table a { color: #0a84ff; text-decoration: none; }
.probe-gs-table a:hover { text-decoration: underline; }
.probe-gs-src { margin-top: 8px; font-size: 11.5px; color: #8b96a8; }
.probe-gs-src a { color: #8b96a8; }

/* ===== 更多获客渠道 ===== */
.seg-mini { padding: 0; background: transparent; border: none; display: inline-flex; }
.seg-mini .seg-item { font-size: 12px; padding: 5px 10px; }
.chan-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 10px; }
.chan-item {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line, #e5e7eb); border-radius: 8px;
  padding: 9px 12px; text-decoration: none; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.chan-item:hover { border-color: var(--pri, #2563eb); box-shadow: 0 2px 8px rgba(37,99,235,.10); transform: translateY(-1px); }
.chan-item .cl { font-size: 13.5px; font-weight: 600; color: var(--text, #111827); }
.chan-item small { font-size: 11.5px; color: #6b7280; line-height: 1.45; }
.chan-static .chan-item .cl { font-size: 13px; }
.src-tag {
  display: inline-block; font-size: 10.5px; line-height: 1; padding: 2.5px 5px;
  border-radius: 4px; background: #eef2ff; color: #4338ca; vertical-align: 1px; margin-left: 2px;
}
.auto-stat {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #f0f9ff; border: 1px solid #bae6fd;
  font-size: 13px; color: #0c4a6e; line-height: 1.7;
}

/* ===== 会员登录界面 ===== */
.login-mask {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a84ff 0%, #6d5ef0 55%, #9333ea 100%);
  padding: 20px;
}
body.locked .topbar, body.locked .layout, body.locked .progress-wrap { visibility: hidden; }

.login-card {
  width: 400px; max-width: 94vw;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .35);
  padding: 30px 30px 22px;
}
.login-logo {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 14px; background: var(--primary);
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-title { font-size: 17px; text-align: center; margin: 0 0 4px; }
.login-sub { font-size: 12px; color: var(--text-3); text-align: center; margin: 0 0 18px; }

.login-tabs {
  display: flex; background: #f1f4f9; border-radius: 10px; padding: 4px; margin-bottom: 16px;
}
.login-tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--text-2);
  padding: 7px 0; border-radius: 8px;
}
.login-tab.active { background: var(--card); color: var(--primary); box-shadow: 0 1px 4px rgba(16,24,40,.12); }

.login-remember { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.login-msg { min-height: 20px; font-size: 12.5px; margin: 4px 0 6px; }
.login-msg.bad { color: var(--danger); }
.login-msg.good { color: var(--success); }
.login-btn { width: 100%; padding: 10px 0; font-size: 15px; }
.login-foot { font-size: 11.5px; color: var(--text-3); text-align: center; margin: 12px 0 0; }

#memberChip { cursor: pointer; }
#memberChip.badge-ok { background: #e8f8f1; color: #0d8a5f; }
#memberChip.badge-warn { background: #fef3e2; color: #b45309; border-color: #fcd9a8; }
#memberChip.badge-bad { background: #fdeaea; color: #c02626; border-color: #f5c2c2; }

/* ===== 会员到期拦截页 ===== */
.vip-gate { text-align: center; padding: 6px 0 2px; }
.vip-gate.hidden { display: none !important; }
.vip-gate-icon { font-size: 40px; margin-bottom: 6px; }
.vip-gate-text {
  font-size: 14px; color: var(--text-2); line-height: 1.7;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; text-align: left;
}

/* ===== 会员充值中心 ===== */
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-card {
  position: relative; border: 2px solid #e2e8f0; border-radius: 12px;
  background: #fff; cursor: pointer; padding: 16px 8px 12px; text-align: center;
  font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan-card:hover { border-color: #b6d4fb; transform: translateY(-2px); }
.plan-card.sel { border-color: var(--primary); box-shadow: 0 6px 18px rgba(10,132,255,.18); }
.plan-name { display: block; font-size: 15px; color: var(--text-1); }
.plan-price { display: block; font-style: normal; font-size: 22px; font-weight: 700; color: var(--primary); margin: 6px 0 2px; }
.plan-unit { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); }
.plan-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
  background: #eef2f7; color: var(--text-2); border-radius: 999px; padding: 2px 8px;
}
.plan-tag.hot { background: #ffedd5; color: #c2410c; }
.plan-tag.best { background: #dcfce7; color: #15803d; }

/* ===== 响应式 ===== */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .panel { order: 2; }
  .content { order: 1; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .topbar { height: auto; padding: 10px 12px; flex-wrap: wrap; }
  .progress-wrap { top: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar .input { flex: 1 1 100%; }
  .plan-cards { grid-template-columns: 1fr; }
}

/* ===== 海关数据（UN Comtrade） ===== */
.seg-mini { flex-wrap: wrap; }

.cs-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.cs-sum .c {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.cs-sum .c b { display: block; font-size: 19px; color: var(--text); letter-spacing: -.2px; }
.cs-sum .c span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.cs-ins { margin-top: 12px; }
.cs-ins-item {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f0f7ff; border: 1px solid #d6e8ff; border-radius: 9px;
  padding: 9px 12px; margin-bottom: 8px; font-size: 12.8px; line-height: 1.65; color: #1e3a5f;
}
.cs-ins-item i {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff; font-style: normal; font-size: 11px;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.cs-ins-item.warn { background: #fff8ec; border-color: #fbe0b0; color: #7a4a00; }
.cs-ins-item.warn i { background: #d97706; }

.cs-bar-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 8px; }
.cs-bar-filters .seg-item { flex: 0 0 auto; font-size: 12px; padding: 4px 9px; }
.cs-bar-filters .grow { flex: 1; }

.cs-tblwrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 460px; }
.cs-tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.cs-tbl th {
  position: sticky; top: 0; z-index: 1; background: #f8fafc; color: var(--text-2);
  font-weight: 600; font-size: 11.8px; text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cs-tbl td { padding: 8px 10px; border-bottom: 1px solid #f2f5f9; vertical-align: middle; }
.cs-tbl tr:last-child td { border-bottom: 0; }
.cs-tbl tr:hover td { background: #fafcff; }
.cs-tbl th:last-child, .cs-tbl td:last-child { padding-right: 18px; }
.cs-tbl .rk { color: var(--text-3); width: 34px; font-variant-numeric: tabular-nums; }
.cs-tbl .mk { font-weight: 600; white-space: nowrap; }
.cs-tbl .mk small { display: block; font-weight: 400; color: var(--text-3); font-size: 10.5px; }
.cs-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-track { height: 6px; background: #eef1f6; border-radius: 999px; overflow: hidden; min-width: 54px; }
.cs-track i { display: block; height: 100%; background: linear-gradient(90deg, #7cb6ff, #0a84ff); border-radius: 999px; }
.cs-pill {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cs-pill.low { background: #e7f8ef; color: #0f7a52; }
.cs-pill.mid { background: #eef2f7; color: var(--text-2); }
.cs-pill.high { background: #fff1e6; color: #b45309; }
.cs-star { color: #d97706; font-size: 11px; }
.cs-empty { padding: 26px 10px; text-align: center; color: var(--text-3); font-size: 13px; }

@media (max-width: 640px) {
  .cs-sum { grid-template-columns: 1fr; }
}

/* ===== 一句话找客户（自然语言指令） ===== */
.fd-input {
  width: 100%; box-sizing: border-box; margin-top: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: 13.5px/1.7 "Microsoft YaHei", "PingFang SC", sans-serif; color: var(--text);
  background: #fff; resize: vertical; min-height: 64px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fd-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 132, 255, .12); }
.fd-input::placeholder { color: #a9b2bf; }

.fd-egs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fd-eg {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  border: 1px dashed #d3dbe6; background: #fff; color: var(--text-2);
  transition: all .15s; font-family: inherit;
}
.fd-eg:hover { border-color: var(--primary); color: var(--primary); background: #f5faff; border-style: solid; }

.fd-parse {
  margin-top: 10px; padding: 8px 12px; border-radius: 9px;
  background: #f5f9ff; border: 1px solid #dbe8ff;
}
.fd-prow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 12.5px; padding: 2px 0; color: var(--text-2);
}
.fd-prow b { color: #0b57d0; font-weight: 600; }
.fd-pk { color: var(--text-3); font-size: 11.5px; margin: 0 2px 0 8px; }
.fd-pk:first-child { margin-left: 0; }
.fd-prow.err { color: #b42318; }
.fd-ptag {
  margin-left: 6px; font-size: 11px; padding: 0 7px; border-radius: 999px;
  background: #e8f0ff; color: #0b57d0;
}

.fd-ctrl { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 12px; }
.fd-want-row { display: flex; align-items: center; gap: 6px; }
.fd-n {
  padding: 4px 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  font-size: 12px; color: var(--text-2); cursor: pointer; font-family: inherit; transition: all .15s;
}
.fd-n:hover { border-color: #9cc8ff; color: var(--primary); }
.fd-n.active { background: #eaf2ff; border-color: var(--primary); color: var(--primary); font-weight: 600; }
.fd-want-input { width: 76px; text-align: center; }
.fd-unit { font-size: 12px; color: var(--text-3); }

.fd-opts { display: flex; flex-wrap: wrap; gap: 14px; padding-bottom: 3px; }
.fd-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.fd-chk input { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }

.fd-stat { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.fd-stat-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.fd-stat-main b { font-size: 18px; color: var(--primary); margin: 0 2px; }
.fd-stat-sub { color: var(--text-3); font-size: 11.5px; }
.fd-track { height: 6px; border-radius: 999px; background: #e9eef6; overflow: hidden; margin-top: 8px; }
.fd-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7cb6ff, #0a84ff); transition: width .3s; }

.fd-log {
  margin-top: 10px; max-height: 160px; overflow: auto;
  font: 12px/1.75 ui-monospace, Consolas, "Courier New", monospace;
  padding: 2px 2px 2px 0;
}
.fd-li { display: flex; gap: 8px; }
.fd-t { flex: 0 0 auto; color: #a7b0bd; }
.fd-m { color: var(--text-2); word-break: break-all; }
.fd-li.ok .fd-m { color: #0f7a52; }
.fd-li.warn .fd-m { color: #b45309; }
.fd-li.err .fd-m { color: #b42318; }
.fd-li.dim .fd-m { color: var(--text-3); }

.fd-card { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fd-card h4 { margin: 0 0 10px; font-size: 14.5px; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fd-vtag { font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: #e9f9f1; color: #0f8a5f; }
.fd-vtag.warn { background: #fff5e6; color: #b45309; }
.fd-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 7px 16px; font-size: 12.8px; color: var(--text); }
.fd-kv .k { color: var(--text-3); margin-right: 6px; font-size: 12px; }
.fd-nodata { font-size: 12.5px; color: var(--text-2); background: #fff8ec; border: 1px solid #ffe3b8; border-radius: 8px; padding: 8px 10px; }
.fd-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.fd-links a {
  font-size: 12px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-2); text-decoration: none;
}
.fd-links a:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 640px) {
  .fd-ctrl { gap: 12px; }
  .fd-want-row { flex-wrap: wrap; }
  .fd-kv { grid-template-columns: 1fr; }
}

/* ===== 多渠道找客户：渠道开关 + 更多入口 ===== */
.fd-chans { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fd-chan-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fd-chan-tip { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.fd-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.fd-chip {
  font: 12.5px/1 "Microsoft YaHei", "PingFang SC", sans-serif;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  transition: all .15s; white-space: nowrap;
}
.fd-chip:hover { border-color: #9cc8ff; color: var(--primary); }
.fd-chip.active {
  background: #eaf2ff; border-color: var(--primary); color: #0b57d0; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, .12);
}
.fd-src-note { margin-top: 8px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.fd-src-note.warn { color: #b45309; }
.fd-src-note.err { color: #b42318; }

.fd-more-row { margin-top: 8px; }
.fd-more {
  width: 100%; font: 12.5px/1 "Microsoft YaHei", sans-serif; cursor: pointer;
  padding: 9px 12px; border: 1px dashed #d3dbe6; border-radius: 9px;
  background: #fbfcfe; color: var(--text-2); display: flex; align-items: center; justify-content: space-between;
  transition: all .15s;
}
.fd-more:hover { border-color: var(--primary); color: var(--primary); background: #f5faff; }
.fd-more span { color: var(--text-3); }

.fd-links-box { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; }
.fd-lg { margin-bottom: 12px; }
.fd-lg:last-of-type { margin-bottom: 6px; }
.fd-lg-t { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.fd-lg-b { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-lg-b a {
  font-size: 12px; padding: 4px 10px; border-radius: 7px; text-decoration: none;
  border: 1px solid var(--line); background: #fff; color: #0b57d0;
  transition: all .15s;
}
.fd-lg-b a:hover { border-color: var(--primary); background: #f2f8ff; }
.fd-lg-note { font-size: 11.5px; color: var(--text-3); line-height: 1.65; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }

@media (max-width: 640px) {
  .fd-chip { padding: 6px 10px; font-size: 12px; }
}

/* ===== 公司调查 · 渠道面板 ===== */
.src-btn {
  flex-shrink: 0; margin-left: 8px;
  font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid #e4e8f0; background: #f7f9fc; color: #55617a;
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.src-btn:hover { border-color: #c9d6f0; background: #eef3fd; color: #2b5bd7; }
.src-btn b { color: #2b5bd7; font-weight: 700; }

.src-panel {
  margin-top: 10px; border: 1px solid #e4e8f0; border-radius: 10px;
  background: #fbfcfe; overflow: hidden;
}
.src-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #f2f5fa; border-bottom: 1px solid #e9eef6;
  font-size: 12.5px; color: #33405a;
}
.src-sum { color: #8b96a8; font-size: 11.5px; }
.src-x {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: #8b96a8; padding: 0 2px;
}
.src-x:hover { color: #33405a; }
.src-body {
  max-height: 300px; overflow-y: auto; padding: 8px 12px 10px;
  -webkit-overflow-scrolling: touch;
}
.src-group { font-size: 11.5px; color: #8b96a8; margin: 8px 0 4px; }
.src-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px dashed #eef2f8; font-size: 12.5px; color: #33405a;
}
.src-row:last-child { border-bottom: 0; }
.src-name { flex-shrink: 0; min-width: 88px; font-weight: 600; }
.src-note { flex: 1; color: #8b96a8; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-tag {
  flex-shrink: 0; font-size: 11px; padding: 1px 7px; border-radius: 10px;
  border: 1px solid #e4e8f0; background: #f7f9fc; color: #8b96a8;
}
.src-tag.ok { background: #e9f9f1; color: #0f8a5f; border-color: #b7e6cd; }
.src-tag.cool { background: #fff8ec; color: #8a5a00; border-color: #ffe0b2; }
.src-tag.off { background: #f4f5f7; color: #a4adbd; }
@media (max-width: 640px) {
  .src-note { display: none; }
  .src-name { min-width: 0; flex: 1; }
  .src-btn { margin-left: 6px; }
}

/* ===== 社媒一键采集面板（抖音 / 快手 / 小红书） ===== */
.soc-box {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 16px; background: #fff;
}
.soc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.soc-head b { font-size: 14px; }
.soc-local {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 9px; border: 1px solid #fcd34d; background: #fffbeb;
  margin-bottom: 10px; font-size: 12.5px;
}
.soc-grid { display: grid; grid-template-columns: 1fr 1.3fr .8fr .8fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 760px) { .soc-grid { grid-template-columns: 1fr 1fr; } }
.soc-log {
  margin: 10px 0 0; padding: 10px 12px; max-height: 220px; overflow: auto;
  background: #0f172a; color: #cbd5e1; border-radius: 9px;
  font: 12px/1.55 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-all;
}
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

/* ===== 电脑版下载入口 ===== */
.dl-row {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.dl-btn { width: 100%; text-decoration: none; display: block; text-align: center; font-size: 13.5px; }
.dl-btn:hover { text-decoration: none; }
.dl-tip { font-size: 11.5px; color: var(--text-3); text-align: center; line-height: 1.5; }
.dl-top { text-decoration: none; display: inline-flex; align-items: center; }
.dl-top:hover { text-decoration: none; }
body.is-desktop .dl-row, body.is-desktop .dl-top, body.is-desktop #dlRow, body.is-desktop #btnDownloadPC2 { display: none !important; }

/* ===== 启动遮罩（防止登录页跳出来之前闪一下系统界面） ===== */
.boot-splash {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #0a84ff 0%, #6d5ef0 55%, #9333ea 100%);
  color: #fff; font-family: inherit;
}
.boot-logo {
  width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; margin-bottom: 4px;
}
.boot-title { font-size: 15px; font-weight: 600; letter-spacing: .5px; opacity: .95; }
.boot-txt { font-size: 12.5px; opacity: .8; }
body:not(.booting) .boot-splash { display: none; }
body.booting .topbar, body.booting .layout, body.booting .progress-wrap { visibility: hidden; }

/* ===== FB 自动投流 ===== */
.fb-card { margin-top: 16px; }
.fb-acc { padding: 10px 14px; background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.8; }
.fb-acc b { font-size: 14px; }
.fb-acc .ok { color: #0a7d34; } .fb-acc .bad { color: #c62828; }
.fb-camp-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.fb-camp-item .fb-name { font-weight: 600; min-width: 180px; }
.fb-camp-item .fb-meta { color: #667; font-size: 12px; }
.fb-pill { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.fb-pill.active { background: #e2f5e9; color: #0a7d34; }
.fb-pill.paused { background: #fff2e0; color: #a15c00; }
.fb-pill.other { background: #eef0f5; color: #556; }
.fb-geo { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.fb-rule { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; font-size: 13px; }
.fb-rule-warn { background: #fffaf0; border-color: #f0ddb8; }
.fb-num { width: 84px; display: inline-block; padding: 4px 8px; margin: 0 2px; }
.fb-log { max-height: 260px; overflow: auto; background: #10141d; color: #cfe3cf; font: 12px/1.7 Consolas, monospace; padding: 10px 12px; border-radius: 10px; margin-top: 10px; white-space: pre-wrap; word-break: break-all; }
.fb-log .fb-lv-warn { color: #ffd479; } .fb-log .fb-lv-error { color: #ff8a80; }
.fb-err { margin-top: 8px; color: #c62828; font-size: 13px; }
.fb-out { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f6f8fc; border: 1px solid var(--line); font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-all; }
.fb-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.fb-kpi .stat b { color: #0a84ff; }
/* ===== FB AI 混剪 ===== */
.fb-mix-list { margin-top: 8px; }
.fb-mix-list .fb-camp-item .fb-name { min-width: 120px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-mix-preview { display: flex; justify-content: center; margin: 10px 0; }
.fb-mix-preview canvas { max-width: 230px; max-height: 410px; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.fb-mix-bar { height: 10px; border-radius: 999px; background: #eef0f5; overflow: hidden; margin: 8px 0; }
.fb-mix-bar-in { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #1877f2, #45bd62); transition: width .2s; }
.fb-acc-cur { border-color: #1877f2; background: #f0f6ff; }

/* ===== 移动端适配：修手机端排版遮挡/横向溢出 ===== */
@media (max-width: 760px) {
  /* 布局轨道用 minmax(0,1fr)：内容再宽也只在卡片内部，不把整页撑破 */
  .layout { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .panel, .content, .card { min-width: 0; max-width: 100%; }
  html, body { overflow-x: hidden; }
  /* 顶栏：按钮多就换行，不再横向顶破 */
  .topbar { flex-wrap: wrap; height: auto; min-height: 0; padding: 8px 10px; row-gap: 6px; }
  .topbar-right { flex-wrap: wrap; width: 100%; row-gap: 6px; }
  .brand { min-width: 0; }
  /* 按钮文字允许换行（「开始实时拓客」等不再撑宽） */
  .btn { white-space: normal; }
  /* 双列表单行：放不下自动上下堆叠（年龄 min/max 这类窄列仍并排） */
  .row { flex-wrap: wrap; }
  .row .col { flex: 1 1 150px; min-width: 0; }
  /* 通用卡片头允许换行 */
  .card-head { flex-wrap: wrap; }
  /* 登录卡：贴屏宽，不再被裁 */
  .login-card { width: 100%; max-width: 100%; padding: 22px 18px 16px; }
  /* FB 卡片头：标题独占一行，8 个页签横向滑动 */
  .fb-card .card-head .card-title { width: 100%; margin-bottom: 6px; }
  .fb-card .seg-mini { display: flex; width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .fb-card .seg-mini .seg-item { flex: 0 0 auto; white-space: nowrap; }
  .fb-camp-item .fb-name { min-width: 0; flex: 1 1 100%; }
  .fb-kpi { grid-template-columns: repeat(2, 1fr); }
  .probe-bar { flex-wrap: wrap; }
  /* 长表格在卡片内横向滚动 */
  .cs-tblwrap { max-width: 100%; }
}
@media (max-width: 760px) {
  /* 「公司调查」卡头：徽章/渠道按钮换到下一行，不再挤占说明文字 */
  .probe-head { flex-wrap: wrap; }
  .probe-headtext { flex: 1 1 100%; }
  .probe-head .gs-dot, .probe-head .src-btn { flex: 0 0 auto; }
  .probe-head .probe-sub { width: 100%; }
}
@media (max-width: 760px) {
  /* 所有卡片头里的页签（更多获客渠道/FB 等）：标题独占一行，页签横向滑动，不再被卡片裁切 */
  .card-head { justify-content: flex-start; }
  .card-head .seg-mini {
    display: flex; width: 100%; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px; margin-bottom: 8px;
  }
  .card-head .seg-mini .seg-item { flex: 0 0 auto; white-space: nowrap; }
  .probe-head { justify-content: flex-start; }
}
@media (max-width: 760px) {
  /* 根治：.layout 是定高 grid（flex:1），单列后两行被压扁互相重叠遮挡。
     手机端改 flex 纵向流（保留 内容在前、表单面板在后 的顺序），内容自然撑开、整页竖向滚动。 */
  .layout { display: flex; flex-direction: column; flex: 0 0 auto; height: auto; min-height: 0; padding: 10px; }
  .panel, .content {
    flex: 0 0 auto; height: auto; max-height: none; min-height: 0; width: 100%;
    overflow: visible; padding-right: 0;
  }
  .card { margin-bottom: 12px; flex: 0 0 auto; }
}

/* ---------- 站点页脚（ICP / 公安备案号，由 site.js 渲染） ---------- */
.site-foot{flex:0 0 auto;display:flex;justify-content:center;align-items:center;gap:8px;
  padding:6px 12px 8px;font-size:11.5px;line-height:1.4;color:var(--text-3);
  flex-wrap:wrap;text-align:center}
.site-foot a{color:var(--text-3);text-decoration:none}
.site-foot a:hover{color:var(--primary);text-decoration:underline}
.site-foot .sf-sep{opacity:.6}
@media(max-width:520px){ .site-foot{font-size:11px;gap:6px;padding:4px 10px 6px} }

/* ---------- 客户跟进：待办角标 / 统计格可点 ---------- */
.stat.clickable{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.stat.clickable.active{background:var(--primary-soft);border-radius:10px}
.stat.clickable.active b{color:var(--primary)}
.due-badge{margin-top:4px;font-size:10.5px;line-height:1.3;font-weight:600}
.due-badge.over{color:#e5484d}
.due-badge.today{color:#e08a00}
