/* Shared by both apps: the dashboard on the VPS and the agent page on the PC.
   The agent page is also served through the dashboard at /t/<id>/…, which is
   why it only ever references `static/base.css` and `api/…` relatively.

   Light on purpose: these pages are read in a daylight room, next to a
   terminal, and the only colour that has to carry meaning is the state badge. */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1c2128;
  --muted: #67707c;
  --line: #dfe3e8;
  --field: #fbfcfd;
  --ok: #157f3d;
  --warn: #9a6700;
  --bad: #b3261e;
  --accent: #1a6feb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 16px 70px;
}
header.top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
h1 {
  margin: 0;
  font-size: 20px;
}
h2 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
a {
  color: var(--accent);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tr.agent td {
  cursor: default;
}
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid currentColor;
  background: #fff;
  white-space: nowrap;
}
.badge.ok {
  color: var(--ok);
}
.badge.warn {
  color: var(--warn);
}
.badge.bad {
  color: var(--bad);
}
.badge.off {
  color: var(--muted);
}
button,
.btn {
  background: #f0f2f5;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 11px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.btn:hover {
  border-color: #b9c1cb;
  background: #e9ecf0;
}
button.primary {
  background: #eaf2fe;
  border-color: #a9c8f5;
  color: #12467f;
}
input,
select,
textarea {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  font: inherit;
  width: 100%;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.right {
  margin-left: auto;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
code,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
pre {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
}
.field {
  margin-bottom: 12px;
}
.bad {
  color: var(--bad);
}
.ok {
  color: var(--ok);
}
.login {
  max-width: 380px;
  margin: 12vh auto 0;
}
.login input {
  margin-bottom: 12px;
}
table.mini td,
table.mini th {
  padding: 5px 8px;
}
/* the table header and the code chips are the only places where a tint helps */
code {
  background: #f0f2f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}
