/* ═══════════════════════════════════════════════════════════════
   OfferCopilot 职通车AI — 设计系统
   适用范围：所有产品页面
   原则：CSS 变量优先，移动端优先，8px 基线
   ═══════════════════════════════════════════════════════════════ */

/* ── 设计令牌 ──────────────────────────────────────────────── */
:root {
  /* 色彩 */
  --bg:          #F5F6F8;
  --card:        #FFFFFF;
  --accent:      #E8856C;
  --accent-soft: #FEF8F5;
  --text:        #2C2C2C;
  --text-soft:   #8C8C8C;
  --text-fade:   #BFBFBF;
  --border:      #E8ECF0;
  --success:     #6BAF6E;
  --danger:      #DB5A5A;

  /* 间距 — 8px 基线 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 24px;

  /* 字号 — 12 级 */
  --fs-tiny: 10px;
  --fs-xxs:  11px;
  --fs-xs:   12px;
  --fs-r:    13px;
  --fs-rp:   14px;
  --fs-rpp:  15px;
  --fs-s:    17px;
  --fs-m:    20px;
  --fs-l:    24px;
  --fs-xl:   32px;
  --fs-xxl:  44px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* 阴影 */
  --shadow-card: 0 2px 12px rgba(0,0,0,.06);
}

/* ── 重置 ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-rpp);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── 布局 ──────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--sp-4) var(--sp-10);
}

/* ── 顶栏 ──────────────────────────────────────────────────── */
.top-bar {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-3) 0; position: sticky; top: 0; z-index: 100;
  background: var(--bg);
}
.top-bar .logo {
  font-size: var(--fs-l); font-weight: 800; letter-spacing: 2px;
  display: inline-flex; align-items: center; gap: 6px;
}
.logo-icon { width: 28px; height: 28px; flex-shrink: 0; }
.back-btn {
  position: absolute; left: 0;
  font-size: var(--fs-rp); color: var(--text-soft);
  text-decoration: none; cursor: pointer; background: none; border: none;
}
.back-btn:hover { color: var(--accent); }

	.quota-badge {
	  display: inline-block; font-size: var(--fs-tiny); font-weight: 700;
	  color: var(--accent); background: var(--accent-soft);
	  padding: 1px 8px; border-radius: 10px; letter-spacing: 1px;
	  border: 1px solid var(--accent);
	  vertical-align: middle; margin-right: 2px;
	}

/* ── 进度条 ────────────────────────────────────────────────── */
.progress-bar {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: var(--sp-4) 0 var(--sp-5);
  font-size: var(--fs-r); gap: 0;
}
.progress-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; color: var(--text-fade); font-weight: 500;
  flex-shrink: 0; min-width: 52px;
}
.progress-step .dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-soft);
  flex-shrink: 0;
}
.progress-step.done .dot { background: var(--success); color: #fff; }
.progress-step.active .dot { background: var(--accent); color: #fff; }
.progress-step.done { color: var(--success); }
.progress-step.active { color: var(--accent); font-weight: 650; }
.progress-step .tag {
  font-size: 9px; color: var(--text-soft); background: var(--border);
  padding: 1px 4px; border-radius: 3px; line-height: 1.4;
}
.progress-connector {
  width: auto; height: 2px; background: var(--border);
  margin-top: 13px; flex: 1; min-width: 24px; max-width: 80px;
}
.progress-connector.done { background: var(--success); }

@media (min-width: 500px) {
  .progress-bar { font-size: var(--fs-r); gap: 2px; }
  .progress-step { min-width: 56px; }
  .progress-connector { min-width: 36px; max-width: 100px; }
}

/* ── 页面头 ────────────────────────────────────────────────── */
.page-head {
  text-align: center; padding: var(--sp-3) 0 var(--sp-5);
}
.page-head h1 { font-size: var(--fs-l); font-weight: 700; line-height: 1.3; }
.page-head p {
  font-size: var(--fs-rp); color: var(--text-soft); margin-top: var(--sp-1);
}
/* 首页 hero */
.page-head.hero { padding: var(--sp-8) 0 var(--sp-4); }
.page-head.hero h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: 1px; }
.page-head.hero p { font-size: var(--fs-s); color: var(--text-soft); margin-top: var(--sp-2); }

/* 上传区社会证明 */
.up-proof {
  font-size: var(--fs-xxs); color: var(--text-fade);
  margin-top: var(--sp-3); font-style: italic;
}

/* ── 服务路线图 ────────────────────────────────────────────── */
.service-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3); margin-top: var(--sp-6);
}
.service-card {
  background: var(--card); border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-3); text-align: center;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  transition: opacity .2s;
}
.service-card .sc-icon { font-size: 28px; }
.service-card .sc-title { font-size: var(--fs-rpp); font-weight: 650; }
.service-card .sc-desc { font-size: var(--fs-xxs); color: var(--text-soft); line-height: 1.5; }

