:root {
  --primary: #0fa968;
  --primary-d: #067a47;
  --primary-l: #e8f6ee;
  --ink: #12251b;
  --sub: #55685d;
  --mute: #87988d;
  --line: #e2ede7;
  --bg: #f5faf7;
  --green: #0aa06e;
  --orange: #ff7a00;
  --red: #e5484d;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(16, 62, 42, 0.08);
}

* { 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", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 14px 110px;
  min-height: 100vh;
}

/* ---------- 顶部 ---------- */
.hero {
  margin: 14px 0 0;
  padding: 20px 20px 22px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #067a47 0%, #0fa968 55%, #34c77b 100%);
  box-shadow: 0 10px 28px rgba(15, 169, 104, 0.26);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -50px; top: -60px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.hero .brand {
  font-size: 12.5px;
  letter-spacing: 2px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero .brand i {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,.9);
  color: var(--primary-d); font-style: normal; font-size: 12px;
  display: grid; place-items: center; font-weight: 800;
}
.hero h1 {
  margin: 10px 0 6px;
  font-size: 22px;
  letter-spacing: 0.5px;
  font-weight: 800;
}
.hero p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.6;
}

/* ---------- 选择入口 ---------- */
.section-title {
  margin: 22px 4px 12px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title span { color: var(--mute); font-size: 12.5px; font-weight: 400; }
.section-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, #0fa968, #34c77b);
}

.pick {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  position: relative;
}
.pick:active { transform: scale(0.985); border-color: #a9dcbf; }
.pick .row { display: flex; align-items: center; gap: 14px; }
.pick .ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--primary-l); flex: none;
}
.pick .ico svg { width: 26px; height: 26px; }
.pick h3 { margin: 0 0 3px; font-size: 16.5px; font-weight: 700; }
.pick p { margin: 0; font-size: 12.5px; color: var(--sub); line-height: 1.5; }
.pick .arrow {
  margin-left: auto; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0fa968, #34c77b);
  color: #fff; font-size: 28px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 14px rgba(15, 169, 104, 0.32);
}
.pick:active .arrow { transform: scale(0.94); }
.pick .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 11.5px; color: var(--primary-d);
  background: #eaf7f0; border-radius: 6px; padding: 3px 8px;
}

