:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #20242a;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b45309;
  --bad: #b91c1c;
  --good: #047857;
  --soft-bad: #fef2f2;
  --soft-good: #ecfdf5;
  --soft-warn: #fff7ed;
  --soft-info: #eff6ff;
}

* {
  box-sizing: border-box;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #111827;
  color: #f9fafb;
  padding: 22px 18px;
}

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

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

.brand small {
  display: block;
  color: #b8c0cc;
  margin-top: 2px;
}

nav {
  display: grid;
  gap: 4px;
}

nav a {
  color: #d7dce5;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 14px;
}

nav a.active,
nav a:hover {
  background: #243041;
  color: #ffffff;
}

.shell {
  margin-left: 248px;
  min-height: 100vh;
  padding: 24px;
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.top-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 760px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.pill.good {
  color: var(--good);
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.pill.warn {
  color: var(--warn);
  border-color: #fed7aa;
  background: var(--soft-warn);
}

.pill.bad {
  color: var(--bad);
  border-color: #fecaca;
  background: var(--soft-bad);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

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

.main-panel {
  min-height: calc(100vh - 128px);
}

.activity {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

button,
.button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
  font: inherit;
}

button:hover,
.button:hover {
  border-color: #9aa4b2;
}

button.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.stack {
  display: grid;
  gap: 14px;
}

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

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

.warning-card {
  border-color: #fed7aa;
  background: var(--soft-warn);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 650;
}

.badge.good {
  color: var(--good);
  border-color: #a7f3d0;
  background: var(--soft-good);
}

.badge.warn {
  color: var(--warn);
  border-color: #fed7aa;
  background: var(--soft-warn);
}

.badge.bad {
  color: var(--bad);
  border-color: #fecaca;
  background: var(--soft-bad);
}

.empty-state {
  border: 1px dashed #b8c1ce;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.empty-state p {
  margin-bottom: 0;
}

.mini-log {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.mini-log p {
  margin: 4px 0;
}

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

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

.small-text {
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

th {
  background: #f9fafb;
  color: #475467;
  font-weight: 650;
}

.notice {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 12px;
}

.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.skeleton {
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.skeleton.short {
  height: 36px;
  width: 60%;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
}

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

  .shell {
    margin-left: 0;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .activity {
    position: static;
  }

  .topbar {
    display: grid;
  }
}
