/* Provider sign-up / login page — reuses the Pawlink landing's tokens
   (public/styles.css :root) so it reads as the same site, not a bolted-on
   admin form. */

.auth {
  max-width: 480px;
  margin: 48px auto;
  padding: 0 20px 80px;
}

.banner {
  background: var(--coral-soft, #FFE6DF);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 24px;
  font-weight: 500;
}

/* The two forms share the page; only the chosen one is drawn. (`display:
   flex` below would otherwise beat the hidden attribute.) */
.auth-form[hidden] { display: none; }

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.auth-switch button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: .95rem;
  transition: background .18s, color .18s, box-shadow .18s;
}

.auth-switch button:hover { color: var(--ink); }

.auth-switch button.current {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 16px -10px rgba(27, 20, 16, .35);
}

/* The "check your email" card that replaces the form once a link is sent. */
.auth-sent {
  align-items: center;
  text-align: center;
  padding: 40px 32px 32px;
}

.auth-sent[hidden] { display: none; }

.auth-sent-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 4px;
  border-radius: 50% 50% 50% 12px;
  background: var(--coral);
  box-shadow: 0 16px 36px -14px rgba(255, 90, 60, .7);
  transform: rotate(-6deg);
}

.auth-sent h1 { margin: 0; }
.auth-sent .auth-sub { margin: 0; max-width: 34ch; }
.auth-sent .auth-sub strong { color: var(--ink); overflow-wrap: anywhere; }
.auth-sent .btn-cta { margin-top: 8px; min-width: 200px; }
.auth-sent .btn-cta[hidden] { display: none; }
.auth-sent-again { margin-top: 4px; }

.auth-code { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; margin-top: 12px; }
.auth-code label { font-size: .9rem; color: var(--muted); }
.auth-code input { font-size: 1.6rem; letter-spacing: .18em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-code .btn-cta { margin-top: 0; }
.auth-code .form-message:empty { display: none; }

.auth-sub {
  margin: -2px 0 6px;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.5;
}

.auth-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form h1 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.75rem;
  letter-spacing: -.02em;
}

/* Visually hidden, still read by screen readers (rota checkbox labels). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: var(--ink-2);
  font-size: .92rem;
}

.auth input,
.auth select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}

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

/* ---------- sign-up: the services picker ----------
   The booking page's tiles, made multi-select: an emoji, the name, one line
   of what it is, a tick when it's on. The real checkbox stays inside for
   the form (and for keyboard/screen-reader users). */
.auth .service-grid,
.dashboard fieldset.service-grid {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth .service-grid legend,
.dashboard .service-grid legend {
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--ink-2);
  font-size: .92rem;
}

.service-grid-hint {
  margin: 0 0 6px;
  font-size: .85rem;
  color: var(--muted);
}

.service-tiles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-tile {
  position: relative;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "emoji name check" "emoji sub check" "emoji status check";
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
  padding: 10px 14px 10px 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}

.service-tile:hover { border-color: var(--line-strong); background: var(--paper); }
.service-tile:active { transform: scale(.985); }

.service-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.service-tile-emoji {
  grid-area: emoji;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--paper);
  font-size: 1.25rem;
  line-height: 1;
}

.service-tile-name {
  grid-area: name;
  font-family: var(--serif);
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.2;
}

.service-tile small {
  grid-area: sub;
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.3;
}

.service-tile-check {
  grid-area: check;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: transparent;
  color: transparent;
  font-size: .68rem;
  font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}

.service-tile:has(input:checked) {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.service-tile:has(input:checked) .service-tile-emoji { background: #fff; }

.service-tile:has(input:checked) .service-tile-check {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.service-tile:has(input:focus-visible) { outline: 2px solid var(--coral); outline-offset: 2px; }

/* Settings only: what the ticked service is doing on the booking page. Reads
   as a small pill under the description; irrelevant (and hidden) while the
   box is off. */
.service-tile .svc-status {
  grid-area: status;
  justify-self: start;
  margin: 6px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--muted);
}

.service-tile .svc-status:empty,
.service-tile:not(.svc-closed):not(:has(input:checked)) .svc-status { display: none; }

/* A service /admin has closed to new providers: greyed, not tickable, and
   the status line carries the reason (settings.js, provider-pages.ts). */
.service-tile.svc-closed {
  cursor: not-allowed;
  opacity: .6;
  background: var(--paper);
}

.service-tile.svc-closed:hover { border-color: var(--line); }
.service-tile.svc-closed .svc-status { background: var(--bg-2); color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .78rem; }
.service-tile .svc-live { background: var(--mint-soft); color: #1F8A62; }
.service-tile .svc-needs-shift { background: var(--sun-soft); color: #8A6100; text-transform: none; letter-spacing: 0; }
.service-tile .svc-needs-shift a { color: inherit; text-decoration: underline; }

/* ---------- sign-up: your address ----------
   The landing's browser bar: three dots, the address, your name in coral
   with a caret — so picking a name feels like watching your page appear. */
.slug-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slug-block > label {
  font-weight: 500;
  color: var(--ink-2);
  font-size: .92rem;
}

.slug-browser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: box-shadow .15s, border-color .15s;
}

.slug-browser:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}

.slug-dots { display: inline-flex; gap: 5px; flex: none; }
.slug-dots i { width: 9px; height: 9px; border-radius: 50%; background: #E3D6CB; }

.slug-url {
  flex: 1 1 100%;
  order: 3;
  display: flex;
  align-items: center;
  min-width: 0;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 500;
  color: var(--muted);
}

.slug-host { flex: none; font-size: .98rem; }

.auth .slug-url input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--coral);
  letter-spacing: -.01em;
}

.auth .slug-url input:focus { outline: none; box-shadow: none; }
.auth .slug-url input::placeholder { color: var(--coral); opacity: .35; font-weight: 700; }

/* The caret from the landing hero; hides once the field is being typed in. */
.slug-url .caret { flex: none; }
.slug-url:focus-within .caret { display: none; }

.slug-status {
  flex: none;
  order: 2;
  margin-left: auto;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.slug-status:empty { display: none; }
.slug-status.ok { background: var(--mint-soft); color: #1F8A62; }
.slug-status.ok::before { content: '✓ '; }
.slug-status.bad { background: var(--coral-soft); color: #C63A1F; }
.slug-status.checking { background: var(--paper); color: var(--muted); }

.slug-hint {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
}


.form-message {
  min-height: 1.2em;
  font-size: .92rem;
  color: var(--ink-2);
}

.auth .switch {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}

.auth .switch a {
  color: var(--coral);
  font-weight: 500;
}

/* =====================================================================
   Provider dashboard — the signed-in side of Pawlink. Same warm, editorial
   system as the landing (styles.css :root tokens): Fraunces for titles,
   Instrument Sans for everything else, paper cards on cream, coral for
   the one thing you should tap.
   ===================================================================== */

:root {
  --line-strong: rgba(27, 20, 16, 0.16);
  --nav-w: 232px;
  --radius-sm: 14px;
}

/* Anything a screen hides with the `hidden` attribute stays hidden, whatever
   display its class sets — screens toggle list/editor, tabs, and forms this way. */
.dashboard [hidden],
.auth [hidden],
.sheet [hidden] { display: none !important; }

/* The landing's global `section` gives every block hero-sized padding and a
   1240px column. The dashboard lays its own sections out. */
.dashboard section {
  padding: 0;
  max-width: none;
  margin: 0;
}

/* ---------- share bar: who you are, and the two links worth copying ---------- */

.share-bar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: 14px clamp(20px, 4vw, 40px);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.share-bar-biz {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.share-bar-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  min-width: 0;
  flex: 1 1 auto;
}

.share-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.share-bar-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.share-bar-link code {
  display: inline-flex;
  align-items: baseline;
  font-size: .86rem;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  max-width: 100%;
  min-width: 0;
  /* .share-slug never shrinks (it's the part worth reading in full), so once
     the host has ellipsised down to nothing there's nowhere left for a long
     slug to go but out of this box. Scroll it sideways inside its own chip
     instead of letting it bleed across the Copy/Preview buttons. */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.share-bar-link code::-webkit-scrollbar { display: none; }

.share-host {
  color: var(--muted);
  direction: rtl;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  unicode-bidi: plaintext;
}

.share-slug {
  font-weight: 700;
  color: var(--ink);
  flex: none;
}

.share-bar > #logout { margin-left: auto; }

/* ---------- ghost buttons ----------
   The landing's .btn is a solid ink pill and its .btn-ghost is a text link;
   the two together (what every secondary action here uses) came out as
   ink-on-ink. In the dashboard a ghost button is an outlined pill. */
.share-bar .btn-ghost,
.dashboard .btn-ghost,
.sheet .btn-ghost,
.cal-pop .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: none;
  padding: 10px 18px;
  font-weight: 600;
  line-height: 1.2;
}

.share-bar .btn-ghost.btn-small,
.dashboard .btn-ghost.btn-small,
.sheet .btn-ghost.btn-small,
.cal-pop .btn-ghost.btn-small {
  padding: 7px 13px;
  font-size: .85rem;
}

.share-bar .btn-ghost:hover,
.dashboard .btn-ghost:hover,
.sheet .btn-ghost:hover,
.cal-pop .btn-ghost:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink);
  transform: none;
  box-shadow: 0 6px 16px -10px rgba(27, 20, 16, .35);
}

.dashboard .btn,
.sheet .btn { line-height: 1.2; }

.dashboard .btn-cta.btn-small,
.sheet .btn-cta.btn-small { padding: 8px 16px; font-size: .88rem; }

/* ---------- the seven-screen nav ----------
   Phone: a fixed bottom bar of seven equal cells (grid-auto-columns, so the
   count is the nav's, not the stylesheet's). From 720px up the page becomes
   a two-column grid and the nav is a sticky left column. */
.dash-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Settings sub-nav: Profile · Pricing · Payments · Emails ---------- */
.sub-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: -12px 0 -16px;
}

.sub-nav-item {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.sub-nav-item:hover { color: var(--ink); border-color: var(--ink-2); }

.sub-nav-item.current {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- Service pages: "‹ All services / Group Hikes" above the tabs ---------- */
.sub-nav-head { display: flex; align-items: baseline; gap: 14px; margin: -8px 0 -12px; }
.sub-nav-back { font-size: .9rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.sub-nav-back:hover { color: var(--ink); }
.sub-nav-title { margin: 0; font-size: 1.35rem; }
.sub-nav-head + .sub-nav { margin-top: 4px; }

/* ---------- Services list ---------- */
.service-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.service-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.service-card:hover { border-color: var(--ink-2); }
.service-card-emoji { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-2); }
.service-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.service-card-body small { color: var(--muted); }

/* ---------- Overview ---------- */
.overview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.overview-row time { color: var(--muted); margin-right: 8px; }

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  font-size: .66rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  transition: color .15s;
  min-width: 0;
}

.nav-item > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  font-size: 1.2rem;
  line-height: 1.2;
}

.nav-item:hover { color: var(--ink); }

.nav-item.current {
  color: var(--coral);
  font-weight: 600;
}

body.has-nav .dashboard { padding-bottom: 104px; }

@media (min-width: 720px) {
  body.has-nav {
    display: grid;
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }

  .share-bar { grid-column: 1 / -1; }

  .dash-nav {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    right: auto;
    align-self: start;
    height: 100vh;
    z-index: 40;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 2px;
    padding: 24px 16px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: .95rem;
  }

  .nav-icon { font-size: 1.05rem; width: 1.4em; text-align: center; }

  .nav-item:hover { background: rgba(255, 255, 255, .6); }

  .nav-item.current {
    background: var(--paper);
    box-shadow: var(--shadow-sm);
  }

  body.has-nav .dashboard {
    margin-left: 0;
    padding-bottom: 96px;
  }
}

/* ---------- the page ---------- */

.dashboard {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 48px) 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.dashboard section > h2,
.screen-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 22px;
}

