/* monitor.css — shared by every Monitor page (Overview, Issues, Performance,
   Database, Uptime, Servers). */
/* Status colours for the traffic chart. Not the brand accent: these carry
   meaning (fine / the caller's mistake / the app broke), so they come from
   the status family and were checked with the palette validator for both
   themes — red and amber stay apart under deuteranopia (ΔE 15.5 dark,
   9.8 light) and every mark clears 3:1 on its surface. "OK" is a calm
   neutral on purpose: healthy traffic is the background, errors are news. */
:root { --mon-ok: #8b93a5; --mon-4xx: #ffb547; --mon-5xx: #ff5470; }
[data-theme="light"] { --mon-ok: #7d8696; --mon-4xx: #a87a0a; --mon-5xx: #c8285e; }

/* Rail: one row per monitored app. */
.mon-src { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--txt2); font-size: 13px; font-weight: 500; margin-bottom: 2px; text-decoration: none; }
.mon-src:hover { background: var(--surface2); color: var(--txt); }
.mon-src.active { background: var(--surface3); color: var(--txt); }
.mon-src .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-src .fl { font-size: 11px; color: var(--accent3); font-family: 'DM Mono', monospace; flex-shrink: 0; }
.mon-add { margin-top: 10px; width: 100%; justify-content: center; }
.cl-dot.warn { background: var(--accent4); }

.mon-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.mon-hd .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: 12px; color: var(--txt3); }
.mon-hd .meta .mono { font-family: 'DM Mono', monospace; }
.mon-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
.mon-actions .tab-bar { border-bottom: none; }
.mon-actions .tab { padding: 6px 10px; font-size: 12.5px; }
.mon-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--pop); z-index: 40; overflow: hidden; }
.mon-menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 12.5px; color: var(--txt); background: none; border: none; cursor: pointer; font-family: inherit; }
.mon-menu button:hover { background: var(--surface2); }
.mon-menu button.danger { color: var(--accent3); border-top: 1px solid var(--border); }

.mon-notice-err { background: rgba(255,84,112,.06); border-color: rgba(255,84,112,.25); }
.mon-notice-err .dotwarn { background: var(--accent3); }
.mon-notice a { color: var(--txt); }

