/* JRD Booking owner app styles.
   Design tokens and every jb- component rule are copied unchanged from the JRD
   Booking Design System (https://claude.ai/artifact/7odv77pFcj2unbeYn92JwC,
   version 4, 13 October 2026). Change them there first, then copy them here.
   The layout section at the end is this app's own. */
/* ---- design tokens (light; dark by the system setting) ---- */
:root{--ground: #F7F8FA;--surface: #FFFFFF;--surface-sunk: #EEF1F5;--line: #DDE2E9;--line-strong: #CFD5DF;--control-border: #7C8698;--ink: #0F172A;--muted: #5A6478;--accent: #0EA5E9;--accent-strong: #0369A1;--on-accent-strong: #FFFFFF;--accent-wash: #E9F6FE;--accent-on-ink: #0EA5E9;--focus: #0284C7;--danger: #B42318;--on-danger: #FFFFFF;--danger-wash: #FEF6F5;--gold: #C9A227;--gold-ink: #6B5108;--gold-wash: #FBF3DA;--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--space-12: 48px;--radius-sm: 8px;--radius-control: 12px;--radius-card: 16px;--radius-pill: 999px;--tap: 44px;--tabbar: 64px;--hour: 56px;--panel: 440px;--shadow-sheet: 0 -8px 24px rgba(15,23,42,0.12);--shadow-panel: 0 16px 40px rgba(15,23,42,0.18);--font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--ground: #0D1117;--surface: #131A24;--surface-sunk: #090C11;--line: #1C2430;--line-strong: #263142;--control-border: #66728A;--ink: #F7F8FA;--muted: #A7B0C0;--accent: #38BDF8;--accent-strong: #7DD3FC;--on-accent-strong: #0D1117;--accent-wash: #0C2A3A;--accent-on-ink: #0369A1;--focus: #38BDF8;--danger: #F97066;--on-danger: #0D1117;--danger-wash: #2A1414;--gold: #E3B341;--gold-ink: #E3B341;--gold-wash: #2A230F;--shadow-sheet: 0 -8px 24px rgba(0,0,0,0.55);--shadow-panel: 0 16px 40px rgba(0,0,0,0.6);color-scheme:dark}}
:root[data-theme="dark"]{--ground: #0D1117;--surface: #131A24;--surface-sunk: #090C11;--line: #1C2430;--line-strong: #263142;--control-border: #66728A;--ink: #F7F8FA;--muted: #A7B0C0;--accent: #38BDF8;--accent-strong: #7DD3FC;--on-accent-strong: #0D1117;--accent-wash: #0C2A3A;--accent-on-ink: #0369A1;--focus: #38BDF8;--danger: #F97066;--on-danger: #0D1117;--danger-wash: #2A1414;--gold: #E3B341;--gold-ink: #E3B341;--gold-wash: #2A230F;--shadow-sheet: 0 -8px 24px rgba(0,0,0,0.55);--shadow-panel: 0 16px 40px rgba(0,0,0,0.6);color-scheme:dark}

/* JRD Booking components.
   Two families share this file:
     jb-  the owner app, in JRD Booking's own look (JRD tokens);
     bk-  the booking widget, which wears the client's brand through --bk-* custom
          properties. Every widget rule reads a --bk-* property, so a client site
          can restyle the widget without touching this file. */

/* ---------- shared ---------- */
.jb, .jb * { box-sizing: border-box; }
.jb-ic { width: 20px; height: 20px; flex: none; display: block; }
.jb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .jb * { transition: none !important; animation: none !important; } }

/* =========================================================================
   OWNER APP (jb-)
   ========================================================================= */
.jb { font-family: var(--font-sans); color: var(--ink); font-size: 15px; line-height: 22px; }
.jb :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.jb-label { font: 500 11px/14px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.jb-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Button */
.jb-btn { font: 600 15px/20px var(--font-sans); min-height: var(--tap); padding: 0 var(--space-4); border-radius: var(--radius-control);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--ink); text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.jb-btn-primary { background: var(--accent-strong); color: var(--on-accent-strong); }
.jb-btn-primary:hover { background: var(--ink); color: var(--ground); }
.jb-btn-secondary { background: var(--surface); border-color: var(--control-border); color: var(--ink); }
.jb-btn-secondary:hover { background: var(--accent-wash); }
.jb-btn-quiet { color: var(--accent-strong); padding: 0 var(--space-3); }
.jb-btn-quiet:hover { background: var(--accent-wash); }
.jb-btn-danger { background: var(--danger); color: var(--on-danger); }
.jb-btn-danger-quiet { color: var(--danger); }
.jb-btn-danger-quiet:hover { background: var(--danger-wash); }
.jb-btn-block { width: 100%; }
.jb-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Field */
.jb-field { display: grid; gap: 6px; }
.jb-field > span.jb-label { color: var(--muted); }
.jb-input, .jb-select, .jb-textarea { font: 400 15px/22px var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--control-border); border-radius: var(--radius-control); min-height: var(--tap); padding: 10px var(--space-3); width: 100%; }
.jb-textarea { min-height: 88px; resize: vertical; }
.jb-input[aria-invalid="true"] { border-color: var(--danger); }
.jb-hint { font-size: 13px; line-height: 18px; color: var(--muted); }
.jb-error { font-size: 13px; line-height: 18px; color: var(--danger); display: flex; gap: var(--space-1); align-items: center; }
.jb-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--tap); cursor: pointer; }
.jb-toggle input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: var(--radius-pill); border: 1px solid var(--control-border);
  background: var(--surface-sunk); position: relative; flex: none; cursor: pointer; transition: background .18s ease; margin: 0; }
