:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-card: 0 28px 80px rgba(15, 23, 42, 0.11), 0 4px 18px rgba(15, 23, 42, 0.04);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.07);
  --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 12% -12%, rgba(37, 99, 235, 0.13), transparent 65%),
    radial-gradient(780px 520px at 98% 4%, rgba(16, 185, 129, 0.10), transparent 64%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.10) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 68%);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  color: var(--blue-700);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #3b82f6, #1d4ed8 72%);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.30);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 27px;
  height: 27px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  transition: 180ms ease;
  white-space: nowrap;
}

.nav-link svg {
  width: 16px;
  height: 16px;
}

.nav-link:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.stage {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 54px;
  flex: 1;
}

.kiosk-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 30px;
  backdrop-filter: blur(18px);
  animation: card-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kiosk-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue-600), #0ea5e9 48%, var(--emerald-600));
}

.kiosk-card::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -170px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.13), transparent 70%);
  pointer-events: none;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow svg {
  width: 14px;
  height: 14px;
}

.card-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.card-subtitle {
  margin: 7px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.reader-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--emerald-200);
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 12.5px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.reader-badge svg {
  width: 15px;
  height: 15px;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-600);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--emerald-600);
  opacity: 0.35;
  animation: pulse 1.9s ease-out infinite;
}

@keyframes pulse {
  from {
    transform: scale(0.7);
    opacity: 0.55;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

.uid-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 15px;
  margin-bottom: 20px;
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.uid-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.uid-icon svg {
  width: 21px;
  height: 21px;
}

.uid-copy {
  min-width: 0;
  flex: 1;
}

.uid-label {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.uid-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  min-height: 22px;
  flex-wrap: wrap;
}

.uid-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.uid-waiting {
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}

.uid-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--emerald-100);
  color: var(--emerald-700);
  font-size: 10.5px;
  font-weight: 750;
}

.uid-chip svg {
  width: 11px;
  height: 11px;
}

.simulate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 11px;
  padding: 10px 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  transition: 160ms ease;
}

.simulate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(37, 99, 235, 0.28);
}

.simulate-btn:active {
  transform: translateY(0);
}

.simulate-btn svg {
  width: 14px;
  height: 14px;
}

.mode-tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mode-tab {
  position: relative;
  padding: 0 0 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease;
}

.mode-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  border-radius: 3px;
  background: transparent;
  transition: background 160ms ease;
}

.mode-tab:hover,
.mode-tab.active {
  color: var(--blue-600);
}

.mode-tab.active::after {
  background: var(--blue-600);
}

.tab-panel {
  display: none;
  animation: panel-in 220ms ease;
}

.tab-panel.active {
  display: block;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scanner-panel {
  position: relative;
  overflow: hidden;
  border: 1.5px dashed var(--blue-200);
  border-radius: 20px;
  background:
    radial-gradient(440px 200px at 50% -20%, rgba(37, 99, 235, 0.12), transparent 70%),
    linear-gradient(180deg, #f8fbff, #f4f8ff);
  padding: 22px 18px;
  text-align: center;
}

.scanner-info {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--blue-100);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  cursor: help;
}

.scanner-info svg {
  width: 16px;
  height: 16px;
}

.scanner-illustration {
  width: 62px;
  height: 62px;
  margin: 4px auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

.scanner-illustration svg {
  width: 31px;
  height: 31px;
}

.scanner-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--ink);
}

.scanner-help {
  margin: 5px auto 13px;
  max-width: 380px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.camera-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  transition: 160ms ease;
}

.camera-start:hover {
  transform: translateY(-1px);
}

.camera-start svg {
  width: 16px;
  height: 16px;
}

.camera-start.is-stop {
  background: linear-gradient(135deg, #475569, #334155);
  box-shadow: 0 10px 22px rgba(51, 65, 85, 0.18);
}

.scan-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  border: 0;
  background: transparent;
  color: var(--blue-600);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scan-file-btn svg {
  width: 14px;
  height: 14px;
}

.camera-frame {
  display: none;
  position: relative;
  overflow: hidden;
  width: min(100%, 390px);
  margin: 0 auto 12px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.camera-frame.is-live {
  display: block;
}

.camera-frame video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

#qrReader {
  width: 100%;
  height: 100%;
}

#qrReader__dashboard,
#qrReader__header_message,
#qrReader__status_span {
  display: none !important;
}

#qrReader__scan_region {
  min-height: 100%;
}

#qrReader__scan_region video {
  border-radius: 16px;
}

#qrReader__shaded_region {
  border-radius: 16px;
}

#qrFileReader {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;
  width: 320px !important;
  height: 240px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: auto !important;
  white-space: normal !important;
}

.scanner-panel.is-live .scanner-illustration,
.scanner-panel.is-live .scanner-help,
.scanner-panel.is-live #scannerTitle {
  display: none;
}

.scanner-panel.is-live {
  padding-top: 16px;
}

.reader-badge.is-busy {
  border-color: var(--blue-200);
  background: var(--blue-50);
  color: var(--blue-700);
}

.reader-badge.is-busy .pulse-dot {
  background: var(--blue-600);
}

.reader-badge.is-busy .pulse-dot::after {
  border-color: var(--blue-600);
}