/* Failing now: the reason this page exists. Flat, a hairline in red, no fill. */
.mon-failing { border: 1px solid rgba(255,84,112,.35); border-radius: var(--r-sm); margin-bottom: 18px; overflow: hidden; }
.mon-failing .hd { padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--accent3); border-bottom: 1px solid rgba(255,84,112,.2); }
.mon-failing .rw { display: flex; align-items: baseline; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.mon-failing .rw:last-child { border-bottom: none; }
.mon-failing .rt { font-family: 'DM Mono', monospace; color: var(--txt); font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-failing .dt { color: var(--txt2); font-size: 12.5px; flex: 1; min-width: 0; }
.mon-healthy { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt2); margin-bottom: 18px; }

/* Charts */
.mon-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px 16px 10px; margin-bottom: 16px; position: relative; }
.mon-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.mon-card-t { font-size: 13px; font-weight: 600; color: var(--txt); }
.mon-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--txt2); }
.mon-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mon-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.mon-chart svg { display: block; width: 100%; overflow: visible; }
.mon-chart .axis text { fill: var(--txt3); font-size: 10px; font-family: 'DM Mono', monospace; }
.mon-chart .grid line { stroke: var(--border); }
.mon-chart .hit { fill: transparent; cursor: default; }
.mon-chart .hit:hover + .hl, .mon-chart .hl.on { opacity: 1; }
.mon-chart .hl { fill: var(--txt); opacity: 0; pointer-events: none; }
.mon-tip { position: absolute; pointer-events: none; background: var(--surface3); border: 1px solid var(--border2); border-radius: var(--r-xs); padding: 8px 10px; font-size: 11.5px; color: var(--txt); white-space: nowrap; z-index: 5; box-shadow: var(--pop); display: none; }
.mon-tip .t { color: var(--txt3); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.mon-tip .r { display: flex; align-items: center; gap: 7px; font-family: 'DM Mono', monospace; }
.mon-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.mon-tablelink { background: none; border: none; color: var(--txt3); font-size: 11.5px; cursor: pointer; padding: 6px 0 2px; font-family: inherit; }
.mon-tablelink:hover { color: var(--txt); text-decoration: underline; }

/* Tables */
.mon-sec-t { font-size: 13px; font-weight: 600; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.mon-sec-t .s { font-size: 12px; color: var(--txt3); font-weight: 400; }
.mon-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); overflow-x: auto; }
.mon-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.mon-table th { text-align: right; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); font-weight: 600; padding: 10px 14px; background: var(--surface2); white-space: nowrap; }
.mon-table td { text-align: right; padding: 10px 14px; border-top: 1px solid var(--border); font-family: 'DM Mono', monospace; color: var(--txt2); white-space: nowrap; }
.mon-table th:first-child, .mon-table td:first-child { text-align: left; }
.mon-table td:first-child { color: var(--txt); max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.mon-table td.bad { color: var(--accent3); font-weight: 600; }
.mon-table td.meh { color: var(--accent4); }
/* Errors */
.mon-table td.iss-main { white-space: normal; max-width: none; font-family: inherit; }
.iss-row { cursor: pointer; }
.iss-row:hover td, .iss-row.open td { background: var(--surface2); }
.iss-t { font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--txt); word-break: break-word; }
.iss-s { font-size: 11.5px; color: var(--txt3); margin-top: 3px; font-family: 'DM Mono', monospace; word-break: break-all; }
.iss-k { display: inline-block; font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--txt3); margin-right: 8px; }
.iss-k.k-crash { color: var(--accent3); }
.iss-k.k-logged { color: var(--txt3); }
.mon-table tr.iss-detail td { text-align: left; white-space: normal; background: var(--surface2); padding: 12px 14px 16px; font-family: inherit; }
.iss-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12px; color: var(--txt2); }
.iss-facts span { color: var(--txt3); margin-right: 6px; }
.iss-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); font-weight: 600; margin: 14px 0 6px; }
.iss-pre { margin: 0; font-family: 'DM Mono', monospace; font-size: 12px; color: var(--txt); white-space: pre-wrap; word-break: break-word; }
.iss-stack { font-family: 'DM Mono', monospace; font-size: 12px; line-height: 1.7; color: var(--txt3); }
.iss-stack .app { color: var(--txt); }
.iss-stack .app .fn { font-weight: 600; }
.iss-stack .loc { color: inherit; opacity: .8; }
.iss-none { font-size: 12.5px; color: var(--txt2); margin-top: 12px; }
.mon-table .m { color: var(--txt3); margin-right: 8px; }
.mon-table .muted-row td:first-child { color: var(--txt3); }
.mon-table .empty { text-align: center !important; color: var(--txt3); padding: 22px; font-family: inherit; }

/* Waiting for the first report */
.mon-wait { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 20px; margin-bottom: 18px; }
.mon-wait h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.mon-wait p { font-size: 13px; color: var(--txt2); line-height: 1.65; margin-bottom: 12px; }
.mon-env { font-family: 'DM Mono', monospace; font-size: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 12px 14px; white-space: pre-wrap; word-break: break-all; color: var(--txt); }
.mon-env-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }

/* Fix buttons sit at the end of a "Needs attention" row or a notice. */
.mon-failing .rw { align-items: center; }
.srv-fixbtn { flex-shrink: 0; margin-left: auto; }
.mon-notice { align-items: center; }
.mon-notice > div { flex: 1; min-width: 0; }