.jb-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .18s ease, background .18s ease; }
.jb-toggle input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.jb-toggle input:checked::after { transform: translateX(20px); background: var(--on-accent-strong); }

/* Status pill: always a word, never color alone */
.jb-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--radius-pill);
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; }
.jb-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.jb-pill-confirmed { background: var(--accent-wash); color: var(--accent-strong); }
.jb-pill-held { background: var(--gold-wash); color: var(--gold-ink); }
.jb-pill-held i { background: var(--gold); }
.jb-pill-completed { background: var(--surface-sunk); color: var(--ink); }
.jb-pill-completed i { border-radius: 0; background: none; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px,-1px); }
.jb-pill-no_show { background: var(--danger-wash); color: var(--danger); }
.jb-pill-no_show i { border-radius: 2px; }
.jb-pill-cancelled { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.jb-pill-cancelled i { background: none; border: 1.5px solid currentColor; }
.jb-pill-block { background: var(--surface-sunk); color: var(--muted); }
.jb-pill-block i { border-radius: 1px; background: repeating-linear-gradient(45deg, currentColor 0 2px, transparent 2px 4px); }

/* Agenda row (Today) */
.jb-agenda { display: grid; gap: var(--space-2); }
.jb-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); text-align: left; width: 100%;
  font: inherit; color: inherit; cursor: pointer; }
