:root {
  --blue-1: #1e3a8a;
  --blue-2: #2563eb;
  --blue-3: #60a5fa;
  --blue-soft: #dbeafe;
  --indigo: #312e81;
  --violet: #6d28d9;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --warm: #fff7ed;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: rgba(99, 102, 241, 0.18);
  --paper: rgba(255, 255, 255, 0.92);
  --paper-2: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 10px 30px rgba(30, 58, 138, 0.10);
  --shadow-md: 0 18px 48px rgba(30, 58, 138, 0.18);
  --shadow-lg: 0 28px 80px rgba(30, 58, 138, 0.22);
  --grad-hero: linear-gradient(180deg, #eaf2ff 0%, #f6f0ff 38%, #fff7ed 78%, #fef3c7 100%);
  --grad-accent: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #f59e0b 100%);
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% -8%, rgba(37, 99, 235, 0.18), transparent 40%),
    radial-gradient(ellipse at 92% 4%, rgba(245, 158, 11, 0.18), transparent 38%),
    radial-gradient(ellipse at 50% 110%, rgba(109, 40, 217, 0.12), transparent 45%),
    linear-gradient(180deg, #f4f8ff 0%, #f7f6fd 60%, #fff8ec 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 14px 14px 56px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 17px;
  color: var(--blue-1);
  position: relative;
}

.brand-bar--gold {
  font-size: 28px;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #b8860b, #daa520, #ffd700, #daa520, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(184, 134, 11, 0.25));
}

.brand-bar::before,
.brand-bar::after {
  content: '';
  width: 26px;
  height: 1px;
  margin: 0 10px;
  background: linear-gradient(90deg, transparent, var(--blue-2), transparent);
}

.poster-card {
  position: relative;
  margin: 8px 0 18px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #0b1e4a;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.poster-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.notice-card {
  margin: 0 0 22px;
  padding: 20px 18px 22px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.notice-card .title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--blue-1);
}

.notice-card .title .bar {
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-accent);
}

.notice-card .body {
  font-size: 14px;
  line-height: 1.85;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.notice-card .body .sub {
  display: block;
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--blue-1);
}

.lookup-card {
  margin: 0 0 18px;
  padding: 18px 18px 20px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(254, 252, 246, 0.9));
  border: 1px dashed var(--grad-accent);
  box-shadow: var(--shadow-sm);
}

.lookup-card .title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue-1);
}

.lookup-card .title .bar {
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-accent);
}

.lookup-card .lookup-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.form-card {
  margin: 0 0 18px;
  padding: 22px 18px 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 248, 240, 0.86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.form-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-card h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--grad-accent);
}

.field {
  margin: 0 0 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field label .req {
  color: #dc2626;
  margin-right: 2px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-shell:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.input-shell.has-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  background: #fff5f5;
}

.input-shell input,
.input-shell select {
  flex: 1;
  height: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 15px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink);
}

.input-shell select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.input-shell.has-icon input,
.input-shell.has-icon select {
  padding-left: 38px;
}

.input-shell .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--blue-2);
  pointer-events: none;
}

.field-error {
  margin: 6px 2px 0;
  color: #dc2626;
  font-size: 13px;
  min-height: 18px;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  transition: all 180ms ease;
  margin: 0;
}

.radio-group label:has(input:checked) {
  border-color: var(--blue-2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(99, 102, 241, 0.10));
  color: var(--blue-1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.radio-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.date-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.date-radio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: auto;
  min-height: 64px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  transition: all 180ms ease;
  margin: 0;
}

.date-radio:has(input:checked) {
  border-color: var(--blue-2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(99, 102, 241, 0.10));
  color: var(--blue-1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.date-label {
  font-size: 15px;
  font-weight: 700;
}

.date-radio.full {
  opacity: 0.45;
  pointer-events: none;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.date-radio.full .date-label {
  color: #94a3b8;
  text-decoration: line-through;
}

.btn-primary {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
  transition: transform 120ms ease, box-shadow 200ms ease, filter 180ms ease;
}

.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.btn-ghost {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.btn-ghost:hover {
  border-color: var(--blue-2);
  color: var(--blue-1);
}

.btn-danger {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.25);
}

.seats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(245, 158, 11, 0.10));
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}

.seats-bar b {
  color: var(--blue-1);
  font-size: 16px;
  margin: 0 2px;
}

.seats-bar.full {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(245, 158, 11, 0.10));
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.22);
}