/* Per-server alert settings. */
.srv-settings { padding: 16px; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; }
.srv-f { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; font-size: 12.5px; }
.srv-f .k { color: var(--txt); grid-column: 1; }
.srv-f .d { color: var(--txt3); font-size: 11px; grid-column: 1; }
.srv-f .in { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 6px; }
.srv-f input, .srv-f select { width: 72px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-xs); color: var(--txt); font: 12.5px 'DM Mono', monospace; padding: 6px 8px; text-align: right; }
.srv-f input:focus, .srv-f select:focus { outline: none; border-color: var(--accent); }
.srv-f .u { color: var(--txt3); font-size: 11.5px; width: 28px; }
.srv-evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 18px; }
.srv-ev { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt2); cursor: pointer; }
.srv-ev input { accent-color: var(--accent); }
.srv-note { font-size: 12px; color: var(--txt3); line-height: 1.6; margin: 12px 0 0; }
.srv-act { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.srv-msg { font-size: 12px; color: var(--txt3); }
.srv-fixes { padding: 16px; }
.srv-fx { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--txt2); line-height: 1.6; padding: 4px 0; }
.srv-fx strong { color: var(--txt); }

@media (max-width: 760px) {
  .cl-layout { flex-direction: column; height: auto; overflow: visible; }
  .cl-rail { width: auto; min-width: 0; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; display: flex; gap: 6px; overflow-x: auto; }
  .cl-rail .cl-rail-lbl { display: none; }
  .mon-src { flex-shrink: 0; margin: 0; }
  .mon-add { width: auto; margin: 0; flex-shrink: 0; }
  .cl-pane { overflow: visible; }
  .mon-hd { flex-wrap: wrap; }
  .mon-actions { width: 100%; flex-wrap: wrap; }
}

