/*
 * The member site and the sign-in pages, phone first (390 wide), on the
 * shared tokens.css. From design_handoff_setup_team_review, Member Site v2.
 *
 * Everything lives here rather than in style="" attributes or <style>
 * blocks: the CSP (setup_team/settings.py) drops inline style attributes.
 */
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, ul, ol { margin: 0; }
a { color: var(--teal-light); }
a:hover { color: var(--text); }
button, input, textarea, select { font-family: inherit; }
input::placeholder { color: var(--text-dim); }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Shell ------------------------------------------------------------ */
.topbar { background: var(--surface); border-bottom: 1px solid var(--rule); }
.topbar-inner, .page, .tabbar-inner { max-width: 40rem; margin: 0 auto; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.topbar-logo { display: block; height: 30px; width: auto; }
.avatar-btn {
  width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--raised); border: 1px solid var(--rule-strong); color: var(--text-2);
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.avatar-btn:hover { color: var(--text); border-color: var(--primary); }
.page {
  padding: 20px 16px calc(96px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}
.page--detail { padding-top: 16px; }
body.wide .page { max-width: 72rem; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface);
  border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: flex; }
.tab {
  flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; color: var(--text-muted); text-decoration: none;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--teal-light); font-weight: 700; }

/* ---- Type ------------------------------------------------------------- */
.head { display: flex; flex-direction: column; gap: 2px; }
.head--8 { gap: 8px; }
.title { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.title--24 { font-size: 24px; line-height: 1.2; }
.sub { font-size: 13px; color: var(--text-muted); }
.when-line { font-size: 14px; color: var(--text-2); }
.day-head { font-size: 12px; font-weight: 600; color: var(--text-muted); padding-top: 4px; }
.day-head--6 { padding-top: 6px; }
.back { align-self: flex-start; font-size: 14px; font-weight: 500; text-decoration: none; }
.footnote { font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.note { font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.empty { font-size: 14px; color: var(--text-muted); }
.prose { font-size: 14px; line-height: 1.55; white-space: pre-line; }
.prose--2 { color: var(--text-2); }

/* ---- Cards, rows ------------------------------------------------------ */
.day { display: flex; flex-direction: column; gap: 8px; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.card--16 { padding: 16px; gap: 12px; }
.card.is-mine, .card--now { border-color: var(--teal); }
.card--list { padding: 0; gap: 0; overflow: hidden; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-top--center { align-items: center; }
.card-time { font-size: 16px; font-weight: 600; }
.card-time--15 { font-size: 15px; }
.card-time--17 { font-size: 17px; }
.spots { font-size: 12px; color: var(--teal-light); white-space: nowrap; }
.count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-row { display: flex; gap: 10px; align-items: flex-start; }
.ev-row--center { align-items: center; }
.ev-row .tag { flex: none; margin-top: 1px; }
.ev-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ev-title { font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; }
a.ev-title:hover { color: var(--teal-light); }
.ev-sub { font-size: 12px; color: var(--text-muted); }
.ev-row.is-cancelled .ev-title { color: var(--text-dim); text-decoration: line-through; }
.task-state { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.task-state.is-done { color: var(--teal-light); }

.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--rule);
}
.list-row:last-child { border-bottom: none; }
.list-row--12 { padding: 12px 16px; }
.list-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.list-title { font-size: 14px; font-weight: 500; }
.list-head { display: flex; gap: 8px; align-items: flex-start; }
.list-head .tag { flex: none; margin-top: 1px; }
.list-head .list-title { font-weight: 600; }
.status { font-size: 12px; color: var(--text-muted); }
.status.is-open { color: var(--teal-light); }

.kv { padding: 0; gap: 0; overflow: hidden; }
.kv-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--rule); font-size: 14px;
}
.kv-row:last-child { border-bottom: none; }
.kv-key { color: var(--text-muted); }
.kv-value { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
/* The choose-password page's username: a read-only input, so phones save it
   with the password, that reads as the plain value beside it. */
.kv-input {
  min-width: 0; flex: 1; padding: 0; border: none; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; text-align: right; outline: none;
}

/* ---- Tags, pills -------------------------------------------------------- */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px;
  white-space: nowrap; align-self: flex-start;
}
.tag-setup { background: var(--setup-tint); color: var(--teal-light); }
.tag-teardown { background: transparent; box-shadow: inset 0 0 0 1px var(--checkbox); color: var(--text-2); }
.tag-cancelled { background: transparent; box-shadow: inset 0 0 0 1px var(--warn); color: var(--warn); }
.tag-now {
  background: var(--primary); color: var(--on-primary); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 10px;
}
.tag-line { display: flex; gap: 10px; align-items: center; }
.tag-note { font-size: 12px; color: var(--text-muted); }
.room-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.room-pill {
  padding: 3px 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--rule);
  font-size: 12px; color: var(--text-2);
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; width: 100%; line-height: 1; text-align: center; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--on-primary); border: none; }
.btn-primary:hover { color: var(--on-primary); }
.btn-secondary { background: transparent; border-color: var(--rule-strong); color: var(--text-2); font-size: 14px; font-weight: 600; height: 42px; }
.btn-secondary:hover { border-color: var(--primary); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--teal-light); font-size: 14px; font-weight: 600; height: 42px; }
.btn-outline:hover { background: var(--primary); color: var(--on-primary); }
/* The one orange button on the member site: it gives a spot away. */
.btn-warn { background: var(--warn); color: var(--on-warn); border: none; font-size: 14px; height: 42px; }
.btn-warn:hover { color: var(--on-warn); }
.btn-auto { width: auto; align-self: flex-start; }
.btn-sm { width: auto; flex: none; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-xs { width: auto; flex: none; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-row { width: auto; flex: none; height: 40px; font-size: 14px; }
.btn-52 { height: 52px; font-size: 16px; }
.btn-pair { display: flex; gap: 8px; }
.btn-pair > * { flex: 1; }
form.btn-form { margin: 0; display: flex; flex-direction: column; }
.btn-pair form.btn-form { flex: 1; }
.btn-pair--card .btn { height: 44px; }
.on-shift {
  height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
  background: var(--setup-tint); color: var(--teal-light); font-size: 15px; font-weight: 600;
}

/* "Can't make it…": a checkbox opens the confirm panel, so it works with
   no script at all and needs no browser confirm(). */
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.offer--solo { grid-template-columns: 1fr; }
.offer-toggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.offer-toggle:focus-visible + .offer-open { outline: 2px solid var(--teal); outline-offset: 2px; }
.offer-panel {
  display: none; grid-column: 1 / -1; flex-direction: column; gap: 10px; background: var(--raised);
  border: 1px solid var(--rule-strong); border-radius: 12px; padding: 14px;
}
.offer-toggle:checked ~ .offer-panel { display: flex; }
.offer-panel p { font-size: 14px; line-height: 1.5; }
.offered { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.offered p { font-size: 13px; line-height: 1.45; color: var(--text-2); }

/* ---- Banners ---------------------------------------------------------- */
.banner {
  background: var(--raised); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.banner--ok { border-color: var(--teal); }
.banner--warn { border-color: var(--warn); }
.banner--10 { border-radius: 10px; padding: 10px 12px; }
.banner-title { font-size: 14px; font-weight: 600; }
.banner-text { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.banner--warn.banner--10 .banner-text, .banner--plain .banner-text { color: var(--text); }

/* ---- Shift details ---------------------------------------------------- */
.progress { display: flex; align-items: center; gap: 10px; }
.meter { flex: 1; height: 6px; border-radius: 999px; background: var(--rule-strong); overflow: hidden; display: block; }
.meter-fill { fill: var(--teal); transition: width 0.15s; }
.task-title { font-size: 17px; font-weight: 600; }
.done-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--setup-tint); border-radius: 10px; padding: 8px 8px 8px 12px;
}
.done-text { display: flex; flex-direction: column; gap: 1px; }
.done-label { font-size: 14px; font-weight: 600; color: var(--teal-light); }
.done-by { font-size: 12px; color: var(--text-2); }

/* A task's checklist: each line a button, so a tick is one tap and needs no script. */
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-form { margin: 0; }
.check-btn {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer;
}
button.check-btn:hover { border-color: var(--primary); }
.check-btn.is-static { cursor: default; }
.check-box {
  flex: none; width: 22px; height: 22px; margin-top: -1px; border-radius: 6px; border: 1.5px solid var(--checkbox);
  display: grid; place-content: center;
}
.is-done .check-box { background: var(--primary); border-color: var(--primary); }
.is-done .check-box::after { content: '✓'; color: var(--on-primary); font-size: 14px; font-weight: 700; line-height: 1; }
.check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.is-done .check-text { color: var(--text-2); }
/* A ticked line is plainly done, whichever shift ticked it (2026-11-09). */
.is-done .check-btn { background: var(--setup-tint); border-color: var(--teal); }

/* The shift page's order (2026-11-09): what's left, the next one marked;
   then what's finished, folded. */
.card--next { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.tag-next { background: transparent; box-shadow: inset 0 0 0 1px var(--primary); color: var(--teal-light); }
.handover {
  font-size: 13px; line-height: 1.45; color: var(--text); background: var(--raised);
  border: 1px solid var(--rule-strong); border-radius: 10px; padding: 8px 12px;
}
.card--finished { padding: 0; background: var(--band); }
.finished > summary { list-style: none; cursor: pointer; }
.finished > summary::-webkit-details-marker { display: none; }
.finished-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.finished-check {
  flex: none; width: 28px; height: 28px; border-radius: 999px; display: grid; place-content: center;
  background: var(--primary); color: var(--on-primary); font-size: 15px; font-weight: 700;
}
.finished-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.finished-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.finished-head::after { content: 'Show'; font-size: 12px; font-weight: 600; color: var(--teal-light); }
.finished[open] .finished-head::after { content: 'Hide'; }
.finished-body { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.check-by { font-size: 12px; color: var(--text-muted); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Setup notes from CCB --------------------------------------------- */
/* The event's General Setup Notes from CCB, under the Lead's instructions. */
.booking-notes { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--rule); }
.booking-notes-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* ---- Layout links -----------------------------------------------------
   Teal and filled, so a diagram stands out in a long task card (the Lead,
   2026-11-09: the grey outline was easy to scroll past). Teal, not orange:
   orange is for problems only (tokens.css). */
.layout-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 12px; background: var(--setup-tint); border: 1.5px solid var(--primary);
  text-decoration: none; color: var(--text);
}
.layout-link:hover { border-color: var(--teal-light); color: var(--text); }
.layout-icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--on-primary);
}
.layout-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.layout-name { font-size: 15px; font-weight: 600; }
.layout-meta { font-size: 12px; color: var(--text-2); }
.layout-cta {
  flex: none; font-size: 13px; font-weight: 700; color: var(--on-primary); background: var(--primary);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}

/* The Lead's notes for the whole shift, above its events (2026-11-09). */
.shift-notes {
  background: var(--raised); border: 1px solid var(--rule-strong); border-left: 3px solid var(--primary);
  border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}

/* ---- Sign-in pages ------------------------------------------------------ */
.auth {
  max-width: 28rem; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: 80px 24px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px;
}
.auth--24 { gap: 24px; }
.auth-logo { display: block; height: 48px; width: auto; align-self: flex-start; }
.auth .head { gap: 6px; }
.auth .head--8 { gap: 8px; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.auth .title { font-size: 30px; }
.auth form { margin: 0; display: flex; flex-direction: column; gap: 28px; }
.auth form.form--24 { gap: 24px; }
.auth .banner-title { font-size: 15px; }
.auth .banner { padding: 14px 16px; gap: 6px; }
.auth .banner.banner--plain { padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.auth .banner-text { font-size: 14px; line-height: 1.55; }
.auth-text { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.auth-text--14 { font-size: 14px; }
.auth-link { align-self: flex-start; font-size: 15px; font-weight: 500; text-decoration: none; }
.auth-foot { margin-top: auto; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.field input {
  height: 48px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px;
  padding: 0 14px; color: var(--text); font-size: 16px; width: 100%;
}
.field input:focus { outline: 2px solid var(--teal); outline-offset: 0; }
.field.has-error input, .field input[aria-invalid="true"] { border-color: var(--warn); }
.field-help { font-size: 12px; color: var(--text-dim); }
.field-error, .field .errorlist { font-size: 12px; color: var(--warn); list-style: none; padding: 0; margin: 0; }
