:root {
  --nav: #153b66;
  --accent: #176b5b;
  --line: #d8dee6;
  --ink: #182230;
  --muted: #667085;
  --bg: #f4f6f8;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", sans-serif;
}
a { color: #175cd3; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--nav); color: white; padding: 18px 14px; }
.brand { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.nav a {
  display: block; color: #e9f0f8; padding: 8px 10px;
  border-radius: 4px; margin-bottom: 2px;
}
.nav a:hover { background: rgba(255,255,255,.1); }
.admin-meta { margin-top: 22px; color: #c5d2e0; font-size: 12px; }
.content { padding: 24px; overflow: auto; }
.toolbar { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.card {
  background: white; border: 1px solid var(--line);
  border-radius: 6px; padding: 16px; margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.metric strong { display: block; font-size: 24px; }
.muted { color: var(--muted); }
.error { color: var(--danger); background: #fef3f2; padding: 10px; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 9px; vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #f8fafc; }
label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
input, select, textarea {
  border: 1px solid #b8c2ce; border-radius: 4px;
  padding: 7px 9px; background: white;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; border: 1px solid #b8c2ce; border-radius: 4px;
  padding: 6px 11px; background: white; color: var(--ink); cursor: pointer;
}
.btn-primary { color: white; background: var(--accent); border-color: var(--accent); }
.btn-danger { color: white; background: var(--danger); border-color: var(--danger); }
.inline { display: inline; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login { width: min(380px, calc(100vw - 32px)); }
.stack > * + * { margin-top: 10px; }
pre { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid { grid-template-columns: 1fr; }
}
