/* ============================================================
   mobile.css — SalesIQ mobile field app, 2026-09-24 redesign
   Loaded ONLY by index.html, after styles.css + tokens.css. Every rule is scoped to
   body.m-app or to m-* classes, so the web console (console.html) is never affected.
   Colours, type, radii and motion come from tokens.css (light + dark).
   ============================================================ */

body.m-app { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; letter-spacing: -0.006em; font-variant-numeric: tabular-nums; }
body.m-app .app { max-width: 560px; overflow-x: clip; }
body.m-app .m-view, body.m-app .m-screen { min-width: 0; max-width: 100%; }
body.m-app :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
body.m-app button, body.m-app a { -webkit-tap-highlight-color: transparent; }
body.m-app .avatar { overflow: visible; flex: none; }
body.m-app .avatar img { border-radius: 50%; }
.m-muted { color: var(--text-3); }
.req { color: var(--danger); }
.m-spacer { flex: 1 1 auto; min-width: 4px; }
/* ≥44px touch targets for compact controls: invisible hit-slop around them */
.m-chipbtn, .m-temp, .m-link, .m-stage-btn, .m-chip { position: relative; }
.m-chipbtn::after, .m-temp::after, .m-stage-btn::after { content: ""; position: absolute; inset: -4px -2px; }
.m-link::after { content: ""; position: absolute; inset: -6px -4px; }

/* ---------- App bar ---------- */
.m-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.m-bar-mark { display: inline-flex; flex: none; filter: drop-shadow(0 4px 10px rgba(47,111,237,.28)); }
.m-bar-mark svg { display: block; }
.m-bar-logo { flex: none; height: 34px; width: auto; max-width: 96px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px 6px; border: 1px solid var(--border); }
.m-bar-title {
  flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, auto) auto 1fr; grid-template-rows: auto auto;
  align-items: center; text-align: left; background: none; border: 0; padding: 4px 6px; margin-left: -6px; border-radius: 12px; color: var(--text);
}
.m-bar-switch { cursor: pointer; transition: background var(--dur-2); }
.m-bar-switch:active { background: var(--surface-2); }
.m-bar-name { grid-column: 1; grid-row: 1; font-family: var(--font-display); font-weight: 750; font-size: 16px; letter-spacing: -.015em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bar-chev { grid-column: 2; grid-row: 1; display: inline-flex; color: var(--text-3); margin-left: 3px; }
.m-bar-sub { grid-column: 1 / -1; grid-row: 2; font-size: 11.5px; color: var(--text-3); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-icon-btn {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-2);
}
.m-icon-btn:active { transform: scale(.94); background: var(--surface-2); }
.m-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.m-me { flex: none; background: none; border: 0; padding: 2px; border-radius: 50%; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.m-me .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--primary) 45%, transparent); }
.m-bar-detail .m-bar-title { margin-left: 0; }
/* Detail: no duplicate name — the bar shows the project until the hero card scrolls away. */
.m-bar-detail:not(.hero-off) .m-bar-name { display: none; }
.m-bar-detail:not(.hero-off) .m-bar-sub { grid-row: 1 / -1; font-family: var(--font-display); font-size: 16px; font-weight: 750; letter-spacing: -.015em; color: var(--text); }
.m-bar-detail.hero-off .m-bar-title { animation: m-bar-in var(--dur-2, .2s) var(--ease-out, ease-out); }
@keyframes m-bar-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Bottom tab bar (animated indicator) ---------- */
.m-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; margin: 0 auto; max-width: 560px;
  display: grid; grid-template-columns: repeat(var(--tn, 4), 1fr);   /* 2 or 3 tabs now — spread evenly */
  padding: 6px 6px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.m-tab {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; padding: 4px 0; background: none; border: 0; color: var(--text-3); font-size: 11.5px; font-weight: 600;
  transition: color var(--dur-2);
}
.m-tab-ic { position: relative; width: 56px; height: 32px; display: grid; place-items: center; border-radius: 16px; transition: transform var(--dur-2) var(--ease-out); }
.m-tab-ic svg { width: 22px; height: 22px; }
.m-tab:active .m-tab-ic { transform: scale(.92); }
.m-tab.active { color: var(--primary); }
.m-tab.active .m-tab-lbl { font-weight: 750; color: var(--text); }
.m-tab-badge { position: absolute; top: -3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.m-tab-ind { position: absolute; top: 10px; left: 6px; width: calc((100% - 12px) / var(--tn, 4)); height: 32px; pointer-events: none; transform: translateX(calc(var(--ti, 0) * 100%)); }
.m-tab-ind::before { content: ""; display: block; width: 56px; height: 32px; margin: 0 auto; border-radius: 16px; background: var(--primary-tint); }
.m-tabbar.slide .m-tab-ind { animation: m-tab-slide var(--dur-3) var(--ease-out); }
@keyframes m-tab-slide { from { transform: translateX(calc(var(--from, 0) * 100%)); } }

/* ---------- Screens + transitions ---------- */
body.m-app .screen.m-screen { padding: 6px 16px calc(158px + env(safe-area-inset-bottom, 0px)); }
body.m-app .screen.m-detail { padding-top: 12px; padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
/* Only non-fixed children move (a transform on the view would re-anchor the FAB / dock). */
.m-enter > .m-screen > :not(.m-fab):not(.m-dock):not(.bulk-bar) { animation: ui-fade-up var(--dur-3) var(--ease-out) both; }
.m-enter-fwd > .m-screen > :not(.m-fab):not(.m-dock):not(.bulk-bar) { animation: m-slide-in var(--dur-3) var(--ease-out) both; }
.m-enter-back > .m-screen > :not(.m-fab):not(.m-dock):not(.bulk-bar) { animation: m-slide-back var(--dur-3) var(--ease-out) both; }
.m-enter-fwd .m-dock { animation: m-dock-up var(--dur-3) var(--ease-out) both; }
@keyframes m-slide-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes m-slide-back { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes m-dock-up { from { transform: translateY(100%); } to { transform: none; } }

/* Compact page head (owner feedback 12 Oct: less empty space above and below the title). */
.m-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; min-height: 36px; }
.m-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.m-count { flex: none; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; line-height: 18px; }
.m-count.danger { color: var(--danger); background: var(--danger-tint); border-color: transparent; }
.m-count.warn { color: var(--warning); background: var(--warning-tint); border-color: transparent; }

.m-chipbtn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 650; white-space: nowrap; transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-1);
}
.m-chipbtn:active { transform: scale(.96); }
.m-chipbtn svg { width: 15px; height: 15px; flex: none; }
.m-chipbtn.on { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); color: var(--primary); background: var(--primary-tint); }
.m-chipbtn-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; display: grid; place-items: center; }
.m-backlink { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--primary); font-weight: 700; font-size: 14px; padding: 10px 0 0; min-height: 40px; }

