:root {
  --up: #2fd47a;
  --partial: #f4b740;
  --down: #ff5a5f;
  --maint: #8f9cc4;
  --none: rgba(143, 156, 196, 0.18);
}

.status-page { align-items: stretch; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 10px 6px 4px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { color: var(--text); }
.back:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.status-title {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Общий статус */
.overall {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
  font-size: 1.0625rem;
}
.overall__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--maint); }
.overall--up { border-color: rgba(47, 212, 122, 0.45); }
.overall--up .overall__dot { background: var(--up); box-shadow: 0 0 12px var(--up); }
.overall--partial { border-color: rgba(244, 183, 64, 0.5); }
.overall--partial .overall__dot { background: var(--partial); box-shadow: 0 0 12px var(--partial); }
.overall--down { border-color: rgba(255, 90, 95, 0.55); }
.overall--down .overall__dot { background: var(--down); box-shadow: 0 0 12px var(--down); }
.overall--loading .overall__dot { animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: .35; } }

/* Серверы */
.nodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.node {
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.node__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.node__flag { font-size: 1.375rem; line-height: 1; }
.node__name { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }

.badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  background: rgba(143, 156, 196, 0.15);
  color: var(--maint);
}
.badge--up { background: rgba(47, 212, 122, 0.14); color: var(--up); }
.badge--down { background: rgba(255, 90, 95, 0.15); color: var(--down); }

.node__bars {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  height: 28px;
}

.bar { display: block; border-radius: 3px; background: var(--none); }
.bar--up { background: var(--up); }
.bar--partial { background: var(--partial); }
.bar--down { background: var(--down); }
.bar--none { background: var(--none); }

.node__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: .8125rem;
}
.node__uptime { margin: -4px 0 10px; color: var(--muted); font-size: .875rem; }
.node__uptime b { color: var(--text); font-weight: 700; }

/* Низ */
.status-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .8125rem;
  text-align: center;
}
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend .bar { width: 10px; height: 10px; border-radius: 2px; }

.empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 359px) {
  .node { padding: 12px 12px 10px; }
  .node__bars { gap: 2px; height: 24px; }
  .node__foot { font-size: .75rem; }
}
