:root {
  --bg: #f3f7fb;
  --bg-2: #edf3f9;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --sidebar: rgba(248, 251, 255, 0.88);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #64748b;
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --yellow: #d97706;
  --yellow-soft: #fff7ed;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.06), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  min-height: 100vh;
}

.page-shell {
  min-height: 100vh;
  padding: 28px;
}

.content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.topbar {
  margin-bottom: 18px;
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; }
@keyframes heroCheckPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.10), 0 0 0 0 rgba(34, 197, 94, 0.22);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 14px 34px rgba(22, 163, 74, 0.14), 0 0 0 14px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.10), 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes heroCheckGlyph {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

.hero-status-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fbfdff 100%);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 34px 30px 24px;
  margin-bottom: 18px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.hero-status-bg {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}
.hero-status-bg-left {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.04) 45%, transparent 70%);
}
.hero-status-bg-right {
  width: 220px;
  height: 220px;
  right: -100px;
  top: -95px;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.14) 0%, rgba(148, 163, 184, 0.07) 42%, transparent 72%);
}
.hero-status-icon,
.hero-status-title,
.hero-status-pill,
.hero-status-stats {
  position: relative;
  z-index: 1;
}
.hero-status-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  border: 4px solid rgba(22, 163, 74, 0.18);
  color: var(--green);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.10);
  animation: heroCheckPulse 2.2s ease-in-out infinite, heroCheckGlyph 2.2s ease-in-out infinite;
  transform-origin: center;
}
.hero-status-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}
.hero-status-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-stat-value {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.hero-stat-uptime {
  color: var(--green);
}
.hero-stat-label {
  font-size: 13px;
  color: var(--muted);
}
.hero-status-card.is-ok .hero-status-icon {
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.18);
}
.hero-status-card.is-issue .hero-status-icon {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.18);
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.10);
  animation: none;
}
.hero-status-card.is-issue .hero-stat-uptime {
  color: var(--red);
}
.hero-updated {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 13px;
}

.group-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}
.group-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255,255,255,0.45));
}
.group-title { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.group-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.status-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.45);
}
.status-table th, .status-table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
.status-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}
.status-table tbody tr {
  transition: background .15s ease;
}
.status-table tbody tr:hover { background: rgba(37, 99, 235, 0.018); }
.status-table tbody tr:last-child td { border-bottom: 0; }

@keyframes statusDotPulseGreen {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.22), 0 0 0 5px rgba(22, 163, 74, 0.10);
  }
  60% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0), 0 0 0 5px rgba(22, 163, 74, 0.10);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0), 0 0 0 5px rgba(22, 163, 74, 0.10);
  }
}

@keyframes statusDotPulseRed {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.22), 0 0 0 5px rgba(220, 38, 38, 0.10);
  }
  60% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0), 0 0 0 5px rgba(220, 38, 38, 0.10);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0), 0 0 0 5px rgba(220, 38, 38, 0.10);
  }
}

.name-cell { display: flex; align-items: center; gap: 12px; }
.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.10);
  flex: 0 0 auto;
  transform-origin: center;
}
.status-dot.up {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.10);
  animation: statusDotPulseGreen 1.9s ease-in-out infinite;
}
.status-dot.down {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.10);
  animation: statusDotPulseRed 1.9s ease-in-out infinite;
}
.server-name { font-weight: 800; letter-spacing: -0.01em; }
.server-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

@keyframes statusBadgeGlowGreen {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.00);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.12);
  }
}

@keyframes statusBadgeGlowRed {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.00);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.14);
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
  will-change: transform, box-shadow;
}
.status-badge.up {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(22, 163, 74, 0.16);
  animation: statusBadgeGlowGreen 2.2s ease-in-out infinite;
}
.status-badge.down {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(220, 38, 38, 0.16);
  animation: statusBadgeGlowRed 1.8s ease-in-out infinite;
}
.status-badge.pending {
  color: var(--yellow);
  background: var(--yellow-soft);
  border-color: rgba(217, 119, 6, 0.16);
}
.host-cell, .response-cell, .uptime-cell, .checked-cell { color: #0f172a; }

.history-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-bar {
  --history-point-width: 4px;
  display: grid;
  grid-template-columns: repeat(60, var(--history-point-width));
  grid-auto-columns: var(--history-point-width);
  gap: 3px;
  width: max-content;
  min-width: 0;
}
.history-point {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: var(--history-point-width);
  min-width: var(--history-point-width);
  max-width: var(--history-point-width);
  height: 22px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.22);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.history-point:hover,
.history-point:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
  outline: none;
}
.history-point.up { background: linear-gradient(180deg, #22c55e, #16a34a); }
.history-point.down { background: linear-gradient(180deg, #f87171, #dc2626); }
.history-point.pending { background: rgba(245, 158, 11, 0.45); }
.history-detail {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
  line-height: 1.35;
}

.muted { color: var(--muted); }

@media (max-width: 860px) {
  .page-shell { padding: 18px; }
  .hero-status-card {
    padding: 24px 20px 20px;
  }
}

@media (max-width: 720px) {
  body { background: linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%); }
  .page-shell { padding: 14px; }
  h1 { font-size: 26px; }
  .subtitle { font-size: 14px; }
  .hero-status-card,
  .group-card {
    border-radius: 18px;
  }
  .hero-status-card {
    padding: 22px 16px 18px;
    gap: 12px;
  }
  .hero-status-icon {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }
  .hero-status-title {
    font-size: 20px;
  }
  .hero-status-pill {
    min-height: 38px;
    padding: 9px 16px;
    font-size: 13px;
  }
  .hero-status-stats {
    gap: 8px;
  }
  .hero-stat-value {
    font-size: 21px;
  }
  .hero-stat-label {
    font-size: 12px;
  }
  .group-header {
    padding: 16px;
  }
  .table-wrap {
    overflow: visible;
    padding: 12px;
  }
  .status-table,
  .status-table thead,
  .status-table tbody,
  .status-table tr,
  .status-table td {
    display: block;
    width: 100%;
  }
  .status-table thead {
    display: none;
  }
  .status-table tbody {
    display: grid;
    gap: 12px;
  }
  .status-table tr {
    background: var(--panel-solid);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  }
  .status-table td {
    border: 0;
    padding: 0;
  }
  .status-table td + td {
    margin-top: 10px;
  }
  .status-table td:first-child {
    margin-bottom: 4px;
  }
  .status-table td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    line-height: 1.2;
    color: var(--muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
  }
  .name-cell {
    align-items: center;
  }
  .server-name {
    line-height: 1.2;
  }
  .status-badge {
    width: fit-content;
  }
  .history-wrap {
    gap: 6px;
    width: 100%;
  }
  .history-bar {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(60, minmax(0, 1fr));
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .history-point {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 14px;
    border-radius: 3px;
  }
  .history-detail {
    font-size: 11px;
  }
}
