:root {
  --ink: #0b1220;
  --text: #0f172a;
  --muted: #5b6476;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --border: rgba(148, 163, 184, 0.26);
  --shadow-1: 0 10px 28px rgba(2, 6, 23, 0.18);
  --shadow-2: 0 26px 70px rgba(2, 6, 23, 0.22);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(15, 23, 42, 0.12);
  --accent-1: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #06b6d4;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 0%, rgba(37, 99, 235, 0.22), transparent 55%),
    radial-gradient(900px 700px at 95% 10%, rgba(124, 58, 237, 0.22), transparent 55%),
    radial-gradient(1000px 900px at 40% 95%, rgba(6, 182, 212, 0.14), transparent 52%),
    linear-gradient(180deg, #0b1220 0%, #0b1220 16%, #0f172a 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(820px 560px at 80% 20%, rgba(255, 255, 255, 0.08), transparent 62%),
    radial-gradient(900px 520px at 50% 90%, rgba(255, 255, 255, 0.05), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

body::after {
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 9px);
  opacity: 0.08;
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 40px;
  position: relative;
  z-index: 1;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 24px 24px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(1100px 420px at 5% 10%, rgba(37, 99, 235, 0.26), transparent 55%),
    radial-gradient(980px 420px at 95% 0%, rgba(124, 58, 237, 0.22), transparent 58%),
    radial-gradient(980px 420px at 60% 110%, rgba(6, 182, 212, 0.16), transparent 58%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

.header > * { position: relative; }

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 900;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(124, 58, 237, 1));
  color: rgba(255, 255, 255, 0.96);
  margin-bottom: 10px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.meta {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.meta__label { color: var(--muted); font-weight: 700; margin-right: 6px; }

.qrWrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.14), var(--shadow-inset);
  transform: translateZ(0);
}

#qrCanvas {
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.12);
}

.card {
  margin-top: 14px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 220px at 0% 0%, rgba(37, 99, 235, 0.10), transparent 55%),
    radial-gradient(700px 220px at 100% 0%, rgba(124, 58, 237, 0.08), transparent 55%);
  opacity: 0.9;
}

.card > * { position: relative; }

h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.lead {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.55;
}

.muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.strong { font-weight: 800; }
.right { text-align: right; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.list__item {
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
  color: var(--ink);
}
.list__item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 6px 10px rgba(37, 99, 235, 0.20);
}

.table {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.14);
}
.table__row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.86);
}
.table__row:first-child { border-top: none; }
.table__head {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(255, 255, 255, 0.78));
  font-weight: 800;
}
.table__foot {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.78));
}

.note {
  margin-top: 10px;
  font-size: 13px;
  color: #334155;
}

.actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 900;
  letter-spacing: -0.005em;
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(124, 58, 237, 1));
  color: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28), 0 8px 16px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:hover { transform: translateY(-1px); filter: saturate(1.05); }
.btn:active { transform: translateY(0px); box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22), 0 6px 12px rgba(2, 6, 23, 0.20), inset 0 2px 10px rgba(2, 6, 23, 0.18); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22), 0 16px 34px rgba(37, 99, 235, 0.28), 0 8px 16px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.footer {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
  text-shadow: 0 1px 0 rgba(2, 6, 23, 0.6);
}

@media (max-width: 760px) {
  .header { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .table__row { grid-template-columns: 1fr 130px; }
  .actions { justify-content: stretch; }
  .btn { width: 100%; }
}

@media print {
  body { background: #ffffff; }
  body::before, body::after { content: none; }
  .page { width: 100%; margin: 0; }
  .header, .card, .table { box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .btn, .btn--ghost { box-shadow: none; }
  * { text-shadow: none !important; }
  .actions { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
