:root {
  --bg: #07131d;
  --surface: rgba(8, 24, 34, 0.68);
  --surface-strong: rgba(12, 31, 44, 0.84);
  --text: #e4f0f7;
  --muted: #95b1c2;
  --ok: #3fd1a1;
  --warn: #ffd089;
  --down: #ff6c74;
  --border: rgba(135, 188, 216, 0.2);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 14% 18%, #11344a 0%, #07131d 36%, #050c13 100%);
  overflow-x: hidden;
}

h1,
h2,
h3,
.eyebrow,
.service-badge,
.metric-value {
  font-family: "Space Grotesk", sans-serif;
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 3.2rem 0 2.5rem;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
}

.orb-1 {
  width: 380px;
  height: 380px;
  top: -120px;
  right: -70px;
  background: rgba(61, 189, 232, 0.22);
  animation: drift 10s ease-in-out infinite alternate;
}

.orb-2 {
  width: 260px;
  height: 260px;
  bottom: -60px;
  left: -70px;
  background: rgba(84, 234, 174, 0.22);
  animation: drift 11.5s ease-in-out infinite alternate-reverse;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(154, 221, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 221, 241, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, black 26%, transparent 72%);
}

.hero {
  margin-bottom: 2.2rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0.35rem 0 0.3rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

.overall-status {
  margin: 0;
  font-size: 1.05rem;
  color: #b9d2e1;
}

.metrics {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
}

.metric-label {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  margin-top: 0.22rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

h2 {
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cae3ef;
  margin: 0;
}

.refresh-btn {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 0.46rem 1rem;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  transition: 120ms ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 212, 236, 0.42);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.timeline-section {
  margin-top: 1.4rem;
}

.timelines {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.timeline-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 0.95rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: fade-up 400ms ease both;
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.timeline-service {
  margin: 0;
  font-size: 1.02rem;
}

.timeline-status {
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline-bars {
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 0.44rem;
}

.timeline-bar {
  border: 0;
  height: 40px;
  border-radius: 2px;
  padding: 0;
  cursor: default;
  background: rgba(190, 232, 205, 0.8);
}

.timeline-bar[data-level="minor"] {
  background: #f2d180;
}

.timeline-bar[data-level="major"] {
  background: #f2995f;
}

.timeline-bar[data-level="critical"] {
  background: #ea5f67;
}

.timeline-bar:focus-visible {
  outline: 2px solid #d4effd;
  outline-offset: 1px;
}

.timeline-meta {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.78rem;
}

.service-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 0.95rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: fade-up 400ms ease both;
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.65rem;
}

.service-name {
  margin: 0;
  font-size: 1.08rem;
}

.service-url {
  color: #9fcde2;
  text-decoration: none;
  word-break: break-all;
  font-size: 0.85rem;
}

.service-url:hover {
  text-decoration: underline;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.badge-up {
  color: #05271b;
  background: var(--ok);
}

.badge-down {
  color: #fff;
  background: var(--down);
}

.badge-degraded {
  color: #4f3000;
  background: var(--warn);
}

.pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.78rem 0;
}

.pill {
  border: 1px solid rgba(170, 210, 228, 0.2);
  border-radius: 999px;
  font-size: 0.73rem;
  color: #cbe4f0;
  padding: 0.22rem 0.56rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.79rem;
}

.footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #9ecde0;
}

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

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

@media (max-width: 640px) {
  .app-shell {
    padding-top: 2rem;
  }

  .services,
  .metrics {
    grid-template-columns: 1fr;
  }

  .timeline-bars {
    gap: 1px;
  }

  .timeline-bar {
    height: 32px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

@keyframes drift {
  from {
    transform: translateY(0px) scale(1);
  }
  to {
    transform: translateY(30px) scale(1.08);
  }
}

@keyframes fade-up {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}
