/* AZNA Bookings — native styles for Zizi's #bookingsSection.
   Everything is scoped under #bookingsSection (CSS nesting), and the booking
   palette is remapped onto Zizi's theme tokens (--paper/--card/--gold/--clay…)
   so it matches the app and follows the light/dark toggle. */

@keyframes bkShake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }

#bookingsSection {
  /* booking vars → Zizi tokens (bk- prefix avoids self-reference with Zizi's own --card/--line) */
  --bk-bg: var(--paper); --bk-panel: var(--paper-warm); --bk-card: var(--card); --bk-input: var(--paper-warm);
  --bk-hover: rgba(127,127,127,.10); --bk-hover2: rgba(127,127,127,.18);
  --bk-line: var(--line); --bk-hairline: rgba(127,127,127,.10);
  --bk-text: var(--ink); --bk-muted: var(--ink-soft); --bk-accent: var(--gold); --bk-teal: var(--gold); --bk-danger: var(--clay);
  --bk-radius: 10px;

  color: var(--bk-text);
  font: 14px/1.45 'Cera', ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: lining-nums tabular-nums; /* cap-height ("all caps") numbers, app-wide convention */
  position: relative;            /* anchors the phone team drawer + scrim */
  /* Zizi's .sec-view is flex:1, which ate our explicit height (grew to the tall calendar);
     flex:0 0 auto lets the fixed height win so the calendar scrolls INSIDE the section. */
  flex: 0 0 auto;
  height: calc(100dvh - 101px);  /* below the syncStrip (35px) + topbar (66px) */
  min-height: 460px;
  overflow: hidden;

  * { box-sizing: border-box; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  input, select, textarea { font: inherit; color: inherit; }

  .btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--bk-line); background: var(--bk-card); }
  .btn:hover { background: var(--bk-hover); }
  /* App convention (Sales page): teal buttons are OUTLINED — tinted dark fill,
     teal border, teal text — not solid teal. */
  .btn.primary { background: color-mix(in srgb, var(--bk-accent) 14%, transparent); color: var(--bk-accent); border-color: var(--bk-accent); font-weight: 600; }
  .btn.primary:hover { background: color-mix(in srgb, var(--bk-accent) 22%, transparent); opacity: 1; }
  .btn.danger { color: var(--bk-danger); border-color: color-mix(in srgb, var(--bk-danger) 40%, transparent); }
  .btn.sm { padding: 4px 10px; font-size: 13px; }
  .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
  .field label { font-size: 12px; font-weight: 600; color: var(--bk-muted); }
  .field input, .field select, .field textarea { padding: 8px 10px; border: 1px solid var(--bk-line); border-radius: 8px; background: var(--bk-input); }
  .row { display: flex; gap: 10px; }
  .row .field { flex: 1; }

  /* ---------- shell (native: #bkMain fills the section; no logo, no internal nav —
     Zizi's rail drives Calendar/Services/Customers) ---------- */
  #bkMain { display: flex; min-width: 0; width: 100%; height: 100%; }

  /* ---------- calendar ---------- */
  .subbar { width: 220px; border-right: 1px solid var(--bk-line); padding: 14px; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
  .subbar.subbar-team { justify-content: flex-start; }
  .subbar h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--bk-muted); margin: 4px 0 10px; text-align: center; }
  .team-item { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 182px; margin: 0 auto; padding: 7px 8px; border-radius: 8px; text-align: left; }
  .team-item:hover { background: var(--bk-hover); }
  .team-item.on { background: var(--bk-hover2); font-weight: 600; }
  .team-item .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--bk-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
  .team-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
  .team-item .gear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: 0; color: var(--bk-muted); padding: 2px; background: var(--bk-hover); border-radius: 6px; }
  .team-item:hover .gear { opacity: 1; }
  .team-item:hover .off-dot { opacity: 0; }
  .team-item .off-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a4d54; flex-shrink: 0; }
  .team-item .off-dot.live { background: #2fae4e; }
  .team-item .tck { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--bk-accent); cursor: pointer; }
  label.team-item { cursor: pointer; }
  .team-item .grip { position: absolute; left: 1px; top: 50%; transform: translateY(-50%); color: var(--bk-muted); font-size: 11px; letter-spacing: -1px; cursor: grab; opacity: 0; }
  .team-item:hover .grip { opacity: .55; }
  /* Day view: compact multi-select pills (replaces the checkbox list) */
  .team-pills { display: flex; flex-direction: column; gap: 7px; }
  .team-pill { width: 100%; text-align: center; padding: 7px 12px; border-radius: 999px; background: var(--bk-input); border: 1px solid var(--bk-line); color: var(--bk-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: border-color .12s, background .12s; }
  .team-pill:hover { border-color: var(--bk-accent); color: var(--bk-text); }
  .team-pill.on { background: rgba(76,187,181,.20); border-color: #4cbbb5; color: #9beee7; font-weight: 600; }
  :root[data-theme="light"] .team-pill.on { color: #0d6b64; } /* pale teal text is unreadable on light */

  .cal-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .cal-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--bk-line); position: relative; }
  .cal-head-l { flex: 1; display: flex; align-items: center; gap: 8px; }
  .cal-head-r { flex: 1; display: flex; justify-content: flex-end; gap: 8px; }
  /* Date bar centered under the OWL (page center), not the calendar area: the 220px
     team sidebar sits left of the header, so pull left by half of it (110px). */
  .cal-nav { display: flex; align-items: center; gap: 8px; position: absolute; left: calc(50% - 110px); top: 50%; transform: translate(-50%, -50%); }
  .cal-locked .cal-nav { left: 50%; } /* stylist view has no sidebar */
  .cal-add { font-size: 17px; line-height: 1; padding: 6px 13px; font-weight: 700; }
  .cal-title { font-size: 16px; font-weight: 700; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
  .cal-title:hover { background: var(--bk-hover); }
  .date-pop { position: fixed; z-index: 60; width: 264px; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.55); padding: 12px; }
  .date-pop .dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
  .date-pop .dp-head button { padding: 4px 10px; border-radius: 6px; color: var(--bk-muted); }
  .date-pop .dp-head button:hover { background: var(--bk-hover); color: var(--bk-text); }
  .date-pop .dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
  .date-pop .dp-wd { text-align: center; font-size: 11px; color: var(--bk-muted); padding: 4px 0; }
  .date-pop .dp-day { aspect-ratio: 1; border-radius: 8px; font-size: 13px; color: var(--bk-text); }
  .date-pop .dp-day:hover { background: var(--bk-hover); }
  .date-pop .dp-day.other { color: var(--bk-muted); opacity: .5; }
  .date-pop .dp-day.today { outline: 1px solid var(--bk-accent); }
  .date-pop .dp-day.sel { background: var(--bk-accent); color: #fff; font-weight: 700; }
  .cal-grid.month { display: flex; flex-direction: column; height: 100%; min-width: 100%; }
  .month-wd { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--bk-line); }
  .month-wd div { text-align: center; font-size: 11px; color: var(--bk-muted); padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; }
  .month-body { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; flex: 1; }
  .month-cell { border-right: 1px solid var(--bk-hairline); border-bottom: 1px solid var(--bk-hairline); padding: 4px 5px; overflow: hidden; cursor: pointer; min-height: 92px; }
  .month-cell:hover { background: var(--bk-panel); }
  .month-cell.other { background: color-mix(in srgb, var(--bk-bg) 60%, transparent); }
  .month-cell.other .mnum { color: var(--bk-muted); opacity: .5; }
  .month-cell.today .mnum { background: var(--bk-accent); color: #fff; }
  .mnum { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
  .mchip { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mchip .mdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .mchip .mct { overflow: hidden; text-overflow: ellipsis; }
  .mmore { font-size: 11px; color: var(--bk-muted); padding: 1px 2px; }
  .seg { display: flex; border: 1px solid var(--bk-line); border-radius: 8px; overflow: hidden; }
  .seg button { padding: 6px 14px; }
  .seg button.on { background: color-mix(in srgb, var(--bk-accent) 16%, transparent); color: var(--bk-accent); font-weight: 600; }
  /* Match the app's caps convention: view toggle + date header in ALL CAPS */
  .seg button, .cal-title { text-transform: uppercase; letter-spacing: .02em; }
  .cal-scroll { flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; }
  .cal-grid { display: flex; min-width: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }   /* long-press = calendar gestures, never text selection */
  .gutter { width: 54px; flex-shrink: 0; border-right: 1px solid var(--bk-line); position: relative; }
  .gutter .hr { position: absolute; right: 6px; font-size: 11px; color: var(--bk-muted); transform: translateY(-6px); }
  .col { flex: 1; min-width: 92px; border-right: 1px solid var(--bk-line); position: relative; }
  .col-head { position: sticky; top: 0; z-index: 7; background: var(--bk-bg); border-bottom: 1px solid var(--bk-line); padding: 8px 6px; text-align: center; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
  /* Top-left corner of the grid: sticks with the date row and hides hour labels scrolling under it */
  .gcorner { height: 33px; position: sticky; top: 0; z-index: 8; background: var(--bk-bg); border-bottom: 1px solid var(--bk-line); }
  .col-head .sub { font-size: 11px; color: var(--bk-muted); font-weight: 400; }
  .col-head.today { color: var(--bk-teal); }
  .col-body { position: relative; }
  .hline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--bk-hairline); }
  .closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(127,127,127,.05), rgba(127,127,127,.05) 6px, rgba(127,127,127,.10) 6px, rgba(127,127,127,.10) 7px); }
  .offblock { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(208,107,84,.14), rgba(208,107,84,.14) 6px, rgba(208,107,84,.22) 6px, rgba(208,107,84,.22) 7px); color: var(--bk-danger); font-size: 11px; padding: 3px 6px; overflow: hidden; }
  .booking { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 7px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 3px solid; z-index: 2;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }   /* long-press = drag, not text selection */
  .booking .cust { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .booking .svc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
  .booking .tm { font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .booking .cust, .booking .svc, .booking .tm { position: relative; z-index: 1; }
  .bufzone { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0 0 6px 4px; pointer-events: none; z-index: 0; }
  .booking.event {
    background-color: #0c0d11;
    background-image:
      radial-gradient(130% 90% at 15% 0%, rgba(205,214,232,.11), transparent 46%),
      radial-gradient(95% 130% at 92% 38%, rgba(96,116,156,.13), transparent 52%),
      radial-gradient(65% 70% at 72% 96%, rgba(255,255,255,.06), transparent 60%),
      linear-gradient(140deg, rgba(255,255,255,.07), transparent 34% 66%, rgba(0,0,0,.45)),
      repeating-linear-gradient(118deg, rgba(255,255,255,.03) 0 1.5px, transparent 1.5px 7px);
    border-left-color: #9aa0ad;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 22px rgba(0,0,0,.4);
  }
  /* Event blocks are always dark-themed → force light text in BOTH modes
     (otherwise light mode renders dark text on the dark event = invisible). */
  .booking.event .cust, .booking.event .svc, .booking.event .tm { color: #eef1f6; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
  .booking.event .cust .badge { color: #eef1f6 !important; }
  .booking .resize-h { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; z-index: 3; touch-action: none; }
  .booking .resize-h::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 20px; height: 3px; margin-left: -10px; border-radius: 3px; background: currentColor; opacity: 0; }
  .booking:hover .resize-h::after { opacity: .5; }
  .booking.cancelled { opacity: .45; text-decoration: line-through; }
  .booking.no-show { outline: 2px dashed var(--bk-danger); outline-offset: -2px; }
  .booking .badge { font-size: 10px; font-weight: 700; }
  .nowline { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bk-danger); z-index: 4; pointer-events: none; }
  .hoverchip { position: absolute; left: 3px; right: 3px; z-index: 3; background: var(--bk-card); border: 1px solid var(--bk-text); border-radius: 5px; padding: 3px 10px; font-size: 12px; font-weight: 600; pointer-events: none; display: none; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
  .dragsel { position: absolute; left: 3px; right: 3px; background: var(--bk-accent); color: #fff; border-radius: 6px; z-index: 6; pointer-events: none; padding: 4px 9px; font-size: 12px; font-weight: 600; overflow: hidden; }

  /* ---------- pages ---------- */
  .page { flex: 1; display: flex; min-width: 0; }
  .page-main { flex: 1; overflow-y: auto; padding: 18px 24px; min-width: 0; }
  .page-head { display: flex; align-items: center; margin-bottom: 16px; gap: 12px; }
  .page-head h2 { font-size: 18px; margin-right: auto; }
  .page-head h2 .count { color: var(--bk-muted); font-weight: 400; font-size: .7em; }
  .cat-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--bk-muted); }
  .cat-item:hover { background: var(--bk-hover); }
  .cat-item.on { background: var(--bk-hover2); font-weight: 600; color: var(--bk-text); }
  .cat-item .n { color: var(--bk-muted); font-weight: 400; }
  /* Category section heading between service groups (all categories shown at once) */
  .svc-cat-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bk-muted); margin: 20px 2px 10px; }
  .svc-cat-head:first-child { margin-top: 4px; }
  .svc-cat-head span { font-weight: 500; opacity: .7; }
  .svc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--bk-line); border-radius: var(--bk-radius); margin-bottom: 8px; cursor: pointer; background: var(--bk-card); }
  .svc-row:hover { border-color: var(--bk-muted); }
  .svc-row .dot { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
  .svc-row .nm { font-weight: 600; }
  .svc-row .meta { color: var(--bk-muted); font-size: 13px; }
  .svc-row .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
  .pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--bk-hover2); color: var(--bk-muted); }
  .pill.warn { background: rgba(224,176,83,.18); color: #e0b053; }
  .pill.off { background: rgba(208,107,84,.18); color: var(--bk-danger); }

  table.list { width: 100%; border-collapse: collapse; }
  table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); padding: 8px 10px; border-bottom: 1px solid var(--bk-line); }
  table.list td { padding: 11px 10px; border-bottom: 1px solid var(--bk-hairline); }
  /* Center every column except the first (Name stays left so long names have room) */
  table.list th:not(:first-child), table.list td:not(:first-child) { text-align: center; }
  table.list th:first-child, table.list td:first-child { width: 40%; }
  table.list tr.click { cursor: pointer; }
  table.list tr.click:hover { background: var(--bk-hover); }
  .search { padding: 8px 12px; border: 1px solid var(--bk-line); border-radius: 8px; width: 280px; background: var(--bk-input); }

  /* ---------- modal ---------- */
  /* The booking modals are Zizi's STANDARD .modal-overlay bottom sheets now — no local
     overlay/modal skin, no keyboard math; index.html's sheet system owns look + behavior
     (Zai 2026-07-23: every sheet in the app must react the same way). Only booking-specific
     sizing lives here: */
  #bkModal { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; min-height: 0; touch-action: pan-y; overscroll-behavior: contain; }
  .modal h3 { margin-bottom: 16px; font-size: 16px; }
  .modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
  .modal .foot .left { margin-right: auto; }

  .swatches { display: flex; gap: 8px; flex-wrap: wrap; }
  .swatch { width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
  .swatch.on { border-color: var(--bk-text); box-shadow: 0 0 0 2px var(--bk-card) inset; }

  .tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bk-line); margin: 14px 0 16px; }
  .tabs button { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--bk-muted); font-weight: 600; }
  .tabs button.on { color: var(--bk-text); border-bottom-color: var(--bk-accent); }

  .switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch i { position: absolute; inset: 0; background: #3a3d44; border-radius: 20px; transition: .15s; }
  .switch i:before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .15s; }
  .switch input:checked + i { background: #2fae4e; }
  .switch input:checked + i:before { transform: translateX(16px); }

  .hours-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bk-hairline); }
  .hours-row .d { width: 90px; font-weight: 600; }
  .hours-row select { padding: 6px 8px; border: 1px solid var(--bk-line); border-radius: 7px; background: var(--bk-input); }
  .hours-row .dash { color: var(--bk-muted); }
  .hours-row .closed-lbl { color: var(--bk-muted); }

  .to-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--bk-line); border-radius: 8px; margin-bottom: 8px; }
  .to-row .rng { font-weight: 600; }
  .to-row .why { color: var(--bk-muted); margin-left: auto; }

  /* appointment panel */
  .ap-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--bk-hairline); }
  .ap-row:last-of-type { border-bottom: none; }
  .ap-ic { width: 26px; flex-shrink: 0; display: flex; justify-content: center; padding-top: 8px; color: var(--bk-muted); }
  .ap-input { width: 100%; border: none; padding: 7px 2px; font-size: 14px; background: transparent; }
  .ap-input:focus { outline: none; }
  .ap-input.invalid { border: 1px solid var(--bk-danger); border-radius: 8px; padding: 7px 8px; }
  .shake { animation: bkShake .45s cubic-bezier(.36,.07,.19,.97) both; }
  .inline-sel { border: none; background: var(--bk-input); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 5px 8px; border-radius: 7px; color: var(--bk-text); }
  .inline-sel:hover { background: var(--bk-hover2); }
  .mini { width: 54px; padding: 4px 6px; border: 1px solid var(--bk-line); border-radius: 6px; font-size: 13px; background: var(--bk-input); }
  .mini-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--bk-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
  /* Cost / Duration / Buffer row (Setmore-style per-appointment fields) */
  .cdb-grid { flex: 1; display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; }
  .cdb-cell { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--bk-muted); cursor: text; }
  .cdb-lbl { font-weight: 600; }
  .cdb-wrap { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--bk-line); border-radius: 7px; padding: 3px 7px; background: var(--bk-input); color: var(--bk-text); }
  .cdb-wrap:focus-within { border-color: var(--bk-accent, #4cbbb5); }
  .cdb-pre, .cdb-suf { color: var(--bk-muted); font-size: 12px; }
  .cdb-in { width: 42px; border: none; background: transparent; color: var(--bk-text); font: inherit; font-size: 14px; font-weight: 600; text-align: right; padding: 1px 0; -moz-appearance: textfield; }
  .cdb-in:focus { outline: none; }
  .cdb-in::-webkit-outer-spin-button, .cdb-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .ap-note { width: 100%; border: 1px solid var(--bk-line); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: vertical; background: var(--bk-input); }
  /* Scroll the whole match list (Zai 2026-07-21): overscroll-contain so a touch-scroll inside
     the dropdown doesn't hand off to the modal, and "+ New customer" stays pinned in view.
     touch-action: pan-y claims the vertical swipe for the LIST on iOS — without it, with the
     keyboard up, WebKit pans the visual viewport instead and the list never moves (Zai's
     iPhone). No -webkit-overflow-scrolling: it's legacy (iOS ≥13 has momentum anyway) and its
     compositor layer is notorious for freezing scroll on lists re-rendered per keystroke. */
  .combo-list { position: absolute; top: 100%; left: 0; right: 0; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5); max-height: 260px; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; z-index: 30; }
  .combo-list .combo-more { padding: 7px 12px; font-size: 11px; color: var(--bk-muted); border-top: 1px solid var(--bk-hairline); }
  .combo-list .combo-new { position: sticky; bottom: 0; background: var(--bk-card); border-top: 1px solid var(--bk-line); }
  /* Half-screen guest/service picker — a standard app sheet capped to half height.
     While a field inside is focused it grows FULL height (.tall, toggled on focusin):
     the search bar lands near the top and the results live in the glass above the
     keyboard — a static height swap, deliberately no viewport math (Zai 2026-07-23). */
  .modal.pk-sheet { height: 55vh; height: 55dvh; max-height: 560px; transition: height .22s; }
  .modal.pk-sheet.tall { height: calc(100vh - 12px); height: calc(100dvh - 12px); max-height: none; }
  .pk-sheet button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
  .pk-head { display: flex; align-items: center; margin-bottom: 10px; position: relative; }
  .pk-title { flex: 1; text-align: center; font-weight: 700; font-size: 15px; color: var(--bk-text); }
  .pk-back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--bk-muted); font-size: 19px; padding: 4px 8px 4px 0; }
  .pk-form { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
  .pk-frow { display: flex; gap: 8px; }
  .pk-frow input { flex: 1; min-width: 0; }
  .pk-form input { background: var(--bk-input); border: 1px solid var(--bk-line); border-radius: 10px; padding: 11px 12px; color: var(--bk-text); font: inherit; font-size: 14px; width: 100%; }
  .pk-form input:focus { outline: none; border-color: #4cbbb5; }
  .pk-save { background: #4cbbb5 !important; color: #06302d !important; font-weight: 700 !important; border-radius: 10px !important; padding: 12px !important; margin-top: 4px; }
  .pk-save:disabled { opacity: .6; }
  .pk-search { display: flex; align-items: center; gap: 8px; background: var(--bk-input); border: 1px solid var(--bk-line); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; }
  .pk-search i { color: var(--bk-muted); font-size: 15px; }
  .pk-search input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--bk-text); font: inherit; font-size: 14px; }
  .pk-search input:focus { outline: none; }
  .pk-new { display: flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 600; font-size: 14px; padding: 10px 4px; text-align: left; }
  .pk-list { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
  .pk-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--bk-hairline); }
  .pk-av { width: 34px; height: 34px; border-radius: 50%; background: var(--bk-input); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--bk-muted); flex: none; }
  .pk-nm { display: block; font-size: 14px; font-weight: 600; color: var(--bk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pk-sub { display: block; font-size: 12px; color: var(--bk-muted); }
  .pk-empty { padding: 14px 6px; color: var(--bk-muted); font-size: 12px; }
  .combo-list button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 12px; }
  .combo-list button:hover { background: var(--bk-hover); }
  .combo-list .cdot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
  .combo-list .meta { color: var(--bk-muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
  .avatar.sm { width: 26px; height: 26px; border-radius: 50%; background: var(--bk-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
  .avatar.owl { background: #1a1a1a; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
  .avatar.owl img { width: 172%; height: 172%; object-fit: cover; }

  #bkToast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bk-accent); color: #fff; padding: 10px 20px; border-radius: 30px; font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; z-index: 200; }
  #bkToast.on { opacity: 1; }
  .empty { color: var(--bk-muted); text-align: center; padding: 60px 0; }
  .url-box { display: flex; gap: 8px; align-items: center; background: var(--bk-panel); border: 1px solid var(--bk-line); border-radius: 8px; padding: 8px 12px; }
  .url-box .u { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .svc-cat-block { margin-bottom: 14px; }
  .svc-cat-block .h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
  .svc-cat-block label.opt { display: flex; align-items: center; gap: 8px; padding: 5px 4px 5px 20px; cursor: pointer; }
  .checklist { max-height: 380px; overflow-y: auto; border: 1px solid var(--bk-line); border-radius: 8px; padding: 12px; }

  /* Desktop: centre short sidebar content (TEAM pills, CATEGORIES) vertically instead of
     top-anchoring. Auto margins collapse to 0 once the list outgrows the column, so long
     lists still scroll normally — unlike justify-content:center, which would clip the top. */
  @media (min-width: 1000px) {
    .subbar > :first-child { margin-top: auto; }
    .subbar > :last-child { margin-bottom: auto; }
  }

  .page-head { position: relative; }   /* anchors the Bethesda ☰ dropdown */

  /* ---------- phones (Setmore-style mobile calendar) ---------- */
  .bk-team-toggle { display: none; }   /* ☰ only exists on phones */
  @media (max-width: 999px) {
    .bk-team-toggle { display: inline-flex; align-items: center; justify-content: center; font-size: 16px; padding: 7px 11px; }
    /* Team rail becomes a drawer over the calendar (opened by ☰), not a side column */
    .subbar { display: none; }
    .subbar.subbar-team.open { display: flex; position: absolute; z-index: 45; top: 54px; left: 10px;
      width: min(300px, 82vw); max-height: min(440px, 72vh); overflow-y: auto;
      background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 14px;
      box-shadow: 0 18px 50px rgba(0,0,0,.55); padding: 14px; }
    .bk-scrim { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.45); }
    /* Compact header: ☰ + Day|3 days on the left, "July 2026 ▾" + ‹› on the right */
    .cal-head { padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
    .cal-head-l { flex: 0 0 auto; gap: 6px; display: flex; align-items: center; }
    .cal-nav { position: static; transform: none; margin: 0 auto; gap: 4px; }
    .bk-today { display: none; }                 /* jump to today via the date picker */
    .cal-title { font-size: 14px; padding: 6px 8px; }
    .cal-head-r { flex: 0 0 auto; }
    .cal-head-r .btn.primary { padding: 7px 12px; font-size: 16px; line-height: 1; }
    /* Compact "+" add button + smaller heading on the Services/Customers pages */
    .page-main { padding: 14px 14px; }
    .page-head { gap: 8px; }
    .page-head h2 { font-size: 16px; }
    .page-head .search { width: auto; flex: 1; min-width: 0; }
    .page-head .page-add { padding: 7px 12px; font-size: 16px; line-height: 1; flex: 0 0 auto; }
    /* Day view with several stylists: columns keep a readable width and scroll sideways */
    .cal-scroll { overflow-x: auto; }
    .cal-grid .col { min-width: 150px; }
    .gutter { position: sticky; left: 0; z-index: 6; background: var(--bk-bg); }
    /* 3-day view: all 3 days lock to the screen width — no sideways scroll, swipe to change days.
       NOTE: no overflow:hidden here — it breaks position:sticky on the date row. */
    .cal-grid.fit3 .col { min-width: 0; }
    /* Finger-sized, always-visible resize handle on appointment blocks */
    .booking .resize-h { height: 20px; }
    .booking .resize-h::after { opacity: .45; }
    .cal-grid.fit3 .gutter { width: 44px; }
    .cal-grid.fit3 .gutter .hr { right: 3px; font-size: 10px; }
  }
}

/* Page-scroll lock while the booking calendar is on screen (phones) — the app
   chrome + date row stay put; only the time grid scrolls. Toggled by bkLockPage(). */
body.bk-noscroll { overflow: hidden; height: 100dvh; }

/* ── Bethesda front-desk mode (Zai 2026-07-15): no rail, hamburger-driven like Setmore.
   TOP LEVEL on purpose — the rest of this file is nested inside #bookingsSection{},
   and `body.bethesda-mode` must sit OUTSIDE that scope to match the <body> class. */
body.bethesda-mode #bookingsSection .subbar.subbar-team { display: none; }
body.bethesda-mode #bookingsSection .bk-team-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--bk-text); font-size: 22px; padding: 4px 10px; cursor: pointer; }
body.bethesda-mode #bookingsSection .subbar.subbar-team.open { display: flex; position: absolute; z-index: 45; top: 54px; left: 10px;
  width: min(300px, 82vw); max-height: min(560px, 78vh); overflow-y: auto;
  background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); padding: 14px; }
body.bethesda-mode #bookingsSection .bk-beth-nav { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--bk-line); }
body.bethesda-mode #bookingsSection .bk-beth-nav button { width: 100%; text-align: center; padding: 8px 12px; border-radius: 999px; background: var(--bk-input); border: 1px solid var(--bk-line); color: var(--bk-text); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: border-color .12s; }
body.bethesda-mode #bookingsSection .bk-beth-nav button:hover { border-color: var(--bk-accent); }
body.bethesda-mode #bookingsSection .bk-beth-drop { position: absolute; z-index: 60; top: 44px; left: 0; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.5); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
body.bethesda-mode #bookingsSection .bk-beth-drop button { text-align: left; padding: 9px 14px; border-radius: 9px; background: none; border: none; color: var(--bk-text); font-size: 13px; font-weight: 600; cursor: pointer; }
body.bethesda-mode #bookingsSection .bk-beth-drop button:hover { background: var(--bk-hover); }
body.bethesda-mode #bookingsSection .bk-beth-out { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--bk-muted); padding: 6px; cursor: pointer; }
body.bethesda-mode #bookingsSection .bk-beth-out:hover { color: var(--bk-text); }
body.bethesda-mode #bookingsSection .cal-nav { left: 50%; }          /* no team sidebar -> true centre */
body.bethesda-mode #bookingsSection .bk-today { text-transform: uppercase; letter-spacing: .04em; }
body.bethesda-mode #bookingsSection .cal-head-l .cal-add { margin-left: 4px; }
/* Bethesda page shell: pinned topbar (+ pills on Services), list scrolls beneath */
body.bethesda-mode #bookingsSection .beth-page { flex: 1; display: flex; flex-direction: column; min-width: 0; }
body.bethesda-mode #bookingsSection .bk-page-topbar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--bk-line); min-height: 61px; flex: none; }
body.bethesda-mode #bookingsSection .bk-page-title { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 19px; font-weight: 700; letter-spacing: .35em; padding-left: .35em; text-transform: uppercase; white-space: nowrap; }
body.bethesda-mode #bookingsSection .bk-page-title .count { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--bk-muted); }
body.bethesda-mode #bookingsSection .bk-cat-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 16px 16px 6px; flex: none; }
body.bethesda-mode #bookingsSection .bk-cat-pill { padding: 8px 18px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bk-text) 60%, transparent); background: transparent; color: var(--bk-text); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
body.bethesda-mode #bookingsSection .bk-cat-pill:hover { border-color: #4cbbb5; }
body.bethesda-mode #bookingsSection .bk-cat-pill.on { border-color: #4cbbb5; color: #4cbbb5; background: rgba(76,187,181,.10); }
body.bethesda-mode #bookingsSection .cal-head { min-height: 61px; }  /* same header height on every page */
/* Customers table: clickable sort headers (active = teal + arrow) */
#bookingsSection table.list th.sortable { cursor: pointer; user-select: none; }
#bookingsSection table.list th.sortable:hover { color: var(--bk-text); }
#bookingsSection table.list th.sortable.on { color: #4cbbb5; }
/* Appointment modal — History tab rows */
#bookingsSection .bk-hist-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--bk-hairline); }
#bookingsSection .bk-hist-row.cur { background: rgba(76,187,181,.08); border-radius: 8px; }
#bookingsSection .tabs button svg { width: 15px; height: 15px; }
/* Visit number on calendar cards: gold 1ST for first-timers, plain 2, 3, … after */
#bookingsSection .booking .vnum { font-weight: 800; font-size: 10px; letter-spacing: .05em; }
#bookingsSection .booking .vnum.first { color: #e8b64c; }
#bookingsSection .booking .vsep { margin: 0 5px; opacity: .35; }
/* The Customers/Services ☰ menu matches the calendar drawer: same card panel + pill buttons */
body.bethesda-mode #bookingsSection .bk-beth-drop { top: 46px; left: 0; min-width: 230px; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); padding: 14px; gap: 7px; }
body.bethesda-mode #bookingsSection .bk-beth-drop button { width: 100%; text-align: center; padding: 8px 12px; border-radius: 999px; background: var(--bk-input); border: 1px solid var(--bk-line); color: var(--bk-text); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; transition: border-color .12s; }
body.bethesda-mode #bookingsSection .bk-beth-drop button:hover { background: var(--bk-input); border-color: var(--bk-accent); }
/* Appointment date field: teal picker icon sits at the LEFT of the field, before the date */
#bookingsSection input[type="date"].inline-sel { position: relative; padding-left: 36px; }
#bookingsSection input[type="date"].inline-sel::-webkit-calendar-picker-indicator { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
