/* Admin tool for two people. Shares the site's type and palette so it feels like
   the same project, but reads as a tool rather than a page. */

:root {
  --paper:  #F1F3F6;
  --card:   #FFFFFF;
  --ink:    #1E2530;
  --muted:  #5A6472;
  --body:   #4A5361;
  --blue:   #2F6C93;
  --coral:  #D96C54;
  --rule:   rgba(30, 37, 48, 0.12);

  /* Status. Every one of these is always shown with its label beside it,
     never as colour alone. All pass AA for text on both surfaces. */
  --ok:      #2E7A55;
  --partial: #AC5029;
  --none:    #5A6472;

  --serif: 'Libre Baskerville', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.boot { padding: 60px 24px; text-align: center; color: var(--muted); }

/* ---------- Sign in ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.login-card {
  width: 100%;
  max-width: 380px;
  padding: clamp(26px, 5vw, 38px);
  background: var(--card);
  border: 1px solid var(--rule);
}

.login-mark { margin: 0 0 22px; font-family: var(--serif); font-size: 15px; letter-spacing: 0.02em; }
.login-title { margin: 0 0 22px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.login-back { display: block; margin-top: 22px; font-size: 13px; color: var(--muted); text-decoration: none; }
.login-back:hover { color: var(--coral); }

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input, .field textarea, .search {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
}

.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .search:focus { border-color: var(--blue); }

/* ---------- Chrome ---------- */

.btn {
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #33404F; }
.btn-quiet { background: transparent; border-color: var(--rule); color: var(--muted); }
.btn-quiet:hover { border-color: var(--muted); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: rgba(241, 243, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.bar-mark { font-family: var(--serif); font-size: 15px; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; }

.tab {
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--coral); }

.panel { display: none; padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 32px) 80px; max-width: 1060px; margin: 0 auto; }
.panel.is-on { display: block; }

.h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.note { margin: 0 0 20px; font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 62ch; }

.msg { margin: 14px 0; padding: 12px 14px; font-size: 14px; line-height: 1.6; border: 1px solid var(--rule); background: var(--card); }
.msg-bad { border-color: var(--partial); color: var(--partial); }
.msg-good { border-color: var(--ok); color: var(--ok); }

.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 14px;
}

.list-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { width: min(280px, 60vw); }

/* ---------- Figures ----------
   One hero figure per view, in the sans; tiles beside it. Standalone values keep
   proportional figures — tabular-nums is for the columns further down. */

.hero-figure { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.hero-value { font-size: clamp(48px, 9vw, 68px); font-weight: 600; line-height: 1; color: var(--ok); }
.hero-label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
}

.tile { padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); }
.tile-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.tile-value { display: block; font-size: 26px; font-weight: 600; line-height: 1.1; }

/* Single ratio against a limit: fill and track are steps of the one hue. */
.meter-block { margin-top: 22px; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.meter-title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.meter-count { font-size: 13px; color: var(--body); font-variant-numeric: tabular-nums; }
.meter { height: 10px; background: rgba(47, 108, 147, 0.16); overflow: hidden; }
.meter-fill { height: 100%; background: var(--blue); transition: width 300ms ease; }

/* ---------- Invitations ---------- */

.party {
  background: var(--card);
  border: 1px solid var(--rule);
  margin-bottom: 8px;
}

.party-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  padding: 14px 18px;
}

.party-name { font-family: var(--serif); font-size: 17px; }
.party-pin {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* The dot never carries the meaning by itself — the word next to it does. */
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.status-complete { color: var(--ok); }
.status-partial  { color: var(--partial); }
.status-none     { color: var(--none); }

.party-members { border-top: 1px solid var(--rule); }

.member {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(30, 37, 48, 0.06);
  font-size: 14px;
}

.member:last-child { border-bottom: 0; }
.member-name { flex: 1 1 200px; }
.member-answer { font-size: 13px; }
.answer-yes { color: var(--ok); }
.answer-no { color: var(--partial); }
.answer-none { color: var(--none); }
.member-extra { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.member-when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.allowance { padding: 10px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid rgba(30,37,48,0.06); }

/* ---------- The site editor ---------- */

.group { margin-bottom: 10px; background: var(--card); border: 1px solid var(--rule); }
.group > summary {
  padding: 14px 18px;
  font-family: var(--serif);
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::before { content: '▸ '; color: var(--muted); }
.group[open] > summary::before { content: '▾ '; }
.group-body { padding: 4px 18px 18px; border-top: 1px solid var(--rule); }

.edit-row { margin-bottom: 16px; }
.edit-row > label { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.edit-row textarea, .edit-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.edit-row textarea:focus, .edit-row input:focus { border-color: var(--blue); }
.edit-row.is-changed > label { color: var(--coral); }
.edit-row.is-changed textarea, .edit-row.is-changed input { border-color: var(--coral); }

.photo-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.photo-row img { width: 108px; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); background: var(--paper); }
.photo-meta { flex: 1 1 220px; min-width: 0; }
.photo-meta > span { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.photo-file { font-size: 13px; color: var(--muted); word-break: break-all; margin-bottom: 8px; }

/* ---------- Tech log ---------- */

.log-form { max-width: 560px; margin-bottom: 28px; }

.log-entry { padding: 14px 18px; background: var(--card); border: 1px solid var(--rule); margin-bottom: 8px; }
.log-entry.is-done { opacity: 0.6; }
.log-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.log-title { font-size: 15px; font-weight: 500; }
.log-entry.is-done .log-title { text-decoration: line-through; }
.log-meta { font-size: 12px; color: var(--muted); }
.log-detail { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--body); white-space: pre-wrap; }
.log-toggle { margin-left: auto; }

@media (max-width: 520px) {
  .bar { gap: 10px; }
  .bar-right { width: 100%; margin-left: 0; }
}
