:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --ink: #1b1d21;
  --muted: #5e6570;
  --line: #e1e4ea;
  --card: #fff;
  --up: #1f7a4d;
  --down: #b42318;
  --paused: #667085;
  --pending: #b54708;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 ui-sans-serif, system-ui, sans-serif;
}

.brand {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

main { padding: 28px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.toolbar form { margin: 0; }

a.quiet, button.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  padding: 8px 12px;
}

a.quiet:hover, button.quiet:hover { background: var(--card); }

.flash {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.counts div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.counts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.counts strong {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  font-weight: 650;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }

.name { display: block; font-weight: 650; }

td a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

td a:hover { text-decoration: underline; }

.num { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.is-up .pill { color: var(--up); background: #e7f6ee; }
.is-down .pill { color: var(--down); background: #fdeceb; }
.is-paused .pill { color: var(--paused); background: #f2f4f7; }
.is-pending .pill { color: var(--pending); background: #fef4e6; }

.is-down { box-shadow: inset 3px 0 0 var(--down); }

.sub, .empty { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

.warnings {
  margin: 0 0 16px;
  padding: 10px 14px 10px 28px;
  background: #fff8eb;
  border: 1px solid #f3dfb6;
  border-radius: 10px;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

button.text {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login {
  width: min(360px, calc(100% - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}

.login h1 { margin: 8px 0 16px; font-size: 22px; }

.login label { display: block; font-size: 13px; color: var(--muted); }

.login input {
  width: 100%;
  margin: 6px 0 14px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-error { color: var(--down); margin: 0 0 12px; }

.google {
  display: block;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
}

.google:hover { background: var(--bg); }

.top form { display: flex; align-items: center; gap: 14px; }

.who { color: var(--muted); font-size: 13px; }

@media (max-width: 800px) {
  main, .top { padding-left: 16px; padding-right: 16px; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { display: block; overflow-x: auto; }
}
