:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --bar-bg: #e5e7eb;
  --bar-fill: #2563eb;
  --slow: #dc2626;
  --warn: #d97706;
  --line: #e5e7eb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px;
}
header { max-width: 1280px; margin: 0 auto 24px; }
header h1 { margin: 0 0 4px; font-size: 24px; }
.sub { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

.card {
  max-width: 1280px;
  margin: 0 auto 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }

.progress-block { margin-bottom: 12px; }
.progress-block:last-child { margin-bottom: 4px; }
.progress-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.bar {
  width: 100%; height: 10px; background: var(--bar-bg); border-radius: 5px; overflow: hidden;
}
.fill {
  height: 100%; width: 0%; background: var(--bar-fill);
  transition: width 200ms ease;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.kpi {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 6px;
  padding: 12px; text-align: center;
}
.kpi-num { font-size: 22px; font-weight: 600; }
.kpi-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

.table-scroll { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
th, td {
  padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left;
  white-space: nowrap;
}
th { font-weight: 600; cursor: help; user-select: none; background: #f9fafb; position: sticky; top: 0; }
#tbl-old-lou th { cursor: pointer; }
.kpi[title] { cursor: help; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-slow td { color: var(--slow); }
.toggle { float: right; font-size: 12px; color: var(--muted); }
footer { max-width: 1280px; margin: 24px auto; font-size: 12px; }
