:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #1c2330;
  --border: #2d3748;
  --text: #e6edf3;
  --muted: #8b949e;
  --green: #3fb950;
  --red: #f85149;
  --accent: #58a6ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.5;
  padding: 24px;
}
.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.topbar h1 { font-size: 22px; }
.updated { color: var(--muted); font-size: 12px; }
section { margin-bottom: 24px; }
h2 { font-size: 16px; margin-bottom: 12px; color: var(--accent); }

.ov-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.ov-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
}
.ov-card .k { color: var(--muted); font-size: 12px; }
.ov-card .v { font-size: 18px; font-weight: 600; margin-top: 4px; }
.note { color: var(--muted); font-size: 12px; margin-top: 12px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.table-wrap {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.toolbar {
  display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border);
  align-items: center; flex-wrap: wrap;
}
#search {
  flex: 1; min-width: 200px; background: var(--panel2); border: 1px solid var(--border);
  color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 13px;
}
#topN {
  background: var(--panel2); color: var(--text); border: 1px solid var(--border);
  padding: 8px; border-radius: 8px; font-size: 13px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: right; padding: 10px 12px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none;
}
thead th:first-child, td:first-child { text-align: center; }
thead th[data-align="left"], td.l { text-align: left; }
tbody td {
  padding: 8px 12px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid rgba(45,55,72,.5);
}
tbody tr:hover { background: var(--panel2); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.addr { font-family: Consolas, monospace; font-size: 12px; color: var(--accent); text-decoration: none; }
.bar-cell { display: inline-block; width: 90px; height: 6px; background: var(--panel2); border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar-cell i { display: block; height: 100%; background: var(--green); }
.bar-cell.low i { background: var(--red); }
.table-note { color: var(--muted); font-size: 12px; padding: 10px 16px; }