.jb-row:hover { border-color: var(--control-border); }
.jb-row-time { font: 500 15px/20px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.jb-row-time small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.jb-row-who { font: 600 17px/24px var(--font-sans); margin: 0; min-width: 0; }
.jb-row-what { font-size: 13px; line-height: 18px; color: var(--muted); margin: 2px 0 0; }
.jb-row-main { min-width: 0; }
.jb-row.is-done { opacity: .62; }
.jb-row.is-block { background: var(--surface-sunk); border-style: dashed; border-color: var(--line-strong); }

.jb-next { background: var(--ink); color: var(--ground); border-radius: var(--radius-card); padding: var(--space-4); display: grid; gap: var(--space-3); }
.jb-next .jb-label { color: var(--accent-on-ink); }
.jb-next-time { font: 500 28px/32px var(--font-mono); font-variant-numeric: tabular-nums; }
.jb-next-who { font: 600 17px/24px var(--font-sans); margin: 0; }
.jb-next-what { font-size: 13px; line-height: 18px; opacity: .78; margin: 2px 0 0; }
.jb-next-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.jb-next .jb-btn-secondary { background: transparent; color: var(--ground); border-color: color-mix(in srgb, var(--ground) 45%, transparent); }
.jb-next .jb-btn-secondary:hover { background: color-mix(in srgb, var(--ground) 12%, transparent); }

/* Week calendar */
.jb-cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.jb-cal-head { display: grid; grid-template-columns: 52px repeat(var(--days, 5), minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
.jb-cal-day { padding: var(--space-2) var(--space-1); text-align: center; font: 500 11px/14px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.jb-cal-day b { display: block; font: 600 17px/22px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.jb-cal-day.is-today b { color: var(--accent-strong); }
.jb-cal-day.is-today b span { display: inline-block; min-width: 28px; border-bottom: 2px solid var(--accent); }
.jb-cal-body { display: grid; grid-template-columns: 52px repeat(var(--days, 5), minmax(0, 1fr)); position: relative; }
.jb-cal-hours { display: grid; }
.jb-cal-hours span { height: var(--hour); font: 500 11px/1 var(--font-mono); color: var(--muted); text-align: right; padding: 4px 8px 0 0; }
.jb-cal-col { position: relative; border-left: 1px solid var(--line); background:
  repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px) var(--hour)); }
.jb-cal-closed { position: absolute; left: 0; right: 0; background: var(--surface-sunk); }
.jb-ev { position: absolute; left: 3px; right: 3px; border-radius: var(--radius-sm); padding: 4px 6px; overflow: hidden;
  background: var(--accent-wash); color: var(--ink); border-left: 3px solid var(--accent); font-size: 12px; line-height: 15px; }
.jb-ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-ev span { font-family: var(--font-mono); color: var(--muted); font-size: 11px; }
.jb-ev.is-held { background: var(--gold-wash); border-left-color: var(--gold); }
.jb-ev.is-block { background: repeating-linear-gradient(45deg, var(--surface-sunk) 0 6px, var(--surface) 6px 12px); border-left-color: var(--control-border); color: var(--muted); }
.jb-ev.is-completed { background: var(--surface-sunk); border-left-color: var(--line-strong); color: var(--muted); }
.jb-ev.is-cancelled { background: transparent; border: 1px dashed var(--line-strong); border-left-width: 3px; color: var(--muted); }
.jb-ev.is-no_show { background: var(--danger-wash); border-left-color: var(--danger); }
.jb-cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 2; }
.jb-cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Bottom sheet (booking detail) */
.jb-sheet { background: var(--surface); border-radius: var(--radius-card) var(--radius-card) 0 0; box-shadow: var(--shadow-sheet); padding: var(--space-3) var(--space-4) var(--space-6); display: grid; gap: var(--space-4); }
.jb-sheet-grip { width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--line-strong); margin: 0 auto; }
.jb-sheet-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: start; }
.jb-sheet-title { font: 600 22px/28px var(--font-sans); margin: 0; }
.jb-sheet-when { font: 500 15px/20px var(--font-mono); color: var(--muted); margin: 4px 0 0; }
.jb-dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.jb-dl dt { color: var(--muted); font-size: 13px; line-height: 22px; }
.jb-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.jb-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.jb-contact .jb-btn { flex-direction: column; gap: 2px; min-height: 60px; font-size: 13px; }
.jb-sheet-foot { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.jb-sheet-foot .jb-btn { flex: 1 1 140px; }

/* Hours editor */
.jb-hours { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.jb-hours-row { display: grid; grid-template-columns: 88px 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.jb-hours-row:first-child { border-top: 0; }
.jb-hours-day { font-weight: 600; }
.jb-hours-ranges { display: flex; flex-wrap: wrap; gap: var(--space-2); min-width: 0; }
.jb-range { font: 500 13px/18px var(--font-mono); font-variant-numeric: tabular-nums; background: var(--surface-sunk); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 4px 8px; white-space: nowrap; }
.jb-hours-closed { color: var(--muted); font-size: 13px; }

/* Banner */
.jb-banner { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--surface); }
.jb-banner-title { font-weight: 600; margin: 0; }
.jb-banner-body { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.jb-banner-actions { grid-column: 2; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.jb-banner-info { background: var(--accent-wash); border-color: transparent; }
.jb-banner-info .jb-ic { color: var(--accent-strong); }
.jb-banner-warning { background: var(--gold-wash); border-color: transparent; }
.jb-banner-warning .jb-ic, .jb-banner-warning .jb-banner-title { color: var(--gold-ink); }
.jb-banner-danger { background: var(--danger-wash); border-color: transparent; }
.jb-banner-danger .jb-ic, .jb-banner-danger .jb-banner-title { color: var(--danger); }

/* Tab bar */
.jb-tabbar { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line);
  min-height: var(--tabbar); padding-bottom: env(safe-area-inset-bottom, 0px); }
.jb-tab { text-decoration: none; display: grid; justify-items: center; align-content: center; gap: 3px; font: 500 11px/14px var(--font-sans); color: var(--muted);
  background: none; border: 0; cursor: pointer; position: relative; min-height: var(--tabbar); }
.jb-tab[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }
.jb-tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.jb-tab .jb-ic { width: 22px; height: 22px; }

/* Empty state */
.jb-empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-4); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-card); }
.jb-empty .jb-ic { width: 32px; height: 32px; color: var(--accent-strong); }
.jb-empty h3 { margin: 0; font: 600 17px/24px var(--font-sans); }
.jb-empty p { margin: 0; max-width: 34ch; color: var(--muted); }