.seats-bar.full b { color: #b91c1c; }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
  animation: fadeIn 200ms ease;
}

.modal-mask.show { display: flex; }

.modal {
  width: min(100%, 360px);
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px 18px;
  box-shadow: var(--shadow-lg);
  animation: pop 240ms cubic-bezier(.22,1.2,.36,1) both;
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.modal p {
  margin: 0 0 18px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal .actions .btn-primary,
.modal .actions .btn-ghost {
  width: auto;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  letter-spacing: 0;
}

.modal .actions .btn-primary.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25);
}

.modal .actions .btn-primary.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
body { animation: pageIn 320ms ease both; }

.success-card {
  margin-top: 8px;
  padding: 26px 22px 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 248, 240, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.success-card .seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32);
}

.success-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: var(--blue-1);
  letter-spacing: 0.04em;
}

.success-card .sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.qr-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fafbff, #f3f6ff);
  border: 1px dashed rgba(37, 99, 235, 0.35);
  margin-bottom: 14px;
}

.qr-card img {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.qr-card .hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 18px;
  text-align: left;
}

.info-grid .item {
  background: linear-gradient(180deg, #fafbff, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.info-grid .item .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-grid .item .v {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  word-break: break-all;
}

.cancel-zone {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.checkin-card {
  text-align: center;
  padding: 30px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 253, 245, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: var(--shadow-md);
}

.checkin-card .big {
  font-size: 22px;
  font-weight: 900;
  color: #047857;
  margin: 8px 0 12px;
  line-height: 1.6;
}

.checkin-card .stamp {
  font-size: 13px;
  color: var(--muted);
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-side .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 18px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 8px;
}

.admin-side .brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grad-accent);
}

.admin-side .nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-side .nav button {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 11px 12px;
  color: #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 160ms ease, color 160ms ease;
}

.admin-side .nav button:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #fff;
}

.admin-side .nav button.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(245, 158, 11, 0.18));
  color: #fff;
}

.admin-side .logout {
  margin-top: auto;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 0;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-main {
  padding: 22px 24px;
  background: #f8fafc;
  overflow: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 16px;
}

.admin-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: linear-gradient(135deg, #fff, #f4f8ff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-card .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-card .num {
  font-size: 26px;
  font-weight: 900;
  color: var(--blue-1);
}

.stat-card.warn .num { color: #b45309; }
.stat-card.ok .num { color: #047857; }
.stat-card.bad .num { color: #b91c1c; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fafbff);
}

.panel .panel-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.panel .panel-body { padding: 16px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar input,
.toolbar select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.toolbar input { min-width: 180px; }
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

table.data th,
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

table.data th {
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
  color: #334155;
  font-weight: 800;
  position: sticky;
  top: 0;
}

table.data tr:hover td { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.active { background: #dcfce7; color: #166534; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.checked { background: #dbeafe; color: #1e40af; }

.scanner-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.scanner-video {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
}

.scanner-video video,
.scanner-video canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#scannerBox {
  position: absolute;
  inset: 0;
}

.scanner-placeholder {
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 14px;
  padding: 20px;
  text-align: center;
  pointer-events: none;
}

.scanner-frame {
  position: absolute;
  inset: 12%;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  pointer-events: none;
}

.scanner-frame::before,
.scanner-frame::after,
.scanner-frame > i:nth-child(1),
.scanner-frame > i:nth-child(2) {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #f59e0b;
}

.scanner-frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scanner-frame::after { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scanner-frame > i:nth-child(1) { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scanner-frame > i:nth-child(2) { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

.manual-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.checkin-result {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #064e3b;
  font-size: 14px;
  line-height: 1.7;
  display: none;
}

.checkin-result.show { display: block; }
.checkin-result.bad {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.06));
  border-color: rgba(239, 68, 68, 0.25);
  color: #7f1d1d;
}

.checkin-result h4 { margin: 0 0 6px; font-size: 15px; }

.scan-confirm-person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.06));
  border: 1px solid var(--line);
}

.scan-confirm-person .pc-avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #10b981);
}

.scan-confirm-person .pc-info {
  min-width: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.scan-confirm-person .pc-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-1);
  margin-bottom: 2px;
}

.login-card {
  width: min(100%, 380px);
  margin: 8vh auto;
  padding: 30px 26px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.login-card .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--grad-accent);
  color: #fff;
  margin: 0 auto 14px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.32);
}