/* Segmented control */
.m-seg { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.m-seg button { flex: 1; min-width: 0; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: background var(--dur-2), color var(--dur-2), box-shadow var(--dur-2); }
.m-seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.m-seg-n { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.m-seg button.active .m-seg-n { color: var(--primary); }

/* Search */
body.m-app .m-searchbar { margin: 0 0 8px; }
body.m-app .search { min-height: 42px; padding-top: 6px; padding-bottom: 6px; border-radius: 14px; border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
body.m-app .search input { font-size: 15.5px; min-width: 0; align-self: stretch; }
/* The whole box shows focus (.search:focus-within) — no second, smaller ring around the bare input. */
body.m-app .search input:focus, body.m-app .search input:focus-visible { outline: none; }
body.m-app .results-note { margin: -2px 2px 8px; }
body.m-app .nearby-note { margin: 0 0 12px; }

/* Cards + lists */
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-xs); }
.m-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 28px; }
.m-card-h h3 { margin: 0; font-family: var(--font-display); font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.m-card-h .m-link { margin-left: auto; }
.m-card-h .m-spacer + .m-link { margin-left: 0; }
.m-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.m-note { margin: 2px 0; color: var(--text-3); font-size: 13px; }
.m-link { background: none; border: 0; color: var(--primary); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; min-height: 32px; }
.m-link svg { width: 14px; height: 14px; }
.m-hint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.m-hint > svg { flex: none; width: 16px; height: 16px; color: var(--text-3); }
.m-hint > span { flex: 1; }
.m-hint .link-btn { flex: none; }
.m-more { display: block; width: 100%; background: none; border: 0; border-top: 1px solid var(--border); padding: 12px; margin-top: 4px; color: var(--primary); font-weight: 700; font-size: 13.5px; min-height: 44px; }
.m-skel-list .skel-row { height: 88px; border-radius: 18px; margin-bottom: 10px; }

/* Stage-tinted monogram */
.m-mono { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 14.5px; letter-spacing: .02em; color: var(--st-new-ink); background: var(--st-new-tint); }
.m-mono.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
.m-mono[data-stage="contacted"] { color: var(--st-contacted-ink); background: var(--st-contacted-tint); }
.m-mono[data-stage="demo"] { color: var(--st-demo-ink); background: var(--st-demo-tint); }
.m-mono[data-stage="trial"] { color: var(--st-trial-ink); background: var(--st-trial-tint); }
.m-mono[data-stage="quoted"] { color: var(--st-quoted-ink); background: var(--st-quoted-tint); }
.m-mono[data-stage="won"] { color: var(--st-won-ink); background: var(--st-won-tint); }
.m-mono[data-stage="lost"] { color: var(--st-lost-ink); background: var(--st-lost-tint); }
.m-mono[data-stage="net"], .m-mono-net { color: var(--c2); background: color-mix(in srgb, var(--c2) 14%, var(--surface)); }

/* ---------- Account card (rich, D08) ---------- */
.m-acct { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-xs); cursor: pointer; transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2), border-color var(--dur-2); }
.m-acct:active { transform: scale(.985); box-shadow: var(--shadow-md); }
.m-acct-top { display: flex; align-items: flex-start; gap: 12px; }
.m-acct-main { flex: 1; min-width: 0; }
.m-acct-name { font-family: var(--font-display); font-weight: 750; font-size: 16px; line-height: 1.28; letter-spacing: -.012em; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.m-acct-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-dist { color: var(--primary); font-weight: 700; }


.m-acct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }





body.m-app .ui-pill svg { width: 12px; height: 12px; flex: none; }
.m-due { gap: 5px; }
body.m-app .net-card.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
body.m-app .net-card .visit-line { margin-top: 10px; }

/* ---------- Today ---------- */



.m-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-kpi { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 4px; padding: 12px; min-height: 74px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); color: var(--text); text-align: left; transition: transform var(--dur-1); }
button.m-kpi[data-act]:active { transform: scale(.97); }
.m-kpi b { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.m-kpi > span { font-size: 11.5px; font-weight: 650; color: var(--text-3); line-height: 1.2; }
.m-kpi.k-visit b { color: var(--success); }
.m-kpi.k-warn b { color: var(--warning); }
.m-kpi.k-danger b { color: var(--danger); }
.m-kpi.k-pipe b { color: var(--primary); }
@media (max-width: 460px) {
  .m-kpis { grid-template-columns: 1fr 1fr; }
  .m-kpi { flex-direction: row; align-items: center; min-height: 60px; gap: 10px; }
  .m-kpi > span { text-align: right; }
}
















.m-sec-h { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; }
.m-sec-h h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.015em; }
.m-sec-h .m-muted { font-size: 12.5px; }

.m-plan { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-xs); }
.m-plan::before { content: ""; position: absolute; left: 0; top: 14px; width: 3px; height: 38px; border-radius: 0 3px 3px 0; background: var(--primary); }
.m-plan.late::before { background: var(--danger); }






.m-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
































/* ---------- FAB (extended, clear of content — F49) ---------- */
.m-fab {
  position: fixed; z-index: 45; right: max(16px, calc(50% - 280px + 16px));
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 14px);
  height: 52px; padding: 0 20px 0 16px; border-radius: 18px; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 14.5px;
  box-shadow: var(--shadow-brand), var(--shadow-md);
  animation: ui-scale-in var(--dur-3) var(--ease-spring) both; transition: transform var(--dur-1);
}
.m-fab svg { width: 20px; height: 20px; }
.m-fab:active { transform: scale(.95); }
body.m-app .bulk-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px); border-radius: 18px; box-shadow: var(--shadow-lg); }

/* ---------- Detail ---------- */
.m-hero { padding: 16px; }
.m-hero-top { display: flex; align-items: flex-start; gap: 12px; }
.m-hero-id { flex: 1; min-width: 0; }
.m-hero-name { display: block; max-width: 100%; padding: 0; background: none; border: 0; text-align: left; font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -.022em; line-height: 1.22; color: var(--text); word-break: break-word; }

.m-hero-loc { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.m-hero-loc svg { flex: none; color: var(--primary); }

.m-stage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 10px; }
.m-stage-btn { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0; background: none; border: 0; }
.m-stage-btn .ui-pill { font-size: 13px; padding: 7px 12px; }
.m-stage-chev { display: inline-flex; color: var(--text-3); }
.m-stage-chev svg { width: 15px; height: 15px; }
.m-temps { display: flex; gap: 6px; margin-left: auto; }
.m-temp { min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: background var(--dur-2), color var(--dur-2), border-color var(--dur-2); }
.m-temp.on[data-temp="hot"] { color: var(--t-hot-ink); background: var(--t-hot-tint); border-color: color-mix(in srgb, var(--t-hot) 40%, transparent); }
.m-temp.on[data-temp="warm"] { color: var(--t-warm-ink); background: var(--t-warm-tint); border-color: color-mix(in srgb, var(--t-warm) 40%, transparent); }
.m-temp.on[data-temp="cold"] { color: var(--t-cold-ink); background: var(--t-cold-tint); border-color: color-mix(in srgb, var(--t-cold) 40%, transparent); }
.m-lost { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--danger); font-size: 13px; font-weight: 650; }
.m-lost svg { width: 14px; height: 14px; }








.m-won-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.m-won-info > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: var(--st-won-tint); min-width: 0; }
.m-won-info .k { font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.m-won-info b { font-size: 13.5px; }
.m-won-info b.due { color: var(--danger); }
.m-won-info b.clear { color: var(--success); }





.m-tasklist { padding: 2px 0 !important; }
.m-card.m-tasklist { overflow: hidden; }






.m-quote { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.m-card-h + .m-quote { border-top: 0; }
.m-quote-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.m-quote-ic svg { width: 16px; height: 16px; }
.m-quote-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-3); }
.m-quote-main b { font-size: 14px; color: var(--text); font-weight: 700; }
.m-quote-total { flex: none; font-family: var(--font-display); font-size: 14.5px; }
body.m-app .m-composer { margin: 0 0 12px; align-items: flex-end; }
body.m-app .m-composer .textarea { min-height: 46px; max-height: 140px; padding: 11px 13px; resize: none; }
.m-send { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-brand); transition: transform var(--dur-1); }
.m-send:active { transform: scale(.94); }
body.m-app .ui-timeline .item { padding: 9px 0; }

