:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar,
.settings,
.panel {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #0f5fcb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

.settings {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #40516a;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
}

button {
  border-radius: 6px;
  padding: 10px 14px;
  font: 800 14px inherit;
  cursor: pointer;
}

.primary {
  border: 0;
  background: #0f5fcb;
  color: #fff;
}

.secondary {
  border: 1px solid #c8d4e2;
  background: #fff;
  color: #172033;
}

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #bfd7ff;
  border-radius: 8px;
  background: #eef6ff;
  color: #173f7a;
}

.notice.error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.metric {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  display: block;
  color: #53647b;
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.panel {
  margin-top: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #edf1f6;
}

.muted {
  color: #6b7b90;
  font-size: 12px;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #40516a;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8f1ff;
  color: #0f5fcb;
  font-weight: 800;
  font-size: 12px;
}

.pill.bad {
  background: #fff1f2;
  color: #be123c;
}

.pill.good {
  background: #ecfdf5;
  color: #047857;
}

@media (max-width: 820px) {
  .settings,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
