/*
 * Admin. A working tool rather than a designed page: dense, scannable, and
 * honest about numbers. Shares the palette so it doesn't feel like a different
 * product, but drops the ceremonial type for something that reads at a glance.
 */

.page--admin {
  display: block;
  background: #f4f2ec;
  color: var(--ink);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
  line-height: 1.45;
  padding: 0;
}

.admin { max-width: 76rem; margin: 0 auto; padding: clamp(14px, 3vw, 28px); }

.admin__header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--green);
  margin-bottom: 22px;
}

.admin__header h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.admin__header nav { display: flex; gap: 16px; font-size: 0.92rem; }
.admin__header nav a { color: var(--ink-soft); text-decoration: none; }
.admin__header nav a:hover, .admin__header nav a.is-current { color: var(--green); text-decoration: underline; text-underline-offset: 0.3em; }

.panel { background: #fff; border: 1px solid #e2ded2; padding: clamp(14px, 3vw, 24px); margin-bottom: 20px; }

.panel h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.7em;
}

.panel__note { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1em; text-wrap: pretty; }

/* --------------------------------------------------------------- headcount */

.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.count { border: 1px solid #e2ded2; padding: 14px; }
.count h3 { font-family: var(--display); font-weight: 400; font-size: 1rem; margin-bottom: 0.2em; }

.count__range {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.3em;
}

.count__detail { font-size: 0.86rem; }
.count__detail > div { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.count__detail dt { color: var(--ink-soft); }
.count__detail dd { font-variant-numeric: tabular-nums; }

.count__bands { margin-top: 0.7em; padding-top: 0.6em; border-top: 1px dashed #e2ded2; font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 10px; }
.count__bands span { color: var(--ink-soft); }

/* ---------------------------------------------------------------- statuses */

.statuses { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.statuses li { display: flex; align-items: center; gap: 8px; }
.statuses strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.status { font-size: 0.78rem; padding: 0.18em 0.6em; border: 1px solid #d8d2c4; color: var(--ink-soft); white-space: nowrap; }
.status--answered { border-color: #2f6b4f; color: #2f6b4f; background: #eef6f1; }
.status--partially-answered { border-color: #9a6b1f; color: #9a6b1f; background: #fdf5e7; }
.status--awaiting-reply { border-color: #8a6d3b; color: #8a6d3b; }
.status--not-yet-invited { border-color: #b0a99a; color: #8d8578; }

.wave { font-size: 0.72rem; padding: 0.15em 0.5em; border: 1px solid #c9c2b2; color: var(--ink-soft); }
.wave--a { border-color: var(--green); color: var(--green); }

/* ------------------------------------------------------------------ tables */

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
  text-align: left;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid #e2ded2;
  padding: 6px 10px 6px 0;
}
.table td { padding: 7px 10px 7px 0; border-bottom: 1px solid #f0ece2; vertical-align: top; }
.table tr:hover td { background: #faf8f3; }
.table a { color: var(--green); }

.muted { color: var(--ink-soft); font-size: 0.86rem; }
.yes { color: #2f6b4f; }
.no { color: #8a2b2b; }

.link-chip { font-size: 0.8rem; border: 1px solid #d8d2c4; padding: 0.1em 0.5em; text-decoration: none; }
.link-chip:hover { border-color: var(--green); }

.filters { display: flex; gap: 12px; margin-bottom: 14px; font-size: 0.9rem; }
.filters a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.filters a.is-current { color: var(--green); border-bottom-color: var(--green); }

/* -------------------------------------------------------------- household */

.guest-row { border: 1px solid #e2ded2; padding: 12px 14px; margin-bottom: 10px; }
.guest-row h3 { font-family: var(--display); font-weight: 400; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }

.tag { font-size: 0.7rem; padding: 0.12em 0.5em; border: 1px solid #d8d2c4; color: var(--ink-soft); }
.tag--cat { border-color: var(--green); color: var(--green); }

.mini { list-style: none; margin-top: 0.6em; font-size: 0.88rem; }
.mini li { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; border-bottom: 1px dotted #ece7db; }
.mini--answers { margin-top: 0.5em; padding-top: 0.4em; border-top: 1px dashed #e2ded2; }

.resp { font-size: 0.8rem; }
.resp--accepted { color: #2f6b4f; }
.resp--declined { color: #8a2b2b; }
.resp--pending  { color: var(--ink-soft); }

.subhead { font-family: var(--display); font-weight: 400; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin: 1.4em 0 0.5em; }

@media (max-width: 640px) {
  .table { font-size: 0.85rem; }
  .table th:nth-child(5), .table td:nth-child(5),
  .table th:nth-child(6), .table td:nth-child(6) { display: none; }
}

/* ------------------------------------------------------------------- forms */

.form { max-width: 62rem; }

.form__group { border: 1px solid #e2ded2; padding: clamp(12px, 2.5vw, 20px); margin-bottom: 18px; }

.form__group legend {
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  padding: 0 0.5em;
}

.form__hint { color: var(--ink-soft); font-size: 0.86rem; margin-bottom: 0.9em; text-wrap: pretty; }

.form__row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.form__row--checks { align-items: flex-start; gap: 22px; }

.form__field { flex: 1 1 150px; display: flex; flex-direction: column; }
.form__field--wide { flex: 2 1 240px; }
.form__field > span { font-size: 0.84rem; color: var(--ink-soft); margin-bottom: 0.3em; }
.form__field > span em { font-style: normal; opacity: 0.75; font-size: 0.92em; }

.form input[type="text"], .form input[type="email"], .form input[type="tel"],
.form input[type="number"], .form select, .form textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.45em 0.6em;
  border: 1px solid #d8d2c4;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.form input:focus, .form select:focus { outline: 2px solid var(--green); outline-offset: -1px; }

.form__checks { display: flex; flex-direction: column; gap: 4px; }
.form__checks-label { font-size: 0.84rem; color: var(--ink-soft); margin-bottom: 0.2em; }

.check { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; white-space: nowrap; }
.check input { accent-color: var(--green); }
.check--danger { align-self: flex-end; color: #8a2b2b; }

.guest-fields { border: 1px solid #ece7db; background: #fcfbf7; padding: 12px; margin-bottom: 10px; }

.form__actions { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.button--small { font-size: 0.74rem; padding: 0.6em 1.3em; }

.notice { padding: 0.8em 1em; margin-bottom: 1.2em; font-size: 0.92rem; }
.notice--alert { background: #fdf2f2; border: 1px solid #e4bcbc; color: #8a2b2b; }
.notice--alert ul { margin: 0.4em 0 0 1.2em; }
.notice--notice { background: #eef6f1; border: 1px solid #b8d7c4; color: #2f6b4f; }

.contact-line { font-size: 0.86rem; color: var(--ink-soft); }
.contact-line strong { color: var(--ink); font-weight: normal; }
.warn { color: #8a2b2b; }

.panel__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 0.6em; }
.panel__actions > div { display: flex; gap: 8px; align-items: center; }
.panel__actions form { display: inline; }
.panel__actions .subhead { margin: 1.4em 0 0; }

.actions-cell { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.actions-cell form { display: inline; }

.nav-signout button, button.nav-signout {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.92rem; color: var(--ink-soft);
}
.nav-signout button:hover, button.nav-signout:hover { color: var(--green); text-decoration: underline; text-underline-offset: 0.3em; }
.admin__header nav form { display: inline; }