.query-entry {
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0 0; padding: 12px 14px;
  text-decoration: none; color: var(--primary-d);
  background: #eef9f2; border: 1px solid #cfeadd; border-radius: 12px;
  font-size: 13.5px; font-weight: 700;
}
.query-entry:active { background: #e2f4e9; }

.tips {
  margin: 16px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.tips b { font-size: 13.5px; display: block; margin-bottom: 8px; }
.tips ol { margin: 0; padding-left: 18px; color: var(--sub); font-size: 12.8px; line-height: 1.9; }

/* ---------- 表单 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  background: rgba(245, 250, 247, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  margin: 0 0 4px;
}
.topbar a {
  height: 40px; border-radius: 12px; background: #fff;
  border: 1.5px solid #b8e0c8; display: flex; align-items: center; justify-content: center;
  gap: 2px; padding: 0 12px 0 8px;
  color: var(--primary-d); text-decoration: none; flex: none;
  font-size: 13.5px; font-weight: 700;
}
.topbar a .back-ico { font-size: 24px; line-height: 1; font-weight: 400; }
.topbar a:active { background: var(--primary-l); }
.topbar h2 { margin: 0; font-size: 16px; font-weight: 700; }
.topbar .sub { font-size: 11.5px; color: var(--mute); font-weight: 400; }

.progress {
  height: 6px; border-radius: 6px; background: #e5f1ea; overflow: hidden; margin: 6px 0 14px;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #0fa968, #34c77b);
  border-radius: 6px; transition: width 0.3s ease;
}

.field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(16, 62, 42, 0.04);
  scroll-margin-top: 70px;
}
.field.err { border-color: #ffc9c9; background: #fffafa; }
.field .head { display: flex; align-items: flex-start; gap: 8px; }
.field .idx {
  font-size: 12px; color: var(--primary-d); background: #eaf7f0;
  border-radius: 6px; padding: 2px 7px; font-weight: 700; flex: none;
  margin-top: 2px;
}
.field .name { font-size: 15px; font-weight: 700; }
.field .req { color: var(--red); font-size: 12px; margin-left: 4px; }
.field .tip {
  font-size: 12.3px; color: var(--sub); margin: 5px 0 0; line-height: 1.55;
}
.field .body { display: flex; gap: 10px; margin-top: 12px; align-items: flex-start; }

/* 范本缩略图 */
.sample {
  width: 96px; height: 74px; flex: none; border-radius: 10px;
  overflow: hidden; position: relative; border: 1px solid var(--line);
  background: #f7faff; padding: 0; cursor: zoom-in;
}
.sample img { width: 100%; height: 100%; object-fit: cover; }
.sample::after {
  content: "范本";
  position: absolute; left: 0; bottom: 0;
  font-size: 10.5px; color: #fff; background: rgba(6, 122, 71, 0.84);
  padding: 1px 6px; border-top-right-radius: 6px;
}

/* 上传区 */
.uploader { flex: 1; min-width: 0; }
.drop {
  border: 1.5px dashed #a9dcbf;
  border-radius: 12px;
  background: #f8fcf9;
  min-height: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--primary);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  padding: 10px 8px;
  text-align: center;
  line-height: 1.45;
}
.drop:active { background: #ecf9f1; border-color: var(--primary); }
.drop b { font-weight: 700; }
.drop small { display: block; color: var(--mute); font-size: 11.5px; font-weight: 400; margin-top: 2px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-bottom: 8px; }
.file-input {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  overflow: hidden; pointer-events: none;
}
.thumb {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #f0f8f3;
  aspect-ratio: 1 / 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .del {
  position: absolute; right: 3px; top: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; border: 0;
  font-size: 13px; line-height: 1; display: grid; place-items: center; cursor: pointer;
}
.thumb .state {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 10.5px; text-align: center; color: #fff;
  background: rgba(6, 122, 71, 0.82); padding: 2px 0;
}
.thumb.done .state { background: rgba(10, 160, 110, 0.82); }

.add-more {
  border: 1.5px dashed #a9dcbf; border-radius: 12px; background: #f8fcf9;
  color: var(--primary); font-size: 13px; padding: 12px; width: 100%;
  cursor: pointer;
}

/* 文本输入 */
.input-wrap { position: relative; }
input[type="text"], input[type="tel"], input[type="password"] {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px; /* 防 iOS 缩放 */
  color: var(--ink);
  background: #fbfefc;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}
input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus {
  border-color: var(--primary); background: #fff;
}
input::placeholder { color: #a6b8ab; }

.err-msg {
  display: none; color: var(--red); font-size: 12px; margin-top: 6px;
}
.field.err .err-msg { display: block; }

/* 协议勾选 */
.agreements {
  margin: 16px 0 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e3ece6;
  border-radius: 12px;
}
.agreements h4 {
  margin: 0 0 8px; font-size: 13px; color: var(--ink);
  font-weight: 700;
}
.agreement-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; font-size: 13px; color: #3a4a41;
  border-top: 1px dashed #eef3ef;
}
.agreement-row:first-of-type { border-top: 0; }
.agreement-row input[type=checkbox] {
  width: 17px; height: 17px; margin: 0; flex: none;
  accent-color: var(--primary);
}
.agreement-row a {
  color: var(--primary-d); font-weight: 700;
  text-decoration: underline; margin-left: 2px;
}
.agreements.err { border-color: #ff6b6b; background: #fff7f7; }

/* 签署信息自动填充预览 */
.fill-preview {
  background: linear-gradient(135deg,#f0fbf5,#eaf7f0);
  border: 1px solid #cfeadd; border-radius: 12px;
  padding: 12px 14px; margin: 0 0 14px;
}
.fill-preview .fp-title {
  font-size: 13px; font-weight: 700; color: var(--primary-d);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.fill-preview .fp-title::before {
  content: ""; width: 4px; height: 14px; border-radius: 3px; background: var(--primary);
}
.fill-preview .fp-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 5px 0; font-size: 13px; line-height: 1.5;
  border-bottom: 1px dashed #d6ecdf;
}
.fill-preview .fp-row:last-of-type { border-bottom: 0; }
.fill-preview .fp-row span { color: var(--sub); flex: none; width: 62px; }
.fill-preview .fp-row b {
  color: var(--ink); font-weight: 700; word-break: break-word; flex: 1;
}
.fill-preview .fp-note {
  margin: 8px 0 0; font-size: 11.5px; color: var(--sub); line-height: 1.6;
}

/* 成功页协议入口 */
.done-docs { display: flex; flex-direction: column; gap: 10px; padding: 0 14px; margin: 0 0 18px; }
.done-doc {
  display: block; text-decoration: none; color: var(--primary-d);
  background: #fff; border: 1px solid #cfeadd; border-radius: 12px;
  padding: 13px 14px; font-size: 14px; font-weight: 700; text-align: center;
}
.done-doc::after { content: " ›"; color: #8fbf9f; }
.done-doc:active { background: #f0fbf5; }

/* 底部提交 */
.footer-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245, 250, 247, 0) 0%, #f5faf7 30%);
}
.btn {
  width: 100%;
  max-width: 492px;
  margin: 0 auto;
  display: block;
  border: 0;
  border-radius: 14px;
  padding: 15px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #0fa968, #34c77b);
  box-shadow: 0 8px 20px rgba(15, 169, 104, 0.3);
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--primary);
  border: 1.5px solid #b8e0c8; box-shadow: none;
}

.foot-note {
  text-align: center; color: var(--mute); font-size: 11.5px;
  margin: 14px 0 0; line-height: 1.7;
}
.ver { text-align:center; color:#a6b8ab; font-size:11px; margin:10px 0 0; }
.ver b { font-weight:600; color:#8fa398; }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 24, 18, 0.62);
  display: none; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(2px);
}
.mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow: auto; padding: 16px;
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h4 { margin: 2px 0 4px; font-size: 16px; }
.modal .m-tip { font-size: 12.8px; color: var(--sub); margin: 0 0 12px; line-height: 1.6; }
.modal img { border-radius: 10px; border: 1px solid var(--line); display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; background: #fff; }
.modal .close { margin-top: 14px; }

/* 结果页 */
.result {
  text-align: center; padding: 46px 20px 20px;
}
.result .ok {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(135deg, #0aa06e, #2fd39a);
  display: grid; place-items: center; box-shadow: 0 10px 24px rgba(10, 160, 110, 0.28);
}
.result h2 { margin: 0 0 8px; font-size: 21px; }
.result p { margin: 0 0 6px; color: var(--sub); font-size: 13.5px; }
.result .code {
  display: inline-block; margin: 14px 0 22px; padding: 8px 16px;
  background: #eef9f2; border: 1px dashed #a9dcbf; border-radius: 10px;
  color: var(--primary-d); font-size: 13.5px; letter-spacing: 1px;
}

/* 上传进度 */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(12, 26, 20, 0.86); color: #fff; padding: 14px 20px;
  border-radius: 12px; font-size: 14px; z-index: 90; display: none;
  min-width: 160px; text-align: center;
}
.toast.on { display: block; }
.toast .bar { height: 4px; background: rgba(255,255,255,.25); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.toast .bar i { display: block; height: 100%; width: 0; background: #7bd3a5; transition: width .2s; }

/* ---------- 后台 ---------- */
.admin-wrap { max-width: 1320px; margin: 0 auto; padding: 18px 14px 60px; }
.admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-head h1 { font-size: 19px; margin: 0; }
.admin-head .sub { font-size: 12.5px; color: var(--mute); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.card h3 { margin: 0 0 4px; font-size: 15.5px; }
.card .hint { font-size: 12.3px; color: var(--sub); margin: 0 0 14px; line-height: 1.6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
label.lb { display: block; font-size: 12.5px; color: var(--sub); margin: 0 0 6px; font-weight: 600; }
select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fbfefc; font-size: 15px; color: var(--ink); outline: none;
}
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--mute); }
.stat-link { cursor: pointer; transition: border-color .18s, background .18s; }
.stat-link:hover { border-color: var(--primary); background: #f7fcf9; }
.stat-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stat-link.active { border-color: var(--primary); background: #edf9f2; }
#s-pending { color: #a9631a; }
#s-reviewed { color: var(--primary-d); }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(3, 1fr); } }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--mute); font-weight: 600; font-size: 12px; }
td img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- 后台：提交记录表格（电脑端一屏看全 / 手机端卡片自适应） ---------- */
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px;
  background: var(--primary); flex: none;
}
.table-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: 100%; min-width: 1160px;
  border-collapse: separate; border-spacing: 0;
  font-size: 13.2px;
  font-variant-numeric: tabular-nums;
}
.table-wrap th,
.table-wrap td {
  text-align: center; vertical-align: middle; white-space: nowrap;
  padding: 13px 9px;
  border-bottom: 1px solid var(--line);
}
.table-wrap thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #f5fbf8, #e9f6ef);
  color: var(--primary-d);
  font-size: 12.5px; font-weight: 700; letter-spacing: .5px;
  padding: 15px 9px;
  border-bottom: 1px solid #d5e9dd;
}
.table-wrap thead th:first-child { border-top-left-radius: 13px; }
.table-wrap thead th:last-child { border-top-right-radius: 13px; }
.table-wrap tbody tr { transition: background .15s; }
.table-wrap tbody tr:nth-child(even) { background: #fbfefc; }
.table-wrap tbody tr:hover { background: #f0faf5; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td img {
  width: 54px; height: 54px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(16, 62, 42, .1);
}
.table-wrap .col-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.3px; color: var(--sub); letter-spacing: .2px;
}
.table-wrap .col-party { font-weight: 600; max-width: 250px; white-space: normal; line-height: 1.4; }
.table-wrap .col-time span { display: block; font-size: 12.8px; line-height: 1.4; }
.table-wrap .col-time em { display: block; font-style: normal; font-size: 11.8px; color: var(--mute); line-height: 1.4; }
.table-wrap .col-review, .table-wrap .col-ops { white-space: nowrap; }
.table-wrap td a { color: var(--primary-d); text-decoration: none; }
.table-wrap td a:hover { text-decoration: underline; }
.table-wrap td .btn-sm { margin: 2px 1px; }
.table-wrap .empty { padding: 40px 10px; color: var(--mute); font-size: 13px; }

/* 平板：缩小字号与间距，尽量少滚动 */
@media (min-width: 821px) and (max-width: 1120px) {
  .table-wrap table { min-width: 960px; font-size: 12.2px; }
  .table-wrap th, .table-wrap td { padding: 10px 6px; }
  .table-wrap thead th { padding: 12px 6px; font-size: 11.5px; }
  .table-wrap td img { width: 44px; height: 44px; }
  .table-wrap .col-party { max-width: 170px; }
  .table-wrap .col-time span { font-size: 12px; }
  .table-wrap td .btn-sm { padding: 5px 8px; font-size: 12px; }
}

/* 手机：保持表格形态，可在表格内左右滑动查看（与 v2026.11.21.18 一致，不做卡片化） */
@media (max-width: 820px) {
  .table-wrap table { min-width: 1000px; font-size: 12.2px; }
  .table-wrap th, .table-wrap td { padding: 11px 8px; }
  .table-wrap thead th { padding: 13px 8px; font-size: 12px; }
  .table-wrap td img { width: 50px; height: 50px; }
  .table-wrap .col-id { font-size: 12px; }
  .table-wrap .col-party { max-width: 200px; }
  .table-wrap .col-time span { font-size: 12.5px; }
  .table-wrap .col-time em { font-size: 11.5px; }
  .table-wrap td .btn-sm { padding: 5px 9px; font-size: 12px; }
  .table-wrap .empty { padding: 32px 10px; }
}

.pill { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; }
.pill.p { background: #eaf7f0; color: var(--primary-d); }
.pill.c { background: #f0f9f4; color: #0a7a52; }
.pill.no { background: #fff1f1; color: #c62b30; }
.pill.y { background: #f0f9f4; color: #0a7a52; }
.pill.wait { background: #fdf4e6; color: #a9631a; }
.btn-sm {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink);
}
.btn-sm.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-sm.danger { color: var(--red); border-color: #ffd6d6; }
.hidden { display: none !important; }
.login-box { max-width: 360px; margin: 14vh auto 0; }
.row-flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 后台：说明块与推送结果 ---------- */
.notice-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f2fbf6;
  border: 1px solid #cfeadd;
  font-size: 12.6px;
  color: #33564a;
  line-height: 1.75;
}
.notice-box b { color: #12251b; }
.notice-box ol { margin: 6px 0 2px; padding-left: 18px; }
.notice-box p { margin: 8px 0 0; }
.notice-box .warn { color: #c62b30; }

.push-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.push-result.err { background: #fff5f5; border: 1px solid #ffd6d6; color: #b3272d; }
.push-result.ok { background: #f0fbf5; border: 1px solid #c8ecd9; color: #067a47; }

/* ---------- 后台：断连横幅 ---------- */
.netbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  background: #fff5f5;
  border-bottom: 1px solid #ffd6d6;
  color: #b3272d;
  font-size: 12.8px;
  line-height: 1.6;
}
.netbar b { color: #b3272d; font-size: 13px; }
.netbar span { flex: 1; min-width: 240px; color: #8c3c3c; }
.netbar code { background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid #ffd6d6; }

/* ---------- 后台可折叠卡片 ---------- */
.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; margin: -16px -16px 0; padding: 16px;
  border-radius: var(--radius); user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h3 { margin: 0; font-size: 15.5px; }
.fold-arrow { color: var(--mute); font-size: 13px; transition: transform .2s; flex: none; }
.fold[open] > summary { margin-bottom: 14px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.fold[open] .fold-arrow { transform: rotate(180deg); }
.fold > summary:hover { background: #fafdfb; }

/* ---------- 首页：间距放大到接近原始值、略收一档，让内容铺满一屏且不滚动 ----------
 * 只作用于 index.html 的 .home，其他页面（表单/查询/后台/协议/补传）完全不受影响。
 */
.home { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.home .hero { margin-top: 8px; padding: 16px 18px 17px; border-radius: 18px; }
.home .hero h1 { margin: 6px 0 4px; font-size: 21px; }
.home .hero p { font-size: 13px; line-height: 1.5; }
.home .section-title { margin: 12px 4px 8px; }
.home .pick { padding: 14px; margin-bottom: 7px; }
.home .pick .ico { width: 46px; height: 46px; border-radius: 13px; }
.home .pick .ico svg { width: 25px; height: 25px; }
.home .pick h3 { font-size: 16px; }
.home .pick .arrow { width: 40px; height: 40px; font-size: 27px; }
.home .pick .tags { margin-top: 7px; }
.home .query-entry { margin-top: 3px; padding: 9px 14px; }
.home .tips { margin-top: 10px; padding: 11px 15px; }
.home .tips b { margin-bottom: 5px; }
.home .tips ol { font-size: 13px; line-height: 1.55; }
.home .foot-note { margin-top: 8px; line-height: 1.55; }
.home .ver { margin-top: 5px; }

/* 联系电话：比页脚浅灰深一档，看得清又不抢主按钮的注意力 */
.home .foot-note a { color: #5f7468; text-decoration: none; }
.home .foot-note a:active { color: var(--primary-d); }

/* 提交页：协议卡与底部说明/版本之间不再留大片空白（提交按钮仍固定底部不受影响） */
/* 提交页：按钮保持悬浮；说明与版本号一起进入悬浮区、紧贴按钮上方，
   内容区不再为它们预留空档，红框那段空白随之消失。 */
#view-form { min-height: auto; padding-bottom: 118px; }
#view-form .footer-bar {
  padding: 4px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245, 250, 247, 0) 0%, #f5faf7 18%);
}
#view-form .foot-note { margin: 0; }
#view-form .ver { margin: 2px 0 8px; }

/* ---- 业务员权限：无授权的功能入口一律不显示（前端展示与后端校验一致） ----
   由 admin.js 的 applyAccount 根据当前账号权限给 body 加 no-perm-* class。 */
body.no-perm-review .perm-ui-review,
body.no-perm-reject .perm-ui-reject,
body.no-perm-edit .perm-ui-edit,
body.no-perm-export .perm-ui-export,
body.no-perm-download .perm-ui-download,
body.no-perm-delete .perm-ui-delete { display: none !important; }

/* ---- 全设备自适应增强：手机/平板/桌面自动适配（纯样式，不改布局结构与功能） ---- */
/* 1) 防止任何内容横向溢出整个页面（表格内部横滑不受影响） */
html, body { max-width: 100%; overflow-x: hidden; }
img, input, select, textarea { max-width: 100%; box-sizing: border-box; }
/* 2) 后台头部：窄屏时标题独占一行，操作按钮自动换行不挤压 */
.admin-head { flex-wrap: wrap; }
.admin-head > div:first-child { min-width: 0; flex: 1 1 100%; }
.admin-head h1 { overflow-wrap: anywhere; }
@media (min-width: 821px) { .admin-head > div:first-child { flex: 1 1 auto; } }
/* 3) 统计卡片：手机改 2 列，长文案换行不溢出 */
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 11px 10px; }
  .stat span { overflow-wrap: anywhere; }
}
/* 4) 长文本与按钮组在窄屏自动换行 */
.row-flex { min-width: 0; }
.btn-sm { max-width: 100%; }
@media (max-width: 640px) {
  .card { padding: 14px; }
  .row-flex > * { min-width: 0; }
}
/* 5) 二维码引导卡片：窄屏时二维码与文字自动换行，文字不被挤压 */
.qr-row { display: flex; align-items: center; gap: 12px; }
@media (max-width: 480px) {
  .qr-row { flex-wrap: wrap; gap: 10px; }
  .qr-row > div:last-child { min-width: 0; flex: 1 1 160px; }
}
