:root {
  color-scheme: light;
  font: 16px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  --bg: #edf3f8;
  --top: #152133;
  --panel: #fff;
  --thead: #eaf0f5;
  --line: #d9e2eb;
  --outline: #c6d2df;
  --text: #172233;
  --muted: #4e6075;
  --accent: #0655df;
  --healthy: #11672f;
  --down: #aa2329;
  --pending: #845400;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }
.topbar { background: var(--top); color: #fff; }
.topbar-inner, main { width: min(calc(100% - 56px), 1440px); margin-inline: auto; }
.topbar-inner, .brand, .header-status { display: flex; align-items: center; }
.topbar-inner { justify-content: space-between; min-height: 52px; gap: 12px; }
.brand { gap: 11px; font-size: 1.25rem; font-weight: 720; white-space: nowrap; }
.brand svg { width: 32px; height: 24px; }
.header-status { gap: 22px; font-size: .875rem; font-weight: 550; }
.connection { color: #dce8f8; }
.connection.offline { color: #ffc7c7; }
.sound-toggle {
  padding: 5px 10px; min-height: 32px; border: 1px solid #62738a; border-radius: 5px;
  background: transparent; color: #fff; font: inherit; white-space: nowrap; cursor: pointer;
}
.sound-toggle:hover, .sound-toggle[aria-pressed="true"] { background: #2b405b; }
.sound-toggle:focus-visible { outline-color: #9dc6ff; }
.sound-toggle:disabled { opacity: .65; cursor: default; }
main { padding-block: 13px 36px; }
h1 { font-size: clamp(1.85rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -.045em; margin: 0 0 3px; }
.subtitle { margin: 0 0 13px; color: var(--muted); }
.notice { color: #62420a; background: #fff4d9; border: 1px solid #ead3a4; border-radius: 7px; margin-bottom: 12px; padding: 8px 12px; }
.summary, .panel { border: 1px solid var(--outline); border-radius: 8px; background: var(--panel); }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; padding: 5px 0; }
.summary > div { text-align: center; min-width: 0; padding: 1px 10px 4px; }
.summary > div + div { border-left: 1px solid var(--line); }
dt { color: var(--muted); font-weight: 660; font-size: .9rem; }
dd { margin: 0; font-size: 2.1rem; line-height: 1.14; font-weight: 740; font-variant-numeric: tabular-nums; }
.healthy { color: var(--healthy); }
.down { color: var(--down); }
.pending { color: var(--pending); }
.panel { margin-bottom: 20px; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; min-height: 49px; }
h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.15; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.search { position: relative; display: flex; align-items: center; color: var(--muted); }
.search svg { position: absolute; left: 9px; width: 17px; pointer-events: none; }
.search input {
  font: inherit; font-size: .875rem; height: 34px; border: 1px solid var(--outline); border-radius: 5px;
  padding: 4px 9px 4px 31px; background: var(--panel); color: var(--text); width: clamp(155px, 19vw, 252px);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 1px; border: 1px solid var(--outline); border-radius: 5px; background: var(--outline); }
.filters button { border: 0; padding: 5px 12px; min-height: 32px; font: inherit; font-size: .875rem; color: var(--text); background: #fff; cursor: pointer; }
.filters button:first-child { border-radius: 4px 0 0 4px; }
.filters button:last-child { border-radius: 0 4px 4px 0; }
.filters button:hover { background: #eaf2ff; }
.filters button[aria-pressed="true"] { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
thead { background: var(--thead); }
th, td { border-top: 1px solid var(--line); padding: 6px 12px; vertical-align: middle; }
thead th { font-weight: 690; white-space: nowrap; }
.fleet thead th:first-child { padding-left: 37px; }
.fleet td { white-space: nowrap; }
.fleet tbody tr.host { height: 35px; }
.fleet tbody tr.host > th { padding-block: 0; }
.host.attention { background: #fff1f2; }
.host:hover, .host.open { background: #f0f6ff; }
.host.attention:hover, .host.attention.open { background: #ffe8eb; }
.host-toggle {
  display: flex; gap: 10px; align-items: center; text-align: left; padding: 4px 0;
  min-height: 30px; width: 100%; background: transparent; border: 0; color: var(--text);
  cursor: pointer; font: inherit; font-weight: 700; overflow-wrap: anywhere;
}
.host-toggle svg { width: 14px; height: 14px; flex: none; }
.host-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; white-space: nowrap; font-weight: 660; }
.pill.healthy { background: #dff3e2; }
.pill.down { background: #ffdce0; }
.pill.pending { background: #ffedc6; }
.check-state { display: inline-flex; align-items: center; gap: 5px; color: var(--text); white-space: nowrap; vertical-align: middle; }
.check-state svg { width: 15px; height: 15px; }
.missing, time, small { color: var(--muted); }
time { white-space: nowrap; font-variant-numeric: tabular-nums; }
small { display: block; margin-top: 1px; font-size: .8rem; font-weight: 400; overflow-wrap: anywhere; }
.fleet td.host-detail { white-space: normal; padding: 7px 16px 10px 36px; background: #f6f9fd; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: grid; grid-template-columns: minmax(135px, 1fr) 80px minmax(170px, 2fr) auto; gap: 10px; padding-block: 5px; }
.check-list li + li { border-top: 1px solid var(--line); }
.check-list li > span { overflow-wrap: anywhere; }
.empty { padding-block: 22px; text-align: center; color: var(--muted); }
@media (max-width: 880px) {
  .fleet th, .fleet td { padding-inline: 7px; }
  .fleet thead th:first-child { padding-left: 31px; }
  .fleet .last-update { display: none; }
  .fleet .wide-only .check-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .wide-only { display: none; }
  .fleet th:nth-child(2), .fleet td:nth-child(2) { width: 34%; }
}
@media (max-width: 600px) {
  .topbar-inner, main { width: calc(100% - 24px); }
  .header-status { gap: 9px; text-align: right; font-size: .8rem; flex-wrap: wrap; justify-content: end; }
  .topbar-inner { padding-block: 6px; }
  .brand { font-size: 1.05rem; gap: 7px; }
  .brand svg { width: 23px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > div:nth-child(3) { border-left: 0; }
  .summary > div:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 4px; }
  .panel-heading { align-items: start; flex-direction: column; }
  .toolbar { width: 100%; gap: 7px; }
  .search, .search input { width: 100%; }
  .filters button { padding-inline: 8px; }
  .fleet .host-toggle { min-height: 38px; }
  .fleet td.host-detail { padding: 5px 12px; }
  .check-list li { grid-template-columns: 1fr auto; gap: 2px 8px; }
  .check-list li > time { font-size: .8rem; justify-self: end; }
  .check-list li > span { font-size: .8rem; }
  .incidents { min-width: 490px; }
}
