:root {
  --brand: #1a75c5;
  --brand-nav: #1a5fbc;
  --bg: #f5fafc;
  --card: #fff;
  --text: #333;
  --muted: #666;
  --line: #eee;
  --line2: #ddd;
  --danger: #d32f2f;
  --ok: #12a150;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.gray { background: #e8e8e8; }

/* 手机框：详情页/历史页用，桌面居中正看，窄屏自动收 */
.phone {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  padding-bottom: 84px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}

.wrap { max-width: 460px; margin: 0 auto; padding: 0 14px 28px; }

/* 顶部蓝色横幅（首页） */
.band { background: var(--brand); color: #fff; text-align: center; padding: 14px 12px; letter-spacing: 1px; font-size: 15px; }
.band h1 { font-size: 15px; font-weight: 400; }
.band p { font-size: 11px; opacity: .8; margin-top: 2px; letter-spacing: 0; }

/* 蓝色导航（详情页/结果页）：返回 + 标题 + 历史订单 */
.nav {
  background: var(--brand-nav);
  color: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 15px;
  position: relative;
}
.nav .back { font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none; color: #fff; }
.nav .ttl { position: absolute; left: 50%; transform: translateX(-50%); font-size: 15px; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.nav .link { font-size: 13px; cursor: pointer; text-decoration: none; color: #fff; }

/* 一行一条的表单/信息 */
.rows { background: #fff; padding: 0 16px; }
.row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-of-type { border-bottom: none; }
.f-label { width: 76px; flex: 0 0 76px; color: #555; font-size: 13px; }
.f-input { flex: 1; min-width: 0; border: none; outline: none; font-size: 13px; color: var(--text); text-align: right; background: transparent; font-family: inherit; }
.f-input::placeholder { color: #aaa; }
.f-value { flex: 1; text-align: right; font-size: 13px; color: var(--text); }
select.f-value { appearance: none; -webkit-appearance: none; cursor: pointer; }

.btn-wrap { padding: 40px 16px 20px; }
.btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: 1px solid var(--brand);
  border-radius: 24px;
  background: #fff;
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 4px;
  text-indent: 4px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}
.btn:active { background: #f2f9ff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.solid { background: var(--brand); color: #fff; letter-spacing: 1px; text-indent: 0; }
.btn.slim { padding: 9px 0; }

/* 详情表格 */
.table-wrap { border: 1px solid var(--line2); margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; text-align: center; font-size: 12px; }
th { background: #f5f5f5; padding: 9px 4px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); font-weight: 700; color: #222; }
td { padding: 11px 4px; border-right: 1px solid var(--line2); border-bottom: 1px solid #eee; color: #555; vertical-align: middle; }
th:first-child, td:first-child { width: 36px; }
tr:last-child td { border-bottom: none; }
td:last-child, th:last-child { border-right: none; }
.pj { text-align: left; padding-left: 8px; line-height: 1.4; }
.pj small { display: block; font-size: 11px; color: var(--muted); }

/* 方框勾选：外观按稿子的空心方框，实际用隐藏原生 checkbox（键盘/读屏可用，不靠 JS 切 class） */
.cbbox { position: relative; display: inline-block; width: 15px; height: 15px; vertical-align: middle; }
.cbbox input.real { position: absolute; inset: 0; width: 15px; height: 15px; margin: 0; opacity: 0; cursor: pointer; }
.cb {
  width: 15px; height: 15px;
  border: 1px solid #999;
  background: #fff;
  display: block;
  position: relative;
}
.cbbox input.real:checked + .cb::after { content: '✓'; position: absolute; top: -2px; left: 2px; color: var(--brand-nav); font-size: 13px; font-weight: 700; }
.cbbox input.real:disabled + .cb { background: #f2f2f2; border-color: #ccc; }
.cbbox input.real:focus-visible + .cb { outline: 2px solid var(--brand); outline-offset: 1px; }
.row-off td { color: #aaa; }

/* 合计 + 底部按钮 */
.total-bar { padding: 0 16px 10px; text-align: right; font-size: 12px; color: var(--text); }
.total-bar b { color: var(--danger); font-size: 14px; font-variant-numeric: tabular-nums; }
.foot { position: absolute; left: 16px; right: 16px; bottom: 16px; }
.tip { padding: 12px 16px; font-size: 13px; color: var(--text); }
.tip .k { font-weight: 700; }
.tip .v { color: var(--muted); font-weight: 400; }

/* 旧的通用卡片（收银台/结果页/模拟页还在用） */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 10px; }
.card + .card { margin-top: 8px; }
.label { font-size: 12px; color: var(--muted); }
.kv, .user-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 3px 0; }
.kv span:first-child, .user-line span:first-child { color: var(--muted); flex: 0 0 auto; }
.kv span:last-child, .user-line span:last-child { text-align: right; word-break: break-all; }
.empty { text-align: center; color: var(--muted); padding: 16px 0; font-size: 12px; }
.err { color: var(--danger); font-size: 12px; margin-top: 6px; min-height: 16px; padding: 0 16px; }
.channel { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.channel:last-child { border-bottom: 0; }
.channel input { accent-color: var(--brand); width: 14px; height: 14px; }
.channel .tag { font-size: 11px; color: var(--muted); margin-left: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #fff3e6; color: #b76b00; }
.badge.paid { background: #e6f6ec; color: var(--ok); }
.amount-big { font-size: 24px; font-weight: 700; text-align: center; padding: 4px 0 2px; font-variant-numeric: tabular-nums; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid #cfd8e8; border-top-color: var(--brand); border-radius: 50%; animation: s .7s linear infinite; vertical-align: -2px; margin-right: 5px; }
@keyframes s { to { transform: rotate(360deg); } }

/* 收款方公示 + 页脚说明 */
.payee {
  margin: 10px 16px 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 11px;
  color: #666;
  line-height: 1.7;
}
.payee b { color: var(--text); }
.notice { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.75; border-top: 1px solid var(--line); padding-top: 9px; }

/* ---------------- 后台页专用 ---------------- */
.phone.wide { max-width: 520px; padding-bottom: 24px; }
.pane { padding-bottom: 12px; }
.pad { padding: 10px 16px; }
.hint { padding: 8px 16px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.f-input.left { text-align: left; }
.f-input.num { max-width: 62px; flex: 0 0 62px; text-align: right; }
.mini {
  flex: 0 0 auto;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.mini:disabled { opacity: .5; }

.tabs { display: flex; border-bottom: 1px solid var(--line2); background: #fff; }
.tab {
  flex: 1;
  border: 0;
  background: none;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}
.tab.on { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }

.stu { border-bottom: 1px solid var(--line); background: #fff; }
.stu .hd { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.stu .no { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; }
.stu .nm { flex: 1; min-width: 0; font-size: 12px; }
.stu .nm small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stu .mg { flex: 0 0 auto; text-align: right; font-size: 11px; color: var(--danger); }
.stu .mg small { display: block; color: var(--muted); }
.items { list-style: none; border-top: 1px dashed var(--line); background: #fbfdff; }
.items li { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12px; border-bottom: 1px solid #f0f0f0; }
.items li:last-child { border-bottom: 0; }
.items li.off { color: #aaa; }
.items .it { flex: 1; min-width: 0; }
.items .it small { display: block; font-size: 11px; color: var(--muted); }
.items .am { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.items .tag { flex: 0 0 auto; font-size: 11px; color: var(--ok); }

details.box { margin: 10px 12px; border: 1px solid var(--line2); border-radius: var(--radius); background: #fff; }
details.box > summary { padding: 9px 12px; font-size: 13px; font-weight: 700; color: var(--brand); cursor: pointer; list-style: none; }
details.box > summary::before { content: '+ '; }
details.box[open] > summary::before { content: '- '; }
.irow { display: flex; gap: 6px; align-items: center; padding: 6px 12px; border-bottom: 1px dashed var(--line); }
.irow .i_item { flex: 1; min-width: 0; }
.irow input { border: 1px solid var(--line2); border-radius: 4px; padding: 4px 6px; font-size: 12px; font-family: inherit; }

/* ---------------- 缴费确认页 ---------------- */
.band-nav {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 14px 0;
  font-size: 15px;
  letter-spacing: 1px;
  position: relative;
}
.band-nav .back { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 22px; line-height: 1; color: #fff; text-decoration: none; }
.sec { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.table-wrap { border-radius: 6px; overflow: hidden; }
.total-bar.big { display: flex; justify-content: flex-end; align-items: baseline; padding: 14px 4px; font-size: 13px; }
.total-bar.big b { font-size: 18px; margin-left: 6px; }
.btn-wrap.tight { padding: 10px 16px 26px; }
.picked-off td { color: #aaa; }
.payline { padding: 0 16px 6px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.7; }
.pad-x { padding: 0 16px; }

/* 二维码块（当前是稿子里那张固定码，已本地化） */
.qrcode-box {
  margin: 10px 16px 20px;
  padding: 22px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}
.qrcode-box .tip { font-size: 13px; color: var(--text); margin-bottom: 14px; }
.qrcode-img { width: 220px; height: 220px; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; background: #fff; }
.qrcode-box .sub { font-size: 12px; color: #888; margin-top: 14px; }
