/* Window Bees: black canvas, purple actions, layered dark working surfaces.
   Existing phone layout and desktop breakpoints are preserved. */
:root {
  color-scheme: dark;
  --canvas: #000000; --surface: #121016; --raised: #1B1821; --subtle: #25212C;
  --ink: #F4F1F8; --muted: #ABA3B6; --line: #2E2936; --control: #796E87;
  --primary: #7C1FD6; --primary-hover: #8828E0; --primary-pressed: #6818B8;
  --accent: #C08BFF; --focus: #CE9FFF; --primary-soft: #29163D; --on-primary: #FBF8FF;
  --danger: #FF9BAD; --danger-fill: #A32638; --danger-soft: #351922;
  --success: #83D9A3; --success-soft: #142B20; --success-line: #315840;
  --warning: #F0C477; --warning-soft: #332716;
  --disabled-bg: #25212C; --disabled-text: #786F83;
  --brand-black: #000000; --on-brand: #F4F1F8; --brand-muted: #ABA3B6; --brand-hover: #1B1821;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ABA3B6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --tabs-h: calc(64px + env(safe-area-inset-bottom));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 16px/24px Archivo, Arial, sans-serif; font-variant-numeric: tabular-nums;
  padding-bottom: var(--tabs-h);
}
body.has-dock { padding-bottom: calc(var(--tabs-h) + var(--dock-h, 76px) + 16px); }
body.kb-open { padding-bottom: 24px; }
body.kb-open .tabs { display: none; }
body.kb-open .dock-wrap { position: static; box-shadow: none; }
body.bare { padding-bottom: 0; }
body.bare .tabs, body.bare .top, body.bare .side { display: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 28px; line-height: 34px; font-weight: 700; }
h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: normal; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus, h1:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 12px; height: 12px; }

