/* 扫码报名系统 · 共用样式（移动端优先，不依赖任何外部字体/CDN） */
:root {
  --brand: #2f6fed;
  --brand-dark: #1f56c9;
  --ink: #1b2330;
  --muted: #66748c;
  --line: #e3e8f0;
  --bg: #f4f6fb;
  --ok: #12a05c;
  --warn: #d98600;
  --bad: #d64550;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:active { opacity: .7; }
.wrap { max-width: 620px; margin: 0 auto; padding: 16px 14px 40px; }
.wrap.wide { max-width: 1180px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(20, 33, 61, .04);
}
.card.center { text-align: center; padding: 48px 20px; }
h1 { font-size: 21px; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; white-space: pre-wrap; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.req::after { content: " *"; color: var(--bad); font-weight: 700; }
.help { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 12px; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 18px center, right 12px center; background-size: 6px 6px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 111, 237, .14); }
input.bad, select.bad, textarea.bad { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fbfcfe; font-size: 15px; user-select: none;
}
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 111, 237, .25); }
.err { color: var(--bad); font-size: 13px; margin-top: 5px; min-height: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 20px; border: 1px solid var(--brand); border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.gray { background: #fff; color: var(--ink); border-color: var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.ok-box { text-align: center; padding: 26px 16px; }
.ok-box .mark { width: 56px; height: 56px; border-radius: 50%; background: rgba(18, 160, 92, .12); color: var(--ok); font-size: 30px; line-height: 56px; margin: 0 auto 12px; }
.ref {
  font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--brand-dark);
  background: #f0f5ff; border: 1px dashed #b9d0ff; border-radius: 10px; padding: 12px; margin: 10px 0;
  user-select: all;
}
.foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 18px; }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
ul.list li:last-child { border-bottom: 0; }
ul.list a { flex: 1; font-weight: 600; }
.tag { font-size: 12px; color: var(--muted); background: #eef2f8; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.empty { color: var(--muted); }
/* ---- 后台 ---- */
.bar { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.bar .logo { font-weight: 800; font-size: 17px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; font-size: 15px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f8fafd; color: var(--muted); font-weight: 600; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #fbfcff; }
td.wrap-cell { white-space: normal; min-width: 160px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; border: 1px solid transparent; }
.badge.pending { color: var(--warn); background: #fff6e6; border-color: #ffe1b0; }
.badge.approved { color: var(--ok); background: #e9f9f0; border-color: #b8ebd0; }
.badge.rejected { color: var(--bad); background: #fdecec; border-color: #f7c6c9; }
.badge.attended { color: var(--brand); background: #eef4ff; border-color: #c9dcff; }
select.mini { min-height: 34px; padding: 4px 8px; font-size: 13.5px; width: auto; }
input.mini { min-height: 34px; padding: 5px 9px; font-size: 14px; width: auto; }
.stat { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stat div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; color: var(--muted); }
.stat b { display: block; font-size: 20px; color: var(--ink); font-weight: 700; }
.qr-box { text-align: center; }
.qr-box svg, .qr-box img { width: 220px; height: auto; max-width: 100%; }
.url { font-size: 12.5px; color: var(--muted); word-break: break-all; background: #f6f8fc; border-radius: 8px; padding: 8px 10px; margin-top: 8px; user-select: all; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #223049; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: 88vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pager .now { font-size: 13.5px; color: var(--muted); padding: 0 6px; }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .card { padding: 16px 14px; }
  th, td { font-size: 13px; padding: 8px 7px; }
}
@media print {
  body { background: #fff; }
  .no-print, .bar, .tabs { display: none !important; }
  .card { border: 0; box-shadow: none; }
  .qr-box svg { width: 300px; }
}
