:root {
  --paper: #f4efe4;
  --ink: #162433;
  --soft: #4a5a6a;
  --line: #d9cfc0;
  --navy: #1b3654;
  --brass: #b08a3e;
  --seal: #8f2d2d;
  --ok: #2f6b4f;
  --wait: #b26a1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4efe4;
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
}
header, footer, main { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; }
.brand small { color: var(--soft); letter-spacing: .18em; text-transform: uppercase; font-size: 11px; }
.stamp {
  width: 42px; height: 42px; border: 2px solid var(--seal); border-radius: 50%;
  display: grid; place-items: center; color: var(--seal); font-size: 10px; font-weight: 700;
}
nav { display: flex; gap: 14px; font-size: 14px; }
nav a { color: var(--soft); text-decoration: none; }
main { flex: 1; padding: 28px 0 48px; }
h1 { font-size: 42px; line-height: 1.1; color: var(--navy); margin: 8px 0 12px; }
.kicker { letter-spacing: .24em; text-transform: uppercase; font-size: 12px; color: var(--brass); }
.lead, p { color: var(--soft); line-height: 1.6; }
.lead a, article a, footer a, .contact-line a, .hint a { color: var(--navy); font-weight: 600; }
.contact-line { margin: 0 0 8px; font-size: 14px; }
.search, .filters, .narrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
input, select {
  height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; min-width: 220px; background: #fffdf8;
}
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; font-weight: 600;
}
.btn.alt, .actions button[value="available"], .actions button[value="hidden"] {
  background: transparent; color: var(--navy); border: 1px solid var(--navy);
}
.grid-4, .grid-2, .stats { display: grid; gap: 12px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 28px; }
.grid-2, .stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
article, .card {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px;
}
.card { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 12px 0; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.badge.ok { background: #e7f3ec; color: var(--ok); }
.badge.wait { background: #f8edd9; color: var(--wait); }
.table-wrap { overflow: auto; background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.actions { display: flex; gap: 8px; margin: 12px 0; }
footer { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: 12px; color: var(--soft); }
.messages { background: #e7f3ec; padding: 10px 14px; border-radius: 12px; }
.card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 280px; text-align: right; }
.hint { margin: 0; font-size: 13px; }
.setting-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