.m-dock {
  position: fixed; z-index: 45; left: 0; right: 0; margin: 0 auto; max-width: 560px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 4px; padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.m-dock-primary { flex: 1.7; min-width: 0; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font-size: 14.5px; font-weight: 700; box-shadow: var(--shadow-brand); white-space: nowrap; transition: transform var(--dur-1); }
.m-dock-primary:active { transform: scale(.97); }
.m-dock-primary svg { width: 19px; height: 19px; flex: none; }




/* ---------- Tasks ---------- */
.m-task { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.m-task:last-child { border-bottom: 0; }
.m-check { position: relative; flex: none; width: 26px; height: 26px; margin-top: 1px; padding: 0; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); color: transparent; display: grid; place-items: center; transition: background var(--dur-2), border-color var(--dur-2); }
.m-check::after { content: ""; position: absolute; inset: -10px; }
.m-check svg { width: 14px; height: 14px; }
.m-check:active { transform: scale(.9); }
.m-check.on { background: var(--success); border-color: var(--success); color: #fff; animation: ui-pop var(--dur-3) var(--ease-spring); }
.m-check.locked { border-style: dashed; opacity: .45; }
.m-task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 0; background: none; border: 0; text-align: left; color: var(--text); }
.m-task-title { font-weight: 650; font-size: 14.5px; line-height: 1.35; word-break: break-word; }
.m-task.done .m-task-title { color: var(--text-3); text-decoration: line-through; }
.m-task-remarks { font-size: 12.5px; color: var(--text-2); font-style: italic; }
.m-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); min-width: 0; }
.m-task-acct { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: var(--primary); font-weight: 600; }
.m-task-acct svg { width: 13px; height: 13px; flex: none; }
.m-task-acct span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-task-proj { display: inline-flex; align-items: center; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-time { font-weight: 700; color: var(--text-2); }
.m-task-who { flex: none; margin-top: 1px; }












body.m-app .cal-arrow { width: 40px; height: 40px; border-radius: 12px; }
body.m-app .cal-strip { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 8px 4px; box-shadow: var(--shadow-xs); }
body.m-app .cal-dayhead { margin: 16px 2px 10px; }
body.m-app .cal-daylabel { font-family: var(--font-display); font-weight: 800; }

/* Network — my hospitals / assignments */
.m-stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.m-stat3 > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.m-stat3 b { font-family: var(--font-display); font-size: 19px; font-weight: 800; white-space: nowrap; }
.m-stat3 > div > span { font-size: 11.5px; color: var(--text-3); font-weight: 650; }
.m-stat3-card > div { background: var(--surface-2); border-color: transparent; }
/* Chip rows wrap onto the next line (owner, 13 Oct 2026) — no sideways scrolling. */



.m-emp { padding: 14px; margin-bottom: 0; }

.m-emp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-emp-info b { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-emp-info span { font-size: 12.5px; color: var(--text-3); }
.m-emp-bar { height: 6px; border-radius: 3px; background: var(--surface-3); margin: 12px 0 8px; overflow: hidden; }
.m-emp-bar span { display: block; height: 100%; border-radius: 3px; background: var(--success); transform-origin: left; animation: ui-grow-x 700ms var(--ease-out) both; }




/* ---------- Sheets (bottom sheet + blurred backdrop, drag-to-close) ---------- */
body.m-app .scrim { background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: opacity var(--dur-2) ease; z-index: 50; }
body.m-app .sheet { max-width: 560px; border-radius: 24px 24px 0 0; max-height: 90vh; max-height: 90dvh; transition: transform var(--dur-3) var(--ease-out); background: var(--surface); }
body.m-app .sheet-grip { width: 42px; height: 5px; margin: 10px auto 0; touch-action: none; cursor: grab; }
body.m-app .sheet-head { padding: 8px 18px 6px; touch-action: none; gap: 10px; }
body.m-app .sheet-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.015em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.m-app .sheet-close { flex: none; width: 38px; height: 38px; }
body.m-app .sheet-body { padding: 8px 18px 20px; }
body.m-app .sheet-foot { gap: 10px; background: var(--surface); }
body.m-app .sheet-foot .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding-left: 12px; padding-right: 12px; overflow: hidden; text-overflow: ellipsis; }
body.m-app .sheet-foot .td-foot { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
body.m-app .sheet-foot .td-foot .btn { flex: 1 1 0; }
body.m-app .sheet-foot .td-foot .td-foot-main { flex: 1 0 100%; order: 2; }
body.m-app .btn { min-height: 48px; border-radius: 14px; font-weight: 700; }
body.m-app .btn-sm { min-height: 40px; border-radius: 12px; }
body.m-app .field > label { font-size: 13px; color: var(--text-2); }
body.m-app .input, body.m-app .textarea, body.m-app select.input { border-radius: 12px; min-height: 46px; border-color: var(--border-strong); }
body.m-app .textarea { min-height: 84px; }
body.m-app .choice-row { min-height: 50px; }
.m-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-big-input { font-family: var(--font-display); font-size: 22px !important; font-weight: 800; }
.m-money { position: relative; }
.m-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--text-3); pointer-events: none; }
.m-money .input { padding-left: 34px; }


.m-set-h { margin: 18px 2px 8px; font-size: 13px; font-weight: 750; color: var(--text-2); }
.m-theme button { min-height: 40px; }

/* chips (pickers inside sheets) */
.m-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.m-chipset-sm { margin-top: 8px; gap: 6px; }
.m-chipset-sm .m-chip { min-height: 34px; padding: 0 11px; font-size: 12.5px; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background var(--dur-2), color var(--dur-2), border-color var(--dur-2), transform var(--dur-1); }
.m-chip:active { transform: scale(.96); }
.m-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.m-chip.on .m-stage-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.m-chip.temp.on[data-temp="hot"] { background: var(--t-hot); border-color: var(--t-hot); }
.m-chip.temp.on[data-temp="warm"] { background: var(--t-warm); border-color: var(--t-warm); }
.m-chip.temp.on[data-temp="cold"] { background: var(--t-cold); border-color: var(--t-cold); }
.m-stage-dot, .fm-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--st-new); }
.fm-dot { margin-right: 8px; vertical-align: 1px; }
.m-stage-dot.lg { width: 14px; height: 14px; }
[data-stage="contacted"].m-stage-dot, [data-stage="contacted"].fm-dot { background: var(--st-contacted); }
[data-stage="demo"].m-stage-dot, [data-stage="demo"].fm-dot { background: var(--st-demo); }
[data-stage="trial"].m-stage-dot, [data-stage="trial"].fm-dot { background: var(--st-trial); }
[data-stage="quoted"].m-stage-dot, [data-stage="quoted"].fm-dot { background: var(--st-quoted); }
[data-stage="won"].m-stage-dot, [data-stage="won"].fm-dot { background: var(--st-won); }
[data-stage="lost"].m-stage-dot, [data-stage="lost"].fm-dot { background: var(--st-lost); }
.fm-dot[data-temp="hot"] { background: var(--t-hot); }
.fm-dot[data-temp="warm"] { background: var(--t-warm); }
.fm-dot[data-temp="cold"] { background: var(--t-cold); }

