:root {
  --ink: #1f2d2b;
  --paper: #faf8f4;
  --card: #ffffff;
  --teal: #2f5d5a;
  --teal-dark: #1e3f3d;
  --clay: #c46a4f;
  --line: #e2ddd2;
  --good: #2f7a4f;
  --bad: #b3402f;
  --muted: #6b6157;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--teal-dark); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; }
.wrap.narrow { max-width: 640px; }
header.top {
  background: var(--teal-dark);
  color: #f4f1ea;
  padding: 28px 20px 24px;
  text-align: center;
}
header.top .agency {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe0dc;
  margin-bottom: 8px;
}
header.top h1 { font-size: 24px; margin: 0 0 6px; font-weight: 700; }
header.top p { color: #d8e4e1; font-size: 14px; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  margin-top: 20px;
  box-shadow: 0 4px 14px rgba(30,63,61,0.06);
}
h2.section-h { font-size: 18px; color: var(--teal-dark); margin: 0 0 4px; }
p.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

label { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfc8ba;
  border-radius: 6px;
  font-size: 14.5px;
  font-family: inherit;
  background: #fffefb;
  margin-bottom: 12px;
}
textarea { min-height: 70px; resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

button {
  font-family: inherit;
  border: none;
  border-radius: 7px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
button.primary { background: var(--clay); color: #fff; }
button.primary:hover { background: #a8563e; }
button.secondary { background: var(--teal); color: #fff; }
button.secondary:hover { background: var(--teal-dark); }
button.ghost { background: transparent; color: var(--teal-dark); border: 1px solid var(--line); }
button.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge.active { background: #e4f2e8; color: var(--good); }
.badge.inactive { background: #f5e9e6; color: var(--bad); }
.badge.passed { background: #e4f2e8; color: var(--good); }
.badge.failed { background: #fbeee9; color: var(--bad); }
.badge.pending { background: #efe9dd; color: var(--muted); }

.tabs { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.tabs button { background: #efe9dd; color: var(--teal-dark); font-weight: 700; }
.tabs button.active { background: var(--teal-dark); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.msg { padding: 10px 14px; border-radius: 7px; font-size: 14px; margin-top: 14px; }
.msg.ok { background: #e4f2e8; color: var(--good); }
.msg.error { background: #fbeee9; color: var(--bad); }

.link-copy { display: flex; gap: 6px; align-items: center; }
.link-copy input { margin-bottom: 0; }

.checkbox-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #fffefb; }
.checkbox-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.checkbox-row input { width: auto; margin: 0; }

.section-block { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.q-block { background: #f7f4ee; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; }
