:root {
  color-scheme: light;
  --ink: #20242a;
  --muted: #667085;
  --line: #d9dee7;
  --panel: #ffffff;
  --surface: #f4f6f8;
  --accent: #b3261e;
  --accent-strong: #7f1d1d;
  --ok: #18794e;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  min-height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
label,
.status,
.toolbar p {
  color: var(--muted);
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

input,
select,
button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.secondary-button:hover {
  background: #edf0f4;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.pill {
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8ebef;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.pill.online {
  background: #dff3e8;
  color: var(--ok);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  padding: 16px;
  min-height: 112px;
  display: grid;
  align-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 28px;
  line-height: 1.1;
}

.metric small {
  color: var(--muted);
}

.panels {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.list {
  display: grid;
  gap: 8px;
}

.error-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.empty {
  color: var(--muted);
}

pre {
  overflow: auto;
  min-height: 180px;
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: #15181d;
  color: #e6edf3;
}

.login-page {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(420px, 100%);
}

.login-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 820px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .toolbar,
  .panels {
    grid-template-columns: 1fr;
    display: grid;
  }
}