* { box-sizing: border-box; }

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #d9dce2;
  --text: #1c2024;
  --muted: #6b7280;
  --accent: #1d63c9;
  --accent-soft: #e8f0fd;
}

body {
  margin: 0;
  font: 14px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

h1 { margin: 0; font-size: 17px; }
h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.summary { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  height: calc(100vh - 49px);
}

aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.sidebar-head { display: flex; justify-content: space-between; align-items: center; }

#filters { display: flex; flex-direction: column; gap: 10px; }

.filter { display: flex; flex-direction: column; gap: 3px; }
.filter[hidden] { display: none; }
.filter label { font-size: 12px; color: var(--muted); }
.filter.active label { color: var(--accent); font-weight: 600; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

input, select, button {
  font: inherit;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: inherit;
  min-width: 0;
}

input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
button { cursor: pointer; }
button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }

main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.toolbar label { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pager { display: flex; align-items: center; gap: 6px; }
#pageInfo { min-width: 120px; text-align: center; color: var(--muted); }

.table-wrap { overflow: auto; flex: 1; }

table { border-collapse: collapse; white-space: nowrap; }

th, td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  background: var(--panel);
  font-size: 12px;
  color: var(--muted);
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line);
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:hover { background: var(--accent-soft); }
td.empty { text-align: center; padding: 30px; color: var(--muted); }

a { color: var(--accent); }