/* rows (menus, pickers, profile) */
.m-rows { display: flex; flex-direction: column; gap: 8px; }
.m-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; text-decoration: none; transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-1); }
.m-row:active { transform: scale(.985); background: var(--surface-2); }
.m-row.sel { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); background: var(--primary-tint); }
.m-row-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.m-row-ic svg { width: 18px; height: 18px; }
.m-row-ic[style*="--pc"] { color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.m-row.danger .m-row-ic, .m-row.danger .m-row-title { color: var(--danger); }
.m-row.danger .m-row-ic { background: var(--danger-tint); }
.m-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-row-title { font-weight: 650; font-size: 14.5px; }
.m-row-sub { font-size: 12.5px; color: var(--text-3); }
.m-row-tick { flex: none; display: inline-flex; color: var(--primary); }
.m-row > svg:last-child { flex: none; color: var(--text-3); }

/* won / lost / visit sheets */
.m-won-hero { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; background: var(--st-won-tint); color: var(--text); }
.m-won-hero > span { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--success); color: #fff; }
.m-won-hero small, .m-switch small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.m-switch { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; min-height: 56px; }
.m-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.m-switch-ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--border-strong); transition: background var(--dur-2); }
.m-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease-out); }
.m-switch input:checked + .m-switch-ui { background: var(--success); }
.m-switch input:checked + .m-switch-ui::after { transform: translateX(18px); }
.m-switch input:focus-visible + .m-switch-ui { box-shadow: var(--focus-ring); }
.m-visit-head { display: flex; align-items: center; gap: 12px; margin: -2px 0 14px; }
.m-visit-head b { display: block; font-family: var(--font-display); font-size: 16px; }
.m-gps { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.m-gps.ok { color: var(--success); }
.m-dup { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warning-tint); color: var(--text); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.m-dup[hidden] { display: none; }
.m-dup .m-link { padding: 2px 0; min-height: 0; }
.m-phone-row { padding: 10px 0; }

/* expenses */
.m-exp-list { display: flex; flex-direction: column; }
.m-exp { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.m-exp:first-child { border-top: 0; }
.m-exp-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.m-exp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-3); }
.m-exp-main b { font-size: 14px; color: var(--text); }
.m-exp-main .m-link { align-self: flex-start; padding: 2px 0; min-height: 0; }
.m-exp-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.m-exp-right b { font-family: var(--font-display); font-size: 15px; }