/* Share link */
.jb-share { display: grid; gap: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-4); }
.jb-share-url { display: flex; gap: var(--space-2); align-items: center; background: var(--surface-sunk); border-radius: var(--radius-control); padding: 6px 6px 6px var(--space-3); min-width: 0; }
.jb-share-url code { font: 500 13px/18px var(--font-mono); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jb-share-where { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.jb-share-where li { display: flex; gap: var(--space-2); align-items: center; font-size: 13px; line-height: 18px; color: var(--muted); }
.jb-share-where li .jb-ic { width: 16px; height: 16px; color: var(--accent-strong); }

/* App header */
.jb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.jb-top-brand { display: flex; align-items: center; gap: var(--space-2); font: 600 15px/20px var(--font-sans); }
.jb-top-brand svg { width: 24px; height: 24px; color: var(--accent); }
.jb-date { font: 700 32px/36px var(--font-sans); letter-spacing: -0.01em; margin: 0; }

/* =========================================================================
   OWNER APP, milestone 4: sign-in, forms, lists, customers, settings
   ========================================================================= */
.jb-stack { display: grid; gap: var(--space-6); }
.jb-center { text-align: center; }
.jb-sub { font: 600 17px/24px var(--font-sans); margin: 0; }
.jb-group { display: grid; gap: var(--space-2); }
.jb-group > .jb-label { margin: 0; }

/* Icon-only buttons: close, previous, next. Always carry an aria-label. */
.jb-iconbtn { width: var(--tap); height: var(--tap); display: grid; place-items: center; flex: none; border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--ink); cursor: pointer; transition: background .18s ease; }
.jb-iconbtn:hover { background: var(--surface-sunk); }
.jb-iconbtn[disabled] { opacity: .45; cursor: not-allowed; }

/* Field extras: a unit after the value, a big code box */
.jb-affix { position: relative; display: block; }
.jb-affix .jb-input { padding-right: 52px; }
.jb-affix-text { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); font: 500 13px/18px var(--font-mono); color: var(--muted); pointer-events: none; }
.jb-input.jb-code { font: 500 28px/32px var(--font-mono); letter-spacing: .3em; text-align: center; padding: 12px var(--space-3); }
.jb-input.jb-code-rec { font-size: 20px; letter-spacing: .12em; }
.jb-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.jb-fieldset legend { padding: 0; margin-bottom: 6px; }

/* Forms */
.jb-form { display: grid; gap: var(--space-5); }
.jb-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); align-items: start; }
.jb-form-row.is-3 { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.jb-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); align-items: start; }
.jb-note { margin: 0; display: flex; gap: var(--space-2); align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--muted); }
.jb-note .jb-ic { width: 18px; height: 18px; color: var(--accent-strong); }
.jb-error[role="alert"] { margin: 0; }

/* Segmented control: two to four choices, one tab stop, arrow keys move */
.jb-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; max-width: 100%;
  background: var(--surface-sunk); border: 1px solid var(--control-border); border-radius: var(--radius-control); }
