/* ==========================================================================
   网点端（手机）样式：列表页 + 条目详情页
   目标：单手可操作、字号够大、点击区域 ≥ 46px、重要按钮固定在底部
   ========================================================================== */

body.mobile { background: #eef1f5; font-size: 16px; }

/* ---------- 顶部 ---------- */
.m-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, #1f4e79 0%, #2e6da4 100%);
  color: #fff;
  padding: 14px 16px calc(12px);
  padding-top: calc(14px + env(safe-area-inset-top));
  box-shadow: 0 2px 10px rgba(20, 40, 70, .18);
}
.m-top .t { font-size: 19px; font-weight: 700; line-height: 1.3; }
.m-top .s { font-size: 12.5px; opacity: .88; margin-top: 4px; line-height: 1.5; }
.m-top .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 14px;
  opacity: .95;
  margin-bottom: 6px;
}
.m-top .back:hover { color: #fff; text-decoration: none; opacity: 1; }

.m-body { padding: 12px 12px 104px; }
.m-body.no-foot { padding-bottom: 24px; }

/* ---------- 进度条 ---------- */
.m-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.m-progress .big { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.m-progress .cap { font-size: 12px; color: var(--muted); }
.m-progress .bar { flex: 1; height: 9px; background: #e7ecf2; border-radius: 5px; overflow: hidden; }
.m-progress .bar i { display: block; height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, #2e6da4, #38b06e); transition: width .3s; }

/* ---------- 清单分组与行 ---------- */
.m-group { margin-bottom: 14px; }
.m-group > h2 {
  font-size: 14px;
  color: #55637a;
  margin: 0 4px 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-group > h2 .cnt { font-weight: 400; color: #8b97a6; font-size: 12.5px; }
.m-list { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }

.m-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  min-height: 66px;
  border-bottom: 1px solid var(--border-light);
  color: inherit;
  text-decoration: none;
}
.m-row:last-child { border-bottom: none; }
.m-row:active { background: #f4f7fb; }
.m-row .info { flex: 1; min-width: 0; }
.m-row .name { font-size: 16px; font-weight: 600; color: #1c2b3a; line-height: 1.35; }
.m-row .meta { font-size: 12.5px; color: #7b8794; margin-top: 4px; line-height: 1.5; word-break: break-all; }
.m-row .meta b { color: #33475c; }
.m-row .side { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.m-row .arrow { color: #c3ccd6; font-size: 20px; line-height: 1; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 11px; font-size: 12px; white-space: nowrap; }
.pill.todo { background: #fff4e5; color: #a86a00; }
.pill.done { background: #e3f6e9; color: #1e8449; }
.pill.book { background: #e6f0fa; color: #1b5e91; }
.pill.nobook { background: #f1f2f4; color: #5b6876; }

/* ---------- 底部固定操作条 ---------- */
.m-foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid #e2e7ee;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  box-shadow: 0 -3px 14px rgba(20, 40, 70, .08);
}
.m-foot .btn { flex: 1; height: 46px; font-size: 16px; }
.m-foot .btn.wide { flex: 2; }

/* ---------- 详情页：数量与拍照 ---------- */
.m-field { margin-bottom: 16px; }
.m-field > label { font-size: 14px; color: #4c5b6d; margin-bottom: 8px; font-weight: 500; }

.qty-box { display: flex; align-items: center; gap: 12px; }
.qty-box button {
  width: 50px; height: 50px;
  font-size: 24px; line-height: 1;
  border: 1px solid #d5dbe2;
  background: #fff;
  border-radius: 12px;
  color: var(--primary);
  cursor: pointer;
}
.qty-box button:active { background: #eef4fa; }
.qty-box input {
  flex: 1;
  height: 50px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
}
.qty-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.m-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.m-card .title { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.m-card .facts { font-size: 13px; color: #66748a; line-height: 1.7; word-break: break-all; }
.m-card .facts b { color: #33475c; }

/* 拍照按钮与照片网格 */
.cam-row { display: flex; gap: 10px; }
.cam-row .cam-big { flex: 1; }
.cam-big {
  width: 100%;
  padding: 20px 12px;
  border: 2px dashed #9dc0e0;
  border-radius: 12px;
  background: #fafdff;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cam-big.ghost { border-style: solid; border-color: #d5dbe2; background: #fff; color: #4c5b6d; }
.cam-big:active { background: #eef6fd; }
.cam-big:disabled { opacity: .5; }
.cam-web {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #d5dbe2;
  border-radius: 10px;
  background: #fff;
  color: #4c5b6d;
  font-size: 14px;
  cursor: pointer;
}

/* 电脑摄像头拍摄弹窗 */
.cam-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 22, 34, .86);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cam-modal.on { display: flex; }
.cam-panel { width: 100%; max-width: 640px; }
.cam-panel video { width: 100%; border-radius: 12px; background: #000; display: block; }
.cam-actions { display: flex; gap: 12px; margin-top: 14px; }
.cam-actions .btn { flex: 1; height: 46px; font-size: 16px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-grid figure { margin: 0; position: relative; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #f4f6f8;
  border: 1px solid var(--border-light);
}
.photo-grid .x {
  position: absolute;
  top: 4px; right: 4px;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.photo-grid .cap { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: center; }
.photo-slot {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px dashed #c3d4e4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 6px;
}

/* ---------- 其他 ---------- */
.m-collapse > summary {
  cursor: pointer;
  font-size: 14px;
  color: #4c5b6d;
  padding: 10px 0;
  list-style: none;
}
.m-collapse > summary::-webkit-details-marker { display: none; }
.m-collapse > summary::before { content: "▸ "; color: #9aa7b6; }
.m-collapse[open] > summary::before { content: "▾ "; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(20, 40, 60, .93);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 14px;
  z-index: 60;
  max-width: 88vw;
  text-align: center;
}
