* { box-sizing: border-box; }

body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #1a1a1a;
}

header {
  background: #1f2937;
  color: white;
  padding: 1rem 1.5rem;
}

header h1 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-btn {
  background: #374151;
  color: #d1d5db;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.tab-btn.active, .tab-btn:hover {
  background: #2563eb;
  color: white;
}

main {
  padding: 1.5rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hint {
  color: #6b7280;
  font-size: 0.85rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
}

td.json {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  max-width: 28rem;
  word-break: break-word;
}

#order-form {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  gap: 0.25rem;
}

input, select {
  font-size: 0.85rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-weight: normal;
}

.form-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

button {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

button.secondary {
  background: #9ca3af;
}

button.danger {
  background: #dc2626;
}