.jb-seg.is-scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.jb-seg.is-scroll .jb-seg-opt { flex: none; }
.jb-seg-opt { font: 600 14px/18px var(--font-sans); min-height: var(--tap); padding: 0 var(--space-4); border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.jb-seg-opt:hover { color: var(--ink); }
.jb-seg-opt[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--control-border); }

/* Time chips (open times in the add form) */
.jb-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.jb-chip { font: 500 14px/18px var(--font-mono); font-variant-numeric: tabular-nums; min-height: var(--tap); padding: 0 var(--space-3);
  border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); cursor: pointer; }
.jb-chip:hover { background: var(--accent-wash); }
.jb-chip[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent-strong); }

/* Checkbox chips (who does a service) */
.jb-check { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); padding: 0 var(--space-3);
  border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; font-weight: 600; }
.jb-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-strong); }

/* Lists: customers, services, settings */
.jb-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.jb-li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); min-height: 56px; width: 100%;
  padding: var(--space-3) var(--space-4); border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; font: inherit;
  text-align: left; text-decoration: none; }
.jb-li:first-child { border-top: 0; }
button.jb-li, a.jb-li { cursor: pointer; }
button.jb-li:hover, a.jb-li:hover { background: var(--accent-wash); }
.jb-li.no-icon { grid-template-columns: minmax(0, 1fr) auto; }
.jb-li > .jb-ic { color: var(--accent-strong); }
.jb-li-main { display: grid; gap: 2px; min-width: 0; }
.jb-li-title { font-weight: 600; overflow-wrap: anywhere; }
.jb-li-meta { font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.jb-li-trail { display: flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.jb-li-trail > .jb-ic { width: 18px; height: 18px; }
.jb-li-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12em; }
.jb-li.is-danger, .jb-li.is-danger > .jb-ic { color: var(--danger); }
.jb-li.is-danger:hover { background: var(--danger-wash); }

/* Sheets: a header row with the title and a close button, a lead line */
.jb-sheet-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.jb-sheet-lead { margin: 4px 0 0; color: var(--muted); }
.jb-sheet-foot .jb-btn { white-space: nowrap; }

/* Customer card */
.jb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.jb-stat { background: var(--surface-sunk); border-radius: var(--radius-control); padding: var(--space-3); display: grid; gap: 2px; min-width: 0; }
.jb-stat b { font: 500 22px/28px var(--font-mono); font-variant-numeric: tabular-nums; }
.jb-stat b.is-text { font: 600 15px/28px var(--font-sans); overflow-wrap: anywhere; }
.jb-stat span { font-size: 12px; line-height: 16px; color: var(--muted); }
.jb-stat.is-bad b { color: var(--danger); }

/* Screens: a title row and a column */
.jb-screen { display: grid; gap: var(--space-5); padding: var(--space-5) var(--space-4) var(--space-8); }
.jb-screen-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.jb-screen-title { font: 600 22px/28px var(--font-sans); margin: 0; }

/* Calendar header: previous, the date, next, and Today */
.jb-daynav { display: flex; align-items: center; gap: var(--space-1); }
.jb-daynav-label { flex: 1; min-width: 0; text-align: center; font: 600 17px/24px var(--font-sans); }
.jb-cal-scroll { overflow-x: auto; }
.jb-cal-day.is-person b { font-size: 15px; }
.jb-cal-slot { position: absolute; left: 0; right: 0; border: 0; background: transparent; cursor: pointer; padding: 0; }
.jb-cal-slot:hover { background: var(--accent-wash); }
.jb-ev { cursor: pointer; text-align: left; font-family: inherit; border-top: 0; border-right: 0; border-bottom: 0; }

/* Sign-in */
.jb-auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); background: var(--ground); }
.jb-auth-card { width: 100%; max-width: 400px; display: grid; gap: var(--space-5); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: var(--space-6) var(--space-5); }
.jb-auth h1 { font: 600 22px/28px var(--font-sans); margin: 0; }
.jb-auth-lead { margin: 6px 0 0; color: var(--muted); }
.jb-auth-foot { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.jb-auth-foot a { color: var(--accent-strong); text-underline-offset: 3px; }
.jb-or { display: flex; align-items: center; gap: var(--space-3); font: 500 11px/14px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.jb-or::before, .jb-or::after { content: ""; flex: 1; border-top: 1px solid var(--line-strong); }

/* Two-step setup */
.jb-qrbox { display: grid; place-items: center; }
.jb-qr { width: 196px; height: 196px; border-radius: var(--radius-control); border: 1px solid var(--line); display: block; }
.jb-key { display: block; font: 500 15px/22px var(--font-mono); letter-spacing: .06em; background: var(--surface-sunk); border-radius: var(--radius-sm); padding: 8px 12px; overflow-wrap: anywhere; color: var(--ink); }
.jb-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; padding: var(--space-4);
  list-style: none; background: var(--surface-sunk); border-radius: var(--radius-control); font: 500 15px/22px var(--font-mono); font-variant-numeric: tabular-nums; }

/* Design system v5: owner settings (HoursEditor ranges, read-only values, install steps, QR card). */
.jb-range-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); gap: var(--space-3); align-items: end; }
.jb-range-edit > .jb-iconbtn { margin-bottom: 0; }
.jb-readonly { margin: 0; padding: 10px 0 2px; font-size: 15px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; }
.jb-steps { margin: 0; padding-left: 1.4em; display: grid; gap: var(--space-2); }
.jb-steps li { padding-left: 4px; }
.jb-share-qr { justify-items: center; text-align: center; }
.jb-share-qr .jb-label { justify-self: start; }
.jb-share-qr .jb-btn { justify-self: stretch; }
.jb-form-row.is-3 { align-items: end; }
.jb-hours-ranges .jb-range { white-space: normal; max-width: 100%; }
/* On a phone the day and Edit share a line and the hours get the full width below. */
.jb-hours { container-type: inline-size; }
@container (max-width: 400px) {
  .jb-hours-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .jb-hours-ranges { grid-column: 1 / -1; grid-row: 2; }
}

