:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --text: #172033;
  --muted: #647084;
  --line: #d9e0ea;
  --box: #ffffff;
  --green: #16823a;
  --yellow: #ad7400;
  --red: #c52b2f;
  --gray: #7b8494;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 17px;
}

p {
  color: var(--muted);
  margin-top: 6px;
}

button, input, select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

button {
  background: #1c5fba;
  color: white;
  border-color: #1c5fba;
  padding: 0 16px;
  cursor: pointer;
}

input, select {
  background: white;
  color: var(--text);
  padding: 0 10px;
  width: 100%;
}

code {
  display: block;
  overflow: auto;
  padding: 12px;
  background: #101828;
  color: white;
  border-radius: 6px;
  white-space: nowrap;
}

.hidden {
  display: none;
}

.login {
  max-width: 420px;
  margin: 15vh auto 0;
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.login form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.band, .box {
  background: var(--box);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

.install {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

form.box {
  display: grid;
  gap: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.check input {
  width: 18px;
  height: 18px;
}

.topology ul {
  list-style: none;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.topology > ul {
  padding-left: 0;
  border-left: none;
}

.node-line, .edge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.node-name {
  font-weight: 650;
}

.edge-label {
  color: var(--muted);
}

.edges {
  display: grid;
  gap: 10px;
}

.edge-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.badge {
  min-width: 76px;
  text-align: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 13px;
  color: white;
}

.healthy { background: var(--green); }
.degraded { background: var(--yellow); }
.down { background: var(--red); }
.unknown { background: var(--gray); }

.small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

@media (max-width: 760px) {
  main {
    padding: 14px;
  }

  .grid, .install {
    grid-template-columns: 1fr;
  }

  .topbar, .node-line, .edge-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