/* ── 卡片 ──────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: var(--sp-5); margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-m); flex-shrink: 0;
}
.card-title { font-size: var(--fs-s); font-weight: 650; }
.card-sub { font-size: var(--fs-xs); color: var(--text-soft); margin-top: 2px; }

/* 可折叠卡片 */
.section-card {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: var(--sp-3); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5); cursor: pointer; user-select: none;
}
.section-header .section-title { font-size: var(--fs-rpp); font-weight: 650; }
.section-header .chevron {
  font-size: var(--fs-rp); color: var(--text-soft);
  transition: transform .2s;
}
.section-header.open .chevron { transform: rotate(180deg); }
.section-body { padding: 0 var(--sp-5) var(--sp-5); display: none; }
.section-body.open { display: block; }

/* ── 按钮 ──────────────────────────────────────────────────── */
.btn {
  display: block; width: 200px; margin: 0 auto; padding: 14px 0;
  border-radius: var(--radius-sm); font-size: var(--fs-rpp); font-weight: 600;
  text-align: center; cursor: pointer; border: none;
  text-decoration: none; transition: opacity .15s;
  font-family: var(--font);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary:disabled:active { transform: none; }
.btn-secondary {
  background: var(--card); color: var(--text);
  border: 1.5px solid var(--border);
}

/* ── 上传区 ────────────────────────────────────────────────── */
.upload-zone {
  border: 2px solid #D0D5DD; border-radius: var(--radius);
  padding: var(--sp-10) var(--sp-5); text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
  background: var(--card);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(232,133,108,.12);
}
.upload-zone .up-icon { font-size: 36px; display: block; margin-bottom: var(--sp-3); }
.upload-zone .up-title { font-size: var(--fs-rpp); font-weight: 600; }
.upload-zone .up-hint {
  font-size: var(--fs-xs); color: var(--text-soft); margin-top: var(--sp-1);
}
.upload-zone.selected { border-color: var(--success); border-style: solid; background: #F9FBF9; }
.upload-zone.selected .up-icon { font-size: 28px; }

/* ── 历史卡片 ──────────────────────────────────────────────── */
.history-card {
  background: var(--card); border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5); display: flex;
  align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-card);
}
.hc-left { display: flex; align-items: center; gap: var(--sp-3); }
.hc-icon { font-size: 28px; }
.hc-date { font-size: var(--fs-rp); font-weight: 600; }
.hc-summary { font-size: var(--fs-xs); color: var(--text-soft); margin-top: 2px; }
.hc-arrow { font-size: var(--fs-m); color: var(--text-soft); }

/* ── 待建卡片 ──────────────────────────────────────────────── */
.coming-card {
  background: var(--card); border-radius: var(--radius);
  padding: var(--sp-5); text-align: center;
  opacity: .85; box-shadow: var(--shadow-card);
}
.coming-card .coming-icon { font-size: 40px; margin-bottom: var(--sp-2); }
.coming-card .coming-title { font-size: var(--fs-s); font-weight: 650; margin-bottom: var(--sp-1); }
.coming-card .coming-sub { font-size: var(--fs-r); color: var(--text-soft); }
.coming-eta {
  display: inline-block; font-size: var(--fs-xs); color: var(--text-soft);
  background: var(--bg); padding: 2px 10px; border-radius: 10px; margin-top: var(--sp-2);
}

/* ── 转圈 ──────────────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 分割线文字 ────────────────────────────────────────────── */
.divider-text {
  text-align: center; font-size: var(--fs-xs); color: var(--text-fade);
}

