:root {
  --bg: #09111b;
  --bg-deep: #050a12;
  --panel: rgba(10, 25, 39, 0.76);
  --panel-border: rgba(185, 205, 225, 0.14);
  --panel-strong: #102436;
  --text: #eef6ff;
  --muted: #9fb3c9;
  --line: rgba(211, 228, 245, 0.12);
  --accent: #79d5c2;
  --accent-deep: #103b3f;
  --alert: #ffb86b;
  --success: #7ce38b;
  --shadow: 0 24px 60px rgba(2, 10, 18, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(74, 145, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(121, 213, 194, 0.14), transparent 26%),
    linear-gradient(180deg, #0b1725 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.4;
}

body::before {
  top: 3rem;
  left: -8rem;
  background: rgba(60, 162, 255, 0.25);
}

body::after {
  bottom: -8rem;
  right: -8rem;
  background: rgba(121, 213, 194, 0.2);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dff7ef;
}

.page-shell {
  position: relative;
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.topbar {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(7, 18, 30, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(121, 213, 194, 0.9), rgba(67, 131, 237, 0.9));
  color: #062133;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.topnav,
.account-chip,
.action-row,
.panel-header,
.service-card-header,
.mini-card,
.mini-card-right,
.kv-list div,
.service-meta {
  display: flex;
  align-items: center;
}

.topnav {
  gap: 0.5rem;
}

.topnav a,
.account-chip a {
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.topnav a:hover,
.account-chip a:hover,
.topnav a.active {
  background: rgba(121, 213, 194, 0.12);
  color: var(--text);
  transform: translateY(-1px);
}

.account-chip {
  gap: 0.4rem;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.account-chip > div {
  margin-right: 0.35rem;
}

.account-chip strong,
.panel h2,
.hero h1,
.stat-card strong,
.empty-state h1,
.empty-state h2,
.empty-state h3 {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
}

.account-chip strong {
  display: block;
  font-size: 0.92rem;
}

.account-chip small {
  color: var(--muted);
  font-size: 0.75rem;
}

.content-shell {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.35rem;
}

.hero,
.panel,
.stat-card,
.notice {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.25rem;
  padding: 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 55%);
  pointer-events: none;
}

.hero.compact {
  grid-template-columns: 1fr;
}

.hero-copy h1,
.empty-state h1 {
  margin: 0.4rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
}

.hero-copy p,
.panel p,
.empty-state p,
.stat-card small,
.muted {
  color: var(--muted);
}

.hero-card,
.panel,
.stat-card {
  border-radius: var(--radius);
}

.hero-card,
.panel {
  padding: 1.35rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(121, 213, 194, 0.12);
  color: #b8fff0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kv-list {
  display: grid;
  gap: 0.8rem;
}

.kv-list div {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.kv-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stats-grid,
.grid {
  display: grid;
  gap: 1rem;
}

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

.stat-card {
  padding: 1.1rem 1.15rem;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-card strong {
  display: block;
  margin: 0.4rem 0 0.25rem;
  font-size: 2rem;
}

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

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-header,
.service-card-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2,
.hero-card h2,
.panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.stack-list,
.step-list,
.card-stack,
.stack-form {
  display: grid;
  gap: 0.85rem;
}

.stack-list,
.step-list {
  padding-left: 1.1rem;
}

.mini-card,
.empty-state,
.notice {
  border-radius: var(--radius-sm);
}

.mini-card {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mini-card strong,
.panel strong,
.hero-card strong {
  display: block;
}

.mini-card small,
.service-card p,
.service-meta,
.data-table,
.notice,
.stack-form label span {
  color: var(--muted);
}

.service-meta,
.mini-card-right {
  justify-content: space-between;
  gap: 0.75rem;
}

.service-meta {
  margin-top: 1rem;
  font-size: 0.84rem;
}

.empty-state {
  padding: 1.35rem;
  border: 1px dashed rgba(121, 213, 194, 0.22);
  background: rgba(10, 26, 38, 0.72);
}

.empty-state.wide {
  min-height: 16rem;
  display: grid;
  place-content: center;
  text-align: center;
}

.action-row {
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(121, 213, 194, 0.24);
  background: linear-gradient(135deg, rgba(121, 213, 194, 0.18), rgba(74, 145, 255, 0.2));
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(121, 213, 194, 0.44);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stack-form label {
  display: grid;
  gap: 0.42rem;
}

.stack-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 17, 28, 0.92);
  color: var(--text);
  outline: none;
}

.stack-form input:focus {
  border-color: rgba(121, 213, 194, 0.5);
  box-shadow: 0 0 0 4px rgba(121, 213, 194, 0.1);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.95rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inline-form {
  display: inline;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pill-active,
.pill-healthy,
.pill-paid,
.pill-success {
  background: rgba(124, 227, 139, 0.14);
  color: #b9ffc0;
}

.pill-degraded,
.pill-processing,
.pill-warn,
.pill-info {
  background: rgba(255, 184, 107, 0.14);
  color: #ffd298;
}

.pill-observed,
.pill-open,
.pill-neutral {
  background: rgba(121, 213, 194, 0.14);
  color: #b8fff0;
}

.pill-down,
.pill-unknown,
.pill-failed,
.pill-pending {
  background: rgba(255, 113, 113, 0.14);
  color: #ffc5c5;
}

.notice {
  padding: 1rem 1.15rem;
}

.notice.success {
  border-color: rgba(124, 227, 139, 0.28);
}

.notice.warn {
  border-color: rgba(255, 184, 107, 0.28);
}

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

.status-card p,
.event-card p {
  min-height: 2.4rem;
}

.status-banner {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
}

.status-banner strong {
  font-size: 1.3rem;
}

.status-banner.status-healthy {
  background: rgba(124, 227, 139, 0.12);
}

.status-banner.status-degraded {
  background: rgba(255, 184, 107, 0.12);
}

.status-banner.status-down,
.status-banner.status-unknown {
  background: rgba(255, 113, 113, 0.12);
}

.event-stack {
  display: grid;
  gap: 0.85rem;
}

.event-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.event-card small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .two-up,
  .three-up,
  .stats-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topnav {
    width: 100%;
    order: 3;
  }

  .account-chip {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.75rem;
  }

  .hero-copy h1,
  .empty-state h1 {
    font-size: 1.85rem;
  }

  .topbar,
  .hero,
  .panel,
  .stat-card {
    border-radius: 1.1rem;
  }
}
