/* ===== 设计变量 ===== */
:root {
  --primary: #1677ff;
  --primary-deep: #0958d9;
  --primary-soft: #e6f0ff;
  --primary-tint: #f0f6ff;
  --ink: #1d2129;
  --text: #4e5969;
  --muted: #86909c;
  --line: #e5e6eb;
  --line-soft: #f2f3f5;
  --page: #f7f8fa;
  --white: #ffffff;
  --success: #00b42a;
  --warning: #ff7d00;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --grad: linear-gradient(135deg, #1677ff 0%, #4096ff 50%, #69b1ff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* 防止自定义 display 覆盖 hidden 属性（如 .up-file 的 display:flex） */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
  font-size: 15px;
}

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }

/* ===== 头部 ===== */
.hero {
  background: var(--grad);
  padding: 36px 20px 28px;
  color: #fff;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%);
  border-radius: 50%;
}
.hero-title { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; position: relative; z-index: 1; line-height: 1.4; }
.hero-meta {
  margin-top: 10px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px; opacity: 0.95;
  position: relative; z-index: 1;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.hero-meta-sep { opacity: 0.6; }

/* 开票附加字段小标题 */
.invoice-extra-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 18px 0 4px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.container { padding: 16px; }

/* ===== 步骤条 ===== */
.steps {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.step {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
}
.step span {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 600;
}
.step.is-active { color: var(--primary); font-weight: 600; }
.step.is-active span { background: var(--primary); color: #fff; }
.step + .step::before {
  content: ''; width: 32px; height: 2px; background: var(--line-soft); margin: 0 10px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.card-hd h3 { font-size: 15px; color: var(--ink); font-weight: 600; }
.card-bd { padding: 10px 14px; }

.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary); font-weight: 500;
}
.tag-ghost { background: var(--line-soft); color: var(--muted); }

/* ===== 表单字段 ===== */
.field { margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; font-weight: 500;
}
.req { color: #f53f3f; margin-left: 2px; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; min-height: 70px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 15px;
  cursor: pointer; font-size: 13px; color: var(--text); background: var(--white);
  transition: all 0.2s;
}
.chip input { accent-color: var(--primary); }
.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.check-list { display: flex; flex-direction: column; gap: 5px; }
.check-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.check-item:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.check-item input { margin-top: 3px; accent-color: var(--primary); }
.check-item .ci-body { font-size: 12.5px; color: var(--text); }

/* 分论坛双行（标题 + 主席） */
.check-forum { align-items: flex-start; gap: 8px; }
.check-forum input { margin-top: 4px; }
.check-forum .cf-body { display: flex; flex-direction: column; gap: 2px; }
.check-forum .cf-title { font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.check-forum .cf-chair {
  font-size: 10.5px; color: var(--muted); line-height: 1.4;
  padding-top: 2px; border-top: 1px dashed var(--line); margin-top: 0;
}

/* ===== 文件类字段（报告摘要提交） ===== */
.field-file .ff-label { font-size: 13.5px; color: var(--ink); font-weight: 500; margin-bottom: 8px; }

/* 上传区 */
.up-zone {
  position: relative;
  border: 1.5px dashed #c9d7ec; border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 12px 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  outline: none;
}
.up-zone:hover, .up-zone:focus-visible, .up-zone.dragover {
  border-color: var(--primary);
  background: #f4f9ff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.up-zone.has-file {
  border-style: solid; border-color: #bfd8ff;
  background: #f7fbff;
  box-shadow: none;
}
.up-zone input[type="file"] { display: none; }

.up-idle { display: flex; align-items: center; gap: 12px; }
.up-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e8f1ff 0%, #d8e9ff 100%);
  color: var(--primary);
}
.up-text { flex: 1; min-width: 0; }
.up-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.up-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 已选文件态 */
.up-file { display: flex; align-items: center; gap: 10px; text-align: left; }
.uf-badge {
  flex: none; min-width: 40px; text-align: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
  padding: 5px 6px; border-radius: 7px;
  background: #eef2f7; color: #4e5969;
}
.uf-badge.ext-pdf { background: #fff1f0; color: #f5484d; }
.uf-badge.ext-pptx, .uf-badge.ext-ppt { background: #fff3e8; color: #ff8d1a; }
.uf-badge.ext-docx, .uf-badge.ext-doc { background: #e8f3ff; color: var(--primary); }
.uf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uf-name {
  font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uf-meta { font-size: 11px; color: var(--muted); }
.uf-clear {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 12px; color: #f56f6f; padding: 6px 2px 6px 10px;
}
.uf-clear:active { opacity: 0.75; }

/* 提示与模板下载 */
.fp-tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.fp-tip:empty { display: none; }
.fp-tip.is-error { color: #d4380d; }
.fp-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; line-height: 1.5; }
.up-tpl {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 12px; font-size: 12.5px; color: var(--primary);
  text-decoration: none;
}
.up-tpl .ut-ico { font-size: 12px; }
.up-tpl .ut-note { color: var(--muted); }
.up-tpl:active { opacity: 0.8; }

/* 分论坛分组 */
.forum-group { margin-bottom: 6px; }
.forum-group:last-child { margin-bottom: 0; }
.fg-title {
  font-size: 11.5px; font-weight: 600; color: var(--primary);
  padding: 4px 8px; background: var(--primary-tint);
  border-radius: 6px; margin-bottom: 6px; letter-spacing: 0.5px;
}

/* ===== 缴费卡片 ===== */
.fee-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fee-card {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px;
  cursor: pointer; text-align: center; transition: all 0.2s; position: relative;
}
.fee-card input { position: absolute; opacity: 0; }
.fee-card:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.fee-card .fc-amount { font-size: 22px; font-weight: 700; color: var(--ink); }
.fee-card .fc-amount small { font-size: 13px; font-weight: 400; color: var(--muted); }
.fee-card .fc-type { font-size: 13px; color: var(--text); margin-top: 4px; }
.fee-card .fc-badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 8px;
  background: var(--warning); color: #fff; margin-bottom: 6px;
}
.fee-card .fc-badge.std { background: var(--primary); }
.fee-card .fc-orig { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-top: 2px; }
.free-inline {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.free-inline .fi-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.free-inline input {
  flex: 1; min-width: 140px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
}
.free-inline input:focus { outline: none; border-color: var(--primary); }
.free-inline .free-tip {
  width: 100%; margin-top: 6px; padding: 6px 10px; border-radius: 6px;
  background: #fff7e6; color: var(--warning); font-size: 12px;
}

/* ===== 预览 ===== */
.preview-list { display: flex; flex-direction: column; gap: 0; }
.preview-item {
  display: flex; padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.preview-item:last-child { border-bottom: none; }
.pi-label { width: 100px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.pi-value { color: var(--ink); font-size: 13px; word-break: break-all; line-height: 1.7; }

/* ===== 按钮 ===== */
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.form-actions.dual { justify-content: space-between; }
.submit-hint {
  margin-top: 10px; text-align: center;
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.btn-primary, .btn-secondary {
  flex: 1; padding: 13px; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { opacity: 0.85; }
.btn-secondary { background: var(--line-soft); color: var(--text); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: #fff; padding: 10px 18px;
  border-radius: 8px; font-size: 14px; z-index: 999; max-width: 80%; text-align: center;
}
