:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e2e4e8;
  --line-strong: #cfd3da;
  --accent: #2f6f4f;
  --accent-soft: #e7f1ec;
  --row-hover: #f2f6f4;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

.page-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.page-header h1 { margin: 0; font-size: 22px; font-weight: 650; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

main { padding: 16px 24px 48px; }

/* --- tabs --- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab {
  font: inherit;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  color: var(--muted);
}
.tab.is-active {
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--panel);
  background: var(--accent-soft);
}

/* --- controls --- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.control { display: flex; flex-direction: column; gap: 4px; }
.control label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.control input,
.control select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
}
.control input:focus,
.control select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.control--search input { min-width: 240px; }

/* --- table --- */
.table-wrapper {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { border-collapse: collapse; width: 100%; }
thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--line-strong);
  white-space: nowrap;
}
thead th.num { text-align: right; }
thead th { cursor: pointer; user-select: none; }
thead th:hover { color: var(--ink); }
thead th.sorted { color: var(--ink); }

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody td.name { white-space: normal; min-width: 200px; font-weight: 550; }
tbody tr:hover { background: var(--row-hover); }
.muted { color: var(--muted); }

.empty { padding: 40px; text-align: center; color: var(--muted); }