/* profile */
.m-profile { display: flex; align-items: center; gap: 14px; }
.m-profile-ava { position: relative; flex: none; padding: 0; border: 0; background: none; border-radius: 50%; }
.m-profile-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.m-profile-cam svg { width: 12px; height: 12px; }
.m-profile-id { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.m-profile-id b { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.m-profile-id > span:not(.ui-pill) { font-size: 13px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-signout-wrap { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
body.m-app .m-signout { background: var(--danger-tint); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent); box-shadow: none; }

/* task detail */
body.m-app .m-td-acct { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; text-align: left; color: var(--text); }
body.m-app .td-hosp-name { flex-wrap: wrap; }
body.m-app .td-block .v { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
body.m-app .td-block .k { text-transform: none; letter-spacing: .02em; font-size: 11.5px; }

/* ---------- Toast (icon, above the tab bar) ---------- */
body.m-app .toast.m-toast {
  z-index: 9999; bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  max-width: min(92vw, 480px); padding: 11px 16px; gap: 10px; border-radius: 14px;
  background: #0d1526; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
}
.m-toast .ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; }
.m-toast .ico svg { width: 13px; height: 13px; display: block; }
.m-toast .ico b { font-size: 13px; font-weight: 800; }
.m-toast.ok .ico { background: var(--success); }
.m-toast.err .ico { background: var(--danger); }
.m-toast .msg { min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.m-app .toast.m-toast { background: #26324d; } }
:root[data-theme="dark"] body.m-app .toast.m-toast { background: #26324d; }

/* ---------- Scroll handle (F49): slim edge pill, only while scrolling ---------- */
body.m-app .scroll-thumb { width: 22px; height: 56px; right: max(0px, calc(50% - 280px)); border-radius: 12px 0 0 12px; background: transparent; border: 0; box-shadow: none; color: transparent; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
body.m-app .scroll-thumb::before { content: ""; position: absolute; right: 3px; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text-3) 70%, transparent); }
body.m-app .scroll-thumb svg { display: none; }
body.m-app .scroll-thumb.show.awake, body.m-app .scroll-thumb.drag { opacity: 1; pointer-events: auto; }
body.m-app .scroll-thumb:active, body.m-app .scroll-thumb.drag { background: transparent; transform: none; }
body.m-app .scroll-thumb.drag::before { background: var(--primary); width: 7px; }

/* ---------- Celebration (Won) ---------- */
.m-celebrate { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.m-cel-badge { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 28px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); animation: m-cel-pop 1.8s var(--ease-spring) both; }
.m-cel-badge > span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; }
.m-cel-badge > span svg { width: 34px; height: 34px; }
.m-cel-badge b { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.m-celebrate i { position: absolute; top: 48%; left: 50%; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: m-confetti 1.5s var(--ease-out) var(--d, 0s) forwards; }
@keyframes m-cel-pop { 0% { opacity: 0; transform: scale(.6); } 16% { opacity: 1; transform: scale(1.06); } 28% { transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(.96); } }
@keyframes m-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 40% { opacity: 1; transform: translate(calc(var(--x) * .6), var(--y)) rotate(calc(var(--r) * .4)); } 100% { opacity: 0; transform: translate(var(--x), 42vh) rotate(var(--r)); } }

/* keyboard open on a screen field: keep the fixed bars from covering it */
body.m-app.kb-open .m-tabbar, body.m-app.kb-open .m-dock, body.m-app.kb-open .m-fab, body.m-app.kb-open .bulk-bar { display: none; }

/* ---------- Boot / sign-out ---------- */
.m-boot .m-bar { border-bottom-color: transparent; }
.m-boot .m-tab { pointer-events: none; }
.m-signingout { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--text-3); font-weight: 600; }

/* ---------- Narrow phones (360–400px): no horizontal scroll ---------- */
@media (max-width: 420px) {
  .m-title { font-size: 23px; }
  .m-hello-g { font-size: 23px; }
  .m-head .m-chipbtn[data-act="open-sort"] span { display: none; }
  .m-head .m-chipbtn { padding: 0 11px; }
}
@media (max-width: 370px) {
  body.m-app .screen.m-screen { padding-left: 12px; padding-right: 12px; }
  .m-bar { padding-left: 12px; padding-right: 12px; gap: 8px; }


  .m-temps { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .m-tabbar.slide .m-tab-ind, .m-fab, .m-enter > .m-screen > *, .m-enter-fwd > .m-screen > *, .m-enter-back > .m-screen > * { animation: none !important; }
}
/* My effectiveness: three numbers (2026-10-12) */




.m-stat3 > div.danger b { color: var(--danger); }
/* Contact email under the phone */
.cp-mail { display: block; color: var(--primary); text-decoration: none; word-break: break-all; }
.m-temps.locked .m-temp:not(.on) { opacity: .45; }
.m-temps.locked .m-temp { cursor: not-allowed; }

/* My work summary, compact (owner feedback 12 Oct 2026): effectiveness in one slim row.
   My expenses lives in Profile only (13 Oct 2026). */





/* Account cards, compact (owner feedback 12 Oct 2026): ~155px → ~135px, so a 4th fits on screen. */
.m-list { gap: 8px; }
.m-acct { padding: 11px 12px; border-radius: 16px; }
.m-acct-top { gap: 10px; }
.m-acct-top > .m-mono { width: 38px; height: 38px; font-size: 13px; border-radius: 11px; }
.m-acct-chips { margin-top: 7px; gap: 5px; }


/* Account page tiles (owner feedback 12 Oct 2026): a tile alone on the last row takes the full width
   instead of leaving half a row empty; slightly shorter tiles. */



.m-won-info > :only-child, .m-won-info > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Empty states, compact on the phone (owner feedback 12 Oct 2026): ~260px boxes → ~150px. */
body.m-app .ui-empty { gap: 6px; padding: 18px 16px; }
body.m-app .ui-empty .art { width: 44px; height: 44px; border-radius: 14px; }
body.m-app .ui-empty .art svg { width: 22px; height: 22px; }
body.m-app .ui-empty h4 { font-size: 15px; }
body.m-app .ui-empty .actions { margin-top: 4px; }

/* Quick-date chips: compact; they wrap onto a second row on narrow phones. */
.m-chipset.m-dates { flex-wrap: wrap; gap: 6px; }   /* wraps (owner's choice) — compact chips keep it to two short rows */
.m-chipset.m-dates .m-chip { flex: none; min-height: 34px; padding: 0 10px; font-size: 12.5px; }

/* Account header, compact (owner feedback 12 Oct 2026): no initials box; name, then location,
   then type + stage on one line, then Hot / Warm / Cold. */
.m-hero { padding: 12px 14px; }
.m-hero-top { gap: 0; }
.m-hero-name { font-size: 19px; line-height: 1.22; }
.m-hero-loc { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.m-hero-loc svg { flex: none; width: 14px; height: 14px; margin-top: 1px; }








.m-detail .m-stage-row { margin: 8px 0 8px; }
.m-detail .m-temps { margin-left: 0; }

/* Accounts: the search bar stays put while the list scrolls (owner feedback 12 Oct 2026). */
body.m-app .m-searchbar { position: sticky; top: var(--m-bar-h, 61px); z-index: 30; margin-left: -16px; margin-right: -16px;
  padding: 6px 16px; background: var(--bg); }

/* Follow-up / owner / last visit in their own card below Contacts. */


/* Account page (owner's flow, 12 Oct 2026): Hospital → Contacts → Status → Next step → Tasks → Timeline. */


.m-meta-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; }
.m-status .m-card-h{ align-items: center; }
.m-status .m-card-h .m-stage-btn { min-height: 30px; }
.m-status .m-card-h .m-stage-btn .ui-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 5px 8px 5px 10px; }
.m-status .m-card-h .m-stage-chev { color: currentColor; opacity: .75; }
.m-status .m-card-h .m-stage-chev svg { width: 13px; height: 13px; }
.m-status .m-stage-row { margin: 2px 0 10px; }
.m-status .m-temps { margin-left: 0; }







/* Status: archetype + "Log call / response" (the call-outcome tags) right where the work is recorded. */

.m-meta-chip.strong { gap: 6px; border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); color: var(--primary); background: var(--primary-tint); }
.m-meta-chip.strong svg { width: 14px; height: 14px; }

/* Status: what was last done here (visit or call and its outcome). */





/* Log visit / Log call: optional "Add a task" (owner, 12 Oct 2026). */






/* Timeline: a short preview on the account page; the full history opens in a pop-out. */
.m-tlcard { cursor: pointer; }
.m-tlcard .m-link { display: inline-flex; align-items: center; gap: 2px; }
.m-tlcard .m-link svg { width: 14px; height: 14px; }
#tl-sheet .m-composer { margin-bottom: 12px; }

/* Account page, tighter (owner, 12 Oct 2026): type on the location line; less space between and
   inside the cards. */
.m-detail .m-card { margin-bottom: 8px; padding: 12px 14px; }
.m-detail .m-card-h { margin-bottom: 8px; }
.m-detail .m-hero { padding: 12px 14px 10px; }
.m-hero-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; }
.m-hero-place { display: inline-flex; align-items: flex-start; gap: 4px; min-width: 0; }
.m-hero-place svg { flex: none; width: 14px; height: 14px; margin-top: 1px; }


.m-detail .cgroup { margin: 6px 0; }
.m-detail .cgroup:first-of-type { margin-top: 0; }
.m-detail .cgroup:last-child { margin-bottom: 0; }
.m-detail .m-status .m-stage-row { margin: 0 0 8px; }

/* Type sits right after the hospital name, in the same line of text (owner, 12 Oct 2026). */




/* Account page v3 (owner, 12 Oct 2026): stage + Hot/Warm/Cold under the name; Status = current
   work + the visit log (Visit n → Next step n …). */








.m-meta-chip .ui-avatar, .m-meta-chip .avatar { margin-right: 4px; }




.m-vlog { display: grid; gap: 8px; margin-top: 10px; }
.m-vl-item { position: relative; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.m-vl-item.visit { border-left: 3px solid var(--primary); }
.m-vl-item.next { border-left: 3px solid var(--warning); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); margin-left: 14px; }
.m-vl-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 750; font-size: 13px; }
.m-vl-h svg { width: 14px; height: 14px; color: var(--text-3); }
.m-vl-h em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--text-3); }
.m-vl-edit { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--text-3); }
.m-vl-l { display: grid; grid-template-columns: 104px 1fr; gap: 8px; padding: 2px 0; font-size: 13px; }
.m-vl-l span { color: var(--text-3); }
.m-vl-l b { font-weight: 600; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.m-lv-sec { margin: 6px 0 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11.5px; font-weight: 750; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.m-lv-sec:first-of-type { border-top: 0; padding-top: 0; }

/* Visits checklist: one line per hospital (owner, 13 Oct 2026). */
.m-vlist { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.m-vrow { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px 0 8px; border-top: 1px solid var(--border); }
.m-vrow:first-child { border-top: 0; }



.m-vrow-name { min-width: 0; padding: 12px 0; border: 0; background: none; text-align: left; font: inherit; font-weight: 650; font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-vrow.done .m-vrow-name { color: var(--text-3); text-decoration: line-through; }
.m-vrow-meta { font-size: 12px; color: var(--text-3); white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.m-vrow.late .m-vrow-meta { color: var(--danger); font-weight: 650; }

/* Visits list v2: name + meta, then last response and the Log visit / Log call button. */
.m-vrow { display: block; padding: 10px 12px; }
.m-vrow-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.m-vrow-top .m-vrow-name { flex: 1; padding: 0; }
.m-vrow-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.m-vrow-last { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-vrow-last svg { width: 13px; height: 13px; color: var(--success); flex: none; }
.m-vrow-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); background: var(--primary-tint); color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 700; }
.m-vrow-btn svg { width: 14px; height: 14px; }
.m-vrow.done .m-vrow-name { text-decoration: none; }
.m-push-big { width: 100%; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 15.5px; }
.m-push-big small { font-size: 11.5px; font-weight: 500; opacity: .85; }
.m-push-big svg { display: none; }
.m-or { margin: 10px 0 8px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }

/* Header in as few lines as possible (owner, 13 Oct 2026): name + type, location, then stage ·
   archetype · Hot/Warm/Cold · owner in ONE wrapping row — it breaks only when the screen is too narrow. */









/* Account owner sits at the bottom of the account, not in the header (owner, 13 Oct 2026). */


/* Title card = name + location; hospital details in their own card, three short lines. */
.m-details { display: grid; gap: 8px; }
.m-dline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.m-dline .m-stage-row, .m-dline .m-temps { display: contents; }
.m-dline .m-temp { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.m-dline .m-meta-chip{ min-height: 30px; font-size: 12.5px; }
.m-dline .m-stage-btn { min-height: 30px; }
.m-dline .m-stage-btn .ui-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px 5px 10px; font-size: 12.5px; }
.m-dline .m-stage-chev { color: currentColor; opacity: .75; }
.m-dline .m-stage-chev svg { width: 13px; height: 13px; }
.m-dline .m-lost { flex-basis: 100%; margin: 0; }
.m-detail .m-hero .m-hero-name { display: block; }

/* Their response: three kinds (can't be mixed), then that kind's details */
.m-resp { display: grid; gap: 10px; }
.m-resp [data-tone="ok"] { --tone: var(--success); --tone-tint: var(--success-tint); --tone-on: #fff; }
.m-resp [data-tone="bad"] { --tone: var(--danger); --tone-tint: var(--danger-tint); --tone-on: #fff; }
.m-resp [data-tone="muted"] { --tone: var(--text-2); --tone-tint: var(--surface-3); --tone-on: var(--surface); }
.m-resp-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.m-resp-kind { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 6px 8px; border-radius: 12px; border: 1.5px solid transparent; background: var(--tone-tint); color: var(--tone); font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: center; text-wrap: balance; transition: background var(--dur-2), color var(--dur-2), border-color var(--dur-2), transform var(--dur-1); }
.m-resp-kind:active { transform: scale(.97); }
.m-resp-kind[aria-checked="true"] { background: var(--tone); border-color: var(--tone); color: var(--tone-on); }
.m-resp-kinds:has([aria-checked="true"]) .m-resp-kind:not([aria-checked="true"]) { opacity: .55; }
.m-resp-items { border-left: 3px solid var(--tone); padding-left: 10px; }
.m-resp-items > .m-call-grp:first-child { margin-top: 0; }
.m-resp-items .m-chip.on { background: var(--tone); border-color: var(--tone); color: var(--tone-on); }
.m-resp-kind b { font-size: 13.5px; font-weight: 700; }
.m-resp-kind small { font-size: 11px; font-weight: 600; opacity: .8; }

/* Plan work pick list (owner, 13 Oct 2026): quick rows — name, Network/Account, who · day — tinted by
   where the hospital stands. A tap ticks, a long press opens; ticked rows stay on top. */
.m-plist { display: grid; gap: 6px; }
.m-prow, .m-plan-legend span { --tone: var(--border-strong); }
.m-prow.tone-contacted, .m-plan-legend .tone-contacted { --tone: var(--info); }
.m-prow.tone-hot, .m-plan-legend .tone-hot { --tone: var(--hot); }
.m-prow.tone-warm, .m-plan-legend .tone-warm { --tone: var(--warm); }
.m-prow.tone-cold, .m-plan-legend .tone-cold { --tone: var(--teal-400); }
.m-prow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; width: 100%; padding: 9px 12px 9px 10px; text-align: left;
  border: 1px solid var(--border); border-left: 4px solid var(--tone); border-radius: 12px; background: color-mix(in srgb, var(--tone) 7%, var(--surface)); color: var(--text);
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-1); }
.m-prow.tone-plain { background: var(--surface); }
.m-prow:active { transform: scale(.985); }
.m-prow.on { border-color: var(--primary); border-left-color: var(--tone); box-shadow: 0 0 0 1px var(--primary) inset; }
.m-prow-check { grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: #fff; }
.m-prow.on .m-prow-check { background: var(--primary); border-color: var(--primary); }
.m-prow-check svg { width: 14px; height: 14px; }
.m-prow-name { font-weight: 650; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.m-prow-src { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; color: var(--text-2); background: var(--surface-3); }
.m-prow-src.acct { color: var(--primary); background: var(--primary-tint); }
.m-prow-who { grid-column: 2 / span 2; font-size: 12px; font-weight: 600; color: var(--text-2); }
.m-prow-who.none { color: var(--text-3); font-weight: 500; }
.m-prow-who.late { color: var(--danger); }
.m-plan-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 2px 10px; font-size: 11.5px; color: var(--text-3); }
.m-plan-legend span { display: inline-flex; align-items: center; gap: 5px; }
.m-plan-legend span::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--tone) 25%, var(--surface)); border: 1px solid var(--tone); border-left-width: 3px; }

.m-push-big + .m-list, .m-push-big + .m-skel-list, .m-push-big + .m-card { margin-top: 12px; }




.m-acct.sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.m-acct[data-long], .net-card[data-long] { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }



/* New account in two steps (owner, 13 Oct 2026) */
.m-steps-h { font-size: 12.5px; color: var(--text-3); margin: -2px 0 12px; }
.m-steps-h b { color: var(--primary); font-weight: 700; }

/* Team activity (Profile, admins) */
.m-act-sum { margin: 10px 2px 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }

.m-alist { padding: 2px 0; }
.m-arow { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 12px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); }
.m-arow:last-child { border-bottom: 0; }
button.m-arow:active { background: var(--surface-2); }
.m-arow-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.m-arow-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.m-arow-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.m-arow-what { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.m-arow-ic { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); margin-top: 1px; }
.m-arow-ic svg { width: 12px; height: 12px; }
.m-arow-ic.k-visit { background: var(--success-tint); color: var(--success); }
.m-arow-ic.k-call { background: var(--info-tint); color: var(--info); }
.m-arow-ic.k-new { background: var(--primary-tint); color: var(--primary); }
.m-arow-acct { font-size: 12.5px; font-weight: 600; color: var(--text); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.m-vrow-btns { display: inline-flex; gap: 6px; flex: none; }
.m-vrow-btn.ghost { background: var(--surface); }

/* Existing customers: a tag top-right on the account card (owner, 13 Oct 2026) */
.m-acct-cust { flex: none; align-self: flex-start; }

/* Type + Existing customer under the location in the title card (owner, 13 Oct 2026) */
.m-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.m-empty-card { display: none; }
.m-type-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 650; color: var(--text-2); }
.m-existing { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 14px; font-weight: 600; }
.m-existing .hint { width: 100%; margin: 0; font-weight: 400; }
.m-chip-add { border-style: dashed; color: var(--primary); }
.m-chip-add svg { width: 13px; height: 13px; }
.m-resp-free { margin-top: 8px; }
/* My work: Coming up under the selected day */
.cal-up-h { margin-top: 18px; }
.cal-up-day { display: grid; gap: 6px; margin-bottom: 12px; }
.cal-up-label { justify-self: start; background: none; border: 0; padding: 2px 2px; font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
.cal-none { margin: 2px 2px 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border); color: var(--text-3); }

/* Filters in use: one line under the search — chips (tap to drop) and Clear all (owner, 13 Oct 2026) */
.m-fline { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; min-width: 0; }
.m-fline-n { flex: none; font-weight: 700; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.m-fline-chips { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.m-fline-chips::-webkit-scrollbar { display: none; }
.m-fchip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-tint); color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.m-fchip svg { width: 12px; height: 12px; }
.m-fline .link-btn { flex: none; }
/* the Accounts header never pushes Filters off-screen */
.m-head { min-width: 0; }
.m-head .m-chipbtn { flex: none; }
.m-head .m-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Slow start note (weak signal) */
.boot-slow { position: fixed; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--text); color: var(--surface); font-size: 13.5px; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.18)); }
.boot-slow span { flex: 1; }
.boot-slow button { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--primary); color: #fff; font: inherit; font-weight: 700; }

