:root {
  --bg: #eef3f9;
  --bg-2: #e3ecf7;
  --card: #ffffff;
  --ink: #0d1b2a;
  --ink-2: #31465c;
  --muted: #71869b;
  --line: #e2eaf2;
  --brand: #0f62d6;
  --brand-2: #2f8bff;
  --brand-soft: #e8f1ff;
  --ok: #12a37a;
  --warn: #e08b16;
  --danger: #d64545;
  --gold: #e0a11b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 42, 67, .04), 0 12px 32px -18px rgba(16, 42, 67, .28);
  --shadow-lg: 0 2px 4px rgba(16, 42, 67, .05), 0 24px 48px -24px rgba(16, 42, 67, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -10%, #dfebff 0%, transparent 60%),
    radial-gradient(900px 520px at 105% 0%, #e6f7f1 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--brand); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 234, 242, .9);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.logo {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a76f2, #0a4fb5);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .5px;
  box-shadow: 0 8px 20px -8px rgba(15, 98, 214, .8);
}

.brand > div { min-width: 0; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .sub { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 布局 ---------- */
.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(14px, 4vw, 40px) 64px;
  display: grid;
  gap: 18px;
}

.wrap.narrow { width: min(880px, 100%); }

.card {
  background: var(--card);
  border: 1px solid rgba(226, 234, 242, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.6vw, 28px);
}

.card-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 14px;
}
.card-title h2 { margin: 0; font-size: 16px; font-weight: 700; }
.card-title .desc { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 表单 ---------- */
.step {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
  margin: 4px 0 14px;
}
.step + .step { margin-top: 28px; }

.step-no {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(145deg, #2f8bff, #0f62d6);
  border-radius: 8px;
  box-shadow: 0 6px 14px -8px rgba(15, 98, 214, .9);
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.branch-opt {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 14px 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
  user-select: none;
}
.branch-opt:hover { border-color: #b9d3f3; transform: translateY(-1px); }
.branch-opt input { position: absolute; opacity: 0; pointer-events: none; }
.branch-opt .name { font-weight: 700; font-size: 15.5px; letter-spacing: 1px; }
.branch-opt .tag { font-size: 11px; color: var(--muted); }
.branch-opt.checked {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(47, 139, 255, .14);
}
.branch-opt.checked .tag { color: var(--brand); }

.day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 620px) {
  .day-grid { grid-template-columns: 1fr; }
}

.day-field {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fbfdff;
  transition: border-color .16s, box-shadow .16s;
}
.day-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 139, 255, .14); }

.day-field .lbl { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.day-field .lbl strong { font-size: 15px; }
.day-field .lbl span { font-size: 11.5px; color: var(--muted); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 44px 12px 14px;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: .5px;
  transition: border-color .16s;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.input-wrap input:focus { border-color: var(--brand); }
.input-wrap .unit {
  position: absolute; right: 14px;
  font-size: 12px; color: var(--muted); pointer-events: none;
}

.submit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}
.hint { font-size: 12.5px; color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s, opacity .16s;
  text-decoration: none;
  font-family: inherit;
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line);
  white-space: nowrap;
}
.btn:hover { border-color: #b9d3f3; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(145deg, #2f8bff, #0f62d6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(15, 98, 214, .95);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.big { padding: 13px 30px; font-size: 15.5px; border-radius: 12px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: #f1c2c2; background: #fff6f6; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-weight: 600;
}
.btn.switch.on { background: #e9f9f2; border-color: #b7e8d6; color: #0b7f5e; }
.btn.switch.on:hover { background: #dcf5ea; border-color: #8fdcc0; }
.btn.switch.off { background: #fdf1f1; border-color: #f0c9c9; color: #b93c3c; }
.btn.switch.off:hover { background: #fbe4e4; border-color: #e6a9a9; }
.btn.switch.off .dot { background: var(--danger); animation: none; }
.btn.switch[disabled] { opacity: .65; cursor: progress; }.btn .spin {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 提示 ---------- */
.alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.alert.ok { background: #e9f9f2; color: #0c7d5e; border: 1px solid #bfeedd; }
.alert.err { background: #fdeeee; color: #a83232; border: 1px solid #f6cfcf; }

/* ---------- 实时条 ---------- */
.live-strip { display: grid; gap: 14px; }
.live-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.live-head .muted { color: var(--muted); font-weight: 500; }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b7c6d6;
  box-shadow: 0 0 0 0 rgba(18, 163, 122, .4);
}
.dot.on { background: var(--ok); animation: pulse 1.8s infinite; }
.dot.off { background: var(--warn); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 163, 122, .45); }
  70% { box-shadow: 0 0 0 8px rgba(18, 163, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 163, 122, 0); }
}

.live-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.live-day {
  background: #f7fafe;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.live-day .k { font-size: 12px; color: var(--muted); }
.live-day .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.live-day .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* ---------- 看板 KPI ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 820px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: var(--card);
  border: 1px solid rgba(226, 234, 242, .9);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--brand));
}
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.kpi .v { font-size: clamp(26px, 3vw, 34px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.kpi .m { font-size: 11.5px; color: var(--muted); }

/* ---------- 图表 ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .chart-grid { grid-template-columns: 1fr; } }

.chart-card { padding: 18px 18px 12px; }
.chart-card > header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 4px;
}
.chart-card h3 { margin: 0; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chart-card h3 .bar-mark { width: 4px; height: 15px; border-radius: 3px; background: var(--accent, var(--brand)); display: inline-block; }
.chart-card .sub { margin: 2px 0 0 12px; font-size: 11.5px; color: var(--muted); }
.chart-total { text-align: right; }
.chart-total .k { font-size: 11px; color: var(--muted); display: block; }
.chart-total .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent, var(--brand)); line-height: 1.15; }

.bar-chart { width: 100%; height: auto; display: block; overflow: visible; }
.bar-chart .grid-line { stroke: #e8eef5; stroke-width: 1; }
.bar-chart .axis-text { fill: #8497a8; font-size: 10.5px; font-family: inherit; }
.bar-chart .x-label { fill: #46607a; font-size: 11.5px; font-weight: 600; font-family: inherit; }
.bar-chart .x-label.total { fill: var(--ink); font-weight: 800; }
.bar-chart .val-label { fill: #1d3550; font-size: 12px; font-weight: 700; font-family: inherit; font-variant-numeric: tabular-nums; }
.bar-chart .bar { transition: filter .15s; }
.bar-chart .bar:hover { filter: brightness(1.07); }
.bar-chart .divider { stroke: #dfe8f1; stroke-dasharray: 3 4; }

/* ---------- 明细表 ---------- */
.table-wrap { overflow-x: auto; }
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  min-width: 560px;
}
table.grid th, table.grid td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid #eef3f8;
  font-size: 13.5px;
}
table.grid th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  background: #f8fbfe;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid th:first-child, table.grid td:first-child { text-align: left; }
table.grid tbody tr:hover td { background: #f9fcff; }
table.grid td.branch { font-weight: 700; letter-spacing: .5px; }
table.grid td.sum, table.grid th.sum { background: #fbfdff; font-weight: 700; }
table.grid tr.total-row td {
  background: #f3f8ff;
  font-weight: 800;
  border-bottom: none;
  color: var(--ink);
}
table.grid tr.total-row td:first-child { color: var(--brand); }

/* ---------- 记录列表 ---------- */
.rec-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.rec {
  display: grid;
  grid-template-columns: 72px 52px repeat(3, minmax(48px, 1fr)) 96px 52px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rec .id { color: var(--muted); font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.rec .b { font-weight: 700; }
.rec .d { text-align: right; }
.rec .d span { color: var(--muted); font-size: 10.5px; margin-right: 3px; }
.rec .t { color: var(--muted); font-size: 11.5px; text-align: right; }
.rec .del { opacity: 0; transition: opacity .15s; }
.rec:hover .del { opacity: 1; }
@media (max-width: 700px) {
  .rec { grid-template-columns: 1fr auto; }
  .rec .id, .rec .t { display: none; }
}

.empty { color: var(--muted); font-size: 13px; padding: 18px; text-align: center; }

/* ---------- toast ---------- */
.toast-host {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  display: grid; gap: 8px;
  max-width: min(360px, 90vw);
}
.toast {
  background: #102a43; color: #fff;
  padding: 11px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease-out;
}
.toast.ok { background: linear-gradient(145deg, #12a37a, #0b7f5e); }
.toast.err { background: linear-gradient(145deg, #d64545, #ab3030); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 其他 ---------- */
.muted { color: var(--muted); }
.foot { text-align: center; font-size: 11.5px; color: var(--muted); padding: 8px 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 扫码填报卡片 ---------- */
.scan-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
}
.qr-box {
  width: 172px;
  height: 172px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 10px -6px rgba(16, 42, 67, .45);
}
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-box .empty { font-size: 12px; color: var(--muted); text-align: center; padding-top: 68px; }
.scan-main { min-width: 0; }
.scan-main .desc { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.url-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.url-row code {
  flex: 1 1 280px;
  min-width: 0;
  padding: 9px 12px;
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #274763;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hint-line { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .scan-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 20px 16px; }
  .url-row { justify-content: center; }
  .url-row code { flex-basis: 100%; text-align: left; }
}

/* ---------- 独立二维码页（投屏 / 打印） ---------- */
.qr-body { background: #fff; }
.qr-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
}
.qr-page h1 { margin: 0; font-size: clamp(24px, 4vw, 40px); letter-spacing: .02em; }
.qr-sub { margin: 0; color: var(--muted); font-size: 15px; }
.qr-big {
  width: min(58vh, 78vw);
  max-width: 520px;
  aspect-ratio: 1 / 1;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 44px -26px rgba(16, 42, 67, .55);
}
.qr-big svg { display: block; width: 100%; height: 100%; }
.qr-url {
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #274763;
  word-break: break-all;
  max-width: 560px;
}
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media print {
  .qr-actions, .hint-line, .qr-sub { display: none; }
  .qr-page { min-height: auto; padding: 0; }
  .qr-big { width: 68vh; box-shadow: none; border-color: #ddd; }
}

/* ---------- 报名关闭提示页 ---------- */
.closed-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, #e8f1ff 0%, rgba(232, 241, 255, 0) 60%),
    var(--bg);
}
.closed-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 36px 38px;
  box-shadow: var(--shadow-lg);
}
.closed-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f6fc;
  color: #5b7a99;
}
.closed-card h1 { margin: 12px 0 10px; font-size: 22px; letter-spacing: .01em; }
.closed-msg { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.closed-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* 填报页被关闭时的遮罩 */
.closed-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(238, 243, 249, .93);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.closed-overlay[hidden] { display: none; }
.closed-overlay .closed-card { box-shadow: var(--shadow-lg); }

/* ===== 通用小件 ===== */
.pill-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2a6fc9;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tip-line {
  margin: 14px 0 0;
  padding: 11px 15px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #f3dfa8;
  color: #8a6410;
  font-size: 13px;
  line-height: 1.65;
}
.tip-line[hidden] { display: none; }

/* ===== 页面2：统计大屏（1920×1080 放映画幅，整体缩放适配） ===== */
body.deck-body {
  margin: 0;
  overflow: hidden;
  background: radial-gradient(1200px 760px at 18% -6%, #17253c 0%, #0b1220 58%, #060a12 100%);
}
.deck-fit {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.deck {
  width: 1920px;
  height: 1080px;
  padding: 48px 56px;
  box-sizing: border-box;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  gap: 26px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fbfdff 0%, #edf4fc 100%);
  box-shadow: 0 46px 130px rgba(0, 0, 0, .58);
  overflow: hidden;
}

/* 头部 */
.deck-head {
  flex: 0 0 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.deck-brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.logo-lg {
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b8bff, #0f4db8);
  box-shadow: 0 12px 30px rgba(15, 77, 184, .34);
}
.deck-brand-text { min-width: 0; }
.deck-brand-text h1 { margin: 0; font-size: 46px; line-height: 1.15; letter-spacing: .01em; color: #0c1a29; }
.deck-sub { margin: 6px 0 0; font-size: 20px; color: #6b8095; }
.deck-tools { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; }
.live-head { display: flex; align-items: center; gap: 10px; font-size: 20px; color: #5a7288; }
.live-head .dot { width: 12px; height: 12px; }
.deck-tools .btn.switch { font-size: 19px; padding: 12px 22px; border-radius: 14px; }

/* 主体三块 */
.deck-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-rows: 300px 1fr;
  gap: 26px;
}
.deck-qr {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 34px 22px 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e3ecf6;
  box-shadow: 0 12px 34px rgba(18, 52, 88, .07);
}
.qr-cap-top {
  font-size: 22px;
  font-weight: 750;
  color: #0c1a29;
  letter-spacing: .02em;
}
.qr-box-lg {
  width: 320px;
  height: 320px;
  margin: 18px 0 0;
  padding: 12px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e8f0f8;
}
.qr-box-lg svg { width: 100%; height: 100%; display: block; }
.qr-url-sm {
  margin-top: 18px;
  max-width: 100%;
  font-size: 14px;
  color: #8799ab;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qr-mini-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.mini {
  appearance: none;
  font: inherit;
  font-size: 15px;
  padding: 8px 15px;
  border-radius: 11px;
  border: 1px solid #dbe6f2;
  background: #f7fbff;
  color: #2b4763;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background .15s, border-color .15s, transform .08s;
}
.mini:hover { background: #eef6ff; border-color: #b9d3ef; }
.mini:active { transform: translateY(1px); }
.qr-foot-tip {
  margin-top: 22px;
  font-size: 15px;
  color: #93a5b6;
  text-align: center;
  line-height: 1.6;
}

/* 统计块 */
.deck-stats {
  grid-column: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  min-height: 0;
}
.stat-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 36px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(120deg, #0f4db8 0%, #2a7bff 62%, #57a2ff 100%);
  box-shadow: 0 16px 40px rgba(15, 77, 184, .28);
}
.stat-hero::after {
  content: '';
  position: absolute;
  right: -70px;
  top: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.stat-hero .k { font-size: 20px; line-height: 1.35; letter-spacing: .1em; opacity: .9; }
.stat-hero .v {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 82px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.stat-hero .v small { font-size: 26px; font-weight: 600; opacity: .88; }
.stat-hero .m { font-size: 16px; line-height: 1.3; opacity: .82; }
.stat-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-day {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 22px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e3ecf6;
  border-left: 6px solid var(--accent, #0f62d6);
  box-shadow: 0 8px 22px rgba(18, 52, 88, .05);
}
.stat-day .k { font-size: 18px; color: #5d7186; letter-spacing: .04em; }
.stat-day .v {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  color: #0c1a29;
  font-variant-numeric: tabular-nums;
}
.stat-day .v small { font-size: 16px; font-weight: 600; color: #8095a8; }
.stat-day .m { font-size: 14px; color: #93a5b6; }

/* 图表区 */
.deck-charts {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  min-height: 0;
}
.deck-charts .chart-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 20px 12px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e3ecf6;
  box-shadow: 0 12px 34px rgba(18, 52, 88, .07);
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}
.chart-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 27px;
  font-weight: 780;
  color: #0c1a29;
}
.chart-head h2::before {
  content: '';
  width: 6px;
  height: 25px;
  border-radius: 4px;
  background: var(--accent, #0f62d6);
}
.chart-total { display: flex; align-items: baseline; gap: 6px; }
.chart-total span {
  font-size: 38px;
  font-weight: 800;
  color: #0c1a29;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.chart-total small { font-size: 16px; color: #8095a8; font-weight: 600; }
.deck-charts .chart-body { flex: 1 1 auto; min-height: 0; }
.deck-charts svg.chart { display: block; width: 100%; height: 100%; }

/* 图内元素（大屏） */
.chart .grid-line { stroke: #e6eef7; stroke-width: 1; }
.chart .axis-text { fill: #9aacbd; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .x-label { fill: #3d5a76; font-family: inherit; font-weight: 700; }
.chart .val-label { fill: #16283c; font-family: inherit; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart .bar {
  transition: y .55s cubic-bezier(.22, .61, .36, 1), height .55s cubic-bezier(.22, .61, .36, 1);
}

/* 底部 */
.deck-foot {
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  color: #8b9eb0;
}
.deck-foot-right { color: #a2b3c3; }

@media (max-width: 1100px) {
  .deck-body .deck { border-radius: 0; }
}

/* ===== 访问密码页 ===== */
body.gate-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(760px 460px at 12% 0%, #eaf3ff 0%, rgba(234, 243, 255, 0) 62%),
    radial-gradient(680px 420px at 100% 100%, #e9f7f2 0%, rgba(233, 247, 242, 0) 58%),
    #f5f8fc;
}
.gate-wrap { width: 100%; max-width: 420px; }
.gate-card {
  display: flex;
  flex-direction: column;
  padding: 40px 34px 30px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line, #e3ecf6);
  box-shadow: 0 22px 56px rgba(18, 52, 88, .12);
}
.gate-logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b8bff, #0f4db8);
  box-shadow: 0 12px 26px rgba(15, 77, 184, .3);
}
.gate-card h1 { margin: 0; font-size: 23px; text-align: center; color: #0c1a29; }
.gate-sub { margin: 8px 0 26px; font-size: 14px; color: var(--muted, #6b8095); text-align: center; }
.gate-field { display: block; margin-bottom: 16px; }
.gate-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3d5a76;
}
.gate-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  letter-spacing: .06em;
  color: #0c1a29;
  background: #f8fbff;
  border: 1.5px solid #dde8f4;
  border-radius: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gate-field input:focus {
  background: #fff;
  border-color: var(--brand, #0f62d6);
  box-shadow: 0 0 0 4px rgba(15, 98, 214, .12);
}
.gate-alert {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #a4262c;
  background: #fdf0f0;
  border: 1px solid #f6d3d4;
}
.gate-alert[hidden] { display: none; }
.gate-card .btn.big { width: 100%; margin-top: 4px; }
.gate-foot { margin: 18px 0 0; font-size: 12.5px; color: #9aacbd; text-align: center; line-height: 1.6; }



/* 窄屏：顶栏右侧提示让位给标题 */
@media (max-width: 620px) {
  .topbar { gap: 10px; padding: 12px 14px; }
  .topbar-actions { display: none; }
  .brand h1 { font-size: 16px; }
}