/* Design system v6: Google Calendar (the calendar list to choose from, busy times on the calendar). */
.jb-checklist { display: grid; gap: var(--space-2); }
.jb-checklist .jb-check { display: flex; width: 100%; min-height: var(--tap); padding: var(--space-2) var(--space-3); font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.jb-cal-gbusy { position: absolute; left: 3px; right: 3px; z-index: 0; pointer-events: none; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong); background: repeating-linear-gradient(135deg, var(--surface-sunk) 0 6px, var(--surface) 6px 12px); }
.jb-cal-gbusy span { display: block; padding: 2px 6px; font: 500 11px/14px var(--font-sans); color: var(--muted); background: var(--surface-sunk); width: max-content; max-width: 100%; border-bottom-right-radius: 6px; }

/* =========================================================================
   OWNER APP LAYOUT (this file only): the page, the rail, sheets, toasts.
   Every component above comes from the design system unchanged.
   ========================================================================= */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); }
[hidden] { display: none !important; }
.jb-hint a { color: var(--accent-strong); text-underline-offset: 3px; }
.jb h1:focus { outline: none; }

/* Phone first: one column, the tab bar fixed at the bottom. */
.app { min-height: 100vh; min-height: 100dvh; }
.app-main { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + var(--space-6)); }
.app-col { max-width: 640px; margin: 0 auto; }
.app-col.app-wide { max-width: none; }
.app-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
.app-rail-head { display: none; }
.app-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.app-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; overflow: hidden; pointer-events: none; }
.app-progress::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--accent); animation: app-progress 1.1s ease-in-out infinite; }
@keyframes app-progress { from { left: -30%; } to { left: 100%; } }