/* ---------- shell ---------- */
.top { min-height: calc(64px + env(safe-area-inset-top)); padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; background: var(--brand-black); color: var(--on-brand); margin-bottom: 16px; }
.top-brand { display: flex; align-items: center; width: 240px; height: 48px; }
.logo-long { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; }
.top .icon-btn { color: var(--on-brand); }
.top :focus-visible, .side :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.acct { position: relative; }
.pop {
  position: absolute; right: 0; top: 52px; z-index: 30; min-width: 200px; padding: 8px 0;
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: none;
  transform-origin: top right; animation: pop-in 160ms var(--ease);
}
.pop a, .pop button { display: flex; align-items: center; min-height: 48px; padding: 0 16px; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); text-decoration: none; font-weight: 500; cursor: pointer; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.98); } }
.side { display: none; }
main { padding: 0 16px 32px; max-width: 720px; margin: 0 auto; }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--tabs-h); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 16px; font-weight: 600; }
.tabs a .pill { display: grid; place-items: center; width: 48px; height: 28px; border-radius: 8px; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"] .pill { background: var(--primary-soft); }
.dock-wrap {
  position: fixed; left: 0; right: 0; bottom: var(--tabs-h); z-index: 19; padding: 12px 16px;
  background: var(--raised); border-top: 1px solid var(--line);
}
.dock-wrap > * { max-width: 688px; margin: 0 auto; }
.offline { position: sticky; top: 0; z-index: 40; background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 600; padding: 8px 16px; text-align: center; }
.backbar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin: 0 -8px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px; color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- type helpers ---------- */
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 20px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.practice-note { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 18px; color: var(--muted); }
.sub { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }
.sec { margin-top: 32px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 48px; }
.count { color: var(--muted); font-weight: 400; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border-radius: 8px; border: 1px solid var(--control); background: var(--surface); color: var(--ink);
  font-size: 16px; line-height: 20px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 120ms var(--ease), background-color 120ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:active { background: var(--primary-pressed); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); min-height: 48px; padding: 0 8px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger-fill { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-primary); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; transform: none; }
.btn.quiet[disabled] { background: transparent; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn.primary { background: var(--primary); color: var(--on-primary); }
.spin { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover { background: var(--primary-hover); }
  .btn:not(.primary):not([disabled]):hover { background: var(--subtle); }
  .btn.quiet:hover { background: var(--subtle); }
  .row:hover, .pop a:hover, .pop button:hover { background: var(--subtle); }
}

/* contact row: Call / Text / Go */
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contact .btn { min-height: 48px; padding: 0 8px; }
.contact-hint { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- lists ---------- */
.panel { background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.panel > * + * { border-top: 1px solid var(--line); }
.row { display: block; padding: 16px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.row:active { background: var(--subtle); }
a.row { cursor: pointer; }
.row-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.name { font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.addr { overflow-wrap: anywhere; }
.jcard .tel { margin-top: 2px; font-weight: 600; }
.chev { color: var(--muted); }
.job { padding: 16px; }
.job-main { display: block; color: inherit; text-decoration: none; margin: -16px -16px 0; padding: 16px 16px 0; }
.job-time { font-weight: 600; }
.rep { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; line-height: 20px; }
.job .name { margin-top: 8px; }
.warn { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--warning); }
.job .contact { margin-top: 16px; }
.done-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
.done-row .tick { color: var(--success); }
.empty { padding: 24px 16px; }
.empty h3 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: normal; }
.empty p { margin-top: 4px; color: var(--muted); }
.empty .btn { margin-top: 16px; }
.skel { height: 88px; background: var(--subtle); }
.panel > .skel + .skel { border-top: 1px solid var(--surface); }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.chip.draft { color: var(--muted); background: var(--subtle); }
.chip.sent, .chip.scheduled { color: var(--accent); background: var(--primary-soft); }
.chip.approved, .chip.done { color: var(--success); background: var(--success-soft); }
.chip.declined, .chip.expired { color: var(--danger); background: var(--danger-soft); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--subtle); font-size: 14px; line-height: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- forms ---------- */
.field { display: block; margin-top: 20px; }
.field > span { display: block; font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 8px; }
.field .hint { display: block; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=tel], input[type=email], input[type=url], input[type=search], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 52px; padding: 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface);
  font-size: 16px; line-height: 24px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
select { background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[readonly] { background: var(--subtle); }
.invalid input, .invalid select, .invalid textarea, input.invalid { border-color: var(--danger); }
.err { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--danger); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair > .field { margin-top: 20px; }
.csz { display: grid; grid-template-columns: 1fr 96px; gap: 12px; }
.disclose { display: flex; align-items: center; gap: 8px; margin-top: 24px; min-height: 48px; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.disclose[aria-expanded="true"] svg { transform: rotate(180deg); }
.form-err { margin-top: 16px; padding: 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 14px; line-height: 20px; font-weight: 600; }
.ok-msg { margin-top: 16px; padding: 12px; border-radius: 8px; background: var(--success-soft); color: var(--success); font-weight: 600; animation: fade 120ms linear; }
@keyframes fade { from { opacity: 0; } }

/* ---------- detail blocks ---------- */
.dl { margin: 0; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.dl > div:first-child { border-top: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.crow { display: flex; align-items: center; gap: 12px; min-height: 52px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.crow small { display: block; color: var(--muted); font-size: 14px; line-height: 20px; }
.ctx { margin-top: 12px; color: var(--muted); }
.ctx b { color: var(--ink); font-weight: 600; }
.when { margin-top: 12px; font-size: 20px; line-height: 26px; font-weight: 600; }

/* quote editor */
.li { padding: 16px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li .pair .field { margin-top: 12px; }
.li > .field:first-child { margin-top: 0; }
.li-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.li-amt { font-size: 18px; line-height: 24px; font-weight: 600; }
/* ChatGPT review 2026-11-13: remove is quieter than add/save; schedule text readable in daylight */
.li-foot .rm { color: var(--muted); font-size: 14px; font-weight: 500; }
.vrow .small { font-size: 16px; line-height: 22px; }
.li-ro { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.li-ro:first-child { border-top: 0; }
.total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.total b { font-size: 28px; line-height: 34px; font-weight: 700; }
.mismatch { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 14px; line-height: 20px; font-weight: 600; }
.picker { display: flex; gap: 8px; margin-top: 16px; }
.picker select { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn-row .btn { flex: 1 1 140px; }
.share-pre { margin-top: 12px; padding: 12px; background: var(--subtle); border-radius: 8px; white-space: pre-wrap; font-size: 14px; line-height: 20px; user-select: all; }
.examples { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--primary-soft); color: var(--accent); font-size: 14px; line-height: 20px; }

/* schedule */
.weekbar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; min-height: 48px; }
.weekbar strong { font-size: 16px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 12px; }
.days button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.days button small { font-size: 12px; line-height: 16px; color: var(--muted); }
.days button b { font-size: 16px; line-height: 20px; font-weight: 600; }
.days button.today b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.days button[aria-pressed="true"] { background: var(--primary-soft); }
.day { margin-top: 24px; scroll-margin-top: 16px; }
.day h3 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: normal; margin-bottom: 8px; }
.vrow { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 16px; color: inherit; text-decoration: none; min-height: 88px; }
.vrow .t { font-weight: 600; }
.none { padding: 12px 16px; color: var(--muted); }

/* sign in */
.signin { max-width: 400px; margin: 0 auto; padding: calc(96px + env(safe-area-inset-top)) 24px 48px; }
.brand-tile { margin-inline: auto; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 12px; background: var(--brand-black); }
.brand-tile img { display: block; width: 96px; height: auto; }
.signin h1 { margin-top: 24px; }
.signin .lede { margin-top: 8px; color: var(--muted); }
.signin form { margin-top: 32px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.signin form > .field:first-child { margin-top: 0; }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 2px; top: 2px; height: 48px; padding: 0 12px; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.signin .btn { margin-top: 16px; }
.signin .pw-note { margin-top: 12px; }
.signin .pw-note:empty { display: none; }

/* public quote page */
.pub-top { display: flex; align-items: center; min-height: calc(64px + env(safe-area-inset-top)); padding: max(8px, env(safe-area-inset-top)) 16px 8px; background: var(--brand-black); }
.pub-top .logo-long { max-width: 240px; max-height: 48px; margin: 0 auto; }
.pub { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; }

@media (min-width: 768px) { main { padding: 0 24px 40px; } .dock-wrap { padding: 12px 24px; } }

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  body, body.has-dock { padding: 0 0 0 224px; }
  body.bare { padding: 0; }
  .tabs, .top { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 224px; padding: 0 16px 24px; background: var(--brand-black); color: var(--on-brand); border-right: 1px solid var(--brand-hover); }
  .side-brand { display: flex; align-items: center; height: 88px; width: 192px; }
  .side-brand .logo-long { max-height: 48px; }
  .side-nav { margin-top: 16px; display: grid; gap: 4px; }
  .side-foot { margin-top: auto; display: grid; gap: 4px; }
  .nav-item { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 600; border: 0; background: none; cursor: pointer; width: 100%; }
  .side .nav-item { color: var(--brand-muted); }
  .side .nav-item:not([aria-current="page"]):hover { background: var(--brand-hover); color: var(--on-brand); }
  .nav-item[aria-current="page"], .side .nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--accent); }
  main { max-width: 1120px; margin: 0; padding: 40px; }
  main.narrow { max-width: 800px; }
  h1 { font-size: 32px; line-height: 40px; }
  .total b { font-size: 32px; line-height: 40px; }
  .dock-wrap { position: static; box-shadow: none; border-top: 0; padding: 0 40px 40px; background: none; max-width: 1120px; }
  .dock-wrap > * { margin: 0; max-width: 400px; }
  .page-search { max-width: 400px; }
  /* Today rows become table-like */
  .job { display: grid; grid-template-columns: 112px 1fr 150px 260px; gap: 16px; align-items: center; }
  .job-main { display: contents; }
  .job .name { margin-top: 0; }
  .job .contact { margin-top: 0; }
  .job .who { min-width: 0; }
  /* Customers as a table */
  .ctable .row { display: grid; grid-template-columns: 1.3fr 1fr 1.6fr 1fr 24px; gap: 16px; align-items: center; min-height: 72px; }
  .ctable .row .m-only { display: none; }
  .ctable .d-only { display: block; }
  .cols { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; }
  .cols .sec:first-child { margin-top: 0; }
  .vrow { grid-template-columns: 112px 1fr; }
}
.d-only { display: none; }
@media (prefers-reduced-motion: reduce) {
  .btn, .pop { transition: none; animation: none; }
  .btn:active { transform: none; }
  .spin { animation: none; }
}

/* additions: search field, stacked headings, job/customer columns */
.search { position: relative; display: block; margin-top: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; }
.page-head.stack { flex-direction: column; align-items: stretch; gap: 24px; }
.lastop { margin-left: 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--subtle); }
.results { margin-top: 8px; }
.results button { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; background: none; cursor: pointer; min-height: 56px; }
.results button + button { border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: 1fr 88px 104px 48px; gap: 8px; align-items: end; padding: 12px 0; border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; }
.svc .field { margin-top: 0; }
.svc .field > span { font-size: 12px; line-height: 16px; margin-bottom: 4px; }
.confirm { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--subtle); }
.confirm p { font-weight: 600; }
.confirm .btn-row { margin-top: 12px; }
.dock-confirm { display: flex; align-items: center; gap: 8px; }
.dock-confirm p { flex: 1; font-weight: 600; }
.dock-confirm .btn { min-height: 48px; padding: 0 14px; }
.next-line { margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent); text-align: center; }
@media (max-width: 1023px) { .svc { grid-template-columns: 1fr 1fr 48px; } .svc .field:first-child { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .page-head.stack { flex-direction: row; align-items: center; }
  .job .row-line { display: contents; }
  .job .job-time { order: 1; } .job .who { order: 2; } .job .rep { order: 3; } .job .contact { order: 4; }
  .ctable .row-line { display: contents; }
  .ctable .row .chev { justify-self: end; }
  .jcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
  .jside { position: sticky; top: 24px; }
  .li-table .li { display: grid; grid-template-columns: 1fr 96px 128px 128px 48px; gap: 12px; align-items: end; }
  .li-table .li .pair, .li-table .li .li-foot { display: contents; }
  .li-table .li .field, .li-table .li .pair .field { margin-top: 0; }
  .li-table .li .li-amt { text-align: right; align-self: center; padding-top: 28px; order: 4; }
  .li-table .li .rm { order: 5; width: 48px; min-width: 48px; padding: 0; justify-content: center; align-self: end; }
  .li-table .li .rm span { display: none; }
}
.mt0 { margin-top: 0; } .mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; }
.sel { user-select: all; -webkit-user-select: all; }
.done-row .muted:last-child { margin-left: auto; white-space: nowrap; }

/* ---------- desktop layout v2: ChatGPT spec 2026-11-13 ("use the width for related work").
   Everything below is 1024px+ only; the phone layout above is untouched. ---------- */
@media (min-width: 1024px) {
  .m-only, .ctable .row .m-only { display: none; }
  .d-only, .ctable .d-only { display: block; }
  .btn.d-only { display: inline-flex; }
  /* ref: spec "Shared desktop frame": 1280 max content, 32px padding */
  main { max-width: 1344px; margin: 0 auto; padding: 32px; }
  main.narrow { max-width: 1344px; }
  main.narrow > * { max-width: 736px; }
  .dock-wrap { max-width: 1344px; margin: 0 auto; padding: 0 32px 32px; }
  .dock-wrap > * { max-width: 736px; }
  body.dock-side .dock-wrap { display: none; }
  .page-head { min-height: 52px; }

  /* ref: spec "Today", Image 1: visits left, follow-ups right */
  .tcols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
  .tcols .tmain > .sec:first-child, .tcols .tside > .sec:first-child { margin-top: 24px; }
  .job { grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; row-gap: 8px; align-items: start; padding: 20px; }
  .job .job-time { grid-column: 1; grid-row: 1 / span 3; padding-top: 2px; }
  .job .who, .job .rep, .job .contact { grid-column: 2; }
  .job .rep:empty { display: none; }
  .job .contact { display: flex; gap: 8px; margin-top: 4px; }
  .job .contact .btn { min-height: 44px; min-width: 96px; padding: 0 14px; }
  .tside .row .row-line { align-items: baseline; }

  /* ref: spec "Customers", Image 2: ledger with column headings */
  .page-search { max-width: 440px; }
  .page-search input { min-height: 48px; }
  #ccount { margin-top: 8px; }
  #clist { margin-top: 24px; }
  .ctable .row { grid-template-columns: 1.3fr 0.9fr 1.7fr 0.9fr 24px; min-height: 76px; }
  .ctable .row > .row-line > .d-only:first-of-type { white-space: nowrap; }
  .ctable .thead { min-height: 40px; padding-top: 10px; padding-bottom: 10px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
  .ctable .thead:hover { background: none; }
  .ctable .thead.d-only { display: grid; }
  .ctable .row .d-only:has(.tag) { display: flex; flex-wrap: wrap; gap: 6px; }

  /* ref: spec "Customer detail", Image 3: compact contact group, 1:2 split */
  .cust-contact .contact { display: flex; gap: 8px; }
  .cust-contact .contact .btn { width: 112px; min-height: 44px; }
  .cols { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 40px; margin-top: 24px; }
  .cols > div > .sec:first-child { margin-top: 0; }

  /* ref: spec "Quote editor", Image 4: lines left, sticky total right */
  .qcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
  .qsum { position: sticky; top: 32px; margin-top: 56px; }
  .qsum .panel { padding: 20px; }
  .qsum .panel > * + * { border-top: 0; }
  .qsum b { display: block; margin-top: 4px; font-size: 32px; line-height: 40px; font-weight: 700; }
  .qsum-act { margin-top: 20px; }
  .li-table .li { grid-template-columns: minmax(0, 1fr) 80px 104px 88px 40px; }
  .li-table .li .rm { width: 40px; min-width: 40px; }
  .li-table .li + .li .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .li-table .li + .li .li-amt { padding-top: 0; }
  #addline { width: auto; }

  /* ref: spec "Schedule", Image 5: seven-column agenda week */
  .weekbar { margin-top: 24px; }
  .wk { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .wk-day + .wk-day { border-left: 1px solid var(--line); }
  .wk-head { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 64px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
  .wk-head small { font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 600; }
  .wk-head b { font-size: 18px; line-height: 24px; font-weight: 600; }
  .wk-day.today .wk-head { background: var(--primary-soft); color: var(--accent); }
  .wk-list { display: grid; gap: 8px; align-content: start; min-height: 560px; padding: 8px; }
  .wk-visit { display: grid; gap: 4px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: inherit; text-decoration: none; min-width: 0; }
  .wk-visit.done { background: var(--success-soft); border-color: var(--success-line); }
  .wk-visit .t { font-size: 14px; line-height: 20px; font-weight: 600; }
  .wk-name { font-weight: 600; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
  .wk-visit .rep { font-size: 12px; line-height: 16px; }
  .wk-empty { position: absolute; left: 0; right: 0; top: 50%; text-align: center; color: var(--muted); }

  /* ref: spec "Settings", Image 6: business + data left, price list right */
  #sform { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); column-gap: 48px; align-items: start;
    grid-template-areas: "biz price" "data price" "out price" "msg msg" "save save"; }
  #sform .sbiz { grid-area: biz; } #sform .sprice { grid-area: price; } #sform .sdata { grid-area: data; }
  #sform .sout { grid-area: out; } #sform #smsg { grid-area: msg; } #sform .save-row { grid-area: save; justify-content: flex-end; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
  #sform .save-row .btn { flex: 0 0 200px; }
  #sform .sdata .btn-row .btn { flex: 0 1 auto; }
  .svc { grid-template-columns: minmax(0, 1fr) 88px 104px 40px; gap: 12px; }
  .svc + .svc .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #addsvc { width: auto; margin-top: 12px; }
}
/* before and after side by side only where both add buttons fit on one line */
@media (min-width: 1200px) {
  .phgrps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .phgrps .phgrp + .phgrp { margin-top: 16px; }
}
.oamt .err-t { color: var(--danger); font-weight: 600; }
/* 1024 to 1199: the quote line's description gets its own row */
@media (min-width: 1024px) and (max-width: 1199px) {
  .li-table .li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 88px 40px; }
  .li-table .li > .field:first-child { grid-column: 1 / -1; }
  .li-table .li + .li .field > span { position: static; width: auto; height: auto; clip: auto; }
  .wk-list { padding: 6px; gap: 6px; }
  .wk-visit { padding: 8px; }
  .wk-visit .chip { white-space: normal; }
  .wk-visit .chip svg { display: none; }
  .wk-name { font-size: 15px; line-height: 20px; }
}
/* the desktop column headings are hidden on the phone; keep the first row's top edge as it was */
@media (max-width: 1023px) { .ctable .thead + .row { border-top: 0; } }

/* ---------- getting paid, rain day, photos: ChatGPT spec 2026-11-13 (/tmp/wcrm-pay-spec.txt) ---------- */
/* ref: spec "Customer visit list" + "Done today": one payment line under the name */
.payl { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }
.payl.paid { color: var(--success); font-weight: 600; }
.dr-who { display: flex; flex-direction: column; min-width: 0; }
.done-row .dr-who .name { font-size: 16px; line-height: 24px; }
/* ref: spec "Who owes me": divided list, amount right, ordinary-size total */
.owe-head { flex-wrap: wrap; row-gap: 0; }
.owe-total { font-weight: 600; }
.row.owe { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.oname { font-weight: 600; overflow-wrap: anywhere; }
.oamt { text-align: right; white-space: nowrap; }
.oamt b { font-weight: 600; }
/* ref: spec "Rain day": button under Schedule a visit, panel opens in place */
.head-acts { display: grid; gap: 8px; }
.rain { padding: 16px; margin-top: 16px; }
.panel.rain > * + * { border-top: 0; }
.rain .field { margin-top: 16px; }
.field-lbl { margin-top: 16px; font-size: 14px; line-height: 20px; font-weight: 600; }
.rain-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rain-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.rain-list li:first-child { border-top: 0; }
.rain-acts { display: grid; gap: 8px; margin-top: 16px; }
/* ref: spec "Getting paid": Payment section on a finished visit */
.pbadge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; background: var(--canvas); border: 1px solid var(--line); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.pbadge.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
#pay .dl dd b { font-weight: 600; }
.money-in { position: relative; display: block; }
.money-in > span { position: absolute; left: 12px; top: 14px; color: var(--muted); }
.money-in input { padding-left: 28px; }
.pform .field { margin-top: 16px; }
.pay-acts { display: grid; gap: 8px; margin-top: 16px; }
.plist { list-style: none; margin: 16px 0 0; padding: 0; }
.pent { border-top: 1px solid var(--line); padding: 8px 0; }
.pent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pent b { font-weight: 600; }
.pent.voided .pent-row > div:first-child { color: var(--muted); }
.pent .pv { padding: 0 8px; }
.dock-done p { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--success); margin-bottom: 8px; }
.dock-done-acts { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
/* ref: spec "Before and after photos": three-column square grid per group */
.phgrp { margin-top: 16px; }
.phgrp + .phgrp { margin-top: 24px; }
.phgrp h3 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: normal; }
.ph-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.ph-add .btn { min-height: 48px; }
.ph-add .btn:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.phgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ph { position: relative; display: block; padding: 0; border: 0; background: var(--subtle); border-radius: 8px; overflow: hidden; cursor: pointer; }
.ph img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ph.pend { cursor: default; overflow: visible; background: none; }
.ph.pend img { border-radius: 8px 8px 0 0; }
.ph-foot { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 0 0 8px 8px; background: var(--surface); border: 1px solid var(--line); border-top: 0; font-size: 12px; line-height: 16px; font-weight: 600; }
.ph.fail .ph-foot { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.ph-acts { display: grid; }
.ph-acts .btn { min-height: 48px; font-size: 14px; }
/* full-size photo viewer: the one overlay */
body.viewing { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--brand-black); color: var(--on-brand); }
.vw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
.vw-top p { font-weight: 600; }
.vw-top .icon-btn { color: var(--on-brand); }
.vw-img { display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.vw-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-fail { text-align: center; }
.vw-fail .btn { margin-top: 12px; }
.vw-bot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.vw-bot > .btn.danger { grid-column: 1 / -1; background: var(--surface); }
.vw-confirm { grid-column: 1 / -1; padding: 16px; border-radius: 12px; background: var(--raised); color: var(--ink); animation: fade 150ms var(--ease); }
.vw-confirm p { font-weight: 600; }
.vw-err { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--danger); font-size: 14px; }
.vw-confirm .btn-row { margin-top: 12px; }
@media (min-width: 1024px) {
  /* ref: spec "1024px+ difference" for each feature */
  .head-acts { display: flex; gap: 8px; }
  .head-acts #rainbtn { order: -1; }
  .tcols .tmain > #rainp:not([hidden]) + .sec, .tcols .tmain > #rainp + .ok-msg { margin-top: 24px; }
  .rain { margin-top: 24px; }
  .rain input[type=date] { width: 240px; }
  .rain-acts, .pay-acts { display: flex; gap: 8px; }
  .pair-d { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .tside #owed + .sec { margin-top: 32px; }
  .ph-add { display: flex; }
  .vw-img img { max-width: min(100%, 960px); }
  .vw-bot { display: flex; justify-content: center; }
  .vw-bot > .btn.danger { margin-left: 24px; }
  .vw-confirm { max-width: 520px; margin: 0 auto; }
}
@media (hover: hover) and (pointer: fine) { .ph:hover img { opacity: 0.9; } }

/* =====================================================================
   v9: phone-first CRM screens (2026-11-15). Phone layout first, 1024px+ after.
   ref: walk/chatgpt-crm-design-full.md sections 1-18. Colours come from the tokens above.
   ===================================================================== */
:root { --pill-ink: #16121C; }
[hidden] { display: none !important; }
.tabs[data-n="4"] { grid-template-columns: repeat(4, 1fr); }
.tabs[data-n="5"] { grid-template-columns: repeat(5, 1fr); }
.tabs[data-n="6"] { grid-template-columns: repeat(6, 1fr); }
.tabs a { min-width: 0; }
.tabs a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-brand { width: 180px; }
.top { margin-bottom: 8px; }
.acct .icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 22px; }
.pop { min-width: 232px; padding: 0 0 8px; overflow: hidden; }
.pop-who { padding: 14px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.pop-who b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.pop-who span { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.pop svg { margin-right: 10px; }
.side-me { padding: 0 12px 12px; }
.side-me b { display: block; font-weight: 600; font-size: 15px; line-height: 20px; }
.side-me span { display: block; font-size: 13px; line-height: 18px; color: var(--brand-muted); }

/* full-screen flows: header and tabs step out of the way on a phone */
body.flow .top, body.flow .tabs { display: none; }
body.flow { padding-bottom: 24px; }
body.flow.has-dock { padding-bottom: calc(var(--dock-h, 76px) + 24px); }
body.flow .dock-wrap { bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.flow-page { padding-top: max(8px, env(safe-area-inset-top)); }
body.flow .offline { position: static; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.66); animation: fade 160ms linear; }
.scrim.out { opacity: 0; transition: opacity 150ms linear; pointer-events: none; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; color: var(--ink); animation: sheet-up 220ms var(--ease); overscroll-behavior: contain; }
.scrim.out .sheet { transform: translateY(24px); transition: transform 150ms var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grab { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--control); flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 0 16px; flex: none; }
.sheet-head h2 { font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.sheet-body { padding: 8px 16px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.sheet-open { overflow: hidden; }
.toast { pointer-events: none; position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + 16px); z-index: 90; max-width: 440px; margin: 0 auto; padding: 14px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--control); color: var(--ink); font-weight: 600; animation: fade 120ms linear; }
.toast.bad { background: var(--danger-soft); border-color: var(--danger-fill); color: var(--danger); }
body.flow .toast { bottom: calc(var(--dock-h, 0px) + 16px); }

/* 30-minute reminder bar */
.remind { position: sticky; top: 0; z-index: 45; background: var(--primary-soft); border-bottom: 1px solid var(--primary); }
.remind-in { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; max-width: 720px; margin: 0 auto; }
.remind-t { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; line-height: 22px; }
.remind-t svg { margin-top: 3px; }
.remind-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.remind-a .btn { min-height: 44px; padding: 0 14px; }
.remind-a .icon-btn { width: 44px; height: 44px; margin-left: auto; }

/* shared small pieces */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin-top: 12px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.seg > button, .seg > a { text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; min-width: 0; }
.seg > button > span, .seg > a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg > button[aria-pressed="true"], .seg > button[aria-selected="true"], .seg > a[aria-selected="true"] { background: var(--primary-soft); color: var(--accent); }
.seg4 > button, .seg4 > a { font-size: 14px; padding: 0 4px; gap: 4px; }
@media (max-width: 420px) { .seg4 > a { flex-direction: column; gap: 0; line-height: 16px; padding: 4px 2px; } }
.seg > a > b { font-weight: 700; font-size: 13px; opacity: .8; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rows > li { border-top: 1px solid var(--line); padding: 0 16px; }
.rows > li:first-child { border-top: 0; }
.rows > li > .crow { padding: 6px 0; }
.crow-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.crow-main > b { font-weight: 600; font-size: 17px; line-height: 24px; }
.crow .chev, .crow > svg:last-child { margin-left: auto; }
.crow .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--subtle); color: var(--accent); flex: none; }
.av { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 20px; background: var(--primary-soft); color: var(--accent); font-weight: 700; font-size: 15px; }
.amt-s { font-weight: 600; white-space: nowrap; }
.statrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding-top: 12px !important; padding-bottom: 12px !important; align-items: center; }
.statrow > b { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; }
.statrow > .small { grid-column: 1; }
.statrow > .amt-s { grid-column: 2; grid-row: 1 / span 2; }
.statrow.rev > b, .statrow.rev > .amt-s { color: var(--muted); text-decoration: line-through; }
.notes { padding: 12px; border-radius: 8px; background: var(--subtle); white-space: pre-wrap; overflow-wrap: anywhere; }
.field.inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.field.inline > span { grid-column: 1 / -1; margin-bottom: 0; }
label.check { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 16px; font-weight: 600; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--primary); flex: none; }
.msg { min-height: 0; }
.msg:not(:empty) { margin-top: 12px; }
.pair3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pair3 > .field { margin-top: 12px; }
.center { text-align: center; }
.big { font-size: 28px; line-height: 34px; font-weight: 700; }
.pad { padding: 16px; }
.pad-s { padding: 12px 0; }
.danger-text { color: var(--danger) !important; }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: 15px; }
.btn.big { min-height: 56px; font-size: 17px; }
.okline { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 8px; background: var(--success-soft); border: 1px solid var(--success-line); color: var(--success); font-size: 14px; line-height: 20px; font-weight: 600; }
.okline svg { margin-top: 2px; }
.warnbox { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--warning-soft); border: 1px solid var(--warning); color: var(--warning); font-size: 15px; line-height: 22px; font-weight: 600; }
.warnbox svg { margin-top: 3px; }
.tag-screens { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--subtle); color: var(--ink); font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }
.sec > h2 + .rows, .sec > h2 + .panel { margin-top: 8px; }

/* ---------- calendar ---------- */
.cal-page .page-head h1 { font-size: 28px; }
.yw { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; overflow: hidden; border-radius: inherit; }
.yw .yw-cell + .yw-cell { border-left: 1px solid var(--line); }
.yw > * + * { border-top: 0; }
.yw-cell { display: flex; flex-direction: column; padding: 12px 16px; min-width: 0; color: inherit; text-decoration: none; }
a.yw-cell:active { background: var(--subtle); }
.yw-l { font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.yw-cell b { font-size: 24px; line-height: 32px; font-weight: 700; }
.yw-s { font-size: 13px; line-height: 18px; color: var(--muted); }
.monthnav { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin-top: 12px; }
.monthlbl { text-align: center; font-size: 18px; line-height: 24px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lg { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); font-size: 15px; font-weight: 600; cursor: pointer; }
.lg i { width: 12px; height: 12px; border-radius: 6px; background: var(--c, var(--control)); }
.lg.on { border-color: var(--accent); background: var(--primary-soft); }
.wkdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 12px; text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); }
.cell { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 92px; padding: 3px 2px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.cell.out { background: var(--canvas); }
.cell.out .dn { color: var(--disabled-text); }
.cell.out .bar { opacity: 0.45; }
.cell.sel { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cell.drop { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--success); }
.dn { align-self: flex-start; min-width: 22px; padding: 0 3px; font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; border-radius: 10px; white-space: nowrap; }
.cell.today .dn { background: var(--primary); color: var(--on-primary); }
.bar { display: flex; align-items: center; gap: 2px; height: 17px; padding: 0 3px; border-radius: 4px; background: var(--c, var(--control)); color: var(--pill-ink); font-size: 11px; line-height: 17px; font-weight: 700; min-width: 0; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar svg { width: 10px; height: 10px; flex: none; stroke-width: 3; }
.bar.pencil { background: transparent; border: 1px dashed var(--c, var(--control)); color: var(--c, var(--ink)); line-height: 15px; }
.bar.done { opacity: 0.6; }
.bar.any { border-radius: 8px; }
.bar.more { background: none; color: var(--muted); border: 0; font-weight: 600; }
.bar.lifted { opacity: 0.35; }
/* Phones: 7 columns leave ~50px a day, so the name gets every pixel and a bigger size; clipped, not dotted (the day list below has the full name). */
@media (max-width: 480px) { .cell { padding: 3px 1px 4px; } .bar { padding: 0 2px; font-size: 12px; letter-spacing: -0.02em; } .bar > span { text-overflow: clip; } }
.key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--muted); }
.key span { display: inline-grid; place-items: center; width: 18px; height: 12px; border-radius: 3px; }
.key i { font-style: normal; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.k-b { background: var(--muted); } .k-p { border: 1px dashed var(--muted); } .k-d { background: var(--muted); opacity: 0.6; } .k-a { background: var(--muted); border-radius: 6px !important; }
.calwrap { display: block; }
.dayside { display: none; }
.agenda { margin-top: 20px; }
.agenda .sec-head { min-height: 40px; margin-bottom: 8px; }
.ag { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 56px; padding: 10px 16px; }
.ag-t { font-weight: 600; font-size: 14px; line-height: 20px; }
.ag-n { overflow-wrap: anywhere; }
.ag-n b { font-weight: 600; }
.ag-s { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.cal-addlead { margin-top: 16px; min-height: 52px; }
.daysheet .slot { margin-top: 16px; }
.daysheet .slot:first-child { margin-top: 4px; }
.slot h3, .wday h3 { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: normal; color: var(--muted); margin-bottom: 8px; }
.blocked { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 10px; background: var(--subtle); color: var(--muted); }
.blocked b { color: var(--ink); font-weight: 600; }
.blocked svg { margin-top: 2px; }
.jcard { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.rows > li.jcard { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; background: none; padding: 8px 16px; }
.rows > li.jcard:first-child { border-top: 0; }
.slot .jcard { margin-top: 0; background: var(--raised); }
.jc-link { display: block; color: inherit; text-decoration: none; }
.jc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; }
.jcard .contact { margin-top: 12px; }
.jcard-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btn-row .btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.jcard.stack .btn-row { margin-top: 8px; }
.jcard.reached { opacity: 0.7; }
.weekdays { display: grid; gap: 20px; margin-top: 16px; }
.wday h3 { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); font-size: 17px; line-height: 24px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.wday.today h3 span:first-child { color: var(--accent); }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wrow.none { min-height: 52px; }
.wrow.blk { color: var(--muted); }
.wt { min-width: 96px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
.wrow > .btn.quiet { margin-left: auto; }
.wj { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 8px 0; color: inherit; text-decoration: none; }
.wj .dot, .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--c, var(--control)); flex: none; }
.wn { overflow-wrap: anywhere; font-weight: 600; }
.movesheet .dl.mv { margin-top: 4px; }
.slotpick { display: grid; gap: 8px; margin-top: 8px; }
.sp { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); text-align: left; cursor: pointer; }
.sp b { font-weight: 600; }
.sp span { font-size: 14px; color: var(--muted); }
.sp[aria-checked="true"] { border-color: var(--accent); background: var(--primary-soft); }
.sp[disabled] { opacity: 0.5; cursor: not-allowed; }

/* long-press drag */
body.dragging { overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
.ghost { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; transform: translate(calc(var(--x, 0px) - 50%), calc(var(--y, 0px) - 130%)); padding: 8px 12px; border-radius: 8px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 0 0 1px var(--accent); }
.drag-hint { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 94; padding: 8px 14px; border-radius: 20px; background: var(--raised); border: 1px solid var(--accent); font-weight: 600; font-size: 14px; pointer-events: none; }

/* ---------- schedule flow ---------- */
.flow-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin: 0 -8px; }
.dots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.dots li i { display: block; height: 4px; border-radius: 2px; background: var(--subtle); }
.dots li.past i { background: var(--control); }
.dots li.cur i { background: var(--accent); }
.phase { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 600; }
.flow-q { margin-top: 20px; font-size: 28px; line-height: 34px; }
.step { padding-bottom: 8px; }
.choices { display: grid; gap: 12px; margin-top: 20px; }
.choice { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px; border: 1px solid var(--control); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; }
.choice:active { background: var(--subtle); }
.choice > svg { color: var(--accent); width: 28px; height: 28px; }
.choice b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; }
.choice small { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.draftbox .row { padding: 16px; }
.money-in.big input, .money-in .big { font-size: 28px; line-height: 36px; min-height: 64px; font-weight: 700; }
.money-in.big > span { top: 18px; font-size: 24px; }
.money-in.big input { padding-left: 36px; }
.switch-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-top: 16px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-row i { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--subtle); border: 1px solid var(--control); flex: none; transition: background-color 120ms var(--ease); }
.switch-row i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--ink); transition: transform 160ms var(--ease); }
.switch-row input:checked + i { background: var(--primary); border-color: var(--primary); }
.switch-row input:checked + i::after { transform: translateX(20px); }
.switch-row:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cchip { min-height: 52px; padding: 0 8px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); font-weight: 600; cursor: pointer; }
.cchip[aria-checked="true"] { border-color: var(--accent); background: var(--primary-soft); color: var(--accent); }
.short { min-height: 84px; }
.minimonth { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.mm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: var(--surface); cursor: pointer; }
.mm b { font-size: 16px; line-height: 20px; font-weight: 600; }
.mm.out { background: none; color: var(--disabled-text); }
.mm.today b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.mm[disabled] { background: none; color: var(--disabled-text); cursor: not-allowed; opacity: 0.55; }
.mm[aria-pressed="true"] { border-color: var(--accent); background: var(--primary-soft); color: var(--accent); }
.mdots { display: flex; gap: 3px; height: 6px; }
.mdots i, .kd { display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--control); }
.mdots i.on, .kd.on { background: var(--success); border-color: var(--success); }
.kd { margin: 0 2px 0 6px; vertical-align: middle; }
.slotlist { display: grid; gap: 8px; margin-top: 8px; }
.slotbtn { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; border: 1px solid var(--control); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; }
.slotbtn b { font-weight: 600; }
.slotbtn small { color: var(--muted); font-size: 14px; line-height: 20px; text-align: right; }
.slotbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--primary-soft); }
.slotbtn[disabled] { opacity: 0.55; cursor: not-allowed; }
.radios { display: grid; gap: 8px; margin-top: 16px; }
.rrow { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 14px; border: 1px solid var(--control); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; width: 100%; }
.rrow b { display: block; font-weight: 600; }
.rrow small, .rrow .rtxt small { display: block; color: var(--muted); font-size: 14px; line-height: 20px; }
.rdot { width: 22px; height: 22px; flex: none; border-radius: 11px; border: 2px solid var(--control); position: relative; }
.rrow[aria-checked="true"] { border-color: var(--accent); background: var(--primary-soft); }
.rrow[aria-checked="true"] .rdot { border-color: var(--accent); }
.rrow[aria-checked="true"] .rdot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
label.rrow:has(input:checked) { border-color: var(--accent); background: var(--primary-soft); }
label.rrow:has(input:checked) .rdot { border-color: var(--accent); }
label.rrow:has(input:checked) .rdot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
label.rrow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.rrow:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.review { margin: 8px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.review > div { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 12px 8px 12px 16px; border-top: 1px solid var(--line); }
.review > div:first-child { border-top: 0; }
.review dt { color: var(--muted); font-size: 14px; line-height: 24px; }
.review dd { margin: 0; overflow-wrap: anywhere; }
.review .btn { min-height: 44px; }
.center-page { max-width: 420px; margin: 0 auto; padding-top: 40px; text-align: center; }
.center-page .dl { text-align: left; }
.center-page .sub { margin-top: 8px; }
.okmark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 36px; background: var(--success-soft); border: 1px solid var(--success-line); color: var(--success); }
.okmark svg { width: 36px; height: 36px; }
.stack-btns { display: grid; gap: 12px; margin-top: 20px; justify-items: stretch; }
.stack-btns .btn.quiet { justify-self: center; }
.panel.pad > * + * { border-top: 0; }

