/* Staff workspace and operator console: a light grey page, white cards, status tags, icons beside words. See docs/design.md.
   The accent is the mosque's own board colour (--accent, set on .app and .signin); semantic colours are only for status. */
:root {
  --page: #f5f6f4;
  --card: #ffffff;
  --ink: #18201c;
  --muted: #5a645f;
  --faint: #7f8883;
  --rule: #e4e7e4;
  --line: #cfd5d1;
  --hover: #f7f8f7;
  --accent: #1f5c45;
  --green: #1d7a45;
  --greenBg: #e3f4e8;
  --blue: #1f5fae;
  --blueBg: #e5eefb;
  --amber: #8a5600;
  --amberBg: #fdf0d5;
  --red: #b42318;
  --redBg: #fde8e6;
  --grey: #535c57;
  --greyBg: #eceeed;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
  color-scheme: light;
}
/* The accent darkened for text, so a light board colour still reads on white. */
.app,
.signin {
  --accentInk: color-mix(in srgb, var(--accent) 70%, #000);
  --accentSoft: color-mix(in srgb, var(--accent) 10%, #fff);
}
*,
::before,
::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 15px;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon {
  flex: none;
  display: block;
}
.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.amount.big {
  font-size: 22px;
  letter-spacing: -0.01em;
}
.stack {
  display: grid;
  gap: 18px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.wrap {
  flex-wrap: wrap;
}
.row form {
  display: contents;
}
.twoCol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
/* A field beside a taller one (with a hint below) keeps its input up by its label, not stretched to the bottom. */
.twoCol > .field {
  align-content: start;
}
.grow {
  flex: 1;
}
.preline {
  white-space: pre-line;
}

/* Status tags: a tinted label with a dot, one colour per state everywhere. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag-green {
  background: var(--greenBg);
  color: var(--green);
}
.tag-blue {
  background: var(--blueBg);
  color: var(--blue);
}
.tag-amber {
  background: var(--amberBg);
  color: var(--amber);
}
.tag-red {
  background: var(--redBg);
  color: var(--red);
}
.tag-grey {
  background: var(--greyBg);
  color: var(--grey);
}

.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.person > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.person strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person a {
  text-decoration: none;
}
.person a:hover {
  text-decoration: underline;
}

/* Buttons say the action; the main positive one is strong. */
button,
.primary,
.secondary,
.danger,
.confirm {
  font: 600 14.5px/1 var(--sans);
}
.primary,
.secondary,
.danger,
.confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}
.primary:hover {
  background: #2c3631;
}
.confirm {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}
.confirm:hover {
  background: #17663a;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 1px #0000000a;
}
.secondary:hover {
  background: var(--hover);
}
.danger {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
}
.danger:hover {
  background: #9a1e14;
}
.wide {
  width: 100%;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.linkBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.linkBtn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkBtn.warn {
  color: var(--red);
}
.tiny {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.tiny:hover {
  background: var(--hover);
}
:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #1f5c45) 60%, #000);
  outline-offset: 2px;
}

/* Fields */
.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
}
.field legend {
  margin-bottom: 6px;
  padding: 0;
}
.field > span:first-child {
  display: block;
}
.field small {
  font-weight: 400;
  font-size: 13px;
}
.field .muted {
  font-weight: 400;
}
input:not([type="radio"], [type="checkbox"], [type="file"], [type="color"]),
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 400 15px/1.35 var(--sans);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accentInk, var(--ink));
  outline: 3px solid color-mix(in srgb, var(--accent, #1f5c45) 20%, transparent);
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--red);
}
input[readonly] {
  background: var(--hover);
  color: var(--muted);
}
input[type="file"] {
  font: 400 14px var(--sans);
}
input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: 600 14px var(--sans);
  cursor: pointer;
}
textarea {
  resize: vertical;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 500;
  font-size: 15px;
}
.check input {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--accentInk, var(--ink));
}
.error {
  color: var(--red);
  font-weight: 600;
}
.short {
  max-width: 180px;
  font-size: 18px !important;
  font-weight: 700 !important;
}
.moneyInput {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}
.searchBox {
  position: relative;
  display: flex;
  align-items: center;
}
.searchBox .icon {
  position: absolute;
  left: 13px;
  color: var(--faint);
  pointer-events: none;
}
.searchBox input {
  padding-left: 40px !important;
}

