/* ==========================================================================
   AI CRM 智能获客系统 · 统一设计规范
   浅色企业级 SaaS 风格 / Design Tokens + Components
   ========================================================================== */

:root {
  /* 品牌主色 */
  --brand-900: #0B2E6F;
  --brand-800: #10398F;
  --brand-700: #1647B0;
  --brand-600: #1D5BD6;
  --brand-500: #2563EB;
  --brand-400: #4B86F5;
  --brand-300: #8DB4FB;
  --brand-100: #DCE8FE;
  --brand-50:  #F0F6FF;

  /* AI 智能体强调色 */
  --ai-600: #6D28D9;
  --ai-500: #7C3AED;
  --ai-400: #A78BFA;
  --ai-100: #EDE9FE;
  --ai-50:  #F6F4FF;

  /* 功能色 */
  --cyan-500: #0891B2;
  --cyan-100: #CFFAFE;
  --green-600: #059669;
  --green-500: #10B981;
  --green-100: #D1FAE5;
  --orange-500: #F97316;
  --orange-100: #FFEDD5;
  --red-500: #EF4444;
  --red-100: #FEE2E2;
  --pink-500: #EC4899;
  --teal-500: #14B8A6;

  /* 中性色 */
  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #EDF1F7;
  --ink-50:  #F6F8FC;

  --bg-body: #F4F6FB;
  --bg-card: #FFFFFF;
  --bg-sub: #F8FAFD;

  /* 圆角 */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-sm: 0 2px 8px rgba(15, 23, 42, .07);
  --sh-md: 0 8px 24px rgba(15, 23, 42, .09);
  --sh-lg: 0 18px 48px rgba(15, 23, 42, .13);
  --sh-brand: 0 8px 24px rgba(37, 99, 235, .28);

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 19px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;
  --fs-4xl: 44px;
}

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

html, body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--ink-800);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-md);
  line-height: 1.6;
}

a { color: var(--brand-600); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); font-size: var(--fs-md); color: var(--ink-800); }
ul, ol { list-style: none; }

/* ============================ 布局 ============================ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.row { display: flex; }
.row-b { display: flex; align-items: center; }
.row-cc { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; }
.g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; } .g24 { gap: 24px; } .g32 { gap: 32px; }
.grow { flex: 1; }
.mt4{margin-top:4px}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}
.mt20{margin-top:20px}.mt24{margin-top:24px}.mt32{margin-top:32px}.mt40{margin-top:40px}
.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}
.flex1 { flex: 1; }
.hide { display: none !important; }

/* ============================ 卡片 ============================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.card-pad { padding: 20px 22px; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--ink-100);
}
.card-hd h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--ink-900); }
.card-bd { padding: 20px 22px; }
.card-ft { padding: 14px 22px; border-top: 1px solid var(--ink-100); background: var(--bg-sub);
  border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: var(--fs-md); font-weight: 600;
  transition: all .18s ease; white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand-500); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.28); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: var(--sh-brand); }
.btn-ai { background: linear-gradient(120deg, var(--ai-500), #4F46E5); color: #fff; box-shadow: 0 2px 10px rgba(124,58,237,.3); }
.btn-ai:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--ink-200); }
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); }
.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { background: var(--green-600); }
.btn-danger { background: var(--red-100); color: var(--red-500); }
.btn-danger:hover { background: #FECACA; }
.btn-lg { height: 46px; padding: 0 28px; font-size: var(--fs-lg); border-radius: var(--r-md); }
.btn-sm { height: 30px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn-block { width: 100%; }
/* 深色背景上的白底按钮（官网 Hero、下载页 CTA 使用） */
.btn-white { background: #fff; color: var(--brand-700); box-shadow: 0 4px 16px rgba(0,0,0,.14); }
.btn-white:hover { background: var(--brand-50); transform: translateY(-2px); }
/* 深色背景上的半透明描边按钮 */
.btn-ghost-w { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.btn-ghost-w:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: #fff; color: var(--brand-600); border: 1.5px solid var(--brand-300); }
.btn-outline:hover { border-color: var(--brand-500); background: var(--brand-50); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============================ 徽标 / 标签 ============================ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
}
.tag-blue { background: var(--brand-100); color: var(--brand-700); }
.tag-ai { background: var(--ai-100); color: var(--ai-600); }
.tag-green { background: var(--green-100); color: var(--green-600); }
.tag-orange { background: var(--orange-100); color: #C2410C; }
.tag-red { background: var(--red-100); color: #B91C1C; }
.tag-cyan { background: var(--cyan-100); color: #0E7490; }
.tag-gray { background: var(--ink-100); color: var(--ink-600); }
.tag-pink { background: #FCE7F3; color: #BE185D; }
.tag-outline { background: #fff; border: 1px solid var(--ink-200); color: var(--ink-600); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.dot-orange { background: var(--orange-500); box-shadow: 0 0 0 3px var(--orange-100); }
.dot-red { background: var(--red-500); box-shadow: 0 0 0 3px var(--red-100); }
.dot-gray { background: var(--ink-300); }

.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================ 表单 ============================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700); }
.field label .req { color: var(--red-500); margin-left: 3px; }
.input, .select, .textarea {
  height: 40px; padding: 0 13px; width: 100%;
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-sm);
  outline: none; transition: all .16s ease; font-size: var(--fs-md);
}
.textarea { height: auto; padding: 10px 13px; resize: vertical; min-height: 88px; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%2364748B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; height: 40px; }

.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink-600); }
.check input { width: 16px; height: 16px; accent-color: var(--brand-500); margin-top: 3px; cursor: pointer; flex-shrink: 0; }

/* 开关 */
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--ink-300); border-radius: var(--r-full);
  transition: .24s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .24s; box-shadow: var(--sh-sm); }