.login-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.login-card .sub {
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 880px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; overflow-x: auto; padding: 12px; gap: 8px; }
  .admin-side .brand { display: none; }
  .admin-side .nav { flex-direction: row; }
  .admin-side .logout { margin-top: 0; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .scanner-wrap { grid-template-columns: 1fr; }
}

.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .admin-main { padding: 14px 10px 40px; }
  .admin-header { padding: 2px 4px 12px; }
  .admin-header h1 { font-size: 17px; }
  .admin-side { padding: 10px; gap: 6px; }
  .admin-side .nav button { padding: 10px 10px; font-size: 13px; gap: 6px; }
  .admin-side .logout { padding: 10px 10px; font-size: 13px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 10px 12px; }
  .stat-card .lbl { font-size: 11px; margin-bottom: 4px; }
  .stat-card .num { font-size: 20px; }
  .panel .panel-body { padding: 12px; }
  .panel .panel-header { padding: 12px; }
  .toolbar { gap: 8px; }
  .toolbar input { min-width: 0; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 45%; min-width: 0; }
  .toolbar .btn-ghost { flex: 1 1 100%; margin: 2px 0; }
  .io-grid { grid-template-columns: 1fr; }
  table.data th,
  table.data td { padding: 8px 10px; white-space: nowrap; }
  .admin-main .panel-body > div[style*="overflow:auto"],
  .admin-main .panel-body > div > div[style*="overflow:auto"] {
    -webkit-overflow-scrolling: touch;
  }
  .scanner-video { aspect-ratio: 1 / 1; }
  .manual-form .row { grid-template-columns: 1fr; }
  .modal { width: min(100%, 340px); padding: 20px 16px 14px; }
}

@media (max-width: 480px) {
  .container { padding: 8px 10px 36px; }
  .brand-bar { padding: 12px 12px 4px; font-size: 15px; }
  .brand-bar--gold { font-size: 28px; }
  .notice-card { padding: 16px 14px; }
  .lookup-card { padding: 16px 14px; }
  .form-card { padding: 18px 14px; }
}

/* ===== 首页文字整体大一号（大标题除外） ===== */
.page-home .form-card h2 { font-size: 20px; }
.page-home .field label { font-size: 16px; }
.page-home .question { font-size: 16px; }
.page-home .input-shell input,
.page-home .input-shell select { font-size: 16px; }
.page-home .field-error { font-size: 15px; }
.page-home .radio-group label { font-size: 15px; }
.page-home .date-radio { font-size: 15px; }
.page-home .date-label { font-size: 16px; }
.page-home .form-card > p { font-size: 14px; }
.page-home .form-card .btn-primary { font-size: 18px; }
.page-home .lookup-card .title { font-size: 18px; }
.page-home .lookup-card .lookup-hint { font-size: 15px; }
.page-home .lookup-card .btn-primary { font-size: 18px; }
.page-home .notice-card .title { font-size: 19px; }
.page-home .notice-card .body,
.page-home .notice-card .body .sub { font-size: 16px; }