/* Visit / call rows fit any phone (owner, 13 Oct 2026): name wraps, the last response on its own
   line, the Log visit / Log call buttons left-aligned underneath and wrapping. */
.m-vlist, .m-vrow { min-width: 0; max-width: 100%; }
.m-vrow-top { flex-wrap: wrap; }
.m-vrow-top .m-vrow-name { white-space: normal; overflow-wrap: anywhere; }
.m-vrow-meta { max-width: 100%; }
.m-vrow-acts { flex-wrap: wrap; justify-content: flex-start; }
.m-vrow-last { flex-basis: 100%; white-space: normal; }
.m-vrow-btns { flex-wrap: wrap; }

/* Overdue: folded under today's work */
.cal-late { margin: 10px 0 4px; }
.cal-late > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--danger-tint); color: var(--danger); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.cal-late > summary::-webkit-details-marker { display: none; }
.cal-late-t { display: inline-flex; align-items: center; gap: 6px; }
.cal-late-t svg { width: 15px; height: 15px; }
.cal-late[open] > summary { margin-bottom: 8px; }
.cal-move { margin-top: 6px; }
.m-task .m-vrow-btn { align-self: center; }
/* Long sheet titles wrap to two lines instead of cutting off */
body.m-app .sheet-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }

/* Current work: just the label and the text box — no grey frame around it (owner, 13 Oct 2026) */