/* ── 脚注 ──────────────────────────────────────────────────── */
.footnote { text-align: center; font-size: var(--fs-xs); color: var(--text-fade); margin-top: var(--sp-2); }

/* ── Toast 通知 ────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 9999; display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2); pointer-events: none;
}
.toast-item {
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: var(--fs-rp); font-weight: 500; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: toastIn .25s ease;
  display: flex; align-items: center; gap: var(--sp-2);
  pointer-events: auto;
}
.toast-item.success { background: #4CAF50; }
.toast-item.error { background: #E53935; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── 弹窗遮罩 ──────────────────────────────────────────────── */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 9998; display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.popup-box {
  background: var(--card); border-radius: var(--radius);
  padding: var(--sp-8) var(--sp-6); text-align: center;
  max-width: 340px; width: 90%; box-shadow: 0 16px 48px rgba(0,0,0,.2);
  animation: popupSlide .25s ease;
}
.popup-box h3 { font-size: var(--fs-s); font-weight: 650; margin: var(--sp-4) 0 var(--sp-2); }
.popup-box p { font-size: var(--fs-rp); color: var(--text-soft); line-height: 1.6; margin-bottom: var(--sp-5); }
.popup-box .popup-btns { display: flex; gap: var(--sp-3); }
.popup-box .popup-btns button {
  flex: 1; padding: 12px 0; border-radius: var(--radius-sm);
  font-size: var(--fs-rpp); font-weight: 600; cursor: pointer; border: none;
  font-family: var(--font);
}
.popup-btns .btn-cancel { background: var(--bg); color: var(--text); }
.popup-btns .btn-confirm { background: var(--accent); color: #fff; }
.popup-btns .btn-danger { background: var(--danger); color: #fff; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popupSlide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── 诊断页 ────────────────────────────────────────────────── */
.diagnosis-summary {
  font-size: 18px; line-height: 1.9; color: var(--text);
  padding: var(--sp-5); background: var(--card);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--sp-3) var(--sp-3) 0; margin-bottom: var(--sp-5);
  box-shadow: var(--shadow-card);
}
.impression-verdict { font-weight: 700; margin-bottom: var(--sp-2); }
.impression-detail { font-size: var(--fs-rpp); color: var(--text-soft); }
.dimension-scan {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2); margin-bottom: var(--sp-5);
  font-size: var(--fs-sm); font-weight: 600;
}
.dimension-scan .dim-item {
  display: flex; align-items: center; gap: 6px;
  padding: var(--sp-3); border-radius: var(--sp-2);
  background: var(--card);
}
.dimension-scan .dim-icon { font-size: 16px; }
.dim-label { font-size: var(--fs-tiny); color: var(--text-fade); margin-left: 2px; }
.fix-tag {
  display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px;
  border-radius: 8px; margin-left: 8px; vertical-align: middle;
}
.fix-easy { background: #E8F5E9; color: #388E3C; }
.fix-deep { background: #FFF3E0; color: #E65100; }
.disclaimer {
  text-align: center; font-size: var(--fs-tiny); color: var(--text-fade);
  margin-top: var(--sp-6);
}
.fatal-item {
  padding: var(--sp-4); border-left: 3px solid var(--danger);
  margin-bottom: var(--sp-3); background: var(--card);
  border-radius: 0 var(--sp-3) var(--sp-3) 0;
}
.fatal-item:last-child { margin-bottom: 0; }
.fatal-label {
  font-size: var(--fs-xxs); font-weight: 700; color: var(--danger);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: var(--sp-1);
}
.fatal-title { font-size: var(--fs-s); font-weight: 650; margin-bottom: 6px; }
.fatal-desc { font-size: var(--fs-rpp); color: var(--text-soft); line-height: 1.7; }

.list-block { margin-bottom: var(--sp-5); }
.list-block:last-child { margin-bottom: 0; }
.list-item {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  padding: var(--sp-2) 0; font-size: var(--fs-rp); color: var(--text-soft); line-height: 1.6;
}
.list-item .bullet {
  width: 6px; height: 6px; border-radius: 50%;
  margin-top: 8px; flex-shrink: 0;
}
.bullet.green  { background: var(--success); }
.bullet.orange { background: var(--accent); }
.bullet.red    { background: var(--danger); }

/* ── 预览页 ────────────────────────────────────────────────── */
.preview-compare {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-3); margin-bottom: var(--sp-5);
}
.preview-col {
  padding: var(--sp-4); border-radius: var(--sp-3);
  font-size: var(--fs-rp); line-height: 1.75;
  word-break: break-all; overflow-wrap: break-word;
  max-height: 320px; overflow-y: auto;
}
.preview-col.before { background: #FFF5F5; color: var(--text-soft); }
.preview-col.before .col-label {
  font-size: var(--fs-xxs); font-weight: 700; color: var(--danger);
  margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: .5px;
}
.preview-col.after { background: #F5FAF5; color: var(--text); }
.preview-col.after .col-label {
  font-size: var(--fs-xxs); font-weight: 700; color: var(--success);
  margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: .5px;
}
.pay-card {
  background: var(--card); border: 2px solid var(--accent);
  border-radius: var(--radius); padding: 28px var(--sp-6); text-align: center;
}
.pay-card .price {
  font-size: var(--fs-xxl); font-weight: 800; color: var(--accent); line-height: 1.2;
  text-shadow: 0 2px 8px rgba(232,133,108,.25);
}
.pay-card .price-unit { font-size: var(--fs-rpp); font-weight: 400; }
.pay-includes {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center;
  margin: var(--sp-4) 0;
}
.pay-include-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-r); color: var(--text-soft); background: var(--bg);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--sp-5);
}

