:root {
  --bg: #f7f6f3; --panel: #ffffff; --fg: #1d1c1a; --muted: #6b6862; --line: #e3e0da;
  --ok: #2f7d4f; --warn: #a86a12; --bad: #b3362d; --accent: #2b5fb4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171614; --panel: #201f1c; --fg: #ecebe8; --muted: #a29e96; --line: #36332e;
          --ok: #6cc08f; --warn: #e0a64d; --bad: #ef7d73; --accent: #8db4f2; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.45; padding: 0 16px 48px; }
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 16px 0 8px; }
h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 12px 0; }
.btn { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); cursor: pointer; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--fg); border-color: var(--fg); }
.badge { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; }
.badge:empty { display: none; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-top: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.tile .num { font-size: 26px; font-variant-numeric: tabular-nums; }
.tile .lbl, .tile .sub { font-size: 13px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.tools input[type=search] { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); min-width: min(100%, 260px); }
input[type=date] { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.chip { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--fg); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.scroll { overflow-x: auto; max-height: 36rem; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px; white-space: nowrap; }
.tbl td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.job { min-width: 15rem; }
.pill { display: inline-block; padding: 0 6px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; white-space: nowrap; }
.s-ok { color: var(--ok); } .s-warn { color: var(--warn); } .s-bad { color: var(--bad); } .s-mute { color: var(--muted); }
.hint { color: var(--muted); font-style: italic; }
.item { border-top: 1px solid var(--line); padding: 8px 0; }
.item:first-child { border-top: 0; }
.person h3 { font-size: 15px; margin: 10px 0 4px; }
.row { display: grid; grid-template-columns: 4.5rem 1fr; gap: 8px; font-size: 13px; padding: 3px 0; }
textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
[hidden] { display: none !important; }
