:root {
  --accent: #6E8CAE;
  --accent-dark: #4E6A88;
  --ink: #17251f;
  --muted: #6b7a72;
  --line: #e3eae6;
  --bg: #f6f8f7;
  --card: #ffffff;
  --danger: #b3261e;
  --hour-px: 56px; /* per hour in day view */
  --week-hour-px: 34px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 14px; }

/* ---------- shell / nav ---------- */
/* The shell sits BELOW the 56 px sticky topbar in flow, so its
   min-height is the viewport MINUS the topbar: at a plain 100dvh the
   document was always exactly 56 px taller than the screen, the
   window could scroll by that much, and focus/anchoring/restoration
   kept leaving the calendar shifted up by one topbar height with a
   gap under the card (the iPhone strip Dmytro reported; gate G8). */
#app-shell { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); }
.nav-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.nav-logo {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-text strong { font-size: 14px; }
.nav-brand-text span { font-size: 11px; color: var(--muted); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 0; border-radius: 10px; background: transparent; font-size: 15px;
  color: var(--ink); cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: #E2E8EF; color: var(--accent-dark); font-weight: 600; }
.nav-ic { display: inline-flex; align-items: center; justify-content: center; }
.nav-ic svg { width: 23px; height: 23px; display: block; }
.nav-foot { margin-top: auto; padding: 8px; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 14px; padding: 0; text-align: left; }
#main { flex: 1; min-width: 0; padding: 22px 22px 90px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-head { margin-bottom: 16px; }
/* Long secondary screens keep their head — and with it the way back /
   the search — reachable: page heads stick under the topbar instead of
   scrolling away (clients list, reports, services, home). */
.view .page-head { position: sticky; top: 56px; z-index: 40; background: var(--bg); padding: 10px 0 8px; margin-bottom: 10px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; }
.page-head p { margin: 2px 0; }
.row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card-grid .card { margin-bottom: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 16px; font-size: 15px; cursor: pointer;
}
.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 13px 14px; cursor: pointer; text-align: left; width: 100%; font-size: 15px;
}
.option .opt-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.option .opt-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.option .opt-main { display: flex; align-items: center; gap: 10px; }
.option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.option.static { cursor: default; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; }
.date-cell {
  flex: 0 0 58px; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 0; text-align: center; cursor: pointer;
}
.date-cell .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.date-cell .dom { font-size: 18px; font-weight: 600; }
.date-cell .mon { font-size: 11px; color: var(--muted); }
.date-cell.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-cell.selected .dow, .date-cell.selected .mon { color: #D8E3EE; }
.date-cell.closed { opacity: .55; cursor: pointer; }
.date-cell .dclosed { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date-cell.selected .dclosed { color: #D8E3EE; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 14px; font-size: 15px; cursor: pointer; min-width: 84px;
}
.slot-btn .slot-pract { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.slot-btn.selected .slot-pract { color: #D8E3EE; }
.slot-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
form input, form textarea, form select, input[type="search"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.btn-primary {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  padding: 13px 18px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary {
  background: #fff; color: var(--accent-dark); border: 1px solid var(--accent);
  border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-danger {
  background: #fff; color: var(--danger); border: 1px solid var(--danger);
  border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.small-btn { width: auto; padding: 10px 14px; font-size: 14px; }
.summary-line { font-size: 14px; color: var(--accent-dark); min-height: 18px; }
.success { text-align: center; }
.success-mark {
  width: 56px; height: 56px; margin: 6px auto 10px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
#book-done-details { text-align: left; max-width: 420px; margin: 0 auto 16px; }
#book-done-details .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
#book-done-details .row span:first-child { color: var(--muted); }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg-btn { border: 0; background: #fff; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.seg-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.cal-nav { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }
#cal-title { font-size: 16px; }
#cal-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex: 1 1 auto; min-height: 0; touch-action: none; overscroll-behavior: none; }
/* day-pager surface: no scroll chaining from the calendar view to the
   page (an unconsumed horizontal drag must stay the pager's, not turn
   into a browser/OS navigation gesture) */
#view-calendar { overscroll-behavior: none; }
/* The week bar is part of the pager surface, so it needs the same
   gesture protection as the grid: with the default touch-action the
   browser latches a horizontal drag after the first move and fires
   pointercancel, and the pager never engages (measured: pointerdown,
   one pointermove, pointercancel — no paging from the strip).
   v0-19: the whole surface is touch-action:none — the gesture
   coordinator owns every touch on the calendar (paging AND vertical
   scrolling, which it drives itself with momentum). With pan-y a
   swipe whose first pixels ran steep (a natural thumb arc) was
   latched by the browser as a scroll and cancelled before the pager
   could ever claim it — paging FORWARD died on Dmytro's iPhone while
   his flatter backward swipes survived. */
#cal-weekbar, #cal-weekbar button { touch-action: none; }
#cal-grid { position: relative; min-width: 340px; min-height: 100%; display: flex; flex-direction: column; }
/* pager neighbour page (same layout as the grid, no id-based rules) */
.cal-grid-x { position: relative; display: flex; flex-direction: column; }
/* day pager: current + neighbour pages ride one track under the finger */
.cal-track { display: flex; align-items: stretch; will-change: transform; }
.cal-track > * { flex: 0 0 auto; }
/* long-press lift: the block rises before it starts following the finger */
.appt.drag-lift { transform: scale(1.05); box-shadow: 0 14px 24px rgba(23,37,31,.30), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); z-index: 7;
  transition: transform .12s ease, box-shadow .12s ease; }
/* practitioner filter: tappable heads (pills), selected state, All reset */
.cal-col-head.pract-head { cursor: pointer; }
.pract-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); white-space: nowrap; }
.cal-col-head.sel .pract-pill { border-color: var(--accent); background: #E2E8EF; font-weight: 700; }
.cal-head .gutter { display: flex; align-items: center; justify-content: center; }
.team-head[data-pract-head] { cursor: pointer; }
.team-head.sel strong { color: var(--accent-dark); }
.all-pill { border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.tl-filter { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.cal-head { display: flex; position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.cal-head .gutter { flex: 0 0 52px; }
.cal-col-head { flex: 1; text-align: center; padding: 8px 2px; font-size: 13px; border-left: 1px solid var(--line); }
.cal-col-head .pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.cal-body { display: flex; position: relative; flex: 1 0 auto; }
.cal-gutter { flex: 0 0 52px; position: relative; }
.cal-gutter .hour-label { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-col { flex: 1; position: relative; border-left: 1px solid var(--line);
  /* Fresha grid (v0-32): the working area is WHITE; the lines are
     drawn, not filled — a 1px #DCE4EC line on the hour over a lighter
     #EEF2F6 line on every quarter hour. Gradients keep the lines going
     when the column is stretched past 21:00. */
  background-color: #fff;
  background-image:
    repeating-linear-gradient(to bottom, #DCE4EC 0, #DCE4EC 1px, transparent 1px, transparent var(--col-hour, 56px)),
    repeating-linear-gradient(to bottom, #EEF2F6 0, #EEF2F6 1px, transparent 1px, transparent calc(var(--col-hour, 56px) / 4)); }
.cal-col.off { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f3f5f4 10px, #f3f5f4 20px); }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid #DCE4EC; }
.work-band { position: absolute; left: 0; right: 0; background: transparent; border-top: 1px dashed #CFDCE8; border-bottom: 1px dashed #CFDCE8; }
.appt {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px;
  color: var(--ink); font-size: 12px; line-height: 1.25; overflow: hidden; cursor: grab;
  /* matte glass (v0-30): NO gradient on the face — one flat tint from
     paintApptBlock (app.js); the glass edges live here: soft drop shadow
     + 1px top edge + inset ring; stronger blur for the matte read */
  box-shadow: 0 4px 9px rgba(23,37,31,.18), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(3px) saturate(1.03); -webkit-backdrop-filter: blur(3px) saturate(1.03);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.appt .a-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .a-meta { opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Pinch-zoom content tiers (2026-11-11, ClinicSense model): the font
   never scales; lines are shed by the block's own height instead —
   data-lines is stamped by apptBlock from the rendered height. */
.appt[data-lines="1"] .a-line2, .appt[data-lines="1"] .a-line3,
.appt[data-lines="2"] .a-line3 { display: none; }
.appt.cancelled { opacity: .45; text-decoration: line-through; cursor: pointer; }
.appt.drag-src { opacity: .35; }
.appt.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; cursor: grabbing;
  box-shadow: 0 14px 24px rgba(23,37,31,.30), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); right: auto;
  /* dragged glass reads clearer than the resting tile: flatter alpha in
     paintApptBlock (drag) + a touch more blur here */
  backdrop-filter: blur(4px) saturate(1.03); -webkit-backdrop-filter: blur(4px) saturate(1.03);
}
.drop-hint { position: absolute; left: 3px; right: 3px; border-radius: 8px; border: 2px dashed var(--accent); background: rgba(110,140,174,.12); z-index: 3; pointer-events: none; }
.drop-hint.bad { border-color: var(--danger); background: rgba(179,38,30,.10); }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid #e05252; z-index: 4; pointer-events: none; }

/* ---------- instant tap feedback + skeletons (speed wave 2026-11-07) ----------
   ClinicSense-style light flash on pointerdown: the element lightens for
   ~180 ms in the same frame, before any data loads. Not a grey press. */
* { -webkit-tap-highlight-color: transparent; }
@keyframes tapflash {
  0% { filter: brightness(1.5); box-shadow: inset 0 0 0 999px rgba(255,255,255,.40); }
  100% { filter: brightness(1); box-shadow: inset 0 0 0 999px rgba(255,255,255,0); }
}
.tap-flash { animation: tapflash .18s ease-out; }
.skl-line { height: 14px; border-radius: 7px; margin: 12px 0;
  background: linear-gradient(90deg, rgba(31,42,51,.06), rgba(31,42,51,.14), rgba(31,42,51,.06));
  background-size: 200% 100%; animation: sklshimmer 1.1s linear infinite; }
.skl-line.w40 { width: 40%; } .skl-line.w60 { width: 60%; }
.skl-line.w70 { width: 70%; } .skl-line.w80 { width: 80%; }
.skl-card { height: 68px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(31,42,51,.06), rgba(31,42,51,.14), rgba(31,42,51,.06));
  background-size: 200% 100%; animation: sklshimmer 1.1s linear infinite; }
@keyframes sklshimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- clients ---------- */
#client-search { margin-top: 10px; }
.client-list { display: flex; flex-direction: column; gap: 8px; }
.client-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.client-foot #client-more { margin-left: auto; }
#client-sentinel { width: 1px; height: 1px; }
/* Client card sticky exit bar: back chevron + name + close, pinned
   under the topbar at any scroll depth of the long card. */
.cc-sticky { position: sticky; top: 56px; z-index: 45; display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 6px 0; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.cc-sticky strong { flex: 1; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-sticky .icon-btn { flex: 0 0 38px; }
/* Sheet sticky close: the ✕ bar sticks inside the sheet's scroller. */
.sheet-topbar { position: sticky; top: -20px; z-index: 6; display: flex; justify-content: flex-end;
  margin: -20px -20px 2px; padding: 12px 12px 2px; background: #fff; border-radius: 18px 18px 0 0; }
.sheet-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 15px; cursor: pointer; line-height: 1; }
/* Home hub floating return pill: bottom-left, above the safe area;
   the bottom-right corner stays free for the calendar's grid FAB. */
.back-fab { position: fixed; left: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 65;
  display: inline-flex; align-items: center; gap: 5px; padding: 10px 16px 10px 11px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(16,28,22,.18); }
.back-fab svg { width: 19px; height: 19px; display: block; }
.back-fab.hidden { display: none; }
.client-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; cursor: pointer; width: 100%; text-align: left; font-size: 15px;
}
.client-row .c-meta { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row .h-meta { color: var(--muted); font-size: 13px; text-align: right; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #E2E8EF; color: var(--accent-dark); font-weight: 600; }
.badge.cancelled { background: #f6e3e1; color: var(--danger); }
.badge.completed { background: #e8eef7; color: #2b4a77; }

/* ---------- overlays / sheets / toast ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 28, 22, .45); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 20px; animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
.sheet .sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sheet .sheet-actions .btn-primary, .sheet .sheet-actions .btn-secondary, .sheet .sheet-actions .btn-danger { width: 100%; }
.pin-input { text-align: center; font-size: 22px !important; letter-spacing: 6px; margin-bottom: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 300;
  pointer-events: none; /* a notification must never swallow taps (found by the forms-wave smoke, 2026-11-09) */
  background: #17251f; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 92vw; text-align: center;
}
.detail-rows .row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-rows .row span:first-child { color: var(--muted); }

/* ---------- phone layout ---------- */
@media (max-width: 760px) {
  #main { padding: 16px 12px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .sheet { border-radius: 18px 18px 0 0; }
  .stat-grid { gap: 6px; }
  .stat strong { font-size: 16px; }
}
@media (min-width: 761px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 18px; }
}

/* ---------- wave 2026-11-07b: topbar, drawer, home, pick mode, views ---------- */
#topbar {
  position: sticky; top: 0; z-index: 60; height: 56px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-btn {
  width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
  flex: 0 0 42px;
}
.topbar-btn:hover { background: var(--bg); }
.topbar-btn svg { width: 25px; height: 25px; display: block; }
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.small-logo { width: 34px !important; height: 34px !important; border-radius: 9px !important; font-size: 13px; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.topbar-title strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title span { font-size: 11px; color: var(--muted); }
.topbar-auth { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px; background: #fff; white-space: nowrap; }
.scrim { position: fixed; inset: 0; background: rgba(16, 28, 22, .45); z-index: 110; }
#drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 292px; max-width: 86vw; z-index: 120;
  background: var(--card); box-shadow: 8px 0 30px rgba(16,28,22,.18);
  transform: translateX(-105%); transition: transform .22s ease-out;
  display: flex; flex-direction: column; padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
#drawer.open { transform: none; }
.drawer-brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 14px; }
.drawer-x { margin-left: auto; }
.nav-chev { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .15s; }
.nav-chev.open { transform: rotate(90deg); }
.drawer-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 44px; align-items: flex-start; }
.sub-item {
  border: 0; background: transparent; text-align: left; cursor: pointer;
  font-size: 14px; color: var(--ink); padding: 8px 12px; border-radius: 999px;
}
.sub-item:hover { background: var(--bg); }
.sub-item.pill { background: var(--accent); color: #fff; font-weight: 600; }
.drawer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer-account-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 8px 6px; }

/* home hub */
.money-card {
  border-radius: 18px; padding: 20px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(120deg, var(--accent) 0%, #64819F 55%, #AEC6D8 100%);
  box-shadow: 0 10px 26px rgba(110,140,174,.28);
}
.money-label { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.money-big { font-size: 40px; font-weight: 800; margin: 4px 0 2px; }
.money-sub { font-size: 14px; opacity: .95; }
.money-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; opacity: .95; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left;
  min-height: 108px;
}
.tile:hover { border-color: var(--accent); }
.tile-ic { color: var(--accent-dark); display: inline-flex; }
.tile-ic svg { width: 28px; height: 28px; display: block; }

/* calendar extras */
.seg-scroll { overflow-x: auto; max-width: 100%; }
.seg-btn { white-space: nowrap; }
#cal-grid.wide { min-width: 880px; }
.cal-col-head .ch-sub { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-col-head .ch-day { display: block; font-weight: 700; }
.shade {
  position: absolute; left: 0; right: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(240,243,241,.65), rgba(240,243,241,.65) 8px, rgba(232,237,234,.65) 8px, rgba(232,237,234,.65) 16px);
}
.appt.no_show { opacity: .6; }
.appt.src-highlight { outline: 3px solid var(--accent-dark); outline-offset: 1px; box-shadow: 0 0 0 5px rgba(110,140,174,.25); z-index: 3; }
.press-plaque {
  position: absolute; left: 3px; right: 3px; z-index: 6; pointer-events: none;
  border-radius: 8px; border: 2px solid var(--accent); background: rgba(110,140,174,.25);
}
.press-time {
  position: fixed; z-index: 210; pointer-events: none; transform: translate(-110%, -50%);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
#pickbar {
  display: flex; align-items: center; gap: 10px; border-radius: 12px;
  background: var(--accent); color: #fff; padding: 11px 14px; margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(110,140,174,.3);
}
.pickbar-text { display: flex; flex-direction: column; line-height: 1.2; }
.pickbar-text strong { font-size: 15px; }
.pickbar-text span { font-size: 12px; opacity: .9; }
.pickbar-x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; }
.pickbar-x svg { width: 20px; height: 20px; display: block; }
body.picking #cal-scroll { outline: 2px solid var(--accent); outline-offset: 2px; }
.fab {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 70;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(110,140,174,.4);
}
.fab svg { width: 26px; height: 26px; display: block; }
.fab:hover { background: var(--accent-dark); }

/* clean calendar top (2026-11-07c): on the calendar screen the topbar is
   only the hamburger + the date menu (month dropdown, today jump) */
#topbar.cal-top .topbar-brand, #topbar.cal-top .topbar-auth { display: none; }
#topbar-cal { display: flex; align-items: center; gap: 8px; min-width: 0; }
#cal-month-btn { border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600;
  color: var(--ink); cursor: pointer; max-width: 58vw; padding: 6px 2px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#cal-month-btn::after { content: ""; width: 8px; height: 8px; flex: 0 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px); }

/* full-height calendar (2026-11-07f): the time grid runs to the very
   bottom of the viewport — no empty strip under it; the sections FAB
   and toasts keep floating over the grid. */
#main.on-calendar { padding-bottom: 0; }
/* Desktop calendar runs edge to edge (Dmytro, 2026-11-08): the generic
   1100px content cap left 170–314px of dead space on each side of the
   grid and squeezed the day columns; on the calendar the cap is off
   and only a minimal technical margin remains. Other views keep it. */
#main.on-calendar { max-width: none; padding-left: 10px; padding-right: 10px; }
#cal-scroll { user-select: none; -webkit-user-select: none; }
#view-calendar { display: flex; flex-direction: column;
  height: calc(100vh - 78px); height: calc(100dvh - 78px); }
@media (max-width: 760px) {
  #view-calendar { height: calc(100vh - 72px); height: calc(100dvh - 72px); }
}

/* Fresha-style date picker sheet (2026-11-07f): quick-jump chips, then
   vertically scrolling month sections with a day grid. */
.dp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.dp-chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 9px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.dp-chip:active { background: #E2E8EF; }
.dp-months { position: relative; max-height: 56vh; overflow-y: auto; }
.dp-month h3 { margin: 16px 0 8px; font-size: 15px; }
.dp-week, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-week span { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.dp-day { border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink);
  aspect-ratio: 1; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.dp-day.today { box-shadow: inset 0 0 0 1.6px var(--accent); }
.dp-day.sel { background: var(--accent); color: #fff; font-weight: 700; box-shadow: none; }
#cal-today-btn { width: 34px; height: 34px; flex: 0 0 34px; border: 1.6px solid var(--ink); border-radius: 9px;
  background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
#cal-weekbar { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
/* Date-strip viewport (2026-11-11): the strip drags pixel-wise under
   the finger. The inner row holds 11 cells — 2 hidden on each side
   feed the slide; it rests translated by exactly 2 cells so the
   visible 7 align with the old space-between layout. touch-action
   none: the strip drag handler owns the gesture. */
#cal-stripview { flex: 1; overflow: hidden; touch-action: none; border-radius: 10px; }
/* The row is exactly 11/7 of the viewport wide (v0-32, part F): each of
   the 11 cells is then precisely viewport/7 — the width stripCellW()
   computes — so every rest transform (-2 cells) and every drag step
   lands on whole-date boundaries at ANY screen width. Before this the
   row took the viewport's own width, the 11 cells shared it (121.8px
   on a desktop where the code assumed 191.4px), shifts landed
   mid-cell, dates hung half-cut at the edges and a 383px gap trailed
   the last date on wide screens. min-width: 0 on the cells for the
   same reason (a 40px floor broke the equality on narrow phones). */
#cal-weekstrip { display: flex; flex: none; width: calc(1100% / 7); justify-content: flex-start; will-change: transform; }
.ws-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: transparent;
  cursor: pointer; padding: 4px 0; min-width: 0; color: var(--muted); font: inherit; flex: 1 0 0; }
.ws-cell span { font-size: 11px; }
.ws-cell strong { font-size: 16px; color: var(--ink); width: 34px; height: 34px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%; }
.ws-cell.today strong { box-shadow: inset 0 0 0 1.6px var(--accent); }
.ws-cell.active strong { background: var(--accent); color: #fff; box-shadow: none; }

/* timeline + team views */
.tl-list { padding: 6px 0; }
.tl-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.tl-row { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: stretch; }
.tl-row:last-child { border-bottom: 0; }
.tl-time { flex: 0 0 86px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.tl-time strong { color: var(--ink); font-size: 14px; }
.tl-bar { flex: 0 0 5px; border-radius: 3px; }
.tl-main { flex: 1; min-width: 0; }
.tl-main .tl-name { font-weight: 700; }
.tl-main .tl-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-wrap { padding: 8px 0; }
.team-row { border-bottom: 1px solid var(--line); padding: 10px 12px 14px; }
.team-row:last-child { border-bottom: 0; }
.team-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.team-head .pdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.team-head .team-win { margin-left: auto; font-size: 12px; color: var(--muted); }
.team-track { position: relative; height: 62px; border-radius: 10px; background: #fbfcfb; border: 1px solid #eef2f0; overflow: hidden; }
.team-track .tt-shade { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(240,243,241,.85), rgba(240,243,241,.85) 8px, rgba(233,238,235,.85) 8px, rgba(233,238,235,.85) 16px); }
.team-track .tt-appt { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; color: var(--ink); font-size: 11px; padding: 3px 5px; overflow: hidden; cursor: pointer; line-height: 1.2; z-index: 2;
  box-shadow: 0 4px 9px rgba(23,37,31,.18), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(3px) saturate(1.03); -webkit-backdrop-filter: blur(3px) saturate(1.03); }
.team-track .tt-appt .a-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-track .tt-appt.cancelled { opacity: .45; text-decoration: line-through; }
.team-track .tt-now { position: absolute; top: 0; bottom: 0; border-left: 2px solid #e05252; z-index: 3; }

/* badges */
.badge.no_show { background: #f6e8d8; color: #8a5a13; }
.badge.first { background: var(--accent); color: #fff; }
.badge.due { background: #f6e8d8; color: #8a5a13; }
.badge.paid { background: #E2E8EF; color: var(--accent-dark); }
.badge.void { background: #eef2f0; color: var(--muted); }
.badge.draft { background: #fdf3d7; color: #8a6d13; }

/* client card (Fresha layout) */
.c-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #E2E8EF; color: var(--accent-dark);
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px;
}
.cc-head {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 16px 8px; text-align: center; margin: 10px 0 12px;
}
.cc-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 8px;
  background: #E2E8EF; color: var(--accent-dark); font-size: 30px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cc-head h1 { margin: 0; font-size: 22px; }
.cc-head p { margin: 2px 0 0; }
.cc-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 10px 0 4px; }
.tag-chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #eef2f0; color: var(--ink); font-weight: 600; }
.tag-add { border: 1px dashed var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--accent-dark); cursor: pointer; }
.cc-booknow { margin: 12px 0 6px; }
.cc-info { text-align: left; margin-top: 10px; }
.cc-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.cc-info-row span { color: var(--muted); }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.menu-row {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: #fff;
  padding: 15px 16px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.menu-row.active { color: var(--accent-dark); font-weight: 700; }
.menu-row.sub { padding-left: 32px; font-size: 14px; }
.menu-badge { font-size: 11px; background: #eef2f0; border-radius: 999px; padding: 2px 8px; color: var(--muted); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat strong { display: block; font-size: 19px; }
.stat span { font-size: 11px; color: var(--muted); }

/* appointment card (sheet) */
.appt-client-row {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; padding: 11px 12px; cursor: pointer; text-align: left; margin: 10px 0;
}
.appt-client-row .acr-name { font-weight: 700; font-size: 15px; }
.appt-client-row .acr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.appt-client-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.count-row {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; padding: 13px 2px; font-size: 15px; cursor: pointer; text-align: left; color: var(--ink);
}
.count-row .cr-sub { display: block; font-size: 12px; color: var(--muted); }
.count-row .chev { margin-left: auto; color: var(--muted); font-size: 18px; }
.count-row .cr-ic { color: var(--accent-dark); display: inline-flex; }
.count-row .cr-ic svg { width: 21px; height: 21px; display: block; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.mini-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; text-align: left; width: 100%;
}
.mini-card .mc-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.mini-card .mc-title svg { width: 19px; height: 19px; color: var(--accent-dark); }
.mini-card .mc-sub { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.sheet-sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 4px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.action-grid .btn-primary, .action-grid .btn-secondary, .action-grid .btn-danger { width: 100%; padding: 12px 10px; font-size: 14px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.file-row:last-child { border-bottom: 0; }
.file-row .f-meta { color: var(--muted); font-size: 12px; display: block; }
.file-row .f-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--accent-dark); font-weight: 600; }
.mini-btn.danger { color: var(--danger); }
.sheet label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.sheet input, .sheet textarea, .sheet select {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.picker-search { position: sticky; top: -20px; background: #fff; padding: 16px 0 8px; margin-top: -16px; z-index: 2; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table td, .rep-table th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.rep-table td:last-child, .rep-table th:last-child { text-align: right; }

/* ---------- invoice screen + add payment (2026-11-07 wave) ---------- */
.badge.partial { background: #fdf3d7; color: #8a6d13; }
.inv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  position: sticky; top: 56px; z-index: 40; background: var(--bg); padding: 8px 0 6px; }
.inv-head h1 { font-size: 20px; margin: 0; flex: 1; }
.inv-head-btns { display: flex; gap: 6px; }
.inv-mail { background: none; border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--accent-dark); }
.inv-mail svg { width: 20px; height: 20px; }
.inv-big { font-size: 34px; font-weight: 700; margin-top: 10px; }
.inv-status { margin: 6px 0 4px; }
.inv-status .badge { font-size: 12px; padding: 4px 10px; }
.inv-to { margin: 4px 0 0; }
.inv-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.inv-item-main { display: flex; flex-direction: column; gap: 2px; }
.inv-addrow { display: flex; gap: 8px; margin: 12px 0 4px; }
.inv-due-row { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.sig-box { display: flex; flex-direction: column; gap: 2px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
.sig-script { font-family: "Snell Roundhand", "Segoe Script", cursive; font-size: 24px; }
.inv-sticky { position: sticky; bottom: 0; background: var(--bg, #f7faf8); padding: 12px 0 calc(10px + env(safe-area-inset-bottom)); margin-top: 18px; }
.inv-sticky .btn-primary { width: 100%; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pay-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 13px; border: 1.5px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.65); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; }
.pay-tile svg { width: 30px; height: 30px; color: var(--accent-dark); }
.pay-tile.sel { border-color: var(--accent); background: #E2E8EF; box-shadow: 0 0 0 2px rgba(110, 140, 174, 0.18); }

/* ---- boot skeleton + back navigation + practitioner cards (2026-11-07) ---- */
#boot-skel { padding: 14px 16px; }
#cal-skel { padding: 6px 2px; }
.skel-strip { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.skel-strip .skl-line { margin: 6px 0; }
.skel-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skel-col { display: flex; flex-direction: column; }
.skl-line.w20 { width: 20%; }
.skl-card { height: 64px; border-radius: 12px; margin: 6px 0;
  background: linear-gradient(100deg, rgba(20, 40, 35, 0.06) 40%, rgba(20, 40, 35, 0.12) 50%, rgba(20, 40, 35, 0.06) 60%);
  background-size: 200% 100%; animation: skl-shimmer 1.2s infinite; }
#topbar-back { margin-right: 2px; }
.pract-row { cursor: pointer; align-items: center; }
.pract-ava { display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  background: #E2E8EF; color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.pract-ava.big { width: 64px; height: 64px; font-size: 20px; }
.pract-ava img { width: 100%; height: 100%; object-fit: cover; }
.pract-photo-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.pract-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pract-hint { margin: -6px 0 8px; }
.card-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.ctab { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.65);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.ctab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sig-preview { display: flex; align-items: center; justify-content: center; min-height: 74px;
  border: 1px dashed var(--line); border-radius: 12px; padding: 10px;
  background: repeating-conic-gradient(#f4f6f5 0% 25%, #ffffff 0% 50%) 0 0 / 18px 18px; }
.sig-img { max-width: 240px; max-height: 84px; object-fit: contain; }
.sig-box .sig-img { align-self: flex-start; }
#sig-pad { width: 100%; height: 220px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; touch-action: none; cursor: crosshair; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-weight: 600; padding: 8px 0; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- intake forms (wave 2026-11-09: full content + e-signature) ---------- */
.frm-list { padding: 6px 16px; }
.frm-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-bottom: 1px solid var(--line); background: #fff;
  padding: 15px 2px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left;
}
.frm-row:last-child { border-bottom: 0; }
.frm-row-title { font-weight: 600; }
.frm-row-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.frm-row .chev { color: var(--muted); font-size: 18px; }
.frm-back { margin-bottom: 10px; font-size: 15px; }
.frm-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.frm-label { font-size: 13px; color: var(--muted); }
#frm-form input[type="text"], #frm-form input[type="email"], #frm-form input[type="tel"],
#frm-form input[type="date"], #frm-form textarea, #frm-form select {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 16px; color: var(--ink); background: #fff; width: 100%;
}
.frm-note {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--ink);
}
.frm-note p { margin: 0 0 10px; }
.frm-note p:last-child { margin-bottom: 0; }
.frm-choice-group { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 2px; }
.frm-check {
  display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px;
  font-size: 15px !important; color: var(--ink) !important; margin-bottom: 10px; cursor: pointer;
}
.frm-check input[type="checkbox"], .frm-check input[type="radio"] {
  width: 20px !important; height: 20px; flex: 0 0 20px; margin: 1px 0 0;
  accent-color: var(--accent);
}
.frm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px; }
.frm-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 14px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.frm-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.frm-sig { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.frm-sig .frm-check { margin-bottom: 0; }
.frm-sig-text {
  font-family: "Snell Roundhand", "Segoe Script", cursive;
  font-size: 28px; color: var(--ink); min-height: 58px;
}
.frm-sig-script { font-family: "Snell Roundhand", "Segoe Script", cursive; font-size: 28px; }
.frm-signed-line { font-size: 15px; }
.frm-link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px;
}
.frm-link-url { word-break: break-all; color: var(--muted); }
.frm-bookdone { margin: 14px auto 4px; max-width: 420px; }
.frm-bookdone p { margin: 0 0 10px; }
.frm-bookdone a.btn-secondary { display: inline-block; text-decoration: none; width: 100%; }
#frm-error { margin-top: 10px; }

/* Settings -> Forms builder (v0-31) */
.formset-row { align-items: flex-start; gap: 10px; }
.formset-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.formset-ctl .frm-check { margin: 0; font-size: 13px; }
.formset-field { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.formset-frow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.formset-frow input[type="text"] { flex: 1 1 140px; }
.formset-frow select { flex: 0 1 auto; }
.formset-fbtns { margin-left: auto; display: flex; gap: 6px; }
.formset-sub { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.formset-sub textarea { width: 100%; margin-top: 4px; }

/* ================= wave v0-32: availability, services, client card ======== */
/* Blocked time inside a day column: a hatched closed zone, never an
   appointment (no drag affordances, its own sheet on tap). */
.cal-block { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 6px;
  font-size: 11px; line-height: 1.3; color: #5a6a61; overflow: hidden; cursor: pointer; z-index: 1;
  background: repeating-linear-gradient(45deg, rgba(226,232,236,.92), rgba(226,232,236,.92) 7px, rgba(214,222,228,.92) 7px, rgba(214,222,228,.92) 14px);
  box-shadow: inset 0 0 0 1px rgba(148,164,175,.45); }
.cal-block .cal-block-t { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.cal-block .cal-block-l { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-off-label { position: absolute; top: 38%; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #93a29a; pointer-events: none; }
.team-track .tt-block { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; z-index: 1; cursor: pointer;
  background: repeating-linear-gradient(45deg, rgba(226,232,236,.92), rgba(226,232,236,.92) 7px, rgba(214,222,228,.92) 7px, rgba(214,222,228,.92) 14px);
  box-shadow: inset 0 0 0 1px rgba(148,164,175,.45); }
.sheet-subhead { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); }
.check-row, .radio-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.check-row input, .radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.hrs-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hrs-row .hrs-day { flex: 0 0 92px; font-weight: 600; font-size: 14px; }
.hrs-row input[type="time"] { flex: 1; min-width: 0; }
.hrs-row .check-row { padding: 0; }
/* Service colour swatches (part E) */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; margin: 6px 0 12px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(23,37,31,.12);
  cursor: pointer; padding: 0; }
.swatch.sel { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.svc-preview { margin: 4px 0 14px; }
.svc-sample { position: relative; border-radius: 10px; padding: 8px 10px; font-size: 12px;
  line-height: 1.3; color: var(--ink); max-width: 280px; }
.svc-sample .a-name { font-weight: 700; }
/* Client card, ClinicSense layout (part G) */
.cc-head { position: relative; }
.cc-edit-btn { position: absolute; top: 2px; right: 2px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--accent-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.cc-edit-btn svg { width: 17px; height: 17px; }
.cc-quick { display: flex; justify-content: center; gap: 16px; margin: 14px 0 4px; }
.cc-qbtn { width: 46px; height: 46px; border-radius: 50%; border: 1.6px solid var(--line);
  background: #fff; color: var(--accent-dark); display: flex; align-items: center; justify-content: center; }
.cc-qbtn svg { width: 20px; height: 20px; }
.cc-qbtn:active { background: #eef3f6; }
.cc-remind, .cc-since-line { text-align: center; margin: 6px 0 0; }
.cc-sec-title { margin: 20px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.cc-appt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-appt-card { border-radius: 14px; padding: 12px; min-height: 92px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 4px 9px rgba(23,37,31,.14), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); }
.cc-appt-card .cc-appt-k { font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; opacity: .75; }
.cc-appt-card strong { font-size: 14px; }
.cc-appt-card.empty { background: #F2F5F3; color: var(--muted); cursor: default; box-shadow: none;
  align-items: flex-start; justify-content: center; }
.cc-wide { width: 100%; margin-top: 10px; }
.ccp-back { margin-bottom: 8px; }
/* Appointments & Notes timeline (part G, clarification 2) */
.tl-month { background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 7px 12px; border-radius: 9px; margin: 16px 0 10px; }
.tl-row2 { display: flex; gap: 10px; margin-bottom: 8px; }
.tl-rail { flex: 0 0 42px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; }
.tl-dow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tl-daynum { font-size: 15px; font-weight: 700; width: 30px; height: 30px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%; }
.tl-daynum.today { background: var(--accent); color: #fff; }
.tl-card { flex: 1; min-width: 0; border-radius: 12px; padding: 10px 12px; display: flex;
  align-items: center; gap: 10px; cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 3px 8px rgba(23,37,31,.13), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.38); }
.tl-card .tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-card .tl-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card.cancelled { opacity: .5; box-shadow: none; }
.tl-card.tl-today { background: #EDF0F2; color: var(--muted); cursor: default; box-shadow: none; font-weight: 600; }
.tl-card.tl-note { background: #F7F9FA; box-shadow: none; border: 1px solid var(--line); }
.tl-chip { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 3px 8px;
  border-radius: 999px; background: rgba(255,255,255,.65); color: var(--muted); }
.tl-chip.paid { color: #1E7A46; }
.tl-chip.due { color: #9A6B12; }
.tl-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink); }
/* Memos list (part G, clarification 4) */
.memo-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.memo-row:last-child { border-bottom: 0; }
.memo-main { flex: 1; min-width: 0; }
.memo-main strong { font-size: 15px; }
.memo-prev { margin: 2px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.memo-more { padding: 0; margin-top: 2px; }
.cc-fab { position: fixed; right: 18px; bottom: 84px; width: 54px; height: 54px; border-radius: 50%;
  border: 0; background: var(--accent); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 20px rgba(23,37,31,.30); z-index: 40; display: flex; align-items: center; justify-content: center; }
/* Email Forms (part G, clarification 3) */
.ef-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ef-row:last-child { border-bottom: 0; }
.ef-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ef-row .ef-name { flex: 1; }
/* Uploads grouped by date (part G, clarification 5) */
.file-date { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.file-date:first-child { margin-top: 2px; }
