:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --sidebar: #111827;
  --sidebar-text: #e5e7eb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d9dee7;
  --accent: #2563eb;
  --ok-bg: #e8f7ee;
  --ok-text: #166534;
  --muted-bg: #eef0f4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.layout {
  min-height: 100vh;
  display: flex;
}
.public-layout {
  display: block;
}
.sidebar {
  position: sticky;
  top: 0;
  width: 232px;
  height: 100vh;
  padding: 22px 18px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
}
.brand {
  color: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  margin-bottom: 24px;
}
.side-nav {
  display: grid;
  gap: 6px;
}
.side-nav a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 6px;
}
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-user {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: #cbd5e1;
  overflow-wrap: anywhere;
}
.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px;
}
.public {
  max-width: 640px;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
h1, h2 {
  margin: 0 0 10px;
  line-height: 1.2;
}
p { color: var(--muted); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.narrow {
  margin: 64px auto;
}
button, .button, input, select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  background: #fff;
  color: var(--text);
}
button, .button {
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.disabled {
  color: var(--muted);
  cursor: default;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
}
.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inline input {
  min-width: 280px;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.actions form, .sidebar-user form {
  margin: 0;
}
.notice {
  border: 1px solid #b8d4ff;
  background: #eef5ff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.badge.muted {
  background: var(--muted-bg);
  color: var(--muted);
}
.muted-text {
  color: var(--muted);
  font-size: 12px;
}
.log {
  overflow: auto;
  max-height: 420px;
  background: #101820;
  color: #d8e3f2;
  padding: 14px;
  border-radius: 6px;
}
code, pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
@media (max-width: 820px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }
  .page {
    padding: 18px;
  }
  .page-title {
    display: block;
  }
}
