:root {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --bg-card: #1c2230;
  --line: #2a3140;
  --line-soft: #222836;
  --text: #e8ecf3;
  --text-dim: #9aa5b6;
  --text-mute: #6b7688;
  --brand: #3d7eff;
  --brand-soft: #1e3a6b;
  --ok: #22c07a;
  --warn: #f0a020;
  --danger: #e5484d;
  --radius: 14px;
  --radius-sm: 10px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:active { opacity: .75; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: #4a2022; color: #f08a8c; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.input, .textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s;
}
.input:focus, .textarea:focus { border-color: var(--brand); }
.textarea { resize: vertical; min-height: 76px; line-height: 1.5; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: var(--bg-soft);
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.tag-ok { background: #123528; color: #5fd39b; border-color: #1a4d38; }
.tag-warn { background: #3a2c10; color: #f0b95c; border-color: #55411a; }
.tag-brand { background: var(--brand-soft); color: #8fb4ff; border-color: #2b4d8f; }

.row { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-dim); }
.mute-sm { color: var(--text-mute); font-size: 12px; }
.center { text-align: center; }
.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #232a38;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 999;
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: #5a2628; color: #f2a0a2; }

.qr-box {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  line-height: 0;
}
.qr-box svg, .qr-box img { display: block; width: 100%; height: auto; }

/* ---- 二维码点击放大 ----
   现场扫码距离远，168px 的码常常扫不上。给一个明确的可点击暗示，
   点开后铺满遮罩、居中显示 2 倍尺寸，点任意处关闭。 */
.qr-zoomable { cursor: zoom-in; position: relative; transition: transform .15s; }
.qr-zoomable:hover { transform: scale(1.03); }
.qr-zoomable::after {
  /* 提示放在二维码上方：下方常有会场码/链接说明，放下面会压住文字 */
  content: '点击放大';
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  font-size: 11px; line-height: 1; color: var(--text-mute);
  white-space: nowrap; pointer-events: none;
}
.qr-zoomable:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.qr-zoom-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6, 8, 12, .93);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  opacity: 0; transition: opacity .18s;
  cursor: zoom-out; backdrop-filter: blur(3px);
}
.qr-zoom-mask.show { opacity: 1; }
.qr-zoom-box {
  background: #fff; padding: 18px; border-radius: 18px; line-height: 0;
  transform: scale(.86); transition: transform .18s cubic-bezier(.22,.9,.3,1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.qr-zoom-mask.show .qr-zoom-box { transform: scale(1); }
.qr-zoom-holder { line-height: 0; }
.qr-zoom-holder .qr-box { padding: 0; background: transparent; }
.qr-zoom-hint { font-size: 13px; color: #8a94a6; letter-spacing: .5px; }

.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2e3648; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