/* ── Page frame shared by the split Monitor pages ─────────────────────────── */
.mon-page { max-width: 1180px; }
/* App-scoped pages: the title, and which app, on one line. */
.mon-titlerow { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
select.mon-pick { width: auto; min-width: 180px; max-width: 100%; font-size: 13px; font-weight: 600; padding: 7px 30px 7px 10px; }
.mon-one { font-size: 14px; font-weight: 600; color: var(--txt2); }

/* ── Overview ──────────────────────────────────────────────────────────── */
.ov-say { font-size: 13.5px; color: var(--txt2); margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.ov-say strong { color: var(--txt); }
.ov-inc { border: 1px solid rgba(255,84,112,.35); border-radius: var(--r-sm); margin-bottom: 22px; overflow: hidden; }
.ov-inc .hd { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--accent3); border-bottom: 1px solid rgba(255,84,112,.2); }
.ov-inc .hd a { color: var(--txt2); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.ov-inc a.rw { display: flex; align-items: baseline; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--txt); text-decoration: none; }
.ov-inc a.rw:last-child { border-bottom: none; }
.ov-inc a.rw:hover { background: var(--surface2); }
.ov-inc .rw .t { font-weight: 600; flex: 1; min-width: 0; }
.ov-inc .rw .d { color: var(--txt3); font-size: 12px; flex-shrink: 0; font-family: 'DM Mono', monospace; }

.ov-sec { margin-bottom: 26px; }
.ov-sec-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ov-sec-hd h2 { font-size: 14px; font-weight: 600; margin: 0; }
.ov-sec-hd .s { font-size: 12px; color: var(--txt3); }
.ov-sec-hd .act { margin-left: auto; display: flex; gap: 8px; }

/* A list of rows that is a table on wide screens and stacked cards on phones. */
.ov-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.ov-head, .ov-row { display: grid; align-items: center; gap: 12px; padding: 0 14px; }
.ov-head { background: var(--surface2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); font-weight: 600; min-height: 36px; }
.ov-row { min-height: 54px; border-top: 1px solid var(--border); color: var(--txt2); text-decoration: none; font-size: 12.5px; }
.ov-row:hover { background: var(--surface2); }
.ov-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ov-head > :not(:first-child), .ov-row > :not(:first-child) { text-align: right; font-family: 'DM Mono', monospace; }
.ov-head > :not(:first-child) { font-family: inherit; }
.ov-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ov-name .nm { color: var(--txt); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-name .sub { font-size: 11.5px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-name > div { min-width: 0; }
.ov-st { font-family: 'DM Sans', sans-serif !important; font-size: 12px; }
.ov-st.bad { color: var(--accent3); font-weight: 600; }
.ov-st.warn { color: var(--accent4); }
.ov-st.ok { color: var(--txt2); }
.ov-st.off { color: var(--txt3); }
.ov-row .bad { color: var(--accent3); font-weight: 600; }
.ov-row .meh { color: var(--accent4); }
.ov-row .dim { color: var(--txt3); }
.ov-spark { display: block; width: 96px; height: 26px; margin-left: auto; }
.ov-k { display: none; }
.ov-apps .ov-head, .ov-apps .ov-row { grid-template-columns: minmax(180px, 1.6fr) 120px 80px 96px 76px 100px 104px; }
.ov-chk .ov-head, .ov-chk .ov-row { grid-template-columns: minmax(180px, 1.6fr) 110px 80px 80px 90px 110px; }
.ov-empty { padding: 18px 14px; font-size: 12.5px; color: var(--txt3); border-top: 1px solid var(--border); }
.ov-first { border: 1px dashed var(--border2, var(--border)); border-radius: var(--r-sm); padding: 22px; }
.ov-first h3 { font-size: 15px; margin: 0 0 6px; }
.ov-first p { font-size: 13px; color: var(--txt2); line-height: 1.6; margin: 0 0 14px; max-width: 620px; }
.ov-first .act { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tablets: the table stays, the small chart goes, columns tighten. */
@media (max-width: 1000px) and (min-width: 641px) {
  .ov-apps .ov-head, .ov-apps .ov-row { grid-template-columns: minmax(150px, 1.4fr) 110px 70px 88px 70px 88px; }
  .ov-apps .ov-row > .ov-sparkcell, .ov-apps .ov-head > :last-child { display: none; }
  .ov-chk .ov-head, .ov-chk .ov-row { grid-template-columns: minmax(150px, 1.4fr) 100px 64px 64px 80px 90px; }
}
@media (max-width: 640px) {
  .ov-head { display: none; }
  .ov-apps .ov-row, .ov-chk .ov-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px; }
  .ov-row > .ov-name { grid-column: 1 / -1; }
  .ov-row > :not(:first-child) { text-align: left; }
  .ov-k { display: block; font-family: 'DM Sans', sans-serif; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--txt3); margin-bottom: 2px; }
  .ov-row > .ov-sparkcell { display: none; }
  .ov-sec-hd { flex-wrap: wrap; align-items: center; }
  .ov-sec-hd .s { order: 3; flex-basis: 100%; }
}
/* A section heading with tabs (Errors): the note drops under the heading on
   a narrow screen instead of squeezing into a column beside the tabs. */
.mon-sec-t { flex-wrap: wrap; }
.mon-sec-t .tab .mono { margin-left: 6px; }
@media (max-width: 820px) {
  .mon-sec-t { align-items: center; }
  .mon-sec-t .s { order: 3; flex-basis: 100%; }
}

/* ── Issues list ───────────────────────────────────────────────────────── */
.iss-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 12px; }
.iss-bar .tab-bar { border-bottom: none; }
.iss-bar .tab .mono { margin-left: 6px; color: var(--txt3); }
.iss-filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.iss-filters input { width: 220px; }
.iss-filters select { width: auto; }
.iss-list .ov-head, .iss-list .ov-row { grid-template-columns: minmax(0, 1fr) 90px 80px 100px; }
.iss-list .ov-row { padding-top: 11px; padding-bottom: 11px; align-items: start; }
.iss-list .ov-row > div:not(:first-child) { padding-top: 2px; }
.iss-li .iss-t { white-space: normal; }
.iss-foot { font-size: 12px; color: var(--txt3); margin: 10px 0 0; }

/* ── One issue ─────────────────────────────────────────────────────────── */
.iss-back { display: inline-block; font-size: 12.5px; color: var(--txt3); text-decoration: none; margin-bottom: 14px; }
.iss-back:hover { color: var(--txt); }
.iss-hd { align-items: flex-start; }
.iss-kind { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.iss-kind .iss-k { margin: 0; }
.iss-title { font-family: 'DM Mono', monospace; font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0; word-break: break-word; color: var(--txt); }
.iss-title span { font-weight: 400; color: var(--txt2); }
.iss-facts2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; margin: 0 0 16px; }
.iss-facts2 > div { background: var(--surface); padding: 11px 14px; min-width: 0; }
.iss-facts2 dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); font-weight: 600; margin-bottom: 4px; }
.iss-facts2 dd { margin: 0; font-size: 13px; color: var(--txt); overflow-wrap: anywhere; }
.iss-facts2 .mono { font-family: 'DM Mono', monospace; font-size: 12.5px; }
.iss-next { margin-bottom: 16px; }
.iss-next a { white-space: nowrap; }
.iss-chart { display: block; width: 100%; height: 90px; }
.iss-axis { display: flex; justify-content: space-between; font: 10px 'DM Mono', monospace; color: var(--txt3); margin-top: 6px; }
.iss-prebox, .iss-stackbox { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; }
.iss-stackbox .iss-stack div { white-space: nowrap; }