.reader-badge.is-error {
  border-color: var(--rose-100);
  background: var(--rose-50);
  color: var(--rose-600);
}

.reader-badge.is-error .pulse-dot {
  background: var(--rose-600);
}

.reader-badge.is-error .pulse-dot::after {
  border-color: var(--rose-600);
}

.camera-frame::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}

.camera-frame::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 14%;
  right: 14%;
  height: 2px;
  top: 20%;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
  animation: scan-line 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scan-line {
  0%,
  100% {
    top: 20%;
    opacity: 0.35;
  }
  50% {
    top: 78%;
    opacity: 1;
  }
}

.camera-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 11px;
  font-weight: 700;
}

.camera-status .pulse-dot {
  width: 6px;
  height: 6px;
}

.camera-error {
  display: none;
  margin: 10px auto 0;
  max-width: 400px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--rose-50);
  border: 1px solid var(--rose-100);
  color: var(--rose-600);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
}

.camera-error.is-visible {
  display: block;
}

.manual-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 20px;
  text-align: center;
}

.manual-panel .scanner-illustration {
  margin-bottom: 10px;
}

.tap-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 380px;
  margin: 12px auto 0;
  padding: 13px 15px;
  border: 1.5px dashed var(--blue-200);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: text;
  transition: 160ms ease;
}

.tap-zone:focus-within,
.tap-zone:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.07);
}

.tap-zone svg {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
  flex: 0 0 auto;
}

.tap-zone input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.tap-zone input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

.required {
  color: var(--rose-600);
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-600);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-link svg {
  width: 12px;
  height: 12px;
}

.input-shell {
  position: relative;
}

.input-shell > svg.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  transition: color 160ms ease;
}

.input-shell:focus-within > svg.input-icon {
  color: var(--blue-600);
}

.text-input,
.select-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  outline: none;
  transition: 160ms ease;
}

.text-input {
  padding: 11px 13px 11px 40px;
}

.text-input[readonly] {
  background: #f8fafc;
  color: var(--ink-soft);
  cursor: default;
}

.text-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
}

.text-input.is-invalid,
.select-input.is-invalid {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.07);
}

.select-shell {
  position: relative;
}

.select-input {
  appearance: none;
  padding: 11px 38px 11px 40px;
  cursor: pointer;
}

.select-shell > svg.select-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  margin: 5px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.field-hint.error {
  color: var(--rose-600);
  font-weight: 650;
}

.id-chip {
  display: none;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 650;
}

.id-chip.is-visible {
  display: inline-flex;
}

.id-chip svg {
  width: 11px;
  height: 11px;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 65%, #1e40af 100%);
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: 180ms ease;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 17px 32px rgba(37, 99, 235, 0.31), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.submit-btn svg {
  width: 18px;
  height: 18px;
}

.submit-btn .spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-btn.is-loading .spinner {
  display: block;
}

.submit-btn.is-loading .btn-icon {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-panel {
  display: none;
  align-items: flex-start;
  gap: 11px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--emerald-200);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--emerald-50), #f7fffb);
  color: var(--emerald-700);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.08);
  animation: success-in 260ms ease;
}

.success-panel.is-visible {
  display: flex;
}

@keyframes success-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.success-icon svg {
  width: 17px;
  height: 17px;
}

.success-copy {
  min-width: 0;
  flex: 1;
}

.success-title {
  margin: 0;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 800;
}

.success-detail {
  margin: 3px 0 0;
  color: #047857;
  font-size: 11.5px;
  line-height: 1.5;
}

.success-reset {
  margin: 6px 0 0;
  color: #0f766e;
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.8;
}

.footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.footnote svg {
  width: 13px;
  height: 13px;
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  font-size: 12.5px;
  font-weight: 600;
  transform: translate(-50%, 20px);
  opacity: 0;
  visibility: hidden;
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast.success {
  border-color: var(--emerald-200);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.toast.error {
  border-color: var(--rose-100);
  background: var(--rose-50);
  color: var(--rose-600);
}

.toast.info {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.modal-backdrop.is-open {
  display: grid;
}

.modal {
  width: min(460px, 100%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
  padding: 22px;
  animation: modal-in 200ms ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: #f1f5f9;
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.modal-body ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal-body li {
  margin-bottom: 5px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-soft {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-soft:hover {
  border-color: var(--blue-200);
  color: var(--blue-600);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#rfidListener {
  position: fixed;
  left: -1000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 720px) {
  .topbar {
    width: calc(100% - 28px);
    padding-top: 15px;
    flex-wrap: wrap;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
  }

  .nav-link {
    flex: 1;
    justify-content: center;
    padding: 9px 10px;
    font-size: 12.5px;
  }

  .stage {
    width: calc(100% - 24px);
    padding-top: 20px;
  }

  .kiosk-card {
    border-radius: 20px;
    padding: 20px 16px;
  }

  .card-head {
    flex-direction: column;
    gap: 10px;
  }

  .reader-badge {
    align-self: flex-start;
  }

  .uid-bar {
    flex-wrap: wrap;
  }

  .uid-copy {
    flex-basis: calc(100% - 54px);
  }

  .simulate-btn {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-title {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
