:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1e2329;
  --muted: #69717d;
  --line: #d8dde4;
  --accent: #256f5f;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  padding: 20px;
  background: #20262d;
  color: #fff;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}

nav {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
}

nav a,
.link-button {
  color: #e7ecf2;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
}

.content {
  margin-left: 220px;
  padding: 28px;
}

.page-header {
  margin-bottom: 18px;
}

h1,
h2 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

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

.metrics div,
.panel,
.notice,
.help-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.help-box {
  border-left: 4px solid var(--accent);
  margin-bottom: 16px;
}

.help-box p,
.docs p {
  max-width: 920px;
  margin: 0 0 10px;
}

.metrics span {
  display: block;
  color: var(--muted);
}

.metrics strong {
  font-size: 28px;
}

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

.stack-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  width: 260px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

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

input,
select,
button,
textarea {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
}

button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

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

summary {
  cursor: pointer;
  color: var(--accent);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.document-text {
  white-space: pre-wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.docs {
  display: grid;
  gap: 12px;
}

.docs h2 {
  margin-top: 8px;
}

pre {
  overflow-x: auto;
}

.docs pre {
  background: #20262d;
  color: #f4f7fb;
  border-radius: 8px;
  padding: 14px;
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
}

.details dt {
  color: var(--muted);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(380px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.login-panel form {
  display: grid;
  gap: 12px;
}

code {
  word-break: break-all;
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .content {
    margin-left: 0;
    padding: 16px;
  }
}