@media (max-width: 820px) {
  .iss-filters { margin-left: 0; width: 100%; }
  .iss-filters input { flex: 1; width: auto; min-width: 0; }
  .iss-list .ov-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iss-title { font-size: 15.5px; }
  .iss-hd .mon-actions { width: auto; }
}

/* ── Route page and request timelines ─────────────────────────────────── */
.rt-chart { display: block; width: 100%; height: 120px; overflow: visible; }
.rt-chart text { fill: var(--txt3); font: 10px 'DM Mono', monospace; }
.rt-chart .gl { stroke: var(--border); }
.tr-list { display: grid; gap: 8px; }
.tr-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.tr-head { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 12px 14px; background: none; border: none; color: var(--txt2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; min-height: 44px; }
.tr-head:hover, .tr-item.open .tr-head { background: var(--surface2); }
.tr-ms { font-family: 'DM Mono', monospace; font-weight: 600; color: var(--txt); min-width: 64px; }
.tr-what { flex: 1; min-width: 0; }
.tr-when { color: var(--txt3); font-size: 12px; flex-shrink: 0; }
.tr-head .bad, .tr-ms.bad { color: var(--accent3); }
.tr-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.tr-route { font-family: 'DM Mono', monospace; color: var(--txt); }

.wf { font-size: 12px; }
.wf-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--txt2); margin: 10px 0 12px; }
.wf-sum span { display: inline-flex; align-items: center; gap: 6px; }
.wf-sum i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.wf-db { background: var(--accent2); }
.wf-http { background: var(--mon-4xx); }
.wf-code, .wf-req { background: var(--mon-ok); }
.wf-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 64px; gap: 12px; align-items: center; padding: 5px 0; border-top: 1px solid var(--border); }
.wf-total { border-top: none; }
.wf-l { font-family: 'DM Mono', monospace; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-k { display: inline-block; min-width: 38px; font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--txt3); }
.wf-st { color: var(--txt3); }
.wf-track { position: relative; height: 10px; background: var(--surface2); border-radius: 2px; }
.wf-bar { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.wf-bar.wf-req { opacity: .45; }
.wf-bad .wf-bar { background: var(--mon-5xx) !important; }
.wf-bad .wf-l { color: var(--accent3); }
.wf-d { font-family: 'DM Mono', monospace; color: var(--txt2); text-align: right; }
.wf-none { color: var(--txt3); padding: 8px 0 0; }
.mon-table a.rlink { color: var(--txt); text-decoration: none; }
.mon-table a.rlink:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .wf-row { grid-template-columns: minmax(0, 1fr) 56px; grid-template-areas: "l d" "t t"; row-gap: 6px; }
  .wf-l { grid-area: l; } .wf-d { grid-area: d; } .wf-track { grid-area: t; }
  .tr-head { flex-wrap: wrap; gap: 4px 12px; }
  .tr-what { flex-basis: 100%; order: 3; }
}
a.tr-link { display: block; text-decoration: none; }
a.tr-link:hover .tr-head { background: var(--surface2); }
.tr-link .tr-route { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-link .tr-what { flex: 1; }

/* ── Releases ──────────────────────────────────────────────────────────── */
.rel-list { display: grid; gap: 10px; }
.rel-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.rel-hd { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.rel-sha { font-family: 'DM Mono', monospace; font-weight: 600; color: var(--txt); font-size: 13.5px; }
.rel-v { font-size: 12px; font-weight: 600; }
.rel-v.bad { color: var(--accent3); } .rel-v.warn { color: var(--accent4); } .rel-v.ok { color: var(--txt3); font-weight: 500; }
.rel-when { margin-left: auto; font-size: 12px; color: var(--txt3); }
.rel-cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 10px; font-size: 13px; font-family: 'DM Mono', monospace; color: var(--txt); }
.rel-cmp.dim { display: block; font-family: inherit; font-size: 12.5px; color: var(--txt3); }
.rel-cmp .k { display: block; font-family: 'DM Sans', sans-serif; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); font-weight: 600; margin-bottom: 3px; }
.rel-cmp .arr { color: var(--txt3); }
.rel-cmp .bad { color: var(--accent3); font-weight: 600; } .rel-cmp .good { color: var(--accent2); }
.rel-ft { font-size: 12.5px; }
.rel-ft a { color: var(--accent3); text-decoration: none; } .rel-ft a:hover { text-decoration: underline; }
.dim { color: var(--txt3); }

