/* Serhard admin center. Brand tokens come from brand.css (packages/brand); no hard-coded colours here. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px;
  background: var(--sheet); border-bottom: 1px solid var(--rule); }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup { height: 24px; width: auto; display: block; }
.area { font-weight: 600; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--rule); }
.signout { display: flex; align-items: center; gap: 12px; margin: 0; }
.who { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }

.frame { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.rail { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; align-self: start; }
.rail a { padding: 8px 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--ink-soft); }
.rail a:hover { background: var(--sheet); color: var(--ink); }
.rail a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
main { min-width: 0; }
.frame:not(:has(.rail)) { grid-template-columns: minmax(0, 1fr); max-width: 720px; }

h1 { font-size: 2rem; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.125rem; margin: 40px 0 12px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stamp, .note, .board-sub { color: var(--muted); margin: 0; }
.note { margin-top: 12px; font-size: 0.875rem; }

/* The board: one headline and a tally of every product, like the totals line of a ledger. */
.board { margin-top: 24px; padding: 24px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); }
.board-h { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 4px; letter-spacing: -0.015em; }
.board-h.is-down { color: var(--flag); }
.tally { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 20px 0 0; padding: 0; }
.cell { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--rule); background: var(--paper); }
.cell-host { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.cell-word { font-weight: 600; }
.cell.s-up { border-color: color-mix(in srgb, var(--match) 45%, var(--rule)); }
.cell.s-up .cell-word { color: var(--match); }
.cell.s-down { background: var(--flag-bg); border-color: var(--flag); }
.cell.s-down .cell-word { color: var(--flag); }
.cell.s-slow .cell-word { color: var(--ink); text-decoration: underline wavy var(--control-border); text-underline-offset: 4px; }

.scroll { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ledger th, .ledger td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--row-rule); vertical-align: top; }
.ledger thead th { font-size: 0.8125rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ledger tbody tr:last-child > * { border-bottom: 0; }
.ledger .num { text-align: right; white-space: nowrap; }
.name { display: block; font-weight: 600; }
.host, .sub { display: block; font-size: 0.8125rem; color: var(--muted); }
.host { text-decoration: none; }
.host:hover { text-decoration: underline; }
.worker { color: var(--ink-soft); font-size: 0.875rem; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--control-border); }
.state.s-up { color: var(--match); } .state.s-up::before { background: var(--match); }
.state.s-down { color: var(--flag); } .state.s-down::before { background: var(--flag); }
.state.s-skipped::before { display: none; }

.gatepage { max-width: 34rem; margin: 48px 0; }
.gatepage p { line-height: 1.55; }
.notice { padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--rule); }
.notice-flag { background: var(--flag-bg); border-color: var(--flag); color: var(--ink); }
.btn, .btn-quiet { font: inherit; cursor: pointer; border-radius: var(--radius-md); }
.btn { display: inline-block; padding: 10px 18px; background: var(--brand); color: var(--on-brand); border: 0; text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--brand-hover); }
.btn-quiet { padding: 6px 12px; background: transparent; color: var(--ink); border: 1px solid var(--control-border); }

@media (max-width: 760px) {
  .frame { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px 48px; }
  .rail { flex-direction: row; position: static; overflow-x: auto; }
  .bar { padding: 12px 16px; }
  .who { display: none; }
  .ledger th, .ledger td { padding: 10px 12px; }
  .col-type, .col-worker { display: none; }
}
@media (max-width: 480px) { .col-deploy { display: none; } }
