:root {
  --green: #1b5e20; --green2: #2e7d32; --bg: #f4f6f4; --card: #fff; --text: #1f2a1f;
  --muted: #6b766b; --line: #e1e6e1; --red: #c62828;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--bg); color: var(--text); }
header { background: var(--green); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 20px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.brand img { width: 30px; height: 30px; background: #ffffff; border-radius: 8px; padding: 2px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: #dfeedf; text-decoration: none; padding: 14px 12px; border-bottom: 3px solid transparent; }
nav a:hover { color: #fff; }
nav a.on { color: #fff; border-bottom-color: #a5d6a7; }
nav a.right { margin-left: auto; }
main { max-width: 1200px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 6px 0 16px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
.card.narrow { max-width: 440px; }
.card.danger { border-color: #f1c4c4; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { white-space: nowrap; text-align: right; }
td.actions a { margin-left: 10px; }
td.actions form { display: inline-flex; gap: 6px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f3f8f3; }
table.kv th { width: 260px; text-transform: none; font-size: 14px; color: var(--text); }
a { color: var(--green2); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.dot.big { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tag { font-size: 12px; background: #e8f5e9; color: var(--green); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
code { font: 13px Consolas, monospace; background: #f1f4f1; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
input, select, textarea { font: inherit; color: var(--text); padding: 8px 10px; border: 1px solid #cdd5cd; border-radius: 6px; background: #fff; min-width: 0; }
input[type=color] { padding: 2px; width: 56px; height: 38px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #a5d6a7; border-color: var(--green2); }
button, .button { font: inherit; background: var(--green2); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .button:hover { background: var(--green); }
button.secondary, .button.secondary { background: #e8efe8; color: var(--green); }
button.secondary:hover, .button.secondary:hover { background: #d8e6d8; }
button.del { background: #fdecec; color: var(--red); }
button.del:hover { background: #f9d6d6; }
button:disabled { opacity: .6; cursor: wait; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row label { margin-bottom: 0; }
.row + .row, form.row + form.row { margin-top: 14px; }
.toolbar { align-items: center; margin-bottom: 8px; }
.toolbar form { margin: 0; }
.grow { flex: 1; min-width: 180px; }
.right { margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; margin-bottom: 8px; }
.grid .wide { grid-column: span 2; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #e8f5e9; color: var(--green); border: 1px solid #c8e6c9; }
.flash.err { background: #fdecec; color: var(--red); border-color: #f5c6c6; }
ol li { margin-bottom: 6px; }
@media (max-width: 700px) {
  .grid .wide { grid-column: auto; }
  th:nth-child(6), td:nth-child(6) { display: none; }
}
td.nowrap { white-space: nowrap; } td.nowrap input { vertical-align: middle; }
.tag.warn { background: #fdecec; color: #c62828; }
