:root {
  --aether-ink: #f2f1ee;
  --aether-stratum: #0e1014;
  --aether-strata: #14171d;
  --aether-vapor: #8a8e97;
  --aether-hairline: #1f232b;
  --aether-positive: #7ce0b0;
  --aether-warning: #ffb84a;
  --aether-negative: #ff4f64;
  --aether-maintenance: #7c9cff;
  --aether-grad: linear-gradient(90deg, #4ed8ff 0%, #ff4fa3 52%, #ff8a2a 100%);
  --aether-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --page-bg: #080a0e;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(20, 23, 29, 0.86), rgba(8, 10, 14, 0.98) 360px),
    var(--page-bg);
  color: var(--aether-ink);
  font-family:
    "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.shell {
  width: min(1840px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: 22px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
  min-height: 76px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
}

h1 {
  margin: 0;
  color: var(--aether-ink);
  font-size: clamp(1.7rem, 2.1vw, 2.7rem);
  font-weight: 720;
  line-height: 1.06;
}

#page-description {
  max-width: 980px;
  margin: 8px 0 0;
  color: var(--aether-vapor);
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-line;
}

.status-summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  min-height: 42px;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: var(--aether-stratum);
  color: var(--aether-ink);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.78),
    0 2px 6px rgba(0, 0, 0, 0.45);
}

#overall-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-summary::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--aether-grad);
  content: "";
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--aether-warning);
  box-shadow: 0 0 0 4px rgba(255, 184, 74, 0.16);
}

.status-dot.up {
  background: var(--aether-positive);
  box-shadow: 0 0 0 4px rgba(124, 224, 176, 0.18);
}

.status-dot.down {
  background: var(--aether-negative);
  box-shadow: 0 0 0 4px rgba(255, 79, 100, 0.16);
}

.status-dot.maintenance {
  background: var(--aether-maintenance);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.16);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: block;
  max-width: 100%;
  min-width: 0;
  padding: 14px 0 10px;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(12px);
}

.category-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.aether-prism-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 15px;
  border: 1px solid var(--aether-ink);
  border-radius: 4px;
  background: var(--aether-ink);
  color: var(--page-bg);
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms var(--aether-ease), opacity 160ms var(--aether-ease);
}

.aether-prism-btn::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--aether-grad);
  content: "";
  transition: height 120ms var(--aether-ease);
}

.aether-prism-btn:hover {
  transform: translateY(-1px);
}

.aether-prism-btn:hover::after,
.aether-prism-btn.active::after {
  height: 4px;
}

.aether-prism-btn:active {
  transform: translateY(0);
}

.aether-prism-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--page-bg),
    0 0 0 3px #ff4fa3;
}

.aether-prism-btn:not(.active) {
  opacity: 0.72;
}

.aether-prism-btn__label {
  display: block;
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.aether-prism-btn__icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  stroke-width: 1.5;
  transition: transform 220ms var(--aether-ease);
}

.aether-prism-btn:hover .aether-prism-btn__icon {
  transform: translateX(3px);
}

.aether-query {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  color: var(--aether-ink);
}

.aether-query__label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aether-vapor);
}

.aether-query__control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 14px;
}

.aether-query__control::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--aether-hairline);
  content: "";
  transition:
    background 220ms var(--aether-ease),
    height 120ms var(--aether-ease);
}

.aether-query__control:focus-within::after {
  height: 2px;
  background: var(--aether-grad);
}

.aether-query__icon {
  flex-shrink: 0;
  color: var(--aether-vapor);
  stroke-width: 1.5;
  transition: color 220ms var(--aether-ease);
}

.aether-query__control:focus-within .aether-query__icon {
  color: var(--aether-ink);
}

.aether-query__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--aether-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.aether-query__input::placeholder {
  color: var(--aether-vapor);
  opacity: 1;
}

.aether-query__kbd {
  flex-shrink: 0;
  padding: 3px 7px 2px;
  border: 1px solid var(--aether-hairline);
  border-radius: 3px;
  background: transparent;
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.aether-query__hint {
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(110px, 1fr));
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  margin: 8px 0 18px;
  align-items: stretch;
}

.metrics .aether-query {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: var(--aether-stratum);
  justify-content: center;
}

.metric {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: var(--aether-stratum);
}

.metric-value {
  display: block;
  color: var(--aether-ink);
  font-size: 1.55rem;
  font-weight: 760;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.metric-value.up {
  color: var(--aether-positive);
}

.metric-value.down {
  color: var(--aether-negative);
}

.metric-value.pending {
  color: var(--aether-warning);
}

.alert {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 79, 100, 0.55);
  border-radius: 6px;
  background: rgba(255, 79, 100, 0.1);
  color: #ffd6dc;
}

.groups {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
}

.group {
  max-width: 100%;
  min-width: 0;
  scroll-margin-top: 92px;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--aether-hairline);
}

.group-title {
  margin: 0;
  color: var(--aether-ink);
  font-size: 1.03rem;
  font-weight: 680;
}

