:root {
  --bg: #ffffff;
  --fg: #31333f;
  --muted: #6b6d7a;
  --border: #d6d6d9;
  --surface: #f0f2f6;
  --accent: #ff4b4b;
  --accent-soft: #ffecec;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1117;
    --fg: #fafafa;
    --muted: #a3a8b8;
    --border: #3a3d48;
    --surface: #262730;
    --accent: #ff4b4b;
    --accent-soft: #3d1f24;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 736px;
  margin: 0 auto;
  padding: 48px 16px;
}

h1 { font-size: 2.5rem; margin: 0 0 24px; }

.aviso {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 12px 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  cursor: pointer;
}

.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

#n-field { max-width: 240px; }

input[type="number"], textarea {
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
}

input[type="number"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.pill {
  padding: 4px 14px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.pill[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn {
  padding: 8px 16px;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.btn:hover { color: var(--accent); border-color: var(--accent); }

.table-wrap { overflow-x: auto; margin-top: 24px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

th { color: var(--muted); font-weight: 500; }
td:first-child, th:first-child { color: var(--muted); width: 1%; }