/* Price choices on Record a gift */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.choice {
  position: relative;
}
.choice input,
.segmented input,
.swatch input,
.model input {
  position: absolute;
  opacity: 0;
}
.choice span {
  display: grid;
  gap: 2px;
  min-height: 64px;
  place-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}
.choice strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.choice small {
  color: var(--muted);
  font-weight: 500;
}
.choice input:checked + span {
  border-color: var(--accentInk);
  box-shadow: 0 0 0 1px var(--accentInk);
  background: var(--accentSoft);
}
.choice input:focus-visible + span,
.segmented input:focus-visible + span,
.model input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--accent, #1f5c45) 60%, #000);
  outline-offset: 2px;
}
.formHead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.formHead .icon {
  color: var(--faint);
}
.choices.designs {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.choices.designs strong {
  font-size: 14.5px;
  line-height: 1.3;
}
.choice.off span {
  background: var(--hover);
  color: var(--faint);
  cursor: default;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--hover);
  width: fit-content;
}
.segmented label {
  position: relative;
}
.segmented span {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
}
.segmented span:hover {
  background: #fff;
}
.segmented input:checked + span {
  background: #fff;
  color: var(--ink);
  box-shadow:
    0 1px 2px #0000001f,
    0 0 0 1px var(--line);
}
.segmented input:disabled + span {
  color: var(--faint);
  cursor: not-allowed;
  background: none;
}

.models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.model {
  position: relative;
}
.model span {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.model span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  background: #fff;
}
.model input:checked + span {
  border-color: var(--accentInk);
  box-shadow: 0 0 0 1px var(--accentInk);
  background: var(--accentSoft);
}
.model input:checked + span::before {
  border: 5px solid var(--accentInk);
}
.model input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}
.model small {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.swatch {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 2px #0002;
  cursor: pointer;
}
.swatch:has(input:checked) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.swatch:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, #000);
  outline-offset: 3px;
}
.customColour {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}
.customColour input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.customColour input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.noticePreview {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.logoPreview {
  width: auto;
  max-width: 100%;
  height: 64px;
  padding: 6px;
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}

/* Notes and banners */
.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--blueBg);
  color: #173f72;
}
.note > .icon {
  margin-top: 1px;
}
.note.success {
  margin-bottom: 16px;
  background: var(--greenBg);
  color: #14532d;
  font-weight: 600;
}
.note.warn {
  background: var(--amberBg);
  color: #5c3a00;
}
.note.stack {
  display: grid;
}
.card > .note {
  margin: 0 20px 20px;
}
.note a {
  font-weight: 600;
}
.error.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--redBg);
}
.attention {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #f1d9a6;
  border-radius: var(--radius);
  background: var(--amberBg);
  color: #5c3a00;
}
.attention .iconWrap {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff6e3;
  color: var(--amber);
}
.attention > span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 1px;
}
.attention strong {
  font-size: 15px;
}
.attention .secondary {
  border-color: #e7c98d;
}

