:root {
  --bg:         #070a1a;
  --bg-soft:    #0e1230;
  --bg-card:    #12163a;
  --bg-elev:    #191d47;
  --border:     rgba(139, 92, 246, 0.16);
  --border-hi:  rgba(139, 92, 246, 0.32);

  --text:       #eef1fb;
  --text-dim:   #a3a9c9;
  --text-mute:  #6f759a;

  --purple:     #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.55);

  --op:         #22c55e;
  --op-bar:     #2ee671;
  --degraded:   #f59e0b;
  --partial:    #f97316;
  --major:      #ef4444;
  --maint:      #3b82f6;
  --nodata:     #2b2f4c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

/* Cosmic backdrop — top-right radial + faint pinpoint stars scattered around */
.starfield {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 92% 8%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 8% 96%, rgba(59, 130, 246, 0.10), transparent 65%),
    radial-gradient(1px 1px at 15% 12%,  rgba(255,255,255,0.55), transparent 100%),
    radial-gradient(1px 1px at 78% 18%,  rgba(255,255,255,0.7),  transparent 100%),
    radial-gradient(1.5px 1.5px at 30% 40%, rgba(255,255,255,0.5), transparent 100%),
    radial-gradient(1px 1px at 88% 55%,  rgba(255,255,255,0.7),  transparent 100%),
    radial-gradient(1px 1px at 45% 78%,  rgba(255,255,255,0.5),  transparent 100%),
    radial-gradient(1.5px 1.5px at 66% 88%, rgba(255,255,255,0.6), transparent 100%);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 22px 64px;
}

/* ------- Header ------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand-mascot {
  display: block;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(59,130,246,0.20));
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 22px -6px rgba(139, 92, 246, 0.5);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
}
.brand-host {
  font-size: 13px;
  color: var(--text-mute);
}

/* ------- Banner ------- */
.banner {
  border-radius: 16px;
  border: 1px solid;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 0% 50%, currentColor, transparent 70%);
  opacity: 0.10;
  pointer-events: none;
}
.banner-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 700; color: #0b0f14;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.04), 0 8px 30px -6px currentColor;
}
.banner-body { flex: 1; }
.banner-title { font-size: 22px; font-weight: 600; }
.banner-sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; }
.banner-sub strong { color: var(--text); font-weight: 600; }
.banner-shield {
  font-size: 32px;
  color: currentColor;
  opacity: 0.35;
  padding-right: 8px;
  flex-shrink: 0;
}

.banner.op       { color: var(--op);       background: rgba(34,197,94,.06);  border-color: rgba(34,197,94,.30); }
.banner.op .banner-title { color: #86efac; }
.banner.op .banner-icon  { background: var(--op); }

.banner.degraded { color: var(--degraded); background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.30); }
.banner.degraded .banner-title { color: #fcd34d; }
.banner.degraded .banner-icon  { background: var(--degraded); }

.banner.partial  { color: var(--partial);  background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.30); }
.banner.partial .banner-title { color: #fdba74; }
.banner.partial .banner-icon  { background: var(--partial); }

.banner.major    { color: var(--major);    background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.30); }
.banner.major .banner-title { color: #fca5a5; }
.banner.major .banner-icon  { background: var(--major); }

.banner.maint    { color: var(--maint);    background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.30); }
.banner.maint .banner-title { color: #93c5fd; }
.banner.maint .banner-icon  { background: var(--maint); }

.banner.nodata   { background: var(--bg-soft); border-color: var(--border); color: var(--text); }
.banner.nodata .banner-title { color: var(--text); }
.banner.nodata .banner-icon  { background: var(--nodata); color: var(--text-dim); }

/* ------- Stats bar ------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
}
.stat-mascot {
  width: 40px; height: 40px;
  border-radius: 10px;
  padding: 5px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.tint-uptime     { background: rgba(139, 92, 246, 0.20); border-color: rgba(139, 92, 246, 0.35); }
.tint-incidents  { background: rgba(96, 165, 250, 0.20); border-color: rgba(96, 165, 250, 0.35); }
.tint-components { background: rgba(45, 212, 191, 0.20); border-color: rgba(45, 212, 191, 0.35); }
.tint-status     { background: rgba(52, 211, 153, 0.20); border-color: rgba(52, 211, 153, 0.35); }

.stat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-mute); }
.stat-value { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.stat-value--sm { font-size: 15px; color: #86efac; font-weight: 500; }

@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ------- Groups ------- */
.groups { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }

.group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.group-title {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600;
  color: var(--text);
  text-transform: uppercase; letter-spacing: .08em;
}
.group-mascot {
  width: 26px; height: 26px;
  border-radius: 8px;
  padding: 3px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid var(--border);
}
.group-count { font-size: 12px; color: var(--text-mute); }

.component { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.component:last-child { border-bottom: none; }
.component-head {
  display: flex; align-items: center;
  gap: 14px; margin-bottom: 10px;
}
.component-mascot {
  width: 36px; height: 36px;
  border-radius: 10px;
  padding: 4px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.component-text { flex: 1; min-width: 0; }
.component-name { color: var(--text); font-weight: 500; }
.component-desc { color: var(--text-mute); font-size: 12px; margin-top: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.pill.op        { color: #86efac; background: rgba(34,197,94,.10);  border-color: rgba(34,197,94,.35); }
.pill.degraded  { color: #fcd34d; background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.35); }
.pill.partial   { color: #fdba74; background: rgba(249,115,22,.10); border-color: rgba(249,115,22,.35); }
.pill.major     { color: #fca5a5; background: rgba(239,68,68,.10);  border-color: rgba(239,68,68,.35); }
.pill.maint     { color: #93c5fd; background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.35); }
.pill.nodata    { color: var(--text-dim); background: var(--bg-soft); border-color: var(--border); }

/* ------- 90-day uptime bar ------- */
.bar { display: flex; align-items: stretch; gap: 3px; height: 34px; }
.bar-day {
  flex: 1;
  min-width: 3px;
  border-radius: 3px;
  transition: filter .15s, transform .15s;
}
.bar-day:hover { filter: brightness(1.35); transform: scaleY(1.05); }
.bar-day.op       { background: var(--op-bar); }
.bar-day.degraded { background: var(--degraded); }
.bar-day.partial  { background: var(--partial); }
.bar-day.major    { background: var(--major); }
.bar-day.maint    { background: var(--maint); }
.bar-day.nodata   { background: var(--nodata); }

.bar-caption {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-mute);
}
.bar-caption .center { color: var(--text-dim); }

/* ------- Footer ------- */
.footer {
  margin-top: 40px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  color: var(--text-mute);
  font-size: 13px;
}
.footer-mascot {
  width: 22px; height: 22px;
  border-radius: 7px;
  padding: 3px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid var(--border);
}
.footer-tagline { color: var(--text-dim); }