.group-count {
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.aether-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  min-height: 154px;
  padding: 16px 14px 13px 16px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: #101622;
  color: var(--aether-ink);
  overflow: visible;
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.72),
    0 2px 6px rgba(0, 0, 0, 0.45);
}

.aether-toast__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--aether-grad);
}

.aether-toast.down .aether-toast__ribbon {
  background: linear-gradient(90deg, #ff4f64, #ff8a2a);
}

.aether-toast.pending .aether-toast__ribbon {
  background: linear-gradient(90deg, #ffb84a, #ff8a2a);
}

.aether-toast.maintenance .aether-toast__ribbon {
  background: linear-gradient(90deg, #7c9cff, #4ed8ff);
}

.aether-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--aether-hairline);
  border-radius: 4px;
  background: var(--aether-strata);
  color: var(--aether-ink);
}

.aether-toast__icon svg {
  stroke-width: 1.5;
}

.aether-toast__body {
  display: grid;
  grid-template-rows: auto minmax(20px, auto) 39px;
  min-width: 0;
  row-gap: 8px;
}

.aether-toast__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.aether-toast__title {
  margin: 0;
  min-width: 0;
  color: var(--aether-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.aether-toast__title em {
  margin-left: 2px;
  font-family: "Instrument Serif", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
}

.aether-toast__uptime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--aether-positive);
  color: #07120d;
  font-weight: 780;
  white-space: nowrap;
}

.aether-toast__uptime.down {
  background: var(--aether-negative);
  color: #190508;
}

.aether-toast__uptime.pending {
  background: var(--aether-warning);
  color: #1b1104;
}

.aether-toast__text {
  position: relative;
  z-index: 2;
  margin: 0;
  min-height: 17px;
  color: var(--aether-vapor);
  font-size: 12px;
  line-height: 1.35;
}

.aether-toast__status {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.aether-toast__text strong {
  color: var(--aether-positive);
  font-weight: 650;
}

.aether-toast.down .aether-toast__text strong {
  color: var(--aether-negative);
}

.aether-toast.pending .aether-toast__text strong {
  color: var(--aether-warning);
}

.aether-toast.maintenance .aether-toast__text strong {
  color: var(--aether-maintenance);
}

.aether-toast__timeline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 20px 12px;
  gap: 7px;
  min-width: 0;
  margin-top: 0;
}

.aether-toast__bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(24, minmax(4px, 1fr));
  gap: 5px;
  align-items: end;
  width: 100%;
  height: 20px;
  min-width: 0;
  overflow: visible;
}

.aether-toast__slot {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  min-width: 4px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #222936;
  box-shadow: inset 0 0 0 1px rgba(82, 92, 109, 0.28);
  opacity: 1;
  overflow: hidden;
  cursor: help;
  line-height: 0;
}

.aether-toast__bar-fill {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
}

.aether-toast__bar-fill.up {
  background: #62e796;
}

.aether-toast__bar-fill.down {
  background: #ff4f64;
}

.aether-toast__bar-fill.pending {
  background: #ffb84a;
}

.aether-toast__bar-fill.maintenance {
  background: #7c9cff;
}

.aether-toast__slot.is-empty {
  background: #202632;
  box-shadow: inset 0 0 0 1px rgba(82, 92, 109, 0.22);
}

.aether-toast__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.aether-toast__meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.aether-tip-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 20px;
  min-width: 0;
  color: var(--aether-ink);
}

.aether-tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  z-index: 20;
  width: min(280px, calc(100vw - 32px));
  padding: 16px 18px 14px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: var(--aether-stratum);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.45);
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition:
    opacity 220ms var(--aether-ease),
    transform 220ms var(--aether-ease);
}

.aether-tip::before {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--aether-hairline);
  border-bottom: 1px solid var(--aether-hairline);
  background: var(--aether-stratum);
  content: "";
  transform: translate(-50%, -5px) rotate(45deg);
}

.aether-tip__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--aether-grad);
}

.aether-tip__label {
  display: block;
  margin-bottom: 8px;
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.aether-tip__body {
  display: block;
  margin: 0 0 12px;
  color: var(--aether-ink);
  font-size: 13.5px;
  line-height: 1.5;
}

.aether-tip__body em {
  font-family: "Instrument Serif", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
}

.aether-tip__meta {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--aether-hairline);
  color: var(--aether-vapor);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.aether-tip-wrap:hover .aether-tip,
.aether-tip-wrap:focus-within .aether-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty {
  padding: 28px;
  border: 1px solid var(--aether-hairline);
  border-radius: 6px;
  background: var(--aether-stratum);
  color: var(--aether-vapor);
  text-align: center;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 20px, 1840px);
    padding-top: 14px;
  }

  .topbar {
    flex-direction: column;
  }

  .toolbar {
    position: static;
  }

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

  .metrics .aether-query {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .aether-toast {
    grid-template-columns: 1fr;
  }

  .aether-toast__icon {
    display: none;
  }

  .aether-toast__head {
    grid-template-columns: 1fr;
  }

  .aether-toast__uptime {
    width: max-content;
  }

  .aether-toast__bars {
    gap: 4px;
  }

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