.screen-head { max-width: 62ch; }
.screen-head h2 { margin-bottom: 10px; }

.lede,
.muted {
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0;
}

.muted { color: var(--muted); font-size: .95rem; }

.dashboard h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  margin: 0;
}

.dashboard .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dashboard > section > .row { margin-bottom: 24px; }

/* A white panel. */
.card,
.auth-form,
.dashboard .req-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card,
.dashboard section.card { padding: clamp(20px, 3vw, 28px); }

/* ---------- form system ----------
   Stacked label + control, the same shape as the sign-up form. Inline
   row-shaped labels (checkboxes, price rows) opt out below. */
.dashboard label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: .9rem;
  color: var(--ink-2);
}

.dashboard input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dashboard select,
.dashboard textarea,
.sheet input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.sheet select,
.sheet textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.dashboard textarea,
.sheet textarea { resize: vertical; line-height: 1.5; }

.dashboard input:focus,
.dashboard select:focus,
.dashboard textarea:focus,
.sheet input:focus,
.sheet select:focus,
.sheet textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}

.dashboard input[readonly] { color: var(--muted); }

.dashboard input[type="checkbox"],
.sheet input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--coral);
}

.dashboard .auth-form {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.dashboard .auth-form .btn-cta { align-self: flex-start; }

.dashboard fieldset,
.sheet fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard legend,
.sheet legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard .services label,
.dashboard .leader-active,
.dashboard label.btn {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: .95rem;
  color: var(--ink);
}

.dashboard .form-message,
.sheet .form-message {
  min-height: 1.2em;
  margin: 0;
  font-size: .9rem;
  color: var(--ink-2);
}

.field-hint {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The foot of every screen: the calendar sync offer (when the feed is
   configured) above the one line of where to write when stuck. */
.dash-foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
  display: grid;
  gap: 18px;
}

.dash-foot p { margin: 0; }
.dash-foot a { color: var(--ink-2); font-weight: 600; }
.dash-foot a:hover { color: var(--coral); }
.dash-foot .btn { font-weight: 500; }

.dash-foot-feed {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.5;
}

.dash-foot-feed .row { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.dash-foot-icon { font-size: 1.4rem; line-height: 1.2; }

/* ---------- Inbox ---------- */
.screen-inbox { gap: 48px; }

/* ---------- A service's Reports page: the framed reports app ---------- */
/* Height is set by runs.js from the app's own reports; this is the floor
   before the first one lands, tall enough that the login/loading state
   doesn't flash as a sliver. */
.screen-service-reports { gap: 16px; }
.runs-frame { display: block; width: 100%; min-height: 60vh; border: 0; background: transparent; }

/* ---------- Pricing: one card per service, a row per rate ---------- */
.screen-service-config #service-config { display: flex; flex-direction: column; gap: 18px; }

.screen-service-config .card h3 { margin-bottom: 10px; }

.rate-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(64px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  font-weight: 400;
  color: var(--ink);
}

.rate-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 600;
}

/* The generic `.dashboard input:not([type="checkbox"]):not([type="radio"]):not([type="file"])`
   rule (~734) ties at (0,4,1). Adding .card (the pricing section ancestor) makes this
   (0,5,1), a robust specificity win independent of source order. */
.dashboard .card .rate-row .rate-input input[type="number"] { width: 92px; text-align: right; padding: 8px 12px; }

.rate-default {
  font-size: .8rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.rate-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

@media (max-width: 479px) {
  .rate-row { grid-template-columns: auto 1fr; grid-template-areas: "label label" "input default"; }
  .rate-row > span:first-child { grid-area: label; }
  .rate-row .rate-input { grid-area: input; }
  .rate-row .rate-default { grid-area: default; white-space: normal; }
}

.sample {
  margin: 12px 0 0;
  font-size: .9rem;
  color: var(--ink-2);
  font-style: italic;
}

.holiday-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: .85rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- Services: one card per group service, days + off-leash + surcharge + cap ---------- */
.svc-config h3 { margin-bottom: 10px; }

.svc-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0;
}

.svc-days label {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: var(--ink-2);
}

.svc-config > small { display: block; margin: 0 0 10px; color: var(--muted); font-size: .8rem; }

.svc-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }

.svc-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  color: var(--ink);
}

.dashboard .card.svc-config .svc-field input[type="number"] { width: 92px; text-align: right; padding: 8px 12px; }

.svc-duration { display: inline-flex; align-items: center; gap: 6px; }
/* Scoped to out-specify .dashboard .card.svc-config .svc-field input[type="number"]
   above, which also matches these — they're inside a .svc-field. */
.dashboard .card.svc-config .svc-field .svc-duration input[type="number"] { width: 64px; }

.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* ---------- Contracts: one card per group service, one textarea per section ---------- */
.screen-settings-contracts #contracts {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.screen-settings-contracts #contracts > h2 { margin-bottom: 6px; }

.contract-field { display: block; margin: 14px 0 0; font-size: .9rem; color: var(--ink-2); }
.contract-field textarea { display: block; width: 100%; margin-top: 6px; font: inherit; }
.contract-section textarea { min-height: 8rem; }
.contract-version { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------- Leaders ----------
   A roster card answers three questions in one look: who they are, whether
   they are on, and which days they cover. Identity on the left, the switch
   and Edit on the right, the rota underneath as a strip of days — no run-on
   sentence, and no lonely button under a divider. */
.leaders-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
  max-width: none;
}
.leaders-head-text { max-width: 56ch; }
.leaders-head { margin-bottom: 10px; }
.leaders-head .btn-cta { flex: none; margin-top: 6px; }

.roster-count {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
  white-space: nowrap;
}

.leader-list { gap: 14px; }

.leader-card { gap: 14px; }
.leader-card.is-off { background: var(--bg); }
.leader-card.is-off .leader-avatar { opacity: .5; }
.leader-card.is-off .leader-card-who strong { color: var(--muted); }

