:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1f2633;
  --muted: #667089;
  --brand: #1576bc;
  --brand-dark: #0f5f99;
  --line: #d8deea;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Titillium Web", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ecf0f7, var(--bg));
}
.page { padding: 24px; }
.card {
  max-width: 980px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
h1 { margin: 0 0 4px; }
h2 { margin: 22px 0 10px; font-size: 1.2rem; }
.muted { margin: 0; color: var(--muted); }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.grid { display: grid; gap: 12px; margin-top: 10px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-row { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 12px; margin-top: 12px; }
.relative-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.relative-card legend { padding: 0 8px; color: var(--muted); font-weight: 600; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #eef3fb; color: #1c4e7d; border: 1px solid #cddaf0; }
.btn.secondary:hover { background: #e3ecfa; }
.btn.danger { background: #fff2f0; color: var(--danger); border: 1px solid #f5c3bf; }
.inline-end { display: flex; align-items: end; }
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
  max-height: 360px;
}
@media (max-width: 900px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .section-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