.switch input:checked + .slider { background: var(--brand-500); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* 选择组 */
.pick-group { display: flex; flex-wrap: wrap; gap: 9px; }
.pick {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--ink-200); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-600);
  cursor: pointer; background: #fff; transition: all .16s;
}
.pick:hover { border-color: var(--brand-400); color: var(--brand-600); }
.pick.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.pick.on-ai { border-color: var(--ai-500); background: var(--ai-50); color: var(--ai-600); box-shadow: 0 0 0 3px rgba(124,58,237,.09); }
.pick-emoji { font-size: 16px; }

/* ============================ 表格 ============================ */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th {
  text-align: left; padding: 11px 14px; background: var(--ink-50);
  color: var(--ink-600); font-weight: 600; font-size: var(--fs-xs);
  border-bottom: 1px solid var(--ink-200); white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--ink-100); color: var(--ink-700); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--brand-50); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-900); }
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); }

/* ============================ 统计块 ============================ */
.stat {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-lg);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 88px; height: 88px;
  border-radius: 50%; background: var(--brand-50); opacity: .8; }
.stat .lbl { font-size: var(--fs-sm); color: var(--ink-500); font-weight: 600; position: relative; z-index: 1; }
.stat .val { font-size: 30px; font-weight: 800; color: var(--ink-900); line-height: 1.25;
  font-variant-numeric: tabular-nums; position: relative; z-index: 1; margin-top: 4px; }
.stat .val small { font-size: var(--fs-md); font-weight: 700; color: var(--ink-500); }
.stat .delta { font-size: var(--fs-xs); font-weight: 700; margin-top: 4px; position: relative; z-index: 1; display: flex; align-items: center; gap: 3px; }
.stat .delta.up { color: var(--green-600); }
.stat .delta.down { color: var(--red-500); }
.stat.acc-ai::after { background: var(--ai-50); }
.stat.acc-green::after { background: var(--green-100); }
.stat.acc-orange::after { background: var(--orange-100); }
.stat.acc-cyan::after { background: var(--cyan-100); }

