:root {
  --bg: #f1f1f1; --card: #fff; --text: #303030; --muted: #616161; --line: #e3e3e3;
  --accent: #303030; --bar: #91d0ff; --bar-top: #005bd3; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, sans-serif; }
.page { max-width: 1000px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
h1 { font-size: 20px; margin: 0; font-weight: 650; }
h2 { font-size: 14px; margin: 0 0 12px; font-weight: 650; }
.sub { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 rgba(0,0,0,.07), inset 0 -1px 0 rgba(0,0,0,.08); }
.range { display: inline-flex; background: #e3e3e3; border-radius: 10px; padding: 2px; }
.range button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: inherit; color: var(--muted); cursor: pointer; }
.range button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi span { color: var(--muted); font-size: 13px; display: block; }
.kpi b { font-size: 22px; font-weight: 650; display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: center; }
.bar .name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 22px; background: #f3f3f3; border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--bar); border-radius: 6px; transition: width .4s ease; }
.bar:first-child .fill { background: var(--bar-top); }
.bar .num { text-align: right; min-width: 150px; font-variant-numeric: tabular-nums; }
.bar .num small { color: var(--muted); display: block; font-size: 12px; }
.others { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row h2 { margin: 0; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 550; font-size: 13px; }
.btn { border: 0; border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600; cursor: pointer; background: #fff; color: var(--text); box-shadow: inset 0 -1px 0 #b5b5b5, 0 0 0 1px #e3e3e3; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: inset 0 -1px 0 #000; }
.setup ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; }
.empty { color: var(--muted); margin: 0; }
.error { color: #8e1f0b; background: #fee9e8; padding: 10px 12px; border-radius: 8px; margin: 0; }
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .bar { grid-template-columns: 1fr auto; }
  .bar .track { grid-column: 1 / -1; grid-row: 2; }
  .bar .num { min-width: 0; }
}
