:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #17202a;
  --muted: #607086;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --positive: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

#refresh {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

#refresh:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 18px 24px 32px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab.active {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
}

th {
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
}

.name strong {
  font-size: 14px;
  font-weight: 700;
}

.name span {
  color: var(--muted);
  font-size: 12px;
}

.negative {
  color: var(--danger);
}

.positive {
  color: var(--positive);
}

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

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 16px 14px;
  }

  main {
    padding: 14px 12px 24px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
  }
}
