:root {
  color-scheme: dark;
  --bg: #101820;
  --panel: #192631;
  --line: #32434f;
  --text: #edf3f5;
  --muted: #a7b9c3;
  --accent: #7ce5b6;
  --danger: #ffb0aa;
  font:
    15px/1.55 system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100dvh;
}
aside {
  border-right: 1px solid var(--line);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
a {
  color: var(--accent);
}
.brand {
  font-size: 30px;
  letter-spacing: -2px;
  font-weight: 850;
  text-decoration: none;
}
.brand span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 8px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 15px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
button:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button[aria-current="page"] {
  background: var(--accent);
  color: #10251b;
  border-color: var(--accent);
}
nav button {
  text-align: left;
}
aside > p {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}
main {
  width: 100%;
  max-width: 1450px;
  padding: 40px clamp(20px, 4vw, 64px);
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 8px 0;
}
h2 {
  font-size: 19px;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
p {
  color: var(--muted);
}
section,
.card {
  background: var(--panel);
  padding: 24px;
  border-radius: 13px;
  margin-bottom: 20px;
}
section > p:last-child {
  margin-bottom: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.value {
  font-size: 26px;
  line-height: 1.3;
  display: block;
  margin: 12px 0;
  font-weight: 650;
}
.ok {
  color: var(--accent);
}
.bad {
  color: var(--danger);
}
.unknown {
  color: var(--muted);
}
small,
time {
  color: var(--muted);
  font-size: 12px;
}
label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}
input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--bg);
  color: var(--text);
}
textarea {
  resize: vertical;
}
form {
  max-width: 680px;
}
#login {
  max-width: 550px;
  margin: 40px auto;
}
#feedback {
  min-height: 24px;
  color: var(--danger);
  overflow-wrap: anywhere;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
th {
  color: var(--muted);
  font-weight: 500;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.row button {
  max-width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}
.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.thread {
  margin-top: 20px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.badge {
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.muted {
  color: var(--muted);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
    gap: 16px;
  }
  aside > p {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  main {
    padding: 24px 18px;
  }
  h1 {
    font-size: 26px;
  }
  section,
  .card {
    padding: 18px;
  }
  aside #logout {
    align-self: flex-start;
  }
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f6f6;
    --panel: #fff;
    --line: #d3dfe0;
    --text: #172d36;
    --muted: #526a74;
    --accent: #096a47;
    --danger: #a52722;
  }
  button[aria-current="page"] {
    color: white;
  }
  .eyebrow {
    color: #096a47;
  }
}
/* Keep the navigation scroll inside its column on narrow screens. */
aside, nav { min-width: 0; }
@media (max-width: 760px) { body { grid-template-columns: minmax(0, 1fr); } nav { max-width: 100%; } }
