:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1b2030;
  --line: #262d3b;
  --text: #e9edf6;
  --muted: #8b95a9;
  --faint: #5f6a7f;
  --accent: #9db2ff;
  --accent-2: #7f8ff0;
  --ok: #7ee2a8;
  --warn: #f5b95f;
  --bad: #ff7f8f;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(700px 380px at 12% -12%, rgba(157, 178, 255, .13), transparent 68%),
    radial-gradient(600px 340px at 105% 0%, rgba(127, 143, 240, .08), transparent 62%),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(32px, 9vh, 84px) 16px 32px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}

.mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(157, 178, 255, .1);
}

.live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
}

.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}

.dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(126, 226, 168, .1);
}

.dot.bad {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(255, 127, 143, .1);
}

.dot.wait {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 185, 95, .1);
}

.dot.ok,
.dot.wait {
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}

.services {
  overflow: hidden;
}

.service {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}

.service:last-child {
  border-bottom: 0;
}

.service:hover {
  background: rgba(255, 255, 255, .025);
}

.service:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.service-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(157, 178, 255, .08);
  border: 1px solid rgba(157, 178, 255, .18);
  color: var(--accent);
}

.service-icon .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--panel);
  box-sizing: content-box;
  box-shadow: none;
  animation: none;
}

.service-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-main {
  min-width: 0;
}

.service-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.service-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}

.mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini .dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
  animation: none;
}

.arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--faint);
  transition: transform .15s ease, color .15s ease;
}

.arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service:hover .arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.system {
  margin-top: 12px;
  padding: 15px 18px 13px;
}

.system-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.system-label {
  color: var(--muted);
  font-size: 12px;
}

.bar {
  flex: 1;
  height: 6px;
  background: #202635;
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ok);
  border-radius: inherit;
  transition: width .4s ease, background .25s ease;
}

.bar > span.warn {
  background: var(--warn);
}

.bar > span.bad {
  background: var(--bad);
}

.system-value {
  min-width: 84px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.system-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.system-meta b {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 560px) {
  .shell {
    padding-top: calc(30px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .service {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 13px;
  }

  .service-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .service-icon svg {
    width: 18px;
    height: 18px;
  }

  .arrow {
    display: none;
  }

  .service-name {
    font-size: 14px;
  }

  .system {
    padding: 13px;
  }

  .system-row {
    gap: 9px;
  }

  .system-value {
    min-width: 72px;
    font-size: 11px;
  }

  .live {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot,
  .arrow,
  .bar > span {
    animation: none;
    transition: none;
  }
}
