* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 1.5rem 1rem 4rem;
  background: #f4f1ea;
  color: #2a2a2a;
  line-height: 1.5;
}

main {
  max-width: 56rem;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
}

.subtitle {
  color: #666;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  border-bottom: 2px solid #d98a4f;
  padding-bottom: 0.25rem;
}

section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #444;
}

input,
select,
textarea {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid #999;
  border-radius: 0.3rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
}

button {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid #b5651d;
  border-radius: 0.3rem;
  background: #d98a4f;
  color: #fff;
  cursor: pointer;
  min-height: 2.5rem;
}

button:hover:not(:disabled) {
  background: #c17a3f;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.danger {
  background: #c62828;
  border-color: #8e0000;
}

button.danger:hover:not(:disabled) {
  background: #a31f1f;
}

button.secondary {
  background: #fff;
  color: #d98a4f;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

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

th {
  color: #666;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.error {
  color: #b00020;
  font-size: 0.9rem;
}

.status {
  color: #0a7d2c;
  font-size: 0.9rem;
}

.hint {
  color: #777;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

nav .account-key {
  font-size: 0.85rem;
  color: #666;
}