/* Wide: the four tabs become a left rail. */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .app-nav { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: var(--space-4);
    padding: var(--space-5) var(--space-3); background: var(--surface); border-right: 1px solid var(--line); }
  .app-rail-head { display: grid; gap: var(--space-3); padding: 0 var(--space-2); }
  .app-rail-biz { font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
  .app-nav .jb-tabbar { display: grid; grid-template-columns: 1fr; gap: 2px; border: 0; min-height: 0; padding: 0; background: transparent; }
  .app-nav .jb-tab { grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; gap: var(--space-3);
    min-height: var(--tap); padding: 0 var(--space-3); border-radius: var(--radius-control); font-size: 15px; line-height: 20px; }
  .app-nav .jb-tab:hover { background: var(--surface-sunk); }
  .app-nav .jb-tab[aria-current="page"] { background: var(--accent-wash); }
  .app-nav .jb-tab[aria-current="page"]::before { top: 10px; bottom: 10px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .app-main { padding-bottom: var(--space-8); }
  .app-main .jb-screen { padding: var(--space-8) var(--space-8) var(--space-8); }
  .app-only-phone { display: none !important; }
}
@media (max-width: 899.98px) { .app-only-wide { display: none !important; } }

/* Spanish times ("11:30 a.m.") need a wider time column than English ("11:30 am"). */
html[lang="es"] .jb-row { grid-template-columns: 92px minmax(0, 1fr) auto; }

/* Today */
.app-today-head { display: grid; gap: var(--space-1); }
.app-today-head .jb-label { margin: 0; }

/* Calendar */
.app-cal-tools { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; }
.app-cal-tools .jb-daynav { flex: 1 1 280px; }
.app-cal-wrap { overflow-x: auto; border-radius: var(--radius-card); }
.app-cal-wrap .jb-cal { min-width: calc(52px + var(--days, 1) * 92px); }
.app-cal-wrap .jb-cal-col { cursor: copy; }
.app-cal-wrap .jb-ev { z-index: 1; }
.app-cal-wrap .jb-ev.is-cancelled { z-index: 0; }
.app-cal-wrap .jb-ev:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; z-index: 3; }
.app-cal-off { position: absolute; left: 4px; right: 4px; top: 6px; font-size: 12px; line-height: 16px; color: var(--muted); text-align: center; }

/* Sheets: a native <dialog>. Bottom sheet on phones, a centered panel on wide screens. */
.app-sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; background: transparent; color: var(--ink); overflow: visible; }
.app-sheet::backdrop { background: rgba(15, 23, 42, 0.45); }
.app-sheet > .jb-sheet { max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
  .app-sheet { margin: auto; }
  .app-sheet > .jb-sheet { border-radius: var(--radius-card); box-shadow: var(--shadow-panel, 0 16px 40px rgba(15, 23, 42, 0.18)); }
  .app-sheet .jb-sheet-grip { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .app-sheet[open] > .jb-sheet { animation: app-sheet-in .18s ease-out; }
  @keyframes app-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.app-sheet-loading { padding: var(--space-8) var(--space-4); text-align: center; color: var(--muted); }
.app-dl-answers { display: grid; gap: 4px; }
.app-dl-answers span { color: var(--muted); font-size: 13px; line-height: 18px; }
.app-actions { display: grid; gap: var(--space-2); }
.app-actions-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.app-actions-row .jb-btn { flex: 1 1 140px; white-space: nowrap; }
.app-contact .jb-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Customer picker in the add form */
.app-suggest { display: grid; gap: var(--space-2); }
.app-picked { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--accent-wash); border-radius: var(--radius-control); }
.app-picked b { display: block; }
.app-picked span { font-size: 13px; line-height: 18px; color: var(--muted); }

/* Toasts: one line above the tab bar, read out politely. */
.app-toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + var(--space-3)); transform: translateX(-50%);
  z-index: 60; max-width: calc(100vw - 32px); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control);
  background: var(--ink); color: var(--ground); font: 600 14px/20px var(--font-sans); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25); }
.app-toast.is-bad { background: var(--danger); color: var(--on-danger); }
@media (min-width: 900px) { .app-toast { bottom: var(--space-6); } }
/* The tour: a full-screen modal dialog holding the outline (its huge shadow dims
   everything else) and the card. Centered stops dim the whole screen instead. */
.app-tour { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink); overflow: hidden; }
.app-tour::backdrop { background: transparent; }
.app-tour.is-center { background: rgba(15, 23, 42, 0.55); }
.app-tour-ring { position: absolute; border-radius: var(--radius-card); pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(15, 23, 42, 0.55);
  transition: top .28s ease, left .28s ease, width .28s ease, height .28s ease; }
