/* AI CRM：一体化客户经营。传统该有的都有，处处是 AI。沿用 page-ai 变量与 waihu.css 外壳 */

/* ===== 首屏客户全景卡 ===== */
.crm-card {
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.crm-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.crm-card-bar strong { color: #fff; font-size: 14px; font-weight: 600; }

.crm-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 12, 28, 0.5);
}

.crm-card-top b { display: block; font-size: 15px; }
.crm-card-top span { display: block; margin-top: 4px; color: rgba(255, 255, 255, 0.5); font-size: 12px; }

.crm-card-top em {
  flex-shrink: 0;
  font-style: normal;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(100deg, #3f43ff, #b65bff);
}

.crm-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 8px 4px;
  padding: 0 8px;
}

.crm-stage i {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 11px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.crm-stage i.is-on {
  color: #fff;
  background: rgba(67, 72, 255, 0.4);
  font-weight: 600;
}

.crm-card-rows { margin: 8px; list-style: none; padding: 0; }

.crm-card-rows li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.crm-card-rows li span { flex-shrink: 0; color: rgba(255, 255, 255, 0.5); }
.crm-card-rows li b { text-align: right; color: rgba(255, 255, 255, 0.9); font-weight: 500; }
.crm-card-rows li b em { font-style: normal; color: #8ef0c8; }

/* ===== 痛点 → 解法 ===== */
.crm-pains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.crm-pain {
  padding: 26px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.crm-pain b {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.crm-pain h3 { margin: 10px 0; font-size: 19px; }

.crm-pain p {
  position: relative;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.crm-pain p::before {
  content: "解法";
  position: absolute;
  top: -9px;
  left: 0;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--brand);
  background: #eef2ff;
}

/* ===== 全链路一条链 ===== */
.crm-chain {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.crm-chain article {
  position: relative;
  padding: 22px 20px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(180deg, #4348ff 0%, #7b5bff 100%);
  border: 1px solid transparent;
  box-shadow: 0 12px 28px rgba(67, 72, 255, 0.28);
}

.crm-chain b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.crm-chain h3 { margin: 12px 0 6px; font-size: 18px; }

.crm-chain p { color: rgba(255, 255, 255, 0.82); font-size: 13px; line-height: 1.65; }

.crm-chain-note {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.crm-chain-note b { color: var(--ink); }

/* ===== 客户档案 + 全量 AI 分析 ===== */
.crm-file {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.crm-panel {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.crm-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.crm-panel > header strong { font-size: 16px; }
.crm-panel > header em { font-style: normal; color: var(--brand); font-size: 12px; font-weight: 600; }

.crm-panel.is-ai {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(360px 200px at 92% 0%, rgba(182, 91, 255, 0.34), transparent 60%),
    linear-gradient(160deg, #1a2158 0%, #2c1a62 100%);
}

.crm-panel.is-ai > header { border-bottom-color: rgba(255, 255, 255, 0.12); }
.crm-panel.is-ai > header em { color: #b8c4ff; }

.crm-profile { list-style: none; margin: 0; padding: 8px 22px; }

.crm-profile li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
}

.crm-profile li:first-child { border-top: none; }
.crm-profile li span { flex-shrink: 0; width: 62px; color: var(--muted); }
.crm-profile li b { font-weight: 500; }

.crm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 22px 20px; }

.crm-chips i {
  font-style: normal;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand);
  background: #eef2ff;
}

.crm-ai-body { padding: 18px 22px 22px; }

.crm-ai-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  line-height: 1.65;
}

.crm-ai-row:first-child { border-top: none; }
.crm-ai-row span { flex-shrink: 0; width: 56px; color: #9bb0ff; font-size: 13px; }
.crm-ai-row b { font-weight: 500; color: rgba(255, 255, 255, 0.92); }

.crm-ai-next {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(67, 72, 255, 0.3);
  color: #eef0ff;
  font-size: 14px;
  line-height: 1.65;
}

.crm-ai-next b { color: #fff; }

.crm-ai-link {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.6;
}

.crm-ai-link a { color: #b8c4ff; text-decoration: underline; text-underline-offset: 3px; }

/* ===== 外勤拜访定位轨迹 ===== */
.crm-field {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 20px;
  align-items: stretch;
}

.crm-map {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(67, 72, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(67, 72, 255, 0.05) 1px, transparent 1px) 0 0 / 34px 100%,
    linear-gradient(160deg, #f4f6fb 0%, #eef2ff 100%);
  min-height: 340px;
}

.crm-map-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--line);
}

.crm-map-bar strong { color: var(--ink); font-size: 13px; }

.crm-map-svg { display: block; width: 100%; height: auto; }

.crm-map-path { fill: none; stroke: url(#crmLine); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; }
.crm-map-dot { fill: #fff; stroke: #4348ff; stroke-width: 3; }
.crm-map-dot.is-now { fill: #4348ff; }

.crm-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 5px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 35, 61, 0.14);
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
}

.crm-pin b { color: var(--brand); }
.crm-pin.is-now { color: #fff; background: linear-gradient(100deg, #4348ff, #9a55ff); }
.crm-pin.is-now b { color: #fff; }

.crm-field-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }

.crm-feat {
  padding: 20px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.crm-feat b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--brand);
  background: #eef2ff;
}

.crm-feat b svg { width: 18px; height: 18px; }
.crm-feat h3 { margin: 12px 0 6px; font-size: 16px; }
.crm-feat p { color: var(--muted); font-size: 13px; line-height: 1.65; }

.crm-field-out {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, #2a2f8f 0%, #4348ff 55%, #9a55ff 100%);
}

.crm-field-out strong { display: block; font-size: 16px; }
.crm-field-out p { margin-top: 6px; color: rgba(255, 255, 255, 0.82); font-size: 13px; line-height: 1.65; }

/* ===== 交易闭环：订单 / 合同 / 回款 / 发票 ===== */
.crm-deal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.crm-deal article {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.crm-deal .crm-deal-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--brand);
  background: #eef2ff;
}

.crm-deal .crm-deal-ico svg { width: 22px; height: 22px; }
.crm-deal h3 { margin: 14px 0 8px; font-size: 19px; }
.crm-deal > article > p { color: var(--muted); font-size: 14px; line-height: 1.7; }

.crm-deal-tag {
  margin-top: auto;
  padding-top: 14px;
}

.crm-deal-tag span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #1f9d6a;
  background: #e7f8ef;
}

.crm-deal-tag span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1f9d6a;
}

.crm-deal-note {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.crm-deal-note b { color: var(--ink); }

/* ===== 传统该有的 + AI 该有的 ===== */
.crm-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.crm-full-col {
  padding: 30px 30px;
  border-radius: 22px;
}

.crm-full-col.is-base {
  background: #fff;
  border: 1px solid var(--line);
}

.crm-full-col.is-ai {
  color: #fff;
  background:
    radial-gradient(420px 220px at 88% 0%, rgba(182, 91, 255, 0.3), transparent 60%),
    linear-gradient(150deg, #1a2158 0%, #2c1a62 100%);
}

.crm-full-col > b {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.crm-full-col.is-base > b { color: var(--muted); background: var(--soft); }
.crm-full-col.is-ai > b { color: #fff; background: rgba(255, 255, 255, 0.16); }

.crm-full-col h3 { font-size: 22px; margin-bottom: 20px; }

.crm-full-col ul { list-style: none; margin: 0; padding: 0; }

.crm-full-col li {
  position: relative;
  padding: 11px 0 11px 28px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

.crm-full-col li:first-of-type { border-top: none; }
.crm-full-col.is-ai li { border-top-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.9); }

.crm-full-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #eef2ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%234348ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.crm-full-col.is-ai li::before {
  background: rgba(126, 232, 255, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237ee8ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.crm-full-col li b { font-weight: 600; }

/* ===== 处处是 AI ===== */
.crm-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.crm-ai-card {
  padding: 26px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-ai-card .crm-ai-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: #9bb0ff;
  background: rgba(155, 176, 255, 0.14);
}

.crm-ai-card .crm-ai-ico svg { width: 22px; height: 22px; }
.crm-ai-card h3 { margin: 14px 0 8px; font-size: 18px; }
.crm-ai-card p { color: rgba(255, 255, 255, 0.62); font-size: 14px; line-height: 1.7; }
.crm-ai-card p a { color: #b8c4ff; text-decoration: underline; text-underline-offset: 3px; }

/* ===== 权限与资产 ===== */
.crm-asset {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.crm-asset article {
  padding: 26px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.crm-asset b { color: var(--brand); font-size: 13px; font-weight: 600; }
.crm-asset h3 { margin: 10px 0 8px; font-size: 18px; }
.crm-asset p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ===== ROI 测算 ===== */
.crm-roi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.crm-roi article {
  padding: 26px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7f5ff 0%, #eef3ff 100%);
}

.crm-roi strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(111deg, #3f43ff, #b65bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.crm-roi h3 { margin: 12px 0 6px; font-size: 16px; }
.crm-roi p { color: var(--muted); font-size: 13px; line-height: 1.65; }

.crm-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .crm-pains,
  .crm-chain,
  .crm-file,
  .crm-field,
  .crm-field-list,
  .crm-deal,
  .crm-full,
  .crm-ai-grid,
  .crm-asset,
  .crm-roi {
    grid-template-columns: 1fr;
  }
  .crm-field-out { grid-column: auto; }
}
