@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Design language inspired by ppa.com: Poppins with light uppercase
   headings, charcoal ink on white, soft lavender-grey panels, warm taupe
   borders, and the crimson accent. */
:root {
  --bg: #f2f1f5;
  --card: #ffffff;
  --ink: #252220;
  --muted: #6f6a63;
  --line: rgba(148, 141, 127, .4);
  --panel: #edecf2;
  --accent: #a50034;
  --accent-dark: #82002a;
  --accent-soft: #f7e6ec;
  --good: #2e7d4f;
  --warn: #b07508;
  --bad: #a50034;
}

body {
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

header.site {
  background: var(--card);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 22px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
header.site h1 {
  font-size: 1.3rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .14em;
}
header.site h1 span.accent { color: var(--accent); font-weight: 700; }
header.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
header.site a:hover { color: var(--accent); }

main { max-width: 1000px; margin: 32px auto 60px; padding: 0 20px; }

/* welcome copy on the council page */
.intro {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 24px 26px;
  margin-bottom: 28px;
}
.intro h2 {
  font-size: 1.05rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 10px;
}
.intro p { font-weight: 300; font-size: .93rem; margin-bottom: 8px; }
.intro p:last-child { margin-bottom: 0; }
.intro strong { font-weight: 500; }

/* honeypot field — invisible to humans, tempting to bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.season { margin-bottom: 40px; }
.season > h2 {
  font-size: 1.3rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.card h3 { font-size: 1.02rem; font-weight: 500; margin-bottom: 2px; }
.card .subtle { color: var(--muted); font-size: .88rem; font-weight: 300; }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 2px;
  vertical-align: middle;
}
.badge.ok    { background: #e4efe8; color: var(--good); }
.badge.warn  { background: #f7ecd8; color: var(--warn); }
.badge.bad   { background: var(--accent-soft); color: var(--bad); }
.badge.info  { background: var(--panel); color: var(--muted); }

.section-label {
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 8px;
  background: var(--card);
  flex-wrap: wrap;
}
.row .names { color: var(--muted); font-size: .9rem; font-weight: 300; flex: 1; min-width: 160px; }
.row .names strong { color: var(--ink); font-weight: 500; }

/* public signup rows: aligned grid — info | status | action */
.slot-row {
  display: grid;
  grid-template-columns: 1fr auto 112px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 8px;
  background: var(--card);
}
.slot-row .title { font-weight: 500; font-size: .93rem; }
.slot-row .people { color: var(--muted); font-size: .85rem; font-weight: 300; margin-top: 2px; }
.slot-row .badge { justify-self: end; }
.slot-row button { width: 100%; }
@media (max-width: 560px) {
  .slot-row { grid-template-columns: 1fr auto; }
  .slot-row button { grid-column: 1 / -1; }
}

button {
  font-family: inherit;
  font-weight: 500;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background .15s ease, color .15s ease;
}
button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button:disabled {
  background: #d8d5cf;
  border-color: #d8d5cf;
  color: #f7f6f4;
  cursor: not-allowed;
}
button.ghost {
  background: transparent;
  color: var(--accent);
}
button.ghost:hover { background: var(--accent-soft); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.danger:hover { background: var(--accent-soft); }
button.small { padding: 4px 10px; font-size: .72rem; }

/* modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 34, 32, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 4px;
  border-top: 3px solid var(--accent);
  padding: 30px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 {
  font-size: 1.1rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.modal .subtle {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.form-field { margin-top: 16px; }
label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
  margin: 0 0 6px;
}
input, select, textarea {
  width: 100%;
  font: inherit;
  font-weight: 300;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
textarea { resize: vertical; }
label .optional { font-weight: 300; color: var(--muted); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal .modal-actions { flex-direction: column; gap: 8px; margin-top: 24px; }
.modal .modal-actions button { width: 100%; padding: 11px 14px; }

.msg { font-size: .88rem; margin-top: 10px; }
.msg.error { color: var(--bad); }
.msg.success { color: var(--good); }

.empty {
  color: var(--muted);
  font-weight: 300;
  text-align: center;
  padding: 48px 0;
  font-size: .95rem;
}

/* admin extras */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar .field { flex: 1; min-width: 150px; }
.toolbar label { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
}
td.wrap { white-space: pre-wrap; max-width: 420px; font-weight: 300; }

.slot-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabs button:not(.active):hover { background: var(--panel); color: var(--ink); }

code {
  background: var(--panel);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: .82em;
}

/* outbox table scrolls sideways instead of breaking the page */
#outbox-table { overflow-x: auto; }
#outbox-table table { min-width: 640px; }

/* mobile */
@media (max-width: 640px) {
  header.site { padding: 14px 16px; }
  header.site h1 { font-size: .98rem; letter-spacing: .1em; }
  main { margin: 18px auto 40px; padding: 0 12px; }
  .intro { padding: 18px; margin-bottom: 20px; }
  .card { padding: 16px 14px; }
  .season > h2 { font-size: 1.05rem; }
  .modal { padding: 22px 18px; }
  .toolbar { gap: 8px; }
  .toolbar .field { min-width: 120px; }
  .toolbar button { flex: 1 1 auto; }
  .slot-admin-actions button { flex: 1 1 auto; }
  .row { padding: 10px 12px; }
  .badge { font-size: .68rem; }
}
