:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #5d6a72;
  --line: #d9e0e4;
  --green: #0f7b4f;
  --amber: #9a6500;
  --red: #ad2f2f;
  --blue: #1b6098;
  --teal: #16746f;
}

* { box-sizing: border-box; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 19px;
  font-weight: 700;
}

h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

main {
  padding: 18px 20px 28px;
  display: grid;
  gap: 16px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

select, button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

button {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  cursor: pointer;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 76px;
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
}

.metric .value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 750;
}

.band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 8px 9px;
  border-bottom: 1px solid #e7ecef;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.muted { color: var(--muted); }
.ok { color: var(--green); font-weight: 700; }
.warn { color: var(--amber); font-weight: 700; }
.bad { color: var(--red); font-weight: 700; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .filters { width: 100%; }
  select { flex: 1; min-width: 0; }
  main { padding: 12px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
