:root {
  color-scheme: dark;
  --bg: #030712;
  --surface: rgba(10, 16, 31, 0.82);
  --surface-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(56, 189, 248, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #f59e0b;
  --red: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.10), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(34, 211, 238, 0.22), transparent 28rem),
    radial-gradient(circle at 10% 18%, rgba(59, 130, 246, 0.14), transparent 26rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.20), rgba(34, 211, 238, 0.12));
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 7, 18, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #031019;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-pill,
.panel-tag,
.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.64);
  font-size: 0.8rem;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  padding: 34px 0 18px;
}

.hero-copy,
.signal-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  position: relative;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.20);
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.sub {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.signal-card {
  position: relative;
  min-height: 300px;
  padding: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.signal-grid {
  position: absolute;
  inset: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  opacity: 0.82;
}

.signal-grid span {
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(56, 189, 248, 0.08));
}

.signal-grid span:nth-child(3n) {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.72));
}

.signal-core {
  position: relative;
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 50%;
  background: rgba(3, 7, 18, 0.82);
  box-shadow: 0 0 70px rgba(34, 211, 238, 0.30);
}

.signal-core b,
.signal-core small {
  grid-column: 1;
  grid-row: 1;
}

.signal-core b {
  transform: translateY(-8px);
  color: var(--green);
  font-size: 1.4rem;
}

.signal-core small {
  transform: translateY(22px);
  color: var(--muted);
}

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

.metric-card {
  padding: 18px;
  background: var(--surface-strong);
}

.metric-label,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 2.2rem;
  letter-spacing: -0.05em;
}

.metric-card.accent {
  border-color: rgba(34, 211, 238, 0.36);
}

.metric-card.danger {
  border-color: rgba(251, 113, 133, 0.26);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
}

.events-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-tag.warning {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.34);
}

.stack,
.timeline {
  display: grid;
  gap: 10px;
}

.item,
.event {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
}

.item::before,
.event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.72);
}

.status-dot.offline,
.status-dot.crashed,
.status-dot.failed {
  background: var(--red);
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.72);
}

.status-dot.unknown {
  background: var(--dim);
  box-shadow: none;
}

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

.critical,
.high,
.error {
  color: var(--red);
}

.medium,
.warning {
  color: var(--amber);
}

.info,
.debug {
  color: var(--blue);
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.34);
}

.event-message {
  color: #cbd5e1;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .hero,
  .workspace,
  .metrics {
    grid-template-columns: 1fr;
  }

  .signal-card {
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
  }

  .topbar,
  .top-actions,
  .row,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  button {
    width: 100%;
  }

  h1 {
    font-size: 2.4rem;
  }
}
