* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, sans-serif; color: #1d2026; background: #f4f5f7; }
h1, h2 { margin: 0 0 12px; font-size: 18px; }
#login { max-width: 340px; margin: 12vh auto; padding: 24px; background: #fff; border: 1px solid #d9dce2; border-radius: 10px; display: grid; gap: 12px; }
[hidden] { display: none !important; }
label { display: grid; gap: 4px; color: #565c68; }
input, select { font: inherit; padding: 7px 9px; border: 1px solid #c4c9d2; border-radius: 6px; background: #fff; min-width: 0; }
button { font: inherit; padding: 7px 12px; border: 1px solid #c4c9d2; border-radius: 6px; background: #fff; cursor: pointer; }
button.primary, #login button { background: #a40000; border-color: #a40000; color: #fff; }
nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #d9dce2; }
nav button[aria-current] { background: #a40000; color: #fff; border-color: #a40000; }
nav .out { margin-inline-start: auto; }
main { padding: 16px; display: grid; gap: 16px; }
section { background: #fff; border: 1px solid #d9dce2; border-radius: 10px; padding: 16px; min-width: 0; }
/* Spreadsheet-style tables, like the WorldMeat workspace. */
.scroll { overflow: auto; max-height: 70vh; border: 1px solid #b7bcc6; }
table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
th, td { height: 26px; padding: 0 8px; text-align: start; white-space: nowrap; border-right: 1px solid #d3d7de; border-bottom: 1px solid #d3d7de; }
th { position: sticky; top: 0; z-index: 1; background: linear-gradient(#f3f4f7, #e4e7ec); font-weight: 700; color: #2b2f36; border-bottom-color: #aab0ba; }
td:first-child, th:first-child { width: 1%; text-align: center; color: #6b717c; background: #eef0f4; position: sticky; left: 0; }
th:first-child { z-index: 2; }
tbody tr:nth-child(even) td:not(:first-child) { background: #f7f8fa; }
tbody tr:hover td:not(:first-child) { background: #fdecec; }
td button, td select { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
td input[type=checkbox] { display: block; margin: 0 auto; }
td .row { gap: 4px; flex-wrap: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
#message { margin: 0; padding: 0 16px; }
#message:not(:empty) { padding: 10px 16px; background: #fff3d6; }
.error { color: #a40000; margin: 0; }
meter { width: 100%; height: 14px; }
pre { background: #14161a; color: #d6dae2; padding: 10px; border-radius: 6px; overflow: auto; max-height: 260px; white-space: pre-wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
