:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe3ef;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
}

* {
  box-sizing: border-box;
}

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

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.hero {
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

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

input[readonly] {
  background: #f3f4f6;
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

textarea {
  resize: vertical;
}

.hint,
.message {
  margin: 10px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
}

button.primary {
  background: var(--primary);
  color: #fff;
}

button.primary:hover {
  background: var(--primary-hover);
}

button.secondary {
  background: #eef2ff;
  color: var(--primary);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.result-header h2 {
  margin: 0;
}

.qr-section {
  margin-top: 20px;
}

.qr-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
}

.qrcode img {
  display: block;
}

.message.success {
  color: #15803d;
}

.message.error {
  color: #b91c1c;
}

@media (max-width: 640px) {
  .container {
    padding: 20px 12px 32px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .actions,
  .result-header {
    flex-direction: column;
    align-items: stretch;
  }
}