/* quote */
.msgbox { margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 24px; }
.copybox { padding: 12px; border-radius: 8px; background: var(--subtle); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.scbtn { min-height: 44px; padding: 0 14px; border: 1px solid var(--control); border-radius: 22px; background: var(--surface); font-weight: 600; cursor: pointer; }
.scbtn[aria-pressed="true"], .scbtn[aria-checked="true"] { border-color: var(--accent); background: var(--primary-soft); color: var(--accent); }
.sc { display: inline-flex; align-items: center; gap: 2px; }
.scp { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }

/* job detail */
.actions { display: grid; gap: 8px; margin-top: 16px; }
.actions .btn { width: 100%; }
.when-s { font-size: 17px; line-height: 24px; font-weight: 600; margin-top: 8px; }
.amt { font-size: 28px; line-height: 34px; font-weight: 700; margin-top: 4px; }
.jcols { display: block; }
.jside { margin-top: 24px; }

/* ---------- money ---------- */
.piggy { padding: 20px 16px; border-radius: 16px; background: var(--primary-soft); border: 1px solid var(--primary); }
.piggy-top { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; }
.piggy-amt { margin-top: 8px; font-size: 44px; line-height: 50px; font-weight: 800; letter-spacing: -0.02em; }
.piggy-sub { margin-top: 4px; color: var(--muted); }
.piggy-dl { margin-top: 12px; border-top: 1px solid var(--primary); }
.piggy-dl > div { border-top-color: var(--primary); }
.piggy-dl dd { font-weight: 700; }
.coll { padding-top: 4px !important; padding-bottom: 8px !important; }
.coll-a { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.coll-a .btn { min-height: 44px; padding: 0 14px; flex: 1 1 140px; }
.acc { display: grid; gap: 8px; }
.acc-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc-h { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; background: none; text-align: left; font-weight: 600; cursor: pointer; }
.acc-h > span { flex: 1; min-width: 0; }
.acc-h > b { color: var(--muted); font-weight: 600; }
.acc-h > svg { transition: transform 160ms var(--ease); }
.acc-h[aria-expanded="true"] > svg:last-child { transform: rotate(90deg); }
.acc-b { border-top: 1px solid var(--line); }
.acc-b > .rows { border: 0; border-radius: 0; }
.acc-b > .pad-s { padding: 12px 16px; }
.monthbar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; text-align: center; }
.monthbar b { font-size: 18px; font-weight: 600; }
.big-amt { margin-top: 4px; font-size: 40px; line-height: 46px; font-weight: 800; letter-spacing: -0.02em; }
.lb { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lb th { text-align: left; padding: 10px 16px; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.lb td { padding: 14px 16px; border-top: 1px solid var(--line); }
.lb tr:first-child td { border-top: 0; }
.lb th.r, .lb td.r { text-align: right; font-weight: 600; }
.lb tr.me td { background: var(--primary-soft); }

/* ---------- sales hub ---------- */
.hub-nav ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hub-nav li + li { border-top: 1px solid var(--line); }
.hub-nav a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
.hub-nav a > span { flex: 1; }
.hub-nav a > b { color: var(--muted); font-weight: 600; }
.hub-nav a svg:first-child { color: var(--accent); }
.hub-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--accent); }
.hub.has-sub .hub-nav { display: none; }
.hub.no-sub .hub-body { display: none; }
.vids { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.vid-i { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vid video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--canvas); }
.vid-i > .btn-row, .vid-i > div:not(.vid) { padding: 0 16px 12px; }
.vid-i h3 { padding: 12px 16px 0; font-size: 17px; line-height: 24px; letter-spacing: normal; }
.vid-i p { padding: 4px 16px 12px; }
.bar-track { height: 8px; border-radius: 4px; background: var(--subtle); overflow: hidden; margin-top: 12px; }
.bar-track > i { display: block; height: 100%; width: var(--w, 0%); background: var(--primary); }
.acc-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.acc-i { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc-i .acc-b { padding: 12px 16px 16px; }
.prev { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; }
.sc-row > div:first-child { flex: 1; min-width: 0; }
.thread { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.thread > li { max-width: 88%; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.thread > li.mine { margin-left: auto; background: var(--primary-soft); border-color: var(--primary); }
.m-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; white-space: normal; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.composer textarea { flex: 1; min-height: 52px; max-height: 160px; }
.icon-btn.send { background: var(--primary); color: var(--on-primary); flex: none; }

/* ---------- people ---------- */
.roles { margin: 16px 0 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.roles legend { padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.rtxt { display: block; }
.rtxt b { display: block; font-weight: 600; }
.passrow { display: flex; gap: 8px; }
.passrow input { flex: 1; min-width: 0; }
.passrow .btn { min-height: 52px; padding: 0 14px; }
.addrow { display: flex; gap: 8px; margin-top: 16px; }
.addrow input { flex: 1; min-width: 0; }

/* ---------- more, map, reach, to-do, requests, our work, settings ---------- */
.more-page .rows { margin-top: 16px; }
.mapbox { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.mapsvg { display: block; width: 100%; height: auto; max-height: 55dvh; }
.mapbg { fill: var(--surface); }
.mapgrid line, .mapgrid path { stroke: var(--line); stroke-width: 1; }
.pin circle.dot { fill: var(--accent); stroke: var(--canvas); stroke-width: 2; }
.pin.pencil circle.dot { fill: var(--surface); stroke: var(--accent); stroke-dasharray: 3 2; }
.pin text { fill: var(--pill-ink); font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.pin.pencil text { fill: var(--accent); }
.pin circle.hit { fill: transparent; }
.pin.on circle.dot { stroke: var(--on-primary); stroke-width: 3; }
.mapnone { padding: 32px 16px; text-align: center; color: var(--muted); }
.mapnote { margin: 0; padding: 10px 14px 12px; }
.selcard { padding: 14px 16px; margin-top: 12px; }
.mlist { list-style: none; margin: 8px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mlist > li + li { border-top: 1px solid var(--line); }
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; }
.mrow.on { background: var(--primary-soft); }
.mnum { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 16px; background: var(--accent); color: var(--pill-ink); font-weight: 800; font-size: 14px; }
.mnum.pencil { background: none; border: 1px dashed var(--accent); color: var(--accent); }
.mact { display: flex; gap: 4px; }
.mact .icon-btn { width: 44px; height: 44px; }
.jlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.todos { list-style: none; margin: 12px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.todo { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 56px; padding: 4px 8px 4px 4px; border-top: 1px solid var(--line); }
.todo:first-child { border-top: 0; }
.tick { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; }
.tick[aria-checked="true"] { color: var(--success); }
.todo-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todo.done .todo-t { color: var(--muted); text-decoration: line-through; }
.todo-c { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 8px 12px 48px; }
.worklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.work { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.work-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.work-pics figure { margin: 0; position: relative; }
.work-pics img, .ph-none { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--subtle); text-align: center; padding: 8px; }
.work-pics figcaption { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.work-t { font-size: 18px; line-height: 24px; font-weight: 600; }
.filebtn { position: relative; cursor: pointer; overflow: hidden; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filebtn:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.phprev { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.slotrow { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; align-items: end; margin-top: 8px; }
.settings-page form { margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.settings-page form > .field:first-of-type { margin-top: 0; }
.settings-page .sec-head + form { margin-top: 0; }
.settings-page form .btn.primary { margin-top: 16px; }
body.bare main { max-width: 480px; }

@media (prefers-reduced-motion: reduce) {
  .sheet, .scrim, .toast, .ok-msg, .vw-confirm { animation: none; }
  .scrim.out .sheet { transition: none; }
  .switch-row i, .switch-row i::after, .acc-h > svg { transition: none; }
}
@media (hover: hover) and (pointer: fine) {
  .seg > button:not([aria-pressed="true"]):hover, .lg:hover, .sp:not([disabled]):hover, .slotbtn:not([disabled]):hover, .choice:hover, .rrow:hover, .mm:not([disabled]):hover { background: var(--subtle); }
  .cell:hover { background: var(--raised); }
  .cell.sel:hover { background: var(--primary-soft); }
}

/* ---------- desktop 1024px+: sidebar, calendar 800 + day list 328 ---------- */
@media (min-width: 1024px) {
  .side-brand { width: 192px; }
  .scrim { align-items: center; }
  .sheet { border-radius: 16px; border-bottom: 1px solid var(--line); max-height: 86dvh; }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 12px; }
  body.flow .side { display: flex; }
  body.flow, body.flow.has-dock { padding: 0 0 0 224px; }
  body.flow .dock-wrap { position: static; padding: 0 32px 32px; }
  .flow-page, .center-page { max-width: 640px; }
  .flow-page { margin: 0 auto; }
  .toast { left: 240px; right: 16px; bottom: 24px; margin: 0; }
  .remind-in { flex-direction: row; align-items: center; justify-content: space-between; max-width: 1344px; padding: 10px 32px; }
  .cal-page { max-width: 1216px; }
  .cal-page .calwrap { display: grid; grid-template-columns: 800px 328px; gap: 24px; align-items: start; }
  .cal-page .dayside { display: block; position: sticky; top: 24px; }
  .cal-page #agenda { display: none; }
  .yw { max-width: 800px; }
  .cell { min-height: 112px; padding: 4px 4px 6px; }
  .bar { height: 19px; font-size: 12px; line-height: 19px; padding: 0 5px; }
  .bar.pencil { line-height: 17px; }
  .agenda { margin-top: 0; }
  .hub { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
  .hub.has-sub .hub-nav, .hub.no-sub .hub-body { display: block; }
  .hub-body { min-width: 0; }
  .vids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
  .jside { margin-top: 0; }
  .more-page, .money-page, .people-page, .settings-page, .req-page, .todo-page, .reach-page, .work-page, .passcode-page, .leads-page, .jobs-page, .team-page, .cust-page { max-width: 760px; margin: 0; }
  .map-page { max-width: 1000px; margin: 0; }
  .worklist { grid-template-columns: 1fr 1fr; }
  .mm { min-height: 56px; }
}

/* sign-in: who's signing in */
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -8px 0 0 -8px; padding: 0 8px; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.signin .who { font-size: 24px; line-height: 30px; font-weight: 700; margin-top: 4px; }
.signin form .field > span { margin-bottom: 8px; }
.signin form .field input { margin-top: 0; }
.signin .btn.quiet { margin-top: 4px; }
.signin .foot-note { margin-top: 24px; text-align: center; }
.signin #s-name .field { margin-top: 0; }
body.sheet-open .toast { bottom: auto; top: 16px; }
.page-head .btn { white-space: nowrap; flex: none; }
ul.notes { list-style: none; display: grid; gap: 10px; margin-bottom: 0; }
ul.notes li { display: flex; flex-direction: column; gap: 2px; }
.pair-d { display: grid; gap: 4px; margin-top: 4px; }
.pair-d .field-lbl { display: block; margin-top: 12px; margin-bottom: 4px; }
@media (max-width: 1023px) {
  .mrow { flex-wrap: wrap; row-gap: 8px; }
  .mrow .crow-main { flex: 1 1 calc(100% - 60px); }
  .mrow .mact { display: flex; align-items: center; gap: 8px; margin-left: 52px; }
}

/* desktop sidebar: the list scrolls by itself so it never runs into the name and Sign out */
@media (min-width: 1024px) {
  .side-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
  .side-foot { flex: none; padding-top: 8px; }
  .side .nav-item { height: 44px; }
}
.from-web { color: var(--accent); font-weight: 600; }

/* practice copy: settings show, read-only, without the browser box around them */
.pform fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pform fieldset:disabled button { display: none; }
.pform fieldset:disabled :is(input, textarea) { opacity: .72; }

/* invoices, reviews, the little numbers beside the menu */
.pbadge.bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.late { color: var(--danger); }
.stars { display: inline-flex; gap: 2px; color: var(--control); }
.stars .on { color: var(--warning); }
.stars .on svg { fill: currentColor; }
.stars svg { display: block; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nbadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 12px; line-height: 20px; font-weight: 700; }
.nav-item .nbadge { margin-left: auto; }
.tabs a { position: relative; }
.tabs a .nbadge { position: absolute; top: 6px; left: calc(50% + 8px); }
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inv-meta { margin-top: 16px; }
.inv-sum { margin-top: 8px; border-top: 1px solid var(--line); }
.inv .total { margin-top: 8px; }
@media print {
  :root { --canvas: #fff; --surface: #fff; --raised: #fff; --subtle: #f4f2f7; --ink: #16121C; --muted: #514A5C; --line: #CFC9D8; --success: #1B6B3A; --success-soft: #fff; --warning: #6B4A00; --warning-soft: #fff; --danger: #8A1C2C; --danger-soft: #fff; }
  html, body { background: #fff; color: #16121C; }
  .noprint { display: none !important; }
  .pub-top { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pub { padding: 24px 0; }
  .li-ro, .total, .inv-sum > div { break-inside: avoid; }
}
.dl dd { overflow-wrap: anywhere; }
.piggy-dl dd, .dl dd b { white-space: nowrap; }
.coll-a .btn.wide { grid-column: 1 / -1; flex-basis: 100%; }
@page { margin: 14mm; }
.bill-page > *, .rev-page > *, .cal-link-page > * { max-width: 760px; }
