/* ============ 基础与变量 ============ */
:root {
  --primary: #1f8fff;
  --primary-dark: #0f6fd1;
  --cyan: #16c2c2;
  --bg: #f2f5f9;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #8a96a3;
  --border: #e3e9f0;
  --danger: #ff5b5b;
  --ok: #1fb673;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(31, 143, 255, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 64px; /* 给底部免责声明留位 */
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============ 顶部提示 ============ */
.top-hint {
  background: linear-gradient(90deg, #e8f3ff, #e6fbfb);
  color: #4a6b8a;
  font-size: 11px;
  line-height: 1.5;
  padding: 6px 12px;
  text-align: center;
}

.app-header {
  padding: 16px 16px 6px;
  text-align: center;
}
.app-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary); /* 兜底 */
}

/* ============ 步骤指示器 ============ */
.step-indicator {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px;
  margin: 4px 12px 8px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  color: var(--muted);
  font-size: 12px;
}
.step-item .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e6ecf3;
  color: #9aa7b4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 2px;
  transition: all .25s;
}
.step-item.active .dot,
.step-item.done .dot {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  box-shadow: 0 2px 8px rgba(31,143,255,.35);
}
.step-item.active { color: var(--primary); font-weight: 700; }
.step-item.done label::after { content: " ✓"; color: var(--ok); }

/* ============ 卡片 ============ */
.app-main { padding: 0 12px 16px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-left: 4px solid var(--primary);
  padding-left: 8px;
}

/* ============ 表单字段 ============ */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 13px;
  color: #4a5663;
  margin-bottom: 6px;
  font-weight: 600;
}
.req { color: var(--danger); }

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  color: var(--text);
  background: #fbfdff;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
input:focus, textarea:focus { border-color: var(--primary); background: #fff; }
textarea { resize: vertical; }

/* 标签多选 */
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: #5a6675;
  background: #fff;
  user-select: none;
}
.tag.selected {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  border-color: transparent;
}

/* 单选 */
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}
.radio input { accent-color: var(--primary); }

/* 芯片式添加 */
.chip-input { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef6ff;
  color: var(--primary-dark);
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 13px;
}
.chip .x {
  cursor: pointer;
  color: #9bb8d8;
  font-weight: 700;
}
.chip .x:hover { color: var(--danger); }

.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; }

/* 问答对 */
.qa-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.qa-item {
  background: #f7faff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}
.qa-item .qa-q { font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.qa-item .qa-del {
  float: right;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
}
.qa-add { display: flex; flex-direction: column; gap: 8px; }

/* ============ 按钮 ============ */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #fff;
  box-shadow: 0 6px 16px rgba(31,143,255,.28);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: #c4ced8;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-ghost {
  background: #eef6ff;
  color: var(--primary-dark);
  border: 1px solid #d6e8ff;
}
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-link {
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
  box-shadow: none;
}

.warn-text { color: var(--danger); font-size: 12px; margin: 10px 0 0; }
.hint-text { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* 协议框 */
.agreement-box {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #44505d;
  background: #fbfdff;
  white-space: pre-wrap;
  word-break: break-word;
}
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.agree-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }

.loading-inline { color: var(--muted); text-align: center; padding: 20px 0; }

/* ============ 图片 ============ */
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.img-thumb {
  width: 84px; height: 84px;
  border-radius: 10px;
  background-size: cover; background-position: center;
  position: relative;
  border: 1px solid var(--border);
}
.img-thumb .del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: var(--danger); color: #fff;
  border-radius: 50%; text-align: center; line-height: 20px;
  font-size: 13px; cursor: pointer;
}
.img-add { width: 100%; }

/* ============ 支付 ============ */
.pay-tip { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.plan-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.plan {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
  background: #fff; cursor: pointer;
}
.plan input { width: 18px; height: 18px; accent-color: var(--primary); }
.plan-body { display: flex; flex-direction: column; gap: 2px; }
.plan-name { font-weight: 700; font-size: 15px; }
.plan-price { color: var(--danger); font-size: 14px; }
.plan-price b { font-size: 20px; }
.plan-desc { color: var(--muted); font-size: 12px; }
.plan.checked {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(31,143,255,.15);
}
.pay-notice {
  background: #fff4e5; border: 1px solid #ffd9a0;
  color: #b5630a; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}

/* ============ 完成 ============ */
.success-badge {
  display: inline-block;
  background: var(--ok); color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 6px 16px; border-radius: 20px;
  margin-bottom: 8px;
}
.page-url-box {
  background: #f0f8ff; border: 1px dashed var(--primary);
  border-radius: 10px; padding: 12px; text-align: center;
  margin-bottom: 14px;
}
.page-url-box a { color: var(--primary-dark); font-weight: 700; word-break: break-all; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 360px;
  padding: 18px;
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.modal textarea { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ============ 加载遮罩 ============ */
.loading-mask {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 60;
}
.spinner {
  width: 38px; height: 38px;
  border: 4px solid #d6e8ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: 10px;
}
.loading-text { color: var(--primary-dark); font-size: 14px; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ toast ============ */
.toast {
  position: fixed;
  left: 50%; bottom: 80px;
  transform: translateX(-50%);
  background: rgba(31,42,55,.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 14px;
  z-index: 70;
  max-width: 86%;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* ============ 底部免责声明 ============ */
.disclaimer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #2a323d;
  color: #c7d0db;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  padding: 8px 14px;
  z-index: 40;
}

/* ============ 新版「AI找你」页面补充样式（2026-10-03 补齐缺失类） ============ */
.app { max-width: 720px; margin: 0 auto; padding: 20px 16px 32px; }

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 6px;
  letter-spacing: .5px;
}

.slogan {
  font-size: 15px;
  color: var(--primary-dark);
  margin: 0 0 16px;
  font-weight: 500;
}

.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.muted a { color: var(--primary); text-decoration: none; }

.ok-text { color: var(--ok); font-size: 14px; font-weight: 600; margin: 6px 0; }

/* 工单卡片：付款后自动生成的工单号与进度 */
.wo-card {
  background: #f4f8ff; border: 1px solid #dce7fb; border-radius: 10px;
  padding: 14px; margin: 6px 0 16px;
}
.wo-card .wo-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; padding: 5px 0;
}
.wo-card .wo-row span { color: #7a8499; }
.wo-card .wo-row b { color: var(--primary); font-size: 15px; }
.wo-card .wo-card-note { font-size: 13px; margin: 8px 0 0; line-height: 1.6; }

.agree-line {
  display: block;
  background: #f7fafd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #4a5663;
  cursor: pointer;
  margin-bottom: 14px;
  line-height: 1.6;
}
.agree-line a { color: var(--primary); text-decoration: none; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn-row { display: flex; gap: 12px; margin-top: 22px; }

.more-box {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: #4a5663;
}
.more-box > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
  list-style: none;
}
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::before { content: '▸ '; }
.more-box[open] > summary::before { content: '▾ '; }
.more-box[open] { margin-top: 14px; }

.notice {
  background: #f0f8ff;
  border: 1px solid #d6e8ff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--primary-dark);
  margin: 12px 0;
  line-height: 1.6;
}

.ai-fill {
  background: linear-gradient(135deg, #eef6ff, #e9fbfb);
  border: 1px solid #d6e8ff;
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  margin-bottom: 18px;
}
.ai-fill-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.loading-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.96);
  border-radius: 14px;
  padding: 16px 22px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 8px 28px rgba(20,40,70,.18);
}

.modal-body { padding: 20px 18px 8px; }
