/* Uptime 360. Light only, by choice. */
:root {
  --page: #f5f6f8;
  --surface: #ffffff;
  --sunken: #f7f8fa;
  --ink: #121722;
  --ink-2: #39414e;
  --muted: #5f6977;
  --faint: #8b93a0;
  --line: #e2e5ea;
  --line-soft: #eef0f3;
  --accent: #c8171e;          /* Uptime red: brand only, not status */

  --red: #b42318;   --red-bg: #fdedeb;   --red-line: #f2c2bc;   --red-bar: #d63a2f;
  --amber: #8a5300; --amber-bg: #fcf3e2; --amber-line: #ebcf98; --amber-bar: #e3a21a;
  --green: #1f7a4d; --green-bg: #eaf5ee; --green-line: #c4e2cf; --green-bar: #cfe5d8;
  --blue: #2347b5;  --blue-bg: #eef2fd;  --blue-line: #cbd6f5;
  --grey-bg: #f0f1f4;

  --radius: 12px;
  --radius-sm: 8px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
code, .mono { font-family: var(--mono); font-size: .9em; }
h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.link { color: var(--blue); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---- Top bar ---------------------------------------------------------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.brand .sep { width: 1px; height: 18px; background: var(--line); }
.brand .area { font-weight: 500; color: var(--muted); }
.tabs-nav { display: flex; gap: 22px; height: 100%; }
.tabs-nav a { display: flex; align-items: center; gap: 6px; height: 100%; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-nav a:hover { color: var(--ink); }
.tabs-nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.count-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--red-bg); color: var(--red); }
.spacer { flex: 1; }
.live { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.live .pulse { width: 7px; height: 7px; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 3px #2fa36b22; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grey-bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; }
.avatar:hover { border-color: var(--faint); color: var(--ink); }

main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.page-head .stamp { color: var(--muted); font-size: 12.5px; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--ink); }
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-head .note { color: var(--muted); font-size: 12.5px; }
.section-head .grow { flex: 1; }

/* ---- Cards ------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.card.tight { padding: 16px 18px; }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); }
.eyebrow.caps { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.big { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-top: 6px; }
.big.red { color: var(--red); }
.under { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.top-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .top-grid { grid-template-columns: 1fr 1fr; } .top-grid .health { grid-column: 1 / -1; } }
@media (max-width: 640px) { .top-grid { grid-template-columns: 1fr; } }
.health .sentence { font-size: 19px; font-weight: 500; letter-spacing: -.01em; line-height: 1.4; margin: 10px 0 16px; max-width: 34em; }
.bar { display: flex; gap: 4px; height: 6px; }
.bar span { border-radius: 99px; min-width: 6px; }
.bar .r { background: var(--red-bar); } .bar .y { background: var(--amber-bar); }
.bar .g { background: var(--green-bar); } .bar .n { background: var(--line); }
.legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { font-weight: 600; }
.support-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.support-list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }

/* Notice strip (new vulnerability) */
.notice { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 16px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; }
.notice .grow { flex: 1; }

/* ---- Status pills and tags --------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid; white-space: nowrap; }
.pill.red { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.pill.yellow { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.pill.green { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.pill.grey, .pill.unknown { color: var(--muted); background: var(--grey-bg); border-color: var(--line); }
.pill.blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-line); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; white-space: nowrap; }
.status.red { color: var(--red); } .status.yellow { color: var(--amber); }
.status.green { color: var(--ink-2); } .status.grey, .status.unknown { color: var(--muted); }
.status svg, .pill svg { flex: none; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; border: 1px solid; line-height: 16px; vertical-align: 1px; white-space: nowrap; }
.tag.red { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.tag.yellow { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.tag.grey { color: var(--muted); background: var(--grey-bg); border-color: var(--line); }
.tag.blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-line); }
.text-red { color: var(--red); } .text-yellow { color: var(--amber); } .text-blue { color: var(--blue); } .text-green { color: var(--green); }
.sev { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Runtime glyph + label */
.rt { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rt svg { flex: none; }

/* ---- Needs-attention cards -------------------------------------------- */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.att { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 0; display: flex; flex-direction: column; }
.att:hover { border-color: #cfd4dc; }
.att .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.att .stack { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.att .stack .dot-sep { color: var(--faint); }
.att .who { font-size: 12px; color: var(--muted); margin-top: 12px; }
.att h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 3px 0 6px; line-height: 1.35; }
.att .detail { color: var(--ink-2); font-size: 13px; line-height: 1.5; flex: 1; overflow-wrap: anywhere; }
.att .foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-soft); margin-top: 14px; padding: 10px 0 12px; font-size: 12px; color: var(--muted); }

/* ---- Tables ----------------------------------------------------------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sunken); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td .l2 { color: var(--muted); font-size: 12px; margin-top: 1px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.link-row { cursor: pointer; }
tr.link-row:hover td { background: #fafbfc; }
.row-link { font-weight: 500; }
.empty { padding: 36px 24px; text-align: center; color: var(--muted); }
.table-foot { color: var(--muted); font-size: 12px; margin-top: 10px; max-width: 70em; }

/* Filters */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--grey-bg); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.seg button:hover { color: var(--ink); border: 0; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #1217221a; }
.seg button .c { color: var(--faint); margin-left: 3px; font-weight: 400; }
.search { position: relative; }
.search input { padding-left: 30px; width: 260px; max-width: 100%; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }

/* ---- Forms and buttons ------------------------------------------------- */
label { display: block; font-size: 12.5px; font-weight: 500; margin: 14px 0 5px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--blue-bg); border-color: var(--blue); }
.btn, button {
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 6px 12px; white-space: nowrap;
}
.btn:hover, button:hover { border-color: #c4cad3; color: var(--ink); }
.btn.primary, button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover, button.primary:hover { background: #262d3a; color: #fff; }
button.danger { color: var(--red); }
button.danger:hover { border-color: var(--red-line); background: var(--red-bg); }
button.plain { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 400; }
button.plain:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.inline { display: inline; margin: 0; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 13px; border: 1px solid; }
.alert.error { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.alert.ok { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.alert.info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }

/* Key and code */
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.keybox code { background: var(--sunken); border: 1px solid var(--line); padding: 7px 11px; border-radius: var(--radius-sm); font-size: 13px; word-break: break-all; }
pre { background: var(--sunken); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 11px 13px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.6; margin: 6px 0 14px; }
.step { font-size: 13px; color: var(--ink-2); }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabbar button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 7px 12px; margin-bottom: -1px; }
.tabbar button:hover { border: 0; border-bottom: 2px solid var(--line); }
.tabbar button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel[hidden] { display: none; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '›'; display: inline-block; transition: transform .15s; font-size: 15px; line-height: 1; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: var(--ink); }

/* System / instance detail */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
.fact .v { font-size: 16px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.fact .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0; font-size: 13px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; }
.adv { list-style: none; margin: 8px 0 0; padding: 0; }
.adv li { padding: 6px 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.adv li:first-child { border-top: 0; }
.adv a { font-family: var(--mono); font-size: 12px; color: var(--blue); }

/* Login */
.login { max-width: 380px; margin: 14vh auto 0; padding: 0 16px; }
.login .brand { justify-content: center; margin-bottom: 22px; font-size: 18px; }

/* Report */
.report-sys { margin-top: 14px; }
.report-sys .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.report-inst { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.report-inst:first-of-type { border-top: 0; }
.report-inst ul { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 13px; }
.report-inst li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }

.footer { max-width: 1240px; margin: 0 auto; padding: 18px 24px 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .topbar-inner { gap: 16px; padding: 0 16px; }
  .brand .sep, .brand .area, .live { display: none; }
  main { padding: 22px 16px 40px; }
  .footer { padding: 18px 16px 32px; }
}

@media print {
  .topbar, .no-print, .footer { display: none !important; }
  html, body { background: #fff; }
  main { padding: 0; max-width: none; }
}
