:root {
  --bg: #0e1117;
  --bg-soft: #151a23;
  --card: #171d28;
  --card-2: #1d2432;
  --line: #273041;
  --text: #e6ebf3;
  --muted: #8b97ad;
  --red: #ff4d5e;
  --blue: #3d8bff;
  --green: #21c08b;
  --amber: #ffb020;
  --violet: #a06bff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: radial-gradient(1200px 600px at 15% -10%, #1b2436 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 26px; background: rgba(14, 17, 23, 0.82);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--red), var(--violet));
  box-shadow: 0 6px 16px rgba(255, 77, 94, 0.28);
}
.brand h1 { font-size: 17px; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.seg { display: flex; gap: 6px; align-items: center; }
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 7px 13px; border-radius: 9px; cursor: pointer; font-size: 13px;
}
.btn:hover { border-color: #3a465c; }
.btn.active { background: var(--red-soft); border-color: var(--red); color: #fff; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.card .k { font-size: 12px; color: var(--muted); }
.card .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -0.5px; }
.card .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.panel h2 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel h2 .tag { font-size: 11px; color: var(--muted); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

canvas { width: 100%; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.n { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--red)); }
.list { max-height: 320px; overflow: auto; }
.tagline { font-size: 12px; color: var(--muted); margin-top: 8px; }
.hint { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; font-size: 13px; }
a { color: var(--blue); }
