* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.7;
  font-size: 14px;
}

/* ===== 顶部横幅 ===== */
.banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 30px 40px 24px;
}
.banner-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.banner h1 { font-size: 24px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.logo-img { height: 36px; width: auto; vertical-align: middle; }
.banner .subtitle { font-size: 13px; color: #a0aec0; margin-top: 2px; }
.api-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px; font-size: 13px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
}
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: #a0aec0; }
.badge-dot.ok { background: #48bb78; box-shadow: 0 0 6px #48bb78; }
.badge-dot.err { background: #f56565; box-shadow: 0 0 6px #f56565; }
.meta-bar {
  display: flex; gap: 24px; margin-top: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: #cbd5e0;
}
.meta-bar code { background: rgba(255,255,255,0.12); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.meta-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: #38b2ac; display: inline-block; margin-right: 6px; }

.container { max-width: 1280px; margin: 0 auto; padding: 24px 24px 40px; }

/* ===== 概览统计 ===== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 16px 18px;
  border: 1px solid #e8ecf1; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat-label { font-size: 13px; color: #4a5568; font-weight: 600; }
.stat-value { font-size: 30px; font-weight: 800; margin-top: 4px; color: #0f3460; }
.stat-sub { font-size: 12px; color: #8896a6; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub.ok { color: #389e0d; }
.stat-sub.err { color: #c53030; }

/* ===== 卡片 ===== */
.card {
  background: #fff; border-radius: 12px; padding: 22px 24px;
  margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf1;
}
.card-title {
  font-size: 17px; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-title .icon {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.card-desc { font-size: 13px; color: #8896a6; margin-bottom: 12px; }

.owner-tag { font-size: 11px; padding: 2px 9px; border-radius: 4px; font-weight: 600; }
.tag-blue { background: #e6f7ff; color: #096dd9; }
.tag-green { background: #f6ffed; color: #389e0d; }
.tag-orange { background: #fff7e6; color: #d46b08; }

.push-hint { font-size: 12px; color: #718096; background: #f8fafc; border: 1px dashed #d1dae3; border-radius: 6px; padding: 6px 10px; margin-bottom: 12px; }
.push-hint .url { font-family: Consolas, monospace; color: #096dd9; word-break: break-all; }

/* ===== 三窗口 ===== */
.windows-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.window .list-body {
  max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.empty-tip {
  text-align: center; color: #a0aec0; font-size: 13px; padding: 36px 0;
  border: 2px dashed #e2e8f0; border-radius: 8px;
}

/* 通用数据卡片 */
.item-card {
  border: 1px solid #e8ecf1; border-radius: 8px; padding: 12px 14px; background: #fcfdfe;
}
.item-card .item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.item-card .item-title { font-weight: 700; font-size: 14px; }
.item-card .item-sub { font-size: 12px; color: #718096; }
.item-card .item-time { font-size: 11px; color: #a0aec0; margin-left: auto; }
.item-card .item-body { font-size: 13px; color: #2d3748; margin-top: 6px; }

/* 优先级 / 状态 标签 */
.pri { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.pri-high { background: #fff1f0; color: #cf1322; }
.pri-medium { background: #fff7e6; color: #d46b08; }
.pri-low { background: #e6f7ff; color: #096dd9; }
.st-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.st-pending { background: #f0f5ff; color: #2f54eb; }
.st-transit { background: #e6f7ff; color: #096dd9; }
.st-delivered { background: #f6ffed; color: #389e0d; }
.st-exception { background: #fff1f0; color: #cf1322; }

/* 关键词 chips */
.kw { display: inline-block; background: #eef2f7; color: #4a5568; font-size: 11px; padding: 1px 8px; border-radius: 10px; margin: 2px 3px 0 0; }

/* 跟进类别 */
.cat { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; }
.cat-a { background: #096dd9; }
.cat-b { background: #389e0d; }
.cat-c { background: #d46b08; }
.cat-d { background: #722ed1; }
.cat-e { background: #cf1322; }

/* 轨迹时间线 */
.tl { border-left: 2px solid #e2e8f0; margin: 8px 0 0 6px; padding-left: 12px; display: flex; flex-direction: column; gap: 6px; }
.tl .tl-item { font-size: 12px; color: #4a5568; position: relative; }
.tl .tl-item::before { content: ""; position: absolute; left: -17px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #38b2ac; border: 2px solid #fff; }
.tl .tl-time { font-size: 11px; color: #a0aec0; }

/* 跟进元信息 */
.follow-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #4a5568; }
.follow-meta b { color: #1a1a2e; }

/* ===== 测试面板 ===== */
.btn-ghost {
  margin-left: auto; background: transparent; border: 1px solid #d1dae3; color: #4a5568;
  border-radius: 6px; padding: 4px 14px; font-size: 12.5px; cursor: pointer;
}
.btn-ghost:hover { background: #f7fafc; }
.test-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.test-tab {
  border: 1px solid #d1dae3; background: #f7fafc; color: #4a5568;
  border-radius: 6px; padding: 5px 14px; font-size: 12.5px; cursor: pointer;
}
.test-tab.active { background: #0f3460; color: #fff; border-color: #0f3460; }
.test-area textarea {
  width: 100%; min-height: 220px; font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12.5px; padding: 12px; border: 1px solid #d1dae3; border-radius: 8px;
  background: #fcfdff; resize: vertical; color: #1a1a2e;
}
.test-ctrl { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.btn-fill, .btn-send {
  border: none; border-radius: 6px; padding: 6px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.btn-fill { background: #eef2f7; color: #2d3748; }
.btn-send { background: #0f3460; color: #fff; }
.btn-send:hover { background: #1a4a8a; }
.send-result { font-size: 12.5px; color: #389e0d; }
.send-result.err { color: #cf1322; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
th {
  background: #f7fafc; color: #4a5568; font-weight: 600;
  text-align: left; padding: 9px 12px; border-bottom: 2px solid #e2e8f0; font-size: 12.5px;
}
td { padding: 9px 12px; border-bottom: 1px solid #edf2f7; color: #2d3748; vertical-align: top; word-break: break-all; }
tr:last-child td { border-bottom: none; }
td code { background: #f0f4ff; color: #0f3460; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

.alert {
  border-left: 4px solid #0f3460; background: #f0f4ff;
  padding: 11px 14px; border-radius: 0 8px 8px 0; margin-top: 12px;
  font-size: 13px; color: #2d3748;
}
.alert strong { color: #0f3460; }
.alert code { background: #e4ecff; padding: 1px 6px; border-radius: 4px; }

.footer { text-align: center; padding: 24px; color: #a0aec0; font-size: 12.5px; }
.footer hr { border: none; border-top: 1px solid #e2e8f0; max-width: 180px; margin: 0 auto 14px; }

/* ===== 视图切换 ===== */
.view { display: block; }
.view[hidden] { display: none; }

/* ===== 顶部设置按钮 ===== */
.banner-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-settings {
  background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; padding: 8px 18px; font-size: 14px; cursor: pointer; font-weight: 600;
  transition: background 0.2s;
}
.btn-settings:hover { background: rgba(255,255,255,0.25); }
.btn-logout {
  background: rgba(255,255,255,0.08); color: #fbd38d; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; font-weight: 600;
  transition: background 0.2s;
}
.btn-logout:hover { background: rgba(229,62,62,0.2); border-color: rgba(229,62,62,0.5); }
.btn-logout[hidden], .btn-settings[hidden] { display: none; }

/* 当前登录用户徽标 */
.user-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 右上角锁定销售徽标 */
.locked-sales-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.08); border: 1px dashed rgba(255,255,255,0.25);
  color: #cbd5e0; max-width: 320px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.locked-sales-badge.active {
  background: rgba(212,107,8,0.15); border: 1px solid rgba(212,107,8,0.5);
  color: #ffc069; box-shadow: 0 0 8px rgba(212,107,8,0.2);
}

/* ===== 首页大数字卡片 ===== */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.big-card {
  background: #fff; border-radius: 16px; padding: 36px 28px; text-align: center;
  border: 1px solid #e8ecf1; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.big-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.big-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.card-a::before { background: linear-gradient(90deg, #096dd9, #69b1ff); }
.card-b::before { background: linear-gradient(90deg, #389e0d, #95de64); }
.card-c::before { background: linear-gradient(90deg, #d46b08, #ffc069); }
.card-d::before { background: linear-gradient(90deg, #cf1322, #ff7875); }
.big-card-icon { font-size: 42px; margin-bottom: 8px; }
.big-card-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }
.big-card-number { font-size: 56px; font-weight: 800; color: #0f3460; line-height: 1; }
.card-a .big-card-number { color: #096dd9; }
.card-b .big-card-number { color: #389e0d; }
.card-c .big-card-number { color: #d46b08; }
.card-d .big-card-number { color: #cf1322; }
.big-card-desc { font-size: 14px; color: #8896a6; margin-top: 6px; }
.big-card-hint { font-size: 13px; color: #a0aec0; margin-top: 16px; font-weight: 600; }
/* 首页大卡片右上角的刷新按钮（被客户删除卡片） */
.big-card-refresh {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #ffd6d6; background: #fff5f5; color: #cf1322;
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: background 0.2s, transform 0.4s;
}
.big-card-refresh:hover { background: #ffe3e3; }
.big-card-refresh:active { transform: rotate(180deg); }
.big-card-refresh:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 意见反馈栏（首页底部）===== */
.feedback-bar {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 16px;
  padding: 22px 24px; margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fb-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.feedback-bar.fb-active { border-color: #b3d8ff; box-shadow: 0 2px 12px rgba(9,109,217,0.12); }
.fb-title { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.fb-tip { font-size: 13px; color: #8896a6; }
.fb-input {
  width: 100%; min-height: 92px; resize: vertical;
  border: 1px solid #d1dae3; border-radius: 10px; padding: 12px 14px;
  font-size: 14px; line-height: 1.6; color: #2d3748; font-family: inherit;
  box-sizing: border-box; outline: none; transition: border-color 0.2s;
}
.fb-input:focus { border-color: #096dd9; }
.fb-imgs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.fb-imgs:empty { display: none; }
.fb-thumb { position: relative; width: 96px; height: 96px; border: 1px solid #e6eaf0; border-radius: 8px; overflow: hidden; background: #fff; }
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; line-height: 17px; text-align: center; border: 1px solid #d9dee6; border-radius: 50%; background: rgba(255,255,255,0.94); color: #c53030; font-size: 15px; cursor: pointer; padding: 0; }
.fb-thumb-del:hover { background: #c53030; color: #fff; border-color: #c53030; }
.fb-imgtip { font-size: 12.5px; color: #a0aec0; }
.fb-item-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fb-item-img img { width: 96px; height: 96px; object-fit: cover; border: 1px solid #e6eaf0; border-radius: 8px; background: #fff; display: block; }
.fb-item-img:hover img { border-color: #096dd9; }
.fb-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.fb-contact {
  flex: 1; min-width: 200px;
  border: 1px solid #d1dae3; border-radius: 10px; padding: 9px 12px;
  font-size: 14px; color: #2d3748; outline: none; box-sizing: border-box;
}
.fb-contact:focus { border-color: #096dd9; }
.fb-count { font-size: 12.5px; color: #a0aec0; min-width: 56px; }
.sync-result.ok { color: #389e0d; }

/* ===== 意见反馈：管理员收到的列表 ===== */
.feedback-admin-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.fb-item { border: 1px solid #eef1f5; border-radius: 10px; padding: 12px 14px; background: #fcfdfe; }
.fb-item-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-item-who { font-size: 13px; font-weight: 600; color: #2d3748; }
.fb-item-time { font-size: 12px; color: #a0aec0; margin-left: auto; }
.fb-item-content { font-size: 14px; line-height: 1.7; color: #2d3748; white-space: normal; word-break: break-word; }
.fb-item-contact { margin-top: 6px; font-size: 13px; color: #d46b08; }
.fb-empty { font-size: 13.5px; color: #8896a6; padding: 10px 0; }
.fb-empty.err { color: #cf1322; }

/* ===== 详情页头部 ===== */
.detail-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.detail-header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.btn-back {
  background: #f7fafc; border: 1px solid #d1dae3; color: #4a5568;
  border-radius: 8px; padding: 7px 16px; font-size: 14px; cursor: pointer; font-weight: 600;
  transition: background 0.2s;
}
.btn-back:hover { background: #e6ecf5; }
.detail-header .owner-tag { font-size: 13px; padding: 3px 12px; }

/* ===== 设置页 ===== */
.settings-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.switch-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch-label input { width: 18px; height: 18px; cursor: pointer; }
.settings-hint { font-size: 13px; color: #8896a6; }
.settings-hint.active { color: #d46b08; }

.sales-manage { border-top: 1px solid #edf2f7; padding-top: 16px; }
.sales-add-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sales-sync-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sync-result { font-size: 12.5px; color: #389e0d; }
.sync-result.err { color: #cf1322; }
.sales-sync-row .btn-fill:disabled { opacity: 0.6; cursor: not-allowed; }
.sales-search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sales-search-row input[type="text"] {
  flex: 1; min-width: 220px; padding: 8px 12px; border: 1px solid #d1dae3;
  border-radius: 8px; font-size: 14px; background: #fcfdff;
}
.sales-search-row input[type="text"]:focus { outline: none; border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,0.08); }
.search-count { font-size: 12.5px; color: #8896a6; white-space: nowrap; }
.sales-add-row input {
  flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #d1dae3;
  border-radius: 8px; font-size: 14px; background: #fcfdff;
}
.sales-add-row input:focus { outline: none; border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,0.08); }
.sales-list { display: flex; flex-direction: column; gap: 8px; }
.sale-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid #e8ecf1; border-radius: 8px; background: #fcfdff;
}
.sale-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.sale-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.sale-item .sale-name { font-size: 14px; font-weight: 600; color: #2d3748; }
.sale-item.locked { border-color: #d46b08; background: #fffbe6; }
.sale-item .sale-remove {
  background: transparent; border: none; color: #c53030; cursor: pointer;
  font-size: 16px; padding: 2px 8px; border-radius: 4px;
}
.sale-item .sale-remove:hover { background: #fff1f0; }
.sale-empty { text-align: center; color: #a0aec0; font-size: 13px; padding: 20px 0; }

/* ===== 账号管理 ===== */
.acct-add-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.acct-add-row input, .acct-add-row select {
  padding: 8px 12px; border: 1px solid #d1dae3; border-radius: 8px; font-size: 13px; background: #fff;
}
.acct-add-row input { min-width: 130px; }
.acct-add-row select { cursor: pointer; }
.acct-add-row input:focus, .acct-add-row select:focus {
  outline: none; border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,0.08);
}
.acct-list { display: flex; flex-direction: column; gap: 8px; }
.acct-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fcfdff; border: 1px solid #e8ecf1; border-radius: 10px; padding: 10px 14px;
}
.acct-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.acct-username { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.acct-sales { font-size: 12.5px; color: #718096; }
.acct-hint { font-size: 12px; color: #a0aec0; }
.acct-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-ghost.danger { color: #c53030; border-color: #f3b8b8; }
.btn-ghost.danger:hover { background: #fff1f0; }

/* 绑定销售名勾选器 */
.acct-sales-picker {
  border: 1px dashed #d9c08a; background: #fffdf5; border-radius: 10px;
  padding: 12px 14px; margin: 0 0 12px;
}
.acct-sales-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.acct-sales-picker-head > span { font-weight: 700; font-size: 13.5px; color: #7c5a10; }
.acct-sales-picker-head .btn-ghost {
  padding: 5px 12px; font-size: 12.5px;
  background: #fff; border: 1px solid #e0d3a8;
}
.acct-sales-picker > input[type="text"] {
  width: 100%; padding: 9px 12px; border: 1px solid #e0d3a8; border-radius: 8px;
  font-size: 13px; background: #fff; margin-bottom: 8px; box-sizing: border-box;
}
.acct-sales-picker > input[type="text"]:focus {
  outline: none; border-color: #b98a2e; box-shadow: 0 0 0 3px rgba(185,138,46,0.12);
}
.acct-sales-picker-ops {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.acct-sales-picker-ops .sync-result { flex: 1; }
.acct-sales-options {
  display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow-y: auto;
  padding: 4px 2px;
}
.acct-sales-option {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid #e8ecf1; border-radius: 16px;
  background: #fff; font-size: 13px; cursor: pointer; color: #2d3748;
  transition: all 0.15s; user-select: none;
}
.acct-sales-option:hover { border-color: #b98a2e; background: #fffaf0; }
.acct-sales-option.on {
  background: #fff1cf; border-color: #b98a2e; color: #7c5a10; font-weight: 600;
}
.acct-sales-option input { accent-color: #b98a2e; cursor: pointer; }
.acct-sales-option .chk { pointer-events: none; }

/* API 入口配置 */
.api-config-list { display: flex; flex-direction: column; gap: 16px; }
.api-config-item {
  border: 1px solid #e8ecf1; border-radius: 10px; padding: 16px; background: #fcfdff;
}
.api-config-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.api-config-name { font-size: 14px; font-weight: 700; color: #2d3748; }
.api-config-input { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.api-config-input input[type="text"] {
  flex: 1; min-width: 280px; padding: 8px 12px; border: 1px solid #d1dae3;
  border-radius: 8px; font-size: 13px; font-family: Consolas, monospace; background: #fff;
}
.api-config-input input:focus { outline: none; border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,0.08); }
.btn-fetch {
  background: #eef2f7; color: #2d3748; border: 1px solid #d1dae3;
  border-radius: 6px; padding: 7px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
  white-space: nowrap;
}
.btn-fetch:hover { background: #e6ecf5; }
.btn-fetch.fetching { color: #096dd9; border-color: #096dd9; }
.fetch-result { font-size: 12.5px; color: #389e0d; }
.fetch-result.err { color: #cf1322; }

.btn-save-settings {
  border: none; border-radius: 8px; padding: 10px 28px; font-size: 15px; cursor: pointer;
  font-weight: 700; background: #0f3460; color: #fff; margin-top: 18px;
}
.btn-save-settings:hover { background: #1a4a8a; }
.save-result { font-size: 13px; color: #389e0d; margin-left: 10px; }
.save-result.err { color: #cf1322; }

/* ===== 快递轨迹视图 ===== */
.btn-refresh {
  background: #f7fafc; border: 1px solid #d1dae3; color: #4a5568;
  border-radius: 8px; padding: 7px 16px; font-size: 14px; cursor: pointer; font-weight: 600;
  margin-left: auto; transition: background 0.2s;
}
.btn-refresh:hover { background: #e6ecf5; }
.btn-refresh:disabled { opacity: 0.6; cursor: not-allowed; }
.express-status-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e8ecf1; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px;
}
.express-generated { font-size: 12px; color: #8896a6; }
.express-error { font-size: 12.5px; color: #cf1322; }
.express-summary {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.express-sum-item {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 10px;
  padding: 12px 20px; text-align: center; min-width: 90px;
  cursor: pointer; transition: all 0.2s;
}
.express-sum-item:hover { border-color: #185abd; box-shadow: 0 2px 6px rgba(24,90,189,0.12); }
.express-sum-item.active { background: #eef4ff; border-color: #185abd; }
.express-sum-item.active .express-sum-value { color: #185abd; }
.express-sum-value { font-size: 24px; font-weight: 800; color: #0f3460; }
.express-sum-item.warn .express-sum-value { color: #d46b08; }
.express-sum-label { font-size: 12px; color: #8896a6; margin-top: 2px; }

/* 快递搜索栏：关键词搜索 + 销售搜索 */
.express-search-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.express-search-field {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e0e4ea; border-radius: 10px;
  padding: 8px 12px;
}
.express-search-field:focus-within { border-color: #185abd; box-shadow: 0 0 0 3px rgba(24,90,189,0.1); }
.express-search-icon { font-size: 14px; opacity: 0.6; }
.express-search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: #1a1a2e;
}
.express-search-clear {
  border: 1px solid #e0e4ea; background: #fff; color: #8896a6;
  border-radius: 8px; width: 34px; height: 38px; cursor: pointer; font-size: 14px;
}
.express-search-clear:hover { background: #f5f6f8; color: #d46b08; }
.express-sales-search {
  width: 100%; box-sizing: border-box; margin-bottom: 10px;
  border: 1px solid #e0e4ea; border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.express-sales-search:focus { outline: none; border-color: #185abd; }
.express-sales-empty { font-size: 12px; color: #a0aec0; padding: 4px 0; }
.express-list { display: flex; flex-direction: column; gap: 16px; }
.express-order {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.express-order.need { border-left: 4px solid #d46b08; background: #fffdf7; }
.express-order.done { border-left: 4px solid #48bb78; }
.express-order-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.express-order-id { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.copy-btn {
  margin-left: 2px; padding: 1px 6px; font-size: 12px; line-height: 1;
  border: 1px solid #c7d2e6; background: #f5f8ff; color: #3b5b8c;
  border-radius: 6px; cursor: pointer; transition: all .15s;
}
.copy-btn:hover { background: #e6eeff; border-color: #9db8e0; }
.copy-btn:active { transform: scale(.94); }
.express-sales {
  font-size: 12px; font-weight: 600; color: #7c3aed;
  background: #f3e8ff; border: 1px solid #e9d5ff;
  padding: 1px 8px; border-radius: 10px;
}
.express-filter-tip {
  font-size: 13px; color: #7c3aed; background: #f5f0ff;
  border: 1px dashed #d8c9f5; border-radius: 8px;
  padding: 8px 14px; margin-bottom: 14px;
}
.express-filter-tip.active { display: block; }
.express-order-time { font-size: 12px; color: #a0aec0; margin-left: auto; }
.express-order-info {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px; color: #4a5568; margin-bottom: 8px;
}
.express-addr { font-size: 12.5px; color: #718096; word-break: break-all; }
.express-goods { margin-bottom: 10px; }
.express-track {
  border-top: 1px dashed #e2e8f0; padding-top: 10px; margin-top: 10px;
}
.express-track-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.express-track-head code {
  background: #f0f4ff; color: #0f3460; padding: 1px 8px; border-radius: 4px; font-size: 12px;
}
.express-route-error { font-size: 13px; color: #cf1322; }
.express-route-empty { font-size: 12.5px; color: #a0aec0; }

/* 快递视图工具栏：签收分类 + 一键收起 */
.express-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.express-tabs { display: flex; gap: 8px; }
.express-tab {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: #4a5568;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.express-tab:hover { border-color: #185abd; color: #185abd; }
.express-tab.active { background: #185abd; color: #fff; border-color: #185abd; }
.express-tab.active b { color: #fff; }
.express-tab b { color: #185abd; }
.express-collapse-all {
  margin-left: auto; background: #fff; border: 1px solid #d46b08; color: #d46b08;
  border-radius: 20px; padding: 7px 16px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.express-collapse-all:hover { background: #fffdf7; }
.express-collapse-all:disabled { opacity: 0.5; cursor: not-allowed; }

/* 收起/展开交互 */
.express-order-head { cursor: pointer; user-select: none; }
.express-order-head:hover .express-order-id { color: #185abd; }
.express-track-head { cursor: pointer; user-select: none; }
.express-track-head:hover code { background: #dbe7ff; }
.express-caret {
  font-size: 11px; color: #718096; width: 14px; flex: none;
  transition: transform 0.15s;
}
.express-order.collapsed { padding: 12px 18px; }
.express-order.collapsed .express-order-tracks { display: none; }
.express-order-basic { padding-bottom: 2px; }
.express-track.collapsed .tl,
.express-track.collapsed .express-route-error,
.express-track.collapsed .express-route-empty { display: none; }
.express-track.collapsed .express-track-head { margin-bottom: 0; }

/* 发货日期筛选 */
.express-date-filter {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.express-date-label { font-size: 13px; color: #4a5568; font-weight: 600; }
.express-date-filter input[type="date"] {
  border: 1px solid #e2e8f0; border-radius: 6px; padding: 5px 8px;
  font-size: 13px; color: #1a1a2e; font-family: inherit;
}
.express-date-btn {
  background: #185abd; color: #fff; border: none; border-radius: 6px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.express-date-btn.ghost { background: #fff; color: #4a5568; border: 1px solid #e2e8f0; }
.express-date-btn:hover { opacity: 0.92; }

/* 按销售分类（可收起） */
.express-sales-filter {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 10px;
  margin-bottom: 14px; overflow: hidden;
}
.express-sales-filter-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: #1a1a2e;
  cursor: pointer; user-select: none; background: #f8fafc;
}
.express-sales-filter-head:hover { background: #eef4ff; }
.express-sales-filter-body { padding: 12px 14px; }
.express-sales-filter-body.collapsed { display: none; }
.express-sales-list { display: flex; flex-wrap: wrap; gap: 8px; }
.express-sales-chip {
  background: #f0f4ff; border: 1px solid #dbe7ff; color: #185abd;
  border-radius: 16px; padding: 5px 12px; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.express-sales-chip:hover { background: #dbe7ff; }
.express-sales-chip.active { background: #185abd; color: #fff; border-color: #185abd; }
.express-sales-chip.active b { color: #fff; }
.express-sales-chip b { color: #185abd; margin-left: 3px; }
.express-sales-empty { font-size: 13px; color: #a0aec0; }
.express-ship-date {
  font-size: 11.5px; color: #718096; background: #f0f2f5;
  padding: 1px 7px; border-radius: 10px;
}

/* 被客户删除：销售卡片选中态与筛选条 */
.deleted-owner-card { cursor: pointer; }
.deleted-owner-card.selected {
  border-color: #cf1322; box-shadow: 0 0 0 2px rgba(207, 19, 34, 0.15);
  background: #fff5f5;
}
.deleted-filter-bar {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #4a5568;
  background: #fff5f5; border: 1px solid #ffccc7; border-radius: 8px;
  padding: 8px 14px; margin-bottom: 12px;
}
.deleted-filter-bar b { color: #cf1322; }
.deleted-clear-btn {
  margin-left: auto; background: #fff; border: 1px solid #ffccc7; color: #cf1322;
  border-radius: 14px; padding: 3px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.deleted-clear-btn:hover { background: #fff1f0; }

/* ===== 会话存档分析视图 ===== */
.reports-sales-filter {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.reports-sales-filter-label { font-size: 13px; color: #5a6b7b; font-weight: 600; }
.reports-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.report-tab {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: #4a5568;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.report-tab:hover { border-color: #185abd; color: #185abd; }
.report-tab.active { background: #185abd; color: #fff; border-color: #185abd; }
.report-tab.fail { color: #cf1322; }
.report-tab.fail.active { background: #cf1322; border-color: #cf1322; color: #fff; }

.reports-content { display: flex; flex-direction: column; gap: 14px; }

/* ===== 客户跟进管理视图 ===== */
.followup-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.followup-tab {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: #4a5568;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.followup-tab:hover { border-color: #185abd; color: #185abd; }
.followup-tab.on { background: #185abd; color: #fff; border-color: #185abd; }
.followup-tab.admin { background: #fff7e6; border-color: #ffd591; color: #ad6800; cursor: default; }
.followup-tab-warn { font-size: 13px; color: #cf1322; margin-left: 6px; }
.followup-frame {
  width: 100%; height: calc(100vh - 190px); min-height: 480px;
  border: 1px solid #1f2a3a; border-radius: 12px; background: #0b0f17;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.analysis-report {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
  padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.analysis-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.analysis-name { font-weight: 700; font-size: 16px; color: #1a1a2e; }
.analysis-meta { font-size: 12px; color: #a0aec0; margin-left: auto; }
.analysis-fail {
  font-size: 13.5px; color: #cf1322; background: #fff1f0;
  border: 1px solid #ffccc7; border-radius: 8px; padding: 10px 14px; margin-top: 6px;
}
.analysis-section { margin-top: 14px; }
.analysis-section-title {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 13.5px; color: #185abd; margin-bottom: 6px;
}
.analysis-section-body {
  font-size: 13.5px; line-height: 1.8; color: #2d3748;
  background: #f7fafc; border: 1px solid #edf2f7; border-radius: 8px;
  padding: 10px 14px; white-space: pre-wrap; word-break: break-word;
}
.analysis-section-body p { margin: 0 0 8px; }
.analysis-section-body p:last-child { margin: 0; }
.analysis-section-body .muted { color: #a0aec0; }

/* ===== 被客户删除看板 ===== */
.deleted-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.deleted-tab {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 6px 15px; font-size: 13px; font-weight: 600; color: #4a5568;
  cursor: default; transition: all 0.2s; font-family: inherit;
}
.deleted-tab.admin { background: #fff1f0; border-color: #ffbbb1; color: #c0392b; }

.deleted-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; background: #fcfdff; border: 1px solid #edf2f7;
  border-radius: 10px; padding: 10px 14px;
}
.deleted-sales-filter-wrap { display: flex; align-items: center; gap: 8px; }
.deleted-sales-filter-label { font-size: 13px; color: #5a6b7b; font-weight: 600; }
.deleted-sales-filter-select, .reports-sales-filter-select {
  border: 1px solid #d1dae3; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; color: #1a1a2e; background: #fff; min-width: 160px; max-width: 280px;
  font-family: inherit;
}
.deleted-sales-filter-select:focus, .reports-sales-filter-select:focus {
  outline: none; border-color: #185abd; box-shadow: 0 0 0 3px rgba(24,90,189,0.1);
}
.deleted-date-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.deleted-date-btns .btn, .deleted-custom .btn {
  background: #fff; border: 1px solid #d1dae3; color: #4a5568;
  border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.deleted-date-btns .btn:hover, .deleted-custom .btn:hover { border-color: #185abd; color: #185abd; }
.deleted-date-btns .btn.active {
  background: #cf1322; border-color: #cf1322; color: #fff;
}
.deleted-custom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.deleted-custom input[type="date"] {
  padding: 6px 10px; border: 1px solid #d1dae3; border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #fff; color: #2d3748;
}
.deleted-custom input[type="date"]:focus { outline: none; border-color: #cf1322; box-shadow: 0 0 0 3px rgba(207,19,34,0.08); }
.deleted-meta { font-size: 13px; color: #8896a6; margin-left: auto; white-space: nowrap; }

.deleted-owner-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.deleted-owner-card {
  background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
  padding: 16px 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.deleted-owner-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.deleted-owner-name { font-size: 13.5px; font-weight: 600; color: #4a5568; margin-bottom: 8px; }
.deleted-owner-count { font-size: 32px; font-weight: 800; color: #cf1322; line-height: 1; }

.deleted-list { display: flex; flex-direction: column; gap: 8px; }
.deleted-table {
  border: 1px solid #e8ecf1; border-radius: 10px; overflow: hidden;
  background: #fff; font-size: 13px;
}
.deleted-thead {
  display: grid; grid-template-columns: 2fr 1.2fr 1.4fr 1.4fr 1.6fr;
  gap: 10px; background: #f7fafc; color: #4a5568; font-weight: 600;
  padding: 10px 14px; font-size: 12.5px; border-bottom: 2px solid #e2e8f0;
}
.deleted-row {
  display: grid; grid-template-columns: 2fr 1.2fr 1.4fr 1.4fr 1.6fr;
  gap: 10px; align-items: center; padding: 10px 14px;
  border-bottom: 1px solid #edf2f7; color: #2d3748;
}
.deleted-row:last-child { border-bottom: none; }
.deleted-row:hover { background: #fcfdff; }
.deleted-approx {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  background: #fff7e6; border: 1px solid #ffd591; color: #ad6800;
  border-radius: 10px; font-size: 11px; font-weight: 600; vertical-align: 1px;
  cursor: help;
}
.deleted-empty {
  text-align: center; color: #a0aec0; font-size: 13px;
  padding: 30px 0; background: #fff; border: 1px dashed #e2e8f0; border-radius: 10px;
}

/* 明细分页：加载更多 */
.deleted-more { text-align: center; padding: 14px 0 4px; }
.deleted-more-btn {
  background: #fff; border: 1px solid #d9e2ec; color: #4a5568;
  border-radius: 18px; padding: 7px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.deleted-more-btn:hover { border-color: #cf1322; color: #cf1322; background: #fff5f5; }
.deleted-more-tip {
  text-align: center; color: #a0aec0; font-size: 12.5px; padding: 12px 0 2px;
}

@media (max-width: 1100px) {
  .deleted-thead, .deleted-row { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .deleted-thead span:nth-child(5), .deleted-row span:nth-child(5) { display: none; }
  .deleted-meta { margin-left: 0; white-space: normal; }
}
@media (max-width: 1100px) {
  .windows-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ===== 首页按销售筛选（树形目录组件） ===== */
.home-sales-filter {
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}
.hsf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(90deg, #f7f9ff, #ffffff);
  border-bottom: 1px solid #f0f0f0;
}
.hsf-title { font-size: 15px; font-weight: 700; color: #1f2d3d; }
.hsf-toggle {
  border: none;
  background: #eef2ff;
  color: #3a5bd9;
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.hsf-toggle:hover { background: #e0e7ff; }
.hsf-head-actions { display: flex; align-items: center; gap: 8px; }
.hsf-clear {
  border: 1px solid #ffd6d6;
  background: #fff1f0;
  color: #d4380d;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.hsf-clear:hover { background: #ffe0de; }
.hsf-clear[hidden] { display: none; }
.hsf-body { padding: 12px 14px; }
.hsf-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}
.hsf-search:focus { outline: none; border-color: #3a5bd9; box-shadow: 0 0 0 2px rgba(58,91,217,0.12); }
.hsf-tree {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafbfc;
}
.hsf-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #333;
}
.hsf-node:hover { background: #eef2ff; }
.hsf-root {
  font-weight: 700;
  background: #f3f6ff;
  border-bottom: 1px solid #eef0f4;
}
.hsf-root:hover { background: #eaeefe; }
.hsf-arrow { display: inline-block; width: 14px; color: #3a5bd9; font-size: 12px; }
.hsf-root-label { flex: 1; }
.hsf-root-count { color: #999; font-weight: 400; font-size: 12px; }
.hsf-children {
  max-height: 260px;
  overflow-y: auto;
}
.hsf-children[hidden] { display: none; }
.hsf-leaf { padding-left: 26px; }
.hsf-dot { color: #c0c4cc; font-size: 8px; line-height: 1; }
.hsf-check { color: #3a5bd9; font-size: 13px; line-height: 1; width: 14px; text-align: center; }
.hsf-leaf:not(.selected) .hsf-check { color: #c0c4cc; }
.hsf-leaf.selected, .hsf-all.selected { background: #3a5bd9; color: #fff; }
.hsf-leaf.selected .hsf-dot, .hsf-all.selected .hsf-dot { color: #fff; }
.hsf-leaf.selected:hover, .hsf-all.selected:hover { background: #2f4ec4; }
.hsf-empty { padding: 10px; color: #999; font-size: 12px; text-align: center; }
.hsf-current {
  margin-top: 10px;
  padding: 7px 10px;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
  color: #ad6800;
  font-size: 12px;
}
.hsf-current:empty { display: none; }

/* ==========================================================================
   会话存档分析 · 报告卡片式排版
   2026-10-11 初版（docx 数据源）
   2026-10-12 改版：数据源切换为 Markdown，对齐「客户跟进面板-页面设计参考.html」
   仅新增 rp- 前缀规则，不修改/覆盖任何已有样式，其他板块不受影响
   ========================================================================== */
.rp-doc { display: flex; flex-direction: column; gap: 14px; }
.rp-doc-head { flex-wrap: wrap; row-gap: 6px; }

/* 元信息 chips：销售 / 聊天日期 / 跟进日期 */
.rp-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 11px; border-radius: 20px;
  background: #f7f9fc; border: 1px solid #e5e9f0;
  font-size: 13px; color: #334155;
}
.rp-chip i { font-style: normal; font-size: 12px; color: #64748b; }

/* 今日要点摘要 */
.rp-lead {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: 12px;
  background: #eef5ff; border: 1px solid #d7e6fb; border-left: 4px solid #185abd;
}
.rp-lead-tag {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: #185abd;
  padding: 2px 9px; border-radius: 20px; background: #fff;
}
.rp-lead p { margin: 0; font-size: 14px; line-height: 1.75; color: #334155; }

/* 一级分组：必跟进(红) / 促成交(橙) / 促开口(绿) */
.rp-group { margin-top: 6px; }
.rp-h2 {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 22px 0 13px; padding: 10px 14px;
  font-size: 17px; font-weight: 700; color: #123d79;
  background: #eef5ff; border-left: 4px solid #185abd; border-radius: 7px;
}
.rp-group:first-child .rp-h2 { margin-top: 4px; }
.rp-h2 .rp-count { font-size: 12px; font-weight: 400; color: #5a6b7b; }
.rp-group[data-tone="red"]   .rp-h2 { background: #fff1f0; border-left-color: #cb5147; color: #a63229; }
.rp-group[data-tone="amber"] .rp-h2 { background: #fff6e9; border-left-color: #d9952f; color: #946015; }
.rp-group[data-tone="green"] .rp-h2 { background: #edf8f2; border-left-color: #329469; color: #23734e; }
.rp-empty {
  padding: 12px 15px; border-radius: 10px; background: #f7f9fc;
  border: 1px dashed #e5e9f0; color: #64748b; font-size: 13px;
}

/* 客户卡片网格 */
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.rp-card {
  border: 1px solid #dce5f0; border-radius: 14px; background: #fff;
  box-shadow: 0 3px 12px rgba(23, 54, 93, .05); overflow: hidden;
}
.rp-card > summary {
  cursor: pointer; list-style: none; padding: 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
  border-left: 3px solid #185abd;
}
.rp-card > summary::-webkit-details-marker { display: none; }
.rp-card > summary:hover { background: #f7f9fc; }
.rp-card > summary:focus-visible { outline: 3px solid #185abd; outline-offset: -3px; }

/* 布局变体：字段少=紧凑，字段多=整行铺开 */
.rp-card[data-layout="compact"] > summary { padding: 14px 18px; gap: 7px; }
.rp-card[data-layout="focus"] { grid-column: 1 / -1; }

.rp-card[data-tone="red"]   > summary { border-left-color: #cb5147; }
.rp-card[data-tone="amber"] > summary { border-left-color: #d9952f; }
.rp-card[data-tone="green"] > summary { border-left-color: #329469; }
.rp-card[data-tone="gray"]  > summary { border-left-color: #cbd5e0; }

/* 标题行：客户名 + 分组胶囊 */
.rp-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rp-cust { font-size: 16px; font-weight: 700; color: #172033; overflow-wrap: anywhere; }
.rp-category {
  flex-shrink: 0; font-size: 11px; white-space: nowrap; padding: 1px 8px; border-radius: 20px;
  background: #eef5ff; color: #185abd;
}
.rp-card[data-tone="red"]   .rp-category { background: #fff1f0; color: #a63229; }
.rp-card[data-tone="amber"] .rp-category { background: #fff6e9; color: #946015; }
.rp-card[data-tone="green"] .rp-category { background: #edf8f2; color: #23734e; }

/* 标签行：类别 / 状态 / 预览标签 */
.rp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-tag {
  font-size: 11px; line-height: 1.6; padding: 2px 7px; border-radius: 5px;
  border: 1px solid #e1e7ef; background: #f7f9fc; color: #526178; overflow-wrap: anywhere;
}
.rp-tag-type { background: #eef5ff; border-color: #ccddf7; color: #185abd; font-weight: 600; }
.rp-tag-state { background: #fff; border-color: #dbe3ec; color: #64748b; }

/* 卡片一句话要点：动作优先（蓝），否则取分析摘要（灰） */
.rp-preview-action,
.rp-preview-overview {
  font-size: 13px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.rp-preview-action {
  border-top: 1px dashed #dce5f0; padding-top: 9px; color: #185abd;
}
.rp-preview-action > span { font-weight: 700; margin-right: 8px; }
.rp-preview-overview { color: #526178; }

.rp-hint { font-size: 12px; color: #64748b; }
.rp-hint::after { content: ' ↗'; color: #185abd; }
.rp-card[open] .rp-hint::after { content: ' −'; }

.rp-card-body { padding: 0 18px 18px; border-top: 1px solid #e5e9f0; }
.rp-field { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #f7f9fc; overflow-wrap: anywhere; }
.rp-field .rp-label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 700; }
.rp-field p { margin: 0; font-size: 14px; line-height: 1.7; color: #334155; white-space: pre-wrap; }
.rp-field.action { background: #edf5ff; border-left: 3px solid #2470c7; }
.rp-field.script { background: #eef8f3; border-left: 3px solid #329469; }

/* 分组内的普通说明行（今日跟进对象 / 录音分析） */
.rp-notes { display: flex; flex-direction: column; gap: 8px; }
.rp-note { padding: 10px 13px; border-radius: 9px; background: #f7f9fc; border: 1px solid #e5e9f0; font-size: 14px; line-height: 1.75; color: #334155; overflow-wrap: anywhere; }
.rp-note .rp-label { display: block; font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 3px; }
.rp-note p { margin: 0; white-space: pre-wrap; }
.rp-note.tone-red   { background: #fff1f0; border-color: #f5c2be; color: #8a2b22; }
.rp-note.tone-amber { background: #fff6e9; border-color: #f3dca8; color: #7d510f; }
.rp-note.tone-green { background: #edf8f2; border-color: #b8e3cd; color: #1d5c3d; }

/* 客户详情弹窗 */
/* 注意：全局 * { margin:0 } 会覆盖 dialog 的 UA 居中 margin:auto，
   所以这里必须显式定位居中，否则弹窗会贴在左上角 */
.rp-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0;
  border: 0; border-radius: 18px; padding: 0; width: min(760px, calc(100vw - 32px));
  max-height: 88vh; color: #172033; background: #fff;
  box-shadow: 0 24px 80px rgba(23, 54, 93, .35); overflow: hidden;
}
.rp-modal::backdrop { background: rgba(15, 23, 42, .48); }
.rp-modal[open] { display: flex; flex-direction: column; }
.rp-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid #e5e9f0; background: #f7faff; flex-shrink: 0;
}
.rp-modal-head h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.rp-modal-sub { margin-top: 6px; font-size: 12px; color: #6b7280; }
.rp-modal-close {
  flex-shrink: 0; border: 1px solid #dce5f0; background: #fff; border-radius: 8px;
  padding: 8px 12px; color: #334155; font: inherit; font-size: 13px; cursor: pointer;
}
.rp-modal-close:hover { background: #f7f9fc; }
.rp-modal-close:focus-visible { outline: 3px solid #185abd; }
.rp-modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 12px 24px 24px; line-height: 1.8; }
.rp-modal-body .rp-field:first-child { margin-top: 8px; }

@media (max-width: 900px) {
  .rp-grid { grid-template-columns: 1fr; }
  .rp-card { border-radius: 12px; }
  .rp-modal-body { padding: 10px 16px 20px; }
  .rp-modal-head { padding: 16px 16px; }
}