.leader-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.leader-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-2);
}

.leader-avatar-initials {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--coral);
  background: var(--coral-soft);
}

.leader-card-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.leader-card-who strong {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--serif); font-weight: 500; font-size: 1.16rem; letter-spacing: -.01em;
}
.leader-card-email { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }

/* The switch and Edit, as one right-hand group. */
.leader-card-tools { flex: none; display: flex; align-items: center; gap: 14px; }

.leader-active {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-2);
}
.dashboard .leader-active input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.leader-active .switch-track { width: 42px; height: 25px; }
.leader-active .switch-track::after { width: 19px; height: 19px; }
.leader-active input:checked ~ .switch-track { background: var(--mint); }
.leader-active input:checked ~ .switch-track::after { transform: translateX(17px); }
.leader-active input:focus-visible ~ .switch-track { outline: 2px solid var(--coral); outline-offset: 2px; }
.leader-active-text { min-width: 3.2em; }
.leader-card.is-off .leader-active-text { color: var(--muted); }

.leader-always {
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #1F8A62;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* The rota: a row per service, seven pips a week, under a hairline so the
   person and their days are two separate reads rather than one block. */
.leader-rota {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.leader-rota-row { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.leader-rota-svc {
  flex: none;
  width: 104px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-2);
}
.week-strip { display: inline-flex; gap: 4px; }
.day-pip {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}
.day-pip.is-on { background: var(--ink-2); color: var(--paper); }
.leader-card.is-off .day-pip.is-on { background: var(--muted); }
.leader-rota-cap { font-size: .78rem; font-weight: 600; color: var(--muted); }
.leader-rota-empty { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.leader-rota-empty b { font-weight: 700; color: var(--ink-2); }

.leader-empty { display: grid; justify-items: start; gap: 10px; padding: 28px 26px; }
.leader-empty-emoji { font-size: 1.8rem; }
.leader-empty h3 { margin: 0; }
.leader-empty .btn-cta { margin-top: 8px; }

@media (max-width: 560px) {
  .leaders-head .btn-cta { margin-top: 0; }
  .leader-card-head { flex-wrap: wrap; }
  .leader-card-tools { width: 100%; justify-content: space-between; }
  /* Source order is name · days · cap; on a phone the cap rides up beside
     the name (order 2) and the strip takes the line under both. */
  .leader-rota-svc { flex: 1 1 auto; width: auto; order: 1; }
  .leader-rota-cap { order: 2; margin-left: auto; }
  .week-strip { order: 3; flex-basis: 100%; }
}

.leader-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.leader-photo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.leader-photo-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

.rota-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.rota-grid th { font-weight: 500; color: var(--muted); text-align: left; padding: 4px 6px; }
.rota-grid thead th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.rota-grid td { text-align: center; padding: 4px 6px; }
.rota-grid label { display: inline-flex; }

.rota-cap {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.rota-cap input { width: 84px; }

/* ---------- Payments ----------
   One card per way of getting paid, each led by its brand mark. Stripe on
   its own (it has states); Zelle and Venmo share a form. */
.pay-grid {
  display: grid;
  gap: 20px;
  align-items: start;
  max-width: 720px;
}

.pay-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pay-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.pay-card-head h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 1.2rem;
}

.pay-kind {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-card-head .muted { font-size: .9rem; }

.pay-card-head-2 {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pay-logo {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  box-shadow: 0 8px 18px -10px rgba(27, 20, 16, .45);
}

.pay-logo-cash { display:grid; place-items:center; width:48px; height:48px; border-radius:12px; background: var(--mint-soft, var(--bg)); font-size:1.5rem; }

.pay-state { white-space: nowrap; }

/* An on/off switch (cash has no handle, just a yes or no). */
.pay-switch {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  cursor: pointer;
}

.pay-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.pay-switch-track {
  display: block;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .18s;
}

.pay-switch-track::after {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(27, 20, 16, .25);
  transition: transform .18s;
}

.pay-switch:has(input:checked) .pay-switch-track { background: var(--mint); }
.pay-switch:has(input:checked) .pay-switch-track::after { transform: translateX(18px); }
.pay-switch:has(input:focus-visible) .pay-switch-track { outline: 2px solid var(--coral); outline-offset: 2px; }
.pay-state:not(.pill-ok) { background: var(--bg-2); color: var(--muted); }

.pay-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pay-form .btn-cta,
.pay-actions .btn-cta { align-self: flex-start; }

.pay-actions { margin-top: 4px; }
.pay-actions .form-message { flex: 1 1 auto; }

.dashboard .pay-card .stripe-block,
.dashboard .pay-card .stripe-confirm { margin-top: 0; padding-top: 0; border-top: 0; }

.dashboard .pay-card .stripe-confirm {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--coral-soft);
}

.dashboard .pay-card .stripe-state { margin: 0 0 12px; font-weight: 500; }

/* ---------- phone-size tweaks ---------- */
@media (max-width: 719px) {
  .share-bar { padding: 12px 16px; gap: 10px 16px; }
  .share-bar-biz { font-size: 1.05rem; }
  .share-bar-links { flex-basis: 100%; order: 3; gap: 8px 14px; justify-content: center; }
  /* With the host gone the chip is short enough to keep whole: no shrinking,
     no sideways scroll inside it — the row wraps instead if it has to. */
  .share-bar-link { flex-wrap: wrap; justify-content: center; }
  .share-bar-link code { flex: none; max-width: 100%; }
  /* No room for the host on a phone, and half of one ("loc…") says nothing.
     The chip becomes the slug alone, slash and all — the part a provider
     reads, and the part they are about to say out loud. */
  .share-host { display: none; }
  .share-slug::before { content: '/'; margin-right: 1px; color: var(--muted); font-weight: 600; }
  .dashboard { gap: 32px; }
}
.req-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  color: var(--muted);
  font-size: .95rem;
}

/* A request is a decision, and the card is built in the order one is made:
   what and how much · who · when (with the times) · the facts · anything
   that should give pause · the buttons. Type does the hierarchy — the serif
   for the two things read from across the room (the dates, the price),
   the sans for everything else — and colour is reserved for the flags, so
   a clean card reads clean at a glance. */
.req-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .18s, border-color .18s;
}

.req-card:hover { box-shadow: var(--shadow-sm); border-color: var(--line-strong); }

/* The next thing on the books. */
.req-card-next { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }

.req-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* The service, with the calendar's colour for it. */
.svc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--bg);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
}
.svc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hue, var(--muted)); }
.svc-sitting { --hue: var(--cal-sitting); } .svc-boarding { --hue: var(--cal-boarding); } .svc-dropins { --hue: var(--cal-dropins); }
.svc-walks { --hue: var(--cal-walks); } .svc-groupWalks { --hue: var(--cal-groupWalks); } .svc-hikes { --hue: var(--cal-hikes); } .svc-daycare { --hue: var(--cal-daycare); }

