:root {
  --ink: #17324d;
  --teal: #0f6b6d;
  --paper: #f8fafb;
  --line: #d5dee6;
  --sand: #fbf3e3;
  --danger: #9b2c2c;
  --ok: #276749;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
.wrap { max-width: 520px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.wrap:has(.admin-wrap) { max-width: 720px; }
.admin-wrap { width: 100%; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.brand { color: var(--teal); font-weight: 700; text-decoration: none; }
.top-right { color: #5a7085; }
.nav { color: var(--teal); }
.user { word-break: break-all; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.35rem 1.25rem 1.5rem;
}
h1 { font-size: 1.35rem; margin: 0 0 0.75rem; }
.lead { color: #2a4663; margin: 0 0 1.1rem; font-size: 0.98rem; }
label { display: block; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; margin: 0.85rem 0 0.35rem; }
input[type="email"], input[type="password"], input[type="text"], textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
textarea {
  font-family: var(--sans);
  font-size: 0.92rem;
  resize: vertical;
  min-height: 8rem;
  line-height: 1.45;
}
button, .btn {
  font-family: var(--sans);
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary { background: #5a7085; }
button.danger { background: var(--danger); }
.actions { margin-top: 1.15rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.flash {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.flash.error { background: #fde8e8; color: var(--danger); }
.flash.ok { background: #e6ffed; color: var(--ok); }
.hint { font-size: 0.88rem; color: #5a7085; margin-top: 0.35rem; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.9rem; margin-top: 0.75rem; }
th, td { text-align: left; padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: #5a7085; font-weight: 600; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--sand);
  color: var(--ink);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}
form.inline { display: inline; }
.admin-wrap { max-width: 720px; }
@media (min-width: 760px) {
  .admin-page .wrap { max-width: 720px; }
}