.app-tour.is-center .app-tour-ring { display: none; }
.app-tour-card { position: absolute; display: grid; gap: var(--space-2); padding: var(--space-5); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-panel); font-family: var(--font-sans);
  transition: top .28s ease, left .28s ease; }
.app-tour-count { margin: 0; }
.app-tour-title { margin: 0; font: 600 19px/26px var(--font-sans); }
.app-tour-body { margin: 0; font-size: 15px; line-height: 22px; color: var(--muted); }
.app-tour-actions { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; }
.app-tour-actions .jb-btn-quiet { padding: 0 var(--space-2); margin-left: calc(-1 * var(--space-2)); }
.app-tour-nav { display: flex; gap: var(--space-2); margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .app-tour-ring, .app-tour-card { transition: none; } }
.app-tour-watch { margin-top: var(--space-1); }
.app-tour-watch[hidden] { display: none; }
/* The walkthrough video: a modal window over the tour, up to 960px wide, the
   player 16:9 on black; on phones the two buttons share the row. */
.app-video { border: 0; padding: var(--space-4); margin: auto; width: 100%; max-width: calc(960px + 2 * var(--space-4));
  max-height: 100vh; max-height: 100dvh; background: transparent; color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.app-video::backdrop { background: rgba(15, 23, 42, 0.72); }
.app-video-win { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-panel); font-family: var(--font-sans); }
.app-video-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.app-video-head .jb-iconbtn { margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 0; }
.app-video-title { margin: 0; font: 600 19px/26px var(--font-sans); }
.app-video-meta { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.app-video-player { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); background: #000; border-radius: var(--radius-sm); }
.app-video-player:fullscreen { max-height: none; border-radius: 0; }
.app-video-failed { margin: 0; }
.app-video-failed[hidden] { display: none; }
.app-video-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; }
@media (max-width: 520px) { .app-video-actions .jb-btn { flex: 1 1 auto; } }

/* As a popover (above an open sheet): undo the browser's popover box. */
.app-toast[popover] { top: auto; right: auto; margin: 0; border: 0; overflow: visible; }
/* A toast never takes a tap meant for the button under it. */
.app-toast { pointer-events: none; }

/* The sign-in pages share the auth card. */
.app-auth-busy { display: flex; gap: var(--space-2); align-items: center; color: var(--muted); }

/* Screen head with more than one action (Customers: Export and Add). */
.app-head-actions { display: flex; gap: var(--space-2); align-items: center; }

/* JRD Animation only: a business's brand and websites. The preview wears the
   business's colors on purpose (aria-hidden); everything around it is JRD's. */
.app-color-row, .app-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; }
.app-swatch, .app-add-row > .jb-btn { margin-top: 20px; }
.app-swatch { width: 52px; height: var(--tap); padding: 3px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; }
.app-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.app-swatch::-webkit-color-swatch { border: 0; border-radius: var(--radius-sm); }
.app-swatch::-moz-color-swatch { border: 0; border-radius: var(--radius-sm); }
.app-brand-preview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-card); }
.app-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; font-weight: 700; font-size: 14px; line-height: 1; }
.app-brand-name { display: grid; min-width: 0; }
.app-brand-name b { font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.app-brand-name span { font-size: 12px; line-height: 16px; opacity: .72; overflow-wrap: anywhere; }
.app-brand-btn { padding: 10px 14px; font-weight: 600; font-size: 14px; line-height: 20px; white-space: nowrap; }

/* ---------- notifications (milestone 6a): the Today card, the sheet, the device list ---------- */
.app-push-slot:empty { display: none; }
.app-push-state { display: grid; gap: var(--space-3); }
.app-push-prefs { gap: var(--space-2); }
.app-push-prefs > .jb-label { margin: var(--space-4) 0 0; }
.app-push-prefs > .jb-label:first-child { margin-top: 0; }
.app-push-prefs > .jb-seg { justify-self: start; }
.app-device .jb-li-trail { flex: none; }