/* Done that day — folded */
.cal-done { margin: 8px 0 4px; }
.cal-done > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--success-tint); color: var(--success); font-weight: 700; font-size: 13px; cursor: pointer; }
.cal-done > summary::-webkit-details-marker { display: none; }
.cal-done > summary svg { width: 14px; height: 14px; }
.cal-done[open] > summary { margin-bottom: 8px; }
/* My work step card: no circle; hospital as plain text */
.m-task.compact { grid-template-columns: minmax(0, 1fr) auto; padding-left: 14px; }
.m-task-acct.plain { color: var(--text-3); }
.m-task-acct.plain svg { color: var(--text-3); }

/* B12: on phones the row buttons wrap below the title instead of squeezing it ("quotatio n"). */
@media (max-width: 600px) {
  .m-task { flex-wrap: wrap; }
  .m-task-main { flex: 1 1 180px; }
}

/* Filter beside the search (My hospitals) — always labelled, same height as the search box. */
.m-searchbar { display: flex; align-items: center; gap: 8px; }
.m-searchbar > .m-chipbtn[data-act="open-filter-modal"] { flex: none; min-height: 44px; padding: 0 14px; }
.m-backlink + .m-head { margin-top: 4px; }
/* Quick-fill phrases above the "What happened" box (owner, 13 Oct 2026): tap first, type the rest. */
.field > .m-chipset + .textarea { margin-top: 8px; }
/* B16: the count inside a selected chip follows the chip's text colour (it was ~1.2:1). */
.m-chip.on .m-muted, .m-chip.on .m-count { color: inherit; opacity: .8; }

/* B17: tap areas of at least ~40–44 px. Small controls keep their look; an invisible margin
   around them takes the tap. */
.m-check::after, .m-vl-edit::after { content: ''; position: absolute; inset: -9px; }
.m-vl-edit { position: relative; }
.m-vrow-btn { min-height: 40px; }
.m-chipset-sm .m-chip { min-height: 38px; }
.cn-link { padding-block: 9px; margin-block: -9px; }

/* C2: small layout fixes on narrow phones. */
.sheet-title { min-width: 0; overflow-wrap: anywhere; }          /* long task titles wrap in the sheet head */
.sheet-head { gap: 10px; align-items: flex-start; }
.m-dock-primary span { white-space: normal; line-height: 1.15; text-align: center; }
@media (max-width: 370px) {
  body.m-app .m-searchbar { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }   /* matched the 12px gutter (was 4px over) */
  .m-dock-primary { font-size: 14px; gap: 6px; }
}
body.m-app .sheet-title { -webkit-line-clamp: 3; }

/* Phone notifications: the one-time nudge on My work and the Profile row. */
.m-push-nudge { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; margin: 0 0 14px; border-radius: 16px;
  background: var(--primary-tint, #eef3ff); border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); }
.m-push-nudge > svg { flex: none; color: var(--primary); width: 20px; height: 20px; }
.m-push-nudge span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.m-push-nudge small { color: var(--text-2); font-size: 12.5px; }
.m-push-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-3); border-radius: 10px; }
.m-push-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.m-push-row span { flex: 1; min-width: 0; }
.m-push-row .btn { flex: none; }

/* Dates read dd/mm/yyyy whatever the phone's region (the app's text sits over the native box). */
.m-date { position: relative; display: block; }
.m-date > input[type="date"] { color: transparent; }
.m-date > input[type="date"]::-webkit-datetime-edit { color: transparent; }
.m-date-face { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; }
.m-date-face.empty { color: var(--text-3); }

