:root {
  --bg: #f7f7f5;
  --fg: #1f2328;
  --muted: #6b7280;
  --line: #d9dbe0;
  --card: #ffffff;
  --accent: #0f766e;
  --up: #2563eb;
  --down: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, "Hiragino Sans", "Yu Gothic UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--accent); }
header .brand { color: #fff; font-weight: bold; text-decoration: none; }
header form { margin: 0; }
button.link { background: none; border: none; color: #fff; cursor: pointer; padding: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.3rem; }
h1 small { color: var(--muted); font-weight: normal; }
.muted { color: var(--muted); }
.error { color: var(--down); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.card.login { margin: 40px auto; }
label { display: flex; flex-direction: column; gap: 4px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; }
input, select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
button, .btn { display: inline-block; padding: 6px 12px; border-radius: 4px; border: none;
  background: var(--accent); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
.btn.sub { background: #e5e7eb; color: var(--fg); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
  flex-wrap: wrap; }
.tabs a { padding: 6px 12px; text-decoration: none; color: var(--fg);
  border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; }
.tabs a.active { background: var(--card); border-color: var(--line); }

.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 6px 10px; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.up { color: var(--up); }
th.down { color: var(--down); }
table.list { width: 100%; }
td.actions { display: flex; gap: 4px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; margin-top: 12px; }

.chart { position: relative; height: 420px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

table.heatmap th, table.heatmap td { padding: 2px 4px; font-size: 0.75rem; text-align: center;
  min-width: 34px; }
table.heatmap td.dark { color: #fff; }
