* { box-sizing: border-box; }
body {
  margin: 0;
  color: #171717;
  background: #fff;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: #174ea6; text-decoration: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid #e8e8e8;
}
.brand { color: #111; font-weight: 700; }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.page { max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px); }
.narrow { max-width: 520px; margin: 0 auto; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 18px; }
h2 { font-size: 20px; margin: 0 0 8px; }
.heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card, .row {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.status { display: inline-block; padding: 4px 8px; border-radius: 6px; background: #edf7ed; color: #1f6f35; font-size: 14px; }
.status.muted { background: #f2f2f2; color: #555; }
.button, button {
  display: inline-block;
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.form { display: grid; gap: 14px; }
.form p { margin: 0; display: grid; gap: 6px; }
input, textarea, select {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; }
.message { margin-bottom: 16px; padding: 12px 14px; border-radius: 7px; background: #f2f2f2; }
.message.error { background: #fff0f0; color: #8a1f1f; }
.message.success { background: #edf7ed; color: #1f6f35; }
.filters { display: grid; grid-template-columns: 1fr 180px 180px auto; gap: 10px; margin-bottom: 18px; }
.registry { display: grid; gap: 10px; }
.row summary { cursor: pointer; }
.row summary span { display: block; color: #666; margin-top: 4px; }
.row-body { margin-top: 14px; border-top: 1px solid #eee; padding-top: 14px; }
.row-header, .case-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.row-header span, .case-row span { display: block; color: #666; margin-top: 4px; }
.panel { margin-bottom: 30px; }
.case-list { display: grid; gap: 10px; }
.case-row { border: 1px solid #e5e5e5; border-radius: 8px; padding: 16px; }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form label { display: grid; gap: 6px; min-width: 180px; }
.contract { max-width: 760px; margin: 0 auto; }
.contract-body { white-space: normal; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 24px 0; margin: 18px 0; }
.signature { padding: 14px; border-radius: 7px; background: #edf7ed; }
.contract-list { display: grid; gap: 12px; margin-top: 14px; }
.contract-summary { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid #eee; }
.review { border: 1px solid #eee; border-radius: 8px; padding: 14px; }
.checkline { display: flex; gap: 10px; align-items: center; }
.checkline input { width: auto; }
.muted { color: #666; }
@media (max-width: 720px) {
  .topbar, .heading-row { display: block; }
  .topbar nav { margin-top: 10px; }
  .filters { grid-template-columns: 1fr; }
  .row-header, .case-row { display: grid; }
  h1 { font-size: 26px; }
}