/* Sign in */
.signin {
  display: grid;
  gap: 16px;
  align-content: center;
  justify-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
}
.signinCard,
.accounts {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 1px 2px #0000000a,
    0 8px 24px #0000000a;
}
.signinCard .brand {
  padding: 0 0 20px;
}
.signinCard h1 {
  margin-bottom: 8px;
  font-size: 22px;
}
.signinCard > form,
.signinCard > p + form,
.signinCard details,
.signinCard details + p {
  margin-top: 18px;
}
.signinCard > p + p,
.signinCard > form + p {
  margin-top: 14px;
}
.signinCard details form {
  margin-top: 12px;
}
.signinCard summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.signinFoot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
}
.accounts {
  display: grid;
  gap: 14px;
  padding: 24px 32px;
  box-shadow: none;
}
.accounts h2 {
  font-size: 15px;
}
.account {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.cred {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.cred .mono {
  overflow-wrap: anywhere;
}

/* Shell */
.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100dvh;
}
.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100dvh;
  padding: 18px 12px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--rule);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 16px;
  min-width: 0;
}
.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--brandInk, #fff);
  font-size: 16px;
  font-weight: 700;
}
img.mark {
  padding: 3px;
  object-fit: contain;
  border: 1px solid var(--rule);
  background: #fff;
}
/* Which event the team is looking at, and the others to switch to. */
.eventPick {
  position: relative;
  margin: 0 0 12px;
}
.eventPick summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.eventPick summary::-webkit-details-marker {
  display: none;
}
.eventPick summary:hover {
  background: var(--hover);
}
.eventPick summary > span {
  flex: 1;
  display: grid;
  min-width: 0;
}
.eventPick summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.eventPick summary small {
  color: var(--muted);
  font-size: 12.5px;
}
.eventPick summary .icon {
  color: var(--faint);
}
.eventPick[open] summary > .icon:last-child {
  transform: rotate(180deg);
}
.eventPick ul {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 6;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #00000018;
}
.eventPick a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.eventPick a:hover {
  background: var(--hover);
}
.eventPick a[aria-current] {
  background: var(--accentSoft);
  color: var(--accentInk);
}
.eventPick li.new a {
  justify-content: flex-start;
  color: var(--muted);
}
.eventBar {
  display: none;
}
.navItem {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: #3a4440;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.navItem .icon {
  color: var(--faint);
}
.navItem:hover {
  background: var(--hover);
  color: var(--ink);
}
.navItem[aria-current] {
  background: var(--accentSoft);
  color: var(--accentInk);
}
.navItem[aria-current] .icon {
  color: var(--accentInk);
}
.navItem .badge {
  margin-left: auto;
}
.navGap {
  display: block;
  height: 1px;
  margin: 10px;
  background: var(--rule);
}
.sideFoot {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding-top: 12px;
}
.navItem.public {
  color: var(--muted);
  font-weight: 500;
}
.me {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.meLink {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
a.meLink:hover {
  background: var(--hover);
}
a.meLink[aria-current] {
  background: var(--accentSoft);
}
.meLink > span {
  display: grid;
  min-width: 0;
}
.meLink strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meLink small {
  color: var(--muted);
  font-size: 12.5px;
}
.me form {
  margin: 0;
}
.iconBtn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.iconBtn:hover {
  background: var(--hover);
  color: var(--ink);
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.badge[hidden] {
  display: none;
}

.main {
  width: 100%;
  max-width: 1040px;
  padding: 28px 36px 80px;
}
.pageHead {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
}
.pageHead.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.pageHead .sub {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
}
.pageHead .sub > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pageHead .end {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.pageHead .person {
  gap: 14px;
}
.pageHead .person > span:last-child {
  gap: 4px;
}
.pageHead .person h1 {
  overflow-wrap: anywhere;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.back:hover {
  color: var(--ink);
}
.tabs {
  display: none;
}

/* Cards: white, on the grey page, never nested. */
.card,
.panel {
  margin-bottom: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px #0000000a;
}
.panel {
  padding: 20px;
}
.panel > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel > h2 .icon,
.cardHead h2 .icon {
  color: var(--faint);
}
.cardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
}
.cardHead h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cardHead h2 .count {
  color: var(--faint);
  font-weight: 600;
}
.cardHead p {
  flex-basis: 100%;
}
.cardBody {
  padding: 20px;
}
.cardFoot {
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
}
.invitedHead {
  border-top: 1px solid var(--rule);
  background: #fafbfa;
  padding-top: 10px;
  padding-bottom: 10px;
}
.invitedHead h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.formFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fafbfa;
}
.formFoot .primary:last-child,
.formFoot .confirm:last-child {
  margin-left: auto;
}
.card > .formFoot {
  margin: 0;
}
/* A settings form that spans several cards ends in a footer of its own. While a settings form has unsaved changes,
   its footer stays at the bottom of the window, so Save is in reach on a long page (docs/settings-ux.md). */
.settingsForm {
  gap: 0;
}
.settingsForm > .formFoot {
  margin: 0 0 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.saveState {
  margin: 0;
  font-size: 13px;
}
@media (min-width: 761px) {
  form[data-dirty] > .formFoot {
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -6px 16px -8px #00000030;
  }
  html:has(form[data-dirty]) {
    scroll-padding-bottom: 96px;
  }
}
/* After a failed save: what to fix, each linked to its field. */
.errorSummary {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--card);
}
.errorSummary h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
}
.errorSummary ul {
  margin: 10px 0 0;
  padding-left: 22px;
}
.errorSummary li + li {
  margin-top: 4px;
}
.errorSummary a {
  color: var(--red);
  font-weight: 600;
}
.errorSummary:focus {
  outline: 3px solid color-mix(in srgb, var(--accent, #1f5c45) 60%, #000);
  outline-offset: 2px;
}
/* The saved note takes focus only so a screen reader reads it; it is never tabbed to. */
.note:focus {
  outline: none;
}
.total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.total strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  color: var(--muted);
  text-align: center;
}
.empty .icon {
  color: var(--faint);
}
.empty strong {
  color: var(--ink);
}

/* Stat cards: big numbers, small labels */
.kpis {
  display: grid;
  grid-template-columns: repeat(var(--kpis, 4), minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  align-items: start;
}
/* Each card spans four rows of the row of cards, so labels, numbers and bars line up even when a label wraps. */
.kpi {
  grid-row: span 4;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px #0000000a;
  color: inherit;
  text-decoration: none;
}
.kpi > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.kpi > span:first-child .icon {
  color: var(--faint);
}
.kpi strong {
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.kpi small {
  color: var(--muted);
  font-size: 12.5px;
}
.kpi .bar {
  margin-top: 4px;
}
a.kpi:hover {
  background: var(--hover);
}
.kpi.warn {
  border-color: #f1d9a6;
}
.kpi.warn > span:first-child,
.kpi.warn > span:first-child .icon {
  color: var(--amber);
}

/* Progress */
.bar {
  display: flex;
  height: 8px;
  min-width: 60px;
  background: #e9ecea;
  border-radius: 4px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.bar.small {
  width: 120px;
}
.progress {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.progress b {
  min-width: 38px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Lists and tables */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
}
.list > li:first-child {
  border-top: 0;
}
.list > li > .person,
.list > li > span:first-child {
  flex: 1;
  min-width: 200px;
}
.person > span.inline {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}
.list .end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.panel .list > li {
  padding-left: 0;
  padding-right: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  flex-basis: 100%;
  padding-left: 48px;
}
.actions form {
  margin: 0;
}
.confirmRemove {
  margin-left: auto;
}
.confirmRemove summary {
  list-style: none;
  cursor: pointer;
}
.confirmRemove summary::-webkit-details-marker {
  display: none;
}
.confirmRemove[open] {
  flex-basis: 100%;
  margin-left: 0;
}
.confirmRemove > div {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #f3c9c4;
  border-radius: 10px;
  background: #fff6f5;
}
.confirmRemove p {
  margin: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 11px 20px;
  border-top: 1px solid var(--rule);
  text-align: left;
  font-weight: 500;
  vertical-align: middle;
}
thead th {
  border-top: 0;
  background: #fafbfa;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:hover {
  background: #fafbfa;
}
tbody th {
  font-weight: 600;
}
.panel table th:first-child,
.panel table td:first-child {
  padding-left: 0;
}
.panel table th:last-child,
.panel table td:last-child {
  padding-right: 0;
}
.panel thead th {
  background: none;
}
.num {
  text-align: right;
}
.totalRow th,
.totalRow td {
  background: #fafbfa;
  font-weight: 700;
}
.flagged td,
.flagged th {
  background: #fff6f5;
}
tr.flagged:hover td {
  background: #fdeceb;
}
.scroll,
.tableScroll {
  overflow-x: auto;
}
.tableScroll td {
  white-space: nowrap;
}
.tableScroll caption {
  padding: 0 0 8px;
  text-align: left;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0;
}
.facts > div {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
}
.facts dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.facts dt .icon {
  color: var(--faint);
}
.facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.facts .wideFact {
  grid-column: 1 / -1;
}
.card > .facts:first-child {
  margin-top: -1px;
}
.facts + .timeline {
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.facts a {
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
img.receipt {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 360px;
  margin-top: 4px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

/* To check: one row per payment, with the details that matter for the decision under it. */
.cards {
  display: grid;
}
.pay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px 20px;
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
}
.pay:first-child {
  border-top: 0;
}
.payRefs {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
}
.payRefs .mono {
  color: var(--ink);
}
.payActions {
  grid-row: 1;
  grid-column: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.payActions form {
  margin: 0;
}
.pay .person .muted {
  font-size: 13px;
}
.pay .facts {
  grid-column: 1 / -1;
  margin: 0 0 0 48px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.pay .facts > div {
  padding: 10px 14px;
  border-top: 0;
  border-left: 1px solid var(--rule);
}
.pay .facts > div:first-child,
.pay .facts .wideFact {
  border-left: 0;
}
.pay .facts .wideFact {
  border-top: 1px solid var(--rule);
}
.pay > .error,
.pay > p.muted {
  grid-column: 1 / -1;
  margin-left: 48px;
}
.pay.done {
  grid-template-columns: auto minmax(0, 1fr) auto;
  background: #f4fbf6;
}
.pay.done > .icon {
  color: var(--green);
}
.pay.done.declined > .icon {
  color: var(--red);
}
.pay.done.declined {
  background: #fdf6f5;
}
.notReceived {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-left: 48px;
  padding: 14px 16px;
  border: 1px solid #f3c7c2;
  border-radius: 10px;
  background: #fff8f7;
}
.notReceived .row {
  flex-wrap: wrap;
}
.panel .notReceived {
  margin-left: 0;
}
.reserved {
  border-top: 1px solid var(--rule);
}
.reserved summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  font-weight: 600;
  cursor: pointer;
}
.reserved summary .icon {
  color: var(--faint);
}
.reserved[open] summary {
  border-bottom: 1px solid var(--rule);
}
.reserved .list > li {
  padding: 10px 20px;
}

/* Find */
.searchForm {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
}
.searchBar input {
  min-height: 48px;
  font-size: 16px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.chips label {
  position: relative;
}
.chips input {
  position: absolute;
  opacity: 0;
}
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.chips span:hover {
  color: var(--ink);
}
.chips input:checked + span {
  border-color: var(--accentInk);
  background: var(--accentSoft);
  color: var(--accentInk);
}
.chips input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, #000);
  outline-offset: 2px;
}
.resultsHead {
  padding: 10px 20px;
  border-bottom: 1px solid var(--rule);
  background: #fafbfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.results {
  margin: 0;
  padding: 0;
  list-style: none;
}
.results li + li {
  border-top: 1px solid var(--rule);
}
.results a,
.rowBtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 10px 20px;
  color: inherit;
  text-decoration: none;
  text-align: left;
}
.rowBtn {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.rowBtn > .person {
  min-width: 0;
}
.rowBtn > .row {
  flex: none;
  white-space: nowrap;
}
.results a:hover,
.rowBtn:hover {
  background: var(--hover);
}
.results a[aria-current] {
  background: var(--accentSoft);
}
.results .person > span:last-child .muted {
  font-size: 13px;
}
.results .end {
  display: flex;
  align-items: center;
  gap: 14px;
}
.results .end .amount {
  min-width: 64px;
  text-align: right;
}
.results .go {
  color: var(--faint);
}
.avatar.menuIcon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--hover);
  color: var(--muted);
}
.panel .results {
  margin: 0 -20px;
}

/* Booking */
.timeline {
  position: relative;
  margin: 0;
  padding: 6px 20px 10px;
  list-style: none;
}
.timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.timeline > li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  background: var(--rule);
}
.timeline > li:last-child::before {
  display: none;
}
.marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--greyBg);
  color: var(--grey);
}
.marker.done {
  background: var(--greenBg);
  color: var(--green);
}
.marker.now {
  background: var(--blueBg);
  color: var(--blue);
}
.marker.wait {
  background: var(--amberBg);
  color: var(--amber);
}
.marker.bad {
  background: var(--redBg);
  color: var(--red);
}
.timeline .muted {
  font-size: 13px;
}
.inline {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tonight */
.announcement {
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--hover);
  border: 1px solid var(--rule);
  font-size: 17px;
  line-height: 1.5;
}
.names {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin: 0 0 -1px;
  padding: 0;
  list-style: none;
}
.names li {
  border-bottom: 1px solid var(--rule);
}
.names a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 20px;
  color: inherit;
  text-decoration: none;
}
.names a:hover {
  background: var(--hover);
}
.names .person strong {
  white-space: normal;
}
.nightNav {
  display: flex;
  gap: 8px;
}

/* Overview: the whole month at a glance */
.list > li.nightRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(120px, 200px) 130px;
}
.nightRow > span:first-child {
  min-width: 0;
}
.nightRow .need {
  text-align: right;
  font-size: 13.5px;
}
.month {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}
.cell {
  position: relative;
  display: grid;
  place-items: center;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cell:hover {
  border-color: var(--accent);
}
.cell span:first-child {
  position: relative;
  z-index: 1;
}
.cell .fill {
  position: absolute;
  inset: auto 0 0;
  background: color-mix(in srgb, var(--accent) 28%, #fff);
}
.cell.full .fill {
  background: color-mix(in srgb, var(--accent) 45%, #fff);
}
.cell.past {
  color: var(--faint);
}
.cell.past .fill {
  background: #e4e7e4;
}
.cell.today {
  border: 2px solid var(--ink);
}
.legend {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 14px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: #fff;
}
.legend i.part {
  box-shadow: inset 0 -7px 0 color-mix(in srgb, var(--accent) 28%, #fff);
}
.legend i.full {
  box-shadow: inset 0 -16px 0 color-mix(in srgb, var(--accent) 45%, #fff);
}
.legend i.past {
  box-shadow: inset 0 -16px 0 #e4e7e4;
}
.legend i.today {
  border: 2px solid var(--ink);
}

/* Reports */
.activity {
  margin: 0;
  padding: 0;
  list-style: none;
}
.activity li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: start;
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
}
.activity li:first-child {
  border-top: 0;
}
.activity li .avatar {
  grid-row: span 2;
  margin-top: 2px;
}
.activity small {
  color: var(--muted);
  font-size: 12.5px;
}
.nowrap {
  white-space: nowrap;
}
.row > .end {
  margin-left: auto;
}
/* Rare actions at the foot of a page: quiet links, not buttons. */
.footLinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  margin: 4px 4px 0;
}
.footLinks > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.results .mono,
.pay .mono {
  white-space: nowrap;
}
.progressCol {
  width: 34%;
  min-width: 160px;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.bands td {
  padding: 4px 8px 4px 0;
  border: 0;
}
.bands thead th {
  padding: 0 8px 4px 0;
}
.split2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.split2 > .card {
  margin-bottom: 0;
}

/* Setup */
.subTabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.subTabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.subTabs a .icon {
  color: var(--faint);
}
.subTabs a:hover {
  color: var(--ink);
}
.subTabs a[aria-current] {
  color: var(--accentInk);
  border-bottom-color: var(--accentInk);
}
.subTabs a[aria-current] .icon {
  color: var(--accentInk);
}

/* Toast */

/* Two-step sign-in */
.stepNo {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accentSoft, var(--greyBg));
  color: var(--accentInk, var(--ink));
  font-size: 13.5px;
}
.qr {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.qr svg {
  width: min(200px, 100%);
  height: auto;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
}
.qr figcaption {
  color: var(--muted);
  font-size: 14px;
}
.qr figcaption .mono {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.backupCodes {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px 48px;
  justify-content: start;
  margin: 0;
  padding: 18px 22px;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--hover);
  font-size: 17px;
  letter-spacing: 0.04em;
}

/* Event forms (views/_schedule.eta): only the fields for the chosen calendar, and the item's names only for "something else". */
form:has([name="calendar"][value="ramadan"]:checked) [data-for]:not([data-for~="ramadan"]),
form:has([name="calendar"][value="dates"]:checked) [data-for]:not([data-for~="dates"]),
form:has([name="calendar"][value="fund"]:checked) [data-for]:not([data-for~="fund"]),
form:not(:has([name="meal"][value="other"]:checked)) [data-when="other"] {
  display: none;
}
/* A tax-deductible receipt's fields appear once someone asks for one. */
.tax:not(:has(input[name="taxReceipt"]:checked)) .tax-fields {
  display: none;
}

@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(min(var(--kpis, 4), 3), minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .split2 {
    grid-template-columns: 1fr;
  }
}

/* Phone: bottom tabs replace the sidebar, and every control is at least 44px tall. */
@media (max-width: 760px) {
  h1 {
    font-size: 23px;
  }
  .app {
    display: block;
  }
  .side {
    display: none;
  }
  .main {
    padding: 16px 14px calc(92px + env(safe-area-inset-bottom));
  }
  .pageHead {
    margin-bottom: 16px;
  }
  .pageHead.split > .row {
    width: 100%;
    flex-wrap: wrap;
  }
  .pageHead.split > .row > * {
    flex: 1 1 auto;
  }
  .pageHead.split > .row > .primary {
    order: -1;
    flex-basis: 100%;
  }
  .eventBar {
    display: block;
    margin-bottom: 14px;
  }
  .hideOnPhone {
    display: none !important;
  }
  .results .person strong {
    white-space: normal;
  }
  .eventBar summary {
    background: #fff;
  }
  .attention {
    flex-wrap: wrap;
  }
  .attention > span:nth-child(2) {
    flex: 1 1 calc(100% - 50px);
  }
  .attention > :is(a, button, form) {
    flex: 1 1 100%;
  }
  .attention > form > button {
    width: 100%;
  }
  /* The activity log stacks on a phone: who and when on one line, what happened under it. */
  .scroll table.log,
  table.log tbody {
    display: block;
    min-width: 0;
  }
  table.log thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  table.log tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.log tr.flagged {
    background: #fff6f5;
  }
  table.log td {
    display: block;
    padding: 0;
    border: 0;
    background: none;
  }
  table.log td:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    color: var(--muted);
    font-size: 13px;
  }
  table.log td:nth-child(4) {
    color: var(--muted);
  }
  table.log td:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
  }
  table.log td:nth-child(n + 3) {
    grid-column: 1 / -1;
  }
  table.log td:empty {
    display: none;
  }
  .primary,
  .secondary,
  .danger,
  .confirm {
    min-height: 44px;
  }
  .linkBtn,
  .back {
    min-height: 44px;
  }
  .tiny {
    min-height: 40px;
  }
  input:not([type="radio"], [type="checkbox"], [type="file"], [type="color"]),
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .check {
    min-height: 44px;
  }
  .check input {
    width: 22px;
    height: 22px;
  }
  .segmented {
    display: flex;
    width: 100%;
  }
  .segmented label {
    flex: 1 1 40%;
  }
  .segmented span {
    justify-content: center;
    min-height: 40px;
    text-align: center;
  }
  /* Three choices don't pair up, so they stack. */
  .segmented:has(> label:nth-child(3):last-child) label {
    flex-basis: 100%;
  }
  .chips span {
    min-height: 40px;
  }
  .panel {
    padding: 16px;
  }
  .formFoot {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 2;
    margin: 4px -16px -16px;
    padding: 12px 16px;
  }
  .formFoot .small,
  .formFoot .saveNote {
    display: none;
  }
  html:has(.formFoot) {
    scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }
  .card > .formFoot {
    margin: 0;
  }
  .formFoot > .primary:last-child,
  .formFoot > .confirm:last-child {
    flex: 1;
  }
  .cardHead,
  .cardBody,
  .searchForm,
  .resultsHead,
  .cardFoot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .list > li,
  .results a,
  .rowBtn,
  .names a,
  .activity li,
  .reserved summary,
  .reserved .list > li {
    padding-left: 16px;
    padding-right: 16px;
  }
  .list > li > .person,
  .list > li > span:first-child {
    min-width: 0;
    flex-basis: 100%;
  }
  .list .end {
    justify-content: flex-start;
  }
  .actions {
    padding-left: 0;
  }
  .list > li.nightRow {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nightRow .progress {
    grid-column: 1;
  }
  .panel > .row.wrap > :is(a, button) {
    flex: 1 1 100%;
  }
  .panel .results {
    margin: 0 -16px;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpis > .kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .kpi {
    padding: 14px;
  }
  .kpi strong {
    font-size: 22px;
  }
  .pay {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
  }
  .pay > .person {
    grid-row: 1;
    grid-column: 1;
  }
  .pay > .amount {
    grid-row: 1;
    grid-column: 2;
  }
  .payRefs {
    grid-row: 2;
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    justify-items: start;
    margin-left: 48px;
    text-align: left;
  }
  .pay .facts,
  .pay > .error,
  .pay > p.muted,
  .notReceived {
    margin-left: 0;
  }
  .pay .facts {
    grid-template-columns: 1fr 1fr;
  }
  .pay .facts > div:nth-child(odd) {
    border-left: 0;
  }
  .pay .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
  .payActions {
    grid-row: auto;
    grid-column: 1 / -1;
  }
  .payActions > * {
    flex: 1;
  }
  .payActions form > button {
    width: 100%;
  }
  .pay.done {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .pay.done > form {
    grid-column: 1 / -1;
  }
  .pay.done > form > button {
    width: 100%;
  }
  .notReceived .row > * {
    flex: 1 1 100%;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .facts > div {
    padding: 12px 16px;
  }
  .timeline {
    padding: 6px 16px 10px;
  }
  th,
  td {
    padding: 10px 16px;
  }
  .scroll table {
    min-width: 640px;
  }
  .scroll table.nights {
    min-width: 0;
  }
  .nights .progressCol {
    width: auto;
    min-width: 0;
  }
  .nights .progressCol .bar {
    display: none;
  }
  .results .end {
    gap: 4px;
    flex-direction: column;
    align-items: flex-end;
  }
  .results .go {
    display: none;
  }
  .month {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .names {
    grid-template-columns: 1fr;
  }
  /* On a phone the Setup tabs wrap into rows of buttons, so every tab and the current one are in view. */
  .subTabs {
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 0;
    overflow: visible;
  }
  .subTabs a {
    min-height: 44px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .subTabs a[aria-current] {
    border-color: var(--accentInk);
    background: var(--accentSoft);
  }
  .backupCodes {
    gap: 10px 20px;
    padding: 14px 16px;
    font-size: 16px;
    letter-spacing: 0;
  }
  .signinCard,
  .accounts {
    padding: 24px 20px;
  }
  .tabs {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--rule);
    background: #fff;
    box-shadow: 0 -2px 10px #0000000d;
  }
  .tabs a {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 6px 0 8px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
  }
  .tabs a[aria-current] {
    color: var(--accentInk);
  }
  .tabs a[aria-current]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--accent);
  }
  .tabs .badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }
}
