:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #10151d;
  color: #e7edf5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #171e28;
  --surface-raised: #1b2430;
  --border: #293443;
  --muted: #8e9bab;
  --subtle: #637183;
  --green: #4cd69a;
  --yellow: #f3bb62;
  --red: #f17679;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% -20%, rgb(44 79 105 / 18%), transparent 50%),
    #10151d;
}

a { color: inherit; text-decoration: none; }

.page-shell { width: min(1440px, 100% - 64px); margin: 0 auto; }

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #3c5269; border-radius: 9px; background: #202e3c; color: #8dc8f6; font-size: 16px; }
.brand-muted { color: #64758a; padding: 0 2px; }
.navigation { display: flex; align-items: center; gap: 5px; }
.navigation a { padding: 9px 13px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 13px; transition: background .15s, color .15s; }
.navigation a:hover, .navigation a.active { background: #202a36; color: #e7edf5; }
.navigation a.active { border-color: #2a3848; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 43px 0 28px; }
.eyebrow { margin: 0 0 9px; color: #7792ad; font: 500 10px/1.3 "DM Mono", monospace; letter-spacing: 1.7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -1.1px; line-height: 1.15; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.updated { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.updated time { margin-left: 4px; color: #c3ceda; font-family: ui-monospace, monospace; font-size: 10px; }
.updated-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgb(76 214 154 / 45%); }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.summary-card { position: relative; min-height: 126px; overflow: hidden; padding: 18px 19px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(145deg, #1a232e, #161d26); }
.summary-card::after { position: absolute; top: 0; right: 0; width: 90px; height: 90px; content: ""; opacity: .045; background: currentColor; filter: blur(35px); }
.summary-total { color: #89bde7; }
.summary-healthy { color: var(--green); }
.summary-degraded { color: var(--yellow); }
.summary-failed { color: var(--red); }
.summary-label, .summary-caption { display: block; color: var(--muted); font-size: 12px; }
.summary-value { display: block; margin: 9px 0 3px; color: #eaf0f6; font: 500 29px/1 ui-monospace, monospace; letter-spacing: -1px; }
.summary-caption { color: var(--subtle); font-size: 11px; }

.content-section { margin-top: 42px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 5px; }
h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; letter-spacing: -.4px; }
.section-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font: 11px ui-monospace, monospace; }
.text-link { color: #8ab9df; font-size: 12px; transition: color .15s; }
.text-link:hover { color: #b7dcf8; }
.text-link span { padding-left: 3px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.infrastructure-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-card { min-width: 0; padding: 16px 16px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); transition: border-color .15s, transform .15s; }
.status-card:hover { transform: translateY(-2px); border-color: #3a4a5d; }
.status-healthy { --state: var(--green); }
.status-degraded { --state: var(--yellow); }
.status-failed { --state: var(--red); }
.card-heading { display: flex; align-items: center; gap: 11px; }
.service-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid #354354; border-radius: 8px; background: #202b38; color: #b8cce0; font: 500 13px ui-monospace, monospace; }
.infrastructure-icon { color: #a9c5de; font-size: 20px; }
.card-title { min-width: 0; flex: 1; }
h3 { overflow: hidden; margin: 0 0 5px; color: #e2e9f1; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }
.status-label { display: flex; align-items: center; gap: 6px; color: var(--state); font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--state); box-shadow: 0 0 8px color-mix(in srgb, var(--state), transparent 35%); }
.card-chevron { align-self: flex-start; color: #66778a; font-size: 12px; }
.card-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 19px 0 13px; }
.card-metrics div { min-width: 0; }
.card-metrics dt { margin-bottom: 5px; color: var(--subtle); font-size: 9px; }
.card-metrics dd { overflow: hidden; margin: 0; color: #c7d1dc; font: 10px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.card-time { overflow: hidden; margin: 0; padding-top: 10px; border-top: 1px solid #242e3a; color: var(--subtle); font: 9px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }

.placeholder-panel { max-width: 620px; margin: 72px auto; padding: 34px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.placeholder-panel .text-link { display: inline-block; margin-top: 26px; }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 55px; padding: 18px 0 24px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 10px; }
.footer-note { font-family: ui-monospace, monospace; }

@media (max-width: 1000px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .page-shell { width: min(100% - 36px, 560px); }
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; padding: 18px 0 12px; }
  .navigation { width: 100%; gap: 2px; overflow-x: auto; }
  .navigation a { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .page-heading { align-items: flex-start; flex-direction: column; padding: 32px 0 22px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .summary-card { min-height: 111px; padding: 14px; }
  .content-section { margin-top: 33px; }
  .section-heading { align-items: flex-start; gap: 12px; }
}

@media (max-width: 430px) {
  .card-grid, .infrastructure-grid { grid-template-columns: 1fr; }
  .summary-label { font-size: 11px; }
  .updated { white-space: normal; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
