/* ============================================================================
   foliyo design system — tokens + shared components.
   Source of truth: docs/DESIGN.md and docs/mockups/*.html.
   Rules: tokens only (no raw colours below :root), Lucide line icons, one
   primary action per surface. Loaded after style.css and wins on conflicts.
   ========================================================================== */

/* Product typefaces (SIL OFL; licences in /static/fonts/). Declared here because design.css is the
   one stylesheet every page loads — the Vite-bundled fonts.css is never linked. */
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/static/fonts/geist-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/static/fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root {
  /* foliyo 2026 refresh — brand pack colours (ink #0b0b0c, mint #00e8b0) on crisp cool neutrals.
     Mint is a fill colour (with ink text on top); text and borders use the deeper mint. */
  --mint: #00e8b0;
  --mint-2: #00d39f;
  --mint-deep: #00805c;
  --mint-soft: #e3fbf3;
  --ollo: #0b0b0c;
  --ollo-green: #00e8b0;
  --ollo-soft: #e3fbf3;
  --accent: #00805c;
  --accent-dark: #006b4d;
  --accent-fill: #00e8b0;
  --accent-fill-hover: #00d39f;
  --accent-fill-ink: #0b0b0c;
  --accent-grad: linear-gradient(135deg, #006b4d 0%, #00805c 55%, #00a878 100%);
  --cream: #f5f6f8;
  --soft: #f1f3f5;

  /* Neutrals */
  --ink: #0e0f12;
  --ink-2: #26282e;
  --muted: #5d616c;
  --muted-2: #8a8e99;
  --line: #e3e5e9;
  --line-2: #eef0f2;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --rail: #0b0b0c;
  --rail-fg: #a3a6ae;
  --rail-fg-on: #ffffff;
  --on-accent: #ffffff;

  /* Colour for data, staff and categories — vivid but balanced against the neutrals. */
  --c-mint: #00c896;
  --c-violet: #7c5cff;
  --c-sky: #2b8cff;
  --c-amber: #ffa41b;
  --c-coral: #ff5c5c;
  --c-pink: #f0479a;

  /* Semantic */
  --good: #0b7a52;
  --good-bg: #e3f8ef;
  --warn: #b42318;
  --warn-bg: #fdecea;
  --note: #8a5a00;
  --note-bg: #fff3d6;
  --presence: #00c896;
  --blocked-a: #eef0f4;
  --blocked-b: #f6f7f9;
  --blocked-line: #b6bccb;

  /* Shape */
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 28px;

  /* Elevation — crisp, layered, low blur */
  --shadow-1: 0 1px 2px rgba(14, 15, 18, 0.06), 0 0 0 1px rgba(14, 15, 18, 0.02);
  --shadow-2: 0 2px 6px rgba(14, 15, 18, 0.06), 0 14px 32px -12px rgba(14, 15, 18, 0.2);
  --shadow-drawer: -16px 0 40px rgba(14, 15, 18, 0.12);
  --ring: 0 0 0 3px rgba(0, 232, 176, 0.35);

  /* Type */
  --font: "Geist", "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-20: 20px;
  --fs-26: 26px;
  --fs-34: 34px;

  /* Icon sizes */
  --ic-inline: 12px;
  --ic-chip: 15px;
  --ic: 18px;

  /* Shell */
  --topbar-h: 56px;
  --rail-w: 64px;
  --tabbar-h: 78px;
}

/* ---------- Shell: top bar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-4) 0 var(--s-3);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar .brand { flex: 0 0 auto; }
.topbar-search {
  margin-left: var(--s-4);
  flex: 0 1 380px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-3);
  color: var(--muted);
  background: var(--canvas);
  font: inherit;
  font-size: var(--fs-13);
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.topbar-search kbd {
  margin-left: auto;
  font: var(--fs-11) var(--font);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--surface);
}
.topbar-grow { flex: 1; }
.topbar-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink);
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.topbar-iconbtn:hover { background: var(--canvas); }
.topbar-iconbtn[aria-expanded="true"] { background: var(--ollo-soft); color: var(--accent-dark); }
.count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 1px 5px;
  line-height: 14px;
  min-width: 16px;
  text-align: center;
}
.wallet-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 10px 5px 8px;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  text-align: left;
  flex: 0 0 auto;
}
.wallet-chip:hover { border-color: var(--ollo); }
.wallet-chip .chip-ic {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--ollo-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
}
.wallet-chip b { font-size: var(--fs-14); display: block; line-height: 1.1; }
.wallet-chip small { display: block; color: var(--muted); font-size: var(--fs-11); line-height: 1.1; }
.account-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: var(--s-3);
  border-left: 1px solid var(--line);
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  flex: 0 0 auto;
}
.account-pill b { font-size: var(--fs-13); display: block; line-height: 1.1; }
.account-pill small { color: var(--muted); font-size: var(--fs-11); display: flex; align-items: center; gap: 4px; line-height: 1.1; }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--presence); display: inline-block; }
.avatar-ink {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--fs-12);
}

/* ---------- Shell: icon rail (desktop) ---------- */
.rail {
  width: var(--rail-w);
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s-3) 0;
  gap: 6px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  flex: 0 0 auto;
}
.rail button {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--rail-fg);
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.rail button:hover { background: rgba(255, 255, 255, 0.07); color: var(--rail-fg-on); }
.rail button[aria-current] {
  background: rgba(105, 133, 232, 0.2);
  color: var(--rail-fg-on);
  box-shadow: inset 3px 0 var(--ollo);
}
.rail button:focus-visible { outline: 2px solid var(--ollo); outline-offset: 2px; }
.rail .rail-tip {
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--rail);
  color: var(--rail-fg-on);
  font-size: var(--fs-12);
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 40;
}
.rail button:hover .rail-tip,
.rail button:focus-visible .rail-tip { opacity: 1; }
.rail .rail-spacer { flex: 1; }

/* ---------- Shell: tab bar (phone) ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tabbar-h);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: var(--s-2) var(--s-2) calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  z-index: 30;
}
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: 44px;
}
.tabbar button[aria-current] { color: var(--accent-dark); }
.tabbar button[aria-current] svg { stroke-width: 2.2; }
.tabbar .tab-fab span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  margin-top: -26px;
  box-shadow: 0 6px 16px rgba(74, 95, 217, 0.33);
}
.tabbar .tab-fab:disabled span { opacity: 0.5; box-shadow: none; }
.tabbar .tab-more[aria-expanded="true"] { color: var(--accent-dark); }
.tab-sheet {
  position: absolute;
  left: var(--s-2);
  right: var(--s-2);
  bottom: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 6px;
  display: grid;
  gap: 2px;
}
.tab-sheet button {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  font-size: var(--fs-14);
  color: var(--ink);
  border-radius: 10px;
  min-height: 44px;
}
.tab-sheet button[aria-current] { background: var(--ollo-soft); color: var(--accent-dark); font-weight: 600; }

/* ---------- Toolbar row ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.toolbar .toolbar-grow { flex: 1; }
.toolbar .button { height: 36px; min-height: 36px; padding: 0 var(--s-3); border-radius: 9px; font-size: var(--fs-13); }
.toolbar .button.icon-only { width: 36px; padding: 0; }
.toolbar .segmented { height: 36px; }

/* ---------- Wallet hero ---------- */
.wallet-hero {
  background: var(--accent-grad);
  color: var(--on-accent);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-4) 14px;
}
.wallet-hero .hero-label { font-size: var(--fs-12); opacity: 0.85; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wallet-hero .hero-label span { display: inline-flex; align-items: center; gap: 6px; }
.wallet-hero .hero-pill { background: rgba(255, 255, 255, 0.15); border-radius: var(--r-pill); padding: 2px 8px; font-size: var(--fs-11); }
.wallet-hero .hero-amount { font-size: var(--fs-34); font-weight: 800; letter-spacing: -0.5px; margin: 4px 0 10px; line-height: 1; }
.wallet-hero .hero-row { display: flex; gap: var(--s-4); font-size: var(--fs-12); flex-wrap: wrap; }
.wallet-hero .hero-row b { display: block; font-size: var(--fs-15); }
.wallet-hero .hero-row span { opacity: 0.85; }
.wallet-hero .hero-bar { margin-top: var(--s-3); height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); position: relative; overflow: hidden; }
.wallet-hero .hero-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--on-accent); }
.wallet-hero .hero-goal { display: flex; justify-content: space-between; font-size: var(--fs-11); opacity: 0.85; margin-top: 5px; }
@media (max-width: 480px) {
  .wallet-hero .hero-amount { font-size: 32px; }
  .wallet-hero .hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
}

/* ---------- KPI tile / method tile ---------- */
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-3);
}
.kpi small { color: var(--muted); font-size: var(--fs-11); display: flex; align-items: center; gap: 5px; }
.kpi b { display: block; font-size: var(--fs-20); margin-top: 4px; }
.kpi .kpi-delta { font-size: var(--fs-11); color: var(--good); margin-top: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.method-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px var(--s-2);
  text-align: center;
  font-size: var(--fs-11);
  color: var(--muted);
  background: var(--surface);
}
.method-tile svg { display: block; margin: 0 auto 5px; color: var(--accent-dark); }
.method-tile b { display: block; color: var(--ink); font-size: var(--fs-13); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }

/* ---------- Transaction / list row ---------- */
.tx-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: var(--s-2) 6px;
  border-radius: 9px;
}
.tx-row:hover { background: var(--canvas); }
.tx-row .tx-ic {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ollo-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
}
.tx-row b { font-size: var(--fs-13); display: block; }
.tx-row small { color: var(--muted); font-size: var(--fs-11); }
.tx-row .tx-amount { font-weight: 700; font-size: var(--fs-13); text-align: right; }
.tx-row .tx-amount small { display: block; font-weight: 600; color: var(--good); }
.list-label {
  font-size: var(--fs-12);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

/* ---------- Status pill ---------- */
.status-pill {
  font-size: var(--fs-11);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--good-bg);
  color: var(--good);
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-pill.next { background: var(--ollo-soft); color: var(--accent-dark); }
.status-pill.paid { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.status-pill.warn { background: var(--warn-bg); color: var(--warn); }
.status-pill.note { background: var(--note-bg); color: var(--note); }

/* ---------- Block icons (calendar/list glyph strip) ---------- */
.block-icons { display: inline-flex; gap: 4px; color: var(--muted); align-items: center; }
.block-icons svg { width: var(--ic-inline); height: var(--ic-inline); }
.block-icons .paid { color: var(--good); }

/* ---------- Blocked time ---------- */
.blocked-fill {
  background: repeating-linear-gradient(135deg, var(--blocked-a) 0 6px, var(--blocked-b) 6px 12px);
  border-left-color: var(--blocked-line) !important;
  color: var(--muted);
}

/* ---------- Surface card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 14px;
}
.card > h3 { margin: 0 0 10px; font-size: var(--fs-13); display: flex; align-items: center; justify-content: space-between; }
.card > h3 small { color: var(--muted); font-weight: 500; }

/* ---------- Right drawer ---------- */
.drawer-right {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-drawer);
  padding: var(--s-5) 22px;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  overflow-y: auto;
  z-index: 35;
}
.drawer-right > h2 { margin: 0; font-size: var(--fs-20); display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.drawer-right > h2 small { font-size: var(--fs-12); color: var(--muted); font-weight: 500; }
.drawer-right .drawer-foot { margin-top: auto; display: flex; gap: var(--s-2); }
.drawer-right .drawer-foot .button { flex: 1; justify-content: center; }
.drawer-note { font-size: var(--fs-11); color: var(--muted); text-align: center; margin: 0; }

/* ---------- Workspace layout on the new shell ---------- */
.workspace-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--topbar-h));
}
.workspace .workspace-main {
  flex: 1;
  min-width: 0;
  padding: 22px clamp(16px, 2.5vw, 32px) 40px;
  max-width: none;
}
.workspace .workspace-heading { padding-bottom: 14px; margin-bottom: 14px; }
.workspace .workspace-heading h1 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.6px; }
.topbar-env {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-11);
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  white-space: nowrap;
}
.skip-link:focus { top: calc(var(--topbar-h) + 8px); }
.tabbar { display: none; }
@media (max-width: 767px) {
  .rail { display: none; }
  .tabbar { display: grid; }
  .workspace .workspace-main { padding: 14px 14px calc(var(--tabbar-h) + 24px); }
  .topbar { padding: 0 var(--s-3); gap: var(--s-2); }
  .topbar-search { display: none; }
  .topbar-env { display: none; }
  .wallet-chip small { display: none; }
  .wallet-chip { padding: 5px 8px; }
  .account-pill .account-pill-text { display: none; }
  .account-pill { padding-left: var(--s-2); border-left: 0; }
  .account-pill > svg:last-child { display: none; }
  .workspace .workspace-heading h1 { font-size: 22px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .topbar-search { flex-basis: 220px; }
  .topbar-env { display: none; }
}

/* Top bar must never cause horizontal scroll: text parts shrink/hide as the bar gets tight. */
.topbar { flex-wrap: nowrap; overflow: hidden; }
.account-pill-text { min-width: 0; max-width: 220px; }
.account-pill-text b, .account-pill-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.wallet-chip small { white-space: nowrap; }
@media (max-width: 1100px) {
  .account-pill .account-pill-text { display: none; }
  .account-pill > svg:last-child { display: none; }
}

/* ============================================================================
   Timetable (Appointments) — one-row toolbar, hidden filters, phone-friendly board.
   Mockup: docs/mockups/shell-wallet.html. Rules here override the frozen legacy sheet.
   ========================================================================== */
.workspace .connected-calendar {
  border-radius: var(--r-xl);
  border-color: var(--line);
  overflow: visible;
}
.workspace .calendar-toolbar-row {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-2);
  row-gap: var(--s-2);
}
.workspace .calendar-toolbar-row .button {
  min-height: 36px;
  height: 36px;
  padding: 0 var(--s-3);
  border-radius: 9px;
  font-size: var(--fs-13);
  gap: 6px;
}
.workspace .calendar-toolbar-row .button.icon-only { width: 36px; min-width: 36px; padding: 0; }
.workspace .calendar-toolbar-row .button.ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.workspace .calendar-toolbar-row .button.ghost:hover { background: var(--canvas); }
.workspace .calendar-toolbar-row .toolbar-today[aria-pressed="true"] { background: var(--ollo-soft); color: var(--accent-dark); border-color: var(--ollo-soft); }
.toolbar-date-group { display: inline-flex; align-items: center; gap: 4px; }
.toolbar-date {
  position: relative;
  display: inline-grid;
  height: 36px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  align-items: center;
}
.toolbar-date-text {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--s-3);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.toolbar-date input[type="date"] {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
}
.toolbar-date:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.toolbar-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding-left: 10px;
  color: var(--muted);
}
.toolbar-select select {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  padding: 0 26px 0 6px;
  height: 100%;
  min-width: 0;
  max-width: 180px;
  cursor: pointer;
}
.toolbar-select::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.toolbar-select:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.workspace .calendar-toolbar-row .segmented {
  height: 36px;
  padding: 3px;
  background: var(--canvas);
  border-radius: 9px;
  gap: 2px;
}
.workspace .calendar-toolbar-row .segmented button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: var(--fs-13);
  color: var(--muted);
  gap: 6px;
}
.workspace .calendar-toolbar-row .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.count-badge.inline {
  position: static;
  min-width: 18px;
  height: 18px;
  font-size: var(--fs-11);
  line-height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
}
.calendar-filters-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(200px, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
  padding: var(--s-3) var(--s-4);
  background: var(--canvas);
  border-bottom: 1px solid var(--line-2);
}
.calendar-filters-panel .workspace-field { margin: 0; }
.calendar-filters-panel .button { min-height: 40px; }
.calendar-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px var(--s-4);
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-12);
  color: var(--muted);
  min-height: 36px;
}
.calendar-summary-stats { display: inline-flex; align-items: center; gap: 4px 0; flex-wrap: wrap; }
.calendar-summary-stats > span { white-space: nowrap; }
.calendar-summary-stats > span + span::before { content: "\00b7"; color: var(--muted); margin: 0 8px; }
.calendar-summary-stats b { color: var(--ink); font-weight: 600; }
.calendar-summary .button { min-height: 32px; padding: 0 var(--s-2); font-size: var(--fs-12); margin-left: auto; }

/* Board */
.workspace .connected-calendar .calendar-staff-header,
.workspace .connected-calendar .calendar-timeline {
  grid-template-columns: var(--gutter, 64px) repeat(var(--columns), minmax(0, 1fr));
}
.workspace .connected-calendar .calendar-staff-header { height: auto; min-height: 60px; }
.workspace .connected-calendar .staff-column-heading { padding: 10px 12px; gap: 8px; }
.workspace .connected-calendar .staff-column-heading .avatar { width: 30px; height: 30px; font-size: var(--fs-11); flex: 0 0 auto; }
.workspace .connected-calendar .staff-column-heading > div { min-width: 0; }
.workspace .connected-calendar .staff-column-heading strong { font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.workspace .connected-calendar .staff-column-heading div > span { font-size: var(--fs-11); color: var(--muted); margin-top: 2px; white-space: nowrap; }
.workspace .connected-calendar .calendar-event .event-status { display: inline-flex; align-items: center; gap: 6px; }
.workspace .connected-calendar .calendar-event .block-icons { color: inherit; opacity: 0.85; }
.workspace .connected-calendar .calendar-event .block-icons .paid { color: var(--good); }
.workspace .connected-scroll { max-height: min(640px, calc(100vh - 300px)); }

/* Foot: legend + collapsible help */
.calendar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-2) var(--s-4);
  border-top: 1px solid var(--line-2);
}
.workspace .calendar-foot .calendar-legend { padding: 0; border: 0; font-size: var(--fs-11); gap: 6px 14px; }
.workspace .calendar-foot .calendar-legend .legend-note { color: var(--muted); }
.calendar-help { font-size: var(--fs-12); color: var(--muted); }
.calendar-help summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  min-height: 32px;
}
.calendar-help summary::-webkit-details-marker { display: none; }
.calendar-help summary:hover { background: var(--canvas); color: var(--ink); }
.calendar-help[open] { flex-basis: 100%; }
.calendar-help p { margin: 4px 0 0; line-height: 1.55; max-width: 80ch; }
.workspace .closed-day-bookings { padding: 0; border-top: 1px solid var(--line-2); }
.workspace .closed-day-bookings > summary {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-13);
}
.workspace .closed-day-bookings > summary::-webkit-details-marker { display: none; }
.workspace .closed-day-bookings > summary h3 { margin: 0; font-size: var(--fs-13); font-weight: 600; }
.workspace .closed-day-bookings > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  margin: 0 4px 0 2px;
  transition: transform 0.15s;
}
.workspace .closed-day-bookings[open] > summary::before { transform: rotate(45deg); }
.workspace .closed-day-bookings > *:not(summary) { padding: 0 var(--s-4) var(--s-4); }

/* Notifications drawer */
.drawer-scrim { position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(24, 27, 42, 0.25); z-index: 34; }
.notifications-drawer h2 .icon-button { margin-left: auto; }
.notify-group { display: grid; gap: var(--s-2); }
.notify-group h3 { margin: 0; font-size: var(--fs-13); display: flex; align-items: center; gap: 6px; }
.notify-group h3 svg { color: var(--accent-dark); }
.notify-group .nav-count { background: var(--accent); color: var(--on-accent); border-radius: var(--r-pill); font-size: var(--fs-11); padding: 1px 7px; }
.drawer-note.left { text-align: left; }
.notify-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.notify-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: var(--fs-13);
}
.notify-list li > div { display: grid; gap: 2px; min-width: 0; }
.notify-list li small { color: var(--muted); font-size: var(--fs-11); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-list .waitlist-row-actions { display: flex; flex-direction: column; gap: 4px; }
.notify-list .waitlist-row-actions .button { min-height: 34px; padding: 0 10px; font-size: var(--fs-12); }
.notifications-drawer.waitlist-panel, .notifications-drawer .waitlist-panel { margin: 0; padding: 0; background: transparent; border: 0; }
.notifications-drawer .waitlist-panel h3 svg { color: var(--note); }

/* Tablet: labels stay, add button shortens */
@media (max-width: 1024px) {
  .workspace .calendar-toolbar-row .segmented .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .segmented button { padding: 0 9px; }
}
/* Phone: two-row toolbar, timetable scrolls sideways, tighter board */
@media (max-width: 767px) {
  .workspace .connected-calendar { border-radius: var(--r-lg); }
  /* Phone: two tight rows. Row 1: Today · ‹ date › · Walk-in · filters. Row 2: Day/Week/Agenda + barber.
     The tab-bar FAB is the one "add" control; the toolbar's New booking is hidden here. */
  .workspace .calendar-toolbar-row { padding: 8px var(--s-3); gap: 6px; }
  .workspace .calendar-toolbar-row .toolbar-today { order: 1; padding: 0 10px; }
  .workspace .calendar-toolbar-row .toolbar-date-group { order: 2; flex: 1; justify-content: center; min-width: 0; }
  .workspace .calendar-toolbar-row .toolbar-date { min-width: 0; flex: 1; }
  .workspace .calendar-toolbar-row .toolbar-walkin { order: 3; width: 36px; min-width: 36px; padding: 0; }
  .workspace .calendar-toolbar-row .toolbar-walkin .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .toolbar-filters { order: 4; width: 36px; min-width: 36px; padding: 0; }
  .workspace .calendar-toolbar-row .toolbar-filters .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .toolbar-add { display: none; }
  .workspace .calendar-toolbar-row .toolbar-grow { display: none; }
  .workspace .calendar-toolbar-row .segmented { order: 5; flex: 1 1 180px; }
  .workspace .calendar-toolbar-row .segmented button { padding: 0 8px; flex: 1; justify-content: center; }
  .workspace .calendar-toolbar-row .segmented .toolbar-label { display: inline; }
  .workspace .calendar-toolbar-row .toolbar-select { order: 6; flex: 1 1 120px; min-width: 0; }
  .workspace .calendar-toolbar-row .toolbar-select select { max-width: none; width: 100%; }
  .workspace .calendar-toolbar-row .team-picker { order: 7; flex: 0 0 auto; }
  .workspace .calendar-toolbar-row .team-picker > .button { width: auto; min-width: 36px; padding: 0 8px; }
  .workspace .calendar-toolbar-row .team-picker .toolbar-label { display: inline; font-size: var(--fs-11); }
  .workspace .calendar-toolbar-row .team-picker .toolbar-label .team-word { display: none; }
  .workspace .calendar-toolbar-row .team-picker-list { left: auto; right: 0; }
  .workspace .calendar-toolbar-row .toolbar-refresh { display: none; }
  .workspace .workspace-main { padding-top: 10px; }
  .calendar-filters-panel { grid-template-columns: 1fr; padding: var(--s-3); }
  .calendar-summary { padding: 4px var(--s-3); min-height: 0; gap: 2px var(--s-3); font-size: var(--fs-11); }
  .calendar-summary > span:first-child { display: none; }
  .calendar-summary-stats { width: 100%; }
  .calendar-summary-stats > span + span::before { margin: 0 6px; }
  .workspace .connected-scroll { max-height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - 150px); min-height: 360px; }
  .workspace .connected-calendar .calendar-staff-header { min-height: 52px; }
  .workspace .connected-calendar .staff-column-heading { padding: 8px; gap: 6px; }
  .workspace .connected-calendar .staff-column-heading .avatar { width: 26px; height: 26px; font-size: 10px; }
  .workspace .connected-calendar .staff-column-heading strong { font-size: var(--fs-12); }
  .workspace .connected-calendar .staff-column-heading div > span { font-size: 10px; }
  .workspace .connected-calendar .timezone-label, .workspace .connected-calendar .timezone-label span { font-size: 9px; }
  .workspace .connected-calendar .time-gutter > span { font-size: 10px; }
  .workspace .connected-calendar .calendar-event { left: 3px; right: 3px; padding: 3px 6px; }
  .workspace .connected-calendar .calendar-event strong { font-size: var(--fs-12); }
  .workspace .connected-calendar .calendar-event span, .workspace .connected-calendar .calendar-event small { font-size: 10px; }
  .calendar-foot { padding: var(--s-2) var(--s-3); }
  .drawer-right { width: 100vw; padding: var(--s-4); }
  .notify-list li { grid-template-columns: 1fr; }
  .notify-list .waitlist-row-actions { flex-direction: row; }
}

/* ============================================================================
   Checkout (appointment panel) + wallet drawer. Ledger only; no money moves.
   ========================================================================== */
.checkout { display: grid; gap: var(--s-3); }
.checkout-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.checkout-head strong { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-14); }
.checkout-lines { margin: 0; display: grid; gap: 6px; }
.checkout-lines > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: var(--fs-13); }
.checkout-lines dt { color: var(--muted); margin: 0; }
.checkout-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.checkout-due { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.checkout-due dt { color: var(--ink); font-weight: 600; }
.checkout-due dd { font-size: var(--fs-20); font-weight: 800; letter-spacing: -0.3px; }
.checkout-money-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 8px;
  height: 36px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-13);
}
.checkout-money-input input { border: 0; width: 70px; font: inherit; font-size: var(--fs-13); color: var(--ink); background: transparent; text-align: right; min-width: 0; }
.checkout-money-input input:focus { outline: none; }
.checkout-money-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.checkout fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.checkout legend { font-size: var(--fs-12); color: var(--muted); font-weight: 600; padding: 0; margin-bottom: 6px; }
.checkout-tips small { color: var(--muted); font-size: var(--fs-11); }
.checkout-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.checkout .chip {
  height: 36px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.checkout .chip[aria-pressed="true"] { background: var(--ollo-soft); border-color: var(--accent); color: var(--accent-dark); }
.checkout .chip-input { border-radius: var(--r-pill); }
.checkout .method-tile { cursor: pointer; font: inherit; }
.checkout .method-tile[aria-pressed="true"] { border-color: var(--accent); background: var(--ollo-soft); color: var(--accent-dark); }
.checkout .method-tile[aria-pressed="true"] b { color: var(--accent-dark); }
.checkout-split { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-13); }
.checkout-split li { display: flex; justify-content: space-between; gap: var(--s-2); padding: 6px 8px; background: var(--canvas); border-radius: var(--r-sm); }
.checkout-actions { align-items: center; flex-wrap: wrap; }
.checkout-more summary { cursor: pointer; font-size: var(--fs-13); color: var(--accent-dark); padding: 6px 8px; list-style: none; }
.checkout-more summary::-webkit-details-marker { display: none; }
.checkout-split-add { display: flex; gap: var(--s-2); align-items: center; padding: 6px 0; flex-wrap: wrap; }
.paid-strip { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.paid-strip li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--muted); flex-wrap: wrap; }
.paid-strip li svg { color: var(--good); flex: 0 0 auto; }
.paid-strip li.voided { text-decoration: line-through; }
.paid-strip li.voided svg { color: var(--muted); }
.paid-strip .status-pill { margin-left: auto; }
.panel-more-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--muted); padding: 8px 10px; }
.field-hint { display: block; color: var(--muted); font-size: var(--fs-11); font-weight: 400; margin-top: 2px; }

/* Wallet drawer */
.wallet-drawer .wallet-range { width: 100%; padding: 3px; background: var(--canvas); border-radius: 9px; }
.wallet-drawer .wallet-range button { flex: 1; justify-content: center; min-height: 32px; border-radius: 7px; font-size: var(--fs-13); color: var(--muted); }
.wallet-drawer .wallet-range button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.wallet-drawer section { display: grid; gap: 4px; }
.wallet-staff .kpi b { font-size: var(--fs-15); }
.wallet-staff .kpi-delta { color: var(--muted); }
@media (max-width: 767px) {
  .checkout .method-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-drawer .method-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Series strip: cancelled visits are struck through, not faded (AA contrast on the tile). */
.series-strip li.closed { opacity: 1; color: var(--muted); }
.series-strip li.closed small { color: var(--muted); }
.series-strip li.current.closed { background: var(--canvas); color: var(--muted); border: 1px solid var(--line); }
.series-strip li.current.closed small { color: var(--muted); }

/* ============================================================================
   Search palette + account menu (top bar) · Pay terms + pay runs (Team → barber → Pay)
   ========================================================================== */
.palette-scrim { position: fixed; inset: 0; background: rgba(24, 27, 42, 0.35); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 10vh var(--s-4) var(--s-4); }
.palette { width: min(680px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.palette .palette-input { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 14px var(--s-4); border-bottom: 1px solid var(--line); color: var(--muted); margin: 0; font-weight: 400; }
.palette .palette-input > svg { flex: 0 0 auto; }
.palette .palette-input input { flex: 1; width: auto; border: 0; font: inherit; font-size: var(--fs-15); color: var(--ink); background: transparent; min-width: 0; }
.palette-input input:focus { outline: none; }
.palette-input kbd { font: inherit; font-size: var(--fs-11); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.palette-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.palette-results li[role="option"] { display: grid; grid-template-columns: 32px 1fr 16px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; position: relative; color: var(--muted); }
.palette-results li[role="option"].active { background: var(--ollo-soft); color: var(--accent-dark); }
.palette-results li[role="option"]:has(.palette-group) { margin-top: 18px; }
.palette-results li[role="option"]:first-child:has(.palette-group) { margin-top: 6px; }
.palette-group { position: absolute; top: -16px; left: 10px; font-size: var(--fs-11); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: var(--muted); }
.palette-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--canvas); display: grid; place-items: center; color: var(--ink); }
.palette-results li.active .palette-ic { background: var(--surface); color: var(--accent-dark); }
.palette-text { display: grid; min-width: 0; }
.palette-text b { color: var(--ink); font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-text small { font-size: var(--fs-11); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-empty { padding: var(--s-4); color: var(--muted); font-size: var(--fs-13); text-align: center; }
.palette-foot { margin: 0; padding: 8px var(--s-4); border-top: 1px solid var(--line-2); font-size: var(--fs-11); color: var(--muted); }
@media (max-width: 767px) { .palette-scrim { padding: var(--s-2); align-items: stretch; } .palette { max-height: none; border-radius: var(--r-lg); } }

.account-menu { position: fixed; top: calc(var(--topbar-h) + 6px); right: var(--s-3); width: min(320px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 6px; z-index: 55; display: grid; gap: 2px; }
.account-menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: grid; }
.account-menu-head b { font-size: var(--fs-14); }
.account-menu-head small { color: var(--muted); font-size: var(--fs-11); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu [role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-size: var(--fs-13); color: var(--ink); padding: 10px 12px; border-radius: 9px; cursor: pointer; min-height: 40px; }
.account-menu [role="menuitem"]:hover, .account-menu [role="menuitem"]:focus-visible { background: var(--canvas); outline: none; }
.account-menu [role="menuitem"].danger { color: var(--warn); }
.account-menu [role="menuitem"] svg { color: var(--muted); }
.account-menu [role="menuitem"].danger svg { color: var(--warn); }

/* Pay terms */
.studio-pay { display: grid; gap: var(--s-4); }
.pay-terms { display: grid; gap: var(--s-4); }
.pay-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-2); }
.pay-model { text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 10px 12px; font: inherit; cursor: pointer; display: grid; gap: 3px; color: var(--ink); }
.pay-model b { font-size: var(--fs-13); }
.pay-model small { color: var(--muted); font-size: var(--fs-11); line-height: 1.4; }
.pay-model[aria-checked="true"] { border-color: var(--accent); background: var(--ollo-soft); }
.pay-model[aria-checked="true"] b { color: var(--accent-dark); }
.pay-tiers { border: 1px dashed var(--line); border-radius: var(--r); padding: var(--s-3); display: grid; gap: var(--s-2); }
.pay-tier-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s-2); align-items: end; }
.pay-tier-row .workspace-field { margin: 0; }
.pay-summary { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--ink); background: var(--canvas); border-radius: var(--r-sm); padding: 8px 12px; margin: 0; }
.workspace-section-heading.compact { padding: 0; margin: 0; border: 0; }
.workspace-section-heading.compact h3 { margin: 0; font-size: var(--fs-15); }
/* Pay runs */
.pay-runs { display: grid; gap: var(--s-3); }
.pay-period-bar { background: var(--canvas); border-radius: var(--r); padding: 6px 8px; }
.pay-period-label { font-size: var(--fs-14); }
.pay-period-label small { color: var(--muted); font-weight: 500; }
.pay-breakdown { margin: 0; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s-3) var(--s-4); }
.pay-breakdown > div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-13); }
.pay-breakdown dt { color: var(--muted); }
.pay-breakdown dt small { color: var(--muted); }
.pay-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.pay-net { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.pay-net dt { color: var(--ink); font-weight: 600; }
.pay-net dd { font-size: var(--fs-20); font-weight: 800; }
.pay-adjust { display: grid; grid-template-columns: 1fr 140px auto; gap: var(--s-2); align-items: end; }
.pay-adjust .workspace-field { margin: 0; }
.pay-mark-paid { display: inline-flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.pay-mark-paid input { height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font: inherit; font-size: var(--fs-13); width: 180px; }
.pay-history summary { cursor: pointer; font-size: var(--fs-13); color: var(--accent-dark); display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; list-style: none; }
.pay-history summary::-webkit-details-marker { display: none; }
.pay-history-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.pay-history-table th { text-align: left; font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pay-history-table td { padding: 8px; border-bottom: 1px solid var(--line-2); }
.pay-history-table tr.voided td { color: var(--muted); text-decoration: line-through; }
/* Pay statement (v2): sales → barber share → deductions → owed each way */
.pay-statement { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.pay-statement-group { display: grid; margin: 0; gap: 4px; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-2); }
.pay-statement-group > div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-13); align-items: baseline; }
.pay-statement dt { color: var(--muted); }
.pay-statement dt small { color: var(--muted); margin-left: 4px; }
.pay-statement dd { margin: 0; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pay-statement dd.minus { color: var(--muted); }
.pay-statement .pay-subtotal { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.pay-statement .pay-subtotal dt { color: var(--ink); font-weight: 600; }
.pay-statement .pay-subtotal.strong dd { font-weight: 700; }
.pay-statement .pay-net { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-3) var(--s-4); margin: 0; border: 0; border-bottom: 1px solid var(--line-2); background: var(--ollo-soft); }
.pay-statement .pay-net dt { color: var(--ink); font-weight: 700; font-size: var(--fs-13); }
.pay-statement .pay-net dt small { display: block; color: var(--muted); font-weight: 500; margin: 2px 0 0; }
.pay-statement .pay-net dd { font-size: var(--fs-20); font-weight: 800; }
.pay-statement .pay-net.negative { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.pay-statement .pay-owner { background: var(--canvas); border-bottom: 0; }
.pay-statement .pay-owner dt { color: var(--muted); }
/* Deductions editor */
.pay-deductions { display: grid; gap: var(--s-3); border: 1px dashed var(--line); border-radius: var(--r); padding: var(--s-3); }
.pay-deductions .workspace-section-heading.compact { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; flex-wrap: wrap; }
.pay-deductions .workspace-section-heading.compact p { margin: 2px 0 0; }
.pay-deductions .admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-deduction-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) minmax(130px, 1fr) minmax(90px, 0.7fr) minmax(90px, 0.8fr) minmax(130px, 1fr) auto auto auto; gap: var(--s-2); align-items: end; padding: var(--s-2) 0; border-top: 1px solid var(--line-2); }
.pay-deduction-row:first-of-type { border-top: 0; }
.pay-deduction-row .workspace-field { margin: 0; }
.pay-deduction-row .workspace-field.narrow input { width: 100%; }
.pay-deduction-row.off { opacity: 0.55; }
.pay-deduction-check { align-self: end; height: 36px; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); white-space: nowrap; }
/* Pay runs page (all barbers, one period) */
.pay-runs-page { display: grid; gap: var(--s-3); }
.pay-runs-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pay-runs-table th { text-align: left; font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.pay-runs-table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.pay-runs-table th.num, .pay-runs-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-runs-table tr.quiet td { color: var(--muted); }
.pay-runs-table td.neg { color: var(--warn); font-weight: 600; }
.pay-runs-table tfoot td { border-bottom: 0; background: var(--canvas); font-weight: 600; }
.pay-runs-table tbody tr:last-child td { border-bottom: 0; }
/* Barber's own pay page */
.my-pay { display: grid; gap: var(--s-4); }
.my-pay .admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.my-pay .admin-list { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 4px; font-size: var(--fs-13); }
.my-pay-detail td { background: var(--canvas); padding: var(--s-3); }
.my-pay-detail .pay-statement { max-width: 560px; }
@media (max-width: 767px) {
  .pay-deduction-row { grid-template-columns: 1fr 1fr; }
  .pay-deduction-row .pay-deduction-check { height: auto; }
  .pay-runs-table { display: block; overflow-x: auto; }
  .my-pay .admin-two { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .pay-tier-row { grid-template-columns: 1fr 1fr auto; }
  .pay-adjust { grid-template-columns: 1fr; }
  .pay-history-table th:nth-child(2), .pay-history-table td:nth-child(2) { display: none; }
}

/* Barber editor section switch: six tabs scroll sideways on phones instead of widening the page. */
.studio-detail .segmented[aria-label="Barber sections"],
.studio .segmented[aria-label="Barber sections"] { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.studio .segmented[aria-label="Barber sections"]::-webkit-scrollbar { display: none; }
.studio .segmented[aria-label="Barber sections"] button { white-space: nowrap; flex: 0 0 auto; }

/* Settings → Customer pages */
.customer-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.customer-pages li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: 10px var(--s-3); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.customer-page-text { display: grid; gap: 2px; min-width: 0; }
.customer-page-text b { font-size: var(--fs-13); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customer-page-text small { color: var(--muted); font-size: var(--fs-12); overflow-wrap: anywhere; }
.customer-page-action .button { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-13); }
@media (max-width: 767px) { .customer-pages li { grid-template-columns: 32px 1fr; } .customer-page-action { grid-column: 2; } }

/* ============================================================================
   Public shop home page (/<slug>) — the customer's front door. Booking is embedded.
   ========================================================================== */
.shop-page { --sp-accent: var(--accent); --sp-accent-dark: var(--accent-dark); --sp-soft: var(--ollo-soft); background: var(--canvas); color: var(--ink); min-height: 100vh; }
.shop-page.accent-ink { --sp-accent: var(--ink); --sp-accent-dark: var(--ink-2); --sp-soft: var(--line-2); }
.shop-page.accent-sage { --sp-accent: var(--good); --sp-accent-dark: var(--good); --sp-soft: var(--good-bg); }
.shop-page.accent-clay { --sp-accent: var(--warn); --sp-accent-dark: var(--warn); --sp-soft: var(--warn-bg); }
.shop-page.accent-plum { --sp-accent: var(--note); --sp-accent-dark: var(--note); --sp-soft: var(--note-bg); }
.shop-page.accent-slate { --sp-accent: var(--muted); --sp-accent-dark: var(--ink-2); --sp-soft: var(--line-2); }
.shop-page .button.primary { background: var(--sp-accent); border-color: var(--sp-accent); color: var(--on-accent); }
.shop-page .button.primary:hover { background: var(--sp-accent-dark); }
.sp-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-4); padding: 10px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.sp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.2px; }
.sp-brand .shop-emblem { width: 34px; height: 34px; border-radius: 10px; background: var(--sp-accent); color: var(--on-accent); display: grid; place-items: center; font-size: var(--fs-12); font-weight: 700; }
.sp-nav nav { display: flex; gap: var(--s-4); margin-left: auto; }
.sp-nav nav a { color: var(--muted); text-decoration: none; font-size: var(--fs-13); font-weight: 600; }
.sp-nav nav a:hover { color: var(--ink); }
.sp-book-btn { min-height: 38px; }
.sp-hero { background: var(--ink); color: var(--on-accent); padding: clamp(56px, 9vw, 120px) clamp(16px, 4vw, 40px) clamp(48px, 7vw, 96px); position: relative; overflow: hidden; text-align: center; }
.sp-hero.no-cover { background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--sp-accent) 55%, var(--ink)) 0%, var(--ink) 60%, #0f1220 100%); }
.sp-hero.no-cover::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M0 60h120M60 0v120' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E"); pointer-events: none; }
.sp-hero.has-cover { background-size: cover; background-position: center; }
.sp-hero.has-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 18, 30, 0.55) 0%, rgba(16, 18, 30, 0.72) 100%); }
.sp-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; display: grid; gap: var(--s-3); justify-items: center; }
.sp-hero-logo { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); margin-bottom: var(--s-2); }
.sp-hero-initials { display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); color: var(--on-accent); font-weight: 700; font-size: var(--fs-20); letter-spacing: 0.5px; box-shadow: none; }
.sp-hero h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); letter-spacing: -1.6px; line-height: 1; }
.sp-strap { margin: 0; font-size: clamp(17px, 1.7vw, 22px); opacity: 0.88; max-width: 48ch; line-height: 1.45; }
.sp-open { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-12); font-weight: 600; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--r-pill); padding: 5px 12px; width: fit-content; }
.sp-open i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.sp-open.open i { background: var(--presence); box-shadow: 0 0 0 3px rgba(56, 176, 112, 0.25); }
.sp-hero-meta { display: flex; gap: var(--s-4); flex-wrap: wrap; justify-content: center; align-items: center; font-size: var(--fs-14); opacity: 0.9; }
.sp-hero-address { display: inline-flex; align-items: center; gap: 6px; }
.sp-hero-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; margin-top: var(--s-2); }
.sp-hero-actions .button { min-height: 46px; padding: 0 22px; font-size: var(--fs-15); border-radius: 12px; }
.sp-hero .button.secondary { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: var(--on-accent); }
.sp-hero .button.secondary:hover { background: rgba(255, 255, 255, 0.18); }
.sp-section { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 40px); }
.sp-section-head { display: grid; gap: 4px; margin-bottom: var(--s-4); }
.sp-section h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.5px; }
.sp-section-head p { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.sp-next { padding-top: var(--s-5); }
.sp-next-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-3); }
.sp-next-list :is(button, a) { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; font: inherit; cursor: pointer; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.sp-next-list :is(button, a):hover { border-color: var(--sp-accent); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sp-next-list .avatar, .sp-next-photo { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; font-size: var(--fs-13); }
.sp-next-text { display: grid; gap: 2px; min-width: 0; }
.sp-next-text b { font-size: var(--fs-15); }
.sp-next-text small { color: var(--muted); font-size: var(--fs-12); }
.sp-next-time { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; color: var(--sp-accent-dark); font-variant-numeric: tabular-nums; }
.sp-about p { margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; max-width: 70ch; color: var(--ink-2); }
.sp-cat h3 { margin: var(--s-5) 0 var(--s-3); font-size: 16px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink); display: flex; align-items: center; gap: var(--s-3); }
.sp-cat h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sp-cat:first-of-type h3 { margin-top: var(--s-2); }
.sp-services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-3); }
.sp-services :is(button, a) { width: 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s-3); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 14px 16px 18px; font: inherit; cursor: pointer; color: var(--ink); min-height: 72px; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.sp-services :is(button, a):hover { border-color: var(--sp-accent); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sp-service-go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--canvas); color: var(--muted); transition: background 0.15s, color 0.15s; }
.sp-services :is(button, a):hover .sp-service-go { background: var(--sp-accent); color: var(--on-accent); }
.sp-service-text { display: grid; gap: 3px; min-width: 0; }
.sp-service-text b { font-size: var(--fs-15); display: flex; align-items: center; gap: 8px; }
.sp-service-text small { color: var(--muted); font-size: var(--fs-13); line-height: 1.45; }
.sp-popular { font-style: normal; font-size: var(--fs-11); background: var(--sp-soft); color: var(--sp-accent-dark); border-radius: var(--r-pill); padding: 2px 8px; font-weight: 600; }
.sp-service-meta { text-align: right; display: grid; gap: 2px; flex: 0 0 auto; }
.sp-service-meta b { font-size: 16px; }
.sp-service-meta small { color: var(--muted); font-size: var(--fs-12); }
.sp-team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
.sp-barber { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-4); display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-content: start; }
.sp-barber .avatar.large { width: 72px; height: 72px; font-size: 18px; border-radius: 20px; }
.sp-photo { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; object-position: 50% 30%; }
.sp-barber-next { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--sp-accent-dark); background: var(--sp-soft); border-radius: var(--r-pill); padding: 3px 10px; width: fit-content; }
.sp-barber-text { display: grid; gap: 4px; min-width: 0; }
.sp-barber-text b { font-size: 16px; }
.sp-barber-text small { color: var(--muted); font-size: var(--fs-12); }
.sp-barber-text p { margin: 4px 0 0; font-size: var(--fs-13); color: var(--ink-2); line-height: 1.5; }
.sp-skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sp-skills em { font-style: normal; font-size: var(--fs-11); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 8px; color: var(--muted); }
.sp-barber-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-1); }
.sp-barber-actions .button { flex: 1 1 auto; justify-content: center; min-height: 40px; }
.sp-ig { color: var(--muted); font-size: var(--fs-12); text-decoration: none; }
/* Booking has its own page; the shop page carries one clear call to action instead of the whole flow. */
.sp-booking-cta { padding-top: clamp(12px, 2vw, 24px); }
.sp-cta-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-5); background: var(--sp-accent); color: var(--on-accent); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px); }
.sp-cta-copy { display: grid; gap: 6px; }
.sp-cta-copy h2 { color: inherit; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.6px; }
.sp-cta-copy p { margin: 0; font-size: var(--fs-15); max-width: 52ch; line-height: 1.5; }
.shop-page .sp-cta-btn { background: var(--on-accent); color: var(--sp-accent-dark); border-color: transparent; min-height: 54px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.shop-page .sp-cta-btn:hover { background: var(--on-accent); filter: brightness(0.96); }
@media (max-width: 767px) {
  .sp-cta-card { grid-template-columns: 1fr; }
  .shop-page .sp-cta-btn { width: 100%; justify-content: center; }
}
.sp-two { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.sp-two.single { grid-template-columns: minmax(0, 560px); }
.sp-two > .sp-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); margin: clamp(12px, 2vw, 24px) 0; padding: clamp(20px, 3vw, 32px); }
.sp-two > .sp-section h2 { font-size: var(--fs-20); }
.sp-two .sp-section { padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.sp-hours { margin: var(--s-3) 0 0; display: grid; gap: 6px; }
.sp-hours > div { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); font-size: var(--fs-14); padding: 8px 12px; border-radius: var(--r-sm); }
.sp-hours > div.today { background: var(--sp-soft); font-weight: 600; }
.sp-hours dt, .sp-hours dd { margin: 0; }
.sp-hours dd { font-variant-numeric: tabular-nums; }
.sp-closures { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--fs-13); display: flex; gap: 6px; align-items: flex-start; }
.sp-address { font-style: normal; display: grid; gap: 10px; margin: var(--s-3) 0 var(--s-4); font-size: var(--fs-15); }
.sp-address p { margin: 0; display: flex; gap: 10px; align-items: center; }
.sp-address p svg { color: var(--muted); flex: 0 0 auto; }
.sp-address a { color: var(--sp-accent-dark); }
.sp-transport { color: var(--muted); font-size: var(--fs-13); }
.sp-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-2); }
.sp-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); display: block; }
.sp-policies ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-14); color: var(--ink-2); }
.sp-policies li { display: flex; gap: 8px; align-items: flex-start; }
.sp-policies li svg { flex: 0 0 auto; margin-top: 3px; color: var(--muted); }
.sp-policy-text { white-space: pre-line; }
.sp-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: var(--s-5); }
.sp-footer-inner { max-width: 1100px; margin: 0 auto; padding: var(--s-5) clamp(16px, 4vw, 40px) 40px; display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-4); align-items: center; color: var(--muted); font-size: var(--fs-13); }
.sp-footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.sp-footer-brand .shop-emblem { width: 40px; height: 40px; border-radius: 12px; background: var(--sp-accent); color: var(--on-accent); font-size: var(--fs-12); font-weight: 700; display: grid; place-items: center; }
.sp-footer-brand div { display: grid; gap: 2px; }
.sp-footer-brand b { font-size: var(--fs-15); }
.sp-footer-brand span { color: var(--muted); font-size: var(--fs-13); }
.sp-footer-links { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.sp-footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.sp-footer-links a:hover { color: var(--sp-accent-dark); }
@media (max-width: 767px) {
  .sp-nav nav { display: none; }
  .sp-nav { gap: var(--s-2); }
  .sp-brand strong { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-book-btn { margin-left: auto; }
  .sp-two, .sp-two.single { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .sp-two > .sp-section { margin: 8px 0; }
  .sp-barber { grid-template-columns: auto 1fr; }
  .sp-hero { text-align: left; }
  .sp-hero-inner { justify-items: start; }
  .sp-hero-meta, .sp-hero-actions { justify-content: flex-start; }
  .sp-hero-actions { width: 100%; }
  .sp-hero-actions .button { flex: 1 1 auto; justify-content: center; }
  .sp-hero-logo { width: 56px; height: 56px; border-radius: 16px; }
  .sp-footer-inner { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* Settings → Online presence: page editor */
.page-editor { display: grid; gap: var(--s-4); }
.page-sections { display: flex; flex-wrap: wrap; gap: 6px; }
.page-sections label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--fs-13); cursor: pointer; background: var(--surface); }
.page-sections label:has(input:checked) { background: var(--ollo-soft); border-color: var(--accent); color: var(--accent-dark); }
.page-sections input { margin: 0; }
.accent-picker { display: flex; gap: 8px; }
.accent-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.accent-swatch[aria-pressed="true"] { border-color: var(--ink); outline: 2px solid var(--surface); outline-offset: -4px; }
.accent-swatch.ollo { background: var(--accent); }
.accent-swatch.ink { background: var(--ink); }
.accent-swatch.sage { background: var(--good); }
.accent-swatch.clay { background: var(--warn); }
.accent-swatch.plum { background: var(--note); }
.accent-swatch.slate { background: var(--muted); }
.page-gallery-list { display: grid; gap: 6px; }
.page-gallery-list > div { display: flex; gap: 6px; }
.page-gallery-list input { flex: 1; }
.page-live-link { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-13); }
.page-live-link code { background: var(--canvas); padding: 4px 8px; border-radius: var(--r-sm); font-size: var(--fs-12); }

/* ---- Customer area (/<slug>/me) ---- */
.customer-area { min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: var(--font); display: flex; flex-direction: column; }
.customer-area .sp-nav nav { align-items: center; }
.sp-me { display: inline-flex; align-items: center; gap: 6px; }
.ca-main { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 40px); display: grid; gap: var(--s-5); align-content: start; }
.ca-hero { display: flex; align-items: center; gap: var(--s-4); }
.ca-hero h1 { margin: 2px 0 4px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.5px; }
.ca-hero p { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.ca-tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; width: max-content; }
.ca-tabs button { border: 0; background: transparent; border-radius: var(--r-pill); padding: 8px 16px; font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ca-tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-accent); }
.ca-usual { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; background: var(--ink); color: var(--on-accent); border-radius: var(--r-xl); padding: clamp(18px, 2.5vw, 28px); }
.ca-usual .eyebrow { color: var(--rail-fg); }
.ca-usual h2 { margin: 4px 0; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.3px; }
.ca-usual p { margin: 0; color: var(--rail-fg); font-size: var(--fs-14); }
.ca-usual-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.ca-usual .button.secondary { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: var(--on-accent); }
.ca-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(16px, 2.5vw, 24px); display: grid; gap: var(--s-4); }
.ca-section .sp-section-head { margin-bottom: 0; }
.ca-section h2 { font-size: var(--fs-20); }
.ca-visits { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ca-visit { display: grid; grid-template-columns: 150px 1fr auto; gap: var(--s-3) var(--s-4); align-items: center; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); }
.ca-visit-when b, .ca-visit-what b { display: block; font-size: var(--fs-15); }
.ca-visit-when span, .ca-visit-what span { color: var(--muted); font-size: var(--fs-13); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ca-visit-actions { grid-column: 1 / -1; display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
.ca-visits.history .ca-visit { grid-template-columns: 150px 1fr auto auto; }
.ca-visits.history .ca-visit-actions { grid-column: auto; }
.ca-empty { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-6); color: var(--muted); text-align: center; }
.ca-muted { color: var(--muted); font-size: var(--fs-14); margin: 0; }
.ca-signin { align-content: center; max-width: 560px; min-height: calc(100vh - 64px); }
.ca-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(20px, 4vw, 36px); display: grid; gap: var(--s-3); box-shadow: var(--shadow-1); }
.ca-card h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.5px; }
.ca-lead { margin: 0; color: var(--muted); font-size: var(--fs-15); line-height: 1.5; }
.ca-fine { margin: 0; color: var(--muted); font-size: var(--fs-12); }
.ca-form { display: grid; gap: var(--s-3); }
.ca-form label { display: grid; gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--ink-2); }
.ca-form input, .ca-form select, .ca-form textarea { font: inherit; font-size: var(--fs-15); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
.ca-form input:focus-visible, .ca-form select:focus-visible, .ca-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ca-form input[inputmode="numeric"] { font-size: var(--fs-26); letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.ca-form code { font-size: var(--fs-20); letter-spacing: 3px; font-weight: 700; color: var(--accent-dark); }
.ca-form-actions { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; }
.ca-form-actions.start { justify-content: flex-start; }
.ca-profile { grid-template-columns: 1fr 1fr; }
.ca-span { grid-column: 1 / -1; }
.ca-check { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.ca-check input { width: 18px; height: 18px; min-height: 18px; padding: 0; }
.ca-privacy { border-top: 1px solid var(--line); padding-top: var(--s-4); display: grid; gap: var(--s-2); }
.ca-privacy h3 { margin: 0; font-size: var(--fs-15); }
.ca-privacy p { margin: 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.5; }
.ca-dialog-scrim { position: fixed; inset: 0; background: rgba(24, 27, 42, 0.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: var(--s-4); }
.ca-dialog { background: var(--surface); border-radius: var(--r-xl); padding: var(--s-5); width: min(440px, 100%); display: grid; gap: var(--s-3); box-shadow: var(--shadow-2); max-height: 90vh; overflow: auto; }
.ca-dialog.wide { width: min(640px, 100%); }
.ca-dialog h2 { margin: 0; font-size: var(--fs-20); }
.ca-dialog p { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.ca-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.ca-days button { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; min-width: 52px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font: inherit; cursor: pointer; color: var(--ink); }
.ca-days button small { font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; }
.ca-days button[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.ca-days button[aria-pressed="true"] small { color: var(--rail-fg); }
.ca-slots { display: flex; gap: 6px; flex-wrap: wrap; min-height: 40px; }
.ca-slots button { border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); padding: 8px 14px; font: inherit; font-size: var(--fs-14); font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); }
.ca-slots button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 640px) {
  .ca-visit, .ca-visits.history .ca-visit { grid-template-columns: 1fr auto; }
  .ca-visit-when { grid-column: 1 / -1; }
  .ca-visit-actions, .ca-visits.history .ca-visit-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ca-profile { grid-template-columns: 1fr; }
  .ca-usual-actions { width: 100%; }
  .ca-usual-actions .button { flex: 1; justify-content: center; }
  .customer-area .sp-nav nav { display: none; }
}
.form-error { margin: 0; color: var(--warn); font-size: var(--fs-13); font-weight: 600; }
.customer-area .button.ghost { color: var(--accent-dark); }
.customer-area .button.ghost:hover { background: var(--line-2); color: var(--ink); }

/* ---- Booking flow upgrades: any-barber shortcut, book for someone else, group booking ---- */
.booking-next-group { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
.attendee-block { grid-column: 1 / -1; display: grid; gap: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); background: var(--canvas); }
.attendee-toggle { display: grid !important; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; cursor: pointer; }
.attendee-toggle input { width: 18px; height: 18px; margin-top: 2px; }
.attendee-toggle strong { display: block; font-size: var(--fs-14); }
.attendee-toggle small { color: var(--muted); font-size: var(--fs-12); }
.review-attendee { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.group-entry { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; text-align: left; border: 1px dashed var(--blocked-line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-3) var(--s-4); font: inherit; color: var(--ink); cursor: pointer; margin-bottom: var(--s-3); }
.group-entry:hover { border-color: var(--accent); background: var(--ollo-soft); }
.group-entry strong { display: block; font-size: var(--fs-14); }
.group-entry small { color: var(--muted); font-size: var(--fs-12); }
.group-booking { display: grid; gap: var(--s-4); max-width: 760px; min-width: 0; width: 100%; box-sizing: border-box; }
.group-time { min-width: 0; display: grid; gap: var(--s-3); }
.group-booking .step-heading h2 { margin: 4px 0; }
.group-members { display: grid; gap: var(--s-3); }
.group-member { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4) var(--s-4); margin: 0; display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: var(--s-3); background: var(--surface); }
.group-member legend { grid-column: 1 / -1; font-weight: 700; font-size: var(--fs-13); display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; }
.group-member label { display: grid; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); }
.group-member input, .group-member select { font: inherit; font-size: var(--fs-14); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
.group-mode { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.group-mode button { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-3) var(--s-4); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.group-mode button small { grid-column: 2; font-weight: 400; color: var(--muted); font-size: var(--fs-12); }
.group-mode button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-accent); }
.group-mode button[aria-pressed="true"] small { color: var(--rail-fg); }
.group-mode button:disabled { opacity: 0.5; cursor: not-allowed; }
.group-days { display: flex; gap: 6px; align-items: stretch; overflow-x: auto; padding-bottom: 4px; min-width: 0; max-width: 100%; }
.group-days > button:not(.button) { flex: 1 0 auto; min-width: 48px; display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font: inherit; cursor: pointer; color: var(--ink); }
.group-days > button small { font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; }
.group-days > button[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.group-days > button[aria-pressed="true"] small { color: var(--rail-fg); }
.group-slots { display: flex; gap: 6px; flex-wrap: wrap; min-height: 44px; }
.group-slots button { display: grid; justify-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px 14px; font: inherit; font-size: var(--fs-14); font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); }
.group-slots button small { font-size: var(--fs-11); color: var(--muted); }
.group-slots button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.group-slots button[aria-pressed="true"] small { color: var(--on-accent); }
.group-plan, .group-summary { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.group-plan li, .group-summary li { display: flex; align-items: center; gap: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-2) var(--s-3); font-size: var(--fs-14); background: var(--surface); }
.group-summary li b, .group-summary li span { display: block; }
.group-summary li span { color: var(--muted); font-size: var(--fs-13); }
.group-summary li.failed { border-color: var(--warn); background: var(--warn-bg); }
.group-plan li.group-total { justify-content: flex-end; gap: 6px; border: 0; background: transparent; padding-top: 0; }
.group-actions { display: flex; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--s-4); }
@media (max-width: 640px) {
  .group-member { grid-template-columns: 1fr; }
  .group-mode { grid-template-columns: 1fr; }
  .booking-next-group { width: 100%; }
  .booking-next-group .button { flex: 1; justify-content: center; }
}
.ca-for { font-weight: 500; color: var(--muted); font-size: var(--fs-13); }
.event-group { margin-left: 4px; vertical-align: -1px; }
.panel-attendee { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-12); color: var(--muted); }

/* ---- Waiting list: queue chip, queue drawer, offer page, settings/outbox ---- */
.queue-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; position: relative; }
.queue-chip:hover { border-color: var(--ollo); }
.queue-chip[aria-expanded="true"] { background: var(--ollo-soft); border-color: var(--accent); }
.queue-chip .chip-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--note-bg); color: var(--note); }
.queue-chip > span:not(.chip-ic) { display: grid; line-height: 1.05; text-align: left; }
.queue-chip b { font-size: var(--fs-13); }
.queue-chip small { font-size: var(--fs-11); color: var(--muted); }
.queue-chip .offer-dot { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.queue-chip.has-offers .chip-ic { background: var(--ollo-soft); color: var(--accent-dark); }
@media (max-width: 640px) { .queue-chip > span:not(.chip-ic) small { display: none; } .queue-chip { padding-right: 10px; } }
.queue-drawer { gap: var(--s-3); }
.queue-drawer .button.ghost, .offer-card .button.ghost { color: var(--accent-dark); }
.queue-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-filters button { border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); padding: 6px 12px; font: inherit; font-size: var(--fs-12); font-weight: 600; color: var(--muted); cursor: pointer; }
.queue-filters button[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.queue-list li.offered { border-color: var(--accent); background: var(--ollo-soft); }
.queue-list li strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-list li .queue-offer-line { color: var(--accent-dark); display: inline-flex; align-items: center; gap: 4px; }
.queue-list li.queue-empty { display: block; color: var(--muted); font-size: var(--fs-13); border-style: dashed; }
.queue-offer-sent { border: 1px solid var(--accent); background: var(--ollo-soft); border-radius: var(--r-lg); padding: var(--s-3); display: grid; gap: 6px; font-size: var(--fs-13); }
.queue-offer-sent code, .outbox code { display: block; white-space: pre-wrap; font: inherit; font-size: var(--fs-13); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; color: var(--ink-2); }
.queue-offer-actions, .outbox-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-offering { display: grid; gap: var(--s-2); }
.queue-offering h3 { margin: 0; font-size: var(--fs-14); display: flex; align-items: center; gap: 6px; }
.queue-matches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.queue-matches button { width: 100%; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px 10px; font: inherit; cursor: pointer; color: var(--ink); }
.queue-matches button:hover { border-color: var(--accent); background: var(--ollo-soft); }
.queue-matches b { font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.queue-matches span { font-size: var(--fs-11); color: var(--muted); }
.queue-settings-link { border: 0; background: transparent; color: var(--accent-dark); font: inherit; font-size: var(--fs-12); text-align: left; display: inline-flex; gap: 6px; align-items: flex-start; cursor: pointer; padding: 0; }
.queue-settings-link:hover { text-decoration: underline; }
.offer-card { text-align: left; }
.offer-slot { display: flex; align-items: center; gap: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); background: var(--canvas); }
.offer-slot b { display: block; font-size: var(--fs-20); letter-spacing: -0.3px; }
.offer-slot span { color: var(--muted); font-size: var(--fs-14); }
.ca-linkish, .linkish { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-13); text-decoration: underline; cursor: pointer; padding: 0; justify-self: start; }
.linkish { color: var(--accent-dark); font-size: inherit; }
.workspace-switch-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); }
.workspace-switch-row strong { display: block; font-size: var(--fs-14); }
.workspace-switch-row small { color: var(--muted); font-size: var(--fs-12); }
.template-fields { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4) var(--s-4); margin: var(--s-3) 0 0; display: grid; gap: var(--s-3); }
.template-fields legend { font-weight: 700; font-size: var(--fs-13); padding: 0 6px; }
.template-fields textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-14); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); resize: vertical; }
.template-fields .field-help code { font-size: var(--fs-11); background: var(--canvas); padding: 1px 6px; border-radius: 6px; }
.outbox { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.outbox h3 { margin: 0; font-size: var(--fs-15); display: flex; align-items: baseline; gap: 8px; }
.outbox h3 small { color: var(--muted); font-size: var(--fs-12); font-weight: 500; }
.outbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.outbox-list li { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); display: grid; gap: 6px; }
.outbox-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-12); color: var(--muted); }

/* Reviews: stars, customer card, public list, hero rating */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .on { color: var(--accent); fill: var(--accent); }
.stars .off { color: var(--line); }
.review-card { display: grid; gap: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-4); text-align: left; }
.review-card.compact { padding: var(--s-3); grid-column: 1 / -1; }
.review-card h3 { margin: 0; font-size: 16px; }
.review-card header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.review-hint, .review-note, .review-when { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.review-body { margin: 0; color: var(--ink); }
.review-reply { margin: 0; display: grid; gap: 2px; border-left: 3px solid var(--accent); padding-left: var(--s-3); color: var(--ink-2); font-size: var(--fs-14); }
.review-reply strong { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-dark); }
.star-input { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.star-input button { border: 0; background: transparent; padding: 4px; cursor: pointer; color: var(--line); border-radius: var(--r); }
.star-input button.on { color: var(--accent); }
.star-input button.on svg { fill: var(--accent); }
.star-input button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.star-label { margin-left: var(--s-2); font-weight: 600; color: var(--ink-2); font-size: var(--fs-14); min-width: 7ch; }
.review-text { display: grid; gap: 4px; font-size: var(--fs-13); color: var(--muted); }
.review-text textarea { font: inherit; font-size: var(--fs-14); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; resize: vertical; }
.review-actions { display: flex; justify-content: flex-end; }
.ca-visit.with-review { flex-wrap: wrap; }
.sp-hero-rating { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-size: var(--fs-14); opacity: 0.92; }
.sp-hero-rating:hover { text-decoration: underline; }
.sp-rating-line { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); }
.sp-review-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
.sp-review { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-4); display: grid; gap: var(--s-2); }
.sp-review header { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-13); color: var(--muted); }
.sp-review header strong { color: var(--ink); }
.sp-review p { margin: 0; color: var(--ink-2); }
.sp-review-reply { border-left: 3px solid var(--accent); padding-left: var(--s-3); font-size: var(--fs-14); }
.sp-review-reply strong { color: var(--accent-dark); margin-right: 4px; }
.sp-review-note { display: inline-flex; align-items: center; gap: 6px; margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--fs-13); }

/* Photo uploads in editors */
.photo-field { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.photo-field input { flex: 1 1 200px; min-width: 0; }
.photo-upload { display: inline-flex; flex-direction: column; gap: 4px; }
.photo-upload-error { color: var(--warn); font-size: var(--fs-12); }
.photo-preview { position: relative; display: inline-block; width: 56px; height: 56px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); flex: 0 0 auto; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-clear { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; padding: 0; }
.page-gallery-list > div { display: flex; align-items: center; gap: var(--s-2); }
.page-gallery-list > div input { flex: 1; min-width: 0; }
.page-gallery-add { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
/* Reviews moderation panel */
.review-admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.review-admin { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); display: grid; gap: var(--s-2); background: var(--surface); }
.review-admin.hidden { background: var(--canvas); }
.review-admin header { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-13); color: var(--muted); }
.review-admin header strong { color: var(--ink); }
.review-admin-body { margin: 0; color: var(--ink-2); }
.review-admin-body.muted { font-style: italic; }
.review-admin-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.review-admin .button.ghost { color: var(--accent-dark); }
.review-reply-form { display: grid; gap: var(--s-2); }
.review-reply-form textarea { font: inherit; font-size: var(--fs-14); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }

/* Signed-out front door owns the whole viewport: no shell padding around the brand panel. */
.workspace.workspace-signed-out .workspace-main { padding: 0; max-width: none; }

/* =====================================================================================
   Commercial-grade pass — one control system for the whole workspace.
   Loaded after style.css so these win. Heights, radii and icon sizes come from tokens;
   colours are soft and matte; nothing flashes. Legacy selectors are re-pointed here
   rather than edited in place.
   ===================================================================================== */
:root {
  --ctl-h: 40px;        /* every button, input, select, segmented control */
  --ctl-h-sm: 34px;     /* compact chips inside toolbars */
  --ctl-r: 10px;
  --ic: 20px;           /* default icon */
  --ic-nav: 22px;       /* rail / tab bar */
  --ic-chip: 16px;
  --soft: #f3f4f6;      /* neutral surface tint */
  --soft-2: #eceef1;
  --line: #e3e5e9;
  --line-2: #eceef1;
  --shadow-1: 0 1px 2px rgba(14, 15, 18, .06), 0 0 0 1px rgba(14, 15, 18, .02);
  --shadow-2: 0 2px 6px rgba(14, 15, 18, .06), 0 14px 32px -12px rgba(14, 15, 18, .2);
}

/* ---- Buttons: one height, true centring, quiet colours ---- */
.workspace .button, .workspace .today-button, .workspace .icon-button, .workspace .topbar-iconbtn,
.workspace .segmented button, .workspace .select-with-icon, .workspace .workspace-toolbar select,
.workspace .workspace-toolbar input:not([type="checkbox"]):not([type="radio"]) {
  min-height: var(--ctl-h); height: var(--ctl-h); box-sizing: border-box;
  border-radius: var(--ctl-r); line-height: 1; font-size: var(--fs-13); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.workspace .button { padding: 0 16px; }
.workspace .button svg, .workspace .icon-button svg, .workspace .topbar-iconbtn svg { width: var(--ic); height: var(--ic); flex: 0 0 auto; }
.workspace .button.primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-1); }
.workspace .button.primary:hover { background: var(--accent-dark); }
.workspace .button.secondary { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.workspace .button.secondary:hover { background: var(--soft); border-color: #c9d3ce; }
.workspace .button.ghost { background: transparent; color: var(--accent-dark); padding: 0 12px; }
.workspace .button.ghost:hover { background: var(--soft); }
.workspace .button.danger { background: #fbeeee; color: #9b2c2c; }
.workspace .button:disabled { opacity: .5; box-shadow: none; }
.workspace .icon-button { width: var(--ctl-h); min-width: var(--ctl-h); padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.workspace .icon-button:hover { background: var(--soft); }
.workspace .date-controls .icon-button { width: var(--ctl-h); min-width: var(--ctl-h); height: var(--ctl-h); }
.workspace .today-button { padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.workspace .today-button:hover { background: var(--soft); }
.workspace .date-controls { gap: 8px; }
.workspace .date-controls h2 { font-size: var(--fs-14); font-weight: 650; }

/* Segmented control: chips share the parent height, real active state */
.workspace .segmented { height: var(--ctl-h); padding: 3px; border-radius: var(--ctl-r); background: var(--soft-2); gap: 2px; box-sizing: border-box; }
.workspace .segmented button { height: calc(var(--ctl-h) - 6px); min-height: 0; padding: 0 12px; border-radius: calc(var(--ctl-r) - 3px); font-size: var(--fs-13); font-weight: 600; color: var(--muted); }
.workspace .segmented button svg { width: var(--ic-chip); height: var(--ic-chip); }
.workspace .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.workspace .select-with-icon { border: 1px solid var(--line); background: var(--surface); padding: 0 8px 0 12px; font-size: var(--fs-13); color: var(--ink); }
.workspace .select-with-icon select { font-size: var(--fs-13); min-height: 0; height: 100%; padding: 0 4px; font-weight: 600; color: var(--ink); }
.workspace .select-with-icon svg { width: var(--ic-chip); height: var(--ic-chip); color: var(--muted); }
.workspace .calendar-toolbar { padding: 14px 16px; gap: 10px; }
.workspace .calendar-options { gap: 8px; }

/* ---- Inputs: same height as buttons, soft focus ring ---- */
.workspace input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
.workspace select, .workspace .workspace-form textarea, .workspace .panel-reason input {
  min-height: var(--ctl-h); border: 1px solid var(--line); border-radius: var(--ctl-r); padding: 0 12px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-14); box-sizing: border-box;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.workspace textarea { padding: 10px 12px; min-height: 96px; }
.workspace input:focus-visible, .workspace select:focus-visible, .workspace textarea:focus-visible {
  outline: 0; border-color: var(--accent); box-shadow: var(--ring);
}
.workspace label { gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--ink-2); }
.workspace .field-help { font-weight: 400; }

/* ---- Toggles: every boolean is a switch, never a bare checkbox ---- */
.workspace .workspace-check, .workspace .workspace-checks label, .workspace .workspace-switch-row, .workspace .switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  font-weight: 500; font-size: var(--fs-14); color: var(--ink);
}
.workspace .workspace-checks { display: grid !important; gap: 8px !important; }
.workspace .workspace-check input[type="checkbox"], .workspace .workspace-checks label input[type="checkbox"], .workspace .workspace-switch-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; order: 2; flex: 0 0 44px;
  width: 44px; height: 24px; min-height: 24px; border-radius: 12px; background: #cfd8d3; border: 0; margin: 0; cursor: pointer;
  transition: background .15s ease;
}
.workspace .workspace-check input[type="checkbox"]::after, .workspace .workspace-checks label input[type="checkbox"]::after, .workspace .workspace-switch-row input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease;
}
.workspace .workspace-check input[type="checkbox"]:checked, .workspace .workspace-checks label input[type="checkbox"]:checked, .workspace .workspace-switch-row input[type="checkbox"]:checked { background: var(--accent); }
.workspace .workspace-check input[type="checkbox"]:checked::after, .workspace .workspace-checks label input[type="checkbox"]:checked::after, .workspace .workspace-switch-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.workspace .workspace-check input[type="checkbox"]:focus-visible, .workspace .workspace-switch-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace .workspace-check input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
/* Opening-hours rows keep the day tick as a compact switch at the front */
.workspace .hours-row .workspace-check, .workspace .opening-hours .workspace-check { border: 0; padding: 0; min-height: 0; justify-content: flex-start; }

/* ---- Rail & top bar: bigger icons, calmer active state ---- */
.rail button { width: 46px; height: 46px; border-radius: 12px; }
.rail button svg { width: var(--ic-nav); height: var(--ic-nav); }
.rail button[aria-current] { background: rgba(0, 232, 176, .18); color: #fff; box-shadow: inset 3px 0 var(--ollo-green); }
.tabbar button svg { width: var(--ic-nav); height: var(--ic-nav); }
.topbar-search { height: var(--ctl-h); border-radius: var(--ctl-r); }
.topbar-search svg { width: var(--ic-chip); height: var(--ic-chip); }
.topbar-iconbtn { width: var(--ctl-h); height: var(--ctl-h); border-radius: var(--ctl-r); }
.wallet-chip { height: var(--ctl-h); border-radius: var(--ctl-r); }

/* ---- Panels: softer edges, consistent header rhythm ---- */
.workspace .workspace-panel, .workspace .workspace-card { border-radius: 16px; border-color: var(--line-2); box-shadow: var(--shadow-1); }
.workspace .workspace-panel h2, .workspace .workspace-card h2 { font-size: 17px; letter-spacing: -0.01em; }
.workspace .workspace-section-heading { margin-bottom: 18px; }
.workspace .workspace-section-heading .button { flex: 0 0 auto; }

/* ---- Settings: clear tabbed shell ---- */
.settings-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-1); }
.settings-nav button { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; min-height: 56px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; transition: background .12s ease; }
.settings-nav button svg { width: 20px; height: 20px; color: var(--muted); }
.settings-nav button span { display: grid; gap: 1px; min-width: 0; }
.settings-nav button b { font-size: var(--fs-14); font-weight: 600; }
.settings-nav button small { font-size: var(--fs-12); color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-nav button:hover { background: var(--soft); }
.settings-nav button[aria-selected="true"] { background: var(--ollo-soft); }
.settings-nav button[aria-selected="true"] svg, .settings-nav button[aria-selected="true"] b { color: var(--accent-dark); }
.settings-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.settings-body { display: grid; gap: 20px; min-width: 0; }
.settings-body > .workspace-panel, .settings-body > .workspace-card, .settings-body > section { min-width: 0; }
.settings-head { display: grid; gap: 4px; padding: 4px 4px 0; }
.settings-head h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.settings-head p { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.workspace .workspace-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
@media (max-width: 980px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 6px; scrollbar-width: none; }
  .settings-nav button { grid-template-columns: 20px auto; min-height: var(--ctl-h); padding: 0 12px; white-space: nowrap; }
  .settings-nav button small { display: none; }
}

/* ---- Calendar: no flash on refresh ---- */
.workspace .calendar-event, .workspace .timetable-slot, .workspace .calendar-block { transition: none; }
.workspace [aria-busy="true"] .calendar-event { opacity: 1; }
.workspace .calendar-empty { padding: 48px 16px; text-align: center; color: var(--muted); }
/* Opening hours: the day tick is a compact switch, rows share control height */
.workspace .week-hours { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.workspace .week-hours legend { font-weight: 600; font-size: var(--fs-13); margin-bottom: 8px; }
.workspace .week-hours-row { grid-template-columns: 150px 1fr auto 1fr; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.workspace .week-hours-row[data-open="false"] { grid-template-columns: 150px 1fr; }
.workspace .week-hours .week-hours-day input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 20px; min-height: 20px; border-radius: 10px; background: #cfd8d3; border: 0; margin: 0; cursor: pointer; transition: background .15s ease; flex: 0 0 36px; }
.workspace .week-hours .week-hours-day input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.workspace .week-hours .week-hours-day input[type="checkbox"]:checked { background: var(--accent); }
.workspace .week-hours .week-hours-day input[type="checkbox"]:checked::after { transform: translateX(16px); }
.workspace .week-hours-row[data-open="false"] .week-hours-day span { color: var(--muted); }
.workspace .week-hours-closed { justify-self: start; padding-left: 4px; }
@media (max-width: 640px) { .workspace .week-hours-row, .workspace .week-hours-row[data-open="false"] { grid-template-columns: 1fr auto 1fr; } .workspace .week-hours-row .week-hours-day { grid-column: 1 / -1; } }
/* Calendar toolbar joins the control system: every chip is --ctl-h tall and --ctl-r round */
.workspace .calendar-toolbar-row .button, .workspace .calendar-toolbar-row .button.icon-only, .toolbar-date, .toolbar-select,
.workspace .calendar-toolbar-row .segmented { height: var(--ctl-h); min-height: var(--ctl-h); border-radius: var(--ctl-r); }
.workspace .calendar-toolbar-row .button.icon-only { width: var(--ctl-h); min-width: var(--ctl-h); }
.workspace .calendar-toolbar-row .segmented button { height: calc(var(--ctl-h) - 6px); min-height: 0; border-radius: calc(var(--ctl-r) - 3px); }
.workspace .calendar-toolbar-row .button svg, .toolbar-select > svg, .toolbar-date-text svg { width: var(--ic-chip); height: var(--ic-chip); }
.toolbar-select { padding-left: 12px; gap: 6px; }
.toolbar-select > svg { flex: 0 0 auto; }
.toolbar-select select { padding: 0 28px 0 2px; max-width: 200px; }
.toolbar-select::after { right: 12px; }
.toolbar-date { min-width: 160px; }
.toolbar-date input[type="date"]:focus-visible { outline: 0; }
.toolbar-date:focus-within, .toolbar-select:focus-within { outline: 0; border-color: var(--accent); box-shadow: var(--ring); }
.workspace .calendar-toolbar-row .toolbar-today[aria-pressed="true"] { background: var(--ollo-soft); color: var(--accent-dark); border-color: transparent; }
/* Calendar body: soft grid, clear "now" line, matte event tints */
.workspace .calendar-summary { font-size: var(--fs-13); color: var(--muted); }
.workspace .calendar-summary b { color: var(--ink); }
.workspace .week-strip button[aria-pressed="true"] { background: var(--accent); color: #fff; border-radius: var(--ctl-r); }
.workspace .week-strip button { min-height: 36px; border-radius: var(--ctl-r); }
.workspace .toolbar-select select, .workspace .select-with-icon select { border: 0 !important; box-shadow: none !important; background: transparent !important; min-height: 0 !important; height: 100% !important; border-radius: 0 !important; }
/* "Move on timetable" arming bar */
.move-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--ollo-soft); border: 1px solid rgba(58,117,99,.25); color: var(--ink); font-size: var(--fs-14); }
.move-bar svg { color: var(--accent-dark); flex: 0 0 auto; }
.move-bar span { flex: 1; }
.move-bar .button { flex: 0 0 auto; }
.workspace:has(.move-bar) .calendar-event { opacity: .55; }
.workspace:has(.move-bar) .timetable-slot:hover, .workspace:has(.move-bar) .calendar-slot:hover { background: var(--ollo-soft); cursor: copy; }

/* Studio list header: keep both action buttons inside the column */
.studio-list .workspace-section-heading { flex-wrap: wrap; gap: 8px; }
.studio-list .workspace-section-heading > div:last-child,
.studio-list .workspace-section-heading .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-list .workspace-section-heading .button { min-width: 0; }

/* Weekly hours dialog: explicit layout so time inputs never collapse into the day-name column.
   Row = [day name] [working toggle] / [start – end] [break toggle] / [break start – end]. */
.workspace .weekly-hours-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: 10px 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
}
.workspace .weekly-hours-row { min-inline-size: 0; margin: 0; }
.workspace .weekly-hours-row > .weekly-hours-dayname { grid-column: 1; grid-row: 1; font-weight: 600; align-self: center; }
.workspace .weekly-hours-row[data-working="false"] > .weekly-hours-dayname { color: var(--muted); }
.workspace .weekly-hours-row > .workspace-check { grid-column: 2; justify-content: space-between; }
.workspace .weekly-hours-row > .weekly-hours-times { grid-column: 2; }
.workspace .weekly-hours-row > .week-hours-closed { grid-column: 2; color: var(--muted); }
.workspace .weekly-hours-times { display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr); align-items: center; gap: 10px; }
.workspace .weekly-hours-times .workspace-field, .workspace .weekly-hours-times .field { margin: 0; min-width: 0; }
.workspace .weekly-hours-times .workspace-field > span, .workspace .weekly-hours-times .field > span { display: none; } /* labels stay for screen readers via aria; the dash + row legend carry meaning */
.workspace .weekly-hours-times input[type="time"] { width: 100%; min-width: 120px; height: var(--ctl-h); }
.workspace .weekly-hours-times .week-hours-dash { padding: 0; color: var(--muted); }
@media (max-width: 640px) {
  .workspace .weekly-hours-row { grid-template-columns: 1fr; }
  .workspace .weekly-hours-row > .weekly-hours-dayname, .workspace .weekly-hours-row > .workspace-check, .workspace .weekly-hours-row > .weekly-hours-times, .workspace .weekly-hours-row > .week-hours-closed { grid-column: 1; }
}

/* Avatar photos: photo fills the circle, barber colour stays as a ring so the colour key still reads */
.avatar.has-photo { overflow: hidden; padding: 0; border-width: 2px; border-style: solid; border-color: currentColor; background: var(--soft); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.staff-column-heading .avatar { width: 34px; height: 34px; }
.week-row-label .avatar { width: 28px; height: 28px; font-size: 11px; }

/* Conflict resolver (schedule changes landing on appointments) */
.conflict-bulk { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13px; color: var(--muted); margin: -4px 0 4px; }
.conflict-bulk .linklike { font-size: 13px; }
.conflict-row { grid-template-columns: minmax(0, 1fr) auto; }
.conflict-row[data-action="WAITLIST"] { border-color: #cfc3e0; background: #f8f5fc; }
.conflict-row[data-action="LATER"] { border-color: var(--line); background: var(--soft); }
.conflict-row[data-action="KEEP"] { border-color: #c9dcd3; background: #f3f8f5; }
.conflict-reason { display: inline-flex; align-items: center; gap: 4px; color: #8a4a3a; font-weight: 600; margin-top: 2px; }
.conflict-actions button { padding-inline: 10px; }
.conflict-detail { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.conflict-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.block-outcome-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.block-outcome-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.block-outcome-list li[data-ok="false"] { border-color: #e6b8b3; background: #fdf6f5; }
.block-outcome-list li small { color: var(--muted); }
@media (max-width: 640px) { .conflict-row { grid-template-columns: 1fr; } .conflict-actions { flex-wrap: wrap; } }

/* ---------- Shifts (roster by date) ---------- */
.shifts { display: grid; gap: 16px; }
.shifts-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.shifts-head h2 { margin: 0 0 4px; }
.shifts-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.shifts-toolbar .toolbar-date { height: var(--ctl-h); border-radius: var(--ctl-r); border: 1px solid var(--line); padding: 0 10px; font: inherit; background: var(--surface); }
.shifts-summary { margin: 0; padding: 0 2px; color: var(--muted); }
.shifts-day { display: grid; gap: 10px; min-width: 0; }
.shifts { min-width: 0; }
.shifts-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shifts-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(90px, .7fr) minmax(160px, 1.3fr) minmax(180px, 1.4fr) auto; gap: 12px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.shifts-row[data-state="off"], .shifts-row[data-state="closed"] { background: var(--soft); }
.shifts-row[data-state="leave"] { background: #fbf6ee; border-color: #ead9bf; }
.shifts-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shifts-who strong { display: block; font-size: 14px; }
.shifts-who small { color: var(--muted); }
.shifts-state { display: grid; gap: 2px; justify-items: start; }
.shifts-state small, .shifts-hours small, .shifts-load small { color: var(--muted); font-size: 12px; display: block; }
.shifts-dated { color: var(--accent-dark) !important; font-weight: 600; }
.shifts-hours { display: grid; gap: 2px; }
.shifts-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.shifts-block { display: inline-flex !important; align-items: center; gap: 4px; }
.shifts-load { display: grid; gap: 4px; }
.shifts-bar { height: 6px; border-radius: 3px; background: var(--soft-2); overflow: hidden; }
.shifts-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s ease; }
.shifts-warn { color: #8a4a3a !important; display: inline-flex !important; align-items: center; gap: 4px; flex-wrap: wrap; }
.shifts-warn .linklike { color: inherit; font-weight: 600; }
.shifts-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.muted { color: var(--muted); }
.shifts-week-wrap { overflow-x: auto; }
.shifts-week { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.shifts-week th, .shifts-week td { padding: 6px; text-align: left; vertical-align: top; }
.shifts-week thead th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.shifts-week thead th small { display: block; font-size: 14px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.shifts-week thead th.today small { color: var(--accent-dark); }
.shifts-week tbody th { width: 150px; font-weight: 500; }
.shifts-week td.today { background: #f6faf8; }
.shifts-cell { width: 100%; min-height: 56px; display: grid; gap: 2px; align-content: center; text-align: left; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.shifts-cell:hover { border-color: var(--accent); }
.shifts-cell small { color: var(--muted); font-size: 11px; }
td[data-state="off"] .shifts-cell, td[data-state="closed"] .shifts-cell { background: var(--soft); }
td[data-state="leave"] .shifts-cell { background: #fbf6ee; border-color: #ead9bf; }
.shifts-cell-leave { color: #8a6a3a; font-weight: 600; }
.shifts-leave { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shifts-leave .notice, .shifts-leave > .workspace-notice { grid-column: 1 / -1; }
.shifts-leave h3 { margin: 0 0 8px; font-size: 14px; }
.shifts-leave-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.shifts-leave-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 13px; }
.shifts-leave-list small { color: var(--muted); }
@media (max-width: 900px) { .shifts-row { grid-template-columns: 1fr 1fr; } .shifts-actions { grid-column: 1 / -1; justify-content: flex-start; } .shifts-leave { grid-template-columns: 1fr; } }

/* ---------- Billing (Settings → Billing) ---------- */
.billing { display: grid; gap: 16px; }
.billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.billing-card { display: grid; gap: 12px; align-content: start; }
.billing-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.billing-card-head h3 { margin: 0; font-size: 15px; }
.billing-period { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.billing-facts { display: grid; gap: 8px; margin: 0; }
.billing-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 13px; }
.billing-facts dt { color: var(--muted); }
.billing-facts dd { margin: 0; }
.billing-lines, .billing-usage, .billing-addons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.billing-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.billing-lines li span { display: grid; }
.billing-lines li small, .billing-usage li small { color: var(--muted); font-size: 12px; }
.billing-lines li strong { font-variant-numeric: tabular-nums; }
.billing-lines .billing-total { border-bottom: 0; border-top: 2px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 15px; }
.billing-discount strong { color: var(--accent-dark); }
.billing-usage li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--soft); font-size: 13px; }
.billing-addons .switch-row div { display: grid; gap: 2px; }
.billing-addons .switch-row small { color: var(--muted); font-size: 12px; }
.billing-invoices { width: 100%; border-collapse: collapse; font-size: 13px; }
.billing-invoices th, .billing-invoices td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
.billing-invoices th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.billing-invoices .num { text-align: right; font-variant-numeric: tabular-nums; }
.billing-invoice-actions { display: flex; gap: 10px; justify-content: flex-end; }
.billing-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.billing-timeline li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.billing-timeline li small { color: var(--muted); white-space: nowrap; }
.billing-timeline li svg { color: var(--accent-dark); }
@media (max-width: 900px) { .billing-grid { grid-template-columns: 1fr; } }

/* ---------- foliyo admin ---------- */
.ollo-admin-shell { min-height: 100dvh; display: flex; background: #f5f6f8; color: #0b0b0c; --rail: #0b0b0c; --accent: #0b0b0c; --accent-dark: #000; }
.ollo-admin-shell .rail { top: 0; height: 100dvh; }
.ollo-admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; border-bottom: 1px solid #d9d6cc; background: #fbfaf6; position: sticky; top: 0; z-index: 5; }
.admin-brand { font-size: 18px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; } .admin-brand img { height: 24px; width: auto; display: block; } .admin-brand span { color: #6b6f6d; font-weight: 500; }
.admin-me { display: flex; align-items: center; gap: 12px; font-size: 13px; } .admin-me small { color: #6b6f6d; }
.ollo-admin-main { padding: 24px; display: grid; gap: 20px; align-content: start; }
.admin-section { display: grid; gap: 16px; }
.admin-section h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; } .admin-section h1 small { font-size: 14px; color: #6b6f6d; font-weight: 500; margin-left: 8px; }
.admin-section h2 { margin: 8px 0 0; font-size: 16px; }
.admin-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-section-head .toolbar { display: flex; gap: 8px; align-items: center; }
.admin-section-head select, .admin-section-head input { height: var(--ctl-h); border-radius: var(--ctl-r); border: 1px solid #cfcbbf; background: #fff; padding: 0 10px; font: inherit; }
.admin-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-tile { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid #d9d6cc; border-radius: 14px; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.admin-tile:disabled { cursor: default; } .admin-tile.warn { border-color: #d9a58f; background: #fff7f3; }
.admin-tile small { color: #6b6f6d; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; } .admin-tile strong { font-size: 24px; letter-spacing: -0.02em; } .admin-tile span { color: #6b6f6d; font-size: 12px; }
.admin-pre { font-size: 12px; background: #fff; border: 1px solid #d9d6cc; border-radius: 12px; padding: 12px; overflow: auto; max-height: 260px; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d9d6cc; border-radius: 14px; overflow: hidden; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ecebe4; vertical-align: top; }
.admin-table th { font-size: 11px; color: #6b6f6d; text-transform: uppercase; letter-spacing: .04em; background: #fbfaf6; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tr.clickable { cursor: pointer; } .admin-table tr.clickable:hover td { background: #f6f5ef; }
.admin-table small { color: #6b6f6d; } .admin-table.small { font-size: 12px; }
.admin-flag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #fdebe4; color: #8a4a3a; margin: 0 4px 2px 0; }
.admin-ok { color: #006b4d; font-size: 12px; }
.admin-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.admin-shop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-shop-head p { margin: 4px 0 0; color: #6b6f6d; font-size: 13px; }
.admin-shop-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-tabs { width: fit-content; }
.admin-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #d9d6cc; border-radius: 14px; background: #fff; }
.admin-card small { color: #6b6f6d; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; } .admin-card strong { font-size: 20px; } .admin-card span { color: #6b6f6d; font-size: 12px; }
.admin-card-wide { grid-column: 1 / -1; }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ollo-admin-shell .workspace-panel { background: #fff; border: 1px solid #d9d6cc; border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.ollo-admin-shell .workspace-panel h3 { margin: 0; font-size: 15px; } .ollo-admin-shell .workspace-panel h4 { margin: 8px 0 0; font-size: 13px; color: #6b6f6d; text-transform: uppercase; letter-spacing: .04em; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; } .admin-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .admin-notes li { padding: 10px 12px; border: 1px solid #ecebe4; border-radius: 10px; background: #fbfaf6; } .admin-notes p { margin: 0 0 4px; white-space: pre-wrap; font-size: 13px; } .admin-notes small { color: #6b6f6d; }
.admin-inline-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; } .admin-inline-form legend { font-weight: 600; margin-bottom: 6px; }
.ollo-admin-shell .workspace-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-feature-row { padding: 8px 12px !important; }
.admin-feature-grid { display: grid; grid-template-columns: 1.2fr 1.6fr .6fr .7fr .7fr .7fr auto auto 1fr auto; gap: 8px; align-items: end; }
.admin-feature-grid .workspace-field > span { font-size: 11px; }
.admin-mini-form { display: flex; gap: 6px; } .admin-mini-form input { height: 32px; border-radius: 8px; border: 1px solid #cfcbbf; padding: 0 8px; font: inherit; font-size: 12px; }
.admin-denied { display: grid; place-content: center; text-align: center; gap: 8px; }
.impersonation-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #b0413e; color: #fff; font-size: 13px; }
.impersonation-bar a { color: #fff; text-decoration: underline; }
@media (max-width: 1000px) { .admin-tiles { grid-template-columns: repeat(2, 1fr); } .admin-cards { grid-template-columns: 1fr 1fr; } .admin-two { grid-template-columns: 1fr; } .admin-feature-grid { grid-template-columns: repeat(3, 1fr); } }
.ollo-admin-shell { align-items: stretch; }
.ollo-admin-shell .rail { position: sticky; top: 0; height: 100dvh; align-self: flex-start; }
.ollo-admin-body { align-self: stretch; }
.ollo-admin-main { padding-top: 20px; }
body:has(.ollo-admin-shell) { margin: 0; padding: 0; background: #f5f6f8; }
#root:has(.ollo-admin-shell) { display: block; padding: 0; margin: 0; max-width: none; }
/* Admin invoicing */
.admin-invoice-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.admin-invoice-actions .button, .admin-invoice-actions button { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.admin-table tr.overdue td:first-child { box-shadow: inset 3px 0 0 #c9663f; }
.admin-invoice-line { gap: 8px; }
.admin-invoice-line .workspace-field span:empty { display: none; }
.ollo-admin-shell .admin-section-head .toolbar input { min-width: 220px; }
.ollo-admin-shell .notice code { font-size: 12px; }
/* Admin alerts / trend / broadcasts */
.admin-alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-alert { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid #d9d6cc; border-radius: 12px; background: #fff; }
.admin-alert > svg { margin-top: 2px; }
.admin-alert.crit { border-color: #d9a58f; background: #fff5f0; } .admin-alert.crit > svg { color: #a33; }
.admin-alert.warn { border-color: #e2cf9a; background: #fffaf0; } .admin-alert.warn > svg { color: #8a6a1a; }
.admin-alert.acked { opacity: .6; }
.admin-alert p { margin: 4px 0; font-size: 13px; color: #3d4340; } .admin-alert small { color: #6b6f6d; }
.admin-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.admin-trend { display: grid; gap: 10px; padding: 16px; border: 1px solid #d9d6cc; border-radius: 14px; background: #fff; }
.admin-trend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; } .admin-trend-head h2 { margin: 0; font-size: 16px; }
.admin-trend-facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #6b6f6d; } .admin-trend-facts strong { color: #0b0b0c; } .admin-trend-facts .up { color: #006b4d; } .admin-trend-facts .down { color: #a33; }
.admin-sparkline { margin: 0; } .admin-sparkline svg { width: 100%; height: 120px; display: block; }
.admin-sparkline figcaption { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #6b6f6d; margin-top: 6px; } .admin-sparkline figcaption i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.admin-exports h3 small { font-weight: 500; margin-left: 6px; }
.admin-export-range { display: inline-flex; align-items: center; gap: 6px; } .admin-export-range input { height: 36px; border-radius: 8px; border: 1px solid #cfcbbf; padding: 0 8px; font: inherit; font-size: 13px; }
.admin-providers summary { cursor: pointer; font-weight: 600; font-size: 14px; color: #6b6f6d; }
.admin-segment { border: 1px solid #e3e1d8; border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; } .admin-segment legend { font-weight: 600; padding: 0 6px; }
.admin-broadcast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .admin-broadcast-list li { padding: 12px 14px; border: 1px solid #e3e1d8; border-radius: 12px; display: grid; gap: 6px; }
.admin-broadcast-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .admin-broadcast-body { margin: 0; font-size: 13px; color: #3d4340; white-space: pre-wrap; } .admin-broadcast-list small { color: #6b6f6d; }

/* ---------- Calendar density (Compact / Standard / Large) + fluid board ----------
   Geometry comes from calendarDensity.ts through --step and --header-h on .calendar-board.
   The board takes the viewport height that's left after the toolbar, instead of a fixed cap, so
   tall screens show more of the day and short ones never leave dead space under the timetable. */
.workspace .workspace-main:has(> .connected-calendar) { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h)); min-height: 0; padding-top: 12px; padding-bottom: 12px; overflow: hidden; }
.workspace .workspace-main:has(> .connected-calendar) > .connected-calendar { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.workspace .workspace-main:has(> .connected-calendar) > :not(.connected-calendar) { flex: 0 0 auto; }
.workspace .connected-calendar > .connected-scroll { flex: 1 1 auto; min-height: 160px; max-height: none; }
/* Anything under the board (agenda list, cancelled history) shares the remaining height and scrolls itself. */
.workspace .connected-calendar > .closed-day-bookings, .workspace .connected-calendar > .booking-list { flex: 0 1 auto; overflow: auto; min-height: 0; }
.workspace .connected-calendar > .calendar-foot { flex: 0 0 auto; }
@media (max-width: 767px) {
  .workspace .workspace-main:has(> .connected-calendar) { height: calc(100dvh - var(--topbar-h) - var(--tabbar-h)); padding-top: 8px; padding-bottom: 8px; }
  .workspace .connected-calendar > .connected-scroll { max-height: none; min-height: 200px; }
}
/* Gridlines follow the step: light every 15 min, stronger on the hour. */
.workspace .connected-calendar .calendar-timeline {
  /* Quarter-hour hairlines, a visible line on the hour. Later layers paint on top. */
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--step, 44px) * 4 - 1px), var(--line-strong, #cfd4cc) calc(var(--step, 44px) * 4 - 1px), var(--line-strong, #cfd4cc) calc(var(--step, 44px) * 4)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--step, 44px) - 1px), var(--line-2) calc(var(--step, 44px) - 1px), var(--line-2) var(--step, 44px));
}
.workspace .connected-calendar .density-compact .calendar-timeline {
  /* Compact: quarter lines would be noise at 14–20px; show half-hours + hours only. */
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--step, 44px) * 4 - 1px), var(--line-strong, #cfd4cc) calc(var(--step, 44px) * 4 - 1px), var(--line-strong, #cfd4cc) calc(var(--step, 44px) * 4)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--step, 44px) * 2 - 1px), var(--line-2) calc(var(--step, 44px) * 2 - 1px), var(--line-2) calc(var(--step, 44px) * 2));
}
.workspace .connected-calendar .calendar-staff-header { height: var(--header-h, 60px); min-height: 0; }
.workspace .connected-calendar .staff-column-heading { padding: 0 10px; gap: 8px; height: 100%; }
.workspace .connected-calendar .staff-column-heading .avatar { width: 26px; height: 26px; font-size: 10px; }
.workspace .connected-calendar .staff-column-heading > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1; }
.workspace .connected-calendar .staff-column-heading div > span { margin-top: 0; overflow: hidden; text-overflow: ellipsis; }
.workspace .connected-calendar .time-gutter > span.half { font-size: 10px; color: var(--muted); }
.workspace .connected-calendar .calendar-event .event-inline { font-weight: 500; color: inherit; opacity: .85; }
.workspace .connected-calendar .calendar-event .event-inline-icons { display: inline-flex; align-items: center; margin-left: 6px; vertical-align: middle; }
.workspace .connected-calendar .calendar-event .event-inline-icons .block-icons { gap: 3px; }
.workspace .connected-calendar .calendar-event .event-inline-icons .block-icons svg { width: 10px; height: 10px; }

/* Compact: one line per card, hairline padding, single-row header. */
.workspace .connected-calendar .density-compact .calendar-event { padding: 1px 6px; gap: 0; line-height: 1.2; justify-content: flex-start; padding-top: 2px; border-left-width: 3px; }
.workspace .connected-calendar .density-compact .calendar-event strong { font-size: 11.5px; font-weight: 600; }
.workspace .connected-calendar .density-compact .calendar-event strong time { font-weight: 700; }
.workspace .connected-calendar .density-compact .calendar-event span, .workspace .connected-calendar .density-compact .calendar-event small { font-size: 10.5px; }
.workspace .connected-calendar .density-compact .calendar-block { padding: 1px 6px; font-size: 10.5px; }
.workspace .connected-calendar .density-compact .staff-column-heading div > span { display: none; }
.workspace .connected-calendar .density-compact .staff-column-heading .avatar { width: 22px; height: 22px; font-size: 9px; }
.workspace .connected-calendar .density-compact .staff-column-heading strong { font-size: var(--fs-12); }
.workspace .connected-calendar .density-compact .staff-hours-chip { height: 22px; font-size: 10px; padding: 0 6px; }
.workspace .connected-calendar .density-compact .time-gutter > span { font-size: 10px; }
.workspace .connected-calendar .density-compact .calendar-event .buffer-tail { display: none; }
/* Standard: two lines, tidy header. */
.workspace .connected-calendar .density-standard .calendar-event { padding: 3px 7px; gap: 1px; line-height: 1.2; }
.workspace .connected-calendar .density-standard .calendar-event strong { font-size: 12px; }
.workspace .connected-calendar .density-standard .calendar-event span, .workspace .connected-calendar .density-standard .calendar-event small { font-size: 11px; }
.workspace .connected-calendar .density-standard .staff-column-heading .avatar { width: 26px; height: 26px; }
/* Large keeps the original look (3 lines, roomy header). */
.workspace .connected-calendar .density-large .staff-column-heading .avatar { width: 32px; height: 32px; font-size: var(--fs-11); }

/* Footer: help on the left, density picker on the right. */
.workspace .calendar-foot { padding: 2px var(--s-3); gap: var(--s-1) var(--s-3); align-items: center; min-height: 32px; }
.workspace .calendar-foot .calendar-help summary { padding: 2px 6px; }
.workspace .calendar-foot .calendar-help { flex: 1 1 auto; }
.workspace .calendar-foot .calendar-help[open] { flex-basis: 100%; order: 3; }
.workspace .calendar-foot .calendar-help .calendar-legend { margin: 6px 0 2px; display: flex; flex-wrap: wrap; }

/* Toolbar diet: one row from 1024px up. Buttons shed their labels first, then the summary strip
   collapses to a single quiet line. */
.workspace .calendar-toolbar-row { padding: 7px var(--s-3); row-gap: 6px; }
.workspace .calendar-summary { min-height: 0; padding: 4px var(--s-3); font-size: var(--fs-11); border-bottom: 1px solid var(--line-2); }
.workspace .week-strip { padding: 3px 10px; gap: 4px; }
.workspace .week-strip button { min-height: 28px; padding: 1px 6px; gap: 5px; }
.workspace .week-strip button strong { font-size: var(--fs-12); }
@media (min-width: 1024px) and (max-width: 1439px) {
  .workspace .calendar-toolbar-row .toolbar-walkin .toolbar-label,
  .workspace .calendar-toolbar-row .toolbar-filters .toolbar-label,
  .workspace .calendar-toolbar-row .team-picker .toolbar-label .team-word,
  .workspace .calendar-toolbar-row .segmented .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .segmented button { padding: 0 9px; }
  .workspace .calendar-toolbar-row .button { padding: 0 10px; }
  .workspace .calendar-toolbar-row .toolbar-select select { max-width: 150px; }
}
/* Day summary lives inside the toolbar: fills the middle on wide screens, wraps to its own row below 1024px. */
.workspace .calendar-toolbar-row .calendar-summary { flex: 1 1 0; min-width: 0; justify-content: center; border: 0; padding: 0 var(--s-2); min-height: 0; gap: 2px var(--s-3); font-size: var(--fs-11); order: 0; display: flex; flex-wrap: nowrap; overflow: hidden; }
.workspace .calendar-toolbar-row .calendar-summary-stats { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1439px) { .workspace .calendar-toolbar-row .calendar-summary-stats > span:nth-child(3) { display: none; } }
.workspace .calendar-toolbar-row .calendar-summary > span:first-child { display: none; }
.workspace .calendar-toolbar-row .calendar-summary .button { margin-left: 0; }
@media (max-width: 1023px) {
  .workspace .calendar-toolbar-row .calendar-summary { order: 10; flex-basis: 100%; justify-content: flex-start; padding: 2px 0 0; }
}
@media (max-width: 767px) {
  .workspace .calendar-toolbar-row .calendar-summary { order: 10; }
  .workspace .calendar-toolbar-row .calendar-summary-stats > span + span::before { margin: 0 5px; }
}
/* Phone + compact: name beats the hours pill; hours stay one tap away in the ⋯ menu / tooltip. */
@media (max-width: 767px) {
  .workspace .connected-calendar .density-compact .staff-column-heading { padding: 0 6px; gap: 6px; }
  .workspace .connected-calendar .density-compact .staff-column-heading > div { display: flex; }
  .workspace .connected-calendar .density-compact .staff-column-heading strong { display: block; font-size: var(--fs-12); }
  .workspace .connected-calendar .density-compact .staff-hours-chip { display: none; }
  .workspace .connected-calendar .density-compact .staff-menu-button { width: 24px; height: 24px; }
  .workspace .connected-calendar .staff-column-heading .avatar { width: 22px; height: 22px; }
}

/* Calendar size menu (toolbar) */
.density-menu { position: relative; display: inline-flex; }
.density-menu-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 6px; display: grid; gap: 2px; }
.density-menu-title { margin: 4px 8px 6px; font-size: var(--fs-11); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.density-menu-list [role="menuitemradio"] { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r); background: transparent; font: inherit; color: var(--ink); cursor: pointer; }
.density-menu-list [role="menuitemradio"]:hover { background: var(--canvas); }
.density-menu-list [role="menuitemradio"][aria-checked="true"] { background: var(--ollo-soft); }
.density-menu-list [role="menuitemradio"] strong { display: block; font-size: var(--fs-13); }
.density-menu-list [role="menuitemradio"] small { display: block; color: var(--muted); font-size: var(--fs-11); line-height: 1.35; margin-top: 1px; }
.density-menu-check { display: inline-flex; align-items: center; justify-content: center; height: 18px; color: var(--accent-dark); }
.density-menu-foot { margin: 4px 8px 4px; font-size: var(--fs-11); color: var(--muted); }
@media (max-width: 767px) {
  /* Sits beside Day/Week/Agenda so the date row keeps its room. */
  .workspace .calendar-toolbar-row .toolbar-density { order: 5; }
  .workspace .calendar-toolbar-row .toolbar-density .button { width: 36px; min-width: 36px; padding: 0; }
  .workspace .calendar-toolbar-row .segmented { flex: 1 1 140px; }
  .density-menu-list { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--tabbar-h) + 12px); min-width: 0; }
  /* Phone cards: two comfortable lines at Standard, one at Compact; nothing auto-fits. */
  .workspace .connected-calendar .density-compact .calendar-event { padding: 2px 6px; }
  .workspace .connected-calendar .density-compact .calendar-event strong { font-size: 11px; }
}

/* ---- Workspace look (personal, admin side only) -------------------------------------------
   Set by src/client/workspaceTheme.ts as classes + --ws-* vars on <html>. Only the admin shell
   reads these; customer pages are wrapped in .shop-page and use the shop's own theme. */
html[class*="ws-accent-"] {
  --accent: var(--ws-accent);
  --accent-dark: var(--ws-accent-dark);
  --accent-grad: linear-gradient(135deg, var(--ws-accent-dark) 0%, var(--ws-accent) 100%);
  --ollo: var(--ws-rail);
  --ollo-soft: var(--ws-soft);
  --sage: var(--ws-soft);
  --forest: var(--ws-rail);
  --rail: var(--ws-rail);
  --mint-soft: var(--ws-soft);
  --accent-fill: var(--ws-fill, var(--ws-accent));
  --accent-fill-hover: var(--ws-fill-hover, var(--ws-accent-dark));
  --accent-fill-ink: var(--ws-fill-ink, #fff);
}
html.ws-dark {
  --canvas: #0f1114;
  --cream: #0f1114;
  --surface: #171a1f;
  --ink: #f2f3f5;
  --ink-2: #d9dce1;
  --muted: #a3a9b3;
  --muted-2: #7c838e;
  --line: #262b33;
  --line-2: #1f242b;
  --rail-fg: #aab3bd;
  --good-bg: rgba(63, 125, 92, 0.22); --good: #86c9a2;
  --warn-bg: rgba(184, 97, 58, 0.22); --warn: #eaa082;
  --note-bg: rgba(160, 130, 60, 0.22); --note: #e3c98a;
  --blocked-a: #1e2027; --blocked-b: #23252d; --blocked-line: #3a3d48;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, 0.5);
  --shadow-drawer: -12px 0 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
html.ws-dark body { background: var(--canvas); color: var(--ink); }
html.ws-dark .workspace input, html.ws-dark .workspace select, html.ws-dark .workspace textarea { background: #10131a; color: var(--ink); border-color: var(--line); }
html.ws-dark .workspace .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
/* Customer surfaces stay on the shop theme even inside a dark admin (embedded previews). */
html.ws-dark .shop-page { color-scheme: light; }

/* Settings nav groups */
.settings-nav-group { display: grid; gap: 2px; }
.settings-nav-group + .settings-nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.settings-nav-label { display: block; padding: 6px 12px 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.settings-nav button { min-height: 48px; }
/* Workspace look picker */
.ws-look { display: grid; gap: 14px; }
.ws-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-swatch { width: 40px; height: 40px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-1); }
.ws-swatch[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }

/* ---- Booking flow v2: its own page. One column of big choices, a slim sticky summary, a fixed action bar on phones. ---- */
.sp-next-list a, .sp-services a { text-decoration: none; box-sizing: border-box; }
.booking-app.standalone { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
/* Full width in the column (centred by its own max-width + auto margins). Without width:100% the
   auto margins shrink <main> to its content, and grids with minmax(0,1fr) (the confirmation and
   manage pages) collapse to a sliver. */
.booking-app.standalone > main { flex: 1; width: 100%; box-sizing: border-box; }
.booking-topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3); min-height: 60px; padding: 8px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.booking-back, .booking-me { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-14); min-height: 40px; padding: 0 10px; border-radius: var(--r); }
.booking-back { justify-self: start; margin-left: -10px; }
.booking-back h1 { font-size: var(--fs-14); font-weight: 600; margin: 0; letter-spacing: 0; }
.booking-me { justify-self: end; margin-right: -10px; color: var(--muted); }
.booking-back:hover, .booking-me:hover { background: var(--canvas); color: var(--ink); }
.booking-brand .shop-emblem { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: var(--fs-12); font-weight: 700; }
.booking-brand img.shop-emblem.shop-logo { width: auto; max-width: 140px; height: 36px; border-radius: 0; background: transparent; object-fit: contain; }
.booking-app.standalone .booking-body { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 48px; }
.booking-app.standalone .booking-body > .public-confirmation { padding-top: 24px; }
.booking-app.standalone .booking-progress { padding: 22px 0 18px; margin-bottom: 26px; }
.booking-app.standalone .booking-progress button { font-size: var(--fs-13); gap: 10px; }
.booking-app.standalone .booking-progress button > span { width: 30px; height: 30px; font-size: var(--fs-12); font-weight: 700; }
.booking-app.standalone .booking-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.booking-app.standalone .step-heading .eyebrow { font-size: var(--fs-11); letter-spacing: 0.12em; }
.booking-app.standalone .step-heading h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.8px; line-height: 1.05; margin-bottom: 10px; }
.booking-app.standalone .step-heading p { font-size: var(--fs-15); line-height: 1.55; margin-bottom: 26px; }
/* Service step */
.booking-app.standalone .group-entry { font-size: var(--fs-14); }
.booking-app.standalone .group-entry strong { font-size: var(--fs-15); }
.booking-app.standalone .group-entry small { font-size: var(--fs-13); }
.booking-app.standalone .service-search { min-height: 50px; }
.booking-app.standalone .service-search input { font-size: var(--fs-15); }
.booking-app.standalone .filter-chips button { font-size: var(--fs-13); min-height: 38px; padding: 0 16px; }
.booking-app.standalone .service-cards { gap: 12px; }
.booking-app.standalone .service-choice { min-height: 96px; padding: 18px 20px; gap: 18px; border-radius: var(--r-lg); }
.booking-app.standalone .service-thumb { width: 60px; height: 60px; border-radius: 14px; }
.booking-app.standalone .service-copy > strong { font-size: 18px; letter-spacing: -0.2px; }
.booking-app.standalone .service-copy > span { font-size: var(--fs-14); line-height: 1.45; }
.booking-app.standalone .service-copy small { font-size: var(--fs-13); }
.booking-app.standalone .popular-pill { font-size: var(--fs-11); }
.booking-app.standalone .choice-end > strong { font-size: var(--fs-20); letter-spacing: -0.3px; }
.booking-app.standalone .choice-radio { width: 24px; height: 24px; }
.booking-app.standalone .addon-heading h3 { font-size: 18px; }
.booking-app.standalone .addon-heading > span { font-size: var(--fs-13); }
.booking-app.standalone .addon-choice { min-height: 64px; padding: 14px 16px; }
.booking-app.standalone .addon-choice strong { font-size: var(--fs-15); }
.booking-app.standalone .addon-choice small { font-size: var(--fs-13); }
.booking-app.standalone .addon-choice > strong { font-size: 16px; }
/* Barber step */
.booking-app.standalone .barber-choices { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.booking-app.standalone .barber-choice { padding: 14px; border-radius: var(--r-lg); }
.booking-app.standalone .barber-choice-name strong { font-size: 18px; }
.booking-app.standalone .barber-role { font-size: var(--fs-13); }
.booking-app.standalone .barber-bio, .booking-app.standalone .barber-description { font-size: var(--fs-13); line-height: 1.5; }
.booking-app.standalone .barber-skills em { font-size: var(--fs-11); }
.booking-app.standalone .barber-rate { font-size: 18px; }
.booking-app.standalone .barber-rate > span { font-size: var(--fs-12); }
/* Time step */
.booking-app.standalone .next-available .eyebrow { font-size: var(--fs-11); }
.booking-app.standalone .next-chip strong { font-size: var(--fs-14); }
.booking-app.standalone .next-chip span { font-size: var(--fs-13); }
.booking-app.standalone .booking-date-toolbar h3 { font-size: 18px; }
.booking-app.standalone .small-toggles button { font-size: var(--fs-13); min-height: 36px; }
.booking-app.standalone .booking-dates { gap: 8px; }
.booking-app.standalone .booking-dates button { padding: 14px 4px; min-height: 84px; border-radius: var(--r); }
.booking-app.standalone .booking-dates button > span { font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; }
.booking-app.standalone .booking-dates button > strong { font-size: var(--fs-20); }
.booking-app.standalone .booking-dates button > small { font-size: var(--fs-11); }
.booking-app.standalone .slot-heading > span, .booking-app.standalone .slot-heading h3 { font-size: var(--fs-14); }
.booking-app.standalone .time-slots { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.booking-app.standalone .time-slots button { min-height: 54px; font-size: 16px; font-weight: 600; border-radius: var(--r); }
.booking-app.standalone .time-slots button > small { font-size: var(--fs-11); }
.booking-app.standalone .slot-note, .booking-app.standalone .field-help { font-size: var(--fs-13); }
/* Details step */
.booking-app.standalone .customer-fields label > span { font-size: var(--fs-14); font-weight: 600; }
.booking-app.standalone .customer-fields input, .booking-app.standalone .customer-fields textarea { font-size: 16px; min-height: 50px; padding: 12px 14px; }
.booking-app.standalone .customer-fields textarea { min-height: 96px; }
.booking-app.standalone .booking-privacy { font-size: var(--fs-13); line-height: 1.55; }
/* Review step */
.booking-app.standalone .review-appointment h3 { font-size: var(--fs-26); }
.booking-app.standalone .review-appointment p { font-size: var(--fs-14); }
.booking-app.standalone .review-customer h3 { font-size: 16px; }
.booking-app.standalone .review-customer strong { font-size: 16px; }
.booking-app.standalone .review-customer p { font-size: var(--fs-14); }
/* Summary */
.booking-app.standalone .booking-summary { padding: 22px; top: 80px; border-radius: var(--r-xl); }
.booking-app.standalone .booking-summary > h3 { font-size: 16px; margin-bottom: 16px; }
.booking-app.standalone .summary-service strong { font-size: var(--fs-15); }
.booking-app.standalone .summary-service div > span { font-size: var(--fs-13); }
.booking-app.standalone .summary-service > strong { font-size: 16px; }
.booking-app.standalone .summary-addon { font-size: var(--fs-13); }
.booking-app.standalone .summary-appointment p { font-size: var(--fs-14); }
.booking-app.standalone .summary-price > p { font-size: var(--fs-14); }
.booking-app.standalone .summary-price > p:first-child > strong { font-size: var(--fs-26); letter-spacing: -0.5px; }
.booking-app.standalone .deposit-line small { font-size: var(--fs-12); }
.booking-app.standalone .summary-price .remaining-line { font-size: var(--fs-13); }
.booking-app.standalone .cancellation-note { font-size: var(--fs-13); line-height: 1.5; }
/* Actions */
.booking-app.standalone .booking-actions { padding-top: 24px; margin-top: 28px; }
.booking-app.standalone .booking-actions .button { min-height: 50px; font-size: var(--fs-15); padding: 0 22px; }
.booking-app.standalone .secure-note { font-size: var(--fs-13); }
.booking-app.standalone .booking-footer { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: 28px 0 0; margin-top: 24px; border-top: 1px solid var(--line); font-size: var(--fs-13); color: var(--muted); }
.booking-app.standalone .booking-footer a { color: inherit; }
@media (max-width: 980px) {
  .booking-app.standalone .booking-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}
@media (max-width: 740px) {
  .booking-topbar { min-height: 56px; grid-template-columns: 1fr auto; }
  .booking-brand { display: none; }
  .booking-me span { display: none; }
  .booking-app.standalone .booking-body { padding-bottom: 104px; }
  .booking-app.standalone .booking-progress { padding: 18px 0 14px; margin-bottom: 20px; }
  .booking-app.standalone .booking-progress button { font-size: var(--fs-11); gap: 6px; }
  .booking-app.standalone .booking-progress button > strong { font-size: var(--fs-11); }
  .booking-app.standalone .booking-progress button > span { width: 30px; height: 30px; }
  .booking-app.standalone .step-heading h2 { font-size: 28px; }
  .booking-app.standalone .step-heading p { font-size: var(--fs-14); margin-bottom: 18px; }
  .booking-app.standalone .booking-layout { grid-template-columns: 1fr; gap: 24px; }
  /* Order matters on a phone: choices first, summary after. Steps 3-4 already restate the visit. */
  .booking-app.standalone .booking-summary { position: static; box-shadow: none; }
  .booking-app.standalone .service-choice { padding: 16px; gap: 14px; min-height: 0; }
  .booking-app.standalone .service-thumb { width: 52px; height: 52px; }
  .booking-app.standalone .service-copy > strong { font-size: 16px; }
  .booking-app.standalone .choice-end > strong { font-size: 18px; }
  .booking-app.standalone .barber-choices { grid-template-columns: 1fr 1fr; gap: 12px; }
  .booking-app.standalone .booking-dates { gap: 5px; }
  .booking-app.standalone .booking-dates button { padding: 10px 2px; min-height: 72px; }
  .booking-app.standalone .booking-dates button > strong { font-size: 18px; }
  .booking-app.standalone .booking-dates button > span { font-size: var(--fs-11); }
  .booking-app.standalone .time-slots { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .booking-app.standalone .time-slots button { min-height: 52px; font-size: var(--fs-15); }
  .booking-app.standalone .booking-actions { padding: 12px clamp(16px, 4vw, 40px) calc(12px + env(safe-area-inset-bottom)); margin: 0; }
  .booking-app.standalone .booking-actions .button { min-height: 50px; padding: 0 18px; }
  .booking-app.standalone .booking-actions .button.secondary { padding: 0 14px; }
  .booking-app.standalone .mobile-checkout-total > strong { font-size: 22px; }
  .booking-app.standalone .mobile-checkout-total > small { font-size: var(--fs-11); }
  .booking-app.standalone .booking-footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 400px) {
  .booking-app.standalone .barber-choices { grid-template-columns: 1fr; }
}
/* ---- Shop app chrome: bottom tab bar (phones only) ---- */
.shop-tabbar { display: none; }
@media (max-width: 740px) {
  .shop-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .shop-tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0 2px; color: var(--muted); text-decoration: none; font-size: var(--fs-11); font-weight: 600; min-height: 48px; }
  .shop-tabbar a[aria-current="page"] { color: var(--sp-accent-dark, var(--accent)); }
  .shop-page .shop-tabbar { background: color-mix(in srgb, var(--sp-surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-top-color: var(--sp-line); }
  .shop-page .shop-tabbar a { color: var(--sp-muted); }
  .shop-page .shop-tabbar a[aria-current="page"] { color: var(--sp-ink); }
  /* Leave room for the bar under every shop surface. */
  .shop-page > footer.sp-footer, .customer-area > footer.sp-footer { padding-bottom: 84px; }
  .booking-app.standalone .booking-body { padding-bottom: 176px; }
  .booking-app.standalone .booking-actions { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .sp-nav .sp-book-btn { display: none; }
  /* Visitors (no tab bar) keep a Sign in link in the header; members use the bar's Account tab. */
  .sp-nav .sp-me { display: none; }
  .no-tabbar .sp-nav nav { display: flex; margin-left: auto; }
  .no-tabbar .sp-nav nav > a:not(.sp-me) { display: none; }
  .no-tabbar .sp-nav .sp-me { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--sp-ink, var(--ink)); text-decoration: none; }
  /* Without the bar, nothing needs to sit above it. */
  .no-tabbar > footer.sp-footer, .customer-area.no-tabbar > footer.sp-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .booking-app.standalone.no-tabbar .booking-actions { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .booking-app.standalone.no-tabbar .booking-body { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Member home on the shop page ---- */
.sp-member { padding-top: clamp(20px, 3vw, 32px); padding-bottom: 0; }
.sp-member-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-3); }
.sp-member-card { display: grid; gap: 4px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.sp-member-card:hover { border-color: var(--sp-accent); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sp-member-card.accent { background: var(--sp-accent); border-color: var(--sp-accent); color: var(--on-accent); }
.sp-member-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.sp-member-card b { font-size: 18px; letter-spacing: -0.3px; }
.sp-member-card small { font-size: var(--fs-13); opacity: 0.85; }
.sp-member-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: var(--fs-13); font-weight: 700; }
.shop-page .sp-member-card { background: var(--sp-surface); border-color: var(--sp-line); color: var(--sp-ink); border-radius: var(--sp-r-lg); }
.shop-page .sp-member-card.accent { background: var(--sp-accent); border-color: var(--sp-accent); color: var(--sp-accent-ink); }
.shop-page.accent-ink .sp-member-card.accent { background: var(--sp-hero-bg); color: #fff; }
.shop-page.mode-dark.accent-ink .sp-member-card.accent { background: var(--sp-surface-2); color: var(--sp-ink); }

/* ---- Account step in the booking flow ---- */
.booking-auth { display: grid; gap: var(--s-4); }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-pill); }
.auth-switch button { border: 0; background: transparent; border-radius: var(--r-pill); min-height: 42px; font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--muted); cursor: pointer; }
.auth-switch button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.shop-page .auth-switch { background: var(--sp-surface-2); border-color: var(--sp-line); }
.shop-page .auth-switch button { color: var(--sp-muted); }
.shop-page .auth-switch button.active { background: var(--sp-surface); color: var(--sp-ink); }
.booking-auth .customer-fields .link { justify-self: start; font-size: var(--fs-13); }
.booking-app.standalone .booking-auth .customer-fields { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.review-options { display: grid; gap: var(--s-4); padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.review-options .attendee-block { margin: 0; }
.review-options .review-notes { display: grid; gap: 6px; font-size: var(--fs-14); font-weight: 600; }
.review-options textarea { min-height: 80px; font: inherit; font-weight: 400; }
.confirm-account { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--canvas); margin: 20px 0; }
.confirm-account h3 { font-size: 18px; letter-spacing: -0.2px; }
.confirm-account p { font-size: var(--fs-14); color: var(--muted); line-height: 1.5; margin: 0 0 12px; }
.shop-page .confirm-account { background: var(--sp-surface-2); border-color: var(--sp-line); }
.shop-page .confirm-account p { color: var(--sp-muted); }
.review-options .contact-pref legend { color: var(--ink); font-size: var(--fs-14); }
.review-options .contact-pref-hint { color: var(--muted); font-size: var(--fs-13); }
.shop-page .contact-pref legend { color: var(--sp-ink); }
.shop-page .contact-pref-hint { color: var(--sp-muted); }

/* ============================================================================================
   PHONE PASS — the shop app on real phones (≤ 740px). Safe areas (Dynamic Island / home bar),
   thumb-sized targets (≥ 48px), readable type (≥ 15px body, 17px labels), one clear action.
   Loaded last so it wins over the desktop rules above.
   ============================================================================================ */
/* Desktop / tablet: the five-step rail is the progress; the phone bar + count stay hidden. */
.booking-progress-bar, .booking-progress-count { display: none; }
@media (max-width: 740px) {
  /* --- Safe areas: the top bar colour runs behind the Dynamic Island / notch (html background +
         theme-color are set from the shop theme in theme.ts); content never hides under it. --- */
  html, body { background-color: var(--shell-bg, var(--surface)); }
  /* Opaque on phones: the translucent/blurred bar would show the island area as a different tint. */
  html .shop-page .booking-topbar, html .shop-page .sp-nav { background: var(--sp-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* The header scrolls away with the page (the tab bar is the persistent chrome); it is a plain
     row — brand on the left, one action on the right — that pads down from the island. */
  .booking-topbar, .sp-nav, .customer-area .sp-nav {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 8px calc(16px + env(safe-area-inset-left, 0px));
    min-height: calc(60px + env(safe-area-inset-top, 0px));
  }
  .booking-topbar { grid-template-columns: none; }
  .sp-nav nav, .customer-area .sp-nav nav { display: none; }
  .no-tabbar .sp-nav nav { display: flex; }
  .sp-nav .sp-brand { margin-right: auto; min-width: 0; }
  /* Sign out: right-aligned icon button (label for screen readers only). */
  .customer-area .sp-nav .ca-signout { margin-left: auto; width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; border-radius: 14px; }
  .customer-area .sp-nav .ca-signout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .customer-area .sp-nav .ca-signout svg { width: 22px; height: 22px; }
  .shop-tabbar { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .shop-tabbar a { min-height: 56px; font-size: var(--fs-12); gap: 4px; padding-top: 8px; }
  .shop-tabbar a svg { width: 24px; height: 24px; }

  /* --- Top bar: bigger back target, readable shop name. --- */
  .booking-back { gap: 10px; min-height: 48px; padding: 0 12px; margin-left: -12px; }
  .booking-back h1 { font-size: 17px; }
  .booking-back svg { width: 22px; height: 22px; }
  .booking-me { min-height: 48px; min-width: 48px; justify-content: center; margin-right: -12px; }
  .booking-me svg { width: 22px; height: 22px; }
  /* Brand: the uploaded logo is a stacked wordmark, so it is the brand on its own — no name beside
     it. Shops without a logo keep the initials tile + name. */
  .sp-brand strong { font-size: 17px; }
  .sp-brand .shop-emblem { width: 40px; height: 40px; font-size: 14px; }
  .shop-page .sp-brand img.shop-emblem.shop-logo { width: auto; height: 44px; max-width: 160px; }
  .sp-brand:has(img.shop-logo) strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sp-brand:has(img.shop-logo) { gap: 0; }
  .booking-topbar .booking-brand { display: none; }

  /* --- Progress: a compact "Step 3 of 5 · Date & time" line + bar, not five tiny labels. --- */
  .booking-app.standalone .booking-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 0 16px; margin-bottom: 18px; border-bottom: 0; position: relative; }
  .booking-app.standalone .booking-progress::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--sp-line-2, var(--line)); }
  .booking-app.standalone .booking-progress button { display: none; }
  .booking-app.standalone .booking-progress-count { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sp-muted, var(--ink-3)); order: 1; }
  .booking-app.standalone .booking-progress button[aria-current="step"] { display: inline-flex; flex-direction: row; align-items: center; gap: 0; font-size: 17px; color: var(--sp-ink, var(--ink)); padding: 0; opacity: 1; order: 2; min-height: 0; }
  .booking-app.standalone .booking-progress button[aria-current="step"]::before { content: "·"; margin-right: 10px; color: var(--sp-muted, var(--ink-3)); }
  .booking-app.standalone .booking-progress button[aria-current="step"] > span { display: none; }
  .booking-app.standalone .booking-progress button[aria-current="step"] > strong { font-size: 17px; font-weight: 700; }
  .booking-app.standalone .booking-progress button[aria-current="step"] > i { display: none; }
  .booking-app.standalone .booking-progress-bar { display: block; position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--sp-accent, var(--accent)); transition: width 0.25s ease; z-index: 1; }

  /* --- Step heading. --- */
  .booking-app.standalone .booking-layout .step-heading .eyebrow { display: none; } /* the progress line already says "Step 1 of 5" */
  .booking-app.standalone .group-booking .step-heading .eyebrow { font-size: 12px; margin-bottom: 6px; }
  .booking-app.standalone .step-heading h2 { font-size: 26px; line-height: 1.1; margin-bottom: 8px; }
  .booking-app.standalone .step-heading p { font-size: 15px; line-height: 1.5; margin-bottom: 16px; }

  /* --- Body: edge-to-edge with a 16px gutter; room for the two fixed bars at the bottom. --- */
  .booking-app.standalone .booking-body { padding: 0 16px calc(180px + env(safe-area-inset-bottom, 0px)); }
  .booking-app.standalone .booking-layout { gap: 20px; }

  /* --- Step 1: services. Title, price and duration all readable; whole row is the target. --- */
  .booking-app.standalone .group-entry { padding: 14px 16px; min-height: 64px; border-radius: 14px; }
  .booking-app.standalone .group-entry strong { font-size: 16px; }
  .booking-app.standalone .group-entry small { font-size: 14px; line-height: 1.4; }
  .booking-app.standalone .service-search { min-height: 52px; border-radius: 14px; }
  .booking-app.standalone .service-search input { font-size: 17px; }
  .booking-app.standalone .filter-chips { gap: 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .booking-app.standalone .filter-chips::-webkit-scrollbar { display: none; }
  .booking-app.standalone .filter-chips button { min-height: 44px; padding: 0 18px; font-size: 15px; white-space: nowrap; flex: 0 0 auto; }
  .booking-app.standalone .service-cards { gap: 10px; }
  .booking-app.standalone .service-choice { padding: 16px; gap: 14px; min-height: 84px; align-items: center; border-radius: 16px; }
  .booking-app.standalone .service-thumb { width: 48px; height: 48px; border-radius: 12px; flex: 0 0 48px; }
  .booking-app.standalone .service-thumb svg { width: 22px; height: 22px; }
  .booking-app.standalone .service-copy { gap: 3px; }
  .booking-app.standalone .service-copy > strong { font-size: 17px; line-height: 1.25; }
  .booking-app.standalone .service-copy > span { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .booking-app.standalone .service-copy small { font-size: 14px; }
  .booking-app.standalone .popular-pill { font-size: 11px; }
  .booking-app.standalone .choice-end { gap: 8px; }
  .booking-app.standalone .choice-end > strong { font-size: 19px; }
  .booking-app.standalone .choice-radio { width: 26px; height: 26px; }
  .booking-app.standalone .addon-heading h3 { font-size: 17px; }
  .booking-app.standalone .addon-heading > span { font-size: 14px; }
  .booking-app.standalone .addon-choice { min-height: 60px; padding: 12px 14px; border-radius: 14px; }
  .booking-app.standalone .addon-choice input { width: 24px; height: 24px; }
  .booking-app.standalone .addon-choice strong { font-size: 16px; }
  .booking-app.standalone .addon-choice small { font-size: 14px; }
  .booking-app.standalone .addon-choice > strong { font-size: 17px; }

  /* --- Step 2: barbers as full-width rows (photo left, text right), not tall cards. --- */
  .booking-app.standalone .barber-choices { grid-template-columns: 1fr; gap: 10px; }
  .booking-app.standalone .barber-choice { display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "photo name" "photo role" "photo bio" "photo skills" "photo rate"; column-gap: 14px; row-gap: 2px; align-items: start; padding: 14px; border-radius: 16px; min-height: 84px; }
  .booking-app.standalone .barber-portrait { grid-area: photo; width: 84px; height: 84px; aspect-ratio: 1; margin: 0; border-radius: 14px; }
  .booking-app.standalone .barber-portrait svg { width: 28px; height: 28px; }
  .booking-app.standalone .portrait-selected { width: 26px; height: 26px; right: 6px; bottom: 6px; top: auto; }
  .booking-app.standalone .barber-choice-name { grid-area: name; }
  .booking-app.standalone .barber-choice-name strong { font-size: 17px; }
  .booking-app.standalone .barber-role { grid-area: role; font-size: 14px; }
  .booking-app.standalone .barber-bio, .booking-app.standalone .barber-description { grid-area: bio; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
  .booking-app.standalone .barber-skills { grid-area: skills; margin-top: 6px; }
  .booking-app.standalone .barber-skills em { font-size: 12px; }
  .booking-app.standalone .barber-rate { grid-area: rate; margin-top: 8px; font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
  .booking-app.standalone .barber-rate > span { font-size: 13px; }
  .booking-app.standalone .barber-choice.any-barber .any-mark svg { width: 30px; height: 30px; }

  /* --- Step 3: date & time. Days as a horizontal strip of big tiles; slots in a 3-up grid, 56px tall. --- */
  .booking-app.standalone .next-available { padding: 14px; border-radius: 14px; }
  .booking-app.standalone .next-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .booking-app.standalone .next-chips::-webkit-scrollbar { display: none; }
  .booking-app.standalone .next-chip { flex: 0 0 auto; min-height: 56px; padding: 8px 14px; border-radius: 12px; }
  .booking-app.standalone .next-chip strong { font-size: 15px; }
  .booking-app.standalone .next-chip span { font-size: 14px; }
  .booking-app.standalone .booking-date-toolbar { margin: 4px 0 10px; }
  .booking-app.standalone .booking-date-toolbar h3 { font-size: 17px; }
  .booking-app.standalone .small-toggles button { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 15px; }
  .booking-app.standalone .booking-dates { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; }
  .booking-app.standalone .booking-dates::-webkit-scrollbar { display: none; }
  .booking-app.standalone .booking-dates button { flex: 0 0 66px; scroll-snap-align: start; min-height: 84px; padding: 10px 4px 10px; gap: 2px; border-radius: 14px; line-height: 1.15; }
  .booking-app.standalone .booking-dates button > span { font-size: 13px; }
  .booking-app.standalone .booking-dates button > strong { font-size: 22px; }
  .booking-app.standalone .booking-dates button > small { font-size: 12px; }
  .booking-app.standalone .slot-heading { margin: 14px 0 10px; }
  .booking-app.standalone .slot-heading h3, .booking-app.standalone .slot-heading > span { font-size: 15px; }
  .booking-app.standalone .daypart-chips button, .booking-app.standalone .slot-group-heading { font-size: 14px; }
  .booking-app.standalone .time-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .booking-app.standalone .time-slots button { min-height: 56px; font-size: 17px; border-radius: 14px; flex-direction: column; gap: 2px; }
  .booking-app.standalone .time-slots button > small { font-size: 12px; }
  .booking-app.standalone .slot-note, .booking-app.standalone .field-help { font-size: 14px; }

  /* --- Step 4: account. Comfortable form controls, 17px text so iOS never zooms. --- */
  .booking-app.standalone .auth-switch { padding: 5px; }
  .booking-app.standalone .auth-switch button { min-height: 48px; font-size: 16px; }
  .booking-app.standalone .customer-fields { gap: 16px; }
  .booking-app.standalone .customer-fields label { gap: 8px; }
  .booking-app.standalone .customer-fields label > span { font-size: 15px; }
  .booking-app.standalone .customer-fields input, .booking-app.standalone .customer-fields textarea { font-size: 17px; min-height: 54px; padding: 12px 16px; border-radius: 14px; }
  .booking-app.standalone .customer-fields .field-hint, .booking-app.standalone .customer-fields .field-error { font-size: 14px; }
  .booking-app.standalone .booking-auth .link { font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
  .booking-app.standalone .booking-privacy { font-size: 14px; }

  /* --- Step 5: review. One rhythm: 16px between blocks, cards with 16px padding, no double rules. --- */
  .booking-app.standalone .step-heading { margin-bottom: 4px; }
  .booking-app.standalone .step-heading h2 { margin-top: 0; }
  .booking-app.standalone .booking-flow > * + * { margin-top: 0; }
  .booking-app.standalone .review-appointment { padding: 24px 16px 20px; border-radius: 16px; margin: 0 0 16px; }
  .booking-app.standalone .review-appointment .eyebrow { margin-bottom: 4px; }
  .booking-app.standalone .review-customer { padding: 16px 0; margin: 0; border-bottom: 1px solid var(--sp-line, var(--line)); }
  .booking-app.standalone .review-customer > div { margin-bottom: 6px; gap: 12px; }
  .booking-app.standalone .review-customer > div h3 { margin: 0; }
  .booking-app.standalone .review-customer .link.small { font-size: 14px; white-space: nowrap; }
  .booking-app.standalone .review-customer > strong { display: block; margin: 0 0 2px; }
  .booking-app.standalone .review-customer p { margin: 0; line-height: 1.45; }
  .booking-app.standalone .review-options { padding: 16px 0 0; margin: 0; border-bottom: 0; gap: 14px; }
  .booking-app.standalone .attendee-block { padding: 14px 16px; border-radius: 14px; }
  /* Confirmation: same rhythm, tiles as a 2-up grid of 56px targets. */
  .booking-app.standalone .booking-body > .public-confirmation { padding-top: 8px; gap: 0; }
  .booking-app.standalone .public-confirmation .review-customer:last-of-type { border-bottom: 0; }
  .booking-app.standalone .public-confirmation .review-customer .button.ghost { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .booking-app.standalone .public-confirmation .review-customer .button.secondary { min-height: 52px; width: 100%; justify-content: center; font-size: 16px; margin-top: 10px; }
  .booking-app.standalone .public-confirmation .public-reference { font-size: 24px; margin: 2px 0 8px; }
  .booking-app.standalone .confirmation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
  .booking-app.standalone .action-tile { min-height: 56px; font-size: 15px; border-radius: 14px; }
  .booking-app.standalone .public-confirmation .booking-actions { position: static; display: grid; grid-template-columns: 1fr; margin-top: 16px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .booking-app.standalone .public-confirmation .booking-actions .button { width: 100%; justify-content: center; }
  .booking-app.standalone .review-appointment h3 { font-size: 24px; }
  .booking-app.standalone .review-appointment p { font-size: 15px; }
  .booking-app.standalone .review-customer h3 { font-size: 17px; }
  .booking-app.standalone .review-customer strong { font-size: 17px; }
  .booking-app.standalone .review-customer p { font-size: 15px; }
  .booking-app.standalone .review-options { gap: 16px; }
  .booking-app.standalone .attendee-toggle input { width: 24px; height: 24px; }
  .booking-app.standalone .attendee-toggle strong { font-size: 16px; }
  .booking-app.standalone .attendee-toggle small { font-size: 14px; }
  .booking-app.standalone .contact-pref .filter-chips button { min-height: 44px; }
  .booking-app.standalone .review-notes { font-size: 15px; }
  .booking-app.standalone .review-options textarea { font-size: 17px; min-height: 88px; padding: 12px 16px; border-radius: 14px; }

  /* --- Summary on a phone: a compact card after the choices (the action bar already shows the total). --- */
  .booking-app.standalone .booking-summary { padding: 16px; border-radius: 16px; }
  .booking-app.standalone .booking-summary > h3 { font-size: 15px; margin-bottom: 12px; }
  .booking-app.standalone .summary-service strong { font-size: 16px; }
  .booking-app.standalone .summary-service div > span, .booking-app.standalone .summary-appointment p, .booking-app.standalone .summary-price > p { font-size: 15px; }
  .booking-app.standalone .summary-price > p:first-child > strong { font-size: 24px; }
  .booking-app.standalone .cancellation-note { font-size: 14px; }

  /* --- Action bar: full-width primary, sits above the tab bar, respects the home indicator. --- */
  .booking-app.standalone .booking-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 16px 12px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .booking-app.standalone .booking-actions .button { min-height: 56px; font-size: 17px; border-radius: 14px; }
  .booking-app.standalone .booking-actions .button.primary, .booking-app.standalone .booking-actions .button:not(.secondary):last-child { width: 100%; justify-content: center; }
  /* Back collapses to a square icon button so the primary action gets the width. */
  .booking-app.standalone .booking-actions .booking-back-btn { width: 56px; min-width: 56px; padding: 0; justify-content: center; }
  .booking-app.standalone .booking-actions .booking-back-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .booking-app.standalone .booking-actions .booking-back-btn svg { width: 22px; height: 22px; }
  .booking-app.standalone .booking-actions .booking-next-group { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group { grid-column: 1 / -1; }
  .booking-app.standalone .booking-actions .booking-next-group .button { width: 100%; }
  /* Step 1: one row — total on the left, primary on the right; the "any barber" shortcut is a
     slim ghost row above it so the bar stays under 130px. */
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .booking-app.standalone .booking-actions .mobile-checkout-total { display: none; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group .button.secondary { grid-column: 1 / -1; order: -1; min-height: 40px; font-size: 14px; background: transparent; border-color: transparent; padding: 0; justify-content: flex-start; color: var(--sp-muted, var(--muted)); text-decoration: underline; text-underline-offset: 3px; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group .button.secondary svg { display: none; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group .button.secondary:disabled { opacity: 0.5; text-decoration: none; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group::before { content: attr(data-total); grid-column: 1; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--sp-ink, var(--ink)); white-space: nowrap; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group .button:not(.secondary) { grid-column: 2; }
  .booking-app.standalone .booking-actions .secure-note { display: none; }
  .booking-app.standalone .booking-actions > .field-help { display: none; }
  .booking-app.standalone .booking-footer { display: none; }

  /* --- Group booking (two or more): same thumb sizes as the single flow. --- */
  .booking-app.standalone .group-member { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 16px; border-radius: 16px; }
  .booking-app.standalone .group-member legend { font-size: 16px; }
  .booking-app.standalone .group-member label { font-size: 15px; }
  .booking-app.standalone .group-member input, .booking-app.standalone .group-member select { font-size: 17px; min-height: 52px; padding: 12px 14px; border-radius: 14px; }
  .booking-app.standalone .group-mode { grid-template-columns: 1fr; gap: 10px; }
  .booking-app.standalone .group-mode button { min-height: 60px; padding: 12px 16px; font-size: 16px; border-radius: 14px; }
  .booking-app.standalone .group-mode button small { font-size: 14px; }
  .booking-app.standalone .group-days { gap: 8px; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .booking-app.standalone .group-days::-webkit-scrollbar { display: none; }
  .booking-app.standalone .group-days > button:not(.button) { min-width: 60px; min-height: 64px; padding: 10px 6px; border-radius: 14px; gap: 4px; }
  .booking-app.standalone .group-days > button small { font-size: 12px; }
  .booking-app.standalone .group-days > button b { font-size: 20px; }
  .booking-app.standalone .group-days > .button { min-width: 44px; }
  .booking-app.standalone .group-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .booking-app.standalone .group-slots button { min-height: 56px; font-size: 17px; border-radius: 14px; padding: 8px 10px; align-content: center; }
  .booking-app.standalone .group-slots button small { font-size: 12px; }
  .booking-app.standalone .group-plan li, .booking-app.standalone .group-summary li { font-size: 15px; padding: 12px 14px; border-radius: 14px; }
  .booking-app.standalone .group-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .booking-app.standalone .group-actions .button { min-height: 54px; font-size: 17px; width: 100%; justify-content: center; }
  .booking-app.standalone .group-actions .button.ghost { order: 2; min-height: 48px; font-size: 15px; }

  /* --- Shop home. --- */
  .sp-hero-actions .button { min-height: 52px; font-size: 17px; }
  .sp-open { font-size: 13px; }
  .sp-section { padding: 24px 16px; }
  .sp-section h2 { font-size: 24px; }
  .sp-section-head p { font-size: 15px; }
  .sp-next-list :is(button, a) { min-height: 72px; padding: 14px 16px; }
  .sp-next-text b { font-size: 17px; }
  .sp-next-text small { font-size: 14px; }
  .sp-services :is(button, a) { min-height: 76px; padding: 14px 16px; }
  .sp-service-text b { font-size: 17px; }
  .sp-service-text small { font-size: 14px; }
  .sp-service-meta b { font-size: 17px; }
  .sp-service-meta small { font-size: 13px; }
  .sp-barber-text b { font-size: 17px; }
  .sp-barber-text small, .sp-barber-text p { font-size: 14px; }
  .sp-barber-actions .button { min-height: 48px; font-size: 16px; }
  .sp-member-card { padding: 16px; }
  .sp-member-card b { font-size: 19px; }
  .sp-member-card small { font-size: 15px; }
  .sp-cta-copy p { font-size: 16px; }
  .sp-hours > div { font-size: 16px; padding: 10px 12px; }
  .sp-address { font-size: 16px; }
  .sp-policies ul { font-size: 15px; }

  /* --- Account area: tight header, tabs as a full-width segmented control, cards 16px inside. --- */
  .customer-area .ca-main { padding: 12px 16px 24px; gap: 16px; }
  .customer-area .ca-main.ca-signin { align-content: start; min-height: 0; padding-top: 16px; }
  .customer-area .ca-signin .ca-card h1 { font-size: 28px; }
  .customer-area .ca-signin .ca-form .button { min-height: 54px; font-size: 17px; }
  .customer-area .ca-hero { gap: 14px; }
  .customer-area .ca-hero .eyebrow { display: none; }
  .customer-area .ca-hero h1 { font-size: 26px; margin: 0 0 2px; }
  .customer-area .ca-hero p { font-size: 15px; }
  .customer-area .ca-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .customer-area .ca-tabs button { min-height: 48px; font-size: 16px; justify-content: center; }
  .customer-area .ca-card { padding: 16px; gap: 12px; }
  .customer-area .ca-card h2 { margin: 0; }
  .customer-area .ca-card > p { margin: 0; font-size: 15px; line-height: 1.45; }
  .customer-area .ca-app { margin: 0; gap: 10px; }
  .shop-page.customer-area .ca-app-row { background: var(--sp-surface); border-color: var(--sp-line); border-radius: 14px; }
  .customer-area .ca-app-row { padding: 14px 16px; gap: 12px; }
  .customer-area .ca-app-row strong { font-size: 16px; }
  .customer-area .ca-app-row p { font-size: 14px; }
  .customer-area .ca-app-row .button { min-height: 44px; }
  /* Move / cancel dialogs become bottom sheets with the same day strip + 3-up slots as the flow. */
  .customer-area .ca-dialog-scrim { align-items: flex-end; padding: 0; }
  .customer-area .ca-dialog, .customer-area .ca-dialog.wide { width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); gap: 14px; }
  .customer-area .ca-dialog h2 { font-size: 22px; }
  .customer-area .ca-dialog p { font-size: 15px; }
  .customer-area .ca-days { gap: 8px; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .customer-area .ca-days::-webkit-scrollbar { display: none; }
  .customer-area .ca-days button { min-width: 60px; min-height: 64px; border-radius: 14px; gap: 4px; padding: 10px 6px; }
  .customer-area .ca-days button small { font-size: 12px; }
  .customer-area .ca-days button b { font-size: 20px; }
  .customer-area .ca-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .customer-area .ca-slots button { min-height: 52px; font-size: 16px; border-radius: 14px; padding: 8px; }
  .customer-area .ca-slots .ca-muted { grid-column: 1 / -1; }
  .customer-area .ca-dialog .ca-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .customer-area .ca-dialog .ca-form-actions .button { width: 100%; min-height: 52px; font-size: 16px; justify-content: center; }
  .customer-area .sp-footer { font-size: 13px; }
  .customer-area .sp-footer .sp-powered::before { content: " · "; }
  .customer-area .ca-visit-when, .customer-area .ca-card h2 { font-size: 17px; }
  .customer-area .ca-visit .button, .customer-area .ca-card .button { min-height: 46px; font-size: 15px; }
  .customer-area input, .customer-area textarea { font-size: 17px; min-height: 52px; }
}
/* Small phones (iPhone SE / mini): keep the same targets, tighten spacing. */
@media (max-width: 380px) {
  .booking-app.standalone .step-heading h2 { font-size: 23px; }
  .booking-app.standalone .service-copy > strong { font-size: 16px; }
  .booking-app.standalone .choice-end > strong { font-size: 17px; }
  .booking-app.standalone .time-slots { gap: 8px; }
  .booking-app.standalone .time-slots button { font-size: 16px; }
  .booking-app.standalone .booking-actions .button { font-size: 16px; padding: 0 14px; }
  .booking-app.standalone .booking-actions .button.secondary { padding: 0 12px; }
}

/* ---- Boot screen: the shop's mark on its own surface before any JavaScript arrives ---- */
html.boot-dark, html.boot-dark body { background: #17181e; }
.boot-shop { position: fixed; inset: 0; display: grid; place-items: center; align-content: center; gap: 22px; background: #ffffff; color: #181b2a; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.boot-shop.dark { background: #17181e; color: #f3f2ee; }
.boot-logo { height: 72px; width: auto; max-width: 60vw; object-fit: contain; animation: boot-in 0.35s ease-out both; }
.boot-shop.dark .boot-logo.flip { filter: invert(1) brightness(1.6) grayscale(1); }
.boot-initials { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font: 700 26px/1 var(--font, system-ui); color: #fff; animation: boot-in 0.35s ease-out both; }
.boot-bar { width: 72px; height: 3px; border-radius: 3px; background: rgba(127, 127, 127, 0.22); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: currentColor; opacity: 0.55; animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .boot-logo, .boot-initials, .boot-bar i { animation: none; } }

/* ============================================================================================
   BOOKING FLOW · PHONE, CLEAN PASS. One question per screen, one list, one action. Loaded last.
   ============================================================================================ */
/* Facts card + "More options" exist at every width; only the phone rules below change layout. */
.review-facts { display: grid; gap: 0; margin: 0 0 16px; padding: 4px 16px; border: 1px solid var(--sp-line, var(--line)); border-radius: 16px; background: var(--sp-surface, var(--surface)); }
.review-facts > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--sp-line, var(--line)); }
.review-facts > div:first-child { border-top: 0; }
.review-facts dt { margin: 0; display: grid; place-items: center; height: 22px; color: var(--sp-muted, var(--muted)); }
.review-facts dd { margin: 0; min-width: 0; display: grid; gap: 2px; }
.review-facts dd strong { font-size: 16px; font-weight: 700; color: var(--sp-ink, var(--ink)); overflow-wrap: anywhere; }
.review-facts dd span { font-size: 14px; color: var(--sp-ink-2, var(--ink-2)); }
.review-facts dd small { font-size: 14px; color: var(--sp-muted, var(--muted)); }
.review-more { border: 1px solid var(--sp-line, var(--line)); border-radius: 16px; background: var(--sp-surface, var(--surface)); margin: 0 0 16px; }
.review-more > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 16px; min-height: 52px; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--sp-ink, var(--ink)); }
.review-more > summary::-webkit-details-marker { display: none; }
.review-more > summary small { grid-column: 2; grid-row: 2; font-weight: 400; font-size: 13px; color: var(--sp-muted, var(--muted)); }
.review-more > summary > svg:first-child { grid-row: 1 / span 2; color: var(--sp-muted, var(--muted)); }
.review-more > summary > svg:last-child { grid-row: 1 / span 2; transition: transform 0.2s; color: var(--sp-muted, var(--muted)); }
.review-more[open] > summary > svg:last-child { transform: rotate(180deg); }
.review-more > .review-options { padding: 0 16px 16px; margin: 0; border: 0; }

@media (max-width: 740px) {
  /* --- Rhythm: 16px gutter, 12px between rows, 20px between blocks. Nothing else. --- */
  .booking-app.standalone .booking-body { padding-top: 0; }
  .booking-app.standalone .booking-progress { padding: 12px 0 14px; margin-bottom: 14px; }
  .booking-app.standalone .step-heading { margin: 0 0 16px; }
  .booking-app.standalone .step-heading h2 { font-size: 24px; margin: 0 0 4px; }
  .booking-app.standalone .step-heading p { font-size: 15px; margin: 0; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .step-heading p.step-sub { font-size: 14px; }
  .booking-app.standalone .booking-flow > * + * { margin-top: 0; }
  /* The side summary duplicates the action bar's total and the review step; not on phones. */
  .booking-app.standalone .booking-layout > .booking-summary { display: none; }
  .booking-app.standalone .booking-layout { display: block; }

  /* --- Step 1: service rows. Name · duration · price. Description one line. --- */
  .booking-app.standalone .service-search { margin-bottom: 10px; }
  .booking-app.standalone .filter-chips { margin-bottom: 12px; }
  .booking-app.standalone .service-cards { gap: 8px; }
  .booking-app.standalone .service-choice { padding: 14px 14px 14px 16px; min-height: 72px; border-radius: 14px; gap: 12px; }
  .booking-app.standalone .service-thumb { display: none; }
  .booking-app.standalone .service-copy { gap: 2px; }
  .booking-app.standalone .service-copy > strong { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .booking-app.standalone .service-copy > span { font-size: 13px; -webkit-line-clamp: 1; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .service-copy small { font-size: 13px; }
  .booking-app.standalone .choice-end { flex-direction: row; align-items: center; gap: 10px; }
  .booking-app.standalone .choice-end > strong { font-size: 17px; }
  .booking-app.standalone .choice-radio { width: 24px; height: 24px; }
  .booking-app.standalone .group-entry { margin: 16px 0 4px; padding: 12px 14px; min-height: 56px; border-radius: 14px; border-style: solid; }
  .booking-app.standalone .group-entry strong { font-size: 15px; }
  .booking-app.standalone .group-entry small { font-size: 13px; }
  .booking-app.standalone .addon-heading { margin: 20px 0 10px; }
  .booking-app.standalone .addon-heading h3 { font-size: 16px; }
  .booking-app.standalone .addon-heading > span { font-size: 13px; }
  .booking-app.standalone .addons { gap: 8px; }
  .booking-app.standalone .addon-choice { min-height: 56px; }

  /* --- Step 2: barber rows. Photo · name · role · price. One line each. --- */
  .booking-app.standalone .barber-choices { gap: 8px; }
  .booking-app.standalone .barber-choice { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "photo name rate" "photo role rate"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 14px 12px 12px; min-height: 76px; border-radius: 14px; }
  .booking-app.standalone .barber-portrait { width: 56px; height: 56px; border-radius: 12px; }
  .booking-app.standalone .barber-portrait svg { width: 22px; height: 22px; }
  .booking-app.standalone .portrait-selected { display: none; }
  .booking-app.standalone .barber-choice-name strong { font-size: 16px; }
  .booking-app.standalone .barber-role { font-size: 13px; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .barber-bio, .booking-app.standalone .barber-description, .booking-app.standalone .barber-skills { display: none; }
  .booking-app.standalone .barber-rate { grid-area: rate; margin: 0; padding: 0; border: 0; width: auto; font-size: 16px; font-weight: 700; display: grid; justify-items: end; gap: 0; }
  .booking-app.standalone .barber-rate > span { display: none; }
  .booking-app.standalone .barber-choice.any-barber .barber-role { font-size: 13px; }
  .booking-app.standalone .barber-choice.any-barber .any-mark svg { width: 24px; height: 24px; }
  .booking-app.standalone .barber-choice.chosen { border-color: var(--sp-accent, var(--accent)); box-shadow: 0 0 0 1px var(--sp-accent, var(--accent)) inset; }

  /* --- Step 3: the day strip, then the times. (The "Soonest" shortcuts duplicate the day strip
         on a phone and read as a second calendar, so they stay off here; the shop home still has
         a Next available section.) --- */
  .booking-app.standalone .next-available { display: none; }
  .booking-app.standalone .booking-date-toolbar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
  .booking-app.standalone .booking-date-toolbar h3 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: 0; text-transform: none; font-family: inherit; white-space: nowrap; flex: 1 1 auto; text-align: left; }
  .booking-app.standalone .small-toggles { display: flex; gap: 6px; flex: 0 0 auto; }
  .booking-app.standalone .small-toggles button { min-height: 40px; min-width: 40px; padding: 0 10px; font-size: 14px; border-radius: 10px; }
  .booking-app.standalone .small-toggles button svg { width: 16px; height: 16px; }
  .booking-app.standalone .booking-dates { margin-bottom: 4px; }
  .booking-app.standalone .booking-dates button { flex: 0 0 60px; min-height: 76px; padding: 8px 4px; gap: 1px; }
  .booking-app.standalone .booking-dates button > span { font-size: 12px; }
  .booking-app.standalone .booking-dates button > strong { font-size: 20px; }
  .booking-app.standalone .booking-dates button > small { font-size: 11px; }
  .booking-app.standalone .slot-heading { margin: 16px 0 8px; display: flex; align-items: baseline; justify-content: space-between; }
  .booking-app.standalone .slot-heading h3 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: 0; text-transform: none; font-family: inherit; }
  .booking-app.standalone .slot-heading > span { font-size: 13px; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .filter-chips.dayparts { margin-bottom: 10px; }
  .booking-app.standalone .filter-chips.dayparts button { min-height: 36px; font-size: 13px; padding: 0 12px; }
  /* Morning/Afternoon/Evening groups: quiet label, keep the barber name under a time when "any barber". */
  .booking-app.standalone .time-groups { display: grid; gap: 14px; }
  .booking-app.standalone .time-group > h4 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sp-muted, var(--muted)); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
  .booking-app.standalone .time-group > h4 small { font-size: 12px; font-weight: 600; background: var(--sp-surface-2, var(--canvas)); color: var(--sp-muted, var(--muted)); padding: 1px 7px; border-radius: 999px; }
  .booking-app.standalone .booking-flow > .review-appointment { display: none; } /* review step: the facts card replaces the hero (the confirmation keeps its own) */
  .booking-app.standalone .time-slots { gap: 8px; }
  .booking-app.standalone .time-slots button { min-height: 52px; font-size: 16px; }
  .booking-app.standalone .time-slots button > small { font-size: 11px; }
  .booking-app.standalone .slot-note { display: none; }
  .booking-app.standalone .booking-flow > .field-help { font-size: 14px; margin: 10px 0 0; }

  /* --- Step 4 (review): facts card, who booked, more options, policy line. --- */
  .booking-app.standalone .review-facts { margin-bottom: 12px; }
  .booking-app.standalone .review-customer { padding: 12px 16px; margin: 0 0 12px; border: 1px solid var(--sp-line, var(--line)); border-radius: 16px; background: var(--sp-surface, var(--surface)); }
  .booking-app.standalone .review-customer > div { margin-bottom: 4px; }
  .booking-app.standalone .review-customer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .review-customer > strong { font-size: 16px; }
  .booking-app.standalone .review-customer p { font-size: 14px; color: var(--sp-muted, var(--muted)); }
  .booking-app.standalone .review-more { margin-bottom: 12px; }
  .booking-app.standalone .review-more > .review-options { padding-top: 4px; gap: 14px; }
  .booking-app.standalone .attendee-block { border: 0; padding: 0; background: transparent; }
  .booking-app.standalone .review-options .contact-pref { margin: 0; }
  .booking-app.standalone .review-options .contact-pref .contact-pref-hint { font-size: 13px; }
  .booking-app.standalone .review-notes { font-size: 14px; }
  .booking-app.standalone .review-options textarea { min-height: 72px; }
  .booking-app.standalone .booking-flow > .notice { margin: 0; font-size: 14px; }
  .booking-app.standalone .booking-flow > .notice p { font-size: 14px; }
}

/* Step 3: "+N more" tile at the end of a part of the day — same size as a time, quieter. */
.time-slots .time-more { border: 1px dashed var(--sp-line-2, var(--line)); background: transparent; color: var(--sp-muted, var(--muted)); font-weight: 600; font-size: 14px; }
.time-slots .time-more:hover { color: var(--sp-ink, var(--ink)); border-color: var(--sp-ink, var(--ink)); }

/* ---- Loading states in the shop's own colours (no white boxes on a dark shop) ---- */
.shop-page .skeleton-slots > span { height: 52px; border-radius: 14px; background: linear-gradient(90deg, var(--sp-surface) 25%, var(--sp-surface-2) 50%, var(--sp-surface) 75%); background-size: 200% 100%; border: 1px solid var(--sp-line); }
.shop-page .skeleton-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* Switching day: the previous grid stays put, just softened, until the new one swaps in. */
.time-groups[data-loading="true"] { opacity: 0.55; transition: opacity 0.15s ease; pointer-events: none; }
.time-groups { transition: opacity 0.15s ease; }
/* Day strip tiles fill in quietly (no jump) once counts arrive. */
.booking-dates button > small { min-height: 1.2em; }

/* ---- Account consent (sign-up + profile): reminders by text/email, marketing opt-in ---- */
.ca-consent, .booking-consent { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--sp-line, var(--line)); border-radius: var(--sp-r-sm, 10px); background: var(--sp-surface-2, transparent); margin: 0; }
.ca-consent legend { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--sp-muted, var(--muted)); padding: 0 4px; }
.ca-consent .ca-check, .booking-consent .booking-check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 0.95rem; line-height: 1.35; }
.ca-consent .ca-check input, .booking-consent .booking-check input { margin-top: 3px; width: 18px; height: 18px; min-height: 18px; padding: 0; flex: none; accent-color: var(--sp-accent, var(--accent)); }
.ca-consent .ca-hint { color: var(--sp-muted, var(--muted)); font-size: 0.8rem; line-height: 1.4; }
.ca-consent .ca-hint a { color: inherit; text-decoration: underline; }
.booking-consent { margin-top: 6px; }

/* ---- Logo tone (measured at upload) ----
   A light/white mark is never inverted and sits on a dark plate wherever the surface is light;
   a dark mark is inverted to white only on dark surfaces (.logo-flip, shop-theme.css); a colour
   mark is left exactly as uploaded. */
.brand-shop-logo.tone-light, .avatar-logo.tone-light { background: #14151a; padding: 4px; border-radius: 8px; }
.brand-shop-logo.tone-dark, .brand-shop-logo.tone-colour, .avatar-logo.tone-dark, .avatar-logo.tone-colour { background: #fff; }
.brand-shop-logo.tone-light, .brand-shop-logo.tone-dark, .brand-shop-logo.tone-colour { object-fit: contain; }
.shop-page.mode-light.logo-light img.shop-emblem.shop-logo,
.shop-page.mode-light.logo-light img.shop-logo,
.shop-page.mode-light.logo-light img.sp-hero-logo { background: #14151a; padding: 6px; border-radius: var(--sp-r-sm, 8px); }
.shop-page.logo-light img.shop-logo, .shop-page.logo-colour img.shop-logo, .shop-page.logo-light img.sp-hero-logo, .shop-page.logo-colour img.sp-hero-logo { filter: none !important; }
.boot-logo.plate { background: #14151a; padding: 12px 16px; border-radius: 16px; }
.boot-shop.dark .boot-logo:not(.flip) { filter: none; }

/* ---- Booking flow, phones: slimmer action bar. One 48px row, tighter padding, the tab bar hides
   while the customer is mid-flow so the bottom of the screen is one bar, not two. ---- */
@media (max-width: 720px) {
  .booking-app.standalone .booking-actions { padding: 8px 14px 10px; gap: 8px; bottom: 0 !important; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; }
  .booking-app.standalone .booking-actions .button { min-height: 48px; font-size: 16px; border-radius: 12px; }
  .booking-app.standalone .booking-actions .booking-back-btn { width: 48px; min-width: 48px; }
  .booking-app.standalone .booking-actions .booking-back-btn svg { width: 20px; height: 20px; }
  .booking-app.standalone .booking-actions .booking-next-group { gap: 6px; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group::before { font-size: 19px; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group .button.secondary { min-height: 32px; font-size: 13px; }
  .booking-app.standalone .booking-body { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Mid-flow the tab bar steps aside; it returns on the confirmation screen. */
  .booking-app.standalone.in-flow .shop-tabbar { display: none; }
}

/* ---- Shop booking terms: acceptance tick (booking review, register) and the read-out. ---- */
.booking-terms, .ca-terms-text { margin-top: 10px; }
.booking-terms .booking-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; line-height: 1.4; }
.booking-terms .booking-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--sp-accent, var(--accent)); }
.booking-terms.has-error .booking-check { color: var(--warn); }
.booking-terms .link, .ca-check .link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.booking-terms-text, .ca-terms-text { max-height: 220px; overflow: auto; padding: 12px 14px; margin-top: 8px; border: 1px solid var(--sp-line, var(--line)); border-radius: var(--sp-r-sm, 10px); background: var(--sp-surface-2, transparent); font-size: 0.9rem; line-height: 1.5; white-space: pre-line; }
.booking-terms-text p, .ca-terms-text p { margin: 0 0 8px; }
.booking-terms-text p:last-child, .ca-terms-text p:last-child { margin-bottom: 0; }
.booking-terms .field-error { display: block; margin-top: 6px; }
/* Consent rows inside the booking register form: the generic .customer-fields label is a column
   grid; these are checkbox rows. */
.customer-fields .booking-consent label.booking-check, .customer-fields .booking-terms label.booking-check,
.booking-app .booking-consent label.booking-check, .booking-app .booking-terms label.booking-check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; }
.customer-fields .booking-consent label.booking-check > span, .customer-fields .booking-terms label.booking-check > span { font-size: 0.95rem; font-weight: 400; }
.customer-fields .booking-consent label.booking-check input, .customer-fields .booking-terms label.booking-check input { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; padding: 0; flex: none; }
.customer-fields .booking-terms { margin-top: 12px; }

/* ---- Staff sign-in on the shop's own address: the side panel wears the shop. ---- */
.auth-shop .auth-brand { background: #14151a; }
.auth-shop.accent-ollo .auth-brand { background: #0b0b0c; }
.auth-shop.accent-sage .auth-brand { background: #1b2a22; }
.auth-shop.accent-clay .auth-brand { background: #2a1a12; }
.auth-shop.accent-plum .auth-brand { background: #221a2a; }
.auth-shop.accent-slate .auth-brand { background: #1c2028; }
.auth-shop-mark { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 28px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 28px; }
.auth-shop-logo { max-width: 84px; max-height: 84px; object-fit: contain; }
.auth-shop-logo.tone-dark { filter: invert(1) brightness(1.6) grayscale(1); }
.auth-shop-initial { font: 800 44px/1 var(--font, system-ui); color: #fff; }
.auth-shop .auth-brand h1 { font-size: clamp(28px, 2.8vw, 40px); }
.auth-powered { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #a8b3ae; }
.auth-powered img { height: 16px; width: auto; opacity: 0.85; }
.auth-invite-card img.tone-light { background: #14151a; border-radius: 10px; padding: 4px; }
.auth-staff-link { margin-top: 18px; font-size: 0.85rem; color: var(--sp-muted, var(--muted)); text-align: center; }
.auth-staff-link a { color: inherit; text-decoration: underline; }
.ca-visit-focus { outline: 2px solid var(--sp-accent, var(--accent)); outline-offset: 2px; animation: visit-pulse 1.6s ease-out 1; }
@keyframes visit-pulse { from { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sp-accent, var(--accent)) 30%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }
.auth-invite-card img.tone-dark { background: #fff; }
.auth-shop .auth-invite-card img { object-fit: contain; padding: 4px; border-radius: 10px; }
.auth-switch a { color: inherit; }
.settings-subhead { margin: 18px 0 4px; font-size: var(--fs-15); font-weight: 700; }
.settings-head code { font-size: 0.9em; background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* ---- Getting started card (replaces the stacked setup + verify banners) ---- */
.getting-started { display: grid; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-1, 0 1px 2px rgba(20,21,26,.05)); }
.getting-started-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.getting-started-head strong { font-size: var(--fs-15); }
.getting-started-head span { color: var(--muted); font-size: var(--fs-13); }
.getting-started-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.getting-started-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.getting-started-list li > div { display: grid; gap: 2px; min-width: 0; }
.getting-started-list b { font-size: var(--fs-14); font-weight: 600; }
.getting-started-list small { color: var(--muted); font-size: var(--fs-12); }
.gs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.gs-dismiss { justify-self: end; font-size: var(--fs-12); color: var(--muted); }
.verify-nudge-compact > div:first-child { display: none; }
.verify-nudge-compact .setup-banner-actions { display: flex; gap: 8px; align-items: center; }
.verify-nudge-compact [data-testid="verify-nudge-hide"] { display: none; }
@media (max-width: 720px) {
  .getting-started-list li { grid-template-columns: 10px minmax(0, 1fr); }
  .getting-started-list li > .button, .getting-started-list li > .verify-nudge-compact { grid-column: 2; justify-self: start; }
}

/* ---- Settings on a phone: groups as a horizontal chip rail, tabs beneath, single-column forms ---- */
@media (max-width: 720px) {
  .settings-shell { gap: 12px; }
  .settings-nav { display: grid; grid-auto-flow: row; gap: 10px; padding: 10px; overflow: visible; }
  .settings-nav-group { display: grid; gap: 6px; }
  .settings-nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
  .settings-nav-group > .settings-nav-tabs { display: none; }
  .settings-nav-group[data-open="true"] > .settings-nav-tabs, .settings-nav-group:has(button[aria-selected="true"]) > .settings-nav-tabs { display: grid; gap: 6px; }
  .settings-nav-group:not(:has(button[aria-selected="true"])) .settings-nav-label { cursor: pointer; }
  .settings-nav button { grid-template-columns: 20px 1fr; min-height: 44px; padding: 0 10px; white-space: normal; }
  .settings-nav button small { display: none; }
  .settings-body .workspace-form-grid { grid-template-columns: 1fr; }
  .settings-head h2 { font-size: 20px; }
}
.settings-nav-label { background: none; border: 0; text-align: left; font: inherit; }
.settings-nav .settings-nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 12px 2px; font-weight: 700; }
@media (max-width: 720px) { .settings-nav .settings-nav-label { min-height: 40px; display: flex; align-items: center; border-radius: 10px; } .settings-nav-group[data-open="true"] .settings-nav-label, .settings-nav-group:has(button[aria-selected="true"]) .settings-nav-label { color: var(--accent-dark); background: var(--ollo-soft); } }

/* Website builder: colours + section layouts */
.brand-colours { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-3); }
.colour-field { display: flex; align-items: center; gap: 8px; }
.colour-field input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
.colour-field input[type="text"] { flex: 1 1 auto; font-family: ui-monospace, monospace; text-transform: lowercase; }
.section-layouts { grid-column: 1 / -1; }
.section-layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3) var(--s-4); margin-top: var(--s-2); }
.segmented.wrap { flex-wrap: wrap; }
.segmented.wrap button { flex: 0 1 auto; }
.shop-preview-frame.tablet { max-width: 820px; }
.shop-preview-frame.phone, .shop-preview-frame.tablet, .shop-preview-frame.desktop { max-height: 640px; }
.shop-preview-frame .shop-preview-page .sp-map { pointer-events: none; }
@media (max-width: 767px) { .brand-colours { grid-template-columns: 1fr; } }

/* ---- Onboarding: full-screen setup flow ------------------------------------------------------- */
.workspace-layout.onboarding > .rail, .workspace-layout.onboarding > .tabbar, .workspace-layout.onboarding > nav[aria-label="Primary"] { display: none; }
.workspace-layout.onboarding .workspace-main { padding: 0; max-width: none; }
.setup-flow { max-width: none; margin: 0; gap: 0; min-height: calc(100vh - var(--topbar-h, 56px)); background: var(--canvas); }
.setup-flow-top { display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--topbar-h, 0px); z-index: 3; }
.setup-flow-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.setup-flow-progress { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.setup-flow-progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.setup-flow-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; align-items: start; }
.setup-flow-rail { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 20px 12px; border-right: 1px solid var(--line); position: sticky; top: calc(var(--topbar-h, 0px) + 55px); max-height: calc(100vh - var(--topbar-h, 0px) - 55px); overflow-y: auto; }
.setup-flow-rail li button { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; justify-items: start; text-align: left; padding: 10px 10px; border: 0; border-bottom: 0 !important; border-radius: var(--r); }
.setup-flow-rail li[data-current="true"] button { background: var(--surface); box-shadow: var(--shadow-1); }
.setup-flow-step-text { display: grid; gap: 1px; }
.setup-flow-step-text span { font-size: 13.5px; }
.setup-flow-step-text small { font-size: 12px; color: var(--muted); line-height: 1.35; font-weight: 400; }
.setup-flow-main { display: grid; gap: 16px; padding: 24px clamp(16px, 3vw, 40px) 48px; max-width: 980px; width: 100%; }
.setup-flow-main .setup-wiz-head { margin-bottom: 2px; }
/* Brand step */
.setup-brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.setup-brand-form { display: grid; gap: 16px; }
.setup-brand-preview { display: grid; gap: 8px; justify-items: center; position: sticky; top: 90px; }
.setup-brand-preview .shop-preview-frame.phone { max-width: 320px; max-height: 560px; }
.setup-accents { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setup-accents [role="radio"] { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; display: grid; place-items: center; color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.setup-accents [role="radio"][aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--ink); }
.setup-accent-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.setup-accent-custom input[type="color"] { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); padding: 2px; background: var(--surface); cursor: pointer; }
.setup-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.setup-golive .setup-share-actions { gap: 8px; }
@media (max-width: 1023px) {
  .setup-flow-body { grid-template-columns: 1fr; }
  .setup-flow-rail { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; gap: 4px; padding: 10px 12px; scrollbar-width: none; }
  .setup-flow-rail li { flex: 0 0 auto; }
  .setup-flow-rail li button { grid-template-columns: 22px auto; align-items: center; padding: 8px 10px; }
  .setup-flow-step-text small { display: none; }
  .setup-brand-grid { grid-template-columns: 1fr; }
  .setup-brand-preview { position: static; }
  .setup-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .setup-flow-top { gap: 10px; padding: 10px 14px; }
  .setup-flow-brand { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
  .setup-flow-main { padding: 16px 14px 40px; }
}
.setup-flow-progress i { background: var(--ollo, var(--accent)); }
.setup-brand-preview .shop-page .sp-hero h1 { font-size: clamp(26px, 9cqw, 40px); overflow-wrap: anywhere; }
.setup-brand-preview .shop-page .sp-brand strong { max-width: 38cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Barber phone app: Today agenda ------------------------------------------------------------ */
.barber-home { display: grid; gap: 14px; padding-bottom: 12px; }
.barber-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.barber-home-kicker { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.barber-home-head h1 { margin: 0; font-size: clamp(24px, 6vw, 30px); letter-spacing: -0.5px; }
.barber-home-stats { margin: 0; display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.barber-home-stats b { color: var(--ink); font-size: 15px; margin-right: 3px; }
.barber-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.barber-week-day { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; min-height: 64px; }
.barber-week-day small { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.barber-week-day b { font-size: 16px; }
.barber-week-day.is-today b { color: var(--accent-dark); }
.barber-week-day.is-off { border-style: dashed; background: var(--canvas); }
.barber-week-day.is-off small, .barber-week-day.is-off b { color: var(--ink-2); }
.barber-week-day[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.barber-week-day[aria-selected="true"] small, .barber-week-day[aria-selected="true"] b { color: #fff; }
.barber-week-count { font-size: 11px; font-weight: 700; min-height: 14px; color: var(--accent-dark); }
.barber-week-day[aria-selected="true"] .barber-week-count { color: #fff; }
.barber-week-nav { display: flex; justify-content: center; gap: 8px; margin-top: -6px; }
.barber-focus { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px; display: grid; gap: 12px; box-shadow: var(--shadow-1); border-left: 4px solid var(--accent); }
.barber-focus.in-chair { border-left-color: var(--good); }
.barber-focus header { display: flex; justify-content: space-between; align-items: center; }
.barber-focus-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-dark); }
.barber-focus.in-chair .barber-focus-label { color: var(--good); }
.barber-focus-time { font-size: 18px; font-variant-numeric: tabular-nums; }
.barber-focus-body { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: transparent; border: 0; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.barber-focus-body > span { display: grid; gap: 2px; min-width: 0; }
.barber-focus-body b { font-size: 18px; }
.barber-focus-body small { color: var(--muted); font-size: 13px; }
.barber-note { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2) !important; }
.barber-focus-actions { display: flex; gap: 8px; }
.barber-focus-actions .button, .barber-focus-actions a.button { flex: 1 1 auto; justify-content: center; min-height: 46px; font-size: 15px; }
.barber-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.barber-row { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 10px 10px 12px; }
.barber-row.is-focus { border-color: var(--accent); }
.barber-row.is-past { background: var(--canvas); }
.barber-row.status-completed { background: var(--canvas); }
.barber-row-time { display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.barber-row-time b { font-size: 16px; }
.barber-row-time small { font-size: 11px; color: var(--ink-2); }
.barber-row-main { display: grid; gap: 2px; min-width: 0; text-align: left; background: transparent; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.barber-row-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barber-row-main small { font-size: 12.5px; color: var(--muted); }
.barber-status { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; width: fit-content; padding: 2px 7px; border-radius: 999px; background: var(--ollo-soft); color: var(--accent-dark); }
.barber-status.s-in_service { background: var(--good-bg); color: var(--good); }
.barber-status.s-completed { background: var(--canvas); color: var(--muted); }
.barber-row-step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--accent-dark); display: grid; place-items: center; cursor: pointer; }
.barber-row-step.is-done { background: var(--good); border-color: var(--good); color: #fff; }
.barber-row-step:disabled { opacity: .5; }
.barber-empty { padding: 28px 12px; }
.barber-new { display: flex; justify-content: center; padding-top: 6px; }
.barber-new .button { min-height: 46px; padding: 0 22px; }
/* Bottom bar sizes to its tabs (+ the centre button). Barber app: 5 tabs + FAB = 6 columns. */
.tabbar.tabs-5 { grid-template-columns: repeat(6, 1fr); }
.tabbar.tabs-5 > button { font-size: 10.5px; }
.tabbar.tabs-5 > button svg { width: 20px; height: 20px; }

/* ---- Staff onboarding (first sign-in for invited team members) ------------------------------- */
.workspace-onboarding .workspace-main { padding: 0; max-width: none; }
.staff-onb { min-height: 100vh; background: var(--canvas); display: grid; grid-template-rows: auto 1fr; }
.staff-onb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.staff-onb-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.staff-onb-brand img { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.staff-onb-brand .shop-emblem { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; }
.staff-onb-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.staff-onb-dots li { width: 22px; height: 4px; border-radius: 999px; background: var(--line-2); }
.staff-onb-dots li[data-done="true"], .staff-onb-dots li[data-current="true"] { background: var(--accent); }
.staff-onb-body { display: grid; place-items: start center; padding: clamp(16px, 4vw, 40px) 16px 48px; }
.staff-onb-card { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-1); padding: clamp(20px, 4vw, 32px); display: grid; gap: 14px; }
.staff-onb-card h1 { margin: 0; font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.5px; }
.staff-onb-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.staff-onb-welcome { text-align: center; justify-items: center; }
.staff-onb-welcome .avatar.large { width: 88px; height: 88px; font-size: 26px; border-radius: 28px; }
.staff-onb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; font-size: 14px; color: var(--ink-2); }
.staff-onb-list li { display: flex; gap: 8px; align-items: flex-start; }
.staff-onb-list svg { color: var(--good); flex: 0 0 auto; margin-top: 2px; }
.staff-onb-profile { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.staff-onb-photo { display: grid; gap: 8px; justify-items: center; }
.staff-onb-photo .avatar.large { width: 120px; height: 120px; font-size: 34px; border-radius: 32px; }
.staff-onb-photo .photo-preview img { width: 120px; height: 120px; border-radius: 32px; object-fit: cover; }
.staff-onb-fields { display: grid; gap: 12px; }
.staff-onb-skills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.staff-onb-skills .chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--canvas); font: inherit; font-size: 13px; cursor: pointer; }
.staff-onb-skills input { flex: 1 1 160px; min-width: 140px; }
.staff-onb-week { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.staff-onb-hours { margin: 0; }
.staff-onb-hours > div.off { color: var(--muted); }
.staff-onb-services h3 { margin: 0 0 8px; font-size: 15px; }
.staff-onb-services ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.staff-onb-services li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--canvas); font-size: 14px; }
.staff-onb-services li small { color: var(--muted); }
.staff-onb-install { margin: 0; padding: 0 0 0 4px; list-style: none; display: grid; gap: 10px; counter-reset: st; }
.staff-onb-install li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--canvas); font-size: 15px; }
.staff-onb-install svg { color: var(--accent-dark); flex: 0 0 auto; }
@media (max-width: 767px) {
  .staff-onb-profile, .staff-onb-week { grid-template-columns: 1fr; }
  .staff-onb-photo { justify-items: start; }
}
/* Team → Login */
.staff-login { display: grid; gap: 12px; }
.staff-login-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 12px; background: var(--surface); }
.staff-login-card header { display: grid; gap: 4px; justify-items: start; }
.staff-login-card header h3 { margin: 4px 0 0; font-size: 17px; }
.staff-login-card header p { margin: 0; color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.staff-login-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.staff-login-form { display: grid; gap: 12px; max-width: 520px; }
@media (max-width: 767px) { .staff-login-controls { grid-template-columns: 1fr; } }

/* ============================================================================
   Website editor — full-screen surface.
   ========================================================================== */
body.editor-open { overflow: hidden; }
.workspace-editor { min-height: 100vh; }
.wed { --wed-bg: #0f1116; --wed-panel: #171a21; --wed-line: rgba(255,255,255,.08); --wed-ink: #eef0f4; --wed-muted: #9aa1ad; --wed-accent: var(--accent, #00805c);
  position: fixed; inset: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; grid-template-rows: 56px minmax(0, 1fr); grid-template-areas: "top top top" "left canvas right"; background: var(--wed-bg); color: var(--wed-ink); z-index: 40; font-size: 13.5px; }
.wed-loading, .wed-error { display: grid; place-items: center; }
.wed-top { grid-area: top; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; background: var(--wed-panel); border-bottom: 1px solid var(--wed-line); }
.wed-top-left, .wed-top-right { display: flex; align-items: center; gap: 10px; }
.wed-top-right { justify-content: flex-end; }
.wed-top-mid { display: flex; align-items: center; gap: 14px; }
.wed-title { display: grid; line-height: 1.1; }
.wed-title b { font-size: 14px; }
.wed-title small { color: var(--wed-muted); font-size: 11.5px; }
.wed-save { font-size: 12px; color: var(--wed-muted); padding-left: 8px; border-left: 1px solid var(--wed-line); min-width: 90px; }
.wed-save.s-error { color: #f0a084; }
.wed-iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--wed-ink); display: grid; place-items: center; cursor: pointer; }
.wed-iconbtn:hover { background: rgba(255,255,255,.06); }
.wed-iconbtn:disabled { opacity: .35; cursor: default; }
.wed-history { display: flex; gap: 2px; }
.wed-devices { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--wed-line); }
.wed-devices button { width: 36px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--wed-muted); display: grid; place-items: center; cursor: pointer; }
.wed-devices button[aria-pressed="true"] { background: rgba(255,255,255,.12); color: var(--wed-ink); }
.wed .button { font-size: 13px; min-height: 34px; }
.wed .button.ghost, .wed a.button.ghost { color: var(--wed-ink); }
.wed .button.ghost:hover, .wed a.button.ghost:hover { background: rgba(255,255,255,.06); }
.wed-toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 50; }
/* Left: sections / design / content */
.wed-left { grid-area: left; background: var(--wed-panel); border-right: 1px solid var(--wed-line); display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.wed-tabs { display: flex; padding: 8px 8px 0; gap: 2px; border-bottom: 1px solid var(--wed-line); }
.wed-tabs button { flex: 1; padding: 9px 6px; border: 0; background: transparent; color: var(--wed-muted); font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; border-bottom: 2px solid transparent; }
.wed-tabs button[aria-selected="true"] { color: var(--wed-ink); border-bottom-color: var(--wed-ink); }
.wed-panel { overflow-y: auto; padding: 14px 12px 24px; display: grid; gap: 10px; align-content: start; scrollbar-width: thin; }
.wed-label { margin: 8px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wed-muted); }
.wed-seclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wed-seclist li { display: grid; grid-template-columns: 1fr auto; align-items: center; border-radius: 9px; }
.wed-seclist li:hover, .wed-seclist li[data-active="true"] { background: rgba(255,255,255,.06); }
.wed-seclist li[data-active="true"] .wed-secbtn { color: #fff; }
.wed-secbtn { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; background: transparent; color: var(--wed-ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.wed-secbtn svg { color: var(--wed-muted); flex: 0 0 auto; }
.wed-secactions { display: none; gap: 1px; padding-right: 4px; }
.wed-seclist li:hover .wed-secactions, .wed-seclist li[data-active="true"] .wed-secactions { display: flex; }
.wed-mini { width: 26px; height: 26px; border-radius: 6px; border: 0; background: transparent; color: var(--wed-muted); display: grid; place-items: center; cursor: pointer; }
.wed-mini:hover { background: rgba(255,255,255,.1); color: var(--wed-ink); }
.wed-mini:disabled { opacity: .3; }
.wed-hidden { display: grid; gap: 2px; margin-top: 6px; }
.wed-addsec { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px dashed var(--wed-line); border-radius: 9px; background: transparent; color: var(--wed-muted); font: inherit; cursor: pointer; text-align: left; }
.wed-addsec:hover { color: var(--wed-ink); border-color: rgba(255,255,255,.25); }
.wed-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wed-swatches [role="radio"], .wed-custom span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; display: grid; place-items: center; color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.wed-swatches [role="radio"][aria-checked="true"] { box-shadow: 0 0 0 2px var(--wed-panel), 0 0 0 4px #fff; }
.wed-custom { position: relative; width: 30px; height: 30px; }
.wed-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wed-custom span { border: 1px dashed rgba(255,255,255,.35); color: var(--wed-muted); }
.wed-colour { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 0; }
.wed-colour-label { display: grid; font-weight: 600; }
.wed-colour-label small { color: var(--wed-muted); font-weight: 400; font-size: 11.5px; }
.wed-colour-ctl { display: flex; align-items: center; gap: 6px; }
.wed-colour-ctl input[type="color"] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--wed-line); border-radius: 8px; background: transparent; cursor: pointer; }
.wed-colour-ctl input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.wed-colour-ctl input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.wed-colour-ctl input[type="text"] { width: 86px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--wed-line); background: rgba(255,255,255,.04); color: var(--wed-ink); font: inherit; font-family: ui-monospace, monospace; font-size: 12.5px; }
.wed-fonts { display: grid; gap: 4px; }
.wed-font { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--wed-line); background: transparent; color: var(--wed-ink); font: inherit; text-align: left; cursor: pointer; }
.wed-font b { font-size: 20px; font-family: var(--sp-display, inherit); }
.wed-font.font-editorial b { font-family: "Fraunces", serif; } .wed-font.font-grotesk b { font-family: "Space Grotesk", sans-serif; } .wed-font.font-heritage b { font-family: "Playfair Display", serif; } .wed-font.font-condensed b { font-family: "Bebas Neue", sans-serif; letter-spacing: .04em; } .wed-font.font-soft b { font-family: "DM Sans", sans-serif; }
.wed-font span { display: grid; line-height: 1.15; }
.wed-font small { color: var(--wed-muted); font-size: 11.5px; }
.wed-font[aria-pressed="true"] { border-color: #fff; background: rgba(255,255,255,.06); }
.wed .segmented { background: rgba(255,255,255,.05); border-color: var(--wed-line); }
.wed .segmented button { color: var(--wed-muted); }
.wed .segmented button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: var(--wed-ink); }
.wed-field { display: grid; gap: 5px; }
.wed-field > span { font-weight: 600; font-size: 12.5px; display: flex; justify-content: space-between; }
.wed-field > span small { color: var(--wed-muted); font-weight: 400; }
.wed-field input, .wed-field textarea { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--wed-line); background: rgba(255,255,255,.04); color: var(--wed-ink); font: inherit; font-size: 13px; width: 100%; }
.wed-field textarea { resize: vertical; }
.wed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wed-image-box { position: relative; border-radius: 10px; border: 1px solid var(--wed-line); background: rgba(255,255,255,.04); overflow: hidden; display: grid; place-items: center; min-height: 96px; }
.wed-image-box.cover { aspect-ratio: 16 / 9; }
.wed-image-box.logo { aspect-ratio: 3 / 1; background: #fff; }
.wed-image-box img { width: 100%; height: 100%; object-fit: contain; }
.wed-image-box.cover img { object-fit: cover; }
.wed-image-empty { color: var(--wed-muted); }
.wed-image-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.wed-image-actions .button, .wed-image-actions .photo-upload { font-size: 12px; min-height: 28px; padding: 0 10px; }
.wed-image-actions .wed-mini { background: rgba(0,0,0,.55); color: #fff; }
.wed-stock { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.wed-stock button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: transparent; cursor: pointer; aspect-ratio: 4 / 3; }
.wed-stock button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wed-stock button[aria-pressed="true"] { border-color: #fff; }
.wed-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wed-gallery figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.wed-gallery figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wed-gallery figure button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wed-gallery .photo-upload, .wed-gallery .button { aspect-ratio: 1; display: grid; place-items: center; border: 1px dashed var(--wed-line); border-radius: 8px; background: transparent; color: var(--wed-muted); font-size: 12px; }
.wed-switch { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.wed-switch span { display: grid; }
.wed-switch small { color: var(--wed-muted); }
/* Canvas */
.wed-canvas { grid-area: canvas; overflow: auto; padding: 24px; display: grid; place-items: start center; background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.04), transparent 60%), var(--wed-bg); scrollbar-width: thin; }
.wed-frame { background: #fff; border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; width: 100%; transition: max-width .25s ease; position: relative; }
.wed-frame.desktop { max-width: 1280px; }
.wed-frame.tablet { max-width: 834px; border-radius: 22px; }
.wed-frame.phone { max-width: 400px; border-radius: 34px; }
.wed-page { min-height: 60vh; }
.wed-page .shop-page.sp-preview .sp-nav { position: sticky; top: 0; z-index: 2; }
/* Selection outlines on the real page */
.sp-editing [data-el] { cursor: pointer; outline: 1.5px dashed transparent; outline-offset: 3px; transition: outline-color .12s; }
.sp-editing [data-el]:hover { outline-color: rgba(58,117,99,.55); }
.sp-editing [data-el].is-selected, .sp-editing [data-el][data-el-selected="true"] { outline: 2px solid #00805c; outline-offset: 3px; }
/* Right: inspector */
.wed-right { grid-area: right; background: var(--wed-panel); border-left: 1px solid var(--wed-line); display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.wed-empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 40px 24px; color: var(--wed-muted); align-self: center; grid-row: 1 / -1; }
.wed-empty b { color: var(--wed-ink); }
.wed-insp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--wed-line); }
.wed-insp-head span { display: grid; line-height: 1.15; }
.wed-insp-head small { color: var(--wed-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.wed-insp-head b { font-size: 14px; }
.wed-insp-body { overflow-y: auto; padding: 8px 12px 24px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.wed-suggest { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--wed-line); background: rgba(255,255,255,.04); color: var(--wed-ink); font: inherit; font-size: 12.5px; cursor: pointer; width: fit-content; }
.wed-quickrow { display: flex; gap: 6px; flex-wrap: wrap; }
.wed-quickrow button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); cursor: pointer; }
.wed-layoutgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wed-layout { display: grid; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--wed-line); background: rgba(255,255,255,.03); color: var(--wed-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; }
.wed-layout[aria-pressed="true"] { border-color: #fff; color: var(--wed-ink); background: rgba(255,255,255,.08); }
.wed-thumb { width: 100%; height: auto; display: block; border-radius: 6px; background: #22262f; }
.wed-thumb .b { fill: rgba(255,255,255,.18); } .wed-thumb .b2 { fill: rgba(255,255,255,.08); } .wed-thumb .a { fill: var(--wed-accent); } .wed-thumb .s { fill: rgba(255,255,255,.35); } .wed-thumb .img { fill: rgba(255,255,255,.28); }
.wed-layout[aria-pressed="true"] .wed-thumb { background: #2b303a; }
.wed-insp-content { display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--wed-line); }
.wed .helper { color: var(--wed-muted); }
.wed .linklike { color: var(--wed-ink); }
/* Narrow screens: panels become drawers over the canvas */
@media (max-width: 1100px) {
  .wed { grid-template-columns: 240px minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .wed { grid-template-columns: 1fr; grid-template-rows: 56px minmax(0, 1fr) auto; grid-template-areas: "top" "canvas" "left"; }
  .wed-left { border-right: 0; border-top: 1px solid var(--wed-line); max-height: 42vh; }
  .wed-right { position: fixed; right: 0; top: 56px; bottom: 0; width: min(92vw, 340px); transform: translateX(100%); transition: transform .2s ease; z-index: 3; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
  .wed-right.open { transform: none; }
  .wed-canvas { padding: 12px; }
  .wed-top { grid-template-columns: 1fr auto; }
  .wed-top-mid { display: none; }
  .wed-save { display: none; }
}
/* Settings launcher */
.web-launch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: center; }
.web-launch-shot { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); padding: 0; cursor: pointer; }
.web-launch-shot iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; }
.web-launch-hover { position: absolute; inset: 0; display: grid; place-items: center; gap: 6px; background: rgba(20,21,26,.45); color: #fff; font-weight: 700; opacity: 0; transition: opacity .15s; }
.web-launch-shot:hover .web-launch-hover, .web-launch-shot:focus-visible .web-launch-hover { opacity: 1; }
@media (max-width: 1023px) { .web-launch-grid { grid-template-columns: 1fr; } }

/* ---------- Fixed 24h board (00:00 → 00:00) ----------
   The timetable always spans the whole day and scrolls *inside* the calendar card, never the page.
   Staff header stays pinned to the top, the time rail to the left. Hours the shop is shut are
   greyed flat (not hatched) and remain clickable for the team; customers never see them. */
.workspace .connected-calendar > .connected-scroll { position: relative; overflow: auto; overscroll-behavior: contain; scroll-padding-top: var(--header-h, 48px); }
.workspace .connected-calendar .calendar-staff-header { position: sticky; top: 0; z-index: 6; background: var(--surface, #fff); box-shadow: 0 1px 0 var(--line); }
.workspace .connected-calendar .calendar-staff-header .timezone-label { position: sticky; left: 0; z-index: 7; background: var(--surface, #fff); }
.workspace .connected-calendar .time-gutter { position: sticky; left: 0; z-index: 4; background: var(--surface, #fff); box-shadow: 1px 0 0 var(--line); }
.workspace .connected-calendar .time-gutter > span { background: var(--surface, #fff); }
.workspace .timetable-slot.blocked.outside { background: var(--canvas, #f5f6f8); color: var(--muted); }
.workspace .timetable-slot.blocked.outside span { opacity: 0; }
.workspace .timetable-slot.blocked.outside:hover { background: var(--line-2, #eceee8); }
.workspace .timetable-slot.blocked.outside:hover span { opacity: 1; }
.workspace .timetable-slot.after-hours { background: var(--canvas, #f5f6f8); }
.workspace .slot-grid-after { margin-top: 10px; }
.workspace .slot-grid-after > summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.workspace .legend-outside { background: var(--canvas, #f5f6f8); border: 1px solid var(--line); }

/* ---------- SMS sender name (alpha tag) field with live phone preview ---------- */
.sender-field { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 8px 0 16px; }
.sender-form { display: grid; gap: 8px; min-width: 0; }
.sender-label { font-size: var(--fs-13); font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; }
.sender-label small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.sender-form input { height: var(--ctl-h, 40px); border-radius: var(--ctl-r, 10px); border: 1px solid var(--line); padding: 0 12px; font: inherit; font-size: var(--fs-15); font-weight: 600; letter-spacing: .01em; }
.sender-form input[aria-invalid="true"] { border-color: #c0392b; }
.sender-note { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-12); color: var(--muted); }
.sender-note svg { flex: 0 0 auto; margin-top: 1px; }
.sender-note.good { color: #006b4d; }
.sender-note.warn { color: #8a6d1f; }
.sender-note.bad { color: #a33; }
.sender-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.sender-chip { border: 1px solid var(--line); background: var(--canvas); color: var(--ink); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: var(--fs-12); font-weight: 600; cursor: pointer; }
.sender-chip:hover { border-color: var(--ink); }
.sender-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sender-rules { margin: 4px 0 0; padding-left: 16px; color: var(--muted); font-size: var(--fs-12); display: grid; gap: 3px; }
.sender-phone { background: #111318; border-radius: 22px; padding: 14px 12px 18px; color: #f2f3f5; box-shadow: inset 0 0 0 4px #2a2d34; font-size: 13px; }
.sender-phone-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 10px; }
.sender-phone-avatar { width: 26px; height: 26px; border-radius: 50%; background: #3a3f4a; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.sender-phone-bar b { font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender-phone-time { text-align: center; color: #8b919c; font-size: 11px; margin-bottom: 8px; }
.sender-phone-bubble { background: #2a2d34; border-radius: 14px 14px 14px 4px; padding: 9px 11px; line-height: 1.35; word-break: break-word; }
@media (max-width: 767px) { .sender-field { grid-template-columns: 1fr; } .sender-phone { max-width: 300px; } }

/* Texts-are-billed acknowledgement */
.sms-bill-ack { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--canvas); cursor: pointer; }
.sms-bill-ack.on { border-style: solid; border-color: #006b4d; background: #eef5f1; }
.sms-bill-ack input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: #006b4d; }
.sms-bill-ack span { display: grid; gap: 3px; }
.sms-bill-ack strong { font-size: var(--fs-14); }
.sms-bill-ack small { color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.sms-bill-note { display: block; margin: 0; line-height: 1.45; font-size: var(--fs-12); color: #006b4d; }
.workspace-form-wide { grid-column: 1 / -1; }

/* Onboarding channel cards */
.setup-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 12px; }
.setup-channel { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 10px; }
.setup-channel.on { border-color: #006b4d; box-shadow: 0 0 0 3px rgba(47, 97, 82, .08); }
.setup-channel .setup-check span { display: grid; gap: 2px; }
.setup-channel .setup-check small { color: var(--muted); font-size: var(--fs-12); }
.setup-msg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 767px) { .setup-channels, .setup-msg-grid { grid-template-columns: 1fr; } }

/* ---------- Running bill (Settings → Billing) ---------- */
.rbill { display: grid; gap: 16px; }
.rbill-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 24px; border-radius: 18px; background: var(--rail, #0b0b0c); color: #fff; }
.rbill-kicker { display: flex; align-items: center; gap: 10px; font-size: var(--fs-13); color: #b8c4be; }
.rbill-total { margin: 10px 0 4px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -1.5px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rbill-sub { margin: 0 0 16px; color: #b8c4be; font-size: var(--fs-13); }
.rbill-sub strong { color: #fff; font-weight: 600; }
.rbill-split { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 420px; }
.rbill-split li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: var(--fs-14); }
.rbill-split li small { color: #8fa39a; margin-left: 4px; }
.rbill-split li strong { font-variant-numeric: tabular-nums; }
.rbill-split .rbill-discount strong { color: #00e8b0; }
.rbill-split .rbill-novat { justify-content: flex-end; color: #8fa39a; padding: 2px 0 0; border: 0; }
.rbill-hero-side { display: grid; align-content: end; gap: 6px; min-width: 0; }
.rbill-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 0 2px; }
.rbill-bar { flex: 1 1 0; min-width: 3px; border-radius: 3px 3px 0 0; background: #00e8b0; }
.rbill-bar.empty { background: rgba(255,255,255,.12); }
.rbill-chart-cap { margin: 0; color: #8fa39a; font-size: var(--fs-11); text-align: right; }
.rbill-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rbill-tools { display: flex; gap: 8px; align-items: center; }
.rbill-tools select { height: 34px; border-radius: 9px; border: 1px solid var(--line); font: inherit; font-size: var(--fs-13); padding: 0 8px; }
.rbill-tools .button.ghost { height: 34px; border: 1px solid var(--line); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 9px; font-size: var(--fs-13); color: var(--ink); }
.rbill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rbill-day-head { display: flex; justify-content: space-between; font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rbill-day-head strong { color: var(--ink); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.rbill-day ul { list-style: none; margin: 0; padding: 0; }
.rbill-day ul li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line-2, #eceee8); }
.rbill-day ul li:last-child { border-bottom: 0; }
.rbill-day time { color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.rbill-item-text { display: grid; min-width: 0; }
.rbill-item-text b { font-weight: 600; font-size: var(--fs-14); }
.rbill-item-text small { color: var(--muted); font-size: var(--fs-12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbill-day ul li > strong { font-variant-numeric: tabular-nums; font-size: var(--fs-14); }
.rbill-free { color: var(--muted); font-weight: 500; font-size: var(--fs-12) !important; }
.rbill-forecast .billing-lines li { font-size: var(--fs-14); }
@media (max-width: 900px) { .rbill-hero, .rbill-grid { grid-template-columns: 1fr; } .rbill-chart { height: 70px; } }

.billing-card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.billing-card-row > span { display: grid; gap: 2px; min-width: 0; }
.billing-card-row small { color: var(--muted); font-size: var(--fs-12); }
/* ---------- Shell: admin sidebar (slides wide <-> narrow on desktop, drawer on phone) ---------- */
:root { --sidebar-w: 236px; --sidebar-w-min: 68px; }
.sidebar.rail {
  width: var(--sidebar-w);
  align-items: stretch;
  padding: 10px 10px 12px;
  gap: 2px;
  transition: width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: visible;
  will-change: width;
}
.sidebar.rail.collapsed { width: var(--sidebar-w-min); padding-left: 10px; padding-right: 10px; }
.sidebar-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; }
.sidebar-shop { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sidebar-logo {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; object-fit: contain;
  background: rgba(255, 255, 255, 0.08); display: grid; place-items: center;
}
.sidebar-logo.tone-light { background: #14151a; padding: 3px; }
.sidebar-logo.tone-dark, .sidebar-logo.tone-colour { background: #fff; padding: 3px; }
.sidebar-logo-text { color: var(--rail-fg-on); font-weight: 800; font-size: 15px; letter-spacing: -0.3px; }
.sidebar-shop-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sidebar-shop-text b { color: var(--rail-fg-on); font-size: var(--fs-14); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-shop-text small { color: var(--rail-fg); font-size: var(--fs-11); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace .sidebar.rail .sidebar-toggle, .workspace .sidebar.rail .sidebar-close {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--rail-fg); background: transparent;
}
.workspace .sidebar.rail .sidebar-toggle:hover, .workspace .sidebar.rail .sidebar-close:hover { background: rgba(255, 255, 255, 0.09); color: var(--rail-fg-on); }
.workspace .sidebar.rail .sidebar-close { display: none; }
.sidebar-items { display: flex; flex-direction: column; gap: 2px; }
.sidebar-bottom { padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.workspace .sidebar.rail .sidebar-item {
  width: 100%; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 0 12px; font: inherit; font-size: var(--fs-14); font-weight: 600; letter-spacing: -0.1px;
  color: var(--rail-fg); white-space: nowrap; text-align: left;
}
.sidebar.rail .sidebar-item svg { flex: 0 0 auto; }
.sidebar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: 1; transition: opacity 0.16s; }
.sidebar-head, .sidebar-shop { overflow: hidden; }
.sidebar.rail .sidebar-item .rail-tip { display: none; left: 58px; }
.sidebar.rail.collapsed .sidebar-item { padding: 0 0; justify-content: center; gap: 0; }
.sidebar.rail.collapsed .sidebar-label { width: 0; opacity: 0; }
.sidebar.rail.collapsed .sidebar-item .rail-tip { display: block; }
.sidebar.rail.collapsed .sidebar-shop { display: none; }
.sidebar.rail.collapsed .sidebar-head { justify-content: center; }
.sidebar-backdrop { display: none; }

/* Phone: the sidebar becomes a drawer that slides in from the left over the content. */
@media (max-width: 767px) {
  .sidebar.rail {
    display: flex; position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh; z-index: 60;
    width: min(84vw, 320px); padding-top: 14px;
    transform: translateX(-104%);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 12px 0 40px rgba(0, 0, 0, 0.25);
  }
  .sidebar.rail.collapsed { width: min(84vw, 320px); }
  .sidebar.rail.collapsed .sidebar-label { width: auto; opacity: 1; }
  .sidebar.rail.collapsed .sidebar-item { padding: 0 12px; justify-content: flex-start; gap: 12px; }
  .sidebar.rail.collapsed .sidebar-shop { display: flex; }
  .sidebar.rail.collapsed .sidebar-head { justify-content: flex-start; }
  .sidebar.rail .sidebar-item .rail-tip { display: none !important; }
  .sidebar.rail.open { transform: translateX(0); }
  .workspace .sidebar.rail .sidebar-toggle { display: none; }
  .workspace .sidebar.rail .sidebar-close { display: grid; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(11, 26, 23, 0.45); z-index: 59; backdrop-filter: blur(2px); }
  .workspace-layout.onboarding > .sidebar-backdrop { display: none; }
}
@media (min-width: 768px) {
  .workspace .topbar-menu, .topbar .topbar-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar.rail, .sidebar-label { transition: none; }
}

/* ---------- Text-kinds picker (Settings → Messages, onboarding) ---------- */
.sms-kinds { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.sms-kinds legend { padding: 0; margin-bottom: 2px; font-size: var(--fs-12); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.sms-kinds .setup-check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: var(--fs-14); line-height: 1.35; cursor: pointer; }
.sms-kinds .setup-check input { flex: none; width: 18px; height: 18px; min-height: 18px; margin: 2px 0 0; padding: 0; accent-color: #006b4d; }
.sms-kinds .setup-check span { display: grid; gap: 2px; min-width: 0; }
.sms-kinds .setup-check small { color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.sms-kinds > .helper { color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }

/* ---------- Settings → Messages: channel cards (symmetric) ---------- */
.chan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.chan-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); display: grid; align-content: start; gap: 10px; min-height: 100%; }
.chan-card.on { border-color: #006b4d; box-shadow: 0 0 0 3px rgba(47, 97, 82, .08); }
.chan-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.chan-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--canvas); display: grid; place-items: center; color: var(--ink); }
.chan-card.on .chan-ic { background: #eef5f1; color: #006b4d; }
.chan-text { display: grid; gap: 2px; min-width: 0; }
.chan-text strong { font-size: var(--fs-14); }
.chan-text small { color: var(--muted); font-size: var(--fs-12); }
.chan-text small b { color: var(--ink); font-weight: 600; }
.chan-body { margin: 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.45; }
.chan-card .field, .chan-card .workspace-field { margin: 0; }
@media (max-width: 1100px) { .chan-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) { .chan-grid { grid-template-columns: 1fr; } }

/* ---------- Template editor with live phone preview ---------- */
.tpl-set { display: grid; gap: 14px; }
.tpl { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tpl-form { display: grid; gap: 8px; min-width: 0; }
.tpl-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--fs-13); font-weight: 600; }
.tpl-label small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tpl-form textarea { border: 1px solid var(--line); border-radius: var(--ctl-r, 10px); padding: 10px 12px; font: inherit; font-size: var(--fs-14); line-height: 1.45; resize: vertical; min-height: 78px; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tpl-chips .sender-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 600; }
.tpl-reset { margin-left: auto; font-size: var(--fs-12); }
.tpl-phone { font-size: 12.5px; }
@media (max-width: 767px) { .tpl { grid-template-columns: 1fr; } .tpl-phone { max-width: 300px; } }

/* ---------- Welcome window: shop setup as its own screen ---------- */
.welcome-window { min-height: 100dvh; background: var(--canvas); display: flex; flex-direction: column; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 3vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line); }
.welcome-shop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.welcome-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--canvas); display: grid; place-items: center; flex: 0 0 auto; }
.welcome-logo.tone-light { background: #14151a; padding: 4px; }
.welcome-logo.tone-dark, .welcome-logo.tone-colour { background: #fff; padding: 4px; border: 1px solid var(--line); }
.welcome-logo-text { font-weight: 800; font-size: 18px; color: var(--ink); }
.welcome-shop-text { display: grid; line-height: 1.2; min-width: 0; }
.welcome-shop-text b { font-size: var(--fs-16); letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome-shop-text small { color: var(--muted); font-size: var(--fs-12); }
.welcome-powered { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-12); white-space: nowrap; }
.welcome-powered .brand { transform: scale(.85); transform-origin: left center; }
.welcome-window .workspace-main { padding: 0; max-width: none; flex: 1; }
.welcome-window .setup-flow { min-height: 0; }
.welcome-window .setup-flow-top { top: 0; }
.welcome-window .setup-flow-top .setup-flow-brand { display: none; }
.welcome-window .setup-flow-rail { top: 55px; max-height: calc(100vh - 55px); }
@media (max-width: 767px) { .welcome-powered { display: none; } }

/* Sidebar head: the top bar already shows the shop logo; the sidebar keeps only the collapse toggle. */
.sidebar-head-spacer { flex: 1; }
.sidebar-head { min-height: 36px; margin-bottom: 6px; }
.sidebar.rail.collapsed .sidebar-head { justify-content: center; }

/* ---------- Calendar audit: nothing hides ----------
   The day summary (£ booked · completed · online · chair time) used to sit inside the toolbar's
   spare space and was clipped at every width. It is now its own row under the toolbar. */
.workspace .connected-calendar .calendar-summary { width: 100%; border-bottom: 1px solid var(--line-2); padding: 6px var(--s-4); flex-wrap: wrap; }
.workspace .connected-calendar .calendar-summary-stats { overflow: visible; }
/* Barber column headings: let the hours chip drop under the name instead of squeezing the name to "Da…". */
.workspace .connected-calendar .staff-column-heading { flex-wrap: wrap; row-gap: 4px; }
.workspace .connected-calendar .staff-column-heading > div { flex: 1 1 90px; }
.workspace .connected-calendar .staff-column-heading .staff-hours-chip { flex: 0 0 auto; }
/* Laptop widths: the header box is a fixed height (--header-h), so it must never need a third line.
   Layout becomes   [avatar] name        [⋯]
                             hours chip
   with the takings line dropped (it stays in the summary bar and the name's tooltip). */
@media (max-width: 1440px) and (min-width: 768px) {
  .workspace .connected-calendar .staff-column-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "avatar name menu" "avatar chip menu"; align-content: center; align-items: center; column-gap: 8px; row-gap: 2px; padding: 0 8px 0 10px; flex-wrap: nowrap; }
  .workspace .connected-calendar .staff-column-heading > .avatar { grid-area: avatar; }
  .workspace .connected-calendar .staff-column-heading > div:not(.staff-menu) { display: contents; }
  .workspace .connected-calendar .staff-column-heading > div:not(.staff-menu) > strong { grid-area: name; min-width: 0; line-height: 1.2; }
  .workspace .connected-calendar .staff-column-heading > div:not(.staff-menu) > span { display: none; }
  .workspace .connected-calendar .staff-column-heading .staff-hours-chip { grid-area: chip; justify-self: start; margin: 0; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; height: 20px; padding: 0 8px; line-height: 18px; }
  .workspace .connected-calendar .staff-column-heading .staff-menu { grid-area: menu; margin: 0; align-self: center; }
  .workspace .connected-calendar .density-compact .staff-column-heading { row-gap: 0; }
  .workspace .connected-calendar .density-compact .staff-hours-chip { height: 18px; line-height: 16px; font-size: 10px; }
}
/* Barber phone app: the week board is fixed to the screen and scrolls inside itself. */
@media (max-width: 767px) {
  .workspace .barber-week-shell .connected-calendar { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - var(--tabbar-h) - 20px); overflow: hidden; }
  .workspace .barber-week-shell .connected-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; }
  .workspace .topbar .wallet-chip, .workspace .topbar .topbar-queue { min-width: 0; }
  .workspace .topbar .topbar-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* ---------- Search fields: one box, not two ----------
   .customers-search draws the border itself; the global input rule above was drawing a second one
   inside it (Customers page, New booking › find customer, Team/Services lists, Admin). */
.workspace .customers-search { min-height: var(--ctl-h); border-radius: var(--ctl-r); background: var(--surface); padding: 0 12px; }
.workspace .customers-search input:not([type="checkbox"]) { min-height: 0; height: auto; border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; font-size: var(--fs-14); }
.workspace .customers-search input:focus-visible { border: 0; box-shadow: none; }
.workspace .customers-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }

/* ---------- New booking › customer: one flow (find → picked card / new-customer form) ---------- */
.workspace .customer-picker-new button { border-top: 1px dashed var(--line); border-radius: 0 0 10px 10px; margin-top: 2px; padding-top: 10px; }
.workspace .customer-picker-plus { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ollo-soft); color: var(--accent-dark); }
.workspace .customer-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; background: var(--surface);
  border-left: 3px solid var(--accent);
}
.workspace .customer-card .panel-inline { font-size: var(--fs-13); }
.workspace .customer-new { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; background: var(--canvas); display: grid; gap: 10px; }
.workspace .customer-new-title { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .04em; }
.workspace .customer-new .workspace-form-grid { margin: 0; }
.workspace .customer-new .workspace-footnote { margin: 0; }

/* Tablet (768–980): an old `.sidebar` drawer rule in style.css hid the new admin sidebar. On tablet
   it stays put as the narrow rail; the drawer behaviour only applies below 768px. */
@media (min-width: 768px) and (max-width: 980px) {
  .workspace .sidebar.rail { transform: none; visibility: visible; top: auto; width: var(--sidebar-w-min); box-shadow: none; }
  .workspace .sidebar.rail .sidebar-label { width: 0; opacity: 0; }
  .workspace .sidebar.rail .sidebar-item { padding: 0; justify-content: center; gap: 0; }
  .workspace .sidebar.rail .sidebar-item .rail-tip { display: block; }
  .workspace .sidebar.rail .sidebar-toggle { display: none; }
}

/* ---------- Website editor: wording ---------- */
.wed-copy { display: grid; gap: 10px; padding-top: 4px; }
.wed-copy .wed-field textarea, .wed-copy .wed-field input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; border: 1px solid var(--wed-line, #2a2d36); border-radius: 8px; padding: 8px 10px; background: var(--wed-input, #14161c); color: inherit; resize: vertical; }
.wed-copy .wed-field.wed-focus > span { color: #7fc9ad; }
.wed-copy-reset { background: none; border: 0; color: var(--wed-muted); font: inherit; font-size: 11.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.wed-copy-reset:hover { color: inherit; }
/* Headings / sub-lines are selectable elements too: give them a comfortable hit area. */
.sp-editing h2[data-el], .sp-editing p[data-el] { outline-offset: 4px; border-radius: 4px; }

/* ---------- Website editor: palette-first design panel ---------- */
.wed-intro { margin: 0 0 4px; font-size: 12.5px; color: var(--wed-muted); line-height: 1.45; }
.wed-hint { margin: 2px 0 0; font-size: 11.5px; color: var(--wed-muted); line-height: 1.4; }
.wed-insp-hint { margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--wed-line); }
.wed-palette { display: grid; gap: 2px; border: 1px solid var(--wed-line); border-radius: 10px; padding: 4px 10px; background: rgba(255,255,255,.02); }
.wed-palette .wed-colour + .wed-colour { border-top: 1px solid var(--wed-line); }
.wed-presets { display: grid; gap: 6px; margin-top: 4px; }
.wed-presets-label { font-size: 11.5px; color: var(--wed-muted); }
.wed-overrides ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wed-overrides li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 4px 0; }
.wed-ovr-name { background: none; border: 0; color: var(--wed-ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; padding: 4px 0; }
.wed-ovr-name:hover { text-decoration: underline; }
.wed-ovr-chips { display: inline-flex; gap: 4px; }
.wed-ovr-chips i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); display: inline-block; }
.wed-insp-up { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--wed-line); background: transparent; color: var(--wed-muted); font: inherit; font-size: 11px; cursor: pointer; width: max-content; }
.wed-insp-up:hover { color: var(--wed-ink); border-color: rgba(255,255,255,.25); }
.wed-colour.is-inherited input[type="color"] { opacity: .85; }
.wed-colour.is-inherited input[type="color"]::-webkit-color-swatch { border: 1px dashed rgba(255,255,255,.45); }
.wed-copy .wed-field > span { color: var(--wed-ink); }
.wed-copy .wed-field.wed-focus > span { color: #7fc9ad; }

/* ---------- Week view: fits the card at every desktop width ----------
   The board had a fixed 150px label + 7 × 112px minimum (934px); inside a ~735px card at 1024px
   Saturday and Sunday scrolled off the right with no cue. Columns now shrink to fit; the label column
   narrows first; below ~900px the board scrolls with a visible edge shadow. */
.workspace .week-view { --week-label: clamp(96px, 12vw, 150px); }
.workspace .week-view-head, .workspace .week-row { grid-template-columns: var(--week-label) repeat(7, minmax(0, 1fr)); }
.workspace .week-cell { min-width: 0; padding: 8px 5px; }
.workspace .week-card { min-width: 0; }
.workspace .week-card > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace .week-row-label { padding: 10px 8px; min-width: 0; }
.workspace .week-row-label > div { min-width: 0; }
.workspace .week-row-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .workspace .week-row-label .avatar { display: none; }
  .workspace .week-day-head { padding: 8px 4px 10px; }
  .workspace .week-day-head strong { font-size: 18px; }
}
/* If the board still has to scroll (very narrow), show that it does. */
.workspace .week-view { scrollbar-width: thin; }
.workspace .week-view::-webkit-scrollbar { height: 8px; }
/* Summary strip: a real row (was 17px tall and overlapping the week dates). */
.workspace .connected-calendar .calendar-summary { min-height: 30px; padding: 6px var(--s-4); font-size: var(--fs-12); line-height: 1.3; align-items: center; }
.workspace .connected-calendar .calendar-summary > span:first-child { color: var(--ink-2); }
/* Week cards: the name is what matters — let it wrap to two lines; the service stays one line. */
.workspace .week-card > .week-card-name { white-space: normal; overflow: visible; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; word-break: break-word; }
.workspace .week-card > strong { display: flex; align-items: center; gap: 5px; }
.workspace .week-card-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex: 0 0 auto; }

/* ---------- Tablet / small-desktop sweep fixes (automated overflow detector, 768–1100px) ---------- */
/* Topbar search: one line, never wraps; shorter label under 1100px. */
.topbar-search { overflow: hidden; white-space: nowrap; }
.topbar-search-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 1100px) { .topbar-search { flex: 0 1 220px; } }

/* Settings nav between phone and desktop (721–980px): the grouped layout, in two columns, instead of
   the old single horizontal flex rail which stacked group labels on top of each other. */
@media (min-width: 721px) and (max-width: 980px) {
  .settings-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; gap: 8px 14px; padding: 12px; overflow: visible; }
  .settings-nav-group { display: grid; gap: 2px; align-content: start; min-width: 0; }
  .settings-nav .settings-nav-label { padding: 4px 8px 2px; white-space: nowrap; }
  .settings-nav button { grid-template-columns: 20px 1fr; min-height: 40px; padding: 0 8px; white-space: normal; }
  .settings-nav button small { display: none; }
  .settings-nav button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
}

/* Shifts rows: five fixed minimums (180+90+160+180+auto) exceeded the card at 1024. Two-row layout
   from 1100px down: who / state / hours on top, load + actions below. */
@media (max-width: 1100px) {
  .shifts-row { grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); row-gap: 10px; }
  .shifts-row > :nth-child(4) { grid-column: 1 / 3; }
  .shifts-actions { grid-column: 3; justify-content: flex-end; flex-wrap: nowrap; align-self: center; }
  .shifts-actions .button { padding: 0 10px; }
  .shifts-summary { white-space: normal; }
}
@media (max-width: 900px) { .shifts-row { grid-template-columns: 1fr 1fr; } .shifts-row > :nth-child(4) { grid-column: auto; } .shifts-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; } }

/* Pay runs table: scrolls inside its own card rather than pushing the page wider; first column and
   the action column stay put. */
.pay-runs-page { min-width: 0; }
.pay-runs-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); scrollbar-width: thin; }
.pay-runs-table-wrap .pay-runs-table { border: 0; border-radius: 0; min-width: 720px; }
@media (max-width: 1100px) {
  .pay-runs-table th, .pay-runs-table td { padding: 8px; }
  .pay-runs-table td small { display: none; }
}

/* Settings inputs whose intrinsic size pushed past the column at 1024. */
.workspace .workspace-form-grid input, .workspace .workspace-form-grid select { min-width: 0; width: 100%; }

.settings-nav-tabs { display: contents; }
@media (min-width: 721px) and (max-width: 980px) { .settings-nav-tabs { display: grid; gap: 2px; } }

/* Pay runs on a phone: each barber is a card, not a 720px table. */
@media (max-width: 640px) {
  .pay-runs-table-wrap { overflow: visible; border: 0; }
  .pay-runs-table-wrap .pay-runs-table { min-width: 0; border: 0; background: transparent; display: block; }
  .pay-runs-table thead { display: none; }
  .pay-runs-table tbody, .pay-runs-table tfoot { display: grid; gap: 8px; }
  .pay-runs-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .pay-runs-table tbody td { display: block; padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .pay-runs-table tbody td:nth-child(1) { grid-column: 1 / -1; font-size: var(--fs-15); }
  .pay-runs-table tbody td:nth-child(2) { grid-column: 1 / -1; margin-top: -2px; color: var(--muted); }
  .pay-runs-table tbody td:nth-child(2) small { display: inline; }
  .pay-runs-table tbody td.num::before { display: block; font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .pay-runs-table tbody td:nth-child(3)::before { content: "Sales"; }
  .pay-runs-table tbody td:nth-child(4)::before { content: "Deductions"; }
  .pay-runs-table tbody td:nth-child(5)::before { content: "Owed to barber"; }
  .pay-runs-table tbody td:nth-child(6)::before { content: "Owed to business"; }
  .pay-runs-table tbody td:nth-child(7) { align-self: center; }
  .pay-runs-table tbody td:nth-child(8) { justify-self: end; }
  .pay-runs-table tbody td:nth-child(8) .button { min-height: 36px; }
  .pay-runs-table tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
  .pay-runs-table tfoot td { padding: 0; border: 0; }
  .pay-runs-table tfoot td:empty { display: none; }
  .pay-runs-table tfoot td.num::before { color: var(--muted); font-size: var(--fs-11); margin-right: 4px; }
  .pay-runs-table tfoot td:nth-child(3)::before { content: "sales"; }
  .pay-runs-table tfoot td:nth-child(5)::before { content: "barbers"; }
  .pay-runs-table tfoot td:nth-child(6)::before { content: "business"; }
  .pay-period-bar { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .pay-period-bar .segmented { flex: 1 1 100%; }
  .pay-period-bar .pay-period-label { flex: 1; text-align: center; }
  .pay-period-bar .toolbar-grow { display: none; }
  .pay-runs-table tbody td:nth-child(7) { grid-column: 1; }
  .pay-runs-table tbody td:nth-child(8) { grid-column: 2; }
}

/* Wallets overview (owner/manager) under Pay runs: where each barber's money is. */
.wallets { display: grid; gap: var(--s-3); margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); min-width: 0; }
.wallets-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.wallets-head h3 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--fs-15); }
.wallets-head .workspace-footnote { margin: 4px 0 0; max-width: 62ch; }
.wallets-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.wallets-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wallets-kpis .kpi b { font-variant-numeric: tabular-nums; }
.wallets-kpis .kpi-delta.muted { color: var(--muted); display: block; }
.wallets-table-wrap .pay-runs-table { min-width: 860px; }
.wallets-table td small { white-space: nowrap; }
.wallets-live { color: var(--good); font-weight: 600; }
.wallets-shop-row td { background: var(--canvas); border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .wallets-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wallets-kpis { grid-template-columns: 1fr 1fr; }
  .wallets-table-wrap.pay-runs-table-wrap .pay-runs-table { min-width: 0; }
  .wallets-table tbody td::before { display: block; font-size: var(--fs-11); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .wallets-table tbody td:nth-child(1)::before, .wallets-table tbody td:nth-child(2)::before, .wallets-table tbody td:nth-child(9)::before { content: none; }
  .wallets-table tbody td:nth-child(3)::before { content: "Earned"; }
  .wallets-table tbody td:nth-child(4)::before { content: "Moved to wallet"; }
  .wallets-table tbody td:nth-child(5)::before { content: "In wallet"; }
  .wallets-table tbody td:nth-child(6)::before { content: "In transit"; }
  .wallets-table tbody td:nth-child(7)::before { content: "Reached bank"; }
  .wallets-table tbody td:nth-child(8)::before { content: "Last payout"; }
  .wallets-table tbody td:nth-child(2) { grid-column: 1 / -1; margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .wallets-table tbody td:nth-child(2) br { display: none; }
  .wallets-table tbody td:nth-child(8) { grid-column: 1 / -1; justify-self: stretch; text-align: left !important; }
  .wallets-table tbody td:nth-child(9) { grid-column: 1 / -1; justify-self: end; }
  .wallets-table tbody td:nth-child(9):empty { display: none; }
  .wallets-table tbody td small { white-space: normal; display: inline; }
  .wallets-table tbody tr.wallets-shop-row { background: var(--canvas); }
  .wallets-table tbody tr.wallets-shop-row td { background: transparent; border-top: 0; }
  .wallets-table tfoot td:nth-child(3)::before { content: "earned"; }
  .wallets-table tfoot td:nth-child(4)::before { content: "moved"; }
  .wallets-table tfoot td:nth-child(5)::before { content: "in wallets"; }
  .wallets-table tfoot td:nth-child(6)::before { content: "in transit"; }
  .wallets-table tfoot td:nth-child(7)::before { content: "reached bank"; }
}

/* ---------- Full-screen calendar (toggle in the timetable toolbar; Esc exits) ---------- */
html.cal-full .workspace .topbar,
html.cal-full .workspace .rail,
html.cal-full .workspace .tabbar,
html.cal-full .workspace .skip-link { display: none; }
html.cal-full .workspace .workspace-layout { min-height: 100dvh; }
html.cal-full .workspace .workspace-main:has(> .connected-calendar) { height: 100dvh; padding: 0; }
html.cal-full .workspace .connected-calendar { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }

/* =====================================================================================
   foliyo 2026 refresh — admin workspace.
   Ink rail, crisp white panels on a cool canvas, mint as the one bright brand colour and a
   vivid set for people, services and charts. Appended last so it wins without !important.
   ===================================================================================== */
.workspace { background: var(--canvas); color: var(--ink); }

/* Top bar */
.workspace .topbar { background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); box-shadow: none; }
.workspace .topbar-search { background: var(--soft); border: 1px solid transparent; color: var(--muted); transition: border-color .15s, background .15s, box-shadow .15s; }
.workspace .topbar-search:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow-1); }
.workspace .topbar-search kbd { background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 0 var(--line); }
.workspace .wallet-chip, .workspace .account-pill { border-color: var(--line); background: #fff; }
.workspace .wallet-chip:hover, .workspace .account-pill:hover { box-shadow: var(--shadow-1); }

/* Rail */
.workspace .rail { background: var(--rail); border-right: 1px solid rgba(255, 255, 255, 0.04); }
.workspace .rail button { color: var(--rail-fg); font-weight: 500; letter-spacing: -0.005em; }
.workspace .rail button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.workspace .rail button[aria-current] { background: linear-gradient(90deg, rgba(0, 232, 176, 0.16), rgba(0, 232, 176, 0.04)); color: #fff; box-shadow: inset 2px 0 0 var(--mint); }
.workspace .rail button[aria-current] svg { color: var(--mint); }

/* Page headings */
.workspace .workspace-heading h1, .workspace .workspace-heading h2:first-child { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.workspace .workspace-heading { border-bottom-color: var(--line); }

/* Panels and cards */
.workspace .workspace-panel, .workspace .workspace-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-1); }
.workspace .workspace-panel h2, .workspace .workspace-card h2 { font-weight: 650; letter-spacing: -0.015em; }

/* Buttons: mint fill with ink text for the main action; other accents follow the user's theme */
.workspace .button.primary { background: var(--accent-fill); color: var(--accent-fill-ink); border: 1px solid transparent; box-shadow: 0 1px 2px rgba(14, 15, 18, .08), inset 0 1px 0 rgba(255, 255, 255, .35); }
.workspace .button.primary:hover { background: var(--accent-fill-hover); }
.workspace .button.primary:focus-visible { outline: 0; box-shadow: var(--ring); }
.workspace .button.secondary { border-color: var(--line); box-shadow: 0 1px 1px rgba(14, 15, 18, .04); }
.workspace .button.secondary:hover { border-color: #cdd1d8; background: #fff; }
.workspace .button.ghost { color: var(--ink-2); }
.workspace .button.danger { background: var(--warn-bg); color: var(--warn); }
.workspace .icon-button, .workspace .today-button { border-color: var(--line); }
.workspace .today-button { background: var(--mint-soft); border-color: transparent; color: var(--accent-dark); }
.workspace .segmented { background: var(--soft-2); }
.workspace .segmented button[aria-pressed="true"], .workspace .segmented button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(14, 15, 18, .1), 0 0 0 1px rgba(14, 15, 18, .04); }

/* Inputs and switches */
.workspace input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
.workspace select, .workspace .workspace-form textarea { border-color: var(--line); }
.workspace input:not([type="checkbox"]):not([type="radio"]):hover, .workspace select:hover, .workspace textarea:hover { border-color: #cdd1d8; }
.workspace .workspace-check input[type="checkbox"], .workspace .workspace-checks label input[type="checkbox"], .workspace .workspace-switch-row input[type="checkbox"] { background: #d5d8de; }
.workspace .workspace-check input[type="checkbox"]:checked, .workspace .workspace-checks label input[type="checkbox"]:checked, .workspace .workspace-switch-row input[type="checkbox"]:checked { background: var(--accent-fill); }

/* Stats: each tile gets its own colour so a page of numbers reads at a glance */
.workspace .stat-card { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; box-shadow: var(--shadow-1); transition: box-shadow .15s, transform .15s; }
.workspace .stat-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.workspace .stat-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tile, var(--c-mint)); }
.workspace .stat-card .stat-label svg, .workspace .stat-card > svg, .workspace .stat-card .lucide { color: var(--tile, var(--c-mint)); }
.workspace .stat-value { font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.workspace .stat-card:nth-child(6n + 1) { --tile: var(--c-mint); }
.workspace .stat-card:nth-child(6n + 2) { --tile: var(--c-violet); }
.workspace .stat-card:nth-child(6n + 3) { --tile: var(--c-coral); }
.workspace .stat-card:nth-child(6n + 4) { --tile: var(--c-sky); }
.workspace .stat-card:nth-child(6n + 5) { --tile: var(--c-amber); }
.workspace .stat-card:nth-child(6n + 6) { --tile: var(--c-pink); }

/* Charts */
.workspace .insight-bar-track { background: var(--soft-2); }
.workspace .insight-bar-fill { background: linear-gradient(90deg, var(--c-mint), #3fd6c0 45%, var(--c-violet)); }
.workspace .insight-trend-bar { background: linear-gradient(180deg, var(--c-violet), var(--c-sky)); opacity: .9; }

/* People and categories: vivid but soft fills, strong edges */
.sage { background: #dcfaef; color: #006b4d; }
.sand { background: #fff1d9; color: #8a4f00; }
.blue { background: #e3efff; color: #1550b0; }
.clay { background: #ffe6e3; color: #b0302a; }
.plum { background: #efeaff; color: #5532d0; }
.slate { background: #e8ecf3; color: #334155; }
.calendar-event, .week-card { border-left-width: 3px; border-radius: 8px; }
.calendar-event.sage, .week-card.sage { background: #e6fcf4; border-color: #00c896; }
.calendar-event.sand, .week-card.sand { background: #fff4e0; border-color: #ffa41b; }
.calendar-event.blue, .week-card.blue { background: #e9f2ff; border-color: #2b8cff; }
.calendar-event.clay, .week-card.clay { background: #ffecea; border-color: #ff5c5c; }
.calendar-event.plum, .week-card.plum { background: #f1edff; border-color: #7c5cff; }
.calendar-event.slate, .week-card.slate { background: #eef1f6; border-color: #64748b; }
.calendar-event.finished, .week-card.done { background: #f3f4f6; color: #6b7080; border-color: #b8bcc6; }
.calendar-event:hover { filter: none; box-shadow: 0 4px 14px -4px rgba(14, 15, 18, .18); }
.workspace .connected-calendar .day-strip button[aria-pressed="true"], .workspace .connected-calendar .week-strip button[aria-current], .workspace .day-strip .is-selected { background: var(--ink); color: #fff; }

/* Settings nav */
.workspace .settings-nav button[aria-selected="true"] { background: var(--mint-soft); box-shadow: inset 2px 0 0 var(--accent-fill); }
.workspace .settings-nav button[aria-selected="true"] svg { color: var(--accent); }

/* Lists and tables */
.workspace .customer-row { border-radius: 12px; transition: background .12s; }
.workspace .customer-row:hover { background: var(--soft); }
.workspace table th { color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.workspace .count-badge { background: var(--c-coral); color: #fff; }
.workspace .presence-dot { background: var(--presence); }
/* Search fields that wrap an icon + input: one border on the wrapper, none on the input */
.workspace label.customers-search { border: 1px solid var(--line); border-radius: var(--ctl-r); background: #fff; padding: 0 0 0 12px; transition: border-color .12s, box-shadow .12s; }
.workspace label.customers-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.workspace label.customers-search input:not([type="checkbox"]) { border: 0; box-shadow: none; background: transparent; padding-left: 0; }
.workspace label.customers-search input:focus-visible { box-shadow: none; }
/* Service cards: white card, colour carried by the edge and title so a long menu stays calm */
.workspace .service-card.sage, .workspace .service-card.sand, .workspace .service-card.blue, .workspace .service-card.clay, .workspace .service-card.plum, .workspace .service-card.slate { background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-left: 4px solid var(--svc); box-shadow: var(--shadow-1); }
.workspace .service-card:hover { box-shadow: var(--shadow-2); }
.workspace .service-card.sage { --svc: #00c896; } .workspace .service-card.sand { --svc: #ffa41b; } .workspace .service-card.blue { --svc: #2b8cff; }
.workspace .service-card.clay { --svc: #ff5c5c; } .workspace .service-card.plum { --svc: #7c5cff; } .workspace .service-card.slate { --svc: #64748b; }
.workspace .service-card b, .workspace .service-card strong { color: var(--ink); }
.workspace .service-card.selected { background: var(--mint-soft); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-1); }
/* "New here? · Forgot password?" reuses .auth-switch for spacing only — not the pill tab control */
p.auth-switch { display: block; padding: 0; background: none; border: 0; border-radius: 0; margin-top: 14px; color: var(--muted); font-size: var(--fs-13); text-align: center; }
p.auth-switch button.linklike { display: inline; min-height: 0; padding: 0; border-radius: 0; font-size: inherit; color: var(--accent); font-weight: 600; text-decoration: none; }
p.auth-switch button.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Phones: the top bar must keep the bell and account menu on screen — the shop name gives way */
@media (max-width: 600px) {
  .workspace .topbar { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .workspace .topbar .brand { min-width: 0; flex: 0 1 auto; }
  .workspace .topbar .brand-mark ~ .brand-shop-text { display: none; }
  .workspace .topbar .brand-shop-text { min-width: 0; overflow: hidden; }
  .workspace .topbar .brand-shop-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace .topbar .topbar-grow { flex: 1 1 0; min-width: 0; }
  .workspace .topbar .wallet-chip .lucide-chevron-down { display: none; }
  .workspace .topbar .wallet-chip, .workspace .topbar .queue-chip { flex: 0 0 auto; padding-left: 6px; padding-right: 8px; }
  /* Full-screen calendar is a desktop/tablet tool; on phones the calendar already fills the screen */
  .workspace .toolbar-fullscreen { display: none; }
  .calendar-summary-stats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .calendar-summary-stats::-webkit-scrollbar { display: none; }
}

/* Calendar card text sits at reduced opacity for secondary lines; keep every tone above WCAG AA */
.calendar-event.sage, .week-card.sage { color: #005a40; }
.calendar-event.sand, .week-card.sand { color: #7a4400; }
.calendar-event.clay, .week-card.clay { color: #9a2620; }

/* ==========================================================================
   Calendar toolbar: two deliberate rows instead of one long wrapping strip.
   Desktop/tablet  row 1: Today ‹ date ›  Day|Week|Agenda  ……  Walk-in  New booking
                   row 2: Barbers  Team  Filters          ……  Size  Full screen
   Phone           row 1: ‹ date ›  Today  Walk-in  Filters
                   row 2: Day|Week|Agenda  Barber  Team  Size
   Pseudo-elements act as the row break (::after) and the row-2 spacer (::before).
   ========================================================================== */
.workspace .calendar-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 4px; }
.workspace .calendar-toolbar-row::before { content: ""; order: 21; flex: 1 1 0; min-width: 0; height: 0; }
.workspace .calendar-toolbar-row::after { content: ""; order: 10; flex: 0 0 100%; height: 0; }
.workspace .calendar-toolbar-row .toolbar-today { order: 1; }
.workspace .calendar-toolbar-row .toolbar-date-group { order: 2; }
.workspace .calendar-toolbar-row .segmented { order: 3; margin-left: 4px; }
.workspace .calendar-toolbar-row .toolbar-grow { order: 4; flex: 1 1 0; }
.workspace .calendar-toolbar-row .toolbar-walkin { order: 5; }
.workspace .calendar-toolbar-row .toolbar-add { order: 6; }
.workspace .calendar-toolbar-row .toolbar-select { order: 11; }
.workspace .calendar-toolbar-row .team-picker { order: 12; }
.workspace .calendar-toolbar-row .toolbar-filters { order: 13; }
.workspace .calendar-toolbar-row .toolbar-density { order: 22; }
.workspace .calendar-toolbar-row .toolbar-fullscreen { order: 23; }
.workspace .calendar-toolbar-row .toolbar-refresh { order: 24; }
/* Row 2 is secondary: quieter controls */
.workspace .calendar-toolbar-row .toolbar-select,
.workspace .calendar-toolbar-row .team-picker > .button.ghost,
.workspace .calendar-toolbar-row .toolbar-filters.ghost,
.workspace .calendar-toolbar-row .toolbar-density .button.ghost,
.workspace .calendar-toolbar-row .toolbar-fullscreen.ghost { height: 32px; min-height: 32px; border-color: transparent; background: transparent; color: var(--muted); }
.workspace .calendar-toolbar-row .toolbar-select { padding-left: 8px; }
.workspace .calendar-toolbar-row .toolbar-select select { font-weight: 500; color: var(--ink-2, #3a3d45); }
.workspace .calendar-toolbar-row .toolbar-select:hover,
.workspace .calendar-toolbar-row .team-picker > .button.ghost:hover,
.workspace .calendar-toolbar-row .toolbar-filters.ghost:hover,
.workspace .calendar-toolbar-row .toolbar-density .button.ghost:hover,
.workspace .calendar-toolbar-row .toolbar-fullscreen.ghost:hover { background: var(--canvas); color: var(--ink); }
.workspace .calendar-toolbar-row .toolbar-select:has(option:checked:not([value=""])) { background: var(--mint-soft, #e6fcf4); color: var(--accent); }
.workspace .calendar-toolbar-row .toolbar-select:has(option:checked:not([value=""])) select { color: var(--accent-dark, #00664a); font-weight: 600; }

/* The day summary reads as a quiet caption under the toolbar */
.calendar-summary { border-bottom: 1px solid var(--line-2); color: var(--muted); }

@media (max-width: 767px) {
  .workspace .calendar-toolbar-row { padding: 8px 10px; column-gap: 6px; row-gap: 4px; }
  .workspace .calendar-toolbar-row::before { display: none; }
  .workspace .calendar-toolbar-row .toolbar-date-group { order: 1; flex: 1 1 0; min-width: 0; }
  .workspace .calendar-toolbar-row .toolbar-date { flex: 1 1 0; min-width: 0; }
  .workspace .calendar-toolbar-row .toolbar-date-text { font-size: var(--fs-14, 14px); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .workspace .calendar-toolbar-row .toolbar-today { order: 2; padding: 0 10px; }
  .workspace .calendar-toolbar-row .toolbar-walkin { order: 3; }
  .workspace .calendar-toolbar-row .toolbar-filters { order: 4; }
  .workspace .calendar-toolbar-row .toolbar-grow, .workspace .calendar-toolbar-row .toolbar-add { display: none; }
  .workspace .calendar-toolbar-row .segmented { order: 11; flex: 1 1 0; margin-left: 0; height: 34px; }
  .workspace .calendar-toolbar-row .segmented button { flex: 1; justify-content: center; padding: 0 6px; }
  .workspace .calendar-toolbar-row .segmented button svg { display: none; }
  .workspace .calendar-toolbar-row .segmented .toolbar-label { display: inline; }
  /* Barber filter becomes an icon button; the native picker still opens on tap */
  .workspace .calendar-toolbar-row .toolbar-select { order: 12; flex: 0 0 36px; width: 36px; height: 34px; padding: 0; justify-content: center; border: 1px solid var(--line); background: var(--surface); }
  .workspace .calendar-toolbar-row .toolbar-select::after { display: none; }
  .workspace .calendar-toolbar-row .toolbar-select select { position: absolute; inset: 0; width: 100%; max-width: none; padding: 0; opacity: 0; }
  .workspace .calendar-toolbar-row .team-picker { order: 13; }
  .workspace .calendar-toolbar-row .toolbar-density { order: 14; }
  .workspace .calendar-toolbar-row .team-picker > .button.ghost,
  .workspace .calendar-toolbar-row .toolbar-filters.ghost,
  .workspace .calendar-toolbar-row .toolbar-density .button.ghost { height: 34px; min-height: 34px; border-color: var(--line); background: var(--surface); color: var(--ink); }
  /* Less chrome above the grid: the day strip already shows the date, the tab bar carries + */
  .calendar-summary { display: none; }
  .workspace .calendar-foot { display: none; }
  .workspace .connected-calendar .staff-column-heading { flex-wrap: nowrap; }
  .workspace .connected-calendar .staff-column-heading .staff-hours-chip { display: none; }
  .workspace .connected-calendar .staff-column-heading > div { min-width: 0; flex: 1 1 auto; }
  .workspace .connected-calendar .staff-column-heading strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .workspace .connected-calendar .staff-column-heading .staff-menu-button { width: 24px; height: 24px; }
  .workspace .connected-calendar .timezone-label span:last-child { display: none; }
  .workspace .connected-scroll { max-height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - 120px); }
}
@media (max-width: 767px) {
  .workspace .calendar-toolbar-row .toolbar-date-text { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 6px; }
  .workspace .calendar-toolbar-row .toolbar-date-text svg { display: none; }
  .workspace .calendar-toolbar-row .toolbar-date-group { gap: 4px; }
}
@media (max-width: 767px) {
  .workspace .calendar-toolbar-row .toolbar-date { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
  .workspace .calendar-toolbar-row .toolbar-date > * { grid-area: 1 / 1; min-width: 0; }
  .workspace .calendar-toolbar-row .toolbar-date input { width: 100%; min-width: 0; }
}

/* Laptop and up: one compact row (keeps the most height for the timetable).
   Today ‹ date ›  Day|Week|Agenda  Barbers  Team  Filters  ……  Size  Full screen  Walk-in  New booking */
@media (min-width: 768px) {
  .workspace .calendar-toolbar-row::after { display: none; }
  .workspace .calendar-toolbar-row::before { order: 20; flex: 1 1 0; }
  .workspace .calendar-toolbar-row .toolbar-grow { display: none; }
  .workspace .calendar-toolbar-row .toolbar-today { order: 1; }
  .workspace .calendar-toolbar-row .toolbar-date-group { order: 2; }
  .workspace .calendar-toolbar-row .segmented { order: 3; }
  .workspace .calendar-toolbar-row .toolbar-select { order: 4; }
  .workspace .calendar-toolbar-row .team-picker { order: 5; }
  .workspace .calendar-toolbar-row .toolbar-filters { order: 6; }
  .workspace .calendar-toolbar-row .toolbar-density { order: 21; }
  .workspace .calendar-toolbar-row .toolbar-fullscreen { order: 22; }
  .workspace .calendar-toolbar-row .toolbar-walkin { order: 23; }
  .workspace .calendar-toolbar-row .toolbar-add { order: 24; }
  .workspace .calendar-toolbar-row .toolbar-date { min-width: 128px; }
}
@media (min-width: 768px) and (max-width: 1700px) {
  .workspace .calendar-toolbar-row .team-picker .team-word { display: none; }
  .workspace .calendar-toolbar-row .toolbar-filters .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .toolbar-filters { width: 32px; min-width: 32px; padding: 0; justify-content: center; }
}
@media (min-width: 768px) and (max-width: 1560px) {
  .workspace .calendar-toolbar-row .segmented .toolbar-label { display: none; }
  .workspace .calendar-toolbar-row .segmented button { padding: 0 9px; }
  .workspace .calendar-toolbar-row .toolbar-select select { max-width: 130px; }
}
/* Tablet: barber headers stay on one line (hours chip hidden; hours show on hover/menu) */
@media (min-width: 768px) and (max-width: 1180px) {
  .workspace .connected-calendar .staff-column-heading { flex-wrap: nowrap; }
  .workspace .connected-calendar .staff-column-heading .staff-hours-chip { display: none; }
  .workspace .connected-calendar .staff-column-heading > div { min-width: 0; flex: 1 1 auto; }
  .workspace .connected-calendar .staff-column-heading strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .workspace .calendar-toolbar-row .toolbar-date { min-width: 116px; }
}
/* Short laptop screens (≤ 820px tall): trim the chrome so a full working day fits in Compact */
@media (min-width: 768px) and (max-height: 820px) {
  .workspace .workspace-main:has(.connected-calendar) { padding-top: 6px; padding-bottom: 6px; }
  .workspace .calendar-summary { padding-top: 3px; padding-bottom: 3px; min-height: 0; }
  .workspace .calendar-foot { padding-top: 0; padding-bottom: 0; }
}

/* ==========================================================================
   New booking / reschedule: wide three-column sheet with a sticky summary bar
   ========================================================================== */
.modal.wide:has(.booking-workflow) { width: min(1240px, calc(100vw - 48px)); max-height: calc(100vh - 40px); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 40px 120px -20px rgba(11, 11, 12, .45); }
.modal:has(.booking-workflow) .modal-header { padding: 18px 28px; margin: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
.modal:has(.booking-workflow) .modal-header h2 { font-size: 22px; letter-spacing: -.02em; }
.modal:has(.booking-workflow) .booking-workflow { padding: 0; }
.modal:has(.booking-workflow) .booking-workflow > fieldset { display: block; }
.modal:has(.booking-workflow) .booking-workflow > fieldset > :not(.booking-layout):not(.workspace-save-actions) { margin-left: 28px; margin-right: 28px; }
.modal .booking-layout { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(0, 1.35fr) minmax(300px, 1fr); gap: 0; align-items: start; }
.modal .booking-layout > section { padding: 22px 26px 26px; min-width: 0; }
.modal .booking-layout > section + section { border-left: 1px solid var(--line-2, #eceef2); }
.modal .booking-customer { border-left: 1px solid var(--line-2, #eceef2); padding-left: 26px; }
.modal .booking-layout h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.modal .booking-layout h3::first-letter { color: var(--accent); }
.modal .booking-workflow .workspace-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.modal .booking-workflow select, .modal .booking-workflow input:not([type=checkbox]):not([type=radio]), .modal .booking-workflow textarea { border-radius: 10px; min-height: 42px; }
.modal .booking-workflow .field > span, .modal .booking-workflow label > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Add-ons as tidy toggle rows */
.modal .workspace-addon-options { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.modal .workspace-addon-options legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 8px; }
.modal .workspace-addon-options .workspace-check { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); font-size: 13px; transition: border-color .15s, background .15s; }
.modal .workspace-addon-options .workspace-check:has(input:checked) { border-color: var(--accent-fill); background: var(--mint-soft, #e6fcf4); }
.modal .workspace-addon-options p { margin: 0; font-size: 13px; color: var(--muted); }

/* Date strip */
.modal .booking-day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 58px; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 10px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.modal .booking-day { scroll-snap-align: start; display: grid; justify-items: center; gap: 1px; padding: 8px 0 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .15s; }
.modal .booking-day small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.modal .booking-day strong { font-size: 18px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.modal .booking-day:hover { border-color: var(--ink-3, #9aa0aa); }
.modal .booking-day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.modal .booking-day[aria-pressed="true"] small { color: var(--mint, #00e8b0); }
.modal .booking-when > .field:has(input[type=date]) { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.modal .booking-when > .field:has(input[type=date]) > span { white-space: nowrap; }
.modal .booking-when input[type=date] { max-width: 190px; min-height: 36px !important; font-size: 13px; }

/* Times */
.modal .slot-grid { display: grid; gap: 14px; margin: 0 0 16px; }
.modal .slot-grid-group h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.modal .slot-grid-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.modal .slot-chip { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.modal .slot-chip:hover { border-color: var(--accent-fill); background: var(--mint-soft, #e6fcf4); }
.modal .slot-chip[aria-pressed="true"] { background: var(--accent-fill, #00e8b0); border-color: var(--accent-fill, #00e8b0); color: var(--ink); font-weight: 700; box-shadow: 0 4px 14px -6px rgba(0, 200, 150, .7); }
.modal .booking-time-row { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.modal .booking-time-row .field { flex: 1 1 200px; margin: 0; }
.modal .booking-time-shortcut { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }
.modal .booking-time-shortcut .button { min-height: 36px; }
.modal .workspace-quote { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line-2, #eceef2); font-size: 13px; color: var(--muted); }
.modal .workspace-quote strong { color: var(--ink); font-size: 15px; }

/* Customer column */
.modal .booking-customer .customer-new { background: var(--canvas); border-color: var(--line-2, #eceef2); }
.modal .booking-customer .workspace-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal .series-options { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; }
.modal .series-options legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; margin-left: -6px; font-size: 13px; font-weight: 600; }
.modal .series-options .series-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; background: none; padding: 0; }
.modal .booking-customer > .workspace-footnote:last-child { display: none; }

/* Sticky summary + action bar */
.modal:has(.booking-workflow) .workspace-save-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; margin: 0; padding: 14px 28px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.modal:has(.booking-workflow) .workspace-save-actions > .button { margin-left: auto; min-height: 46px; padding: 0 26px; font-size: 15px; font-weight: 650; border-radius: 12px; }
.booking-summary-bar { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; min-width: 0; font-size: 14px; color: var(--muted); }
.booking-summary-bar .bsb-main strong { color: var(--ink); font-weight: 650; }
.booking-summary-bar .bsb-when { font-variant-numeric: tabular-nums; }
.booking-summary-bar .bsb-price { padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }
.modal .booking-review { margin: 0 28px 20px; }

/* Medium screens: service + time stacked on the left, customer on the right */
@media (max-width: 1100px) {
  .modal .booking-layout { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); }
  .modal .booking-layout > .booking-selection { grid-column: 1; grid-row: 1; padding-bottom: 6px; }
  .modal .booking-layout > .booking-when { grid-column: 1; grid-row: 2; border-left: 0; padding-top: 6px; }
  .modal .booking-layout > .booking-customer { grid-column: 2; grid-row: 1 / span 2; }
}
/* Phones: full-screen sheet, single column */
@media (max-width: 720px) {
  .modal.wide:has(.booking-workflow) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .modal:has(.booking-workflow) .modal-header { padding: 12px 16px; }
  .modal:has(.booking-workflow) .modal-header h2 { font-size: 19px; }
  .modal:has(.booking-workflow) .booking-workflow > fieldset > :not(.booking-layout):not(.workspace-save-actions) { margin-left: 16px; margin-right: 16px; }
  .modal .booking-layout { display: block; }
  .modal .booking-layout > section { padding: 18px 16px; border-left: 0 !important; }
  .modal .booking-layout > section + section { border-top: 8px solid var(--canvas); }
  .modal .booking-customer { padding-left: 16px; }
  .modal .booking-workflow .workspace-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .modal .booking-customer .workspace-form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal .slot-grid-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal:has(.booking-workflow) .workspace-save-actions { padding: 10px 16px calc(10px + var(--sheet-safe-bottom, 12px)); gap: 10px; }
  .modal:has(.booking-workflow) .workspace-save-actions > .button { padding: 0 16px; flex: 0 0 auto; }
  .booking-summary-bar { font-size: 12.5px; gap: 2px 8px; flex: 1 1 0; }
  .booking-summary-bar .bsb-main { flex-basis: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .booking-summary-bar .bsb-price { padding: 1px 8px; }
  .modal .booking-review { margin: 0 16px 16px; }
}
.modal .booking-when > .workspace-field:has(input[type=date]) { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.modal .booking-when > .workspace-field:has(input[type=date]) > span { white-space: nowrap; margin: 0; }
.modal .booking-when > .workspace-field:has(input[type=date]) input { flex: 0 1 190px; }
.modal .customer-picker .customers-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.modal .customer-picker .customers-search:focus-within { border-color: var(--accent-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill) 22%, transparent); }
.modal .customer-picker .customers-search svg { color: var(--muted); flex: none; }
.modal .customer-picker .customers-search input { border: 0 !important; box-shadow: none !important; background: transparent; padding: 0; min-height: 0 !important; height: 100%; flex: 1; outline: 0; }
@media (max-width: 720px) {
  .booking-summary-bar .bsb-main span { display: none; }
  .booking-summary-bar { align-items: center; }
  .booking-summary-bar .bsb-main { flex-basis: 100%; }
  .modal .booking-when > .workspace-field:has(input[type=date]) input { flex: 1 1 auto; }
}
.modal .booking-when > .workspace-field:has(input[type=date]) { flex-direction: row; justify-content: flex-start; text-align: left; }
.modal .booking-when > .workspace-field:has(input[type=date]) input { height: 36px; flex: 0 1 190px; }
.modal .booking-review { border: 1px solid color-mix(in srgb, var(--accent-fill) 55%, var(--line)); background: linear-gradient(180deg, var(--mint-soft, #e6fcf4), var(--surface) 70%); border-radius: 16px; padding: 18px 20px; }
.modal .booking-review .notice { background: transparent; border: 0; padding: 0; }
.modal .booking-review .notice strong { font-size: 15px; }

/* ---- Agenda view: rows were flush to the card edge, so times sat under the rounded border. */
.workspace .connected-calendar .workspace-bookings { padding: 4px 20px 8px; }
@media (max-width: 767px) { .workspace .connected-calendar .workspace-bookings { padding: 0 12px 6px; } }

/* ---- In-app confirm / prompt (src/client/confirm.tsx) — replaces the browser's grey pop-ups. */
.ask-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line, #e6e6e9);
  border-radius: 16px; background: #fff; color: var(--ink, #0b0b0c);
  box-shadow: 0 24px 64px -16px rgba(11, 11, 12, .28), 0 2px 6px rgba(11, 11, 12, .06);
}
.ask-dialog::backdrop { background: rgba(11, 11, 12, .42); backdrop-filter: blur(3px); }
.ask-dialog[open] { animation: ask-in .16s ease-out; }
@keyframes ask-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.ask-dialog form { display: grid; gap: 10px; padding: 22px 22px 18px; }
.ask-dialog h2 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.ask-dialog p { margin: 0; color: var(--muted, #5b5b63); font-size: 14px; line-height: 1.5; }
.ask-dialog.tone-warning h2::before, .ask-dialog.tone-danger h2::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: 2px;
  background: #e8a200;
}
.ask-dialog.tone-danger h2::before { background: #d93a3a; }
.ask-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.ask-field textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 76px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--line, #e0e0e4); border-radius: 10px;
}
.ask-field textarea:focus { outline: 2px solid var(--accent, #00e8b0); outline-offset: 1px; border-color: transparent; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ask-actions .button { min-height: 40px; padding-inline: 16px; }
@media (max-width: 767px) {
  .ask-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .ask-dialog form { padding: 20px 18px calc(18px + var(--sheet-safe-bottom, 12px)); }
  .ask-actions { flex-direction: column-reverse; }
  .ask-actions .button { width: 100%; min-height: 46px; }
}
.calendar-shortcuts { margin-top: 8px; color: var(--muted, #5b5b63); font-size: 12.5px; line-height: 2; }
.calendar-shortcuts kbd {
  display: inline-block; min-width: 20px; padding: 0 6px; border: 1px solid var(--line, #e0e0e4); border-bottom-width: 2px;
  border-radius: 6px; background: #fff; color: var(--ink, #0b0b0c); font: 600 11.5px/18px var(--font-sans, inherit); text-align: center;
}
@media (max-width: 767px) { .calendar-shortcuts { display: none; } }
.ask-check {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--line, #e6e6e9); border-radius: 12px; background: #f7f8f8;
}
.ask-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #0a7d5c; flex: none; }
.ask-check span { display: grid; gap: 2px; }
.ask-check strong { font-size: 14px; font-weight: 600; }
.ask-check small { color: var(--muted, #5b5b63); font-size: 12.5px; line-height: 1.4; }
.ask-check:has(input:checked) { border-color: rgba(0, 168, 128, .45); background: rgba(0, 232, 176, .08); }
.ask-checks { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; border: 0; min-width: 0; }
.ask-checks legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 650; color: var(--ink, #0b0b0c); }
.ask-checks .ask-check { margin-top: 0; }
.ask-checks small { overflow-wrap: anywhere; }
.ask-checks-hint { margin: 2px 0 0 !important; font-size: 12.5px !important; }
/* Inside a fieldset the generic form label rules stack children; keep box + text on one row. */
.ask-checks label.ask-check { display: flex !important; flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; grid-template-columns: none; }
.ask-checks label.ask-check input { margin: 0; }
.ask-checks label.ask-check span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }

/* Calendar time gutter: a full label on every 15-minute row; the hour reads strongest. */
.workspace .connected-calendar .time-gutter > span.quarter { font-size: 10px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.workspace .connected-calendar .time-gutter > span.hour { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Calendar toolbar: one dots menu replaces filters and walk-in. */
.workspace .toolbar-daymenu { position: relative; display: inline-flex; }
.workspace .day-menu-list { position: absolute; left: 0; z-index: 60; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 8px; display: grid; gap: 2px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(11,11,12,.16); }
.workspace .day-menu-list button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font: inherit; color: inherit; text-align: left; }
.workspace .day-menu-list button:hover:not(:disabled) { background: var(--soft, #f3f4f6); }
.workspace .day-menu-list button:disabled { opacity: .45; }
.workspace .day-menu-who { display: grid; gap: 4px; padding: 4px 4px 8px; font-size: 12px; color: var(--muted); }
.workspace .day-menu-who select { min-height: 44px; font-size: 16px; }

/* No page zoom in the app. iPhones zoom into any field under 16px, so touch screens get 16px fields. */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}

/* Customers (phone): one search border, full-width field, filters never overlap the list. */
.workspace label.customers-search { display: flex; align-items: center; gap: 8px; }
.workspace label.customers-search input[type="search"], .workspace label.customers-search input:not([type="checkbox"]) { flex: 1; min-width: 0; width: 100%; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; min-height: 40px; -webkit-appearance: none; appearance: none; }
.workspace label.customers-search svg { flex: none; }
.workspace .customers-toolbar { display: grid; gap: 10px; }
.workspace .customers-filters { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.workspace .customers-filters::-webkit-scrollbar { display: none; }
.workspace .customers-filters button { flex: none; white-space: nowrap; }
.workspace .customer-list { margin-top: 0; position: relative; z-index: 0; }

/* Small phones: the top bar never overlaps. The account button already shows the shop logo. */
@media (max-width: 400px) {
  .topbar { gap: 6px; padding-left: 8px; padding-right: 8px; min-width: 0; }
  .topbar .brand, .topbar .topbar-search { display: none !important; }
  .topbar .wallet-chip, .topbar .queue-chip { flex: 0 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .topbar .wallet-chip small, .topbar .queue-chip small { display: none; }
  .workspace .customers-filters button { padding-left: 12px; padding-right: 12px; }
}

/* Confirmation messages ("Saved.", "Moved…") fade out on their own: 4 s, or 8 s with an Undo. */
@keyframes foliyo-notice-out { to { opacity: 0; visibility: hidden; height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; } }
.workspace .workspace-success:not([data-keep]), .modal .workspace-success:not([data-keep]), .workspace .series-result:not([data-keep]), .workspace .queue-offer-sent:not([data-keep]), .studio-status.workspace-success:not([data-keep]) { animation: foliyo-notice-out .35s ease 4s forwards; }
.workspace .workspace-success:has(.undo-button) { animation-delay: 8s; }
.workspace .notice-toast .notice-close { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: auto; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; opacity: .7; }
.workspace .notice-toast .notice-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
@media (prefers-reduced-motion: reduce) { .workspace .workspace-success:not([data-keep]), .modal .workspace-success:not([data-keep]), .workspace .series-result, .workspace .queue-offer-sent { animation-duration: .01s; } }

/* Calendar tab: pin the page so only the timetable scrolls (no rubber-band drag of the whole app). */
html.calendar-pinned, html.calendar-pinned body { overscroll-behavior: none; }
@media (max-width: 1100px), (pointer: coarse) {
  html.calendar-pinned, html.calendar-pinned body { height: 100%; overflow: hidden; }
}
.workspace .connected-calendar > .connected-scroll { overscroll-behavior: none; }

/* Appointment panel: everyday changes sit right under the title. */
.panel-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.panel-quick-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 8px; white-space: nowrap; border: 1.5px solid var(--line, #e3e3e6); border-radius: 12px; background: #fff; color: var(--ink, #0b0b0c); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.panel-quick-btn:hover:not(:disabled) { border-color: var(--ink, #0b0b0c); }
.panel-quick-btn:focus-visible { outline: 2px solid #00e8b0; outline-offset: 2px; }
.panel-quick-btn.danger { color: #b42318; border-color: #f3c7c2; background: #fff7f6; }
.panel-quick-btn.danger:hover:not(:disabled) { border-color: #b42318; }
.panel-quick-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 520px) { .panel-quick { grid-template-columns: 1fr 1fr; } }

/* Collapsed menu: icons sit dead centre in their highlight (the hidden label used to keep growing
   and push them left), the expand button lines up with the icons, and the rail runs full height. */
.workspace .sidebar.rail.collapsed .sidebar-item { padding: 0; justify-content: center; gap: 0; width: 44px; margin-inline: auto; }
.workspace .sidebar.rail.collapsed .sidebar-label { flex: 0 0 0; width: 0; opacity: 0; overflow: hidden; }
.workspace .sidebar.rail.collapsed .sidebar-head-spacer { display: none; }
.workspace .sidebar.rail.collapsed .sidebar-head { justify-content: center; padding: 0; }
.workspace .sidebar.rail.collapsed .sidebar-toggle { margin: 0 auto; }
.workspace .sidebar.rail.collapsed .rail-tip { z-index: 60; pointer-events: none; }
.workspace .sidebar.rail.collapsed .sidebar-divider, .workspace .sidebar.rail.collapsed hr { margin-inline: 6px; }
@media (min-width: 768px) {
  .workspace .sidebar.rail { align-self: flex-start; height: calc(100dvh - var(--topbar-h, 56px)); min-height: 0; }
}

/* Pay set-up: short collapsible sections with a one-line summary each */
.pay-terms { gap: var(--s-3); }
.pay-section { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pay-section-head { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3); padding: 12px 14px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; border-radius: var(--r); }
.pay-section-head:hover { background: var(--canvas); }
.pay-section-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay-section-title { font-weight: 600; font-size: var(--fs-14); white-space: nowrap; }
.pay-section-summary { color: var(--muted); font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: right; }
.pay-section.open .pay-section-summary { visibility: hidden; }
.pay-section-body { display: grid; gap: var(--s-3); padding: 0 14px 14px; }
.pay-section .pay-deductions, .pay-section .pay-tiers { border: 0; padding: 0; }
.pay-models { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pay-model { padding: 8px 12px; text-align: center; }
.pay-model-blurb { margin: 0; }
.pay-preview-line { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-13); color: var(--ink); background: var(--ollo-soft); border-radius: var(--r-sm); padding: 8px 12px; }
.pay-history-log { border-top: 1px solid var(--line-2); padding-top: var(--s-3); display: grid; gap: var(--s-2); }
.pay-history-log h4 { margin: 0; font-size: var(--fs-13); }
.pay-history-log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.pay-history-log li { display: grid; gap: 2px; font-size: var(--fs-13); }
.pay-history-log li small { color: var(--muted); }
.pay-history-log b { font-weight: 600; margin-right: 4px; }
@media (max-width: 640px) {
  .pay-section-head { grid-template-columns: 1fr auto; }
  .pay-section-summary { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .pay-section.open .pay-section-summary { display: none; }
}

/* Holiday tracker */
.holiday-tracker { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: var(--s-2); background: var(--surface); }
.holiday-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.holiday-head > div { display: grid; gap: 2px; }
.holiday-head small { color: var(--muted); font-size: var(--fs-12); }
.holiday-bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; }
.holiday-bar .taken { background: var(--accent); }
.holiday-bar .booked { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.holiday-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.holiday-figures div { display: grid; gap: 2px; }
.holiday-figures dt { color: var(--muted); font-size: var(--fs-12); }
.holiday-figures dd { margin: 0; font-weight: 600; font-size: var(--fs-14); }
.holiday-figures dd small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-11); }
.holiday-figures .over dd { color: var(--warn); }
.holiday-warn { margin: 0; color: var(--warn); font-size: var(--fs-13); font-weight: 600; }
.holiday-edit { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: end; }
.holiday-edit .workspace-field { margin: 0; }
.holiday-edit .workspace-footnote { flex-basis: 100%; margin: 0; }
.holiday-table-wrap { grid-column: 1 / -1; display: grid; gap: var(--s-2); }
.holiday-table-wrap h3 { margin: 0; }
.holiday-table-wrap tr.over td { color: var(--warn); }
.holiday-year { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; font-size: var(--fs-13); }
@media (max-width: 640px) { .holiday-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Repeat-booking quick choices (shop form and customer booking) */
.series-presets, .repeat-choices { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.series-presets .chip, .repeat-choices .chip {
  min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--ink); cursor: pointer;
}
.series-presets .chip.active, .repeat-choices .chip.active { background: var(--ollo-soft); border-color: var(--accent); color: var(--accent-dark); }
.review-repeat { display: grid; gap: 8px; padding: var(--s-3) 0; }
.review-repeat h3 { margin: 0; font-size: var(--fs-14); display: flex; gap: 6px; align-items: center; }
.repeat-visits { display: grid; gap: 4px; font-size: var(--fs-13); }
.repeat-result { margin-top: var(--s-4); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md, 12px); background: var(--surface); }
.repeat-result h2 { margin: 0 0 4px; font-size: var(--fs-16, 16px); }
.notify-push { display: grid; gap: 6px; padding: 0 0 var(--s-3); }
.notify-push small { color: var(--muted); }
.notify-list li.unread { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.perm-group { display: grid; gap: 6px; margin-top: var(--s-3); }
.perm-group > strong { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.sms-bill-note svg { vertical-align: -2px; margin-right: 6px; }
.rem-quiet-toggle { flex-direction: row; justify-content: flex-start; }
.rem-quiet-toggle input { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 0; accent-color: #006b4d; }

/* ---- Checkbox / radio rows: the global `label` rule is a column, so every row-style label must say row ---- */
.setup-check, .sms-bill-ack { flex-direction: row; }
.setup-check input { flex: none; width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--ctl-accent, var(--accent)); }
.workspace-toggle input[type="radio"], .workspace-toggle input[type="checkbox"] { height: 18px; min-height: 18px; padding: 0; }
input[type="radio"] { appearance: auto; width: 18px; height: 18px; min-height: 18px; padding: 0; flex: none; }
/* Small round "x" buttons (reminder chips): bigger touch area on phones */
@media (pointer: coarse) { .rem-chip button { width: 32px; height: 32px; } }
.workspace-field input[type="radio"], .workspace-field input[type="checkbox"],
.workspace .workspace-form-grid input[type="radio"], .workspace .workspace-form-grid input[type="checkbox"] { width: 18px; min-width: 18px; height: 18px; min-height: 18px; padding: 0; }

/* ---- Appointment bottom sheet on phones: compact footer, tidy header/customer card ----
   Footer was three rows (Checkout / Move + Book again / lonely "…"), eating a third of the sheet.
   Now: Checkout full width, then the secondary actions share one row with the "…" button. */
@media (max-width: 900px) {
  .panel-header { padding-bottom: 8px; }
  .panel-title-line h2 { font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
  .panel-quick { margin-top: 10px; }
  .panel-quick-btn { min-height: 44px; }
  .panel-customer-name strong, .panel-email, .panel-phone { overflow-wrap: anywhere; }
  .panel-email { white-space: normal; }
  .panel-customer-head { align-items: flex-start; }
  .panel-link { flex: none; }
  .panel-actions { flex-wrap: wrap; gap: 8px; padding-top: 8px; }
  .panel-actions > .button { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 13px; white-space: nowrap; line-height: 1.15; text-align: center; }
  .panel-actions > .button:first-child:not(:nth-last-child(2)) { flex: 1 1 100%; }
  .panel-actions > .button + .button svg { display: none; }
  .panel-more { flex: 0 0 44px; margin: 0; }
  .panel-more summary { width: 44px; height: 44px; }
  .panel-more-menu { left: auto; right: 0; bottom: 52px; max-width: calc(100vw - 24px); }
  .panel-more-menu button { min-height: 44px; }
}
@media (max-width: 767px) {
  .customer-profile-head p { overflow-wrap: anywhere; line-height: 1.5; }
  .customer-profile-head h2 { overflow-wrap: anywhere; }
}

/* ---- Phone sheets in the team app: appointment sheet, booking form, dialogs ----
   The team app shell does NOT use viewport-fit=cover: iOS keeps the top bar and tab bar inside the
   safe area itself (cover pushed the top bar under the status bar and left a band under the tab bar).
   Only the sheets need help: their action bars get a home-bar allowance that works whether or not iOS
   reports env() insets — env() when it does, a fixed allowance in the installed (standalone) app. */
:root { --sheet-safe-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
@media (display-mode: standalone) and (pointer: coarse) {
  :root { --sheet-safe-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes scrim-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  /* Appointment sheet: a real bottom sheet — grab handle, rounded top, stops short of the status bar,
     scrolls inside, and the action bar always sits clear of the home bar. */
  .panel-scrim { background: rgba(14, 17, 26, 0.42); overscroll-behavior: contain; animation: scrim-fade .18s ease-out; }
  .appointment-panel {
    height: auto; max-height: calc(100dvh - 28px); min-height: 0;
    border: 0; border-radius: 22px 22px 0 0; overflow: hidden;
    box-shadow: 0 -18px 50px rgba(14, 17, 26, 0.22);
    animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1);
    touch-action: pan-y; will-change: transform;
  }
  .appointment-panel.dragging { animation: none; transition: none; }
  .appointment-panel.settling { transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  .panel-handle { display: block; flex: none; width: 100%; height: 22px; margin: 0; background: transparent; position: relative; cursor: grab; touch-action: none; }
  .panel-handle::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: #d0d3db; }
  .appointment-panel .panel-header { padding-top: 2px; background: var(--surface); }
  .appointment-panel .panel-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .appointment-panel .panel-actions {
    position: relative; flex: none;
    padding: 10px 14px calc(10px + var(--sheet-safe-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(14, 17, 26, 0.06);
  }
  .appointment-panel .panel-actions > .button { min-height: 46px; border-radius: 12px; font-weight: 600; }
  .appointment-panel .panel-more summary { border-radius: 12px; }
  .panel-more-menu { bottom: calc(100% + 8px); border-radius: 14px; box-shadow: 0 18px 50px rgba(14, 17, 26, 0.22); }

  /* Side drawers (message history, reviews) clear the home bar too. */
  .history-drawer { padding-bottom: calc(24px + var(--sheet-safe-bottom)); }
}

@media (max-width: 767px) {
  /* Dialogs become bottom sheets on phones: full width, rounded top, slide up, never taller than the
     screen, content clear of the home bar. */
  .modal {
    width: 100vw; max-width: 100vw; margin: auto 0 0;
    max-height: calc(100dvh - 28px);
    border: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 50px rgba(14, 17, 26, 0.22);
    overscroll-behavior: contain; overflow-x: hidden;
  }
  .modal[open] { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  .modal::backdrop { background: rgba(14, 17, 26, 0.42); }
  .modal .modal-inner { padding: 18px 16px 16px; }
  .modal .modal-inner:not(:has(.workspace-save-actions)) { padding-bottom: calc(16px + var(--sheet-safe-bottom)); }
  .modal .modal-header { position: sticky; top: 0; z-index: 3; margin: -18px -16px 16px; padding: 14px 16px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .modal .modal-header::before { content: ""; position: absolute; left: 50%; top: 5px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #d0d3db; }
  .modal .modal-header h2 { font-size: 19px; }
  .modal .workspace-save-actions {
    margin: 0 -16px; padding: 10px 16px calc(10px + var(--sheet-safe-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(14, 17, 26, 0.06);
  }
  .modal .workspace-save-actions .button { min-height: 46px; border-radius: 12px; }
  /* Plain dialogs: the main action spans the sheet, like an iOS sheet button. */
  .modal:not(:has(.booking-workflow)) .workspace-save-actions { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; bottom: 0; z-index: 3; }
  .modal:not(:has(.booking-workflow)) .workspace-save-actions > .button { flex: 1 1 100%; justify-content: center; font-size: 15px; font-weight: 650; }
  /* The in-app confirm sheet (cancel, no-show…) uses the same allowance. */
  .ask-dialog form { padding-bottom: calc(18px + var(--sheet-safe-bottom)); }
}
@media (max-width: 720px) {
  /* The booking form is a full-screen sheet; its header and footer handle their own edges. */
  .modal.wide:has(.booking-workflow) { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); box-shadow: none; }
  .modal.wide:has(.booking-workflow) .modal-inner { padding: 0; }
  .modal:has(.booking-workflow) .modal-header { position: sticky; top: 0; margin: 0; padding: 12px 16px; }
  .modal:has(.booking-workflow) .modal-header::before { display: none; }
  .modal:has(.booking-workflow) .workspace-save-actions { margin: 0; padding: 10px 16px calc(10px + var(--sheet-safe-bottom)); background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .appointment-panel, .modal[open], .modal.wide:has(.booking-workflow), .panel-scrim { animation: none !important; }
}

/* ---- Booking form: the chosen time as a summary, one "change time" dropdown, staff-only length ---- */
.modal .booking-chosen-time { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.modal .booking-chosen-time strong { font-size: 15px; }
.modal .booking-chosen-time svg { color: var(--accent); flex: none; }
.modal .booking-length { display: grid; gap: 4px; margin: 10px 0 4px; }
.modal .booking-length .field { margin: 0; max-width: 260px; }
.modal .booking-length small { color: var(--muted); font-size: 12px; }

/* ---- Booking time picker: one clean card — the chosen time, then a single list of bookable times ---- */
.modal .booking-time-picker { display: grid; gap: 12px; padding: 14px 16px; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(24, 27, 42, 0.04); }
.modal .booking-time-picker .booking-chosen-time { display: flex; align-items: center; gap: 12px; padding: 0; margin: 0; border: 0; background: none; }
.modal .booking-time-picker .booking-chosen-time > svg { box-sizing: border-box; width: 40px; height: 40px; padding: 10px; border-radius: 50%; flex: none; color: var(--accent); background: rgba(108, 117, 255, 0.12); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.modal .booking-time-picker .booking-chosen-time > span { display: grid; gap: 2px; min-width: 0; }
.modal .booking-time-picker .booking-chosen-time small { font-size: 12px; line-height: 1.3; color: var(--muted); }
.modal .booking-time-picker .booking-chosen-time strong { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.modal .booking-time-picker .field { margin: 0; }
.modal .booking-time-picker select { width: 100%; min-height: 44px; font-size: 16px; font-variant-numeric: tabular-nums; }
.modal .booking-time-picker > .button { justify-self: start; min-height: 40px; }
@media (max-width: 767px) {
  .modal .booking-time-picker { padding: 12px 14px; }
  .modal .booking-time-picker > .button { justify-self: stretch; }
}
/* Dropdowns everywhere: the chosen value sits in the vertical middle of the box (see "Dropdowns v2" below). */

/* ---- Timetable date chip: clickable anywhere on desktop (opens the calendar via showPicker) ---- */
@media (hover: hover) and (pointer: fine) {
  .workspace .calendar-toolbar-row .toolbar-date { cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
  .workspace .calendar-toolbar-row .toolbar-date:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--canvas); }
  .workspace .calendar-toolbar-row .toolbar-date input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
}

/* =====================================================================================
   Slim booking form (staff): Customer → Service → Time, extras folded into "More options".
   Two columns on desktop, one tidy column on phones. Appended last so it wins.
   ===================================================================================== */
.modal .booking-layout.booking-slim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: start; }
.modal .booking-slim > .booking-col { display: grid; gap: 0; min-width: 0; align-content: start; }
.modal .booking-slim > .booking-col + .booking-col { border-left: 1px solid var(--line-2, #eceef2); }
.modal .booking-slim > .booking-col > section { padding: 20px 26px; border: 0 !important; min-width: 0; }
.modal .booking-slim > .booking-col > section + section { border-top: 1px solid var(--line-2, #eceef2) !important; }
.modal .booking-slim .booking-customer { padding-left: 26px; }
.modal .booking-slim h3 { margin: 0 0 12px; font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.modal .booking-slim h3::first-letter { color: inherit; }
.modal .booking-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.modal .booking-section-head h3 { margin: 0; }
.modal .booking-walkin { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.modal .booking-walkin:hover { border-color: var(--ink-3, #9aa0aa); }
.modal .booking-walkin.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.modal .booking-walkin-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--canvas); color: var(--muted); font-size: 13px; line-height: 1.45; }
.modal .booking-slim .workspace-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.modal .booking-slim .booking-customer .workspace-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal .booking-slim .customer-new { padding: 12px; gap: 8px; }
.modal .booking-slim .customer-new .workspace-footnote { font-size: 12px; }
/* One-line switches (confirmation, repeat): label left, switch right. */
.modal .booking-slim .booking-confirm-switch,
.modal .booking-slim .series-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding: 10px 2px 0; border: 0; background: none; min-height: 0; }
.modal .booking-slim .booking-confirm-switch > span,
.modal .booking-slim .series-toggle > span { display: grid; gap: 1px; min-width: 0; }
.modal .booking-slim .booking-confirm-switch strong,
.modal .booking-slim .series-toggle strong { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.modal .booking-slim .booking-confirm-switch small,
.modal .booking-slim .series-toggle small { font-size: 12px; color: var(--muted); }
/* Price line: one quiet row under the service. */
.modal .booking-slim .workspace-quote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0; border: 0; background: none; font-size: 13px; color: var(--muted); }
.modal .booking-slim .workspace-quote strong { font-size: 15px; color: var(--ink); }
.modal .booking-slim .workspace-quote .badge { margin-left: 2px; }
/* Add-ons as compact toggle chips. */
.modal .booking-slim .booking-addons { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; border: 0; }
.modal .booking-slim .booking-addons legend { width: 100%; margin: 0 0 6px; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.modal .booking-slim .addon-chip { position: relative; display: inline-flex; flex-direction: row; justify-content: flex-start; width: auto; text-align: left; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.modal .booking-slim .addon-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.modal .booking-slim .addon-chip small { color: var(--muted); font-size: 12px; }
.modal .booking-slim .addon-chip:hover { border-color: var(--ink-3, #9aa0aa); }
.modal .booking-slim .addon-chip.on { border-color: var(--accent-fill, var(--accent)); background: var(--mint-soft, #e6fcf4); }
.modal .booking-slim .addon-chip:focus-within { box-shadow: var(--ring, 0 0 0 3px rgba(0, 200, 150, .25)); }
/* Dates: the day strip ends with a "Pick date" tile (opens the calendar); no separate date box. */
.modal .booking-slim .booking-day-strip { margin: 0 -2px 12px; }
.modal .booking-slim .booking-date-row { display: flex; margin: 0 0 12px; }
.modal .booking-slim .booking-date-pick { position: relative; align-content: center; gap: 4px; color: var(--accent-dark, var(--ink)); }
.modal .booking-slim .booking-date-row .booking-date-pick { grid-auto-flow: column; padding: 8px 14px; min-height: 40px; }
.modal .booking-slim .booking-date-pick small { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: inherit; white-space: nowrap; }
.modal .booking-slim .booking-date-pick.is-set { background: var(--ink); border-color: var(--ink); color: #fff; grid-auto-columns: auto; }
.modal .booking-slim .booking-day-strip .booking-date-pick.is-set { grid-column: span 2; }
.modal .booking-slim .booking-date-pick input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; max-width: none; min-height: 0 !important; }
.modal .booking-slim .booking-date-pick input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.modal .booking-slim .booking-date-pick:focus-within { box-shadow: var(--ring, 0 0 0 3px rgba(0, 200, 150, .25)); }
.modal .booking-slim .booking-date-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.modal .booking-slim .booking-date-shortcuts > span { font-size: 13px; color: var(--muted); }
.modal .booking-slim .booking-date-shortcuts .button { min-height: 34px; padding: 0 12px; }
.modal .booking-slim .booking-checking { margin: 0; font-size: 13px; color: var(--muted); }
.modal .booking-slim .booking-time-picker { margin: 0; }
/* More options: one row, opens to length / notes / repeat; shows what's set when closed. */
.modal .booking-slim .booking-more { padding-top: 6px !important; padding-bottom: 6px !important; }
.modal .booking-more-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.modal .booking-more-toggle > svg { flex: none; color: var(--muted); }
.modal .booking-more-label { font-size: 14px; font-weight: 600; flex: none; }
.modal .booking-more-summary { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.modal .booking-more-summary.set { color: var(--accent-dark, var(--ink)); font-weight: 600; }
.modal .booking-more-body { display: grid; gap: 14px; padding: 4px 0 14px; }
.modal .booking-more-body[hidden] { display: none; }
.modal .booking-slim .booking-length { margin: 0; }
.modal .booking-slim .booking-length .field { max-width: none; }
.modal .booking-slim .series-options { margin: 0; padding: 0; border: 0; }
.modal .booking-slim .series-options .series-toggle { margin: 0; padding: 0; }
.modal .booking-slim .series-controls { display: grid; gap: 8px; margin-top: 10px; }
.modal .booking-slim .series-controls .workspace-footnote { margin: 0; font-size: 12px; }
.modal .booking-slim textarea { min-height: 64px; }
/* Context banners (book again / waitlist / moving): one compact line. */
.modal:has(.booking-slim) .booking-slot-origin { display: flex; align-items: flex-start; gap: 10px; margin: 14px 26px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2, #eceef2); background: var(--canvas); font-size: 13px; }
.modal:has(.booking-slim) .booking-slot-origin > svg { flex: none; margin-top: 2px; color: var(--accent-dark, var(--ink)); }
.modal:has(.booking-slim) .booking-slot-origin > span { display: grid; gap: 2px; min-width: 0; }
.modal:has(.booking-slim) .booking-slot-origin small { color: var(--muted); font-size: 12.5px; }
.modal:has(.booking-slim) .booking-review { margin: 0 26px 18px; }
@media (min-width: 721px) { .modal.wide:has(.booking-slim) { width: min(980px, calc(100vw - 48px)); } }

@media (max-width: 860px) and (min-width: 721px) {
  .modal .booking-layout.booking-slim { grid-template-columns: minmax(0, 1fr); }
  .modal .booking-slim > .booking-col + .booking-col { border-left: 0; border-top: 1px solid var(--line-2, #eceef2); }
}
@media (max-width: 720px) {
  .modal .booking-layout.booking-slim { display: block; }
  .modal .booking-slim > .booking-col + .booking-col { border-left: 0; border-top: 8px solid var(--canvas); }
  .modal .booking-slim > .booking-col > section { padding: 16px; }
  .modal .booking-slim .booking-customer { padding-left: 16px; }
  .modal .booking-slim .booking-customer .workspace-form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal .booking-slim .booking-selection .workspace-form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal:has(.booking-slim) .booking-slot-origin { margin: 12px 16px 0; }
  .modal:has(.booking-slim) .booking-review { margin: 0 16px 16px; }
}

.modal .booking-slim .addon-chip > svg { flex: none; }
.modal .booking-slim .addon-chip > span { white-space: nowrap; }

/* ---- Whole shop closed (closed weekday or a closure date): one soft red wash + one pinned label,
   instead of "Shop closed" repeated down every column. Barbers' own days off keep the grey hatch. */
.workspace .calendar-board.shop-closed-day .calendar-timeline { background-color: #fdf3f3; }
.workspace .calendar-board.shop-closed-day .timetable-slot.blocked {
  background: rgba(220, 70, 70, 0.07);
  background-image: none;
  border-color: transparent;
  color: #a54848;
}
.workspace .calendar-board.shop-closed-day .timetable-slot.blocked span { opacity: 0; }
.workspace .calendar-board.shop-closed-day .staff-column-heading { opacity: .75; }
.workspace .shop-closed-banner {
  /* Lives on the board (full scroll height) so it can stick just under the barber header. */
  position: sticky; top: var(--header-h, 60px); left: 0; height: 0; z-index: 5; pointer-events: none;
  display: flex; justify-content: center;
}
.workspace .shop-closed-banner > span {
  display: flex; align-items: center; gap: 6px; width: max-content; margin-top: 12px; height: max-content;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #f1c9c9; color: #b23b3b;
  font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(178, 59, 59, 0.12);
}
/* Week view: a shop-closed day gets the same soft red, distinct from a barber's day off. */
.workspace .week-col.shop-closed { background: #fdf3f3; }
.workspace .week-col.shop-closed .week-off { color: #b23b3b; font-weight: 600; }
.workspace .week-day-head.closed small { color: #b23b3b; }
html.ws-dark .workspace .calendar-board.shop-closed-day .calendar-timeline,
html.ws-dark .workspace .week-col.shop-closed { background-color: rgba(220, 70, 70, 0.08); }
html.ws-dark .workspace .shop-closed-banner > span { background: #1a1c22; border-color: rgba(220, 70, 70, .35); color: #f08a8a; }
.workspace .shop-closed-empty { display: grid; justify-items: center; gap: 6px; margin: 16px; padding: 28px 16px; border-radius: 14px; background: #fdf3f3; border: 1px solid #f6dede; text-align: center; }
.workspace .shop-closed-empty strong { display: inline-flex; align-items: center; gap: 6px; color: #b23b3b; font-size: 15px; }
.workspace .shop-closed-empty span { color: var(--muted); font-size: 13px; }
html.ws-dark .workspace .shop-closed-empty { background: rgba(220, 70, 70, 0.08); border-color: rgba(220, 70, 70, .25); }

/* Customer booking: a barber's day off reads "Day off" (dashed), never "Closed". */
.booking-app .booking-dates button.dayoff { border-style: dashed; opacity: 1; }
.booking-app .booking-dates button.dayoff > small { color: #a46a00; font-weight: 600; }
.booking-app.mode-dark .booking-dates button.dayoff > small,
.shop-page.mode-dark .booking-app .booking-dates button.dayoff > small { color: #f3c969; }
.booking-app .booking-dates button.dayoff.chosen > small { color: inherit; }
.booking-app .dayoff-card {
  margin: 12px 0; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, #f3c969 14%, var(--sp-surface, #fff));
  border: 1px solid color-mix(in srgb, #c98a00 35%, var(--sp-line, #e2e4ee));
}
.booking-app .dayoff-card strong { display: block; font-size: 15px; margin-bottom: 2px; }
.booking-app .dayoff-card p { margin: 0 0 10px; color: var(--sp-muted, var(--muted)); font-size: 14px; }
.booking-app .dayoff-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* "Anyone": one row per barber with their own times (fair random order). */
.booking-app .anyone-rows { display: grid; gap: 10px; margin-top: 8px; }
.booking-app .anyone-row { border: 1px solid var(--sp-line, var(--line)); background: var(--sp-surface, #fff); border-radius: 16px; padding: 12px; }
.booking-app .anyone-row > header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.booking-app .anyone-row > header strong { font-size: 15px; }
.booking-app .anyone-row > header span { color: var(--sp-muted, var(--muted)); font-size: 13px; }
.booking-app .anyone-row > header b { margin-left: auto; font-size: 14px; }
.booking-app .anyone-row.off { opacity: .8; }
.booking-app .anyone-row.off > header { margin-bottom: 0; }
.booking-app .anyone-row .dayoff-tag { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: #a46a00; border: 1px dashed currentColor; border-radius: 999px; padding: 3px 9px; }
.shop-page.mode-dark .booking-app .anyone-row .dayoff-tag { color: #f3c969; }
.booking-app .anyone-row-empty { margin: 0; color: var(--sp-muted, var(--muted)); font-size: 13px; }
.booking-app .anyone-row .time-slots { margin: 0; }
.booking-app .time-groups[hidden] { display: none !important; }

/* Customer booking: the time they tapped is held for them (5 min, 2 min after leaving). */
.booking-app .hold-pill { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, #3ecf8e 14%, var(--sp-surface, #fff)); border: 1px solid color-mix(in srgb, #3ecf8e 45%, var(--sp-line, #e2e4ee)); color: var(--sp-ink, var(--ink)); }
.booking-app .hold-pill i { width: 8px; height: 8px; border-radius: 50%; background: #2fb47a; animation: hold-pulse 1.6s infinite; flex: 0 0 auto; }
.booking-app .hold-pill span { font-variant-numeric: tabular-nums; }
.booking-app .hold-pill.low { background: color-mix(in srgb, #f3c969 18%, var(--sp-surface, #fff)); border-color: color-mix(in srgb, #c98a00 45%, var(--sp-line, #e2e4ee)); }
.booking-app .hold-pill.low i { background: #c98a00; }
@keyframes hold-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.booking-app .hold-notice { margin: 4px 0 14px; padding: 13px 15px; border-radius: 14px; }
.booking-app .hold-notice strong { display: block; font-size: 15px; margin-bottom: 2px; }
.booking-app .hold-notice p { margin: 0; font-size: 14px; color: var(--sp-muted, var(--muted)); }
.booking-app .hold-notice.gone { background: color-mix(in srgb, #e5484d 10%, var(--sp-surface, #fff)); border: 1px solid color-mix(in srgb, #e5484d 35%, var(--sp-line, #e2e4ee)); }
.booking-app .hold-notice.expired { background: color-mix(in srgb, #f3c969 14%, var(--sp-surface, #fff)); border: 1px solid color-mix(in srgb, #c98a00 35%, var(--sp-line, #e2e4ee)); }
.booking-app .hold-notice-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.booking-app .hold-notice-times button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--sp-line, var(--line)); background: var(--sp-surface, #fff); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }

/* Admin timetable: an online customer is mid-booking this time (held up to 5 min). */
.workspace .calendar-hold {
  position: absolute; left: 4px; right: 4px; z-index: 2; display: grid; align-content: start; gap: 1px;
  padding: 4px 8px; border-radius: 9px; text-align: left; font: inherit; font-size: 12px; cursor: pointer; overflow: hidden;
  color: #035e45; border: 1.5px dashed #00b386;
  background: repeating-linear-gradient(135deg, rgba(0, 232, 176, .10) 0 8px, rgba(0, 232, 176, .22) 8px 16px);
}
.workspace .calendar-hold strong { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.workspace .calendar-hold strong i { width: 7px; height: 7px; border-radius: 50%; background: #00b386; animation: hold-pulse 1.4s infinite; }
.workspace .calendar-hold span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace .calendar-hold .calendar-hold-left { font-variant-numeric: tabular-nums; font-weight: 600; }
.workspace .calendar-hold.low { color: #7a4f06; border-color: #d69a2d; background: repeating-linear-gradient(135deg, rgba(243, 170, 40, .12) 0 8px, rgba(243, 170, 40, .24) 8px 16px); }
.workspace .calendar-hold.low strong i { background: #d69a2d; }
.workspace .calendar-hold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.ws-dark .workspace .calendar-hold { color: #8ff0cf; }
html.ws-dark .workspace .calendar-hold.low { color: #f6dc9b; }
@keyframes hold-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Team bell (v3): Activity / Needs attention tabs, grouped by day, clear with Undo, push at the bottom. */
.notifications-drawer.bell-v3 { display: flex; flex-direction: column; gap: 0; padding-bottom: 0; }
.bell-v3 h2 small { display: block; font-size: var(--fs-12, 12px); font-weight: 500; color: var(--muted); margin-top: 2px; }
.bell-v3 .bell-tabs { display: flex; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bell-v3 .bell-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bell-v3 .bell-tabs button.on { background: var(--ink, #111); border-color: var(--ink, #111); color: #fff; }
.bell-v3 .bell-tabs .n { background: #e5484d; color: #fff; border-radius: 999px; font-size: 10.5px; padding: 1px 6px; }
.bell-v3 .bell-tabs button.on .n { background: #fff; color: var(--ink, #111); }
.bell-v3 .bell-actions { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.bell-v3 .bell-actions .workspace-text-button { font-weight: 600; }
.bell-v3 .bell-actions .workspace-text-button.muted, .bell-v3 .bell-actions .workspace-text-button:disabled { color: var(--muted); }
.bell-v3 .bell-actions .workspace-text-button:disabled { cursor: default; text-decoration: none; }
.bell-v3 .bell-list { flex: 1; overflow: auto; padding: 4px 0 12px; }
.bell-v3 .bell-day { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0; padding: 12px 6px 6px; }
.bell-v3 .bell-note { color: var(--muted); font-size: 12.5px; margin: 10px 6px 4px; }
.bell-v3 .bell-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bell-v3 .bell-item { position: relative; display: flex; gap: 10px; padding: 10px 6px 10px 10px; border-radius: 12px; }
.bell-v3 .bell-item:hover { background: color-mix(in srgb, var(--ink, #111) 4%, transparent); }
.bell-v3 .bell-item.unread { background: color-mix(in srgb, var(--accent, #00b386) 9%, transparent); }
.bell-v3 .bell-item.unread::before { content: ""; position: absolute; left: 2px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #00b386); }
.bell-v3 .bell-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eef1f4; color: #3c4149; }
.bell-v3 .bell-ic.new_booking { background: #ddf8ef; color: #03785a; }
.bell-v3 .bell-ic.cancelled { background: #fde8e8; color: #b42318; }
.bell-v3 .bell-ic.moved { background: #eef3ff; color: #2f54c9; }
.bell-v3 .bell-ic.no_show { background: #fff1e6; color: #b45309; }
.bell-v3 .bell-ic.waitlist { background: #f4efe6; color: #7a5b1e; }
.bell-v3 .bell-ic.review { background: #fdf3d7; color: #8a5a00; }
.bell-v3 .bell-tx { flex: 1; min-width: 0; }
.bell-v3 .bell-tx strong { display: flex; gap: 6px; align-items: baseline; font-size: 13.5px; }
.bell-v3 .bell-tx strong time { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bell-v3 .bell-tx p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2, #4b4f57); }
.bell-v3 .bell-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.bell-v3 .bell-acts button { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface, #fff); color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.bell-v3 .bell-clr { flex: 0 0 auto; align-self: flex-start; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; opacity: .35; }
.bell-v3 .bell-item:hover .bell-clr, .bell-v3 .bell-clr:focus-visible { opacity: 1; }
.bell-v3 .bell-clr:hover { background: color-mix(in srgb, var(--ink, #111) 8%, transparent); }
@media (hover: none) { .bell-v3 .bell-clr { opacity: .8; } }
.bell-v3 .bell-empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 48px 16px; margin: 0; }
.bell-v3 .bell-error { color: #b42318; font-size: 12.5px; margin: 8px 2px 0; }
.bell-v3 .bell-undo { position: sticky; bottom: 8px; align-self: center; display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 10px; background: var(--ink, #111); color: #fff; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 2; }
.bell-v3 .bell-undo button { border: 0; background: none; color: var(--accent, #00e8b0); font: inherit; font-weight: 700; cursor: pointer; padding: 4px; }
.bell-v3 .bell-foot { border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
.bell-v3 .bell-foot .notify-push { padding: 0; }
.bell-v3 .bell-foot:empty { display: none; }
html.ws-dark .bell-v3 .bell-tabs button.on { background: #f3f4f6; border-color: #f3f4f6; color: #111; }
html.ws-dark .bell-v3 .bell-ic { background: rgba(255,255,255,.08); color: #d6d9de; }
html.ws-dark .bell-v3 .bell-tx p { color: #c4c8cf; }
html.ws-dark .bell-v3 .bell-undo { background: #f3f4f6; color: #111; }
html.ws-dark .bell-v3 .bell-undo button { color: #03785a; }

/* ---- Customer booking v3 (4 steps) ---- */
.booking-app .booking-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 18px; }
.booking-app .booking-bars button { display: grid; gap: 6px; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: var(--sp-muted, var(--muted)); cursor: pointer; min-height: 32px; }
.booking-app .booking-bars button:disabled { cursor: default; }
.booking-app .booking-bars i { display: block; height: 4px; border-radius: 999px; background: var(--sp-line, var(--line)); }
.booking-app .booking-bars .done i, .booking-app .booking-bars .on i { background: var(--sp-accent, var(--accent)); }
.booking-app .booking-bars span { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.booking-app .booking-bars .on span { color: var(--sp-ink, var(--ink)); }
.booking-app .step-heading h2 { margin-bottom: 14px; }
.booking-app .step-summary { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--sp-soft, var(--line-2)); font-size: 13.5px; }
.booking-app .step-summary span { flex: 1; min-width: 0; }
.booking-app .step-summary .link { font-weight: 600; white-space: nowrap; }

.booking-app .usual-card { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 0 0 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--sp-accent, var(--accent)) 35%, transparent); background: color-mix(in srgb, var(--sp-accent, var(--accent)) 8%, var(--surface, #fff)); }
.booking-app .usual-card > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.booking-app .usual-card small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--sp-accent-dark, var(--accent-dark)); }
.booking-app .usual-card strong { font-size: 15px; }
.booking-app .usual-card span:not(.usual-avatar) { font-size: 12.5px; color: var(--sp-muted, var(--muted)); }
.booking-app .usual-avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sp-ink, var(--ink)); color: #fff; font-weight: 700; font-size: 13px; }

.booking-app .service-item { border-radius: 16px; }
.booking-app .service-item.chosen { box-shadow: 0 0 0 2px var(--sp-accent, var(--accent)); background: var(--surface, #fff); }
.booking-app .service-item.chosen .service-choice { box-shadow: none; border-color: transparent; }
.booking-app .service-extras { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px 16px; }
.booking-app .service-extras p { width: 100%; margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: var(--sp-muted, var(--muted)); }
.booking-app .extra-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--sp-line, var(--line)); background: var(--surface, #fff); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.booking-app .extra-chip.chosen { background: var(--sp-ink, var(--ink)); border-color: var(--sp-ink, var(--ink)); color: #fff; }

.booking-app .barber-list { display: grid; gap: 8px; }
.booking-app .barber-row-c { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--sp-line, var(--line)); background: var(--surface, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.booking-app .barber-row-c:hover { border-color: color-mix(in srgb, var(--sp-ink, var(--ink)) 30%, transparent); }
.booking-app .barber-row-c.chosen { box-shadow: 0 0 0 2px var(--sp-accent, var(--accent)); border-color: transparent; }
.booking-app .barber-av { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 14px; color: #fff; background: #3b4250; }
.booking-app .barber-av img { width: 100%; height: 100%; object-fit: cover; }
.booking-app .barber-av.any { background: var(--sp-ink, var(--ink)); }
.booking-app .barber-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.booking-app .barber-txt strong { font-size: 15px; }
.booking-app .barber-txt small { font-size: 12.5px; color: var(--sp-muted, var(--muted)); }
.booking-app .barber-txt small b { color: var(--sp-ink, var(--ink)); font-weight: 600; }
.booking-app .barber-txt .off { font-style: normal; font-weight: 700; color: #92400e; }
.booking-app.mode-dark .barber-txt .off,
.shop-page.mode-dark .booking-app .barber-txt .off { color: #f3c969; }

.booking-app .booking-date-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.booking-app .booking-date-toolbar h3 { margin: 0; font-size: 14px; font-weight: 600; text-align: center; flex: 1; }
.booking-app .booking-date-toolbar button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--sp-muted, var(--muted)); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.booking-app .booking-date-toolbar button:disabled { opacity: .35; cursor: default; }
.booking-app .next-label { font-size: 12px; font-weight: 700; color: var(--sp-muted, var(--muted)); margin-right: 4px; }

.booking-app .booking-auth .auth-title { margin: 0; font-size: 17px; }
.booking-app .booking-auth .auth-sub { margin: 2px 0 12px; font-size: 13px; color: var(--sp-muted, var(--muted)); }
.booking-app .review-change-row { display: flex; justify-content: flex-end; margin: 0 0 -4px; }
.booking-app .review-change-row .link { font-size: 13px; font-weight: 600; min-height: 32px; }
@media (max-width: 740px) {
  .booking-app .booking-bars { margin: 8px 0 14px; }
  .booking-app .booking-bars span { font-size: 10.5px; }
  .booking-app .usual-card { flex-wrap: wrap; }
  .booking-app .usual-card .button { width: 100%; }
}
/* Week nav stays on one line at every width (older rules stack it on phones). */
.booking-app.standalone .booking-date-toolbar, .booking-app .booking-date-toolbar { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px; }
.booking-app.standalone .booking-date-toolbar h3, .booking-app .booking-date-toolbar h3 { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Top bar: the signed-in person's own photo, cropped to the round avatar. */
.account-pill .avatar-photo { object-fit: cover; padding: 0; background: var(--line-2); flex: 0 0 auto; }

/* ---- Booking v5: who's coming, sections, most booked, From prices, More (2026-11-06) ---- */
.booking-app .who-switch { border: 1px solid var(--sp-line, var(--line)); border-radius: 16px; padding: 12px; margin-bottom: 14px; background: var(--sp-surface, var(--surface)); }
.booking-app .who-switch .who-label { margin: 0 0 8px; font-size: var(--fs-13); color: var(--sp-muted, var(--muted)); font-weight: 600; }
.booking-app .who-seg { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sp-bg, var(--canvas, #f4f4f2)); }
.booking-app .who-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--sp-ink, var(--ink)); font: 600 15px/1.2 inherit; font-family: inherit; cursor: pointer; }
.booking-app .who-seg button[aria-pressed="true"] { background: var(--sp-ink, var(--ink)); color: var(--sp-bg, #fff); }
.booking-app .who-seg button:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--sp-ink, var(--ink)) 8%, transparent); }
.booking-app .who-seg button:disabled { opacity: .55; cursor: default; }
.booking-app .who-switch > small { display: block; margin-top: 8px; font-size: var(--fs-12); color: var(--sp-muted, var(--muted)); }
.booking-app .service-section { display: grid; gap: inherit; }
.booking-app .service-section + .service-section { margin-top: 10px; }
.booking-app .service-section-title { margin: 6px 2px 2px; font-size: var(--fs-13); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sp-muted, var(--muted)); }
.booking-app .service-copy > span:not(.open) { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.booking-app .service-copy > span.open { display: block; -webkit-line-clamp: unset; }
.booking-app.standalone .service-copy > span.open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.booking-app .service-more { display: block; margin: -6px 0 6px 16px; padding: 4px 6px; border: 0; background: transparent; color: var(--sp-ink, var(--ink)); font: 600 13px inherit; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.booking-app .choice-end > strong { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.booking-app .choice-end > strong .from { font-size: 11px; font-weight: 600; color: var(--sp-muted, var(--muted)); letter-spacing: .02em; }
@media (max-width: 760px) {
  /* Two clear ways on: a full-width "See times · any barber", with "Pick a barber" beside the total. */
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group.two-ways { grid-template-columns: auto minmax(0, 1fr); }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group.two-ways .button:not(.secondary) { grid-column: 1 / -1; order: 2; }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group.two-ways .button.secondary { grid-column: 2; order: 1; min-height: 48px; font-size: 15px; padding: 0 14px; border: 1px solid var(--sp-line, var(--line)); background: transparent; text-decoration: none; justify-content: center; color: var(--sp-ink, var(--ink)); }
  .booking-app.standalone .booking-actions:has(.mobile-checkout-total) .booking-next-group.two-ways::before { grid-column: 1; order: 0; font-size: 20px; }
}
/* Staff booking form: a chosen time that overlaps another appointment (double-booking is allowed). */
.booking-overlap-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--warning-soft, #fff4e5); color: var(--warning-ink, #7a4b00); font-size: var(--fs-13); line-height: 1.4; }
.booking-overlap-note svg { flex: none; }

/* ---- Reschedule: full-screen move flow, same look as booking (2026-11-06) ---- */
.booking-app.move-flow { position: fixed; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: var(--sp-bg, var(--canvas)); color: var(--sp-ink, var(--ink)); }
.booking-app.move-flow .booking-back { border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 600; color: inherit; }
.booking-app.move-flow .move-shop { font-size: var(--fs-14); font-weight: 600; }
.booking-app.move-flow .booking-body { padding-bottom: 120px; }
.booking-app.move-flow .move-bars { grid-template-columns: repeat(2, 1fr); }
.booking-app.move-flow .step-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.booking-app.move-flow .move-now { color: var(--sp-muted, var(--muted)); font-size: var(--fs-13); }
.booking-app.move-flow .time-slots button.current { opacity: .6; border-style: dashed; }
.booking-app.move-flow .time-slots button small { font-size: 11px; margin-left: 4px; color: var(--sp-muted, var(--muted)); }
.booking-app.move-flow .move-was s { color: var(--sp-muted, var(--muted)); font-weight: 600; }
.booking-app.move-flow .move-note { margin: 4px 0 0; font-size: var(--fs-13); color: var(--sp-muted, var(--muted)); }
.booking-app.move-flow .booking-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin: 0; padding: 12px clamp(16px, 4vw, 40px) calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--sp-surface, var(--surface)); border-top: 1px solid var(--sp-line, var(--line)); }
.booking-app.move-flow .booking-actions .button:last-child { width: 100%; justify-content: center; min-height: 52px; }
.booking-app.move-flow .booking-actions .booking-back-btn { min-height: 52px; }
@media (min-width: 761px) { .booking-app.move-flow .booking-actions { left: 50%; right: auto; width: min(760px, 100%); transform: translateX(-50%); border-radius: 16px 16px 0 0; } }

/* Wallet: one card per barber — how it was paid, what their pay setup gives them, who owes whom. */
.wallet-barbers { display: grid; gap: 10px; }
.wallet-barber { border: 1px solid var(--line, #e6e3dc); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface, #fff); }
.wallet-barber header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.wallet-barber header span { font-size: 13px; color: var(--muted, #6b6b6b); }
.wallet-barber dl { margin: 0; display: grid; gap: 4px; }
.wallet-barber dl div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.wallet-barber dt { display: flex; align-items: center; gap: 6px; color: var(--muted, #6b6b6b); }
.wallet-barber dt small { color: var(--muted, #8a8a8a); }
.wallet-barber dd { margin: 0; font-variant-numeric: tabular-nums; }
.wallet-barber-split { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); background: var(--soft, #f6f4ef); border-radius: 8px; padding: 8px 10px; }
.wallet-barber-split div { flex-direction: column; gap: 2px; }
.wallet-barber-split dd { font-weight: 600; font-size: 15px; }
.wallet-barber-calc .strong { font-weight: 600; border-top: 1px solid var(--line, #e6e3dc); padding-top: 4px; }
.wallet-barber-calc .strong dt { color: inherit; }
.wallet-barber-owed { margin: 0; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; background: var(--soft, #f6f4ef); }
.wallet-barber-owed.owed { background: #eaf5ee; color: #1f6b3a; }
.wallet-barber-owed.owes-shop { background: #fdf0e6; color: #8a4a12; }

/* ==========================================================================
   Border clean-up: no grey "box inside a box". Anything sitting inside a
   card/panel drops its outline; groups use a soft tint, lists use thin
   dividers. Interactive inputs, pills and buttons keep their borders.
   ========================================================================== */
/* A card placed inside a panel (e.g. barber editor → Reviews tab) is flat */
.workspace .workspace-panel .workspace-card,
.workspace .studio-detail .workspace-card,
.workspace .workspace-card .workspace-card {
  border: 0; box-shadow: none; padding: 0; background: transparent; border-radius: 0;
}

/* Review rows: divider list, not boxed cards */
.review-admin-list { gap: 0; }
.review-admin {
  border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: transparent; padding: var(--s-3) 0;
}
.review-admin:last-child { border-bottom: 0; }
.review-admin.hidden { background: transparent; opacity: .62; }

/* Grouped blocks inside cards: soft tint instead of an outline */
.pay-section,
.pay-settlement-col,
.holiday-tracker,
.sender-field,
.review-ask,
.wallet-barber,
.workspace .workspace-panel .panel-card,
.workspace .workspace-card .panel-card,
.workspace .account-member {
  border: 0; box-shadow: none; background: var(--soft);
}
.pay-section-head:hover { background: var(--soft-2); }

/* Channel cards: tint; the active one gets a slim accent edge, no box */
.chan-card { border: 0; background: var(--soft); box-shadow: none; }
.chan-card.on { border: 0; box-shadow: inset 3px 0 0 #006b4d; }

/* Rows/lists: plain dividers */
.switch-row,
.workspace-switch-row,
.workspace .switch-row,
.workspace .workspace-switch-row,
.workspace .workspace-check,
.workspace .workspace-checks label {
  border: 0; border-radius: 0; border-bottom: 1px solid var(--line-2);
  background: transparent; padding-left: 0; padding-right: 0;
}
.switch-row:last-child,
.workspace-switch-row:last-child,
.workspace .switch-row:last-child,
.workspace .workspace-switch-row:last-child,
.workspace .workspace-check:last-child,
.workspace .workspace-checks label:last-child { border-bottom: 0; }
.workspace .workspace-checks { gap: 0 !important; }
.workspace .review-ask .workspace-switch-row { border-bottom-color: var(--line); }

/* "I understand texts cost…" acknowledgement: tint, no dashed outline */
.sms-bill-ack { border: 0; background: var(--canvas); }
.sms-bill-ack.on { border: 0; background: #eef5f1; box-shadow: inset 3px 0 0 #006b4d; }

.hub-week,
.hub-coming,
.pay-statement { border: 0; border-radius: 0; background: transparent; }
.hub-week li,
.hub-coming li { padding-left: 0; padding-right: 0; border-bottom-color: var(--line-2); }
.hub-week li.off { background: transparent; }
.pay-statement-group { padding-left: 0; padding-right: 0; }
.pay-statement-group:last-child { border-bottom: 0; }

.hub-cat { border: 0; border-radius: 0; overflow: visible; }
.hub-cat-head { background: transparent; padding-left: 0; padding-right: 0; }

.history-row { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding-left: 0; padding-right: 0; margin-bottom: 0; }

/* Save bar: keep it floating (shadow) but drop the outline */
.hub-savebar { border: 0; background: var(--soft); }
.hub-savebar[data-visible="true"] { border: 0; box-shadow: inset 3px 0 0 var(--accent); }
.hub-savebar.sticky { background: var(--surface); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); }
.payments-barber-list { gap: 0; }
.payments-barber-list li { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; }
.payments-barber-list li:last-child { border-bottom: 0; }
.workspace-toggle { border: 0; background: var(--soft); }

/* ==========================================================================
   Reviews (drawer + barber tab): no outline, text never touches an edge,
   clear name / meta / comment / actions rhythm
   ========================================================================== */
.workspace .reviews-drawer .workspace-card,
.workspace .reviews-panel.workspace-card {
  border: 0; box-shadow: none; background: transparent; border-radius: 0; padding: 0; margin: 0;
}
.reviews-panel { display: grid; gap: var(--s-3); min-width: 0; }
.reviews-panel > .workspace-card-head { display: grid; gap: var(--s-3); margin: 0; padding: 0; border: 0; }
.reviews-panel > .workspace-card-head h2 { margin: 0 0 4px; }
.reviews-panel > .workspace-card-head p { margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.5; max-width: 60ch; }
.reviews-panel > .workspace-card-head p strong { color: var(--ink); }

/* Barber summary chips: pills that wrap, never clipped */
.reviews-panel .review-people { flex-wrap: wrap; margin: 0; gap: 6px; }
.reviews-panel .review-people button { flex: 0 0 auto; min-height: 40px; padding: 6px 12px; border-radius: 999px; gap: 6px; white-space: nowrap; }
.reviews-panel .review-people button b { font-size: 15px; }

/* Rows */
.reviews-panel .review-admin-list { border-top: 1px solid var(--line-2); }
.reviews-panel .review-admin { padding: var(--s-4) 0; gap: 6px; min-width: 0; }
.reviews-panel .review-admin header { display: grid; gap: 2px; color: inherit; font-size: inherit; }
.review-admin-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.review-admin-who strong { font-size: var(--fs-15, 15px); color: var(--ink); }
.review-admin-meta { font-size: var(--fs-13); color: var(--muted); overflow-wrap: anywhere; }
.reviews-panel .review-admin-body { margin: 2px 0 0; font-size: var(--fs-15, 15px); line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.reviews-panel .review-admin-body.muted { color: var(--muted); font-size: var(--fs-14); }
.reviews-panel .review-reply { margin: 4px 0 0; padding: 8px 12px; border-left: 0; border-radius: 10px; background: var(--soft); font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.reviews-panel .review-reply strong { font-size: var(--fs-11, 11px); }

/* Actions: compact text buttons lined up with the text above */
.reviews-panel .review-admin-actions { gap: 4px 16px; margin-top: 2px; }
.workspace .reviews-panel .review-admin-actions .button,
.reviews-panel .review-admin-actions .button { min-height: 36px; height: 36px; padding: 0 8px; margin-left: -8px; font-size: var(--fs-13); font-weight: 600; color: var(--accent-dark); background: transparent; border: 0; }
.reviews-panel .review-admin-actions .button + .button { margin-left: 0; }
.reviews-panel .review-admin-actions .button:hover { background: var(--soft); }
.reviews-panel .review-admin.hidden { opacity: 1; }
.reviews-panel .review-admin.hidden .review-admin-who strong,
.reviews-panel .review-admin.hidden .review-admin-body,
.reviews-panel .review-admin.hidden .stars { opacity: .55; }
.reviews-panel .review-reply-form textarea { width: 100%; box-sizing: border-box; }

/* ==========================================================================
   Smooth phone scrolling
   - Zoom lock in CSS (pan only), so no JavaScript touch listener sits on the page.
   - Scroll areas keep the phone's own momentum and never drag the page behind them
     (overscroll contained): drawers, sheets, dialogs and sideways chip rows.
   - Sticky / fixed bars are solid on phones: a live blur behind a bar is repainted on
     every scrolled frame and is the main cause of judder on mid-range phones.
   ========================================================================== */
html, body { touch-action: pan-x pan-y; }
@media (pointer: coarse) {
  /* Vertical scrollers: own momentum, never chain to the page behind. */
  .drawer-right, .history-drawer, .reviews-drawer, .appointment-panel .panel-body, .modal, .sidebar.rail,
  .booking-app.move-flow, .notifications-drawer {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  /* Sideways rows (tabs, day strips, filter chips): a sideways swipe stays in the row and never
     triggers browser back/forward or drags the page. */
  .studio .segmented[aria-label="Barber sections"], .settings-nav, .workspace .customers-filters,
  .calendar-summary-stats, .modal .booking-day-strip, .ca-days, .group-days, .series-strip,
  .booking-app.standalone .filter-chips, .booking-app.standalone .next-chips, .booking-app.standalone .booking-dates,
  .shop-page .sp-gallery-section.v-strip .sp-gallery, .shop-page .sp-reviews.v-carousel .sp-review-list,
  .reviews-panel .review-people, .pay-runs-table-wrap, .shifts-week-wrap, .workspace .topbar .topbar-actions {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  /* Timetable: native momentum inside the board, nothing leaks to the page. */
  .workspace .connected-calendar > .connected-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior: none; }
}
@media (max-width: 900px), (pointer: coarse) {
  /* Solid bars instead of frosted glass while scrolling. */
  .workspace .topbar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .barber-bottom-nav { background: var(--surface, #fff); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .shop-page .shop-tabbar { background: var(--sp-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .shop-page .sp-nav, .shop-page .booking-topbar { background: var(--sp-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .booking-actions { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .modal:has(.booking-workflow) .modal-header, .modal:has(.booking-workflow) .workspace-save-actions { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ==========================================================================
   Inputs with a £ / min / % label inside: ONE box. The global `.workspace input` border was
   drawn again inside the wrapper (box in a box). The wrapper is the field; the input is bare.
   ========================================================================== */
.matrix-input, .checkout-money-input, .slug-input, .setup-slug-input {
  display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box;
  min-height: var(--ctl-h, 40px); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--ctl-r, 10px);
  background: var(--surface); color: var(--muted); font-size: var(--fs-14);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.slug-input, .setup-slug-input { display: flex; padding-right: 0; }
.workspace .matrix-input input, .workspace .checkout-money-input input, .workspace .slug-input input, .workspace .setup-slug-input input,
.matrix-input input, .checkout-money-input input, .slug-input input, .setup-slug-input input {
  border: 0 !important; box-shadow: none !important; background: transparent !important; outline: none;
  min-height: calc(var(--ctl-h, 40px) - 2px); height: auto; padding: 0 !important; margin: 0;
  flex: 1 1 auto; min-width: 0; width: 64px; font: inherit; font-size: var(--fs-14); color: var(--ink);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.matrix-input input::-webkit-inner-spin-button, .matrix-input input::-webkit-outer-spin-button,
.checkout-money-input input::-webkit-inner-spin-button, .checkout-money-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.checkout-money-input input { text-align: right; }
.matrix-input:hover, .checkout-money-input:hover { border-color: #cdd1d8; }
.matrix-input:focus-within, .checkout-money-input:focus-within, .slug-input:focus-within, .setup-slug-input:focus-within {
  outline: 0; border-color: var(--accent); box-shadow: var(--ring, 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent));
}
.matrix-input:has(input:disabled) { background: var(--soft); }
.matrix-input > span, .checkout-money-input > span { flex: none; color: var(--muted); font-size: var(--fs-13); }
html.ws-dark .matrix-input, html.ws-dark .checkout-money-input, html.ws-dark .slug-input, html.ws-dark .setup-slug-input { background: #10131a; border-color: var(--line); }
html.ws-dark .workspace .matrix-input input, html.ws-dark .workspace .checkout-money-input input { background: transparent !important; }
/* Plain small fields (add-on price, length stepper) match the control height. */
.workspace .items-addon-price input, .workspace .items-stepper input { min-height: 36px; }

/* Checkout: card reader (Revolut) tip question */
.checkout-reader-tip { border: 1px solid var(--line, #e3e3e3); border-radius: 12px; padding: 10px 12px 12px; margin: 10px 0; display: grid; gap: 8px; }
.checkout-reader-tip legend { font-weight: 600; padding: 0 4px; }
.checkout-reader-tip small { color: var(--muted); font-size: var(--fs-11, 11px); }
.checkout-reader-tip-amount { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.checkout-reader-tip-amount > span:first-child { font-size: var(--fs-13, 13px); }

/* Pay runs: To settle list */
.pay-to-settle { margin: 12px 0; }
.pay-to-settle h3 small { font-weight: 400; }
.pay-settle-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pay-settle-acts { white-space: nowrap; }

/* Phone: the shop logo + name moves from the top bar into the slide-out menu header, so the
   top bar has room for the wallet (amount + caption). Desktop keeps the brand in the top bar. */
@media (min-width: 768px) {
  .workspace .sidebar.rail .sidebar-shop { display: none; }
}
@media (max-width: 767px) {
  .workspace .sidebar.rail .sidebar-shop, .workspace .sidebar.rail.collapsed .sidebar-shop { display: flex; flex: 1; }
  .workspace .sidebar.rail .sidebar-shop .brand-mark { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; object-fit: contain; }
  .workspace .sidebar.rail .sidebar-shop .brand-shop-initial { display: grid; place-items: center; font-weight: 800; }
  .workspace .topbar .brand, .topbar .brand { display: none !important; }
  .workspace .topbar .wallet-chip { flex: 0 1 auto; min-width: 0; max-width: 60vw; padding-left: 8px; padding-right: 10px; }
  .workspace .topbar .wallet-chip > span:not(.chip-ic) { min-width: 0; overflow: hidden; }
  .workspace .topbar .wallet-chip b { font-size: var(--fs-15, 15px); white-space: nowrap; }
  .workspace .topbar .wallet-chip small { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  .workspace .topbar .wallet-chip small { display: none !important; }
}
.account-pill .avatar-logo-alt { display: none; }
@media (max-width: 767px) {
  .workspace .topbar .account-pill .avatar-logo { display: none; }
  .workspace .topbar .account-pill .avatar-logo-alt { display: grid; }
  /* The wallet amount is never cut; only its caption shortens. */
  .workspace .topbar .wallet-chip { flex: 0 0 auto; max-width: none; }
  .workspace .topbar .wallet-chip > span:not(.chip-ic) { overflow: visible; }
  .workspace .topbar .wallet-chip small { max-width: 76px; }
  .workspace .topbar .queue-chip, .workspace .topbar .reviews-chip { flex: 0 1 auto; min-width: 0; padding-left: 6px; padding-right: 8px; }
}
@media (max-width: 767px) {
  .workspace .topbar .queue-chip, .workspace .topbar .reviews-chip { flex: 0 0 auto; }
  .workspace .topbar .queue-chip .chip-ic, .workspace .topbar .wallet-chip .chip-ic { flex: 0 0 auto; }
  .workspace .topbar .wallet-chip small { max-width: 64px; }
}
@media (max-width: 767px) {
  .workspace .topbar { gap: 4px; padding-left: 4px; padding-right: 8px; }
  .workspace .topbar .wallet-chip { gap: 6px; padding-left: 6px; padding-right: 8px; }
  .workspace .topbar .wallet-chip small { max-width: 58px; }
  .workspace .topbar .account-pill { padding: 2px; flex: 0 0 auto; }
  .workspace .topbar .account-pill .lucide-chevron-down { display: none; }
}

/* ---------- Wallet v2: quick view (day picker + calendar) and full wallet ---------- */
.wq-barbers { display: grid; gap: 6px; }
.wq-barber { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.wq-barber:hover { background: var(--canvas); }
.wq-barber b { display: block; font-size: var(--fs-14); }
.wq-barber small { color: var(--muted); font-size: var(--fs-11); }
.wq-owed { font-weight: 700; font-size: var(--fs-15); white-space: nowrap; }
.wq-owed.neg, .wallet-open-amount.neg, .wbl-owed.neg, .wq-dayowed .neg, .ww-paid.neg b, .wallet-calc .neg dd, .wallet-days .neg { color: var(--warn); }
.wq-day { display: grid; gap: 8px; }
.wq-daybar { display: flex; align-items: center; gap: 6px; }
.wq-daylabel { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl-h-sm, 34px); border: 1px solid var(--line); border-radius: var(--ctl-r, 10px); background: var(--surface); font: inherit; font-weight: 600; font-size: var(--fs-14); color: var(--ink); cursor: pointer; }
.wq-daylabel[aria-expanded="true"] { border-color: var(--accent); }
.wq-daytotals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wq-daytotals > div { background: var(--canvas); border-radius: 10px; padding: 8px; display: grid; gap: 2px; }
.wq-daytotals small { color: var(--muted); font-size: var(--fs-11); }
.wq-daytotals b { font-size: var(--fs-14); }
.wq-daytotals .owed { background: var(--accent-fill, var(--soft)); }
.wq-daycard { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.wq-daycard header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-13); }
.wq-dayline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; }
.wq-dayline div { display: grid; }
.wq-dayline dt { color: var(--muted); font-size: var(--fs-11); }
.wq-dayline dd { margin: 0; font-weight: 600; font-size: var(--fs-13); }
.wq-dayowed { display: flex; gap: 10px; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; margin: 0; font-size: var(--fs-12); color: var(--muted); }
.wq-dayowed b { color: var(--ink); font-size: var(--fs-14); }
.wq-daycard details summary, .wallet-more summary { cursor: pointer; font-size: var(--fs-12); color: var(--accent-dark); font-weight: 600; }
.wq-cal { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; display: grid; gap: 6px; }
.wq-calhead { display: flex; align-items: center; justify-content: space-between; }
.wq-calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wq-dow { text-align: center; font-size: var(--fs-11); color: var(--muted); padding: 2px 0; }
.wq-calgrid button { display: grid; align-content: start; justify-items: center; gap: 1px; min-height: 52px; padding: 4px 2px; border: 1px solid transparent; border-radius: 8px; background: var(--canvas); font: inherit; color: var(--ink); cursor: pointer; }
.wq-calgrid button span { font-size: var(--fs-12); font-weight: 600; }
.wq-calgrid button small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.wq-calgrid button em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--good); line-height: 1.2; }
.wq-calgrid button.today { border-color: var(--line-2, var(--line)); }
.wq-calgrid button[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); box-shadow: var(--shadow-1); }
.wq-calgrid button:disabled { opacity: .4; cursor: default; }
.wq-cal .drawer-note em { font-style: normal; color: var(--good); font-weight: 700; }
.drawer-note.left { text-align: left; }

.wallet-page { display: grid; gap: var(--s-4); }
.wallet-page-head { display: flex; justify-content: space-between; gap: var(--s-4); align-items: flex-end; flex-wrap: wrap; }
.wallet-page-head h2 { margin: 0; }
.wallet-page-head p { margin: 4px 0 0; max-width: 60ch; font-size: var(--fs-13); }
.wallet-page-total { display: grid; justify-items: end; gap: 2px; }
.wallet-page-total small { color: var(--muted); font-size: var(--fs-12); }
.wallet-page-total b { font-size: 28px; }
.wallet-page-total span { color: var(--muted); font-size: var(--fs-12); }
.wallet-page-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--s-4); align-items: start; }
.wallet-barber-list { display: grid; gap: 6px; position: sticky; top: 8px; }
.wallet-barber-list button { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.wallet-barber-list button[aria-pressed="true"] { border-color: var(--accent); box-shadow: var(--shadow-1); }
.wallet-barber-list b { display: block; font-size: var(--fs-14); }
.wallet-barber-list small { color: var(--muted); font-size: var(--fs-11); }
.wbl-owed { font-weight: 700; white-space: nowrap; }
.wallet-page-detail { display: grid; gap: var(--s-4); min-width: 0; }
.wallet-open, .wallet-history { border: 1px solid var(--line); border-radius: var(--r-xl, 16px); background: var(--surface); padding: var(--s-4); display: grid; gap: var(--s-3); min-width: 0; }
.wallet-open-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-3); }
.wallet-open-head small { color: var(--muted); font-size: var(--fs-12); display: block; }
.wallet-open-head strong { font-size: var(--fs-15); }
.wallet-open-amount { font-size: 30px; }
.wallet-owed-line { margin: 0; font-weight: 600; }
.wallet-owed-line.owed { color: var(--good); }
.wallet-owed-line.owes-shop { color: var(--warn); }
.wallet-last-paid, .wallet-note { margin: 0; font-size: var(--fs-12); color: var(--muted); }
.wallet-note { display: flex; gap: 6px; align-items: flex-start; background: var(--canvas); padding: 8px 10px; border-radius: 10px; }
.wallet-split, .wallet-calc { margin: 0; display: grid; gap: 4px; }
.wallet-split div, .wallet-calc div { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-13); }
.wallet-split dt, .wallet-calc dt { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2, var(--ink)); }
.wallet-split dd, .wallet-calc dd { margin: 0; font-variant-numeric: tabular-nums; }
.wallet-split .total { font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.wallet-split .kept dt, .wallet-split .kept dd, .wallet-split .muted-row { color: var(--muted); }
.wallet-split small, .wallet-calc small { color: var(--muted); font-size: var(--fs-11); font-weight: 400; }
.wallet-calc { background: var(--canvas); border-radius: 10px; padding: 10px 12px; }
.wallet-calc .strong { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-size: var(--fs-14); }
.wallet-settle { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: var(--s-3); }
.wallet-settle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wallet-settle-row label { display: grid; gap: 3px; font-size: var(--fs-12); color: var(--muted); }
.wallet-settle-row label.grow { flex: 1; min-width: 160px; }
.wallet-settle-row input, .wallet-settle-row select { min-height: var(--ctl-h-sm, 34px); border: 1px solid var(--line); border-radius: var(--ctl-r, 10px); padding: 0 10px; font: inherit; color: var(--ink); background: var(--surface); }
.wallet-confirm { background: var(--canvas); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.wallet-confirm p { margin: 0; font-size: var(--fs-13); }
.wallet-confirm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.wallet-table-wrap { overflow-x: auto; }
.wallet-days { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.wallet-days th { text-align: left; color: var(--muted); font-weight: 500; font-size: var(--fs-11); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.wallet-days td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wallet-days td small { display: block; color: var(--muted); font-size: var(--fs-11); }
.wallet-days .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet-days .strong { font-weight: 700; }
.wallet-payments { list-style: none; margin: 0; padding: 0; display: grid; }
.wallet-payments li > button, .wallet-payments li > div { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; width: 100%; padding: 7px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; text-align: left; color: var(--ink); }
.wallet-payments li > button { cursor: pointer; }
.wallet-payments li > button:hover { background: var(--canvas); }
.wp-when { font-size: var(--fs-12); color: var(--muted); white-space: nowrap; }
.wp-who b { display: block; font-size: var(--fs-13); }
.wp-who small { color: var(--muted); font-size: var(--fs-11); }
.wp-method { font-size: var(--fs-11); padding: 2px 8px; border-radius: 999px; background: var(--accent-fill, var(--soft)); white-space: nowrap; }
.wp-method.kept { background: var(--canvas); color: var(--muted); }
.wp-amount { font-weight: 700; font-size: var(--fs-13); text-align: right; white-space: nowrap; }
.wp-amount small { display: block; font-weight: 600; color: var(--good); font-size: var(--fs-11); }
.wallet-history h3 { margin: 0; font-size: var(--fs-15); }
.wallet-window { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; overflow: hidden; }
.wallet-window[open] { padding-bottom: 10px; }
.wallet-window > *:not(summary) { margin: 0 12px; }
.wallet-window > * + *:not(summary) { margin-top: 8px; }
.wallet-window summary { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.wallet-window summary::-webkit-details-marker { display: none; }
.wallet-window[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ww-range b { display: block; font-size: var(--fs-14); }
.ww-range small, .ww-taken small, .ww-paid small { color: var(--muted); font-size: var(--fs-11); display: block; }
.ww-taken, .ww-paid { text-align: right; font-size: var(--fs-13); }
.ww-paid b { font-size: var(--fs-15); }
.checkout-nothing { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; background: var(--good-bg); color: var(--good); border-radius: 10px; font-size: var(--fs-13); font-weight: 600; }
@media (max-width: 900px) {
  .wallet-page-grid { grid-template-columns: 1fr; }
  .wallet-barber-list { position: static; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 520px) {
  .wq-daytotals { grid-template-columns: repeat(2, 1fr); }
  .wallet-page-total { justify-items: start; }
  .wallet-payments li > button, .wallet-payments li > div { grid-template-columns: 1fr auto; }
  .wp-when, .wp-method { grid-column: 1; }
  .wallet-window summary { grid-template-columns: 1fr auto; }
  .ww-taken { display: none; }
}
/* Full wallet: opened from the quick view only, covers the app, Back returns to the quick view. */
.wallet-fullscreen { position: fixed; inset: 0; z-index: 60; background: var(--canvas); display: flex; flex-direction: column; }
.wallet-fullscreen-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px var(--s-4); padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.wallet-fullscreen-bar strong { font-size: var(--fs-15); }
.wallet-fullscreen-body { flex: 1; overflow-y: auto; padding: var(--s-4); padding-bottom: max(var(--s-4), env(safe-area-inset-bottom)); }
.wallet-fullscreen-body .wallet-page { max-width: 1200px; margin: 0 auto; }
/* Wallet quick view: expand icon in the header on desktop; phones use the "More detail" button. */
.wallet-drawer > h2 [data-testid="wallet-expand"] { margin-left: auto; }
@media (max-width: 767px) { .wallet-drawer > h2 [data-testid="wallet-expand"] { display: none; } }
.wallet-day-section h3 { margin: 0; font-size: var(--fs-15); }

/* Out-of-hours slots: orange glow online, orange wash on the timetable. */
.time-slots button.ooh { background: #fff4e5; border-color: #f59e0b; color: #9a3412; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 0 14px rgba(245, 158, 11, 0.45); }
.time-slots button.ooh > small { color: #b45309; font-weight: 600; }
.time-slots button.ooh.chosen { background: #f59e0b; border-color: #d97706; color: #fff; }
.time-slots button.ooh.chosen > small { color: #fff; }
.ooh-notice { margin: 12px 0; padding: 12px 14px; border-radius: var(--r, 10px); background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; }
.ooh-notice strong { display: flex; align-items: center; gap: 6px; }
.ooh-notice p { margin: 4px 0 0; font-size: 14px; }
.workspace .timetable-slot.ooh { background: #fff1dc; box-shadow: inset 3px 0 0 #f59e0b; }
.workspace .timetable-slot.ooh span { color: #b45309; }
.workspace .timetable-slot.ooh:hover { background: #ffe4bf; }
.workspace .staff-hours-chip.ooh-chip { border-color: #fdba74; color: #b45309; }
.workspace .staff-hours-chip.ooh-chip.on { background: #fff1dc; border-color: #f59e0b; }

/* Install pop-up: shop app to the home screen. Wears the shop's website theme (--sp-* tokens from
   themeClass/brandStyle): surface, ink, accent button, display font for the heading, corner style. */
.install-pop-backdrop, .install-pop-backdrop.shop-page { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); min-height: 0; padding: 0; }
.install-pop { width: 100%; max-width: 440px; background: var(--sp-surface, #ffffff); color: var(--sp-ink, #111318); font-family: var(--sp-text, inherit); border: 1px solid var(--sp-line, transparent); border-bottom: 0; border-radius: var(--sp-r-lg, 20px) var(--sp-r-lg, 20px) 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3); text-align: center; }
.install-pop-icon { width: 64px; height: 64px; border-radius: var(--sp-r, 16px); box-shadow: var(--sp-shadow-2, 0 2px 10px rgba(0, 0, 0, 0.18)); }
.install-pop h2 { margin: 12px 0 6px; font-size: 22px; line-height: 1.2; color: var(--sp-ink, #111318); }
.install-pop p { margin: 0 0 16px; font-size: 15px; line-height: 1.45; color: var(--sp-muted, #4a4d57); }
.install-pop-steps { text-align: left; margin: 0 auto 16px; padding-left: 22px; max-width: 320px; font-size: 15px; line-height: 1.7; color: var(--sp-ink, #111318); }
.install-pop-steps strong { color: var(--sp-ink, #111318); }
.install-pop-steps svg { vertical-align: -2px; color: var(--sp-accent, currentColor); }
.install-pop-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.install-pop-actions .button { min-width: 220px; min-height: 48px; justify-content: center; font-family: var(--sp-text, inherit); }
.install-pop-backdrop .install-pop-actions .button.primary { background: var(--sp-accent); border-color: var(--sp-accent); color: var(--sp-accent-ink); border-radius: var(--sp-r, 12px); }
.install-pop-backdrop .install-pop-actions .button.primary:hover { background: var(--sp-accent-dark); border-color: var(--sp-accent-dark); }
.install-pop-backdrop button.install-pop-later { background: none; border: 0; box-shadow: none; padding: 8px 12px; min-height: 0; font: inherit; font-size: 15px; color: var(--sp-muted, #4a4d57); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.install-pop-backdrop button.install-pop-later:hover { color: var(--sp-ink, #111318); background: none; }
@media (min-width: 768px) {
  .install-pop-backdrop, .install-pop-backdrop.shop-page { align-items: center; padding: 20px; }
  .install-pop { border-radius: var(--sp-r-lg, 20px); border-bottom: 1px solid var(--sp-line, transparent); padding-bottom: 24px; }
}

/* ---------- Insights layout ---------- */
/* One full-width column: stat cards in a single row, then two-up chart panels. */
.workspace .workspace-settings.insights { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.workspace .insights .workspace-panel { margin: 0; }
.workspace .insights .insight-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.workspace .insights .insight-cards .stat-card { padding: 16px; min-width: 0; }
.workspace .insights .insight-cards .stat-label { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; white-space: nowrap; font-size: 12px; }
.workspace .insights .insight-cards .stat-value { font-size: 28px; line-height: 1.15; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.workspace .insights .insight-cards .stat-foot { min-height: 0; font-size: 12px; line-height: 1.45; }
.workspace .insights .workspace-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.workspace .insights .workspace-section-heading .workspace-footnote { margin: 4px 0 0; max-width: 62ch; }
.workspace .insights h3 small { font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; color: var(--muted); }
.workspace .insights .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
/* Long labels (service names) get room and wrap instead of being cut to "Signatu…". */
.workspace .insights .insight-bars li { grid-template-columns: 56px minmax(0, 1fr) auto; font-size: 13px; }
.workspace .insights .insight-bars.wide li { grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) auto; }
.workspace .insights .insight-bars.wide .insight-bar-label { white-space: normal; overflow: visible; line-height: 1.3; color: var(--ink); }
.workspace .insights .insight-bar-value { white-space: nowrap; }
.workspace .insights .insight-trend { height: 140px; }
.workspace .insights .insight-trend-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 1280px) {
  .workspace .insights .insight-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .workspace .insights .insight-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .workspace .insights .insight-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .workspace .insights .insight-cards .stat-card { padding: 14px; }
  .workspace .insights .insight-cards .stat-value { font-size: 24px; }
  /* Service name on its own line above the bar so it's never cut short. */
  .workspace .insights .insight-bars.wide li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "bar bar"; row-gap: 4px; }
  .workspace .insights .insight-bars.wide .insight-bar-label { grid-area: label; }
  .workspace .insights .insight-bars.wide .insight-bar-track { grid-area: bar; }
  .workspace .insights .insight-bars.wide .insight-bar-value { grid-area: value; }
  .workspace .insights .insight-trend { height: 110px; }
}

/* Phone timetable: swipes scroll in any direction (also sideways across barbers) even when they
   start on an appointment; moving or stretching one needs a still hold first (see Calendar.tsx). */
@media (pointer: coarse) {
  .workspace .calendar-event[data-draggable="true"] { touch-action: pan-x pan-y; }
  .workspace .calendar-event .resize-handle { touch-action: pan-x pan-y; height: 12px; }
  .workspace .calendar-event[data-resizing="true"] .resize-handle { touch-action: none; }
  .workspace .calendar-event { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

/* Review request pop-up from the customer's barber (shares the install pop-up shell) */
.review-pop-from { display: flex; justify-content: center; }
.review-pop-from .avatar { width: 72px; height: 72px; font-size: 24px; box-shadow: var(--sp-shadow-2, 0 2px 10px rgba(0, 0, 0, 0.18)); }
.install-pop p.review-pop-msg { text-align: left; background: var(--sp-surface-2, rgba(127, 127, 127, 0.08)); border-radius: var(--sp-r, 14px); padding: 12px 14px; color: var(--sp-ink, #111318); }
.review-pop-sign { display: block; margin-top: 6px; font-size: 14px; color: var(--sp-muted, #4a4d57); font-style: italic; }
.review-pop-stars { justify-content: center; }
.install-pop-backdrop .review-pop-stars button { color: var(--sp-line, #c9ccd3); }
.install-pop-backdrop .review-pop-stars button.on { color: var(--sp-accent, #c8a24a); }
.install-pop-backdrop .review-pop-stars button.on svg { fill: var(--sp-accent, #c8a24a); }
.review-pop-label { min-height: 20px; margin: 2px 0 10px; font-size: 14px; color: var(--sp-muted, #4a4d57); }
.review-pop-text { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--sp-ink, #111318); background: var(--sp-bg, transparent); border: 1px solid var(--sp-line, #d5d7dd); border-radius: var(--sp-r, 12px); resize: vertical; }
.install-pop p.review-pop-error { color: #c0392b; margin-bottom: 10px; }
.install-pop-backdrop .install-pop-actions a.button.primary { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

/* Barber settings: grouped cards, cleaner tabs, review message editor */
.studio-detail .segmented { display: flex; overflow-x: auto; scrollbar-width: none; max-width: 100%; height: auto; min-height: var(--ctl-h, 38px); margin: 4px 0 6px; }
.studio-detail .segmented::-webkit-scrollbar { display: none; }
.studio-detail .segmented button { flex: 0 0 auto; white-space: nowrap; padding: 0 14px; }
.studio-detail-head.barber { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); }
.studio-detail-head.barber .team-photo.large, .studio-detail-head.barber .avatar.large { width: 64px; height: 64px; }
.barber-settings { gap: 16px; }
.settings-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); min-width: 0; }
.settings-card-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.settings-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.settings-card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.settings-card-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--soft-2, #f1f2f5); color: var(--accent); }
.settings-card .workspace-form-grid { gap: 12px 14px; align-items: start; }
.settings-card .workspace-field > span { display: flex; align-items: center; gap: 6px; }
.field-tag { font-style: normal; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 999px; background: var(--soft-2, #f1f2f5); color: var(--muted); }
.field-count { justify-self: end; }
.barber-photo-row { display: flex; gap: 16px; align-items: flex-start; }
.barber-photo-row > .team-photo, .barber-photo-row > .avatar { width: 72px; height: 72px; flex: 0 0 auto; font-size: 22px; }
.barber-photo-row > .workspace-field { flex: 1 1 auto; min-width: 0; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; max-width: 160px; }
.money-input b { padding: 0 4px 0 11px; color: var(--muted); font-weight: 600; }
.workspace-field .money-input input { border: 0; border-radius: 0; padding-left: 2px; }
.money-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.settings-card .studio-switches { gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.settings-card .studio-switches .switch-row { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.settings-card .studio-switches .switch-row:last-child { border-bottom: 0; }
.studio-detail .panel-actions-row { position: sticky; bottom: 0; z-index: 3; padding: 12px 0; background: linear-gradient(to top, var(--bg, #f6f7f9) 70%, transparent); }
.studio-form[data-dirty="true"] .panel-actions-row .button.primary { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
.review-msg-editor { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.review-msg-input { display: grid; gap: 10px; min-width: 0; }
.review-msg-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.review-msg-tags small { color: var(--muted); font-size: 12px; margin-right: 2px; }
.chip-button { border: 1px solid var(--line); background: var(--soft-2, #f4f5f7); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.chip-button:hover { border-color: var(--accent); color: var(--accent); }
.review-msg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-msg-foot .linklike { font-size: 12.5px; }
.review-msg-preview { margin: 0; display: grid; gap: 6px; }
.review-msg-preview figcaption { font-size: 12px; font-weight: 600; color: var(--muted); }
.review-msg-phone { display: grid; justify-items: center; gap: 8px; padding: 18px 16px; border-radius: 18px; background: #17181e; color: #f4f4f6; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.review-msg-phone .team-photo, .review-msg-phone .avatar { width: 52px; height: 52px; border: 2px solid var(--accent, #c8a24a); box-shadow: none; }
.review-msg-phone strong { font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; }
.review-msg-phone p { margin: 0; text-align: left; font-size: 13px; line-height: 1.45; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 10px 12px; color: #f4f4f6; word-break: break-word; }
.review-msg-phone p span { display: block; margin-top: 4px; font-size: 12px; font-style: italic; color: #b9bbc4; }
.review-msg-stars { display: flex; gap: 4px; color: #5d6070; }
@media (max-width: 760px) {
  .review-msg-editor { grid-template-columns: 1fr; }
  .settings-card { padding: 14px; border-radius: 14px; }
  .barber-photo-row > .team-photo, .barber-photo-row > .avatar { width: 56px; height: 56px; }
  .studio-detail .panel-actions-row .button { width: 100%; justify-content: center; }
}

/* ===== Messages as pop-ups: errors and "Saved" confirmations sit in the bottom-right corner =====
   toaster.ts tags every .workspace-error / .workspace-success with data-toast and a stack offset. */
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
[data-toast] {
  position: fixed !important; right: 20px; bottom: calc(20px + var(--toast-stack, 0px)); left: auto; top: auto; z-index: 2147483000;
  width: min(380px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; margin: 0 !important;
  display: flex !important; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px 12px 42px !important; border-radius: 14px !important; border: 1px solid transparent !important;
  font-size: 13.5px; line-height: 1.45; font-weight: 500; cursor: pointer;
  box-shadow: 0 12px 32px rgba(14, 15, 18, 0.18), 0 2px 6px rgba(14, 15, 18, 0.08);
  animation: toast-in .22s cubic-bezier(.2, .8, .2, 1) both;
  transition: bottom .2s ease;
}
[data-toast] > p { margin: 0; }
[data-toast]::before { content: ""; position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; border-radius: 50%; background-repeat: no-repeat; background-position: center; background-size: 12px; }
[data-toast="error"] { background: #fff !important; color: #8f2a26 !important; border-color: #f2d4d1 !important; }
[data-toast="error"]::before { background-color: #d9483f; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 17.5v.5'/%3E%3C/svg%3E"); }
[data-toast="ok"] { background: #111318 !important; color: #f4f5f7 !important; }
[data-toast="ok"]::before { background-color: #2fbf71; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-toast] .button, [data-toast] button { cursor: pointer; }
[data-toast="ok"] .button.secondary, [data-toast="ok"] .undo-button { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
[data-toast="ok"] .notice-close { color: #fff; }
[data-toast][data-toast-hidden] { display: none !important; }
/* "Saved." still fades away by itself (4 s, 8 s with Undo) — only now from the corner. */
[data-toast="ok"]:not([data-keep]) { animation: toast-in .22s cubic-bezier(.2, .8, .2, 1) both, foliyo-notice-out .35s ease 4s forwards; }
[data-toast="ok"]:has(.undo-button) { animation-delay: 0s, 8s; }
html.ws-dark [data-toast="error"] { background: #2a1716 !important; color: #ffd9d6 !important; border-color: #4a2523 !important; }
@media (max-width: 760px) {
  [data-toast] { right: 12px; left: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom) + var(--toast-stack, 0px)); }
}
@media (prefers-reduced-motion: reduce) { [data-toast] { animation: none !important; transition: none; } }

/* ===== Settings: one clean surface per card, no boxes inside boxes ===== */
.settings-shell { gap: 28px; }
.settings-nav { border: 0; box-shadow: none; background: transparent; padding: 0; gap: 2px; }
.settings-nav-group + .settings-nav-group { border-top: 0; margin-top: 14px; padding-top: 0; }
.settings-nav-label { font-size: 11px !important; letter-spacing: .08em; color: var(--muted) !important; padding: 0 12px 4px !important; min-height: 0 !important; }
.settings-nav button[role="tab"] { min-height: 48px; padding: 8px 12px; border-radius: 10px; }
.settings-nav button[role="tab"] svg { width: 18px; height: 18px; }
.settings-nav button[role="tab"][aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(14,15,18,.06), 0 4px 14px rgba(14,15,18,.05); }
.settings-body { gap: 16px; max-width: 880px; }
.settings-head { padding: 0 2px 4px; }
.settings-head h2 { font-size: 24px; font-weight: 700; }
.settings-head p { max-width: 640px; line-height: 1.5; }
.workspace .settings-body .workspace-panel, .workspace .studio-detail .settings-card {
  border: 0 !important; border-radius: 18px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(14,15,18,.05), 0 6px 24px rgba(14,15,18,.05);
  padding: 24px 26px;
}
.workspace .settings-body .workspace-panel .workspace-panel { box-shadow: none; padding: 0; background: transparent; border-radius: 0; }
.workspace .settings-body .workspace-panel > h2, .workspace .settings-body .workspace-section-heading h2, .workspace .settings-body .workspace-panel > header h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
/* Rows and tiles inside a card: soft fill instead of another grey outline */
.workspace .settings-body :is(.customer-pages li, .billing-card-row, .billing-timeline li, .tpl, .workspace-closure),
.workspace .settings-body .week-hours-row,
.workspace .studio-detail .settings-card .studio-switches,
.workspace .settings-body .studio-switches .switch-row,
.workspace .settings-body .switch-row {
  border: 0 !important; background: var(--canvas, #f5f6f8); border-radius: 12px;
}
.workspace .studio-detail .settings-card .studio-switches { overflow: hidden; }
.workspace .studio-detail .settings-card .studio-switches .switch-row { background: transparent; border-radius: 0; }
.workspace .studio-detail .settings-card .studio-switches .switch-row + .switch-row { border-top: 1px solid var(--surface) !important; }
.workspace .settings-body .notice, .workspace .studio-detail .notice { border: 0 !important; background: var(--canvas, #f5f6f8); border-radius: 12px; color: var(--muted); }
.workspace .settings-body .notice svg { color: var(--muted); }
.workspace .studio-detail .settings-card-head { border-bottom: 0; padding-bottom: 0; }
.workspace .studio-detail .settings-card-icon { background: var(--ollo-soft, #e9f8f2); color: var(--accent-dark, var(--accent)); }
/* Inputs: one quiet outline, a clear focus ring */
.workspace .settings-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea),
.workspace .studio-detail :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) {
  border: 1px solid #e3e5ea; background: #fff; border-radius: 10px; box-shadow: none; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
.workspace .settings-body :is(input, select, textarea):focus-visible, .workspace .studio-detail :is(input, select, textarea):focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.workspace .studio-detail .money-input { border-color: #e3e5ea; }
.workspace .studio-detail .money-input input { border: 0 !important; box-shadow: none !important; min-height: 40px; }
.workspace .settings-body .workspace-field > span, .workspace .studio-detail .workspace-field > span { font-size: 12.5px; font-weight: 600; color: var(--ink); opacity: .78; }
.workspace .settings-body .field-help, .workspace .settings-body .helper { color: var(--muted); font-size: 12px; line-height: 1.45; }
.workspace .settings-body .workspace-form-grid { gap: 16px 18px; align-items: start; }
.workspace .settings-body .panel-actions-row, .workspace .settings-body form > .button.primary, .workspace .settings-body form > .button[type="submit"] { margin-top: 6px; }
/* Opening hours: the day name sits next to its switch (an old rule floated it to the far right) */
.workspace .week-hours .week-hours-day span { position: static !important; transform: none !important; font-size: 14px; font-weight: 600; color: var(--ink); }
.workspace .week-hours .week-hours-closed { position: static !important; transform: none !important; font-size: 13px; color: var(--muted); }
.workspace .week-hours .week-hours-dash { position: static !important; transform: none !important; font-size: 14px; color: var(--muted); }
.workspace .settings-body .week-hours legend { display: none; }
.workspace .settings-body .week-hours { gap: 6px; }
.workspace .settings-body .week-hours-row { padding: 6px 8px 6px 14px; min-height: 52px; }
.workspace .settings-body .week-hours-row input[type="time"] { background: #fff; }
/* Barber detail head and tab bar: cleaner surfaces */
.workspace .studio-detail-head.barber { border: 0; box-shadow: 0 1px 2px rgba(14,15,18,.05), 0 6px 24px rgba(14,15,18,.05); border-radius: 18px; }
.workspace .studio-detail .hub-overview button { border: 0; background: var(--surface); box-shadow: 0 1px 2px rgba(14,15,18,.05), 0 4px 16px rgba(14,15,18,.04); border-radius: 14px; }
.workspace .studio-detail .hub-overview li.warn button { background: #fff8e8; }
.workspace .studio-detail.workspace-panel { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; }
.workspace .studio-detail .studio-form > .studio-fieldset:not(.barber-settings) { background: var(--surface); border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(14,15,18,.05), 0 6px 24px rgba(14,15,18,.05); }
html.ws-dark .workspace .settings-body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
html.ws-dark .workspace .studio-detail :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { background: #10131a; border-color: var(--line); }
html.ws-dark .workspace .settings-body :is(.customer-pages li, .billing-card-row, .billing-timeline li, .tpl, .workspace-closure, .week-hours-row, .switch-row, .notice) { background: #1d2127; }
@media (max-width: 900px) {
  .workspace .settings-body .workspace-panel, .workspace .studio-detail .settings-card { padding: 18px; border-radius: 16px; }
  .settings-nav { background: var(--surface); padding: 6px; border-radius: 14px; box-shadow: 0 1px 2px rgba(14,15,18,.05); }
  .settings-nav-group + .settings-nav-group { margin-top: 0; }
}
/* "From £x" on the shop page menu */
.sp-service-meta .sp-from { font-size: .62em; font-weight: 600; opacity: .7; letter-spacing: .02em; margin-right: 2px; }
@media (max-width: 900px) {
  .settings-nav .settings-nav-label { background: transparent !important; padding: 10px 12px 4px !important; }
  .settings-nav-group[data-open="true"] .settings-nav-label { color: var(--ink) !important; }
}

/* ===== Navigation: grouped menu (Daily / Team / Shop / Account) ===== */
.sidebar-group { display: block; padding: 14px 14px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.38); }
.sidebar-items > .sidebar-group:first-child { padding-top: 4px; }
.sidebar.rail.collapsed .sidebar-group { height: 1px; padding: 0; margin: 8px 14px; background: rgba(255,255,255,.12); font-size: 0; }
html:not(.ws-dark) .sidebar.light .sidebar-group { color: var(--muted); }
.tab-sheet-group { display: block; padding: 10px 14px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.tab-sheet-group:first-child { padding-top: 4px; }
.tab-sheet { max-height: calc(100dvh - 160px); overflow-y: auto; }

/* ===== Pay runs on phones: barber picker scrolls sideways instead of running off screen ===== */
@media (max-width: 760px) {
  .wallet-page-grid { grid-template-columns: 1fr; }
  .wallet-barber-list { position: static; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; scrollbar-width: none; }
  .wallet-barber-list::-webkit-scrollbar { display: none; }
  .wallet-barber-list button { flex: 0 0 auto; min-width: 200px; max-width: 78vw; scroll-snap-align: start; }
}

/* ===== Messages & reminders: channel cards without the heavy green frames ===== */
.workspace .settings-body .chan-card { border: 0 !important; background: var(--canvas, #f5f6f8); box-shadow: none !important; border-radius: 14px; }
.workspace .settings-body .chan-card.on { background: color-mix(in srgb, var(--accent) 6%, var(--canvas, #f5f6f8)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent) !important; }
.workspace .settings-body .chan-card .notice, .workspace .settings-body .chan-card label:has(> input[type="checkbox"]) { background: transparent; }

/* ===== Members & access: two even columns, form card no longer squeezed to one side ===== */
.workspace .settings-body .account-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 0; }
.workspace .settings-body .account-grid > .workspace-panel { max-width: none; }
.workspace .settings-body .account-member { background: var(--canvas, #f5f6f8); border: 0 !important; border-radius: 14px; }

/* ===== Activity log: a tidy timeline instead of shouty capitals ===== */
.workspace .workspace-audit { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.workspace .workspace-audit li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line-2); margin: 0; }
.workspace .workspace-audit li:last-child { border-bottom: 0; }
.workspace .workspace-audit strong { font-size: 14px; font-weight: 600; }
.workspace .workspace-audit time { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--muted); white-space: nowrap; }
.workspace .workspace-audit p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.workspace .workspace-audit small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); opacity: .8; }

/* ===== Services list: category tools read as small quiet links, not a row of underlines ===== */
.studio-category-tools .linklike { text-decoration: none; font-weight: 600; font-size: 12px; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.studio-category-tools .linklike:hover:not(:disabled) { color: var(--accent-dark, var(--accent)); background: var(--soft); }
.studio-category-tools .linklike:disabled { opacity: .35; }

/* ===== Page headers: consistent spacing and a calmer divider ===== */
.workspace .workspace-heading { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.workspace .workspace-heading h1 { letter-spacing: -0.02em; }
.workspace .workspace-heading p { max-width: 680px; }

/* ===== Spacing pass: every settings card spaces its own contents evenly (no text touching a box) ===== */
.workspace .settings-body .workspace-panel { display: grid; gap: 18px; align-content: start; }
.workspace .settings-body .workspace-panel > :is(h2, h3, p, .workspace-section-heading, form, .notice) { margin: 0; }
.workspace .settings-body .workspace-section-heading { align-items: flex-start; gap: 16px; }
.workspace .settings-body .workspace-section-heading p { margin: 4px 0 0; }
.workspace .settings-body .workspace-footnote { line-height: 1.55; color: #555a66; }
.workspace .settings-body .workspace-form { display: grid; gap: 16px; }
.workspace .settings-body .workspace-form > h3 { margin: 0; font-size: 15px; font-weight: 700; }
.workspace .settings-body .workspace-form-actions { padding-top: 2px; }
.workspace .settings-body .test-message-form, .workspace .settings-body .outbox { padding-top: 20px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.workspace .settings-body .account-settings h3 { margin: 22px 0 10px; }
.workspace .settings-body .account-settings h3:first-child { margin-top: 0; }
.workspace .pay-runs-page > .workspace-panel { display: grid; gap: 14px; }
.workspace .pay-runs-page > .workspace-panel > :is(h3, p) { margin: 0; }

/* ===== Messages & reminders: clean white cards, readable text, balanced layout =====
   Texts (the long one) takes the left column; Emails, Reminders and Sign-in codes stack on the right. */
.workspace .settings-body .chan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; align-items: start; }
.workspace .settings-body .chan-grid > [data-testid="chan-sms"] { grid-row: span 3; }
.workspace .settings-body .chan-card,
.workspace .settings-body .chan-card.on {
  background: #fff !important; border: 1px solid #e6e8ed !important; box-shadow: none !important;
  border-radius: 16px; padding: 18px 20px; gap: 14px; min-height: 0;
}
.workspace .settings-body .chan-head { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.workspace .settings-body .chan-ic { width: 40px; height: 40px; border-radius: 12px; background: #f2f3f6; color: #3d414b; }
.workspace .settings-body .chan-card.on .chan-ic { background: var(--ollo-soft, #e8f6f0); color: var(--accent-dark, #006b4d); }
.workspace .settings-body .chan-text { gap: 3px; padding-top: 1px; }
.workspace .settings-body .chan-text strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.workspace .settings-body .chan-text small { font-size: 13px; color: #555a66; line-height: 1.4; }
.workspace .settings-body .chan-text small b { color: var(--ink); }
.workspace .settings-body .chan-head .switch { margin-top: 6px; }
.workspace .settings-body .chan-body { font-size: 13.5px; color: #4b505b; line-height: 1.55; margin: 0; }
/* Which texts: clear groups with breathing room */
.workspace .settings-body .sms-kinds { gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.workspace .settings-body .sms-kinds legend { font-size: 11.5px; letter-spacing: .07em; color: #6b707b; margin-bottom: 4px; padding-top: 14px; float: left; width: 100%; }
.workspace .settings-body .sms-kinds-group { display: grid; gap: 10px; clear: both; }
.workspace .settings-body .sms-kinds-group > .helper { font-size: 12px; color: var(--ink); margin-bottom: -2px; }
.workspace .settings-body .sms-kinds-group > .helper strong { font-weight: 700; }
.workspace .settings-body .sms-kinds .setup-check { gap: 12px; font-size: 14px; }
.workspace .settings-body .sms-kinds .setup-check strong { font-weight: 600; color: var(--ink); }
.workspace .settings-body .sms-kinds .setup-check small { font-size: 12.5px; color: #5d616c; }
.workspace .settings-body .sms-kinds > .helper { padding: 10px 12px; background: #f6f7f9; border-radius: 10px; color: #555a66; font-size: 12.5px; }
.workspace .settings-body .sms-kinds .setup-check input,
.workspace .settings-body .rem-quiet-toggle input, .workspace .settings-body .sms-bill-ack input { accent-color: var(--accent-dark, #006b4d); }
/* "Texts cost 8p each" acknowledgement: one calm box, no dashed outline */
.workspace .settings-body .sms-bill-ack { border: 1px solid #e6e8ed; border-style: solid; background: #f8f9fb; border-radius: 12px; padding: 12px 14px; }
.workspace .settings-body .sms-bill-ack.on { border-color: color-mix(in srgb, var(--accent) 40%, #e6e8ed); background: #f4faf7; }
.workspace .settings-body .sms-bill-ack span { color: #4b505b; font-size: 12.5px; line-height: 1.5; }
.workspace .settings-body .sms-bill-ack strong { color: var(--ink); font-size: 14px; }
/* Reminders: chips and quiet hours spaced out */
.workspace .settings-body .rem-sched { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.workspace .settings-body .rem-sched > .chan-body { margin: 0 !important; }
.workspace .settings-body .rem-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace .settings-body .rem-chip { background: #f2f3f6; border: 0; color: var(--ink); font-weight: 600; font-size: 13px; padding: 6px 6px 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; }
.workspace .settings-body .rem-chip button { background: #fff; color: #3d414b; border: 1px solid #e0e2e7; }
.workspace .settings-body .rem-quiet-head { display: grid; gap: 4px; padding: 0; }
.workspace .settings-body .rem-quiet-head small { color: #5d616c; font-size: 12.5px; padding-left: 28px; }
.workspace .settings-body .rem-quiet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Text sender name: same white card language */
.workspace .settings-body .sender-field { background: #fff; border: 1px solid #e6e8ed !important; border-radius: 16px; padding: 18px 20px; gap: 24px; }
.workspace .settings-body .sender-chip { background: #f2f3f6; border-color: transparent; }
.workspace .settings-body .sender-chip.on { background: var(--ink); color: #fff; }
.workspace .settings-body .sender-rules { color: #5d616c; }
@media (max-width: 900px) {
  .workspace .settings-body .chan-grid { grid-template-columns: 1fr; }
  .workspace .settings-body .chan-grid > [data-testid="chan-sms"] { grid-row: auto; }
  .workspace .settings-body .chan-card, .workspace .settings-body .sender-field { padding: 16px; }
}
/* Right column cards sit snug under each other; the last row soaks up the Texts card's extra height */
.workspace .settings-body .chan-grid { grid-template-rows: auto auto 1fr; }
@media (max-width: 900px) { .workspace .settings-body .chan-grid { grid-template-rows: none; } }

/* ===== Top bar: every control the same 40px height, radius and border, evenly spaced ===== */
.workspace .topbar { gap: 8px; }
.workspace .topbar .wallet-chip,
.workspace .topbar .queue-chip,
.workspace .topbar .reviews-chip,
.workspace .topbar .topbar-iconbtn,
.workspace .topbar .account-pill {
  box-sizing: border-box; height: 40px; min-height: 40px; margin: 0;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  display: inline-flex; align-items: center; flex: 0 0 auto;
}
.workspace .topbar .wallet-chip { gap: 8px; padding: 0 10px 0 6px; }
.workspace .topbar .queue-chip { gap: 8px; padding: 0 12px 0 6px; }
.workspace .topbar .reviews-chip { gap: 6px; padding: 0 12px; }
.workspace .topbar .wallet-chip .chip-ic,
.workspace .topbar .queue-chip .chip-ic { width: 28px; height: 28px; border-radius: 8px; }
.workspace .topbar .reviews-chip svg { width: 15px; height: 15px; }
.workspace .topbar .topbar-iconbtn { width: 40px; justify-content: center; padding: 0; color: var(--ink); }
.workspace .topbar .topbar-iconbtn:hover,
.workspace .topbar .wallet-chip:hover,
.workspace .topbar .queue-chip:hover,
.workspace .topbar .reviews-chip:hover,
.workspace .topbar .account-pill:hover { border-color: #c9ccd2; box-shadow: none; background: #fff; }
.workspace .topbar [aria-expanded="true"] { border-color: var(--accent); background: var(--ollo-soft); }
.workspace .topbar .count-badge { top: -6px; right: -6px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border: 2px solid #fff; box-sizing: content-box; background: #e5484d; color: #fff; }
.workspace .topbar .account-pill { gap: 8px; padding: 0 10px 0 4px; margin-left: 4px; }
.workspace .topbar .account-pill .avatar-ink { width: 30px; height: 30px; border-radius: 7px; flex: 0 0 30px; }
.workspace .topbar .account-pill .avatar-photo { border-radius: 50%; }
.workspace .topbar .queue-chip .offer-dot { top: -3px; right: -3px; border: 2px solid #fff; }

@media (max-width: 767px) {
  /* Phone: no hamburger any more (the bottom bar is the menu), so the shop logo sits top-left. */
  .workspace .topbar { gap: 6px; padding: 0 10px; }
  .workspace .topbar .brand { display: inline-flex !important; flex: 0 0 auto; margin-right: auto; min-width: 0; }
  .workspace .topbar .brand .brand-shop-text { display: none !important; }
  .workspace .topbar .brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }
  .workspace .topbar .brand .brand-shop-initial { display: grid; place-items: center; font-weight: 800; background: var(--ink); color: #fff; }
  .workspace .topbar .topbar-grow { display: none; }
  .workspace .topbar .wallet-chip,
  .workspace .topbar .queue-chip,
  .workspace .topbar .reviews-chip { padding: 0 8px 0 5px; gap: 6px; }
  .workspace .topbar .reviews-chip { padding: 0 9px; }
  .workspace .topbar .wallet-chip .chip-ic,
  .workspace .topbar .queue-chip .chip-ic { width: 26px; height: 26px; }
  .workspace .topbar .account-pill { width: 40px; padding: 0; justify-content: center; margin-left: 0; border-radius: 50%; overflow: hidden; }
  .workspace .topbar .account-pill .avatar-ink { width: 38px; height: 38px; border-radius: 50%; flex-basis: 38px; }
  .workspace .topbar .topbar-menu { display: none !important; }
}
@media (max-width: 400px) {
  .workspace .topbar .wallet-chip small { display: none !important; }
  .workspace .topbar .queue-chip > span:not(.chip-ic) small { display: none; }
}

/* Account menu is now just "you": keep it tidy and aligned under the avatar. */
.account-menu button { min-height: 42px; }

/* ===== Notifications (v4): clean list, tap a row to open + mark read ===== */
.bell-v4 { padding: 0 !important; gap: 0; }
.bell-v4 > h2 { display: none; }
.bell-v4 .bell-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 12px 20px; }
.bell-v4 .bell-head > div { flex: 1; min-width: 0; }
.bell-v4 .bell-head h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.01em; }
.bell-v4 .bell-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.bell-v4 .bell-markall { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.bell-v4 .bell-markall:hover { border-color: var(--accent); color: var(--accent-dark); }
.bell-v4 .bell-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 20px 6px; padding: 4px; border-radius: 12px; background: #f1f2f4; }
.bell-v4 .bell-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.bell-v4 .bell-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 1px 1px rgba(16,24,40,.04); }
.bell-v4 .bell-seg .n { min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font-size: 11px; font-weight: 700; box-sizing: border-box; }
.bell-v4 .bell-seg .n.warn { background: #f5a524; color: #fff; }
.bell-v4 .bell-list { flex: 1; overflow: auto; padding: 0 12px 16px; }
.bell-v4 .bell-day { padding: 16px 8px 6px; font-size: 11px; letter-spacing: .08em; }
.bell-v4 .bell-items { gap: 2px; }
.bell-v4 .bell-item { display: flex; align-items: stretch; gap: 0; padding: 0; border-radius: 12px; background: none; }
.bell-v4 .bell-item.unread { background: none; }
.bell-v4 .bell-item.unread::before { display: none; }
.bell-v4 .bell-item:hover { background: #f6f7f8; }
.bell-v4 .bell-row { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px 12px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.bell-v4 .bell-ic { width: 38px; height: 38px; border-radius: 50%; }
.bell-v4 .bell-tx { display: grid; gap: 2px; min-width: 0; }
.bell-v4 .bell-tx strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.bell-v4 .bell-item.unread .bell-tx strong { font-weight: 750; }
.bell-v4 .bell-body { font-size: 13px; line-height: 1.4; color: #4b4f57; overflow-wrap: anywhere; }
.bell-v4 .bell-tx time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bell-v4 .bell-item:not(.unread) .bell-body, .bell-v4 .bell-item:not(.unread) .bell-tx strong { color: #6b7079; }
.bell-v4 .bell-dot { flex: 0 0 auto; width: 9px; height: 9px; margin: 6px 2px 0 auto; border-radius: 50%; background: var(--accent); }
.bell-v4 .bell-clr { align-self: center; margin-right: 4px; width: 32px; height: 32px; opacity: 0; }
.bell-v4 .bell-item:hover .bell-clr, .bell-v4 .bell-clr:focus-visible { opacity: .9; }
@media (hover: none) { .bell-v4 .bell-clr { opacity: .55; } }
.bell-v4 .bell-issue { gap: 12px; padding: 12px 8px; align-items: flex-start; }
.bell-v4 .bell-acts { margin-top: 8px; gap: 8px; }
.bell-v4 .bell-acts button { min-height: 32px; border-radius: 999px; padding: 0 14px; }
.bell-v4 .bell-acts button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.bell-v4 .bell-note { margin: 12px 8px 4px; }
.bell-v4 .bell-empty { display: grid; justify-items: center; gap: 6px; padding: 56px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.bell-v4 .bell-empty b { color: var(--ink); font-size: 15px; }
.bell-v4 .bell-empty-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #f1f2f4; color: #6b7079; margin-bottom: 6px; }
.bell-v4 .bell-empty-ic.ok { background: #ddf8ef; color: #03785a; }
.bell-v4 .bell-clearall { display: block; margin: 14px auto 0; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bell-v4 .bell-clearall:hover { background: #f1f2f4; color: var(--ink); }
.bell-v4 .bell-error { margin: 6px 20px 0; }
.bell-v4 .bell-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fafafb; }
html.ws-dark .bell-v4 .bell-seg { background: rgba(255,255,255,.06); }
html.ws-dark .bell-v4 .bell-seg button.on { background: rgba(255,255,255,.14); color: #fff; }
html.ws-dark .bell-v4 .bell-item:hover { background: rgba(255,255,255,.05); }
html.ws-dark .bell-v4 .bell-body { color: #c4c8cf; }
html.ws-dark .bell-v4 .bell-markall { background: transparent; color: #fff; }
html.ws-dark .bell-v4 .bell-foot { background: transparent; }

/* ===== Reviews (v2): score summary, barber chips, clean cards ===== */
.reviews-drawer { padding: 20px 20px 28px !important; background: #f7f7f8 !important; }
.reviews-drawer .history-close { top: 14px; right: 14px; }
.rv2.reviews-panel { display: grid; gap: 14px; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.rv2 .rv2-head { padding-right: 44px; }
.rv2 .rv2-head h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.rv2 .rv2-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 52ch; }
.rv2 .rv2-summary { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.rv2 .rv2-score { display: grid; justify-items: center; gap: 4px; min-width: 104px; }
.rv2 .rv2-score b { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.rv2 .rv2-score small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rv2 .stars { display: inline-flex; gap: 1px; }
.rv2 .stars .on { color: #f5a524; fill: #f5a524; }
.rv2 .stars .off { color: #d9dbe0; fill: #e9eaee; }
.rv2 .rv2-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-width: 0; }
.rv2 .rv2-bars li { display: grid; grid-template-columns: 10px 12px 1fr 24px; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rv2 .rv2-bars li svg { color: #f5a524; fill: #f5a524; }
.rv2 .rv2-bars i { display: block; height: 7px; border-radius: 999px; background: #eef0f2; overflow: hidden; }
.rv2 .rv2-bars em { display: block; height: 100%; border-radius: inherit; background: #f5a524; }
.rv2 .rv2-bars small { text-align: right; font-size: 12px; }
.rv2 .rv2-people { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.rv2 .rv2-people::-webkit-scrollbar { display: none; }
.rv2 .rv2-people button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rv2 .rv2-people button b { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #fff4dc; color: #8a5a00; }
.rv2 .rv2-people button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv2 .rv2-people button[aria-pressed="true"] b { background: rgba(255,255,255,.16); color: #fff; }
.rv2 .rv2-people .avatar, .rv2 .rv2-all-ic { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; flex: 0 0 30px; display: grid; place-items: center; overflow: hidden; }
.rv2 .rv2-people .avatar img { width: 100%; height: 100%; object-fit: cover; }
.rv2 .rv2-all-ic { background: #f1f2f4; color: var(--ink); }
.rv2 .rv2-people button[aria-pressed="true"] .rv2-all-ic { background: rgba(255,255,255,.16); color: #fff; }
.rv2 .rv2-filter { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.rv2 .rv2-filter button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 2px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rv2 .rv2-filter button small { font-size: 11.5px; padding: 1px 6px; border-radius: 999px; background: #eceef1; color: var(--muted); }
.rv2 .rv2-filter button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.rv2 .rv2-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border: 0 !important; }
.rv2 .rv2-card { display: grid; gap: 10px; padding: 16px !important; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.rv2 .rv2-card header { display: flex !important; align-items: center; gap: 10px; }
.rv2 .rv2-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; background: #eef1f6; color: #3b4352; font-size: 13px; font-weight: 700; }
.rv2 .rv2-who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.rv2 .rv2-who strong { font-size: 14.5px; font-weight: 700; }
.rv2 .rv2-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.rv2 .rv2-hidden { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: #f1f2f4; color: #5b616b; font-size: 11.5px; font-weight: 650; }
.rv2 .rv2-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.rv2 .rv2-body.muted { color: var(--muted); font-size: 13.5px; font-style: italic; }
.rv2 .rv2-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rv2 .rv2-tags > span { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: #f4f5f7; color: #4b4f57; font-size: 12px; font-weight: 600; }
.rv2 .rv2-tags .rv2-barber { padding-left: 3px; }
.rv2 .rv2-tags .avatar { width: 20px; height: 20px; border-radius: 50%; font-size: 9px; display: grid; place-items: center; overflow: hidden; }
.rv2 .rv2-tags .avatar img { width: 100%; height: 100%; object-fit: cover; }
.rv2 .rv2-reply { margin: 0 !important; padding: 10px 12px !important; border-radius: 10px; border-left: 3px solid var(--accent) !important; background: #f6faf8 !important; }
.rv2 .rv2-reply strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-dark); margin-bottom: 2px; }
.rv2 .rv2-reply p { margin: 0; font-size: 13.5px; line-height: 1.45; }
.rv2 .rv2-reply-form { display: grid; gap: 8px; }
.rv2 .rv2-reply-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; }
.rv2 .rv2-reply-form .review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rv2 .rv2-reply-form .review-actions small { margin-right: auto; color: var(--muted); font-size: 12px; }
.rv2 .rv2-actions { display: flex !important; gap: 6px !important; padding-top: 10px; margin: 0 !important; border-top: 1px solid #f0f1f3; }
.rv2 .rv2-actions button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rv2 .rv2-actions button:hover { border-color: #c9ccd2; background: #fafafb; }
.rv2 .rv2-card.hidden { background: #fbfbfc; }
.rv2 .rv2-card.hidden .rv2-body, .rv2 .rv2-card.hidden .stars { opacity: .55; }
.rv2 .rv2-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; margin: 0; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 14px; background: #fff; }
.rv2 .rv2-empty svg { color: #f5a524; }
/* On a barber's page the panel sits inside settings: no grey drawer, same cards. */
.workspace .studio .rv2 .rv2-summary { background: #fff; }
@media (max-width: 520px) {
  .reviews-drawer { padding: 16px 14px 24px !important; }
  .rv2 .rv2-summary { gap: 14px; padding: 14px; }
  .rv2 .rv2-score { min-width: 84px; }
  .rv2 .rv2-score b { font-size: 34px; }
}
html.ws-dark .reviews-drawer { background: #111317 !important; }
html.ws-dark .rv2 .rv2-summary, html.ws-dark .rv2 .rv2-card, html.ws-dark .rv2 .rv2-people button, html.ws-dark .rv2 .rv2-actions button, html.ws-dark .rv2 .rv2-empty { background: #1a1d22; border-color: #2a2e35; color: #e8eaed; }
html.ws-dark .rv2 .rv2-tags > span { background: #23272e; color: #c4c8cf; }
html.ws-dark .rv2 .rv2-reply { background: #16201c !important; }
@media (max-width: 767px) {
  .workspace .topbar { gap: 5px; padding: 0 8px; }
  .workspace .topbar .wallet-chip, .workspace .topbar .queue-chip { padding: 0 7px 0 4px; gap: 5px; }
  .workspace .topbar .reviews-chip { padding: 0 7px; gap: 4px; }
  .workspace .topbar .wallet-chip .chip-ic, .workspace .topbar .queue-chip .chip-ic { width: 24px; height: 24px; }
  .workspace .topbar .brand .brand-mark { width: 34px; height: 34px; }
}

/* ===== Appointment icons (v2): small tinted badges, each with a hover tip on desktop ===== */
.block-icons { display: inline-flex; align-items: center; gap: 3px; flex-wrap: nowrap; }
.bi { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; flex: 0 0 16px; background: rgba(255,255,255,.85); color: #4b5563; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.bi svg { width: 10px !important; height: 10px !important; stroke-width: 2.4; }
.bi-paid { background: #dcfce7; color: #15803d; }
.bi-deposit { background: #fef3c7; color: #a16207; }
.bi-due { background: #ffedd5; color: #c2410c; }
.bi-online { background: #e0f2fe; color: #0369a1; }
.bi-walkin { background: #ede9fe; color: #6d28d9; }
.bi-regular { background: #ffe4e6; color: #e11d48; }
.bi-series { background: #e0e7ff; color: #4338ca; }
.bi-group { background: #ccfbf1; color: #0f766e; }
.bi-notes { background: #f1f5f9; color: #334155; }
.bi-noshow { background: #dc2626; color: #fff; }
.workspace .connected-calendar .calendar-event .block-icons { opacity: 1; color: inherit; }
.workspace .connected-calendar .calendar-event .event-inline-icons { margin-left: auto; padding-left: 4px; display: inline-flex; }
.workspace .connected-calendar .calendar-event .event-inline-icons .block-icons svg { width: 10px; height: 10px; }
.workspace .connected-calendar .calendar-event > strong { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ollo-tip { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity .12s; max-width: 240px; padding: 5px 9px; border-radius: 7px; background: #111317; color: #fff; font: 600 12px/1.3 var(--font, system-ui); box-shadow: 0 6px 20px rgba(0,0,0,.22); white-space: nowrap; }
.icon-legend { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.icon-legend li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.icon-legend li .bi { margin-top: 1px; }
.icon-legend b { color: var(--ink); font-weight: 650; }

/* ===== No-shows stay on the calendar, in red ===== */
.calendar-event.no-show, .week-card.no-show { background: #fee2e2 !important; border-color: #dc2626 !important; color: #991b1b !important; }
.calendar-event.no-show strong, .week-card.no-show strong { color: #991b1b; }
.calendar-event.no-show .event-inline, .calendar-event.no-show > span, .week-card.no-show .week-card-name { text-decoration: line-through; text-decoration-color: rgba(153,27,27,.45); }
html.ws-dark .calendar-event.no-show, html.ws-dark .week-card.no-show { background: rgba(220,38,38,.18) !important; color: #fecaca !important; }

/* ===== Week view: time + name on one line so names always show ===== */
.workspace .week-person .week-card { padding: 4px 6px; gap: 1px; align-content: start; }
.workspace .week-person .week-card > strong { display: flex; align-items: baseline; gap: 5px; min-width: 0; font-size: 11.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.workspace .week-person .week-card > strong time { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.workspace .week-person .week-card > strong .week-card-name { flex: 1 1 auto; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; -webkit-line-clamp: unset; }
.workspace .week-person .week-card > small { font-size: 11px; line-height: 1.25; opacity: .85; }
.workspace .week-person .week-card.one-line { padding-top: 2px; padding-bottom: 2px; align-content: center; }
.workspace .week-person .week-card-dot { align-self: center; }
@media (max-width: 1100px) {
  .workspace .week-person .week-card > strong { flex-direction: column; align-items: flex-start; gap: 0; }
  .workspace .week-person .week-card.one-line > strong { flex-direction: row; align-items: baseline; gap: 4px; }
  .workspace .week-person .week-card.one-line > strong time { display: none; }
}

/* ===== Appointment icons v3: calmer, max three per card + "+N" ===== */
.bi { width: 15px; height: 15px; flex-basis: 15px; border-radius: 4px; box-shadow: none; }
.bi svg { width: 9px !important; height: 9px !important; stroke-width: 2.5; }
.bi-first { background: #fef9c3; color: #a16207; }
.bi-fav { background: #ffe4e6; color: #e11d48; }
.bi-fav svg { fill: currentColor; }
.bi-requested { background: #e0e7ff; color: #4338ca; }
.bi-series { background: #f1f5f9; color: #475569; }
.bi-online, .bi-walkin { background: #f1f5f9; color: #475569; }
.bi-more { width: auto; min-width: 15px; padding: 0 3px; background: rgba(15,23,42,.08); color: #334155; font: 700 9.5px/15px var(--font, system-ui); letter-spacing: -.02em; }
.calendar-event .block-icons { gap: 2px; }
.calendar-event.finished .bi { opacity: .75; }
html.ws-dark .bi-online, html.ws-dark .bi-walkin, html.ws-dark .bi-series, html.ws-dark .bi-notes, html.ws-dark .bi-more { background: rgba(255,255,255,.12); color: #e5e7eb; }

/* ===== Barber column heading: name, then the day's totals (always), hours chip beside them ===== */
.workspace .connected-calendar .staff-column-heading .staff-head-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 2px; }
.workspace .connected-calendar .staff-column-heading .staff-head-meta { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.workspace .connected-calendar .staff-column-heading .staff-head-meta > .staff-totals { display: inline-block !important; margin: 0; font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.workspace .connected-calendar .staff-column-heading .staff-head-meta > .staff-totals b { color: var(--ink); font-weight: 700; }
.workspace .connected-calendar .staff-column-heading .staff-head-meta .staff-hours-chip { flex: 0 0 auto; height: 18px; line-height: 16px; padding: 0 6px; font-size: 10px; margin: 0; }
@media (max-width: 1440px) and (min-width: 768px) {
  .workspace .connected-calendar .staff-column-heading > .staff-head-text { display: flex !important; grid-area: name; }
  .workspace .connected-calendar .staff-column-heading { grid-template-areas: "avatar name menu"; }
}
/* Narrow columns (tablet / phone): totals stay, the hours chip steps aside (it's in the ⋯ menu). */
@media (max-width: 1180px) {
  .workspace .connected-calendar .staff-column-heading .staff-head-meta .staff-hours-chip { display: none; }
}
@media (max-width: 767px) {
  .workspace .connected-calendar .staff-column-heading .staff-head-meta > .staff-totals { font-size: 10px; }
}

/* Reviews chip: a solid star. */
.workspace .topbar .reviews-chip svg, .reviews-chip svg { fill: #f5a524; color: #f5a524; }

/* ==========================================================================
   Slot quick menu (Book / Block / Hold), held spaces, hold dialogs
   ========================================================================== */
.slot-menu { position: fixed; z-index: 80; width: 220px; background: var(--surface, #fff); border: 1px solid var(--line, #e4e6eb); border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(11, 11, 12, .35); padding: 6px; display: grid; gap: 2px; animation: slotMenuIn .12s ease-out; }
@keyframes slotMenuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.slot-menu-head { padding: 6px 10px 8px; font-size: 12.5px; color: var(--muted, #6b7280); border-bottom: 1px solid var(--line-2, #eceef2); margin-bottom: 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.slot-menu-head strong { color: var(--ink, #0b0b0c); font-size: 14px; font-variant-numeric: tabular-nums; }
.slot-menu-head small { flex-basis: 100%; color: #b45309; font-size: 11.5px; }
.slot-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink, #0b0b0c); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.slot-menu button:hover, .slot-menu button:focus-visible { background: var(--mint-soft, #e6fcf4); outline: none; }
.slot-menu button > svg { flex: none; color: var(--accent, #0f766e); }
.slot-menu button span { display: grid; line-height: 1.2; }
.slot-menu button b { font-size: 13.5px; font-weight: 600; }
.slot-menu button small { font-size: 11.5px; color: var(--muted, #6b7280); }
@media (max-width: 767px) {
  .slot-menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; border-radius: 18px; padding: 8px; box-shadow: 0 -10px 40px -10px rgba(11, 11, 12, .35); }
  .slot-menu button { min-height: 52px; }
}

.workspace .calendar-block.held { background: repeating-linear-gradient(135deg, #fff7e6 0 8px, #fdecc8 8px 16px); border: 1px dashed #d97706; color: #92400e; }
.workspace .calendar-block.held strong { color: #92400e; }
.workspace .calendar-block.held .calendar-block-body { cursor: pointer; }

.hold-dialog { display: grid; gap: 12px; }
.hold-lead { margin: 0; font-size: 13px; color: var(--muted, #6b7280); line-height: 1.4; }
.hold-dialog .workspace-field { display: grid; gap: 6px; margin: 0; }
.hold-dialog .workspace-field > span { font-size: 12px; font-weight: 600; color: var(--muted, #6b7280); }
.hold-dialog select, .hold-dialog input:not([type=checkbox]) { min-height: 42px; border-radius: 10px; width: 100%; }
.hold-picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--accent-fill, #99f6e4); background: var(--mint-soft, #e6fcf4); border-radius: 12px; }
.hold-picked span { display: grid; line-height: 1.25; min-width: 0; }
.hold-picked small { color: var(--muted, #6b7280); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hold-new { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hold-new input:first-child { grid-column: 1 / -1; }
.hold-new input[type=email] { grid-column: 1 / -1; }
.hold-new .panel-inline { grid-column: 1 / -1; justify-self: start; }
.hold-find { display: grid; gap: 6px; }
.hold-results { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line, #e4e6eb); border-radius: 12px; display: grid; gap: 2px; max-height: 210px; overflow: auto; }
.hold-results button { width: 100%; display: flex; justify-content: space-between; gap: 8px; align-items: center; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; }
.hold-results button:hover { background: var(--mint-soft, #e6fcf4); }
.hold-results small { color: var(--muted, #6b7280); }
.hold-results .hold-add { color: var(--accent, #0f766e); justify-content: flex-start; font-weight: 600; }
.hold-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hold-actions .button { min-height: 44px; }
.hold-fine { margin: 0; font-size: 12px; color: var(--muted, #6b7280); }
.modal:has(.hold-dialog) { width: min(480px, calc(100vw - 24px)); }
@media (max-width: 767px) {
  .hold-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hold-actions .button:only-child, .hold-actions .button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Customer: held-for-you page */
.held-time { display: grid; gap: 14px; }
.held-time h1 { margin: 0; }
.held-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; font-size: 13px; color: var(--muted, #6b7280); }
.held-steps li { display: flex; align-items: center; gap: 6px; }
.held-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-size: 12px; font-weight: 600; }
.held-steps li.on { color: var(--ink, #0b0b0c); font-weight: 600; }
.held-steps li.on span { background: var(--accent, #0f766e); border-color: var(--accent, #0f766e); color: #fff; }
.held-steps li.done span { background: var(--mint-soft, #e6fcf4); border-color: var(--accent, #0f766e); color: var(--accent, #0f766e); }
.held-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2, #f4f5f7); border-radius: 12px; }
.held-tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted, #6b7280); }
.held-tabs button[aria-selected=true] { background: var(--surface, #fff); color: var(--ink, #0b0b0c); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.held-form { gap: 10px; }
.held-terms { display: flex !important; gap: 8px; align-items: flex-start; font-size: 13px; }
.held-who { margin: 0; font-size: 14px; }

/* ==========================================================================
   Booking + Block screens: fit the screen without scrolling (phones first)
   ========================================================================== */
.block-dialog .workspace-form { display: grid; gap: 12px; }
.block-dialog fieldset { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; }
.block-dialog .workspace-form-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.block-dialog .block-quick, .block-dialog .block-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 767px) {
  .modal:has(.block-dialog), .modal:has(.hold-dialog) { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .modal:has(.block-dialog) .modal-header, .modal:has(.hold-dialog) .modal-header { padding: 12px 16px; }
  .modal:has(.block-dialog) .modal-inner, .modal:has(.hold-dialog) .modal-inner { padding: 0 16px calc(14px + env(safe-area-inset-bottom)); }
  .block-dialog .notice { display: none; }
  .block-dialog[data-step="who"] .notice { display: flex; }
  .block-dialog .workspace-form-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
  .block-dialog input[type=date], .block-dialog input[type=time] { min-height: 40px; padding: 6px 8px; font-size: 15px; }
  .block-dialog .block-chip { padding: 7px 11px; font-size: 13px; min-height: 36px; }
  .block-dialog .workspace-save-actions { position: sticky; bottom: 0; background: var(--surface, #fff); padding-top: 8px; margin: 0; }

  /* Booking: denser sheet, sticky save bar, nothing hidden that's needed to book */
  .modal:has(.booking-workflow) .modal-header { padding: 10px 14px; }
  .modal:has(.booking-workflow) .modal-header h2 { font-size: 17px; }
  .modal .booking-layout > section { padding: 10px 14px 12px; }
  .modal .booking-layout > section + section { border-left: 0; border-top: 1px solid var(--line-2, #eceef2); }
  .modal .booking-layout h3 { margin: 0 0 8px; font-size: 13px; }
  .modal .booking-workflow select, .modal .booking-workflow input:not([type=checkbox]):not([type=radio]) { min-height: 40px; }
  .modal .booking-workflow .workspace-form-grid { gap: 8px; }
  .modal .booking-day-strip { grid-auto-columns: 50px; margin-bottom: 6px; }
  .modal .booking-day { padding: 5px 0 4px; }
  .modal .booking-day strong { font-size: 16px; }
  .modal:has(.booking-workflow) .booking-slot-origin { padding: 8px 10px; margin-top: 8px; margin-bottom: 0; }
  .modal:has(.booking-workflow) .workspace-save-actions { position: sticky; bottom: 0; z-index: 2; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface, #fff); border-top: 1px solid var(--line-2, #eceef2); }
}
@media (max-width: 767px) and (max-height: 760px) {
  .modal .booking-layout h3 { display: none; }
}

/* Phone booking sheet v2: everything needed to book fits one screen (iPhone 13: 664px tall). */
@media (max-width: 767px) {
  .modal .booking-slim .sr-label, .modal .booking-slim .booking-selection .workspace-field > span, .modal .booking-slim .customer-new .workspace-field > span, .modal .booking-slim .booking-time-picker .workspace-field > span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .modal .booking-slim.booking-layout > .booking-col > section { padding: 8px 14px; }
  .modal .booking-slim .booking-section-head { margin: 0 0 6px; min-height: 0; }
  .modal .booking-slim .booking-section-head h3 { font-size: 12px; margin: 0; }
  .modal .booking-slim .booking-walkin { padding: 4px 10px; min-height: 30px; font-size: 12.5px; }
  .modal .booking-slim .booking-layout h3, .modal .booking-slim h3#booking-when-heading, .modal .booking-slim h3#booking-service-heading { display: none; }
  /* Customer: search + name/mobile side by side, no card */
  .modal .booking-slim .customer-picker { gap: 6px; }
  .modal .booking-slim .customers-search input { min-height: 38px !important; }
  .modal .booking-slim .customer-new { padding: 0; background: none; border: 0; margin: 0; }
  .modal .booking-slim .customer-new-title { display: none; }
  .modal .booking-slim .customer-new .workspace-form-grid { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .modal .booking-slim .customer-new input { min-height: 38px !important; }
  .modal .booking-slim .booking-confirm-switch { padding: 4px 0 0; min-height: 0; }
  .modal .booking-slim .booking-confirm-switch small { display: none; }
  /* Service + barber side by side */
  .modal .booking-slim .booking-selection .workspace-form-grid { grid-template-columns: 1.3fr 1fr !important; gap: 6px !important; }
  .modal .booking-slim .booking-selection select { min-height: 38px !important; font-size: 14px; padding-left: 10px; }
  .modal .booking-slim .workspace-quote { margin: 6px 0 0; font-size: 12.5px; }
  /* Add-ons: one swipeable row */
  .modal .booking-slim .booking-addons { margin: 6px 0 0 !important; display: flex !important; gap: 6px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .modal .booking-slim .booking-addons legend { display: none; }
  .modal .booking-slim .booking-addons .addon-chip { flex: none; min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
  /* Time: date pill + time select on one row; the summary bar already shows the chosen time */
  .modal .booking-slim .booking-when { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: center; }
  .modal .booking-slim .booking-when > * { grid-column: 1 / -1; }
  .modal .booking-slim .booking-when > .booking-date-row { grid-column: 1; margin: 0; }
  .modal .booking-slim .booking-when > .booking-time-picker { grid-column: 2; margin: 0; padding: 0; border: 0; background: none; }
  .modal .booking-slim .booking-date-row .booking-day { min-height: 38px; padding: 0 10px; }
  .modal .booking-slim .booking-chosen-time { display: none; }
  .modal .booking-slim .booking-time-picker select { min-height: 38px !important; }
  .modal .booking-slim .booking-day-strip { grid-column: 1 / -1; }
  .modal .booking-slim .booking-more { padding-top: 0 !important; padding-bottom: 0 !important; }
  .modal .booking-slim .booking-more-toggle { min-height: 40px; padding: 6px 0; }
  .modal .booking-slim .booking-more-summary { font-size: 12px; }
  .modal:has(.booking-slim) .booking-summary-bar small, .modal:has(.booking-slim) .booking-summary-bar .badge { font-size: 11.5px; }
  .modal:has(.booking-slim) .workspace-save-actions { padding-top: 8px !important; padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }

  /* Block: date / from / until on one row, compact actions side by side */
  .modal .block-dialog .workspace-form-grid { display: grid !important; grid-template-columns: 1.35fr 1fr 1fr !important; gap: 6px !important; }
  .modal .block-dialog .workspace-field { gap: 4px; margin: 0; }
  .modal .block-dialog .workspace-field > span { font-size: 11.5px; }
  .modal .block-dialog fieldset { gap: 10px; }
  .modal .block-dialog .workspace-save-actions { display: grid !important; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 8px 0 0 !important; border: 0; box-shadow: none; }
  .modal .block-dialog .workspace-save-actions .button { min-height: 44px; width: 100%; }
  .modal .block-dialog .workspace-save-actions .button.primary { order: 2; }
  .modal .block-dialog .workspace-footnote { display: none; }
}

/* Settings → Holding a space */
.slot-hold-setting { display: grid; gap: 10px; margin-bottom: 8px; }
.slot-hold-setting .block-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-hold-setting .workspace-field { max-width: 220px; }

/* ==========================================================================
   Appointment panel v3: cancel / no-show / reschedule happen in the header (never scrolls)
   ========================================================================== */
.panel-confirm-inline, .panel-move { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line, #e3e5e9); background: var(--surface-2, #f7f8fa); display: grid; gap: 10px; animation: panelStepIn .14s ease-out; }
@keyframes panelStepIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.panel-confirm-inline.cancel { background: #fff7f6; border-color: #f3c7c2; }
.panel-confirm-inline.noshow { background: #fff8f0; border-color: #f5d3ad; }
.panel-confirm-inline > strong, .panel-move-head strong { font-size: 15px; letter-spacing: -.01em; }
.panel-confirm-hint { color: var(--muted, #6b7280); font-size: 12.5px; margin-top: -4px; }
.panel-confirm-hint.warn { color: #b45309; }
.panel-confirm-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.panel-confirm-actions .button { min-height: 44px; justify-content: center; }
.panel-confirm-inline .panel-tell, .panel-move .panel-tell { margin: 0; padding: 8px 10px; background: var(--surface, #fff); border-radius: 10px; border: 1px solid var(--line, #e3e5e9); }
.panel-confirm-inline .panel-radio { display: grid; gap: 6px; }
.panel-header-error { margin: 8px 0 0; }
.panel-move-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel-move-head small { color: var(--muted, #6b7280); font-size: 12.5px; }
.panel-move-grid { display: grid; grid-template-columns: 1.25fr 1fr 1.2fr; gap: 8px; }
.panel-move-field { display: grid; gap: 4px; margin: 0; min-width: 0; }
.panel-move-field > span { font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7280); }
.panel-move-field input, .panel-move-field select { width: 100%; min-width: 0; min-height: 42px; border-radius: 10px; font-size: 14px; }
.panel-move-more { justify-self: center; font-size: 12.5px; }
/* Visit signals in words, matching the calendar icons */
.channel-badge.flag-first { background: #eef6ff; color: #1d4ed8; }
.channel-badge.flag-fav { background: #fff0f3; color: #be123c; }
.channel-badge.flag-req { background: #f3f0ff; color: #6d28d9; }
.panel-title-row { flex-wrap: wrap; row-gap: 6px; }

@media (max-width: 900px) {
  /* One row of three quick actions; shorter labels never wrap. */
  .panel-quick { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px; }
  .panel-quick-btn { font-size: 13.5px; gap: 5px; padding: 8px 4px; min-width: 0; }
  .panel-quick-btn svg { flex: none; }
  .panel-title-row { gap: 5px; }
  .panel-title-row .badge, .panel-title-row .channel-badge { font-size: 10.5px; padding: 3px 7px; }
  .panel-subtitle { margin: 2px 0 0; font-size: 12.5px; }
  .panel-confirm-inline, .panel-move { margin-top: 10px; padding: 10px 12px; gap: 8px; }
  .panel-move-grid { grid-template-columns: 1fr 1fr; }
  .panel-move-time { grid-column: 1 / -1; }
  /* While a step is open the sheet focuses on it: the details underneath dim. */
  .appointment-panel:has(.panel-confirm-inline, .panel-move) .panel-body { opacity: .45; pointer-events: none; }
  .appointment-panel:has(.panel-confirm-inline, .panel-move) .panel-actions { display: none; }
  /* Footer: Checkout full width, then Move / Book again / ⋯ on one row. */
  .panel-customer { padding: 12px; }
  .panel-card { padding: 12px; }
}
@media (min-width: 901px) {
  .appointment-panel:has(.panel-confirm-inline, .panel-move) .panel-body { opacity: .55; }
  .appointment-panel:has(.panel-confirm-inline, .panel-move) .panel-actions { opacity: .45; pointer-events: none; }
}
/* Tick + words on one row (the global label rule is a column). */
.panel-confirm-inline .panel-tell, .panel-move .panel-tell { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; }
.panel-confirm-inline .panel-tell input, .panel-move .panel-tell input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--accent, #00805c); }
.panel-confirm-inline .panel-tell span, .panel-move .panel-tell span { display: grid; gap: 1px; }
.panel-confirm-inline .panel-tell small, .panel-move .panel-tell small { color: var(--muted, #6b7280); font-size: 12px; }
.panel-confirm-inline .button.danger { background: #b42318; color: #fff; border-color: #b42318; }


/* ==========================================================================
   Dropdowns v2: chosen value centred vertically in every box, chevron centred, menu lined up
   Chrome/Edge render selects as a flex box (appearance: base-select) whose text sat at the top
   whenever the box was taller than the text. Safari/Firefox (appearance: none) get matching
   padding and line-height so the text lands in the same place.
   ========================================================================== */
select { line-height: 1.25; }
.workspace select:not([multiple]), .ca-form select, .group-member select, .modal select, .booking-app select, .customer-area select, .admin select {
  padding-top: 0; padding-bottom: 0; vertical-align: middle;
}
@supports (appearance: base-select) {
  select:not([multiple]) { align-items: center; }
  select:not([multiple]) > button, select:not([multiple]) selectedcontent { display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  select:not([multiple])::picker-icon { align-self: center; margin-inline-start: auto; }
  /* The open menu is at least as wide as the box and starts at its left edge. */
  select::picker(select) { min-width: anchor-size(width); }
}
@supports not (appearance: base-select) {
  /* Fixed-height boxes: let the browser centre the single line itself. */
  .workspace select:not([multiple]), .ca-form select, .group-member select, .modal select { line-height: normal; }
}
/* Move-on-the-calendar bar: two tidy lines, works on phones. */
.move-bar span { display: grid; gap: 2px; min-width: 0; }
.move-bar span small { color: var(--muted, #5d616c); font-size: 12.5px; line-height: 1.35; }
@media (max-width: 767px) {
  .move-bar { position: sticky; top: 0; z-index: 30; margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 8px 24px rgba(14, 17, 26, .12); background: #fff; border-color: var(--accent-fill, #00e8b0); }
  .move-bar > svg { display: none; }
  .move-bar .button { min-height: 40px; padding: 0 12px; }
}

/* Hold link ready: sent / not sent + copy link */
.hold-ready { display: grid; gap: 12px; }
.hold-ready-status { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.hold-ready-status svg { flex: none; margin-top: 2px; }
.hold-ready-status.ok { background: color-mix(in srgb, #16a34a 10%, transparent); color: #166534; }
.hold-ready-status.warn { background: color-mix(in srgb, #f59e0b 14%, transparent); color: #92400e; }
.hold-link { display: flex; gap: 8px; align-items: center; }
.hold-link input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; font-size: 13px; text-overflow: ellipsis; }
.hold-link .button { flex: none; white-space: nowrap; }
@media (max-width: 560px) { .hold-link { flex-direction: column; align-items: stretch; } .hold-link .button { justify-content: center; } }
/* Offer page: why we ask for an account */
.held-why { margin: 0 0 4px; font-size: 14px; color: var(--muted, #6b7280); line-height: 1.45; }
/* Sidebar group headings: readable contrast on the dark rail (WCAG AA) */
.sidebar-group { color: rgba(255,255,255,.62); }
html:not(.ws-dark) .sidebar.light .sidebar-group { color: var(--muted); }
/* Offer page account tabs: unselected tab text meets AA contrast on the grey track */
.held-tabs button { color: #3f4652; }
.held-tabs button[aria-selected=true] { color: var(--ink, #0b0b0c); }

/* ==========================================================================
   Appointment panel steps: "Change service" and "Checkout" take over the sheet,
   laid out to fit without scrolling; their buttons are pinned at the bottom.
   ========================================================================== */
.appointment-panel.in-step .panel-header { padding-bottom: 10px; }
.panel-body.is-step { display: flex; flex-direction: column; gap: 10px; padding-bottom: 0; }
.panel-body.is-step > .panel-step, .panel-body.is-step > .checkout { flex: 1 0 auto; display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.panel-step-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel-step-head strong { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; letter-spacing: -.01em; }
.panel-step-head small { color: var(--muted); font-size: 12.5px; }
.panel-step .panel-items-editor { flex: 1 0 auto; display: flex; flex-direction: column; gap: 10px; }
.panel-step .items-editor-row { grid-template-columns: 1fr 1fr; gap: 10px; }
.panel-step .panel-reason { gap: 4px; margin: 0; }
.panel-step .panel-reason > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.panel-step .panel-reason input, .panel-step .panel-reason select { min-height: 42px; font-size: 14px; }
.panel-step .items-stepper { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 6px; width: 100%; }
.panel-step .items-stepper button { width: 42px; height: 42px; border-radius: 10px; }
.panel-step .items-stepper input { width: 100%; min-height: 42px; font-size: 14px; }
.panel-step .items-addons { padding: 6px 10px 8px; gap: 4px; }
.panel-step .items-editor-total { margin-top: auto; padding-top: 10px; }

/* Pinned bottom actions for a step (Back/Cancel + the main button). */
.step-actions {
  position: sticky; bottom: 0; z-index: 4; margin: auto -20px 0; padding: 10px 20px calc(10px + var(--sheet-safe-bottom, 0px));
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center;
  background: var(--surface, #fff); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(14, 17, 26, 0.05);
}
.step-actions .button { min-height: 48px; justify-content: center; border-radius: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-actions > .button:only-child { grid-column: 1 / -1; }

/* Checkout, compact */
.checkout .checkout-head { display: none; }
.checkout .checkout-lines { gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #f6f7f9); }
.checkout .checkout-lines > div { min-height: 30px; }
.checkout .checkout-discount .checkout-money-input { height: 32px; }
.checkout .checkout-due { padding-top: 6px; }
.checkout .checkout-due dd { font-size: 22px; }
.checkout fieldset { gap: 6px; }
.checkout legend { margin-bottom: 4px; font-size: 12px; }
.checkout .checkout-chips { flex-wrap: nowrap; gap: 6px; }
.checkout .checkout-chips .chip { flex: 1 1 0; min-width: 0; padding: 0 6px; height: 38px; justify-content: center; }
.checkout .checkout-chips .chip-input { flex: 1.3 1 0; min-width: 0; height: 38px; }
.checkout .checkout-chips .chip-input input { width: 100%; }
.checkout .method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.checkout .method-tile { min-height: 0; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.checkout .method-tile svg { margin: 0; }
.checkout .method-tile b { font-size: 12.5px; white-space: nowrap; }
.checkout .helper { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.checkout-extras { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; }
.checkout-extras .checkout-more summary, .checkout-extras .checkout-note-add { padding: 4px 0; font-size: 13px; }
.checkout-extras .checkout-note { flex: 1 1 100%; }
.checkout-extras .checkout-more[open] { flex: 1 1 100%; }
.checkout .checkout-reader-tip { margin: 0; padding: 8px 10px 10px; }
.checkout .checkout-reader-tip .checkout-chips { flex-wrap: wrap; }
.checkout .checkout-reader-tip .chip { flex: 0 1 auto; }
.checkout .card-at-chair { margin: 0; }

@media (max-width: 900px) {
  .step-actions { margin: auto -12px 0; padding-left: 12px; padding-right: 12px; }
  .panel-body.is-step { padding-left: 12px; padding-right: 12px; }
  .appointment-panel.in-step .panel-subtitle { display: none; }
  .appointment-panel.in-step .panel-title-row { margin-bottom: 4px; }
  .checkout .checkout-lines > div { min-height: 26px; }
}
@media (max-width: 380px) {
  .checkout .checkout-chips { flex-wrap: wrap; }
  .checkout .checkout-chips .chip-input { flex-basis: 100%; }
}
/* Phone: the everyday sheet fits too (customer card, visit card, More link) */
@media (max-width: 900px) {
  .appointment-panel .panel-body:not(.is-step) { gap: 8px; padding-top: 8px; }
  .appointment-panel .panel-more-toggle { padding-top: 10px; padding-bottom: 10px; }
}

/* ==========================================================================
   ⋯ menu moved to the header: sits at the end of Reschedule / No-show / Cancel
   (or next to Close when there are no quick actions) and opens downwards.
   Footer: Checkout / Change service / Book again on one even row.
   ========================================================================== */
.panel-quick.has-more, .appointment-panel .panel-quick.has-more { display: flex !important; gap: 8px; align-items: stretch; }
.panel-quick.has-more > .panel-quick-btn { flex: 1 1 0; min-width: 0; }
.panel-quick.has-more > .panel-more, .panel-title-actions > .panel-more { flex: 0 0 auto; margin: 0; position: relative; }
.panel-quick.has-more > .panel-more summary { width: 48px; height: 100%; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line, #e3e3e6); background: #fff; }
.panel-quick.has-more > .panel-more summary:hover { border-color: var(--ink, #0b0b0c); }
.panel-title-actions { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.panel-title-actions > .panel-more summary { width: 40px; height: 40px; border-radius: 12px; }
.appointment-panel .panel-quick .panel-more-menu, .appointment-panel .panel-title-actions .panel-more-menu {
  top: calc(100% + 6px); bottom: auto; right: 0; left: auto; z-index: 60; min-width: 240px; max-width: calc(100vw - 24px);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(14, 17, 26, 0.18);
}
.panel-more[open] > summary { border-color: var(--ink, #0b0b0c); background: var(--surface-2, #f4f5f7); }
.appointment-panel .panel-header { position: relative; z-index: 5; overflow: visible; }

@media (min-width: 901px) {
  .appointment-panel .panel-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
  .appointment-panel .panel-actions > .button { flex: 1 1 0; min-width: 0; justify-content: center; min-height: 44px; border-radius: 12px; white-space: nowrap; }
  .appointment-panel .panel-actions > .button:first-child { flex-grow: 1.4; }
}
@media (max-width: 900px) {
  .panel-quick.has-more { gap: 6px; }
  .panel-quick.has-more > .panel-more summary { width: 44px; }
  .appointment-panel .panel-actions > .button:first-child:not(:only-child) { flex: 1 1 100%; }
}

/* Choice dialog (e.g. keep / remove the out-of-hours charge): big tappable answers */
.ask-choices { display: grid; gap: 8px; margin: 4px 0 4px; }
.ask-choice { display: grid; gap: 2px; text-align: left; width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line, #e3e3e6); border-radius: 12px; background: #fff; color: var(--ink, #0b0b0c); font: inherit; cursor: pointer; }
.ask-choice strong { font-size: 15px; font-weight: 650; }
.ask-choice small { color: var(--muted, #6b7280); font-size: 12.5px; }
.ask-choice:hover { border-color: var(--ink, #0b0b0c); }
.ask-choice.primary { border-color: var(--accent, #00805c); background: color-mix(in srgb, var(--accent, #00805c) 8%, #fff); }
.ask-choice:focus-visible { outline: 2px solid var(--accent, #00805c); outline-offset: 2px; }
/* Phone number in the customer footer reads as a link (WCAG link-in-text-block) */
.sp-footer a[href^="tel:"] { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Pop-up messages v2: top centre, out of the way of bottom action buttons
   (Checkout, Save, Book…). They never block a tap: only their own buttons
   (Undo, Retry, ×) take clicks. Plain "Saved." clears in 2.5 s.
   ========================================================================== */
[data-toast] {
  top: calc(14px + var(--toast-stack, 0px)) !important; bottom: auto !important;
  left: 50% !important; right: auto !important; transform: translateX(-50%);
  max-width: min(460px, calc(100vw - 24px)); width: max-content;
  pointer-events: none;
}
[data-toast] button, [data-toast] a, [data-toast] .button { pointer-events: auto; }
@keyframes toast-in-top { from { opacity: 0; transform: translate(-50%, -8px) scale(.98); } to { opacity: 1; transform: translateX(-50%); } }
[data-toast] { animation: toast-in-top .2s cubic-bezier(.2, .8, .2, 1) both; }
[data-toast="ok"]:not([data-keep]) { animation: toast-in-top .2s cubic-bezier(.2, .8, .2, 1) both, foliyo-notice-out .3s ease 2.3s forwards; }
[data-toast="ok"]:has(.undo-button) { animation: toast-in-top .2s cubic-bezier(.2, .8, .2, 1) both, foliyo-notice-out .3s ease 7.7s forwards; }
@media (max-width: 767px) {
  [data-toast] { top: calc(64px + env(safe-area-inset-top, 0px) + var(--toast-stack, 0px)) !important; bottom: auto !important; left: 50% !important; right: auto !important; width: calc(100vw - 24px); }
}

/* Phone calendar cards: icons always stay visible. On a one-line card the service text gives way
   first (ellipsis), and the icons sit pinned at the right edge instead of being pushed off. */
@media (max-width: 767px) {
  .workspace .connected-calendar .calendar-event strong { display: flex; align-items: center; gap: 0; min-width: 0; white-space: nowrap; overflow: hidden; }
  .workspace .connected-calendar .calendar-event strong > time { flex: 0 0 auto; margin-right: 4px; }
  .workspace .connected-calendar .calendar-event strong .event-inline { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace .connected-calendar .calendar-event strong .event-inline-icons { flex: 0 0 auto; margin-left: auto; padding-left: 4px; }
}
@media (max-width: 767px) {
  .workspace .connected-calendar .calendar-event strong .event-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Phone cards with room: a long customer name wraps to a second line instead of being cut off. */
@media (max-width: 767px) {
  .workspace .connected-calendar .calendar-event strong.wrap-name { align-items: flex-start; white-space: normal; }
  .workspace .connected-calendar .calendar-event strong.wrap-name > time,
  .workspace .connected-calendar .calendar-event strong.wrap-name .event-inline-icons { align-self: flex-start; }
  .workspace .connected-calendar .calendar-event strong.wrap-name .event-name { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: clip; }
}

/* Appointment cards fill their barber column: an old fixed width (100% - 12px) was overriding
   left/right and leaving a gap on the right. Overlapping cards keep their inline lane width. */
.workspace .connected-calendar .calendar-event:not(.overlapping) { left: 2px; right: 2px; width: auto; }

/* Booked time: no grey wash behind appointments — the slot under a card looks like any other
   working slot, so only the appointment colour shows. */
.workspace .timetable-slot.occupied { background: transparent; }
.workspace .timetable-slot.occupied span { color: inherit; }

/* Settings: no grey boxes. Barber cards, notes, rows and panels inside Settings are white with a
   thin outline, so the page reads as one clean surface. (Switches and code chips keep their tint.) */
.workspace .settings-body .account-member,
.workspace .settings-body .notice:not(.warning):not(.error):not(.success),
.workspace .settings-body .week-hours-row,
.workspace .settings-body .customer-pages > li,
.workspace .settings-body .billing-timeline > li,
.workspace .settings-body .billing-addons > li,
.workspace .settings-body .switch-row,
.workspace .settings-body .billing-card-row,
.workspace .settings-body .tpl,
.workspace .settings-body .payments-card,
.workspace .settings-body .review-ask,
.workspace .settings-body .review-ack,
.workspace .settings-body .sms-bill-ack,
.workspace .settings-body label.workspace-toggle,
.workspace .settings-body small.helper,
.workspace .settings-body .rem-chip {
  background: var(--surface, #fff) !important;
  border: 1px solid var(--line, #e7e8ee) !important;
  box-shadow: none !important;
}
.workspace .settings-body small.helper { border: 0 !important; padding-left: 0; padding-right: 0; }

/* Settings side menu: a white panel with a thin outline (matching the Settings boxes) instead of
   sitting on the grey page. Selected item gets the light green tint; hover is a faint tint, not grey. */
.workspace .settings-nav {
  background: var(--surface, #fff) !important;
  border: 1px solid var(--line, #e7e8ee) !important;
  border-radius: 16px;
  padding: 8px !important;
  box-shadow: none !important;
}
.workspace .settings-nav button[role="tab"]:hover { background: color-mix(in srgb, var(--accent, #00b894) 6%, #fff); }
.workspace .settings-nav button[role="tab"][aria-selected="true"] {
  background: var(--mint-soft, color-mix(in srgb, var(--accent, #00b894) 12%, #fff)) !important;
  box-shadow: inset 2px 0 0 var(--accent-fill, var(--accent)) !important;
}
.workspace .settings-nav .settings-nav-label:hover,
.workspace .settings-nav-group[data-open="true"] .settings-nav-label { background: transparent; }

/* Settings page background: white instead of the grey app canvas. The panels get a thin outline
   (instead of relying on the grey to stand out) so sections stay clearly separated. */
html:has(.settings-shell),
body:has(.settings-shell),
.workspace:has(.settings-shell) { background: var(--surface, #fff) !important; }
.workspace .settings-body .workspace-panel,
.workspace .settings-body .panel-card,
.workspace .settings-body > section {
  border: 1px solid var(--line, #e7e8ee) !important;
  box-shadow: none !important;
}

/* ---- Side bar finish (Settings → Diary & policies → Your workspace look) ----
   "Lit black": near-black base with a soft light falling from the top corner and a faint diagonal
   beam (set per finish in --ws-rail-bg). A thin light edge on the right fades out downwards, and the
   selected item is a glass pill with a hairline top highlight. "Black" = no class. */
html.ws-rail-lit .workspace .sidebar.rail,
html.ws-rail-lit .workspace .rail {
  background: var(--ws-rail-bg) !important;
  border-right: 0 !important;
  box-shadow: none;
}
html.ws-rail-lit .workspace .sidebar.rail::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.06) 35%, rgba(255,255,255,.03) 100%);
}
html.ws-rail-lit .workspace .sidebar.rail .sidebar-item { border: 1px solid transparent; }
html.ws-rail-lit .workspace .sidebar.rail .sidebar-item:hover { background: rgba(255,255,255,.05); color: #fff; }
html.ws-rail-lit .workspace .sidebar.rail .sidebar-item[aria-current] {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.035)) !important;
  border-color: rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 2px rgba(0,0,0,.4) !important;
  color: #fff;
}
html.ws-rail-lit .workspace .sidebar.rail .sidebar-item[aria-current] svg { color: #fff; }
html.ws-rail-lit .sidebar-bottom { border-top-color: rgba(255,255,255,.08); }
html.ws-rail-lit .sidebar-group { color: rgba(255,255,255,.42); }
html.ws-rail-lit .workspace .sidebar.rail .sidebar-toggle:hover { background: rgba(255,255,255,.06); }

/* The picker: small side-bar previews with a name under each. */
.ws-rails { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.ws-rail-swatch { display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.ws-rail-chip { position: relative; width: 100%; height: 64px; border-radius: 12px; display: grid; align-content: start; gap: 5px; padding: 10px 9px; box-shadow: 0 1px 2px rgba(14,15,18,.12); border: 2px solid transparent; overflow: hidden; }
.ws-rail-chip i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.5); }
.ws-rail-chip i:nth-child(1) { width: 70%; background: rgba(255,255,255,.85); }
.ws-rail-chip i:nth-child(2) { width: 55%; }
.ws-rail-chip i:nth-child(3) { width: 62%; }
.ws-rail-chip svg { position: absolute; right: 6px; bottom: 6px; color: #fff; }
.ws-rail-swatch[aria-checked="true"] .ws-rail-chip { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.ws-rail-swatch:focus-visible .ws-rail-chip { outline: 2px solid var(--accent); outline-offset: 3px; }
.ws-rail-name { font-size: var(--fs-12); font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.ws-rail-swatch[aria-checked="true"] .ws-rail-name { color: var(--ink); }

/* ---- Buttons follow the side bar finish (lit finishes only; "Black" keeps the green buttons) ----
   Main buttons become dark glass like the side bar: near-black gradient, hairline light border,
   a bright top edge and a faint halo in the finish's light colour (--ws-glow = "r,g,b"). */
html.ws-rail-lit .workspace .button.primary,
html.ws-rail-lit .modal .button.primary {
  background: linear-gradient(180deg, #2b2c31 0%, #151619 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 0 0 1px rgba(0,0,0,.6),
    0 6px 18px -8px rgba(var(--ws-glow), .55),
    0 1px 2px rgba(0,0,0,.25) !important;
  transition: background .15s, box-shadow .15s, transform .05s;
}
html.ws-rail-lit .workspace .button.primary:hover,
html.ws-rail-lit .modal .button.primary:hover {
  background: linear-gradient(180deg, #34363c 0%, #1b1c20 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 0 0 1px rgba(0,0,0,.6),
    0 8px 22px -8px rgba(var(--ws-glow), .7),
    0 1px 2px rgba(0,0,0,.25) !important;
}
html.ws-rail-lit .workspace .button.primary:active,
html.ws-rail-lit .modal .button.primary:active { transform: translateY(1px); }
html.ws-rail-lit .workspace .button.primary:focus-visible,
html.ws-rail-lit .modal .button.primary:focus-visible {
  outline: 2px solid rgba(var(--ws-glow), .8); outline-offset: 2px;
}
html.ws-rail-lit .workspace .button.primary:disabled,
html.ws-rail-lit .modal .button.primary:disabled { opacity: .5; box-shadow: none !important; }
html.ws-rail-lit .workspace .button.primary svg,
html.ws-rail-lit .modal .button.primary svg { color: #fff; }
/* Phone: the round + button in the bottom bar gets the same finish. */
html.ws-rail-lit .tabbar .tab-fab span {
  background: linear-gradient(180deg, #2b2c31 0%, #111214 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px -6px rgba(var(--ws-glow), .6), 0 2px 6px rgba(0,0,0,.25);
}

/* ---- Side menu scrolls (desktop rail and phone drawer), with no visible scroll bar ---- */
.workspace .sidebar.rail {
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: none; -ms-overflow-style: none;
}
.workspace .sidebar.rail::-webkit-scrollbar { display: none; width: 0; height: 0; }
.workspace .sidebar.rail > * { flex-shrink: 0; }
.workspace .sidebar.rail > .rail-spacer { flex: 1 1 0; min-height: 8px; }
/* Hover labels on the narrow rail live outside the scrolling menu (fixed, placed by JS). */
.workspace .sidebar.rail.collapsed .sidebar-item .rail-tip,
.workspace .sidebar.rail .sidebar-item .rail-tip { position: fixed; left: var(--tip-x, 78px); top: var(--tip-y, 0); transform: translateY(-50%); z-index: 80; }
/* The lit finishes' light edge: painted on the box (not the scrolling content) so it stays put. */
html.ws-rail-lit .workspace .sidebar.rail::after { display: none; }
html.ws-rail-lit .workspace .sidebar.rail { box-shadow: inset -1px 0 0 rgba(255,255,255,.09) !important; }

/* ---- Phone top bar: the wallet stretches to fill the space next to the logo ----
   The amount is never cut; the caption takes whatever room is left and ends with "…" only when
   it has to. Wider phones (iPhone 17 / Pro Max) simply show more of the caption. */
@media (max-width: 767px) {
  .workspace .topbar .brand { margin-right: 0 !important; }
  .workspace .topbar .wallet-chip { flex: 1 0 auto !important; max-width: none !important; min-width: 0; justify-content: flex-start; }
  .workspace .topbar .wallet-chip > span:not(.chip-ic) { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-align: left; }
  .workspace .topbar .wallet-chip b { white-space: nowrap; }
  .workspace .topbar .wallet-chip small { max-width: none !important; width: 0; min-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== Appointment cards: subtle glass (calendar day view + week view) =====
   Same colour names as before, each now set as one accent (--ev). The card is a translucent tint
   of it with a soft white sheen at the top, a hairline edge in the same colour, a bright inner top
   highlight and a faint coloured shadow, so it reads like tinted glass instead of flat paint.
   Text is a deep shade of the accent. Finished and no-show keep their own styles. */
.workspace .calendar-event.sage,  .workspace .week-card.sage  { --ev: #00b386; }
.workspace .calendar-event.sand,  .workspace .week-card.sand  { --ev: #f59e0b; }
.workspace .calendar-event.blue,  .workspace .week-card.blue  { --ev: #2b7fff; }
.workspace .calendar-event.clay,  .workspace .week-card.clay  { --ev: #f05252; }
.workspace .calendar-event.plum,  .workspace .week-card.plum  { --ev: #7c5cff; }
.workspace .calendar-event.slate, .workspace .week-card.slate { --ev: #5b6b82; }
.workspace .calendar-event.mint,  .workspace .week-card.mint  { --ev: #10b981; }
.workspace .calendar-event.coral, .workspace .week-card.coral { --ev: #f7704f; }
.workspace .calendar-event.gold,  .workspace .week-card.gold  { --ev: #d4a106; }
.workspace .calendar-event.teal,  .workspace .week-card.teal  { --ev: #0fb3a8; }
.workspace .calendar-event.rose,  .workspace .week-card.rose  { --ev: #e8508a; }
.workspace .calendar-event.ink,   .workspace .week-card.ink   { --ev: #3d4656; }

.workspace :is(.calendar-event, .week-card):is(.sage,.sand,.blue,.clay,.plum,.slate,.mint,.coral,.gold,.teal,.rose,.ink):not(.finished):not(.done):not(.no-show) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.28) 55%, rgba(255,255,255,.12) 100%),
    color-mix(in srgb, var(--ev) 15%, #fff);
  border: 1px solid color-mix(in srgb, var(--ev) 26%, transparent);
  border-left: 3px solid var(--ev);
  color: color-mix(in srgb, var(--ev) var(--ev-body, 58%), #0b0b0c);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 color-mix(in srgb, var(--ev) 10%, transparent),
    0 1px 2px color-mix(in srgb, var(--ev) 16%, transparent),
    0 6px 14px -8px color-mix(in srgb, var(--ev) 45%, transparent);
  transition: box-shadow .15s, transform .15s, background .15s;
}
.workspace :is(.calendar-event, .week-card):is(.sage,.sand,.blue,.clay,.plum,.slate,.mint,.coral,.gold,.teal,.rose,.ink):not(.finished):not(.done):not(.no-show) :is(strong, time, .event-name) {
  color: color-mix(in srgb, var(--ev) var(--ev-head, 66%), #0b0b0c);
}
/* Light accents need darker text to stay easy to read. */
.workspace :is(.calendar-event, .week-card):is(.sand, .gold) { --ev-head: 48%; --ev-body: 44%; }
.workspace :is(.calendar-event, .week-card):is(.mint, .teal, .sage) { --ev-head: 58%; --ev-body: 52%; }
.workspace .calendar-event:is(.sage,.sand,.blue,.clay,.plum,.slate,.mint,.coral,.gold,.teal,.rose,.ink):not(.finished):not(.no-show):hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 4px color-mix(in srgb, var(--ev) 18%, transparent),
    0 10px 22px -10px color-mix(in srgb, var(--ev) 60%, transparent);
}
/* Finished: the same glass, in neutral grey. */
.workspace .calendar-event.finished, .workspace .week-card.done {
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.3)), #eef0f3;
  border: 1px solid rgba(100,110,125,.18);
  border-left: 3px solid #a9afba;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(14,15,18,.05);
}
/* Overlapping cards keep a thin white gap between them. */
.workspace .calendar-event.overlapping:not(.no-show) { outline: 1px solid #fff; outline-offset: 0; }

/* ===== Appointment cards: flat glass (no 3D) =====
   Keeps the brighter colours and coloured hairline edge, but drops the top shine and the
   lifted shadow so cards sit flat on the calendar. */
.workspace :is(.calendar-event, .week-card):is(.sage,.sand,.blue,.clay,.plum,.slate,.mint,.coral,.gold,.teal,.rose,.ink):not(.finished):not(.done):not(.no-show) {
  background: color-mix(in srgb, var(--ev) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--ev) 22%, transparent);
  border-left: 3px solid var(--ev);
  box-shadow: none;
  transition: background .15s, border-color .15s;
}
.workspace :is(.calendar-event, .week-card):is(.sage,.sand,.blue,.clay,.plum,.slate,.mint,.coral,.gold,.teal,.rose,.ink):not(.finished):not(.done):not(.no-show):hover {
  background: color-mix(in srgb, var(--ev) 16%, #fff);
  border-color: color-mix(in srgb, var(--ev) 34%, transparent);
  border-left-color: var(--ev);
  box-shadow: none;
}
.workspace .calendar-event.finished, .workspace .week-card.done {
  background: #f2f3f5;
  border: 1px solid rgba(100,110,125,.16);
  border-left: 3px solid #a9afba;
  box-shadow: none;
}
/* Online booking: a day where only out-of-hours time is open reads "Out of hours" in orange, not as a normal open day. */
.booking-app .booking-dates button.ooh { border-color: #f59e0b; background: #fff7ed; }
.booking-app .booking-dates button.ooh > small { color: #b45309; font-weight: 600; }
.booking-app .booking-dates button.ooh::after { background: #f59e0b; }
.booking-app .booking-dates button.ooh.chosen { background: #f59e0b; border-color: #d97706; color: #fff; }
.booking-app .booking-dates button.ooh.chosen > small { color: #fff; }
/* Review replies: a barber's reply shows their small photo + first name; the shop's keeps the reply icon. */
.sp-review-reply { display: flex; align-items: flex-start; gap: 8px; }
.sp-review-reply > p { margin: 0; }
.sp-review-reply .sp-reply-photo { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; margin-top: 1px; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.18); }
.sp-review-reply .sp-reply-photo.initials { display: grid; place-items: center; background: var(--accent, #10b981); color: #fff; font-size: 11px; font-weight: 700; }
.sp-review-reply > svg { flex: none; margin-top: 3px; }
.rv2 .rv2-reply.by-barber strong { display: inline-flex; align-items: center; gap: 6px; }