.req-card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.req-card-price small {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.req-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.req-who strong {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.req-ago { margin-left: auto; font-size: .82rem; color: var(--muted); white-space: nowrap; }

.pill-new { background: var(--sun-soft); color: #8A6100; }
.pill-returning { background: var(--mint-soft); color: #1F8A62; }

/* The dates, in the serif, and the times under them. */
.req-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 2px;
}
.req-when-head {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.2;
  color: var(--ink);
}
.req-urgency {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.req-urgency.is-near { background: var(--coral-soft); color: #C63A1F; }
.req-when-sub {
  flex-basis: 100%;
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* The picked days on a walk or drop-in booking. Twelve dates joined with
   dots read as a paragraph and got skimmed; on these bookings the dates are
   the decision, so they are a strip of chips — the window stated once above
   them, the month once per run, then a weekday over a number. */
.visit-window {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 600;
}
.visit-window i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

.visit-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.visit-month {
  margin: 0 2px 0 8px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.visit-month:first-child { margin-left: 0; }

.visit-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 46px;
  padding: 5px 9px 7px;
  border-radius: 12px;
  background: var(--bg-2);
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.visit-chip b {
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.visit-dates.is-clipped .visit-chip-extra { display: none; }

.visit-more {
  padding: 9px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.visit-more:hover { border-color: var(--coral); color: var(--coral); }

.req-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }

.req-card-pets,
.req-card-address {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-2);
  font-size: .92rem;
}
.req-card-address a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.req-card-address a:hover { color: var(--coral); border-bottom-color: currentColor; }

.req-card-pets::before { content: '🐕'; font-size: .85em; }
.req-card[data-service="boarding"] .req-card-pets::before { content: '🛏️'; }
.req-card[data-service="dropins"] .req-card-pets::before { content: '🐈'; }
.screen-inbox .req-card-address::before { content: '📍'; font-size: .85em; }

/* The fit answers on a group request: a key/value grid that is scanned,
   not read. */
.req-fit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 18px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.req-fit div { display: grid; gap: 1px; min-width: 0; }
.req-fit dt { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.req-fit dd { margin: 0; font-size: .9rem; color: var(--ink); overflow-wrap: anywhere; }

.req-card-comment {
  margin: 2px 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--coral-soft);
  font-size: .92rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-2);
}

.req-placements { font-size: .88rem; color: var(--ink-2); }

.req-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pill-holiday { background: var(--sun-soft); color: #8A6100; }
.pill-conflict { background: var(--coral-soft); color: #C63A1F; }

/* Call · Text · Email · Map, at the right end of the action row. */
.req-contact-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.req-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.req-contact-btn:hover { background: var(--bg); color: var(--ink); }

/* Upcoming's day groups. */
.req-list .req-group {
  margin: 14px 0 -4px;
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.req-list .req-group:first-child { margin-top: 0; }
.req-group-n { margin-left: 6px; font-weight: 500; color: var(--muted); opacity: .8; }

@media (max-width: 640px) {
  .req-card { padding: 18px 18px 16px; border-radius: 18px; }
  .req-when-head { font-size: 1.2rem; }
  .req-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req-ago { margin-left: 0; flex-basis: 100%; }
  .req-contact-btns { margin-left: 0; flex-basis: 100%; }
  .req-contact-btn span:last-child { display: none; }
  .req-contact-btn { padding: 8px 10px; font-size: 1rem; }
}

.req-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.req-actions .btn { padding: 9px 18px; }

.req-decline-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.req-decline-form textarea {
  width: 100%;
  min-height: 72px;
}

.req-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill-ok {
  background: var(--mint-soft, #DFF7EC);
  color: #1F8A62;
}

/* Why this request cannot be approved yet — the run calendar link beneath it
   is what fixes it, so this reads as an instruction, not an error. */
.req-card-block {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--sun-soft);
  font-size: .88rem;
  color: var(--ink-2);
}

.req-card-message {
  margin: 4px 0 0;
  font-size: .88rem;
  color: var(--coral);
}

.req-card-message:empty { display: none; }

/* Section titles carry a count once the list has loaded. */
.req-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  margin-left: 10px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 6px;
}

.req-count.zero { background: var(--bg-2); color: var(--muted); }


/* What each ticked service is doing on the booking page, next to its box:
   "Live", "Hidden", or the link that would make a group service live. */
.svc-status {
  margin-left: 8px;
  font-size: .82rem;
  color: var(--muted);
}

.svc-status a {
  color: var(--coral);
}

/* A service /admin has closed to new providers: the box is disabled and the
   status line carries the reason (settings.js, provider-pages.ts). */
.services label.svc-closed {
  color: var(--muted);
}

/* Card payments (Stripe): its own block under the settings form, because it
   saves on its own — connecting is not part of "Save changes". */
.stripe-block,
.stripe-confirm {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.stripe-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.stripe-help {
  margin: 4px 0;
  font-size: .85rem;
  color: var(--muted);
}

/* The logo block on Settings: a square preview beside the picker. */
.logo-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.logo-block h3 { margin: 0 0 12px; font-size: 1rem; }

/* The Rover calendar sync block on Settings, same separation as the logo block. */
.rover-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.rover-block h3 { margin: 0 0 12px; font-size: 1rem; }
.logo-row { display: flex; gap: 16px; align-items: flex-start; }
.logo-preview { width: 96px; height: 96px; flex: 0 0 96px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-paw { font-size: 2.4rem; }
.logo-actions { flex: 1; min-width: 0; }

.stripe-state {
  margin: 0 0 10px;
}

.stripe-help code {
  font-size: .8rem;
  word-break: break-all;
}

.stripe-confirm p:first-child {
  margin: 0 0 4px;
  font-weight: 600;
}

/* ---------- shared chrome: toast, bottom sheet, pill ---------- */

/* One toast lives in the shell; lib.js fills it and hides it again. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(90vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: .92rem;
  box-shadow: var(--shadow-sm);
}

.toast[hidden] { display: none; }
.toast-bad { background: var(--coral); }

@media (min-width: 720px) {
  .toast { bottom: 32px; }
}

/* Confirmations and small forms rise from the bottom on a phone and sit as a
   centred card on a wide screen — one element, two shapes. */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
}

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: -.01em;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: var(--radius); }
}

/* A small badge next to a heading — "Admin view" on a console-opened session. */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--sans, inherit);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.pill-warn {
  background: var(--coral-soft, #FFE6DF);
  color: var(--ink);
}

/* ---------- the Run placement screen ---------- */
/* Seven day columns, side by side, scrolling sideways on a phone rather than
   squeezing a week into a screen's width. */
.cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.tab {
  border: 1px solid var(--line, rgba(0, 0, 0, .15));
  background: none;
  border-radius: 999px;
  padding: 5px 14px;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}

.tab.current {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.cal-week {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.week-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#week-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 100%;
}

.day-col {
  border: 1px solid var(--line, rgba(0, 0, 0, .12));
  border-radius: var(--radius, 10px);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-col.targeting { border-color: var(--mint, #2E9E7B); }

.day-head {
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.day-holiday {
  margin: 0;
  font-size: .78rem;
  color: var(--coral, #E4644C);
}

.leader-name {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .7;
}

.cell {
  border: 1px dashed var(--line, rgba(0, 0, 0, .2));
  border-radius: 8px;
  padding: 6px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.targeting .cell { border-style: solid; }

.cell-head {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  opacity: .75;
}

.chip {
  border: 1px solid var(--line, rgba(0, 0, 0, .15));
  background: var(--paper);
  border-radius: 999px;
  padding: 3px 10px;
  font: inherit;
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
}

.chip-pending { border-style: dashed; }
.chip.selected { background: var(--ink); color: var(--paper); }

.tray {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tray-day {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tray-day-name {
  font-size: .78rem;
  opacity: .7;
  min-width: 72px;
}

.info-lines {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.day-row-to {
  font-size: .8rem;
  opacity: .7;
}

.inline-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
}

.pickup-service {
  border: 1px solid var(--line, rgba(0, 0, 0, .12));
  border-radius: var(--radius, 10px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pickup-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pickup-shift {
  min-width: 90px;
  font-size: .85rem;
}

/* Onboarding tour */
body.no-nav .dashboard { padding-bottom: 2rem; }
.onb-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.onb-dots { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.onb-dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--paper, #eee); border: 1px solid var(--muted, #999); }
.onb-dots li.current { background: var(--coral, #F2725B); border-color: var(--coral, #F2725B); }
.onb-step { max-width: 640px; margin: 0 auto; }
.onb-link { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; padding: .75rem 1rem; background: var(--paper, #fff); border-radius: 12px; }
.onb-link code { font-size: 1.15rem; overflow-wrap: anywhere; }
.phone-frame { width: 240px; height: 480px; margin: 1rem auto; border: 8px solid #1F1B16; border-radius: 28px; overflow: hidden; background: #fff; }
/* The frame is 240px wide *including* its 8px borders, so the page inside
   gets 224 × 464. The iframe is laid out at those sizes ÷ the scale
   (407 × 844) so nothing is clipped at the right edge. */
.phone-frame iframe { width: 407px; height: 844px; border: 0; transform: scale(.55); transform-origin: 0 0; pointer-events: none; }
.onb-poster { margin: 1rem auto; max-width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.onb-poster-note { text-align: center; color: var(--muted); font-size: .9rem; }
/* Step 2 — the independence page. Editorial: a kicker, display type with
   an italic accent, numbered points with room to breathe. */
.onb-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--coral, #F2725B); font-weight: 700; margin: 0 0 .5rem; }
.onb-display { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .75rem; }
.onb-display em { font-style: italic; color: var(--coral, #F2725B); }
.onb-indie-points { list-style: none; margin: 1.75rem 0; padding: 0; display: grid; gap: 1.25rem; }
.onb-indie-points li { display: flex; gap: 1rem; align-items: flex-start; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.onb-indie-points li p { margin: .2rem 0 0; color: var(--muted); }
.onb-indie-num { font-variant-numeric: tabular-nums; font-size: .8rem; font-weight: 700; color: var(--coral, #F2725B); padding-top: .2rem; min-width: 1.6rem; }
.onb-indie-cta { margin-top: 1.5rem; font-weight: 600; }
.onb-money { margin-top: 1rem; }
.onb-nav { display: flex; justify-content: space-between; gap: 1rem; max-width: 640px; margin: 2rem auto 0; }
.onb-nav .btn { min-width: 7rem; }
/* “Taking you to Stripe…” gets a line of its own, clear of the cards. */
#plan-message { min-height: 1.5em; margin: 1.25rem 0 .5rem; }
.onb-skip { text-align: center; margin-top: 1rem; }
/* Plan cards (tour + My Plan) */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.plan-card { display: flex; flex-direction: column; gap: .35rem; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.plan-card:hover, .plan-card:focus-visible { outline: 2px solid var(--coral, #F2725B); }
.plan-name { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.plan-price { font-family: Fraunces, Georgia, serif; font-size: 2rem; }
.plan-price small { font-size: 1rem; color: var(--muted, #6B645B); }
.banner-ok { background: var(--mint, #DFF3EA); }
.banner-warn { background: #FFF1D6; }
.plan-line { font-size: 1.1rem; }
.plan-cancel-section { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.plan-cancel-section h3 { margin: 0 0 .25rem; font-size: 1rem; }
.plan-cancel-section .btn { margin-top: .75rem; }
.settings-foot { margin-top: 1.5rem; }
/* Promote: one item per artwork — a scaled preview and a download. */
.promote-intro { color: var(--muted); margin: 6px 0 22px; }
/* `.dashboard section.promote-stats`, not `.promote-stats`: the section reset
   above (`.dashboard section { padding: 0; margin: 0 }`) outranks a lone
   class, and used to strip this card of its padding and the gap under it. */
.dashboard section.promote-stats { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 2.5vw, 24px); margin: 0 0 28px; box-shadow: var(--shadow-sm); }
.promote-stats-head h3 { margin: 0; font-size: 1rem; }
.promote-stats-head p { margin: 2px 0 14px; font-size: .85rem; }
.promote-scans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.stat-num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .8rem; color: var(--muted); }
.promote-scans-empty { margin: 10px 0 0; font-size: .85rem; }
/* align-items: start so the short business-card item is not stretched to the
   height of the poster beside it; max-width so an item never grows wider than
   the 260px preview inside it. */
.promote-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; gap: 28px 24px; }
.promote-item { max-width: 300px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); }
.promote-preview { width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.promote-meta h3 { margin: 16px 0 2px; font-size: 1rem; }
.promote-size, .promote-count { color: var(--muted); font-size: .85rem; margin: 2px 0; }
.promote-meta .btn { margin-top: 14px; display: inline-block; }
.promote-msg { color: var(--coral); font-size: .85rem; margin: 8px 0 0; }
.promote-empty { color: var(--muted); margin-top: 14px; }

/* ---------- the Calendar screen (Apple Calendar look) ---------- */
:root {
  --cal-sitting: #3478F6; --cal-boarding: #5856D6; --cal-dropins: #AF52DE; --cal-walks: #34C759;
  --cal-groupWalks: #30B0C7; --cal-hikes: #FF9500; --cal-daycare: #A2845E; --cal-rover: #8E8E93;
  --cal-red: #FF3B30;
  /* One hour's height in the timed grid, the width of the hour gutter beside
     it, and how many day columns a Week holds. calendar-views.js reads
     --hour-px off the root and lays the blocks out to match, so the ruled
     background and the blocks can't disagree; --cal-days is written per-render
     onto .cal-week-view (7 on a desk, 3 on a phone). --cal-hair is the
     divider: one hairline weight for every rule on the screen. */
  --hour-px: 48px; --cal-gutter: 56px; --cal-days: 7;
  /* One lane of the month grid — the height of a stay's stripe. calendar.js
     indents the day's dots by the same unit, so the two stay in step. */
  --cal-lane-h: 22px;
  --cal-hair: color-mix(in srgb, var(--line) 70%, transparent);
}
.cal-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar h2 { margin: 0; flex: 1 1 auto; font-size: 1.6rem; }
/* ‹ Today › reads as three outlined pills through the dashboard's ghost-button
   rule — a lot of chrome for a step sideways. Quiet them to plain glyphs and
   a text button, and keep the 44px touch box on the arrows. */
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .btn-ghost.btn-small { border-color: transparent; background: none; color: var(--ink-2); padding: 8px 12px; min-height: 44px; }
.cal-nav .btn-ghost.btn-small:hover { background: var(--bg-2); color: var(--ink); }
#cal-prev, #cal-next { font-size: 1.25rem; line-height: 1; }
#cal-today { color: var(--ink); }
/* The Day/Week/Month switch is a segmented control: 36px tall, one thumb. */
.cal-views { display: inline-flex; align-items: center; background: var(--bg-2); border-radius: 10px; padding: 3px; gap: 2px; }
.cal-view { position: relative; border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 500; line-height: 30px; padding: 0 14px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.cal-view.current { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.cal-sitting { --hue: var(--cal-sitting); } .cal-boarding { --hue: var(--cal-boarding); } .cal-dropins { --hue: var(--cal-dropins); } .cal-walks { --hue: var(--cal-walks); }
.cal-groupWalks { --hue: var(--cal-groupWalks); } .cal-hikes { --hue: var(--cal-hikes); } .cal-daycare { --hue: var(--cal-daycare); } .cal-rover { --hue: var(--cal-rover); }
.cal-legend-item .cal-dot, .cal-line .cal-dot { background: var(--hue); }
.cal-skeleton { height: 480px; border-radius: 12px; background: linear-gradient(90deg, var(--bg-2) 25%, var(--paper) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: cal-shimmer 1.2s infinite; }
@keyframes cal-shimmer { to { background-position: -200% 0; } }

/* Month */
.cal-month { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: .75rem; color: var(--muted); text-align: right; padding: 6px 8px 4px; border-bottom: 1px solid var(--cal-hair); }
.cal-week-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: var(--cal-lane-h); border-bottom: 1px solid var(--cal-hair); min-height: 96px; position: relative; }
.cal-week-row:last-child { border-bottom: 0; }
.cal-cell { position: relative; border-right: 1px solid var(--cal-hair); padding: 4px 4px 2px; min-width: 0; }
.cal-cell:nth-child(7) { border-right: 0; }
.cal-out { color: var(--muted); background: rgba(0,0,0,.015); }
.cal-daynum { display: block; margin-left: auto; width: 24px; height: 24px; border: 0; background: none; font: inherit; font-size: .8rem; border-radius: 50%; cursor: pointer; text-align: center; color: inherit; }
.cal-today .cal-daynum { background: var(--cal-red); color: #fff; font-weight: 600; }
.cal-cell-lines { display: flex; flex-direction: column; gap: 1px; }
.cal-line { display: flex; align-items: center; gap: 4px; border: 0; background: none; font: inherit; font-size: .72rem; padding: 1px 2px; border-radius: 4px; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.cal-line b { font-weight: 600; }
.cal-line:hover { background: var(--bg-2); }
.cal-more { border: 0; background: none; font: inherit; font-size: .7rem; color: var(--muted); cursor: pointer; text-align: left; padding: 1px 2px; }
.cal-bar { position: relative; margin: 1px 2px 0; height: 20px; border: 0; font: inherit; font-size: .72rem; font-weight: 500; background: var(--hue); color: #fff; border-radius: 5px; padding: 0 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 1; }
.cal-bar-cont { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.cal-bar-on { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-pending.cal-bar { background: var(--paper); color: var(--ink); outline: 1px dashed var(--hue); outline-offset: -1px; }
.cal-pending.cal-line { opacity: .8; }

/* Week + Day */
/* ".cal-week-view" (not ".cal-week") — the Run placement screen already owns
   the literal ".cal-week" class for its toolbar row on this same stylesheet. */
.cal-week-view, .cal-day-col { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.cal-week-head, .cal-allday { display: grid; grid-template-columns: var(--cal-gutter) repeat(var(--cal-days), minmax(0, 1fr)); border-bottom: 1px solid var(--cal-hair); }
.cal-day-col .cal-allday { grid-template-columns: var(--cal-gutter) 1fr; }
.cal-gutter-spacer { font-size: .65rem; color: var(--muted); text-align: right; padding: 4px 6px; }
.cal-week-day { border: 0; background: none; font: inherit; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink-2); }
.cal-week-day span { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.cal-week-day b { font-size: 1.1rem; font-weight: 500; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; text-align: center; }
.cal-week-day.cal-today b { background: var(--cal-red); color: #fff; font-weight: 600; }
.cal-allday-grid { display: grid; grid-column: 2 / -1; grid-template-columns: repeat(var(--cal-days), minmax(0, 1fr)); gap: 1px 0; padding: 2px 0; }
.cal-day-col .cal-allday-grid { grid-template-columns: 1fr; }
.cal-scroll { max-height: 640px; overflow-y: auto; position: relative; }
.cal-grid { display: grid; grid-template-columns: var(--cal-gutter) repeat(var(--cal-days), minmax(0, 1fr)); position: relative;
  background: repeating-linear-gradient(to bottom, var(--cal-hair) 0 1px, transparent 1px var(--hour-px)); }
.cal-grid-one { grid-template-columns: var(--cal-gutter) 1fr; }
.cal-gutter { position: relative; }
.cal-gutter span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .65rem; color: var(--muted); }
.cal-col { position: relative; border-left: 1px solid var(--cal-hair); }
.cal-col-today { background: rgba(255, 59, 48, .03); }
/* A block is a desaturated wash of its service colour with a 3px accent bar
   down the left, not an outline in full-strength colour — seven saturated
   borders side by side on a phone read as noise. */
.cal-block { position: absolute; border: 0; border-left: 3px solid var(--hue); border-radius: 8px; background: color-mix(in srgb, var(--hue) 14%, var(--paper)); font: inherit; text-align: left; padding: 3px 6px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.cal-block-title { font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block-time { font-size: .68rem; line-height: 1.25; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A private walk/drop-in names who's on it — a third line under the title and
   the time, which is why timedColumnHtml() gives a windowed block a taller
   minimum than a plain one. */
.cal-assignee { font-size: .68rem; line-height: 1.25; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-assignee.cal-unassigned { color: var(--cal-hikes); font-weight: 600; }
.cal-pending.cal-block { border-left-style: dashed; background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 45%, transparent); }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--cal-red); z-index: 2; pointer-events: none; }
.cal-now i { position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--cal-red); }
.cal-day { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.cal-day-list { display: flex; flex-direction: column; gap: 6px; }
.cal-list-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 8px 10px; font: inherit; text-align: left; cursor: pointer; }
.cal-list-item .cal-dot { margin-top: 6px; flex: none; background: var(--hue); }
.cal-list-title { font-size: .9rem; font-weight: 600; color: var(--ink); }
.cal-list-when { font-size: .78rem; color: var(--muted); }
/* ---- the calendar on a phone (719px is this file's phone breakpoint) ----
   Taller hours, a narrower gutter, a toolbar that stays in reach, and 44px
   touch boxes on everything you're meant to hit. */
@media (max-width: 719px) {
  :root { --hour-px: 56px; --cal-gutter: 44px; }

  /* max(), not the bare inset: on a phone with no notch the inset is 0 and
     the pinned title's ascenders were shaved off by the viewport edge. */
  .cal-toolbar { position: sticky; top: 0; z-index: 4; gap: 8px 12px; margin: 0 0 10px; padding: max(8px, env(safe-area-inset-top)) 0 8px; background: var(--bg); }
  .cal-toolbar h2 { flex-basis: 100%; font-size: 1.25rem; }
  .cal-view { padding: 0 12px; }
  /* The thumb stays 30px tall; the finger gets 44. */
  .cal-view::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }

  /* Month: a 28px day number sitting in a 44px touch box — the padding does
     the growing and `background-clip` keeps the today circle at 28px — and
     "+2" as a count badge in the cell's bottom-right corner. */
  .cal-week-row { min-height: 88px; grid-template-rows: 44px; }
  .cal-daynum { width: 28px; height: 28px; line-height: 28px; padding: 8px; margin: -4px -4px 0 auto; box-sizing: content-box; background-clip: content-box; }
  .cal-more { position: absolute; right: 4px; bottom: 3px; padding: 0 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: .65rem; line-height: 17px; }
  /* The badge reads "+4" on screen, but a screen reader should still hear
     "+4 more" — clip it out of view rather than `display: none`, which
     would drop it from the accessibility tree too. Same recipe as .sr-only,
     repeated rather than shared: this span sits inside an absolutely
     positioned badge, and .sr-only's own `position: absolute` would fight
     that parent's box instead of composing with it. */
  .cal-more-word { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

  /* Day: the hour grid is the screen, so it stays; the list moves under it.
     dvh, not vh — a phone's URL bar eats the difference. --cal-stick is the
     toolbar's measured height (calendar.js's stickyOffset()); the trailing
     120px covers the bottom nav plus top/bottom scroll margins so the grid
     never runs under either. */
  .cal-day { grid-template-columns: 1fr; }
  .cal-scroll { max-height: calc(100dvh - var(--cal-stick, 120px) - 120px); }

  /* Week goes full-bleed: the card's `overflow: hidden` would trap the sticky
     day names in a scrollport of their own, so the rounded box gives way and
     the three rows carry their own hairlines. The names then park directly
     under the sticky toolbar — calendar.js measures it into --cal-stick. */
  .cal-week-view { border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .cal-week-view .cal-week-head { position: sticky; top: var(--cal-stick, 0px); z-index: 3; background: var(--paper); border-top: 1px solid var(--cal-hair); }
  .cal-week-view .cal-allday { background: var(--paper); }
  .cal-week-view .cal-scroll { background: var(--paper); border-bottom: 1px solid var(--cal-hair); }
}
.cal-pop { position: absolute; z-index: 50; width: min(320px, calc(100vw - 16px)); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; font-size: .85rem; }
.cal-pop-head { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 2px; }
.cal-pop .cal-dot { background: var(--hue); }
.cal-pop-when { color: var(--ink-2); margin-bottom: 8px; }
.cal-pop-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 2px 0; color: var(--ink); }
.cal-pop-row > span:first-child { color: var(--muted); }
.cal-pop-val { white-space: pre-line; }
.cal-pop-assign { font: inherit; font-size: .82rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; width: 100%; min-width: 0; }
.cal-pop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.req-card-flash { animation: req-flash 1.6s ease-out 1; }
@keyframes req-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--cal-sitting); } 100% { box-shadow: none; } }

/* Narrow phones: a month cell has no room for wording, so a timed booking is
   a dot and a stay a stripe. Week drops to three days here too — that number
   is calendar.js's, matched to this same query. */
@media (max-width: 600px) {
  /* Stripes and dots are a third the height of the wording they replace, so
     the lanes shrink with them — otherwise a month of six near-empty rows
     runs to three screenfuls and pushes the "+4" badge off the bottom. */
  :root { --cal-lane-h: 12px; }
  .cal-cell-lines .cal-line { font-size: 0; height: 8px; padding: 0; gap: 2px; }
  .cal-cell-lines .cal-line .cal-dot { width: 6px; height: 6px; }
  .cal-bar { font-size: 0; height: 6px; margin-top: 2px; }
}

/* The phone page: one card per state, the iOS howto tucked under its button. */
/* The container spaces the cards (a margin on .phone-block would lose to
   the `.dashboard section { margin: 0 }` reset above); inside a card the
   lead, note, button, howto and result each stand clear of the last. */
#phone { display: flex; flex-direction: column; gap: 16px; }
.dashboard section.phone-block { padding: 22px clamp(20px, 3vw, 26px); }
.phone-lead { font-weight: 600; font-size: 1.05rem; margin: 0; }
.phone-block > .phone-lead + * { margin-top: 12px; }
.phone-block > .muted { line-height: 1.5; }
.phone-block > .btn { margin-top: 16px; }
.phone-block > .form-message { margin-top: 14px; }
/* Each card on the phone page opens with its step number and a plain-spoken
   title, so "what am I being asked to do" is answered before any button. */
.phone-block-head { display: flex; align-items: flex-start; gap: 14px; }
.phone-block-head + * { margin-top: 16px; }
.phone-step-no {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: .84rem;
  font-weight: 700;
}
.phone-block-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.phone-block-text h3 { margin: 0; }
.install-ios-note { margin-top: 14px; }

/* "Rather do it by hand?" — offered only where the browser has a real prompt
   to click; where it hasn't, the steps are already open. */
.install-toggle {
  display: inline-block;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.install-toggle:hover { color: var(--coral); }

.install-howto { margin-top: 16px; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; line-height: 1.5; }
.howto-cap {
  margin: 0 0 12px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.howto li { display: flex; align-items: flex-start; gap: 12px; }
.howto p { margin: 0; }
.howto b { font-weight: 700; }
.howto-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-2);
}
/* The Share and Add-to-Home-Screen glyphs, inline in the sentence that names
   them and sized to the text around them. */
.howto-icon { width: 1.15em; height: 1.15em; vertical-align: -.22em; margin: 0 2px; color: var(--sky); }
#phone > .onb-nav { margin: 12px auto 0; width: 100%; }
#phone > .form-message:empty { display: none; }
.share-glyph { font-size: 1.1em; }

/* Text grows; "Set up" and the ✕ stay on the right on one line — a phone's
   390px is narrow enough that wrap: wrap let the ✕ drop under the text. */
.nudge { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.nudge span { flex: 1 1 auto; min-width: 0; }
.nudge .btn { flex: 0 0 auto; }

/* =====================================================================
   Services — the list, and a service's own pages (Overview · Reports ·
   Placement · Config · Contract). One family: the masthead names the
   service once, the tabs name the page, and the body never repeats either.
   ===================================================================== */

/* ---------- the service masthead ---------- */
.service-head { display: flex; flex-direction: column; gap: 10px; margin: -8px 0 -18px; }
.service-head .sub-nav-back { font-size: .82rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.service-head .sub-nav-head { align-items: center; gap: 16px; margin: 0; }
.service-head-emoji {
  flex: none;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  font-size: 1.9rem;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.service-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.service-head .sub-nav-title { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.02em; line-height: 1.05; }
.service-head-sub { margin: 0; color: var(--muted); font-size: .95rem; }
.service-head + .sub-nav { margin-top: 4px; }

/* The tab row scrolls sideways on a phone rather than wrapping to two lines. */
.screen-service-overview .sub-nav, .screen-service-reports .sub-nav, .screen-service-placement .sub-nav,
.screen-service-config .sub-nav, .screen-service-contract .sub-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-left: calc(-1 * clamp(20px, 4vw, 48px));
  margin-right: calc(-1 * clamp(20px, 4vw, 48px));
  padding: 4px clamp(20px, 4vw, 48px);
  scroll-padding: 0 clamp(20px, 4vw, 48px);
}
.dashboard .sub-nav::-webkit-scrollbar { display: none; }
.sub-nav-item { flex: none; transition: color .15s, border-color .15s, background .15s, transform .15s; }
.sub-nav-item:active { transform: scale(.97); }

/* ---------- the list ---------- */
.service-list { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.service-card {
  position: relative;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.service-card:hover, .service-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); outline: none; }
.service-card:focus-visible { box-shadow: var(--shadow), 0 0 0 3px var(--coral-soft); }
.service-card-emoji { flex: none; width: 52px; height: 52px; font-size: 1.7rem; border-radius: 16px; transition: transform .2s ease; }
.service-card:hover .service-card-emoji { transform: rotate(-6deg) scale(1.06); }
.service-card-body { flex: 1; gap: 3px; padding-right: 18px; }
.service-card-body strong { font-family: var(--serif); font-weight: 500; font-size: 1.22rem; letter-spacing: -.01em; }
.service-card-body small { font-size: .9rem; }
.service-card-arrow {
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 1.4rem; line-height: 1;
  transition: transform .18s, color .18s;
}
.service-card:hover .service-card-arrow { transform: translate(4px, -50%); color: var(--ink); }
.service-card-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.fact-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem; font-weight: 500; letter-spacing: .01em;
  color: var(--ink-2);
  background: var(--bg-2);
}
.fact-chip-live { background: var(--mint-soft); color: #1F8A62; }
.fact-chip-warn { background: var(--sun-soft); color: #8A6100; }
.fact-chip-quiet { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

/* ---------- Overview ---------- */
#overview { display: flex; flex-direction: column; gap: 22px; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.stat b { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; letter-spacing: -.02em; line-height: 1; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat-warn { background: var(--sun-soft); border-color: transparent; }
.stat-warn span { color: #8A6100; }

.overview-card { padding: 0; overflow: hidden; }
.overview-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.overview-card-head .muted { font-size: .85rem; }
.overview-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.overview-day {
  display: grid; grid-template-columns: 72px 1fr;
  gap: 14px; align-items: flex-start;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-radius: 14px;
}
.overview-day time { display: flex; flex-direction: column; line-height: 1.15; padding-top: 3px; }
.overview-day time b { font-weight: 600; font-size: .95rem; }
.overview-day time span { font-size: .8rem; color: var(--muted); }
.overview-today { background: var(--bg-2); border-top-color: transparent; }
.overview-today time b { color: var(--coral); }
.overview-today + .overview-day { border-top-color: transparent; }
.overview-dogs { display: flex; flex-wrap: wrap; gap: 6px; }
.overview-dog {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: .9rem; font-weight: 500;
  transition: border-color .15s, background .15s, transform .15s;
}
.overview-dog:hover { border-color: var(--ink); background: var(--bg); transform: translateY(-1px); }
.overview-dog small { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #8A6100; }
.overview-dog-pending { border-style: dashed; background: var(--sun-soft); border-color: transparent; }
.overview-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 24px 36px; text-align: center; }
.overview-empty > span { font-size: 1.8rem; margin-bottom: 4px; }
.overview-empty p { color: var(--ink-2); font-weight: 500; }

.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.quick-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick-link:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.quick-link-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--bg-2); font-size: 1.1rem; }
.quick-link > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.quick-link strong { font-size: .92rem; font-weight: 600; }
.quick-link small { font-size: .78rem; color: var(--muted); }

/* ---------- Reports ---------- */
.screen-service-reports .screen-head { margin-bottom: -22px; }
.note { font-size: .92rem; color: var(--muted); }

/* ---------- Placement ---------- */
.place-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
.place-toolbar .cal-week { margin: 0; gap: 6px; }
.cal-week-label { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em; min-width: 9.5ch; text-align: center; }
.place-toolbar-right { display: flex; align-items: center; gap: 12px; }
.place-hint { font-size: .85rem; }
.dashboard .btn-ghost.btn-small.btn-icon { width: 34px; padding: 0; justify-content: center; font-size: 1.1rem; line-height: 1; }

#week-grid { gap: 10px; }
.day-col { background: var(--paper); border-radius: 18px; padding: 12px; gap: 10px; transition: border-color .15s, box-shadow .15s; }
.day-col.targeting { box-shadow: 0 0 0 3px var(--mint-soft); }
.day-today { border-color: var(--coral); }
.day-head { display: flex; align-items: baseline; gap: 6px; border-radius: 10px; padding: 2px 4px; margin: -2px -4px; }
.day-head:hover { background: var(--bg-2); }
.day-head strong { font-size: 1rem; }
.day-head span { font-size: .85rem; color: var(--muted); }
.day-today .day-head strong { color: var(--coral); }
.day-col .empty-state { padding: 8px 0 4px; font-size: .85rem; }
.leader-block { display: flex; flex-direction: column; gap: 6px; }
.leader-name { font-size: .7rem; font-weight: 600; letter-spacing: .06em; opacity: 1; color: var(--muted); }
.cell { border-radius: 12px; padding: 8px; margin-top: 0; background: var(--bg); border-color: var(--line-strong); transition: background .15s, border-color .15s; }
.cell:hover { background: var(--bg-2); }
.targeting .cell { border-color: var(--mint); background: var(--mint-soft); }
.cell-head { font-size: .72rem; opacity: 1; color: var(--muted); text-transform: capitalize; }
.cell-count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.chip { transition: background .15s, border-color .15s, transform .15s; }
.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: scale(.97); }
.chip.selected { box-shadow: 0 0 0 3px var(--coral-soft); border-color: var(--ink); }

.dashboard .tray.card { margin-top: 18px; padding: 18px 22px 20px; gap: 10px; }
.tray h3 { font-size: 1.1rem; margin-bottom: 2px; }
.tray > .empty-state { display: flex; align-items: center; gap: 8px; }
.tray > .empty-state::before { content: '✓'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mint-soft); color: #1F8A62; font-size: .8rem; font-weight: 700; }
.tray-day { padding: 6px 0; border-top: 1px solid var(--line); }
.tray-day:first-of-type { border-top: 0; }
.tray-day-name { opacity: 1; color: var(--muted); font-weight: 500; min-width: 84px; }

/* ---------- Config ---------- */
.dashboard .card.svc-config { padding: 0; }
.svc-block { padding: 22px clamp(20px, 3vw, 28px); border-top: 1px solid var(--line); }
.svc-block:first-child { border-top: 0; }
.svc-block-head { margin-bottom: 14px; }
.svc-block-head h3 { margin-bottom: 4px; }
.svc-block-head p { color: var(--muted); font-size: .9rem; }

.svc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0; }
.day-pill { position: relative; display: block; }
.day-pill input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-pill span {
  display: grid; place-items: center;
  height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s, transform .12s;
  user-select: none;
}
.day-pill:hover span { border-color: var(--ink-2); }
.day-pill input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day-pill input:active + span { transform: scale(.95); }
.day-pill input:focus-visible + span { outline: 2px solid var(--coral); outline-offset: 2px; }
.svc-days-summary { margin: 12px 0 0; font-size: .88rem; color: var(--ink-2); }
.svc-days-summary.is-warn { color: #C63A1F; font-weight: 500; }

/* A row with a switch on its right — the label wraps the input so the
   whole row is the tap target. Overrides the stacked-label default. */
.dashboard label.svc-switch {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 18px;
  cursor: pointer; font-weight: 400; color: var(--ink);
}
.svc-switch-text, .svc-field-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-switch-text strong, .svc-field-text strong { font-size: 1rem; font-weight: 600; }
.svc-switch-text small, .svc-field-text small { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.dashboard .svc-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  flex: none; position: relative;
  width: 48px; height: 28px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .18s;
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(27, 20, 16, .25);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.2);
}
.svc-switch input:checked ~ .switch-track { background: var(--mint); }
.svc-switch input:checked ~ .switch-track::after { transform: translateX(20px); }
.svc-switch input:focus-visible ~ .switch-track { outline: 2px solid var(--coral); outline-offset: 2px; }

.svc-fields { display: grid; gap: 18px; }
.dashboard label.svc-field {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0; border: 0; font-weight: 400; color: var(--ink);
}
.dashboard .card.svc-config .svc-field input[type="number"],
.dashboard .card.svc-config .svc-field .rate-input input[type="number"] { width: 96px; text-align: right; padding: 10px 14px; font-size: 1.05rem; font-weight: 600; }
.svc-config .rate-input { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }

/* The save row: a caption that says what state the card is in, then the
   button — disabled until something changed. */
.svc-actions { align-items: center; justify-content: flex-end; margin-top: 0; padding: 16px clamp(20px, 3vw, 28px); border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); }
.save-state { flex: 1; font-size: .88rem; color: var(--muted); min-width: 0; }
.save-state-dirty { color: #8A6100; font-weight: 500; }
.save-state-dirty::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); margin-right: 8px; vertical-align: 1px; }
.save-state-ok { color: #1F8A62; font-weight: 500; }
.save-state-ok::before { content: '✓ '; }
.save-state-busy { color: var(--muted); }
.dashboard .btn-cta[disabled] { opacity: .45; cursor: default; box-shadow: none; transform: none; }

/* ---------- Contract ---------- */
#contracts { display: flex; flex-direction: column; gap: 18px; }
.dashboard .card.contract-section { padding: 0; }
.contract-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px clamp(20px, 3vw, 28px) 18px; }
.contract-intro h3 { margin-bottom: 4px; }
.contract-intro p { color: var(--muted); font-size: .92rem; max-width: 60ch; }
.contract-version { flex: none; display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: .78rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.contract-version:empty { display: none; }
.contract-version.pill-live { background: var(--mint-soft); color: #1F8A62; }

.contract-parts { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.contract-part { border-top: 1px solid var(--line); padding: 18px clamp(20px, 3vw, 28px) 22px; }
.contract-part:focus-within { background: var(--bg); }
.dashboard label.contract-field { gap: 10px; margin: 0; font-weight: 400; color: var(--ink); }
.contract-field-head { display: flex; align-items: center; gap: 10px; }
.contract-part-num { flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 2px 8px; border-radius: 6px; background: var(--bg-2); }
.contract-part-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; letter-spacing: -.01em; }
.contract-field textarea { margin-top: 0; font-size: .95rem; line-height: 1.6; min-height: 8rem; }
.contract-section textarea { min-height: 8rem; }

/* The action row sticks above the bottom edge, so Save and Preview are
   in reach however far down the eight parts go. */
.svc-actions.contract-actions {
  position: sticky; bottom: 0; z-index: 5;
  background: rgba(255, 248, 240, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  gap: 10px;
}
.contract-actions .save-state { flex: 1 1 100%; order: -1; }
@media (min-width: 720px) { .contract-actions .save-state { flex: 1; order: 0; } }
@media (max-width: 719px) { body.has-nav .svc-actions.contract-actions { bottom: 64px; } }

/* ---------- phone ---------- */
@media (max-width: 479px) {
  .service-head-emoji { width: 50px; height: 50px; font-size: 1.6rem; border-radius: 15px; }
  .service-card { padding: 18px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-day { grid-template-columns: 60px 1fr; padding: 12px 10px; gap: 10px; }
  .svc-days { gap: 5px; }
  .day-pill span { height: 42px; font-size: .8rem; border-radius: 12px; }
  .dashboard label.svc-field { flex-direction: column; align-items: stretch; gap: 10px; }
  .dashboard .card.svc-config .svc-field input[type="number"] { width: 100%; text-align: left; }
  .svc-config .rate-input { width: 100%; }
  .place-hint { display: none; }
  .contract-intro { flex-direction: column; gap: 10px; }
}

/* The old stacked-label rules (`.dashboard label`, `.svc-days label`) must
   not reach the day pills: each is a block whose span is the whole pill. */
.dashboard .svc-days label.day-pill { display: block; flex-direction: row; align-items: stretch; gap: 0; font-size: inherit; }
.dashboard .svc-days label.day-pill span { width: 100%; }
@media (max-width: 479px) { .overview-card-head .muted { display: none; } }
.screen-service-reports .screen-head { margin: 0 0 -20px; }
.place-toolbar-right { margin-left: auto; }

/* ---------- Clients roster ----------
   Rows, not a table: identity at the left edge where the eye starts, every
   number right-aligned and quiet. One layout at every width — the meta
   column wraps under the name below 480px rather than becoming a second
   design to keep in sync. */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.client-search { margin: 0 0 12px; }
.client-search input {
  width: 100%; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 18px; font: inherit; font-size: .95rem; background: var(--paper);
}
.client-sort { display: flex; gap: 4px; margin: 0 0 12px; font-size: .8rem; }
.sort-btn { border: 0; background: none; color: var(--muted); padding: 4px 8px; border-radius: 8px; cursor: pointer; font: inherit; }
.sort-btn.selected { color: var(--ink); font-weight: 600; background: var(--bg-2); }

.client-list { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.client-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.client-row:last-child { border-bottom: none; }
.client-row:hover { background: var(--bg-2); }
.client-av {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; font-size: .8rem; flex: none;
}
.client-av-a { background: var(--coral-soft); color: var(--coral); }
.client-av-b { background: var(--mint-soft); color: #1a8a62; }
.client-av-c { background: var(--sky-soft); color: #3f6fd0; }
.client-av-d { background: var(--sun-soft); color: #a8760a; }
.client-av-e { background: var(--lilac); color: #6b52c9; }
.client-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.client-nm { font-weight: 600; display: flex; align-items: center; gap: 7px; }
.client-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-meta { text-align: right; font-size: .76rem; color: var(--muted); line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.client-meta b { color: var(--ink); font-weight: 600; font-size: .84rem; }
.client-wk { color: var(--coral); font-weight: 600; }

.pill-active { background: var(--mint-soft); color: #1a8a62; }
.pill-lapsed { background: var(--sun-soft); color: #8a6a0a; }
.pill-past { background: var(--bg-2); color: var(--muted); }
.pill-enquiry { background: transparent; color: var(--muted); border: 1px dashed var(--line); }

.link-btn { border: 0; background: none; padding: 0; color: var(--coral); font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 480px) {
  .client-row { flex-wrap: wrap; }
  .client-meta { text-align: left; width: 100%; padding-left: 50px; }
}

/* The small uppercase section heading used on the client record's rail
   cards. Deliberately not the usual Fraunces <h3> — the rail stacks three
   cards in a ~300px column, and a serif heading of that size would dominate
   each one rather than label it. */
.card-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 0 9px; }

/* ---------- Client record ----------
   Two columns above 900px: a sticky identity rail and a scrolling history.
   Below that they stack, rail first — which is why the health alert reads
   first on a phone without any extra rule. */
.client-record { display: grid; gap: 12px; }
.client-rail { display: grid; gap: 10px; align-content: start; }
.client-main { display: grid; gap: 10px; align-content: start; }

@media (min-width: 900px) {
  .client-record { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .client-rail { position: sticky; top: 12px; }
}

.client-id-head { display: flex; gap: 12px; align-items: center; }
.client-id-name { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 4px; }
.client-aliases, .client-since { font-size: .76rem; color: var(--muted); margin: 8px 0 0; }
.client-contact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.c-btn {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  font-size: .78rem; color: var(--ink-2); text-decoration: none;
}
.c-btn:hover { border-color: var(--ink-2); }

.client-dogs { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 8px; }
.client-fit { display: flex; flex-wrap: wrap; gap: 5px; }
.fit-chip { font-size: .74rem; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink-2); }
.fit-chip-no { border-color: rgba(255, 90, 60, .35); color: var(--coral); background: var(--coral-soft); }

/* Health notes are not a chip. An allergy or a reactivity warning is the
   highest-stakes string on this page and gets its own block. */
.client-alert {
  display: flex; gap: 9px; margin-top: 10px; padding: 9px 12px;
  background: var(--coral-soft); border: 1px solid rgba(255, 90, 60, .28); border-radius: 12px;
}
.client-alert p { margin: 0; font-size: .84rem; }
.client-alert span { color: var(--coral); font-weight: 700; }

.client-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.client-stats .stat { background: var(--paper); padding: 11px 12px; }
.client-stats .stat b { display: block; font-family: var(--serif); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.client-stats .stat span { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.client-filter { float: right; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .76rem; background: var(--paper); }

.hist-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border-bottom: none; }
.hist-row.is-cancelled { opacity: .6; }
.hist-when { font-size: .76rem; color: var(--muted); width: 118px; flex: none; }
.hist-what { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hist-sub { font-size: .74rem; color: var(--muted); }
.hist-money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 6px; }

.pill-paid { background: var(--mint-soft); color: #1a8a62; }
.pill-owed { background: var(--sun-soft); color: #8a6a0a; }
.pill-failed { background: var(--coral-soft); color: var(--coral); }
.pill-approved { background: var(--mint-soft); color: #1a8a62; }
.pill-pending { background: var(--sun-soft); color: #8a6a0a; }
.pill-cancelled { background: transparent; color: var(--muted); border: 1px dashed var(--line); }

@media (max-width: 560px) {
  .hist-row { flex-wrap: wrap; }
  .hist-when { width: 100%; }
}