/* Accounts | Network switch at the top of the Accounts tab (admins, 14 Oct 2026). */
.m-seg.m-side { margin: 0 0 12px; }
.m-seg.m-side button { flex: 1; }
.m-seg-n { font-weight: 600; opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
/* Log visit + Log call at the top of a hospital page. */
.m-top-acts { display: flex; gap: 8px; margin-top: 12px; }
.m-top-acts .btn { flex: 1; min-height: 44px; justify-content: center; }
/* With the switch on top, it names the side and shows the count — no second title under it. */
.m-side + .m-head .m-title, .m-side + .m-head .m-count { display: none; }

/* Fixed top of the Accounts / Network / All lists (owner, 14 Oct 2026): switch, search and the
   count · Sort · Filter row stay put; only the cards scroll. */
body.m-app .m-stick { position: sticky; top: var(--m-bar-h, 61px); z-index: 30; background: var(--bg);
  margin: 0 -16px 8px; padding: 8px 16px 8px; box-shadow: 0 6px 12px -12px rgba(15, 23, 42, .35); }
body.m-app .m-stick .m-searchbar { position: static; margin: 0 0 8px; padding: 0; background: none; }
body.m-app .m-stick .m-side, body.m-app .m-stick .m-head { margin-bottom: 10px; }
.m-tools { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.m-tools .m-count { flex: none; }

.m-tools .m-chipbtn { flex: none; }
@media (max-width: 370px) {
  body.m-app .m-stick { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  body.m-app .m-stick .m-searchbar { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* Compact list top (owner, 14 Oct 2026): underline tabs with count pills, then search · sort · filter
   on one row. Replaces the boxed switch and the separate count row. */
body.m-app .m-stick { padding: 4px 16px 10px; margin-bottom: 6px; box-shadow: none; border-bottom: 1px solid var(--border); }
.m-seg.m-side { display: flex; gap: 0; padding: 0; margin: 0 0 10px; background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--border); }
.m-seg.m-side button { flex: 1; min-height: 40px; border-radius: 0; background: none; box-shadow: none; color: var(--text-2); font-weight: 600; font-size: 14px; position: relative; gap: 6px; }
.m-seg.m-side button.active { color: var(--primary); background: none; box-shadow: none; }
.m-seg.m-side button.active::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.m-seg.m-side .m-seg-n { margin: 0; opacity: 1; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); }
.m-seg.m-side button.active .m-seg-n { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.m-searchrow { display: flex; align-items: center; gap: 8px; }
.m-searchrow .search { flex: 1; min-width: 0; }
.m-searchrow .m-chipbtn, .m-searchrow .m-iconbtn { flex: none; min-height: 44px; }
.m-searchrow .m-iconbtn { width: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.m-searchrow .m-chipbtn { padding: 0 12px; }
@media (max-width: 370px) { .m-searchrow .m-chipbtn[data-act="open-filter-modal"] span { display: inline; } .m-searchrow .m-chipbtn { padding: 0 10px; } }

/* Bottom bar on hospital pages (owner, 14 Oct 2026): Log visit + Log call, then icon-only Call,
   WhatsApp and Directions (their names stay as aria-labels). */
.m-dock .m-dock-primary { flex: 1.5; padding: 0 10px; font-size: 14.5px; gap: 6px; }
.m-dock .m-dock-alt { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); }



.m-dock .m-dock-primary span { white-space: nowrap; }
.m-dock .m-dock-primary svg { width: 17px; height: 17px; }
.m-dock { gap: 6px; }

@media (max-width: 370px) { .m-dock .m-dock-primary { font-size: 13.5px; padding: 0 8px; } }
/* Push to Pipeline — a bright call to action on a Network hospital's title card (owner, 14 Oct 2026). */
.m-top-acts .m-push-cta { color: #fff; border: 0; font-weight: 700;
  background: linear-gradient(135deg, var(--success, #12a150), color-mix(in srgb, var(--success, #12a150) 70%, #0ea5e9));
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--success, #12a150) 70%, transparent); }
.m-top-acts .m-push-cta svg { width: 17px; height: 17px; }
.m-top-acts .m-push-cta:active { transform: scale(.98); }
.m-addnote { min-height: 36px; padding: 0 12px; font-size: 13px; }
/* L4: a save button shows it took the tap (and can't be tapped twice) for a moment. */
.is-busy { opacity: .6; pointer-events: none; transition: opacity .15s; }

/* Messages at the top (owner's standard, 14 Oct 2026): confirmations and errors slide in under the
   header instead of floating above the bottom bars. */
body.m-app .toast.m-toast { top: calc(var(--m-bar-h, 61px) + env(safe-area-inset-top, 0px) + 8px); bottom: auto;
  transform: translateX(-50%) translateY(-14px); }
body.m-app .toast.m-toast.show { transform: translateX(-50%) translateY(0); }
/* Form mistakes under the field. */
.field.invalid .input, .field.invalid .textarea, .field.invalid select{ border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.field.invalid .m-resp { border-radius: 14px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 55%, transparent); }
.field-err { color: var(--danger); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
/* Contact ▾ in the bottom bar and its sheet. */
.m-dock .m-dock-contact { flex: 1.25; background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); }
.m-dock .m-dock-contact svg:last-child { width: 14px; height: 14px; opacity: .7; }
.m-contact-list { display: grid; gap: 8px; }
.m-contact-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; text-decoration: none; width: 100%; }
.m-contact-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint, #eef3ff); color: var(--primary); }
.m-contact-ic svg { width: 19px; height: 19px; }
.m-contact-t { display: flex; flex-direction: column; min-width: 0; }
.m-contact-t b { font-size: 15px; }
.m-contact-t small { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* My work: one compact block at the top that stays put (re-audit S1/U3). */
body.m-app .m-wk-stick { padding-top: 6px; }
.m-wk-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px !important; }
.m-wk-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.m-wk-title .m-title { font-size: 22px; line-height: 1.15; }
.m-wk-stats { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-wk-stats b { color: var(--text); font-weight: 700; } .m-wk-stats b.danger { color: var(--danger); }
.cal-weekrow { display: flex; align-items: center; gap: 4px; }
.cal-weekrow .cal-strip { flex: 1; min-width: 0; padding: 4px 2px !important; border-radius: 14px !important; box-shadow: none !important; }
body.m-app .cal-weekrow .cal-arrow { flex: none; width: 30px; height: 44px; border-radius: 10px; }
.cal-weekrow .cal-day { padding-block: 3px; gap: 1px; }
.cal-weekrow .cal-day .cal-num { width: 30px; height: 30px; font-size: 14px; }
.cal-weekrow .cal-day .cal-dow { font-size: 10.5px; }
.cal-late[open] > summary { margin-bottom: 8px; }

/* One screen pattern (re-audit U1–U3, U9): sub-screens get a Back header inside the fixed block. */
.m-subhead { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; min-height: 44px; }
.m-subhead .m-title { font-size: 21px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-subback { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.m-subback svg { width: 18px; height: 18px; }
.m-tools-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.m-tools-row .m-act-sum { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; color: var(--text-2); }
.m-tools-row .m-chipbtn { flex: none; min-height: 40px; }
.m-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.m-active-filters .m-chip svg { width: 12px; height: 12px; margin-left: 2px; }
.m-stick .m-seg.m-side button { font-size: 13px; }

/* Notifications: Needs you / All tabs; routine kinds folded into one row each (re-audit S5). */
.notif-tabs { position: sticky; top: 0; z-index: 2; background: var(--surface); margin-bottom: 8px; }
.notif-group { border: 1px solid var(--border); border-radius: 14px; margin: 8px 0; overflow: hidden; }
.notif-group > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; min-height: 48px; cursor: pointer; list-style: none; font-weight: 650; }
.notif-group > summary::-webkit-details-marker { display: none; }
.notif-group-t { flex: 1; min-width: 0; }
.notif-group-un { font-size: 12px; font-weight: 700; color: var(--primary); }
.notif-group[open] > summary { border-bottom: 1px solid var(--border); }
/* Assign to: the chosen person is highlighted until Plan is tapped (re-audit L18). */
.choice-row.on { border-color: var(--primary) !important; background: color-mix(in srgb, var(--primary) 8%, var(--surface)) !important; box-shadow: inset 0 0 0 1px var(--primary); }
.m-link-danger { color: var(--danger) !important; margin-left: 10px; }

/* Accessibility (re-audit A3–A5). */
.sheet:focus { outline: none; }
/* A3: 44 px tap areas */
.sheet-close { min-width: 44px; min-height: 44px; }
.m-meta-chip { min-height: 40px; position: relative; }
.m-meta-chip::after, .m-temp::after, .m-stage-btn::after { content: ''; position: absolute; inset: -6px -2px; }
.m-temp, .m-stage-btn { position: relative; }
.m-chipset-sm .m-chip { min-height: 40px; }
 .check-row input { width: 20px; height: 20px; }
.m-h3-link { font: inherit; color: inherit; background: none; border: 0; padding: 6px 0; min-height: 40px; text-align: left; cursor: pointer; }
/* A4: darker text on light pills (light theme only — dark keeps its bright colours) */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .ui-pill.success { color: #166534; } :root:not([data-theme="dark"]) .ui-pill.danger { color: #b42318; } :root:not([data-theme="dark"]) .ui-pill.warning { color: #92400e; } :root:not([data-theme="dark"]) .ui-pill.info { color: #075985; } }
:root[data-theme="light"] .ui-pill.success { color: #166534; } :root[data-theme="light"] .ui-pill.danger { color: #b42318; }
:root[data-theme="light"] .ui-pill.warning { color: #92400e; } :root[data-theme="light"] .ui-pill.info { color: #075985; }
.m-tab .m-tab-lbl { color: var(--text-2); }
.cl-info .cp, .contact-line .cp { color: var(--text-2); }
.m-chip.temp.on[data-temp="warm"] { background: #b45309 !important; border-color: #b45309 !important; color: #fff !important; }
.m-chip.temp.on[data-temp="cold"] { background: #0369a1 !important; border-color: #0369a1 !important; color: #fff !important; }
/* A5: nothing under 12 px */
.cal-day .cal-dow, .cal-weekrow .cal-day .cal-dow { font-size: 12px; }
.m-prow-src { font-size: 12px; }
.m-tab-lbl { font-size: 12.5px; }
.ui-pill { font-size: 12px; }
.m-bar-sub, .m-sub { font-size: 12px; }
/* A6: the row's status in words, not only its tint */
.m-prow-tone { font-size: 12px; font-weight: 700; color: var(--text-2); padding: 1px 7px; border-radius: 999px; background: var(--surface-2); }

/* Plan work person rows (re-audit S6). */
.m-emp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; color: var(--text); }
.m-emp-row .m-emp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-emp-row .m-emp-info > b { font-size: 15px; }
.m-emp-sum { font-size: 13px; color: var(--text-2); }
.m-emp-sum b { color: var(--text); } .m-emp-sum b.danger { color: var(--danger); }
.m-emp-row .m-emp-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 3px; }
.m-emp-row .m-emp-bar > span { display: block; height: 100%; background: var(--success); }
.m-emp-chev { flex: none; color: var(--text-3); }
.m-emp-chev svg { width: 16px; height: 16px; }
