/* 上传体检报告 H5 · 样式（移动端优先，微信内打开）· v2 */
:root {
  --green: #3c8c5a;
  --green-d: #2f7049;
  --bg: #f5f6f4;
  --card: #ffffff;
  --ink: #2c2f2c;
  --gray: #8a8f8a;
  --line: #e6e8e5;
  --warn: #c4423a;
  --orange: #d98a2b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.5;
}
.app { max-width: 560px; margin: 0 auto; padding: 0 0 40px; }

/* 顶部 */
.topbar {
  background: linear-gradient(135deg, var(--green), var(--green-d));
  color: #fff; padding: 20px 18px 16px;
}
.topbar .title { font-size: 19px; font-weight: 700; }
.topbar .sub { font-size: 13px; opacity: .92; margin-top: 4px; }

/* 步骤指示 */
.steps {
  display: flex; justify-content: space-between;
  padding: 14px 24px; gap: 6px;
}
.steps .step {
  flex: 1; text-align: center; font-size: 12px; color: var(--gray);
  position: relative; padding-top: 18px;
}
.steps .step::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--line);
}
.steps .step.on { color: var(--green); font-weight: 600; }
.steps .step.on::before { background: var(--green); }

/* 卡片 */
.card {
  background: var(--card); margin: 0 14px 14px; padding: 18px;
  border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 11px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbfa;
  color: var(--ink); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--green); }
.hint { font-size: 12px; color: var(--gray); margin-top: 5px; }

/* 关系分段 */
.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: #fafbfa;
  border-radius: 10px; font-size: 15px; color: var(--ink);
}
.seg-btn.on { background: var(--green); color: #fff; border-color: var(--green); }

/* 费用框 */
.cost-box {
  background: #f0f6f1; border-radius: 10px; padding: 12px 14px; margin: 6px 0 18px;
}
.cost-line { font-size: 13px; color: var(--green-d); }
.cost-line.warn { color: var(--warn); font-weight: 600; }
.cost-line b { font-size: 16px; }
.cost-title { font-size: 13px; color: var(--green-d); font-weight: 600; margin-bottom: 4px; }
.cost-title b { font-size: 17px; }

/* 按钮 */
.primary-btn {
  width: 100%; padding: 13px; font-size: 16px; font-weight: 600;
  background: var(--green); color: #fff; border: none; border-radius: 11px;
}
.primary-btn:disabled { background: #b7c9bd; }
.ghost-btn {
  flex: 1; padding: 13px; font-size: 15px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; color: var(--gray);
}
.primary-btn { flex: 2; }
.row-btns { display: flex; gap: 10px; margin-top: 8px; }

/* 提示条 */
.tip {
  background: #fff8ec; border: 1px solid #f0e0c0; color: #8a6a2b;
  font-size: 13px; padding: 11px 13px; border-radius: 10px; margin-bottom: 14px;
}

/* ====== 日期分组 ====== */
.dgroup {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  margin-bottom: 12px; background: #fcfdfc;
}
.dgroup-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.dgroup-title { font-size: 14px; font-weight: 600; color: var(--green-d); }
.group-del {
  background: none; border: none; color: var(--warn); font-size: 13px; padding: 2px 6px;
}
.group-date {
  width: 100%; padding: 10px 12px; font-size: 16px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.group-date:focus { border-color: var(--green); outline: none; }
/* 加批次：纯文字链接，刻意做得不起眼，与上传大色块形态彻底区分 */
.add-group-link {
  display: block; width: 100%; padding: 12px; background: none; border: none;
  color: var(--gray); font-size: 13px; text-align: center; margin: 2px 0 14px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* 缩略图 */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.thumb {
  width: 84px; height: 84px; border-radius: 10px; background: #eef1ee;
  border: 1px solid var(--line); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-state { font-size: 11px; color: var(--gray); text-align: center; padding: 4px; }
.thumb-state.err { color: var(--warn); }
.thumb-pdf { font-size: 24px; color: var(--orange); text-align: center; line-height: 1.2; }
.thumb-pdf span { font-size: 9px; color: var(--gray); display: block; word-break: break-all;
  max-height: 26px; overflow: hidden; padding: 0 2px; }
.thumb-del {
  position: absolute; top: -1px; right: -1px; width: 22px; height: 22px;
  border-radius: 0 10px 0 10px; background: rgba(196,66,58,.92); color: #fff; border: none;
  font-size: 14px; line-height: 20px; padding: 0;
}
.thumb-move {
  position: absolute; bottom: 2px; right: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(47,112,73,.9); color: #fff; border: none;
  font-size: 13px; line-height: 20px; padding: 0;
}
.thumb.dragging { opacity: .4; }
.dgroup.drop-hint { border-color: var(--green); background: #eef7f0; }

/* 上传大色块：醒目主操作，刻意和"再传一批"文字链接形态彻底拉开 */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 96px; padding: 18px 12px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--green); border-radius: 12px; background: #f0f6f1;
  transition: background .15s, border-color .15s;
}
.upload-zone:active { background: #e4efe7; border-color: var(--green-d); }
.uz-icon { font-size: 28px; line-height: 1; }
.uz-main { font-size: 15px; font-weight: 600; color: var(--green-d); margin-top: 7px; }
.uz-sub { font-size: 12px; color: var(--gray); margin-top: 3px; }

/* 确认 */
.confirm-box { margin-bottom: 12px; }
.confirm-section {
  font-size: 12px; color: var(--gray); margin: 4px 0 8px; font-weight: 600;
}
.confirm-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.confirm-row span { color: var(--gray); }
.fineprint { font-size: 12px; color: var(--gray); text-align: center; margin-top: 12px; }

/* 完成页 */
#panel4 { text-align: center; padding: 36px 20px; }
.done-icon { font-size: 52px; }
.done-title { font-size: 20px; font-weight: 700; margin: 12px 0 8px; }
.done-msg { font-size: 15px; color: var(--gray); margin-bottom: 24px; line-height: 1.6; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
  background: rgba(40,42,40,.92); color: #fff; padding: 11px 18px;
  border-radius: 22px; font-size: 14px; max-width: 80%; text-align: center; z-index: 100;
}

/* 移动到别组的弹层 */
.picker-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.picker {
  background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.picker-title { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 14px; }
.picker-item {
  width: 100%; padding: 13px; margin-bottom: 8px; background: #f0f6f1;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink);
}
.picker-cancel {
  width: 100%; padding: 13px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; color: var(--gray); margin-top: 4px;
}

/* ====== 关系快选（选“家人”才显示） ====== */
.rel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rel-chip {
  padding: 7px 14px; border: 1px solid var(--line); background: #fafbfa;
  border-radius: 18px; font-size: 14px; color: var(--ink);
}
.rel-chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.rel-other { margin-top: 10px; }

/* ====== 隐私说明 ====== */
.privacy-note {
  margin-top: 10px; padding: 9px 11px; background: #f0f6f1; border-radius: 9px;
  font-size: 12px; color: var(--green-d); line-height: 1.5;
}

/* ====== 日期选择（移到图片下方） ====== */
.group-date-field { margin-top: 12px; }
.group-date-label { font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.group-date-sub { font-size: 12px; color: var(--gray); margin-top: 5px; }

/* 单批时去掉卡片边框，界面更简洁不打扰 */
.dgroup.solo { border: none; background: transparent; padding: 0; margin-bottom: 8px; }

.hidden { display: none !important; }
