:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #eef1f9;
  background: #101319;
  font-synthesis: none;
  --card: #191e28;
  --border: #30384a;
  --muted: #aeb8cb;
  --accent: #c3d4ff;
  --green: #a0e6bc;
  --amber: #f6d191;
  --red: #ffadad;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.topbar { min-height: 68px; padding: 12px max(24px, calc((100% - 1050px) / 2)); border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: center; justify-content: space-between; background: #141820; }
.brand { display: flex; gap: 11px; align-items: center; color: inherit; font-weight: 700; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 9px; background: #b8ccff; color: #15274b; }
.brand-secondary, .muted, .card p, dialog p { color: var(--muted); }
main { max-width: 1098px; margin: auto; padding: 40px 24px 80px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.35rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #b6ceff; outline-offset: 4px; }
button, input { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
.button, .primary, .danger, .quiet { color: inherit; border-radius: 9px; border: 1px solid var(--border); background: #222939; padding: 9px 14px; font-weight: 650; }
.button:hover { background: #2c354b; }
.primary { color: #101e40; background: #b8ccff; border-color: #b8ccff; }
.primary:hover { background: #d4e0ff; }
.quiet { padding: 7px 9px; border-color: transparent; background: transparent; color: var(--muted); font-size: .875rem; }
.danger { color: var(--red); border-color: #6e3b46; background: #35212a; }
.danger:hover { background: #482932; }
.card, dialog { border: 1px solid var(--border); background: var(--card); border-radius: 15px; padding: 24px; }
.login { max-width: 440px; margin: 50px auto 0; }
.login p, .page-head p { margin-top: 8px; }
.login form { margin-top: 26px; display: grid; gap: 12px; }
input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 11px; color: inherit; background: #101319; }
.feedback { color: var(--amber); }
.feedback:empty { display: none; }
#notice { margin: 14px 0; }
.page-head, .app-head, .service-row, .actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
nav { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
nav a { border-radius: 8px; color: var(--muted); padding: 9px 13px; font-weight: 650; font-size: .9375rem; }
nav a[aria-current=page] { color: #e2ebff; background: #263656; text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.summary-card { display: block; color: inherit; }
.summary-card:hover { border-color: #6f82aa; text-decoration: none; }
.app-head { justify-content: flex-start; gap: 14px; }
.app-head > div:nth-child(2) { flex: 1; }
.app-head h2 { margin-bottom: 5px; }
.mark { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #263451; color: #d7e3ff; font-size: .82rem; font-weight: 800; }
.badge { white-space: nowrap; font-size: .8125rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: var(--muted); background: #293140; }
.badge.good { color: var(--green); background: #20382e; }
.badge.bad { color: var(--red); background: #462c34; }
.badge.warn { color: var(--amber); background: #3d3327; }
.detail { display: grid; gap: 14px; }
.detail h3 { margin-bottom: 14px; }
.service-row { border-top: 1px solid var(--border); padding: 12px 0; }
.service-row:last-child { padding-bottom: 0; }
.service-row span:last-child { text-align: right; }
.meta { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.detail .actions { margin-top: 16px; gap: 16px; justify-content: flex-start; flex-wrap: wrap; }
.log-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
dialog { color: inherit; width: min(440px, calc(100% - 32px)); }
dialog::backdrop { background: #0a0d14bf; }
dialog p { margin: 10px 0 22px; }
dialog .actions { justify-content: flex-end; }
@media (max-width: 700px) {
  main { padding: 28px 16px 48px; }
  .topbar { padding-inline: 16px; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  nav a { padding: 8px 10px; }
}
@media (max-width: 415px) {
  .app-head { flex-wrap: wrap; }
  .app-head > div:nth-child(2) { flex-basis: 70%; }
}
