:root {
  --bg: #0f1410; --panel: #18201a; --line: #26312a;
  --text: #e6ede7; --muted: #8aa093; --accent: #5bbb6e; --hot: #e6a23c;
}
* { box-sizing: border-box; }
body {
  margin: 0; font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
}
header h1 { font-size: 18px; margin: 0; }
.guide-link { font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 6px; padding: 2px 8px; margin-left: 10px; vertical-align: 2px; }
.guide-link:hover { background: var(--accent); color: #0a0f0b; }
.stats { display: flex; gap: 18px; color: var(--muted); }
.stat b { color: var(--text); font-size: 16px; }
main { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 96px); }
aside { padding: 16px; border-right: 1px solid var(--line); background: var(--panel); }
aside h3 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
aside h3:first-child { margin-top: 0; }
label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
label.check { display: flex; align-items: center; gap: 6px; }
input, select {
  width: 100%; margin-top: 4px; padding: 6px 8px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; color: var(--text);
}
label.check input { width: auto; margin-top: 0; }
button {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); cursor: pointer; margin-top: 6px; width: 100%;
}
button.primary { background: var(--accent); color: #0a0f0b; border-color: var(--accent); font-weight: 600; }
button:hover { filter: brightness(1.1); }
.breakdown { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow: auto; }
.breakdown li { display: flex; justify-content: space-between; padding: 3px 0; cursor: pointer; color: var(--muted); }
.breakdown li:hover { color: var(--text); }
section { padding: 16px 20px; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar label.inline { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); }
.toolbar button { width: auto; margin-top: 0; }
.toolbar select { width: auto; min-width: 160px; margin-top: 0; }
.muted { color: var(--muted); }
td select.status { width: auto; min-width: 100px; margin-top: 0; padding: 3px 6px; }
td button.note, td button.nbr { width: auto; margin-top: 0; padding: 2px 6px; }
.tablewrap { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
#map { flex: 1; min-height: 480px; border: 1px solid var(--line); border-radius: 8px; }
.leaflet-popup-content { font: 12px/1.4 system-ui, sans-serif; color: #1a1a1a; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-size: 12px; }
tbody tr:hover { background: #1d271f; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; margin-right: 4px; }
.badge.hot { background: var(--hot); color: #1a1206; }
.badge.delinq { background: #7a3030; color: #ffd9d9; }
.badge.absentee { background: #2f4f6b; color: #d6ecff; }
.badge.build-good { background: #2f5b34; color: #d6ffd9; }
.badge.build-mid { background: #6b5a2f; color: #fff0c9; }
.badge.build-bad { background: #5a2f2f; color: #ffd9d9; }
.badge.flood { background: #2f4f6b; color: #cfe8ff; }
.badge.wet { background: #3a5a3a; color: #d9f5d9; }
.small { font-size: 11px; }
.star { color: var(--hot); }
.pager { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
.pager button { width: auto; }
.pager #page-info { color: var(--muted); }
footer { padding: 8px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: var(--panel); }