/* ── Logs ──────────────────────────────────────────────────────────────── */
.log-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.log-pre { margin: 0; padding: 12px 14px; max-height: calc(100vh - 330px); min-height: 240px; overflow: auto; font: 12px/1.65 'DM Mono', monospace; color: var(--txt2); white-space: pre-wrap; word-break: break-word; }
.log-pre .le { color: var(--accent3); }
.log-pre .lw { color: var(--accent4); }

@media (max-width: 820px) {
  .rel-when { margin-left: 0; flex-basis: 100%; }
  .rel-cmp { grid-template-columns: 1fr 1fr; }
  .log-pre { max-height: 65vh; font-size: 11.5px; }
}

/* ── Heartbeats ────────────────────────────────────────────────────────── */
.hb-url { font-size: 12.5px; }
.srv-note .mono { font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--txt2); word-break: break-all; }
.hb-pings { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); max-height: 360px; overflow: auto; }
.hb-ping { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--txt2); }
.hb-ping:first-child { border-top: none; }
.hb-ping.bad { color: var(--accent3); }
.hb-ping .when { margin-left: auto; color: var(--txt3); font-family: 'DM Mono', monospace; font-size: 11.5px; text-align: right; }

/* ── Status page settings ──────────────────────────────────────────────── */
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 18px; }
.sp-f { display: grid; gap: 6px; font-size: 12.5px; color: var(--txt2); }
.sp-f .k { color: var(--txt); font-weight: 600; }
.sp-addr { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-addr .pre { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--txt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.sp-addr input { flex: 1; min-width: 0; }
.sp-items { display: grid; gap: 6px; }
.sp-item { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.sp-item input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.sp-item .nm { font-size: 13px; color: var(--txt); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sp-item .sub { display: block; font-size: 11.5px; color: var(--txt3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 820px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-item { grid-template-columns: auto minmax(0, 1fr); }
  .sp-item input.form-input { grid-column: 1 / -1; }
  .sp-addr { flex-wrap: wrap; }
  .sp-addr .pre { max-width: 100%; }
}
.ov-hb .ov-head, .ov-hb .ov-row { grid-template-columns: minmax(180px, 1.6fr) 160px 140px 120px; }
@media (max-width: 640px) { .ov-hb .ov-head { display: none; } .ov-hb .ov-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px; } }

/* Figures: an odd last tile fills its row instead of leaving a gap. */
@media (max-width: 600px) {
  .vt-figs > .vt-fig:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
