:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #17202a;
  --muted: #64748b;
  --line: #d8dee8;
  --primary: #0f4c81;
  --primary-dark: #0b355a;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
main { max-width: 1440px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.narrow { max-width: 420px; margin: 72px auto; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr); }
.grid.two.compact { grid-template-columns: 1fr 1fr; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 18px; margin-top: 24px; }
label { display: block; font-weight: 650; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--primary-dark); }
.secondary { background: #e9eef5; color: #17202a; }
.secondary:hover { background: #dce5ef; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 650; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef2f7; font-size: 12px; font-weight: 700; }
pre { white-space: pre-wrap; background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 12px; overflow: auto; }
.type-fields { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
@media (max-width: 1000px) { .grid.two { grid-template-columns: 1fr; } }
