:root {
  --bg: #f5f8fc;
  --card: #ffffff;
  --text: #16202a;
  --muted: #5f6f82;
  --accent: #0a66c2;
  --border: #d7e1eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(720px, calc(100% - 24px));
  margin: 32px auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.microcopy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.direction-group {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
}

.direction-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
}

.direction-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.voucher-form {
  display: grid;
  gap: 14px;
}

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

label span {
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

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

.primary-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.hidden {
  display: none;
}

.secondary-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.success-text {
  color: #1a7f44;
  font-weight: 600;
}

.barcode-wrap {
  margin-top: 16px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}

.barcode-wrap svg {
  max-width: 100%;
}

@media (max-width: 720px) {
  .grid.two-cols {
    grid-template-columns: 1fr;
  }

  .direction-group {
    flex-direction: column;
  }
}
