/* ─── Greenhouse design tokens ──────────────────────────────────────────────
   Ported from Bright Steps Centre Success (its app/globals.css) so the two
   apps read as one product family: deep garden green anchor on a light mist
   ground, mint support, burgundy-red reserved for critical.

   Light-only, deliberately, exactly as Centre Success is. A `prefers-color-
   scheme: dark` block here would give one of the two apps a face the other
   does not have, which is the thing this port exists to stop.

   The names on the left are this app's; the comments name the Centre Success
   token each is taken from, so a retheme there can be followed here. */
:root {
  --bg: #f5f6f2;            /* mist */
  --surface: #ffffff;       /* panel */
  --surface-2: #f0f2ed;     /* line-soft */
  --border: #e4e7e0;        /* line */
  --text: #1d211e;          /* ink */
  --text-dim: #4e5650;      /* ink-2 */
  --text-faint: #656c63;    /* mut */

  --accent: #1f4a38;        /* garden */
  --accent-deep: #163828;   /* garden-deep — button hover, gradient floor */
  --mint: #bfe3cb;          /* mint */
  --tint: #e7f2ea;          /* tint */
  --night: #1b2a22;         /* night — the auth shell's ground */
  --night-ink: #dce9e0;
  --night-mut: #9db8a7;

  --ok: #2e7d5b;
  --warn: #8f5e11;
  --crit: #a93636;
  /* Greenhouse has no blue or purple, so "armed" — a violet before — needs a new
     home. Not the reserved burgundy: burgundy means critical here, and an armed
     area is the opposite of a problem. It takes the darkest garden green on a
     solid mint chip instead — in-palette, unmistakably positive, and still
     telling apart at a glance from the pale-tinted --ok used for "secure".
     Two greens of the same weight would have been consistent and unreadable. */
  --armed: #163828;
  --unknown: #656c63;

  --ok-bg: #e7f2ea;
  --warn-bg: #f7eddb;
  --crit-bg: #f5e2e2;
  --armed-bg: #bfe3cb;   /* mint, solid — the one filled status chip */
  --unknown-bg: #eef0ea;    /* neutral-bg */

  --radius: 15px;           /* radius-card */
  --radius-chip: 8px;
  --shadow-card: 0 1px 2px rgb(29 33 30 / 0.04), 0 4px 14px -6px rgb(29 33 30 / 0.08);
  --shadow-pop: 0 12px 40px -12px rgb(29 33 30 / 0.28);

  --font: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", Helvetica, ui-sans-serif, system-ui, sans-serif;
  --mono: "Menlo", "Consolas", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

/* ---------- Login: the immersive-green auth shell ----------
   Ported from Centre Success (components/auth/AuthShell.tsx). The whole
   viewport is one green gradient with a dot grid and an oversized, barely-there
   leaf; the brand rail sits directly ON that green, and there is exactly one
   white surface on the page — the card. Two flat halves would be a different,
   cheaper thing. */
.login-wrap {
  display: none; position: relative; min-height: 100svh; overflow: hidden;
  background-color: var(--accent-deep);
  background-image:
    linear-gradient(145deg, #245240, #132f22 70%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px);
  background-size: auto, 26px 26px;
}
.login-wrap.active { display: block; }

/* Atmosphere only — non-interactive and hidden from assistive tech. */
.login-wrap > .leaf {
  position: absolute; bottom: -80px; right: -64px;
  width: 480px; height: 560px; opacity: .06; pointer-events: none;
}

.login-grid {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; min-height: 100svh;
}
@media (min-width: 900px) {
  .login-grid { display: grid; grid-template-columns: 1.15fr 1fr; }
}

/* --- brand rail (transparent; painted for the green behind it) --- */
.brand-rail { display: none; flex-direction: column; gap: 40px; padding: 56px; }
@media (min-width: 900px) { .brand-rail { display: flex; } }

.brand-compact { display: flex; flex-direction: column; gap: 20px; padding: 40px 28px 8px; }
@media (min-width: 900px) { .brand-compact { display: none; } }
.brand-compact .headline { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.brand-compact .headline span { color: var(--mint); }
.brand-compact .badge-pill { align-self: flex-start; }

.brand-rail .rail-top { display: flex; flex-direction: column; gap: 32px; }
.brand-rail .logo, .brand-compact .logo { display: flex; align-items: center; gap: 10px; }
/* The mark is a dark tree on transparency — it would vanish into the green, so
   it sits in a light disc, as it does in Centre Success. */
.brand-rail .mark, .brand-compact .mark {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; padding: 6px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand-rail .mark img, .brand-compact .mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-rail .wordmark, .brand-compact .wordmark { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-rail .wordmark .name, .brand-compact .wordmark .name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand-rail .wordmark .product, .brand-compact .wordmark .product { font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--night-mut); }

.brand-rail .rail-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.badge-pill {
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.1);
  border-radius: 999px; padding: 6px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mint);
}
.brand-rail .headline {
  margin: 0; font-size: clamp(34px, 3.4vw, 48px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.08; color: #fff;
}
.brand-rail .headline span { display: block; color: var(--mint); }
.brand-rail .lede { margin: 0; max-width: 26rem; line-height: 1.65; color: rgba(220, 233, 224, 0.85); }

.rail-list { list-style: none; margin: auto 0 0; padding: 0 0 40px; display: flex; flex-direction: column; gap: 16px; }
.rail-list li { display: flex; align-items: flex-start; gap: 12px; }
.rail-list .tick {
  flex: none; margin-top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint); display: flex; align-items: center; justify-content: center;
}
.rail-list .tick svg { width: 12px; height: 12px; }
.rail-list .t { margin: 0; font-weight: 700; color: #fff; }
.rail-list .s { margin: 2px 0 0; font-size: 13px; color: var(--night-mut); }

.rail-foot { font-size: 12px; color: var(--night-mut); }
.rail-foot p { margin: 0; }

/* --- the card column --- */
.login-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 40px 20px;
}
@media (min-width: 900px) { .login-col { flex: none; padding: 48px 20px; } }

.login-card {
  background: var(--surface); border-radius: 22px;
  padding: 40px; width: min(400px, 100%);
  box-shadow: 0 40px 80px -28px rgba(0, 0, 0, 0.55);
}
.login-card h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.login-card p.sub { margin: 8px 0 28px; color: var(--text-faint); font-size: 15px; }

.login-card .btn.big {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0; margin-top: 4px;
  border-radius: var(--radius); font-size: 16px; font-weight: 700; text-decoration: none;
}
.login-card .field > span { font-weight: 600; color: var(--text-dim); font-size: 13px; }
.login-card .field input { background: var(--surface); border-radius: 12px; padding: 12px 16px; }

.login-card .shield {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 20px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-faint);
}
.login-card .shield svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* Sits on the green, under the floating card. */
.login-foot { margin: 0; font-size: 12px; color: var(--night-mut); text-align: center; }
.login-foot a { color: var(--mint); }

/* ---------- Shell ---------- */
.app { display: none; min-height: 100vh; flex-direction: column; }
.app.active { display: flex; }

header.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.brand .dot.stale { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.spacer { flex: 1; }
.topbar .meta { color: var(--text-faint); font-size: 12px; }

nav.tabs { display: flex; gap: 2px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 57px; z-index: 19; overflow-x: auto; }
nav.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 11px 14px; color: var(--text-dim); cursor: pointer; white-space: nowrap; font-weight: 500;
}
nav.tabs button:hover { color: var(--text); }
nav.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
nav.tabs button .badge { margin-left: 6px; }

main { flex: 1; padding: 20px; max-width: 1500px; width: 100%; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }

/* ---------- Controls ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 11px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgb(31 74 56 / 0.16);
}
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
label.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; }
label.check input { width: auto; }

.btn {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 13px; cursor: pointer; white-space: nowrap; font-weight: 500;
}
.btn:hover:not(:disabled) { border-color: var(--text-faint); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.confirm { background: var(--ok); border-color: var(--ok); color: #fff; animation: nudge 1.6s ease-in-out 2; }
@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 5px var(--ok-bg); }
}
.btn.danger { border-color: var(--crit); color: var(--crit); }
.btn.danger:hover:not(:disabled) { background: var(--crit-bg); }
.btn.sm { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Cards & tiles ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.grid { display: grid; gap: 12px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-card); }
.tile .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.tile .value { font-size: 27px; font-weight: 650; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .value.ok { color: var(--ok); } .tile .value.warn { color: var(--warn); }
.tile .value.crit { color: var(--crit); } .tile .value.armed { color: var(--armed); }
.tile .note { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.site-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.site-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-card); }
.site-card.offline { border-color: var(--crit); background: linear-gradient(var(--crit-bg), var(--crit-bg)), var(--surface); }
.site-card h3 { margin: 0 0 2px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.site-card .stat-row { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.site-card .stat { font-size: 12px; color: var(--text-dim); }
.site-card .stat b { display: block; font-size: 17px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warning { color: var(--warn); background: var(--warn-bg); }
.pill.critical { color: var(--crit); background: var(--crit-bg); }
.pill.armed { color: var(--armed); background: var(--armed-bg); }
.pill.unknown { color: var(--unknown); background: var(--unknown-bg); }
.pill.plain::before { display: none; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px;
  background: var(--surface-2); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.badge.crit { background: var(--crit-bg); color: var(--crit); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); padding: 10px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1; font-weight: 600; }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
td .site-name { color: var(--text-dim); font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- Misc ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--text-faint); }
.errors { background: var(--crit-bg); border: 1px solid var(--crit); border-radius: var(--radius);
  padding: 11px 14px; margin-bottom: 16px; font-size: 13px; }
.errors b { color: var(--crit); }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
.notice.crit { border-color: var(--crit); background: var(--crit-bg); color: var(--text); }
.notice { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; margin-bottom: 16px; font-size: 13px; color: var(--text-dim); }
.err-text { color: var(--crit); font-size: 13px; min-height: 18px; margin-top: 8px; }

.modal-backdrop { position: fixed; inset: 0; background: #000a; display: none; place-items: center; z-index: 50; padding: 20px; }
.modal-backdrop.open { display: grid; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; width: min(560px, 100%); max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-pop); }
.modal h2 { margin: 0 0 14px; font-size: 17px; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

.site-picker { max-height: 200px; overflow: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; background: var(--surface-2); }
.site-picker label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.site-picker input { width: auto; }

.toast { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast div { background: var(--surface); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: 8px; padding: 11px 15px; max-width: 380px; font-size: 13px; box-shadow: 0 6px 24px #0006; }
.toast div.ok { border-left-color: var(--ok); }
.toast div.err { border-left-color: var(--crit); }

.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Phones and tablets ----------
   Two separate questions, so two separate queries.

   WIDTH decides layout. HANDEDNESS decides ergonomics — an iPad is wider than
   any phone breakpoint and is still driven with a finger, so touch sizing keys
   off `pointer: coarse` rather than a width. */

@media (max-width: 760px) {
  main { padding: 14px; }
  header.topbar { padding: 10px 14px; gap: 8px 10px; }

  /* The header was spilling onto three rows on a 440px phone, which is a lot of
     a 956px screen spent on chrome. The absolute "Updated 16:22:58" goes: the
     header's own live label already says how stale the data is, in the relative
     terms anyone actually reads ("all confirmed <=68s"), and every centre card
     carries its own "as of" tag. */
  #lastUpdated { display: none; }
  .topbar .brand { font-size: 15px; }

  /* The header wraps to two rows on a phone, so any fixed offset under it is
     wrong at some width. Rather than chase the number, only the header stays
     stuck; the tabs scroll away with the page, which is what you want when the
     screen is 956px tall and chrome is expensive. */
  nav.tabs { position: static; padding: 0 8px; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs { scrollbar-width: none; }

  th, td { padding: 8px 10px; }

  /* Tables scroll sideways rather than crushing five columns into 440px. The
     min-width is what makes that a deliberate scroll instead of a squeeze —
     without it the action buttons wrapped into three stacked rows and the last
     one was clipped by the container. */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap > table { min-width: 620px; }
  td.actions .btn-row { flex-wrap: nowrap; justify-content: flex-end; }

  /* A toolbar of half-width controls is unusable; give each one the row. */
  .toolbar > input[type=search],
  .toolbar > select { max-width: none !important; width: 100% !important; }
  .toolbar > .spacer { display: none; }

  .tiles { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .site-grid { grid-template-columns: 1fr; }
  .modal { padding: 18px; border-radius: 16px; max-height: 92vh; }
  .login-card { padding: 28px 22px; }
}


@media (pointer: coarse) {
  /* 16px is the threshold below which iOS zooms the page on focus. Every tap
     into a search box would otherwise scale the layout up and leave the user to
     pinch back out — the single most irritating thing a web app does on an
     iPhone. The `/m` view has always done this; the console had not. */
  input[type=text], input[type=password], input[type=search],
  input[type=date], input[type=number], select, textarea,
  /* Qualified with the element so it outranks `.pager .page-size`, which is
     defined later in this file and would otherwise win on source order. */
  .pager select.page-size {
    font-size: 16px;
    padding: 10px 12px;
  }

  /* Fingers are not mice. 40px is the smallest comfortable target; the buttons
     in a table row were 26px tall. */
  .btn { min-height: 40px; padding: 9px 14px; }
  .btn.sm { min-height: 36px; padding: 7px 11px; font-size: 13px; }
  nav.tabs button { padding: 13px 15px; }
  .filter-row { padding: 9px 8px; }
  label.check input[type=checkbox] { width: 20px; height: 20px; }
}

/* ---------- Centre identity ---------- */
.centre-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.centre-code {
  flex: none; display: inline-block; padding: 2px 6px; border-radius: 5px;
  font: 600 11px/1.35 var(--mono); letter-spacing: .04em;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent);
}
.centre-chip.muted .centre-code { opacity: .5; }
.centre-chip .centre-name {
  font-size: 12.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
td.centre-cell { max-width: 190px; }
.site-card h3 .centre-code { font-size: 10px; }

/* ---------- Presence strip ---------- */
.presence { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.presence-dot {
  width: 11px; height: 11px; border-radius: 3px; cursor: default;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: transparent;
}
.presence-dot.on { background: var(--c); border-color: var(--c); }

/* ---------- Centre filter popover ---------- */
.filter-wrap { position: relative; }
.filter-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  width: 290px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 32px #0006; overflow: hidden;
}
.filter-menu.open { display: block; }
.filter-head { padding: 10px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; }
.filter-list { max-height: 320px; overflow: auto; padding: 6px; }
.filter-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.filter-row:hover { background: var(--surface-2); }
.filter-row input { width: auto; flex: none; }
.filter-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-label { font-size: 11px; color: var(--text-faint); font-weight: 500; margin-left: 2px; }

/* ---------- Alerts ---------- */
tr.cleared td { opacity: .5; }
.pill.critical, .pill.warning { text-transform: capitalize; }

/* ---------- Data freshness ----------
   Distinct from the status pills on purpose: a status pill says what the panel
   reported, a freshness tag says how much you should trust that it is current. */
.fresh {
  display: inline-block; font-size: 11px; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 5px; margin-top: 4px;
}
.fresh.ok { color: var(--text-faint); }
.fresh.warning { color: var(--warn); background: var(--warn-bg); font-weight: 600; }
.fresh.critical { color: var(--crit); background: var(--crit-bg); font-weight: 650; }
.fresh.unknown { color: var(--text-faint); font-style: italic; }
.live-label.warn { color: var(--warn); font-weight: 650; }
.live-label.crit { color: var(--crit); font-weight: 700; }


/* ---------- Pagination ----------
   Sits directly under a table. Deliberately quiet: it is navigation for a list
   you are already reading, not a control anyone came here to use. */
.pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 4px 2px;
}
.pager:empty { display: none; }
.pager .meta { color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.pager .spacer { flex: 1; }
.pager .btn-row { flex-wrap: nowrap; }
.pager .page-size {
  width: auto; padding: 5px 8px; font-size: 12px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
}
@media (max-width: 640px) {
  .pager { justify-content: center; }
  .pager .spacer { display: none; }
  .pager .btn-row { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 480px) {
  /* « First and Last » do not fit beside Prev/Next on a phone, and neither is
     load-bearing: the page counter already says how far the list runs. */
  .pager .btn-row button:first-child,
  .pager .btn-row button:last-child { display: none; }
}