/* ── 支付页 ────────────────────────────────────────────────── */
.qr-wrap {
  width: 180px; height: 180px; margin: 0 auto;
  background: var(--bg); border-radius: var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.pay-status {
  margin-top: var(--sp-4); font-size: var(--fs-r); color: var(--text-soft);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ── 结果页 ────────────────────────────────────────────────── */
.opt-text {
  font-size: var(--fs-rpp); line-height: 2.0; color: var(--text); padding: var(--sp-2) 0;
}
.opt-heading {
  font-size: var(--fs-s); font-weight: 700; color: var(--text);
  margin: var(--sp-4) 0 var(--sp-2); padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--border);
}
.opt-heading:first-child { margin-top: 0; }
.opt-subheading {
  font-size: var(--fs-rp); font-weight: 650; color: var(--text-soft);
  margin: var(--sp-3) 0 var(--sp-1);
}
.compare-table {
  width: 100%; border-collapse: collapse; font-size: var(--fs-rp);
}
.compare-table th {
  padding: var(--sp-2) var(--sp-3); background: var(--bg);
  font-weight: 650; text-align: left;
}
.compare-table th:first-child { color: var(--text-soft); }
.compare-table th:last-child { color: var(--success); }
.compare-table td {
  padding: var(--sp-3); vertical-align: top; line-height: 1.65;
}
.compare-table td:first-child { color: var(--text-soft); border-bottom: 1px solid var(--border); }
.compare-table td:last-child { border-bottom: 1px solid var(--border); }
.old-text { text-decoration: line-through; text-decoration-color: var(--danger); text-underline-offset: 4px; }
.new-text { font-weight: 500; }

.q-card {
  padding: var(--sp-4); border-left: 3px solid var(--accent);
  margin-bottom: var(--sp-2); background: var(--accent-soft);
  border-radius: 0 var(--sp-3) var(--sp-3) 0;
}
.q-num { font-size: var(--fs-xs); color: var(--accent); font-weight: 650; margin-bottom: var(--sp-1); }
.q-title { font-size: var(--fs-rp); font-weight: 600; line-height: 1.65; margin-bottom: var(--sp-2); }
.q-body { font-size: var(--fs-r); color: var(--text-soft); line-height: 1.7; }

/* ── 响应式 ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-3) var(--sp-8); }
  .page-head h1 { font-size: var(--fs-m); }
  .preview-compare { grid-template-columns: 1fr; }
  .qr-wrap { width: 150px; height: 150px; font-size: 60px; }
  .service-cards { grid-template-columns: repeat(2, 1fr); }
}
