:root {
  --bg: #0b1220;
  --panel: #0f1a30;
  --panel2: #0b162b;
  --text: #e6edf6;
  --muted: #9fb0c6;
  --border: rgba(255, 255, 255, 0.08);
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --unk: #64748b;
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    sans-serif;
  background:
    radial-gradient(
      900px 480px at 30% 0%,
      rgba(56, 189, 248, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 480px at 80% 10%,
      rgba(34, 197, 94, 0.12),
      transparent 65%
    ),
    var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 26, 48, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .mark {
  font-size: 20px;
}
.brand .title {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.brand .subtitle {
  color: var(--muted);
  font-size: 12px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.pill {
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(11, 22, 43, 0.7);
  font-size: 12px;
  color: var(--muted);
}
.pill strong {
  color: var(--text);
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 26, 48, 0.7);
  padding: 16px;
  overflow: hidden;
}
.card h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.overall {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 22, 43, 0.65);
}
.overall .state {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--unk);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.16);
}
.dot.up {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.dot.degraded {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}
.dot.down {
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}
.overall .label {
  font-size: 18px;
  font-weight: 900;
}
.overall .small {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-line;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
input,
select,
button {
  font: inherit;
  color: var(--text);
  background: rgba(11, 22, 43, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 10px;
}
input::placeholder {
  color: rgba(159, 176, 198, 0.65);
}
button {
  cursor: pointer;
}
button.primary {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.table th,
.table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: left;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(11, 22, 43, 0.7);
  font-size: 12px;
}
.status-badge .mini {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--unk);
}
.status-badge.up .mini {
  background: var(--ok);
}
.status-badge.degraded .mini {
  background: var(--warn);
}
.status-badge.down .mini {
  background: var(--bad);
}
.status-badge.unknown .mini {
  background: var(--unk);
}

.mono {
  font-family: var(--mono);
}
.muted {
  color: var(--muted);
}

.comp-name {
  font-weight: 800;
}

.details {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(11, 22, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}
.details.is-open {
  display: block;
}
.details pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  color: #cfe0f5;
}

.hidden {
  display: none !important;
}

.controls.controls--top {
  margin-top: 14px;
}

.pill-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.w-90 {
  width: 90px;
}

.w-100 {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.minw-220 {
  min-width: 220px;
}

.minw-200 {
  min-width: 200px;
}

.mt-14 {
  margin-top: 14px;
}

.mt-6 {
  margin-top: 6px;
}

.footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.link-item {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 22, 43, 0.6);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.link-item:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
}
