:root {
  --bg: linear-gradient(140deg, #f6efe5 0%, #f2f8ff 55%, #fffdf8 100%);
  --panel: rgba(255, 255, 255, 0.8);
  --line: rgba(20, 36, 64, 0.12);
  --text: #132238;
  --muted: #5a6880;
  --accent: #0f7b6c;
  --accent-2: #ff8b4a;
  --danger: #c33b1e;
  --success: #0b7a48;
  --shadow: 0 24px 60px rgba(34, 52, 84, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 139, 74, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 123, 108, 0.16), transparent 32%);
}

.shell {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.hero,
.grid,
.timeline-panel {
  animation: rise 0.45s ease-out both;
}

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

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
  margin-bottom: 12px;
}

h2 {
  font-size: 22px;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy.compact {
  margin-top: 14px;
  max-width: none;
}

.docs-link,
button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.docs-link {
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.emphasis {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(250, 255, 252, 0.9)),
    radial-gradient(circle at top right, rgba(15, 123, 108, 0.08), transparent 26%);
}

.setup-panel {
  margin-bottom: 20px;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.meta-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(20, 36, 64, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

button {
  cursor: pointer;
  border-radius: 16px;
  padding: 13px 18px;
  border: 1px solid transparent;
}

button:hover,
.docs-link:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #0b5f54);
  color: white;
  box-shadow: 0 12px 24px rgba(15, 123, 108, 0.18);
}

.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-color: var(--line);
}

.ghost.alt {
  color: var(--danger);
}

.feedback {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.idle {
  background: rgba(90, 104, 128, 0.12);
  color: var(--muted);
}

.status-pill.created {
  background: rgba(255, 139, 74, 0.16);
  color: #9d4e0f;
}

.status-pill.success {
  background: rgba(11, 122, 72, 0.12);
  color: var(--success);
}

.status-pill.failed {
  background: rgba(195, 59, 30, 0.12);
  color: var(--danger);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.info-grid strong {
  display: block;
  font-size: 14px;
  margin-top: 6px;
  word-break: break-all;
}

.qr-wrap {
  min-height: 320px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 250, 255, 0.72)),
    repeating-linear-gradient(
      45deg,
      rgba(19, 34, 56, 0.02),
      rgba(19, 34, 56, 0.02) 12px,
      transparent 12px,
      transparent 24px
    );
  border: 1px dashed rgba(20, 36, 64, 0.16);
}

#qr-image {
  width: min(280px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 20px;
  background: white;
  padding: 12px;
}

#qr-placeholder {
  max-width: 260px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}

.mock-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.inline-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.json-block {
  margin-top: 16px;
}

.json-view.small {
  min-height: 0;
  font-size: 12px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  padding: 12px 18px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.button-link.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.table-like {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}

.table-row.header {
  border-top: 0;
  background: rgba(19,34,56,.05);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}

.table-row.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.table-row code {
  word-break: break-all;
}

.timeline-panel {
  margin-top: 20px;
}

.result-banner {
  margin-top: 20px;
  border-radius: 20px;
  padding: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.result-banner.idle {
  background: rgba(90, 104, 128, 0.08);
  color: var(--muted);
}

.result-banner.created {
  background: rgba(255, 139, 74, 0.12);
  color: #9d4e0f;
}

.result-banner.success {
  background: rgba(11, 122, 72, 0.1);
  color: var(--success);
}

.result-banner.failed {
  background: rgba(195, 59, 30, 0.1);
  color: var(--danger);
}

.json-view {
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 20px;
  background: #132238;
  color: #d8e6ff;
  overflow: auto;
  min-height: 240px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero,
  .status-head,
  .mock-actions,
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .grid,
  .info-grid,
  .table-row {
    grid-template-columns: 1fr;
  }
}
