* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f1f4f9;
  color: #1f2937;
}

.card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h1 { margin: 0 0 20px; font-size: 1.5rem; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { flex: 1 1 140px; }

.field { margin-bottom: 16px; }

label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }

input, select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
input:focus, select:focus { outline: 2px solid #2563eb; border-color: #2563eb; }
input.invalid, select.invalid { border-color: #dc2626; }

small { display: block; margin-top: 4px; color: #6b7280; font-size: 0.75rem; }

.prefix-wrap { display: flex; }
.prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  font-weight: 600;
}
.prefix-wrap input { border-radius: 0 8px 8px 0; }

button {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { background: #1d4ed8; }
button:disabled { background: #94a3b8; cursor: not-allowed; }

.result {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  word-break: break-word;
}
.result.success { background: #dcfce7; border: 1px solid #16a34a; }
.result.error { background: #fee2e2; border: 1px solid #dc2626; }
.result pre { margin: 8px 0 0; white-space: pre-wrap; font-size: 0.8rem; }
