:root {
  --bg: #f5f6fa; --card: #fff; --text: #1f2329; --muted: #8a9099;
  --primary: #2563eb; --ok: #16a34a; --warn: #d97706; --danger: #dc2626; --border: #e5e7eb;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.6; }
.container { max-width: 1080px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 16px 0 12px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
a { color: var(--primary); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 16px; background: #fff; padding: 10px 16px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); }
.nav-links { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.nav-links a { color: #4b5563; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.who { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 12px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; margin-bottom: 8px; }
.tag { display: inline-block; background: #f3f4f6; border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.amber { background: #fef3c7; color: #b45309; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.btn { display: inline-block; border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { display: block; width: 100%; text-align: center; margin-top: 8px; }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
label { display: block; margin: 10px 0; font-size: 14px; color: #374151; }
input, select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; margin-top: 4px; background: #fff; }
button[type=submit] { cursor: pointer; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { background: #fafafa; font-weight: 600; color: #4b5563; }
.table tr:last-child td { border-bottom: none; }
.alert { border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.alert.ok { background: #dcfce7; color: #14532d; }
.alert.error { background: #fee2e2; color: #7f1d1d; }
.alert.warn { background: #fef3c7; color: #78350f; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px;
  text-align: center; min-width: 96px; }
.stat .num { display: block; font-size: 22px; font-weight: 700; }
.stat span:last-child { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .grid-2, .kv { grid-template-columns: 1fr; } .nav-links { order: 3; width: 100%; } }
.list { list-style: none; padding: 0; }
.list li { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 8px 0;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.result-icon { font-size: 42px; width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; color: #fff; }
.result-icon.ok { background: var(--ok); }
.result-icon.error { background: var(--danger); }
.result { border-radius: 10px; padding: 24px; text-align: center; font-size: 20px; font-weight: 600; margin: 16px 0; }
.result.ok { background: #dcfce7; color: #14532d; }
.result.error { background: #fee2e2; color: #7f1d1d; }
.qr-box { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 10px; }
.code-text { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; color: var(--muted); }
.scanner { margin: 12px 0; }
.scanner video { width: 100%; max-width: 420px; border-radius: 10px; background: #000; }
.hidden { display: none; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail { max-width: 320px; word-break: break-all; }
.checker-page .container { max-width: 560px; }
.success-page .container { max-width: 520px; }
