:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #16202a;
  --muted: #667085;
  --line: #d8dee6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --warn: #b54708;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; }
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: 0; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a, .nav button {
  border: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
}
.nav a:hover, .nav button:hover { background: #eef2f6; color: var(--ink); }
.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 22px; font-weight: 700; margin-top: 6px; }
.stack { display: grid; gap: 12px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f9fafb; }
tr:last-child td { border-bottom: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); }
.btn.warn { color: var(--warn); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: white;
}
textarea { min-height: 180px; resize: vertical; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; align-items: end; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #eef2f6;
  color: var(--muted);
}
.login {
  max-width: 360px;
  margin: 12vh auto;
}
.error { color: var(--danger); }
.sample { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
@media (max-width: 820px) {
  .topbar { height: auto; align-items: start; flex-direction: column; padding: 12px; }
  .nav { flex-wrap: wrap; }
  .container { padding: 16px; }
  .grid, .form-grid { grid-template-columns: 1fr; }
}
