:root {
  --ink: #1d2433;
  --muted: #5d6679;
  --line: #d9dee8;
  --paper: #f5f7fb;
  --card: #ffffff;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --ok: #17663a;
  --ok-bg: #e6f4ec;
  --err: #9b291d;
  --err-bg: #fbe9e6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

main.card,
main.wrap {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 16px;
}

main.wrap { max-width: 880px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

h1 { font-size: 26px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 16px 0 8px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin: 12px 0;
}

input,
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0;
  padding: 12px;
}

.app-row {
  display: grid;
  grid-template-columns: 24px 1fr 180px;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.app-row select { margin: 0; }
.app-row label { margin: 0; font-weight: 400; }
.app-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }

button {
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  margin-top: 8px;
}

button:hover { filter: brightness(0.94); }

button.secondary {
  background: #fff;
  color: var(--accent);
  margin: 0 0 0 8px;
}

:focus-visible {
  outline: 3px solid #7aa7ff;
  outline-offset: 2px;
}

.notice {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
}

.notice.ok { color: var(--ok); background: var(--ok-bg); }
.notice.error { color: var(--err); background: var(--err-bg); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.person {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.person h3 { margin-top: 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.actions select { width: auto; margin: 0; }
.actions button { margin: 0; }

@media (max-width: 600px) {
  .app-row { grid-template-columns: 24px 1fr; }
  .app-row select { grid-column: 2; }
  main.card, main.wrap { margin: 24px auto; }
}
