:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #d9e1ec;
  --text: #152033;
  --muted: #607086;
  --green: #12805c;
  --green-bg: #e7f6ee;
  --red: #b42318;
  --red-bg: #fff0ee;
  --amber: #a15c07;
  --amber-bg: #fff7e6;
  --blue: #2657c1;
  --shadow: 0 18px 50px rgba(21, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 52px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.18;
  font-weight: 760;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.refresh-button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #b9c6d8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.refresh-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.summary-item {
  min-height: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.summary-item strong {
  font-size: 24px;
  line-height: 1.2;
}

.status-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 6px var(--amber-bg);
}

.status-card.ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 6px var(--green-bg);
}

.status-card.down .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 6px var(--red-bg);
}

.status-main {
  min-width: 0;
}

.status-title {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 740;
}

.status-url {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.status-url:hover {
  color: var(--blue);
}

.status-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge-ok {
  background: var(--green-bg);
  color: var(--green);
}

.badge-down {
  background: var(--red-bg);
  color: var(--red);
}

.badge-muted {
  background: var(--amber-bg);
  color: var(--amber);
}

.latency {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 24px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 26px;
  }

  .summary,
  .status-grid,
  .status-grid.compact {
    grid-template-columns: 1fr;
  }

  .status-card {
    grid-template-columns: auto 1fr;
  }

  .status-side {
    grid-column: 1 / -1;
    justify-items: start;
    margin-left: 28px;
  }
}
