:root {
  --bg: #f7f7f5; --surface: #fff; --text: #1d1d1b; --muted: #6b6b66; --line: #e3e3de;
  --accent: #1f4b99; --accent-text: #fff; --warn-bg: #fff6e0; --warn: #7a5300; --ok-bg: #e9f6ec; --ok: #1d6b34;
  --danger: #a32020;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .inner, main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.top .inner { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--text); }
header.top nav { display: flex; gap: 16px; flex-wrap: wrap; flex: 1; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a.on { color: var(--text); font-weight: 600; }
header.top form { margin: 0; }
main { padding-top: 24px; padding-bottom: 64px; }
h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 32px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin: 16px 0; }
.notice { padding: 12px 16px; border-radius: 6px; margin: 12px 0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.btn, button { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 6px; padding: 8px 16px; font: inherit; cursor: pointer; text-decoration: none; }
.btn.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.link { background: none; color: var(--muted); padding: 0; }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
form p { margin: 0 0 16px; }
form label { display: block; font-weight: 600; margin-bottom: 4px; }
form input[type=text], form input[type=email], form input[type=url], form input[type=password], form input[type=number], form input[type=date], form select, form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--surface); color: var(--text);
}
form ul { list-style: none; padding: 0; margin: 0; columns: 2; }
form ul li label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.helptext { display: block; color: var(--muted); font-size: .875rem; }
.errorlist { color: var(--danger); columns: 1 !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-block; font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.person { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.person img, .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--line); flex: none; }
.crops img { height: 120px; margin-right: 8px; border-radius: 4px; }
@media (max-width: 600px) { form ul { columns: 1; } }
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --surface: #1f1f1d; --text: #ececea; --muted: #a3a39d; --line: #33332f; --accent: #8fb0ef; --accent-text: #10223f;
    --warn-bg: #3a2e12; --warn: #f2cf86; --ok-bg: #14301c; --ok: #8fd6a2; --danger: #f08b8b; }
}