/* ============================ 进度 ============================ */
.bar { height: 7px; background: var(--ink-100); border-radius: var(--r-full); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); transition: width .5s ease; }
.bar-ai > i { background: linear-gradient(90deg, var(--ai-400), var(--ai-500)); }
.bar-green > i { background: linear-gradient(90deg, #34D399, var(--green-600)); }
.bar-orange > i { background: linear-gradient(90deg, #FDBA74, var(--orange-500)); }
.bar-sm { height: 5px; }

/* ============================ 漏斗 / 流程 ============================ */
.funnel-step { display: flex; align-items: center; gap: 12px; }
.funnel-bar { height: 34px; border-radius: var(--r-sm); display: flex; align-items: center;
  padding: 0 12px; color: #fff; font-size: var(--fs-sm); font-weight: 700; min-width: 62px; }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--ink-200); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2.5px solid var(--brand-500); }
.tl-item.ai::before { border-color: var(--ai-500); }
.tl-item.ok::before { border-color: var(--green-500); }

/* ============================ 弹窗 ============================ */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 900; padding: 24px; }
.modal { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 560px;
  max-height: 88vh; overflow: auto; box-shadow: var(--sh-lg); }
.modal-lg { max-width: 860px; }
.modal-hd { padding: 20px 24px; border-bottom: 1px solid var(--ink-100);
  display: flex; align-items: center; justify-content: space-between; }
.modal-hd h3 { font-size: var(--fs-xl); font-weight: 700; color: var(--ink-900); }
.modal-bd { padding: 24px; }
.modal-ft { padding: 16px 24px; border-top: 1px solid var(--ink-100); display: flex; justify-content: flex-end; gap: 10px; }
.x-close { width: 30px; height: 30px; border-radius: var(--r-sm); display: flex; align-items: center;
  justify-content: center; color: var(--ink-400); font-size: 20px; }
.x-close:hover { background: var(--ink-100); color: var(--ink-700); }

/* ============================ 提示 ============================ */
.note { display: flex; gap: 11px; padding: 13px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.65; }
.note-info { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.note-ai { background: var(--ai-50); color: var(--ai-600); border: 1px solid var(--ai-100); }
.note-warn { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.note-green { background: #ECFDF5; color: var(--green-600); border: 1px solid var(--green-100); }
.note-ico { font-size: 16px; line-height: 1.5; flex-shrink: 0; }

/* ============================ 文本工具 ============================ */
.t-ai { color: var(--ai-500); }
.t-brand { color: var(--brand-500); }
.t-green { color: var(--green-600); }
.t-orange { color: var(--orange-500); }
.t-red { color: var(--red-500); }
.t-cyan { color: var(--cyan-500); }
.t-gray { color: var(--ink-400); }
.t-mid { color: var(--ink-500); }
.t-600 { color: var(--ink-600); }
.t-b { font-weight: 700; }
.t-b8 { font-weight: 800; }
.fz12 { font-size: var(--fs-xs); } .fz13 { font-size: var(--fs-sm); } .fz14 { font-size: var(--fs-md); }
.fz16 { font-size: var(--fs-lg); } .fz20 { font-size: var(--fs-xl); } .fz26 { font-size: var(--fs-2xl); }
.tnum { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: 1px; background: var(--ink-100); }
.vdivider { width: 1px; align-self: stretch; background: var(--ink-200); }

/* ============================ 动画 ============================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
.fade-up { animation: fadeUp .5s cubic-bezier(.2,.7,.3,1) both; }
.fade-in { animation: fadeIn .4s ease both; }
.d1{animation-delay:.05s}.d2{animation-delay:.1s}.d3{animation-delay:.15s}.d4{animation-delay:.2s}
.d5{animation-delay:.25s}.d6{animation-delay:.3s}
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-dark { border-color: var(--ink-200); border-top-color: var(--brand-500); }

/* AI 光晕 */
.ai-glow { position: relative; }
.ai-glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(120deg, var(--ai-400), var(--brand-400), var(--cyan-500));
  opacity: .55; z-index: -1; filter: blur(9px); }

/* 网格背景 */
.grid-bg { background-image:
  linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
  background-size: 46px 46px; }

/* 打印 */
@media print { .no-print { display: none !important; } }
