/* Osrilo H39 — Sitewide UI Congruency Sweep
 * Final dashboard styling layer. This file intentionally loads after all legacy
 * page/release styles so the stable H38.4.1 behavior can keep its existing DOM
 * while the visible product uses one coherent spacing and control system.
 */

body:not(.landing-visible){
  --ui-page-gap:14px;
  --ui-card-gap:12px;
  --ui-card-pad:16px;
  --ui-radius-lg:16px;
  --ui-radius-md:12px;
  --ui-radius-sm:9px;
  --ui-control-h:42px;
  --ui-line:#d7e0e6;
  --ui-line-strong:#c8d4db;
  --ui-surface:#ffffff;
  --ui-surface-soft:#f6f9fa;
  --ui-surface-muted:#eef3f5;
  --ui-text:#15222f;
  --ui-muted:#64757f;
  --ui-brand:#0f9f9f;
  --ui-brand-dark:#0b6f6c;
  --ui-brand-soft:#eaf8f6;
  --ui-shadow:0 5px 18px rgba(15,23,42,.055);
  --ui-shadow-float:0 16px 44px rgba(15,23,42,.14);
  background:#eef3f4;
  color:var(--ui-text);
}

/* ---------- H40 creation wizard ---------- */
body:not(.landing-visible) .customer-intake-type-step{display:grid;gap:14px}
body:not(.landing-visible) .customer-intake-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body:not(.landing-visible) .customer-intake-type-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:104px;padding:15px;border:1px solid var(--ui-line-strong);border-radius:14px;background:#fff;color:var(--ui-text);text-align:left;box-shadow:0 4px 14px rgba(15,23,42,.045)}
body:not(.landing-visible) .customer-intake-type-card:hover,body:not(.landing-visible) .customer-intake-type-card:focus-visible{border-color:#58aaa3;background:#f5fbfa;box-shadow:0 0 0 3px rgba(15,159,159,.1)}
body:not(.landing-visible) .customer-intake-type-card>span:nth-child(2){display:grid;gap:4px;min-width:0}
body:not(.landing-visible) .customer-intake-type-card strong{font-size:15px;line-height:1.2}
body:not(.landing-visible) .customer-intake-type-card small{font-size:11px;line-height:1.45;color:var(--ui-muted)}
body:not(.landing-visible) .customer-intake-type-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--ui-brand-soft);color:var(--ui-brand-dark);font-size:14px;font-weight:900}
body:not(.landing-visible) .customer-intake-transaction-note{margin:0;padding:11px 12px;border:1px solid #cde3df;border-radius:11px;background:#f0f8f6;color:#496267;font-size:11px;line-height:1.45}
body:not(.landing-visible) .customer-intake-transaction-note strong{color:#0d625c}
body:not(.landing-visible) .customer-intake-wizard-progress{display:grid;grid-template-columns:auto 1fr auto 1fr auto;align-items:center;gap:8px;margin:0 0 12px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:12px;background:#f7fafb}
body:not(.landing-visible) .customer-intake-wizard-progress>span{display:flex;align-items:center;gap:5px;color:#728087;font-size:10px;font-weight:850}
body:not(.landing-visible) .customer-intake-wizard-progress>span::first-letter{font-size:11px}
body:not(.landing-visible) .customer-intake-wizard-progress>span>span{font-weight:750}
body:not(.landing-visible) .customer-intake-wizard-progress>span.is-active{color:#08746e}
body:not(.landing-visible) .customer-intake-wizard-progress>span.is-complete{color:#27877f}
body:not(.landing-visible) .customer-intake-wizard-progress>i{height:2px;background:#dce6e8}
body:not(.landing-visible) .customer-intake-schedule-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:12px}
body:not(.landing-visible) .customer-intake-schedule-choice button{display:grid;gap:3px;min-height:72px;padding:12px;border:1px solid var(--ui-line-strong);border-radius:11px;background:#fff;color:var(--ui-text);text-align:left}
body:not(.landing-visible) .customer-intake-schedule-choice button.is-active{border-color:#29a89e;background:#eff9f7;box-shadow:0 0 0 2px rgba(15,159,159,.09)}
body:not(.landing-visible) .customer-intake-schedule-choice strong{font-size:13px}
body:not(.landing-visible) .customer-intake-schedule-choice span{font-size:10.5px;line-height:1.4;color:var(--ui-muted)}
body:not(.landing-visible) .customer-intake-schedule-fields{padding-top:2px}
body:not(.landing-visible) .customer-intake-free-note{margin:2px 0 0;padding:10px 11px;border-radius:10px;background:#eef7f7;color:#526a70}
body:not(.landing-visible) .customer-intake-footer{position:sticky;bottom:-22px;z-index:6;display:flex!important;align-items:center;justify-content:flex-end;gap:8px;margin:14px -22px -22px!important;padding:12px 22px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--ui-line);background:rgba(255,255,255,.97);backdrop-filter:blur(10px)}
body:not(.landing-visible) .customer-intake-footer .ghost-button{margin-right:auto}

@media(max-width:780px){
  body:not(.landing-visible) .customer-intake-type-grid{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-intake-type-card{min-height:88px;padding:12px}
  body:not(.landing-visible) .customer-intake-wizard-progress>span>span{display:none}
  body:not(.landing-visible) .customer-intake-footer{bottom:-16px;margin:12px -14px -16px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))}
  body:not(.landing-visible) .customer-intake-footer button{min-height:44px}
}

@media(max-width:520px){
  body:not(.landing-visible) .customer-intake-schedule-choice{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-intake-footer{display:grid!important;grid-template-columns:auto 1fr 1fr}
  body:not(.landing-visible) .customer-intake-footer .ghost-button{width:auto!important;margin:0}
  body:not(.landing-visible) .customer-intake-footer button{width:100%}
}

body:not(.landing-visible) .dashboard-redesign{max-width:1480px;margin-inline:auto}
body:not(.landing-visible) .app-content{display:grid;gap:0;min-width:0}
body:not(.landing-visible) .dashboard-page{min-width:0}

/* ---------- App shell ---------- */
body:not(.landing-visible) .app-topbar{
  min-height:106px;
  margin-bottom:12px;
  padding:14px 16px;
  align-items:center;
  border:1px solid var(--ui-line);
  border-radius:18px;
  background:linear-gradient(135deg,#fff 0%,#f7fbfa 100%);
  box-shadow:var(--ui-shadow);
}
body:not(.landing-visible) .app-topbar-brand{align-items:center;gap:12px}
body:not(.landing-visible) .dashboard-brand-logo{width:48px;height:48px;flex-basis:48px;border-radius:13px;box-shadow:0 4px 12px rgba(15,23,42,.07)}
body:not(.landing-visible) .dashboard-brand-logo img{padding:5px}
body:not(.landing-visible) .app-topbar-title h1{font-size:27px;line-height:1.08;letter-spacing:-.025em}
body:not(.landing-visible) .app-eyebrow-row{gap:7px}
body:not(.landing-visible) .app-account-panel{min-width:260px}
body:not(.landing-visible) .workspace-summary{gap:1px}
body:not(.landing-visible) .workspace-name{font-size:13px}
body:not(.landing-visible) .signed-in-email{font-size:11.5px}
body:not(.landing-visible) .connection-row{font-size:11.5px}

body:not(.landing-visible) .app-layout{grid-template-columns:220px minmax(0,1fr);gap:14px}
body:not(.landing-visible) .app-sidebar{
  top:12px;
  min-height:calc(100vh - 24px);
  padding:11px;
  border-radius:17px;
  border-color:#1d2a3a;
  background:linear-gradient(180deg,#101d2d 0%,#0d1927 100%);
  box-shadow:0 16px 38px rgba(15,23,42,.16);
}
body:not(.landing-visible) .sidebar-business-mark{gap:9px;padding:7px 7px 13px}
body:not(.landing-visible) .sidebar-mark{width:42px;height:42px;flex-basis:42px;border-radius:12px}
body:not(.landing-visible) .sidebar-business-mark strong{font-size:14px}
body:not(.landing-visible) .sidebar-business-mark small{font-size:10px}
body:not(.landing-visible) .sidebar-nav{gap:10px;margin-top:11px}
body:not(.landing-visible) .sidebar-nav-group{gap:3px}
body:not(.landing-visible) .sidebar-nav-label{padding:1px 10px 2px;font-size:9px;letter-spacing:.13em;color:#8291a5}
body:not(.landing-visible) .sidebar-nav-button{min-height:39px;padding:8px 9px;border-radius:10px;font-size:13px;gap:8px}
body:not(.landing-visible) .sidebar-nav-button.is-active{box-shadow:0 4px 12px rgba(0,0,0,.16)}
body:not(.landing-visible) .sidebar-footer{gap:6px;padding-top:13px}
body:not(.landing-visible) .sidebar-utility-button{min-height:38px;padding:8px 10px;border-radius:9px;font-size:12px}
body:not(.landing-visible) .app-legal-links{font-size:10px}

body:not(.landing-visible) .dashboard-action-bar{
  min-height:52px;
  margin-bottom:10px;
  padding:8px 10px;
  border-color:var(--ui-line);
  border-radius:13px;
  box-shadow:0 3px 12px rgba(15,23,42,.045);
}
body:not(.landing-visible) .dashboard-action-group{gap:6px}
body:not(.landing-visible) .dashboard-action-bar button{min-height:36px;padding:8px 12px;border-radius:9px}

/* ---------- Shared page rhythm ---------- */
body:not(.landing-visible) .dashboard-section,
body:not(.landing-visible) .lead-form-card,
body:not(.landing-visible) .access-card{
  margin-bottom:var(--ui-card-gap);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-lg);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow);
}
body:not(.landing-visible) .dashboard-section{padding:var(--ui-card-pad)}
body:not(.landing-visible) .page-intro-card{padding:14px 16px;background:linear-gradient(135deg,#fff 0%,#f8fbfb 100%)}
body:not(.landing-visible) .section-heading{gap:14px;align-items:flex-start}
body:not(.landing-visible) .section-heading>div:first-child{min-width:0}
body:not(.landing-visible) .section-kicker,
body:not(.landing-visible) .eyebrow{margin:0 0 2px;font-size:10px;letter-spacing:.085em;color:#08746e}
body:not(.landing-visible) .page-intro-card h2,
body:not(.landing-visible) .section-heading h2{font-size:20px;line-height:1.15;letter-spacing:-.015em}
body:not(.landing-visible) .section-heading h3{font-size:16px}
body:not(.landing-visible) .page-subtitle,
body:not(.landing-visible) .section-help{margin-top:3px;font-size:11.5px;line-height:1.45;color:var(--ui-muted)}
body:not(.landing-visible) .page-subtitle{max-width:820px}
body:not(.landing-visible) .section-help{max-width:560px}
body:not(.landing-visible) .page-heading-actions,
body:not(.landing-visible) .header-actions,
body:not(.landing-visible) .details-actions{gap:7px}
body:not(.landing-visible) .page-heading-actions button,
body:not(.landing-visible) .work-page-intro-actions button,
body:not(.landing-visible) .page-intro-card>button,
body:not(.landing-visible) .section-heading>button{min-height:38px;padding:8px 12px;border-radius:9px;box-shadow:none}

body:not(.landing-visible) button.primary-action,
body:not(.landing-visible) .primary-action,
body:not(.landing-visible) button:not(.secondary-button):not(.ghost-button):not(.danger-button):not(.view-button):not(.filter-button):not(.work-status-filter):not(.work-type-filter-button):not(.sidebar-nav-button):not(.sidebar-utility-button):not(.modal-close):not(.mobile-sheet-close):not(.mobile-nav-button):not(.icon-button){
  border-radius:9px;
}
body:not(.landing-visible) .secondary-button,
body:not(.landing-visible) .ghost-button{
  border:1px solid var(--ui-line-strong);
  background:#fff;
  color:#25333f;
  box-shadow:none;
}
body:not(.landing-visible) .secondary-button:hover,
body:not(.landing-visible) .ghost-button:hover{border-color:#9eb2bd;background:#f5f8f9;color:#14222d}
body:not(.landing-visible) .compact-button{min-height:34px;padding:6px 9px;border-radius:8px}
body:not(.landing-visible) .link-button{color:var(--ui-brand-dark)}

/* ---------- Forms ---------- */
body:not(.landing-visible) .form-grid{gap:12px}
body:not(.landing-visible) .field{min-width:0}
body:not(.landing-visible) .field>span,
body:not(.landing-visible) .property-picker-label{
  display:block;
  margin-bottom:5px;
  color:#1c2a37;
  font-size:12px;
  font-weight:800;
  line-height:1.3;
}
body:not(.landing-visible) .field input,
body:not(.landing-visible) .field select,
body:not(.landing-visible) .field textarea,
body:not(.landing-visible) .search-box,
body:not(.landing-visible) .property-picker-row select{
  width:100%;
  border:1px solid #c9d5dc;
  border-radius:10px;
  background:#fff;
  color:#162330;
  box-shadow:0 1px 2px rgba(15,23,42,.02);
}
body:not(.landing-visible) .field input,
body:not(.landing-visible) .field select,
body:not(.landing-visible) .search-box,
body:not(.landing-visible) .property-picker-row select{min-height:42px;padding:8px 11px}
body:not(.landing-visible) .field textarea{padding:10px 11px;line-height:1.45;resize:vertical}
body:not(.landing-visible) .field input:focus,
body:not(.landing-visible) .field select:focus,
body:not(.landing-visible) .field textarea:focus,
body:not(.landing-visible) .search-box:focus{
  outline:3px solid rgba(15,159,159,.13);
  outline-offset:0;
  border-color:#55aaa5;
}
body:not(.landing-visible) .field small,
body:not(.landing-visible) .field-note{display:block;margin-top:5px;font-size:10.5px;line-height:1.4;color:#71818a}
body:not(.landing-visible) .form-section{padding:14px 0}
body:not(.landing-visible) .form-section-heading{margin-bottom:10px}
body:not(.landing-visible) .form-section-heading h3{font-size:15px}
body:not(.landing-visible) .form-section-heading span{font-size:10.5px;color:var(--ui-muted)}
body:not(.landing-visible) .property-picker-row{gap:8px}
body:not(.landing-visible) .checkbox-row{border-radius:11px}

/* ---------- Shared tabs / filters / stats ---------- */
body:not(.landing-visible) .schedule-workspace-tabs,
body:not(.landing-visible) .work-type-filter,
body:not(.landing-visible) .customer-context-tabs,
body:not(.landing-visible) .team-access-tabs,
body:not(.landing-visible) .recurring-workspace-tabs{
  padding:4px;
  gap:4px;
  border:1px solid var(--ui-line);
  border-radius:13px;
  background:#edf3f4;
  box-shadow:none;
}
body:not(.landing-visible) .schedule-workspace-tab,
body:not(.landing-visible) .work-type-filter-button,
body:not(.landing-visible) .customer-context-tab,
body:not(.landing-visible) .team-access-tab,
body:not(.landing-visible) .recurring-workspace-tab{
  min-height:36px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#263743;
  box-shadow:none;
  font-size:12px;
  font-weight:800;
}
body:not(.landing-visible) .schedule-workspace-tab.is-active,
body:not(.landing-visible) .work-type-filter-button.is-active,
body:not(.landing-visible) .customer-context-tab.is-active,
body:not(.landing-visible) .team-access-tab.is-active,
body:not(.landing-visible) .recurring-workspace-tab.is-active{
  border-color:#a9c9c6;
  background:#fff;
  color:#086f69;
  box-shadow:0 1px 3px rgba(15,23,42,.05);
}
body:not(.landing-visible) .work-type-filter-button span{min-width:20px;padding:2px 6px;border-radius:999px;background:#dce7ea;font-size:10px}
body:not(.landing-visible) .work-type-filter-button.is-active span{background:#d8f2ee;color:#0b716b}

body:not(.landing-visible) .stats-grid.work-status-summary{gap:7px;margin-bottom:10px}
body:not(.landing-visible) .work-status-summary .stat-card,
body:not(.landing-visible) .work-status-summary .work-status-filter{
  min-height:60px;
  padding:9px 10px;
  border:1px solid var(--ui-line);
  border-radius:11px;
  background:#f8fafb;
  box-shadow:none;
}
body:not(.landing-visible) .work-status-summary .stat-label{font-size:10px;line-height:1.2;color:#405564}
body:not(.landing-visible) .work-status-summary .stat-value{font-size:20px;line-height:1.05}
body:not(.landing-visible) .work-status-summary .work-status-filter.is-active{border-color:#1ba4a2;background:#effaf8;box-shadow:inset 0 0 0 1px rgba(27,164,162,.08)}
body:not(.landing-visible) .filter-bar{gap:6px;margin-bottom:10px}
body:not(.landing-visible) .filter-button{min-height:34px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800}

body:not(.landing-visible) .empty-state{
  min-height:108px;
  padding:22px;
  border-color:#c8d5dc;
  border-radius:12px;
  background:#fafcfc;
  color:#657681;
}
body:not(.landing-visible) .empty-state strong{color:#263743}

/* ---------- Work ---------- */
body:not(.landing-visible) #jobsPage .work-page-intro{display:flex;align-items:center;justify-content:space-between;gap:14px}
body:not(.landing-visible) #jobsPage .work-page-intro-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
body:not(.landing-visible) #jobsPage #leadsSection{padding:14px}
body:not(.landing-visible) #jobsPage #leadsSection>.section-heading{padding-bottom:10px;border-bottom:1px solid #e3eaee}
body:not(.landing-visible) #jobsPage .work-type-filter{margin:10px 0}
body:not(.landing-visible) #jobsPage .lead-list{display:grid;gap:10px}
body:not(.landing-visible) #jobsPage .lead-card,
body:not(.landing-visible) #jobsPage .work-card,
body:not(.landing-visible) #jobsPage .service-call-card{
  border-color:var(--ui-line);
  border-radius:13px;
  box-shadow:none;
}
body:not(.landing-visible) #jobsPage .lead-card:hover,
body:not(.landing-visible) #jobsPage .work-card:hover{border-color:#b7c8d1;box-shadow:0 4px 12px rgba(15,23,42,.04)}
body:not(.landing-visible) #jobsPage .unified-service-call-filter-disclosure{margin:8px 0;border-color:var(--ui-line);border-radius:11px;background:#f8fafb}
body:not(.landing-visible) #jobsPage .unified-service-call-filter-disclosure>summary{min-height:36px;padding:7px 10px;font-size:12px}
body:not(.landing-visible) #jobsPage .unified-service-call-filter-disclosure .unified-service-call-filters{padding:10px}

/* ---------- Schedule ---------- */
body:not(.landing-visible) #schedulePage .schedule-workspace-tabs{display:inline-grid;width:auto;margin-bottom:10px}
body:not(.landing-visible) #schedulePage #calendarSection{padding:14px}
body:not(.landing-visible) #schedulePage .calendar-heading{margin-bottom:10px}
body:not(.landing-visible) #schedulePage .calendar-heading h2{font-size:18px}
body:not(.landing-visible) #schedulePage .calendar-view-switcher{gap:5px}
body:not(.landing-visible) #schedulePage .view-button{min-height:34px;padding:6px 10px;border-radius:9px;font-size:11px;font-weight:800}
body:not(.landing-visible) #schedulePage .schedule-calendar-layout{gap:10px}
body:not(.landing-visible) #schedulePage .awaiting-schedule-calendar-board,
body:not(.landing-visible) #schedulePage .scheduling-board{
  border-color:var(--ui-line);
  border-radius:12px;
  background:#f6f9fa;
}
body:not(.landing-visible) #schedulePage #calendar{border-radius:12px;box-shadow:none}
body:not(.landing-visible) #schedulePage .fc .fc-toolbar-title{font-size:18px!important}
body:not(.landing-visible) #schedulePage .fc .fc-button{border-radius:8px!important;box-shadow:none!important}
body:not(.landing-visible) #schedulePage .day-operations-route-desk{border-radius:12px!important;box-shadow:none!important}

/* ---------- Inbox / Photos / Customers / Documents ---------- */
body:not(.landing-visible) #inboxPage .operating-inbox-section{gap:12px}
body:not(.landing-visible) #inboxPage .operating-inbox-filters{gap:6px}
body:not(.landing-visible) #inboxPage .operating-inbox-filters button{min-height:34px;padding:6px 10px;border-radius:9px}
body:not(.landing-visible) #inboxPage .operating-inbox-empty{min-height:110px}

body:not(.landing-visible) #photosPage .photos-page-intro{align-items:center}
body:not(.landing-visible) #photosPage .photos-library-section{padding:14px}
body:not(.landing-visible) #photosPage .photo-filter-grid,
body:not(.landing-visible) #photosPage .photos-filter-grid{gap:9px}

body:not(.landing-visible) #customersPage .customer-operations-overview{margin-bottom:12px}
body:not(.landing-visible) #customersPage .customer-list{display:grid;gap:9px}
body:not(.landing-visible) #customersPage .customer-card{border-radius:12px;box-shadow:none}

body:not(.landing-visible) .documents-page .documents-page-intro{align-items:center}
body:not(.landing-visible) .documents-page .estimate-card,
body:not(.landing-visible) .documents-page .invoice-card{border-radius:12px;box-shadow:none}
body:not(.landing-visible) .documents-page .estimate-card:hover,
body:not(.landing-visible) .documents-page .invoice-card:hover{border-color:#b8c8d0}
body:not(.landing-visible) .estimate-filter-bar,
body:not(.landing-visible) .invoice-filter-bar{gap:6px}

/* ---------- Time / Payments / Profit / Billing / History / Help ---------- */
body:not(.landing-visible) #timeClockPage .time-clock-hero{padding:16px 18px}
body:not(.landing-visible) #timeClockPage .time-clock-display,
body:not(.landing-visible) #timeClockPage .time-clock-current-time{font-size:clamp(48px,6.2vw,76px);letter-spacing:-.055em;line-height:1}
body:not(.landing-visible) #timeClockPage .time-clock-one-tap{padding:14px 16px}
body:not(.landing-visible) #timeClockPage .time-clock-one-tap>button,
body:not(.landing-visible) #timeClockPage #clockInButton{min-height:44px;border-radius:10px}

body:not(.landing-visible) #paymentsPage .stripe-payments-hero,
body:not(.landing-visible) #profitPage .dashboard-section,
body:not(.landing-visible) #billingPage .dashboard-section,
body:not(.landing-visible) #historyPage .dashboard-section,
body:not(.landing-visible) #helpPage .dashboard-section{border-radius:var(--ui-radius-lg)}
body:not(.landing-visible) #historyPage .business-history-event{border-radius:12px;box-shadow:none}
body:not(.landing-visible) #helpPage .guided-path-grid{gap:10px}

/* ---------- Modals ---------- */
body:not(.landing-visible) .modal-backdrop{padding:18px;background:rgba(15,23,42,.50);backdrop-filter:blur(2px)}
body:not(.landing-visible) .modal{
  border:1px solid #d4dee4;
  border-radius:17px;
  background:#fff;
  box-shadow:var(--ui-shadow-float);
}
body:not(.landing-visible) .details-modal-header{gap:12px}
body:not(.landing-visible) .details-modal-header h2{font-size:21px;line-height:1.18}
body:not(.landing-visible) .modal-close,
body:not(.landing-visible) .mobile-sheet-close{
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  border:1px solid #d3dde3;
  border-radius:50%;
  background:#f7f9fa;
  color:#334454;
  box-shadow:none;
  font-size:25px;
  line-height:1;
}
body:not(.landing-visible) .modal-close:hover,
body:not(.landing-visible) .mobile-sheet-close:hover{background:#edf2f4;border-color:#bccbd3}
body:not(.landing-visible) .modal-actions{gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid #e1e8ec}
body:not(.landing-visible) .modal-actions button{min-height:40px;padding:8px 12px;border-radius:9px}

/* ---------- New Request: desktop polish ---------- */
body:not(.landing-visible) .customer-intake-modal{
  width:min(900px,calc(100vw - 36px));
  max-height:min(92vh,900px);
  padding:0 18px 18px;
  overflow:auto;
  background:#f4f7f7;
}
body:not(.landing-visible) .customer-intake-header{
  margin:0 -18px 12px;
  padding:16px 18px 12px;
  border-bottom-color:#d9e2e5;
  background:rgba(255,255,255,.98);
}
body:not(.landing-visible) .customer-intake-header h2{margin:0;font-size:23px;line-height:1.15}
body:not(.landing-visible) .customer-intake-header .page-subtitle{margin-top:3px;font-size:11.5px}
body:not(.landing-visible) .customer-intake-flow-note{margin-bottom:10px;padding:9px 11px;border-radius:11px;font-size:11.5px}
body:not(.landing-visible) .customer-intake-flow-icon{width:28px;height:28px;flex-basis:28px}
body:not(.landing-visible) .customer-intake-sections{gap:10px}
body:not(.landing-visible) .customer-intake-form-section,
body:not(.landing-visible) .customer-intake-next-step{padding:13px;border-radius:13px;box-shadow:none}
body:not(.landing-visible) .customer-intake-section-heading{gap:9px;margin-bottom:11px}
body:not(.landing-visible) .customer-intake-section-heading>span{width:28px;height:28px;flex-basis:28px;border-radius:8px;font-size:12px}
body:not(.landing-visible) .customer-intake-section-heading h3{font-size:15px;line-height:1.2}
body:not(.landing-visible) .customer-intake-section-heading p{font-size:10.8px}
body:not(.landing-visible) .customer-intake-grid{gap:11px}
body:not(.landing-visible) .customer-intake-request-field textarea{min-height:105px}
body:not(.landing-visible) .customer-intake-notes-field textarea{min-height:76px}
body:not(.landing-visible) .customer-intake-next-step{margin-top:10px;background:#eef7f5}
body:not(.landing-visible) .customer-intake-actions{gap:8px}
body:not(.landing-visible) .customer-intake-lead-action{min-height:60px!important;padding:10px 13px!important;border-radius:11px!important}
body:not(.landing-visible) .customer-intake-action-copy strong{font-size:13.5px}
body:not(.landing-visible) .customer-intake-action-copy>span{font-size:10.5px}
body:not(.landing-visible) .customer-intake-secondary-actions{gap:7px}
body:not(.landing-visible) .customer-intake-choice{min-height:56px;padding:9px 11px!important;border-radius:10px!important}
body:not(.landing-visible) .customer-intake-choice strong{font-size:12px}
body:not(.landing-visible) .customer-intake-choice span{font-size:10px}
body:not(.landing-visible) .customer-intake-footer{margin-top:8px}

/* ---------- Mobile / tablet ---------- */
@media(max-width:1100px){
  body:not(.landing-visible) .app-layout{grid-template-columns:205px minmax(0,1fr);gap:12px}
  body:not(.landing-visible) .page-subtitle{max-width:680px}
}

@media(max-width:820px){
  body:not(.landing-visible){padding:8px 8px calc(84px + env(safe-area-inset-bottom));background:#edf2f3}
  body:not(.landing-visible) .dashboard-redesign{max-width:none}
  body:not(.landing-visible) .app-topbar{
    min-height:0;
    margin-bottom:8px;
    padding:11px 12px;
    border-radius:14px;
    box-shadow:none;
  }
  body:not(.landing-visible) .dashboard-brand-logo{width:40px;height:40px;flex-basis:40px;border-radius:11px}
  body:not(.landing-visible) .app-topbar-title h1{font-size:23px}
  body:not(.landing-visible) .app-account-panel{margin-top:8px}
  body:not(.landing-visible) .app-account-panel .connection-row{font-size:10.5px}
  body:not(.landing-visible) .dashboard-section,
  body:not(.landing-visible) .lead-form-card,
  body:not(.landing-visible) .access-card{margin-bottom:9px;border-radius:13px;box-shadow:none}
  body:not(.landing-visible) .dashboard-section{padding:12px}
  body:not(.landing-visible) .page-intro-card{padding:12px}
  body:not(.landing-visible) .section-heading{gap:9px}
  body:not(.landing-visible) .page-heading-actions{gap:6px}
  body:not(.landing-visible) .page-subtitle{display:block;font-size:10.8px}
  body:not(.landing-visible) .section-help{display:none}
  body:not(.landing-visible) .modal-backdrop{padding:8px max(7px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));align-items:flex-end}
  body:not(.landing-visible) .modal{width:100%;max-height:calc(100dvh - 14px);border-radius:17px 17px 8px 8px}
}

@media(max-width:650px){
  body:not(.landing-visible) .app-topbar-brand{gap:9px}
  body:not(.landing-visible) .app-topbar-title h1{font-size:21px}
  body:not(.landing-visible) .app-topbar .app-eyebrow-row{display:flex;flex-wrap:wrap}
  body:not(.landing-visible) .app-account-panel{display:grid;grid-template-columns:1fr auto;gap:5px 8px;align-items:center}
  body:not(.landing-visible) .app-account-panel .connection-row{grid-column:1/-1}
  body:not(.landing-visible) .app-account-panel .workspace-summary{grid-column:1/-1}
  body:not(.landing-visible) .dashboard-section .section-heading,
  body:not(.landing-visible) .page-intro-card .section-heading{display:grid}
  body:not(.landing-visible) .page-intro-card{display:grid!important;gap:10px}
  body:not(.landing-visible) .page-heading-actions,
  body:not(.landing-visible) #jobsPage .work-page-intro-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  body:not(.landing-visible) .page-heading-actions .search-box{grid-column:1/-1}
  body:not(.landing-visible) .page-heading-actions button,
  body:not(.landing-visible) #jobsPage .work-page-intro-actions button{width:100%;min-width:0}
  body:not(.landing-visible) .page-heading-actions button:only-child{grid-column:1/-1}
  body:not(.landing-visible) .work-status-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;margin-inline:0!important;padding-inline:0!important}
  body:not(.landing-visible) .work-status-summary .stat-card,
  body:not(.landing-visible) .work-status-summary .work-status-filter{min-width:0!important;width:100%;min-height:56px}
  body:not(.landing-visible) .work-type-filter{display:grid!important;grid-template-columns:1fr 1fr!important;overflow:visible!important}
  body:not(.landing-visible) .work-type-filter-button{width:100%;min-width:0}
  body:not(.landing-visible) #schedulePage .schedule-workspace-tabs{display:grid;width:100%}
  body:not(.landing-visible) #schedulePage .calendar-heading-actions{width:100%;align-items:stretch}
  body:not(.landing-visible) #schedulePage .calendar-view-switcher{display:grid;grid-template-columns:repeat(4,1fr)}
  body:not(.landing-visible) #schedulePage .view-button{width:100%;padding-inline:5px}
  body:not(.landing-visible) #timeClockPage .time-clock-display,
  body:not(.landing-visible) #timeClockPage .time-clock-current-time{font-size:clamp(45px,16vw,64px)}
  body:not(.landing-visible) .modal-close{width:44px;min-width:44px;height:44px}
}

/* ---------- New Request: mobile rebuild ---------- */
@media(max-width:650px){
  body:not(.landing-visible) #customerIntakeModal{
    padding:6px max(6px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
    align-items:flex-end;
  }
  body:not(.landing-visible) .customer-intake-modal{
    width:100%;
    max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - 6px);
    padding:0 12px 12px;
    border-radius:18px 18px 8px 8px;
    background:#f4f7f7;
  }
  body:not(.landing-visible) .customer-intake-header{
    margin:0 -12px 9px;
    padding:13px 12px 10px;
    align-items:center;
  }
  body:not(.landing-visible) .customer-intake-header>div{min-width:0}
  body:not(.landing-visible) .customer-intake-header h2{font-size:20px;line-height:1.16;max-width:280px}
  body:not(.landing-visible) .customer-intake-header .section-kicker{font-size:9.5px}
  body:not(.landing-visible) .customer-intake-header .page-subtitle{display:none}
  body:not(.landing-visible) .customer-intake-flow-note{align-items:flex-start;margin-bottom:8px;padding:9px 10px;font-size:11px}
  body:not(.landing-visible) .customer-intake-flow-note strong{font-size:12px}
  body:not(.landing-visible) .customer-intake-sections{gap:8px}
  body:not(.landing-visible) .customer-intake-form-section,
  body:not(.landing-visible) .customer-intake-next-step{padding:12px;border-radius:12px}
  body:not(.landing-visible) .customer-intake-section-heading{margin-bottom:10px;gap:9px}
  body:not(.landing-visible) .customer-intake-section-heading>span{width:30px;height:30px;flex-basis:30px;border-radius:9px;font-size:12px}
  body:not(.landing-visible) .customer-intake-section-heading h3{font-size:15px}
  body:not(.landing-visible) .customer-intake-section-heading p{font-size:10.5px;line-height:1.35}
  body:not(.landing-visible) .customer-intake-grid,
  body:not(.landing-visible) .customer-intake-customer-grid,
  body:not(.landing-visible) .customer-intake-request-grid{display:grid;grid-template-columns:1fr;gap:10px}
  body:not(.landing-visible) .customer-intake-grid>*{grid-column:auto!important}
  body:not(.landing-visible) .customer-intake-modal .field>span,
  body:not(.landing-visible) .customer-intake-modal .property-picker-label{font-size:12px;margin-bottom:4px}
  body:not(.landing-visible) .customer-intake-modal .field input,
  body:not(.landing-visible) .customer-intake-modal .field select,
  body:not(.landing-visible) .customer-intake-modal .property-picker-row select{min-height:46px;padding:9px 11px;font-size:16px;border-radius:10px}
  body:not(.landing-visible) .customer-intake-modal .field textarea{padding:10px 11px;font-size:16px;border-radius:10px}
  body:not(.landing-visible) .customer-intake-request-field textarea{min-height:124px}
  body:not(.landing-visible) .customer-intake-notes-field textarea{min-height:92px}
  body:not(.landing-visible) .customer-intake-modal .field small,
  body:not(.landing-visible) .customer-intake-modal .field-note{font-size:10.5px;margin-top:4px}
  body:not(.landing-visible) .customer-intake-property-picker .property-picker-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:stretch}
  body:not(.landing-visible) .customer-intake-property-picker .compact-button{width:auto;min-width:118px;min-height:46px;padding:8px 10px;white-space:nowrap}
  body:not(.landing-visible) .customer-intake-next-step{margin-top:8px}
  body:not(.landing-visible) .customer-intake-lead-action{min-height:66px!important;padding:11px 12px!important}
  body:not(.landing-visible) .customer-intake-action-copy strong{font-size:14px}
  body:not(.landing-visible) .customer-intake-action-copy>span{font-size:11px}
  body:not(.landing-visible) .customer-intake-continue-label{font-size:9.5px}
  body:not(.landing-visible) .customer-intake-secondary-actions{grid-template-columns:1fr;gap:7px}
  body:not(.landing-visible) .customer-intake-choice{min-height:58px;padding:10px 12px!important;justify-items:start!important;text-align:left!important}
  body:not(.landing-visible) .customer-intake-choice strong{font-size:13px}
  body:not(.landing-visible) .customer-intake-choice span{font-size:10.5px}
  body:not(.landing-visible) .customer-intake-footer{display:none}
}

@media(max-width:390px){
  body:not(.landing-visible) .customer-intake-property-picker .property-picker-row{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-intake-property-picker .compact-button{width:100%;min-height:42px}
  body:not(.landing-visible) .page-heading-actions,
  body:not(.landing-visible) #jobsPage .work-page-intro-actions{grid-template-columns:1fr}
  body:not(.landing-visible) .page-heading-actions .search-box{grid-column:auto}
}

/* ---------- Accessibility / motion ---------- */
body:not(.landing-visible) button:focus-visible,
body:not(.landing-visible) a:focus-visible,
body:not(.landing-visible) input:focus-visible,
body:not(.landing-visible) select:focus-visible,
body:not(.landing-visible) textarea:focus-visible,
body:not(.landing-visible) summary:focus-visible{outline:3px solid rgba(15,159,159,.22);outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  body:not(.landing-visible) .dashboard-page,
  body:not(.landing-visible) .mobile-action-sheet{animation:none!important}
  body:not(.landing-visible) button:active{transform:none!important}
}

/* ---------- H39.1 functional hotfix: completed visit truth + intake footer alignment ---------- */
body:not(.landing-visible) #schedulePage .fc-event.calendar-service-call-completed{
  opacity:.72;
  filter:saturate(.18);
  box-shadow:none;
}
body:not(.landing-visible) #schedulePage .fc-event.calendar-service-call-completed .fc-event-title{
  font-weight:800;
}
body:not(.landing-visible) #schedulePage .fc-event.calendar-service-call-history{
  opacity:.66;
}
body:not(.landing-visible) #schedulePage .fc-event.calendar-service-call-completed:hover{
  opacity:.84;
}

body:not(.landing-visible) .customer-intake-next-heading{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  align-items:start;
  column-gap:9px;
}
body:not(.landing-visible) .customer-intake-next-heading>span{
  grid-column:1;
  grid-row:1 / span 2;
}
body:not(.landing-visible) .customer-intake-next-heading>div{
  grid-column:2;
  min-width:0;
}
body:not(.landing-visible) .customer-intake-next-heading .section-kicker{
  margin:0 0 2px;
}
body:not(.landing-visible) .customer-intake-next-heading h3,
body:not(.landing-visible) .customer-intake-next-heading p{
  margin-left:0;
  margin-right:0;
}
body:not(.landing-visible) .customer-intake-actions,
body:not(.landing-visible) .customer-intake-secondary-actions{
  width:100%;
}
body:not(.landing-visible) .customer-intake-lead-action,
body:not(.landing-visible) .customer-intake-choice{
  width:100%;
}
body:not(.landing-visible) .customer-intake-choice{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  text-align:left;
}
body:not(.landing-visible) .customer-intake-choice strong,
body:not(.landing-visible) .customer-intake-choice span,
body:not(.landing-visible) .customer-intake-action-copy{
  width:100%;
  text-align:left;
}
body:not(.landing-visible) .customer-intake-footer{
  justify-content:stretch;
}
body:not(.landing-visible) .customer-intake-footer .ghost-button{
  width:100%;
}

@media(max-width:650px){
  body:not(.landing-visible) .customer-intake-next-heading{
    grid-template-columns:30px minmax(0,1fr);
    column-gap:9px;
    margin-bottom:11px;
  }
  body:not(.landing-visible) .customer-intake-next-heading .section-kicker{
    font-size:9.5px;
    letter-spacing:.08em;
  }
  body:not(.landing-visible) .customer-intake-next-heading h3{
    margin:0 0 3px;
    font-size:15px;
    line-height:1.2;
  }
  body:not(.landing-visible) .customer-intake-next-heading p{
    margin:0;
    font-size:10.5px;
    line-height:1.38;
  }
  body:not(.landing-visible) .customer-intake-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
  }
  body:not(.landing-visible) .customer-intake-lead-action{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 28px;
    align-items:center;
    gap:8px;
    text-align:left!important;
  }
  body:not(.landing-visible) .customer-intake-action-arrow{
    justify-self:end;
    align-self:center;
    font-size:24px;
    line-height:1;
  }
  body:not(.landing-visible) .customer-intake-continue-label{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:9px;
    width:100%;
    margin:1px 0;
    text-align:center;
  }
  body:not(.landing-visible) .customer-intake-continue-label::before,
  body:not(.landing-visible) .customer-intake-continue-label::after{
    content:"";
    height:1px;
    background:#cfdadd;
  }
  body:not(.landing-visible) .customer-intake-continue-label span{
    margin:0;
    white-space:nowrap;
  }
  body:not(.landing-visible) .customer-intake-secondary-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  body:not(.landing-visible) .customer-intake-choice{
    min-height:60px;
    padding:10px 12px!important;
    border-radius:11px!important;
    align-items:flex-start!important;
    justify-content:center!important;
    text-align:left!important;
  }
  body:not(.landing-visible) .customer-intake-choice strong{
    display:block;
    margin:0 0 2px;
    font-size:13px;
    line-height:1.25;
  }
  body:not(.landing-visible) .customer-intake-choice span{
    display:block;
    margin:0;
    font-size:10.5px;
    line-height:1.35;
  }
  body:not(.landing-visible) .customer-intake-footer{
    display:flex;
    margin:9px 0 0;
    padding:10px 0 0;
    border-top:1px solid #d8e2e5;
  }
  body:not(.landing-visible) .customer-intake-footer .ghost-button{
    min-height:46px;
    border-radius:11px;
  }
}

/* ---------- H39 Hotfix 2: stable mobile/PWA application header ---------- */
@media(max-width:820px){
  body:not(.landing-visible) .app-topbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px 10px;
    min-height:0;
    margin:0 0 8px;
    padding:calc(9px + env(safe-area-inset-top)) 11px 9px;
    border:1px solid #d5e0e3;
    border-radius:14px;
    background:rgba(255,255,255,.98);
    box-shadow:none;
  }
  body:not(.landing-visible) .app-topbar-brand{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
    overflow:hidden;
  }
  body:not(.landing-visible) .dashboard-brand-logo{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:11px;
    box-shadow:0 2px 8px rgba(15,23,42,.08);
  }
  body:not(.landing-visible) .app-topbar-title{
    min-width:0;
    display:grid;
    gap:1px;
  }
  body:not(.landing-visible) .app-topbar-title .app-eyebrow-row{
    min-width:0;
    gap:5px;
  }
  body:not(.landing-visible) .app-topbar-title .eyebrow{
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:9px;
    line-height:1.1;
    letter-spacing:.12em;
  }
  body:not(.landing-visible) .app-topbar-title h1{
    max-width:100%;
    margin:0;
    overflow:visible;
    font-size:21px;
    line-height:1.05;
    letter-spacing:-.02em;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:normal;
  }
  body:not(.landing-visible) .app-topbar-title .page-subtitle,
  body:not(.landing-visible) .app-account-panel .connection-row,
  body:not(.landing-visible) .app-account-panel .workspace-summary,
  body:not(.landing-visible) .app-account-panel>.signed-in-email,
  body:not(.landing-visible) .app-account-panel .role-badge{
    display:none!important;
  }
  body:not(.landing-visible) .app-account-panel{
    display:flex!important;
    grid-template-columns:none!important;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
    min-width:0;
    margin:0!important;
    white-space:nowrap;
  }
  body:not(.landing-visible) .mobile-clock-status-pill,
  body:not(.landing-visible) .operating-inbox-button,
  body:not(.landing-visible) .notification-button,
  body:not(.landing-visible) .account-menu-trigger{
    width:38px;
    min-width:38px;
    height:38px;
    min-height:38px;
    flex:0 0 38px;
    padding:0;
    border-radius:12px;
  }
  body:not(.landing-visible) .mobile-clock-status-pill{
    display:inline-flex;
    justify-content:center;
    gap:0;
  }
  body:not(.landing-visible) .mobile-clock-status-pill span{display:none}
  body:not(.landing-visible) .mobile-clock-status-pill i{margin:0}
  body:not(.landing-visible) .operating-inbox-button{justify-content:center}
  body:not(.landing-visible) .notification-button{font-size:17px}
  body:not(.landing-visible) .account-menu-trigger{padding:4px}
  body:not(.landing-visible) .account-avatar{
    width:28px;
    height:28px;
    flex-basis:28px;
    font-size:12px;
  }
}

@media(max-width:650px){
  body:not(.landing-visible) .app-topbar{
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px;
    padding-left:9px;
    padding-right:9px;
  }
  body:not(.landing-visible) .dashboard-brand-logo{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  body:not(.landing-visible) .app-topbar-title .app-eyebrow-row{display:none}
  body:not(.landing-visible) .app-topbar-title h1{
    font-size:20px;
    line-height:1.05;
  }
  body:not(.landing-visible) .mobile-clock-status-pill,
  body:not(.landing-visible) .operating-inbox-button,
  body:not(.landing-visible) .notification-button,
  body:not(.landing-visible) .account-menu-trigger{
    width:36px;
    min-width:36px;
    height:36px;
    min-height:36px;
    flex-basis:36px;
  }
  body:not(.landing-visible) .operating-inbox-button .operating-inbox-button-icon{
    width:20px;
    height:20px;
  }
  body:not(.landing-visible) .account-avatar{
    width:27px;
    height:27px;
    flex-basis:27px;
  }

  /* Keep New Request chrome compact so the form owns the viewport. */
  body:not(.landing-visible) .customer-intake-header{
    min-height:0;
    margin:0 -12px 8px;
    padding:10px 11px 9px;
    align-items:center;
  }
  body:not(.landing-visible) .customer-intake-header h2{
    max-width:260px;
    font-size:19px;
    line-height:1.12;
  }
  body:not(.landing-visible) .customer-intake-header .section-kicker{
    margin-bottom:2px;
    font-size:9px;
  }
  body:not(.landing-visible) .customer-intake-header .modal-close{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
    flex-basis:40px;
    font-size:23px;
  }
}

@media(max-width:360px){
  body:not(.landing-visible) .app-topbar{gap:5px;padding-left:7px;padding-right:7px}
  body:not(.landing-visible) .app-topbar-brand{gap:6px}
  body:not(.landing-visible) .dashboard-brand-logo{width:36px;height:36px;flex-basis:36px}
  body:not(.landing-visible) .app-topbar-title h1{font-size:18px}
  body:not(.landing-visible) .app-account-panel{gap:3px}
  body:not(.landing-visible) .mobile-clock-status-pill,
  body:not(.landing-visible) .operating-inbox-button,
  body:not(.landing-visible) .notification-button,
  body:not(.landing-visible) .account-menu-trigger{
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    flex-basis:34px;
  }
}

/* H39.4 — one first-class manual Reminder composer shared by Quick Add and Work. */
.manual-reminder-modal{width:min(640px,calc(100vw - 32px));max-height:min(820px,calc(100dvh - 32px));overflow:auto}
.manual-reminder-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.manual-reminder-grid .full-width{grid-column:1/-1}
.manual-reminder-time-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 12px}
.manual-reminder-time-choices button{display:flex;min-height:78px;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;gap:4px;padding:12px 14px}
.manual-reminder-time-choices button strong{font-size:14px;color:var(--text-strong,#122033)}
.manual-reminder-time-choices button span{font-size:12px;line-height:1.35;color:var(--text-muted,#667783);font-weight:500}
.notification-context-pill.is-reminder{background:#e7f7f4;border-color:#9ed9d1;color:#086f67}
@media(max-width:650px){
  .manual-reminder-modal{width:calc(100vw - 18px);max-height:calc(100dvh - 18px);padding:14px}
  .manual-reminder-grid{grid-template-columns:1fr;gap:10px}
  .manual-reminder-grid .full-width{grid-column:auto}
  .manual-reminder-time-choices{grid-template-columns:1fr;gap:8px}
  .manual-reminder-time-choices button{min-height:64px}
}

/* H39.5 — Work-card visual parity + labeled rectangular close controls. */
body:not(.landing-visible) .modal-close,
body:not(.landing-visible) .mobile-sheet-close{
  display:inline-flex!important;
  width:auto!important;
  min-width:72px!important;
  height:40px!important;
  min-height:40px!important;
  flex:0 0 auto!important;
  aspect-ratio:auto!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 14px!important;
  border:1px solid #c7d3dc!important;
  border-radius:10px!important;
  background:#f7f9fb!important;
  color:#172033!important;
  box-shadow:none!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:800!important;
  letter-spacing:0!important;
}
body:not(.landing-visible) .modal-close:hover,
body:not(.landing-visible) .mobile-sheet-close:hover{background:#edf2f4!important;border-color:#aebdc7!important;color:#10272b!important}
body:not(.landing-visible) .customer-intake-header .modal-close{
  width:auto!important;min-width:72px!important;height:40px!important;min-height:40px!important;flex-basis:auto!important;font-size:13px!important
}
body:not(.landing-visible) .customer-context-return-dismiss{
  min-width:70px!important;min-height:36px!important;padding:7px 12px!important;border-radius:9px!important;font-size:12px!important;line-height:1!important;font-weight:800!important
}

/* Service Calls use the same customer-name interaction and heading hierarchy as regular Work. */
body:not(.landing-visible) #jobsPage .unified-service-call-work-card .work-customer-link{
  display:inline;padding:0;border:0;background:transparent;color:#172033;font:inherit;font-size:16px;font-weight:800;line-height:1.25;text-align:left;box-shadow:none
}
body:not(.landing-visible) #jobsPage .unified-service-call-work-card .work-customer-link:hover,
body:not(.landing-visible) #jobsPage .unified-service-call-work-card .work-customer-link:focus-visible{
  background:transparent;color:#147a77;text-decoration:underline;box-shadow:none
}

/* Explicit rectangular destructive controls replace icon-only X buttons in document editors. */
body:not(.landing-visible) .invoice-lines-heading,
body:not(.landing-visible) .invoice-item-row{grid-template-columns:minmax(220px,1fr) 82px 105px 115px 105px 76px}
body:not(.landing-visible) .estimate-lines-heading,
body:not(.landing-visible) .estimate-item-row{grid-template-columns:minmax(250px,1fr) 72px 88px 110px 122px 100px 76px}
body:not(.landing-visible) .invoice-remove-item,
body:not(.landing-visible) .estimate-remove-item{
  width:auto!important;min-width:72px!important;height:38px!important;min-height:38px!important;padding:0 10px!important;border-radius:9px!important;font-size:12px!important;font-weight:800!important;line-height:1!important
}
@media(max-width:900px){
  body:not(.landing-visible) .estimate-item-row{grid-template-columns:repeat(4,minmax(0,1fr)) 76px}
}
@media(max-width:760px){
  body:not(.landing-visible) .invoice-item-row{grid-template-columns:minmax(0,1fr) 80px 95px 76px}
}
@media(max-width:520px){
  body:not(.landing-visible) .estimate-item-row{grid-template-columns:1fr 1fr 76px}
}
@media(max-width:480px){
  body:not(.landing-visible) .invoice-item-row{grid-template-columns:1fr 1fr 76px}
}
@media(max-width:650px){
  body:not(.landing-visible) .modal-close,
  body:not(.landing-visible) .mobile-sheet-close{min-width:68px!important;height:38px!important;min-height:38px!important;padding:0 12px!important;font-size:12px!important}
  body:not(.landing-visible) .customer-intake-header .modal-close{min-width:68px!important;height:38px!important;min-height:38px!important;font-size:12px!important}
}


/* H39.6 — workflow skip progression + legible responsive header identity. */
body:not(.landing-visible) .dashboard-brand-logo{
  width:62px;
  height:62px;
  flex-basis:62px;
  max-width:62px;
  max-height:62px;
  border-radius:16px;
}
body:not(.landing-visible) .dashboard-brand-logo img{
  padding:2px;
}
@media(max-width:1100px){
  body:not(.landing-visible) .dashboard-brand-logo{
    width:58px;
    height:58px;
    flex-basis:58px;
  }
}
@media(max-width:820px){
  body:not(.landing-visible) .dashboard-brand-logo{
    width:52px;
    height:52px;
    flex-basis:52px;
    border-radius:13px;
  }
  body:not(.landing-visible) .dashboard-brand-logo img{padding:1px}
}
@media(max-width:650px){
  body:not(.landing-visible) .dashboard-brand-logo{
    width:50px;
    height:50px;
    flex-basis:50px;
  }
}
@media(max-width:360px){
  body:not(.landing-visible) .dashboard-brand-logo{
    width:46px;
    height:46px;
    flex-basis:46px;
  }
}

/* H39.7 — route modal layering, location search, and compact route endpoints */
body:not(.landing-visible) #routingAddressReviewModal{
  z-index:3200!important;
}
body:not(.landing-visible) #routingAddressReviewModal[data-modal-priority="top"]{
  z-index:3400!important;
}
body:not(.landing-visible) .free-day-route-endpoint-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--border-color,#d8dee5);
  border-radius:12px;
  background:#f8fbfc;
  margin-top:2px;
}
body:not(.landing-visible) .free-day-route-endpoint-copy{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:10px;
  align-items:center;
}
body:not(.landing-visible) .free-day-route-endpoint-copy>span:not(.free-day-route-arrow){
  min-width:0;
  display:grid;
  gap:2px;
}
body:not(.landing-visible) .free-day-route-endpoint-copy strong{
  font-size:.72rem;
  line-height:1.15;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#64748b;
}
body:not(.landing-visible) .free-day-route-endpoint-copy small{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.79rem;
  line-height:1.35;
  color:#1f2937;
  font-weight:700;
}
body:not(.landing-visible) .free-day-route-arrow{
  color:#94a3b8;
  font-weight:800;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode{
  max-width:660px;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode .day-settings-grid,
body:not(.landing-visible) .day-settings-modal.route-only-mode .day-route-normal-grid,
body:not(.landing-visible) .day-settings-modal.route-only-mode .day-blocked-time-panel{
  display:none!important;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode .day-route-settings-panel{
  margin-top:8px;
  padding-top:0;
  border-top:0;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode .day-route-override-toggle-row{
  display:none!important;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode #dayRouteOverrideFields{
  display:block!important;
}
body:not(.landing-visible) .day-settings-modal.route-only-mode>.field-note{
  display:none;
}
@media(max-width:650px){
  body:not(.landing-visible) .free-day-route-endpoint-control{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    padding:9px 10px;
  }
  body:not(.landing-visible) .free-day-route-endpoint-copy{
    grid-template-columns:minmax(0,1fr);
    gap:6px;
  }
  body:not(.landing-visible) .free-day-route-arrow{
    display:none;
  }
  body:not(.landing-visible) .free-day-route-endpoint-copy small{
    font-size:.76rem;
  }
  body:not(.landing-visible) .free-day-route-endpoint-control>button{
    min-height:42px;
    padding-inline:12px;
  }
}


/* H39.9 — one reminder composer, deliberate audience selection */
.manual-reminder-audience-field{display:grid;gap:8px}
.manual-reminder-audience-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.manual-reminder-audience-choices button{min-height:62px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;padding:10px 12px;background:#fff;border:1px solid var(--line,#cbd8df);border-radius:10px;color:var(--text-strong,#122033);text-align:left}
.manual-reminder-audience-choices button strong{font-size:13px;line-height:1.25}
.manual-reminder-audience-choices button small{font-size:11px;line-height:1.25;color:var(--text-muted,#667783);font-weight:600}
.manual-reminder-audience-choices button.is-active{border-color:var(--teal,#0f9d9a);background:var(--teal-soft,#edf9f7);box-shadow:0 0 0 1px rgba(15,157,154,.12)}
.manual-reminder-people{display:grid;gap:7px;padding:10px;border:1px solid var(--line,#d5e0e6);border-radius:10px;background:#f8fbfc}
.manual-reminder-people-label{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted,#667783)}
.manual-reminder-people-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.manual-reminder-person{display:flex;align-items:center;gap:9px;min-height:48px;padding:8px 10px;border:1px solid var(--line,#d5e0e6);border-radius:9px;background:#fff;cursor:pointer}
.manual-reminder-person input{width:18px;height:18px;flex:0 0 auto}
.manual-reminder-person span{display:grid;min-width:0}
.manual-reminder-person strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.manual-reminder-person small{font-size:10px;color:var(--text-muted,#667783)}

@media(max-width:620px){
  .manual-reminder-audience-choices{grid-template-columns:1fr}
  .manual-reminder-audience-choices button{min-height:54px}
  .manual-reminder-people-list{grid-template-columns:1fr}
}

/* H39.10 — field execution, service-time F-R-E-E, mobile Ask, and menu/button cohesion */
html.free-road-routing-disabled body:not(.landing-visible) .day-route-settings-panel,
html.free-road-routing-disabled body:not(.landing-visible) .routing-address-review-launch,
html.free-road-routing-disabled body:not(.landing-visible) #routingAddressReviewModal,
html.free-road-routing-disabled body:not(.landing-visible) .free-day-order-mode,
html.free-road-routing-disabled body:not(.landing-visible) #freeDayPlanEndpointControl,
html.free-road-routing-disabled body:not(.landing-visible) .free-day-plan-history{
  display:none!important;
}

body:not(.landing-visible) .schedule-current-work-shortcut{
  display:block;
  margin:0 0 12px;
}
body:not(.landing-visible) .schedule-current-work-shortcut[hidden]{display:none!important}
body:not(.landing-visible) .schedule-current-work-card,
body:not(.landing-visible) .schedule-current-work-empty{
  display:grid;
  gap:10px;
  padding:13px 14px;
  border:1px solid #cbd8df;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 14px rgba(15,23,42,.045);
}
body:not(.landing-visible) .schedule-current-work-card.is-current{
  border-color:#73b8ae;
  background:#f7fcfb;
  box-shadow:0 0 0 1px rgba(15,118,110,.08),0 5px 15px rgba(15,23,42,.05);
}
body:not(.landing-visible) .schedule-current-work-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
body:not(.landing-visible) .schedule-current-work-head>div,
body:not(.landing-visible) .schedule-current-work-empty>div{
  display:grid;
  min-width:0;
  gap:2px;
}
body:not(.landing-visible) .schedule-current-work-head>div>span,
body:not(.landing-visible) .schedule-current-work-empty>div>span{
  color:#0f766e;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
body:not(.landing-visible) .schedule-current-work-head strong,
body:not(.landing-visible) .schedule-current-work-empty strong{
  min-width:0;
  color:#172b31;
  font-size:17px;
  line-height:1.22;
  overflow-wrap:anywhere;
}
body:not(.landing-visible) .schedule-current-work-head small,
body:not(.landing-visible) .schedule-current-work-empty small{
  color:#64748b;
  font-size:12px;
  line-height:1.4;
}
body:not(.landing-visible) .schedule-current-work-type{
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid #d4e0df;
  border-radius:8px;
  background:#f6f9f9;
  color:#52666a;
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.045em;
}
body:not(.landing-visible) .schedule-current-work-facts{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
body:not(.landing-visible) .schedule-current-work-facts span{
  display:inline-flex;
  min-height:29px;
  align-items:center;
  padding:5px 8px;
  border-radius:8px;
  background:#f1f5f5;
  color:#516268;
  font-size:11px;
  font-weight:750;
}
body:not(.landing-visible) .schedule-current-work-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
body:not(.landing-visible) .schedule-current-work-actions .today-field-utilities{
  flex:1 1 auto;
  min-width:0;
}
body:not(.landing-visible) .schedule-current-work-primary{flex:0 0 auto}
body:not(.landing-visible) .schedule-current-work-footer{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  padding-top:9px;
  border-top:1px solid #e6ecec;
}
body:not(.landing-visible) .schedule-current-work-footer>span{
  margin-left:auto;
  color:#738085;
  font-size:10px;
  font-weight:700;
}
body:not(.landing-visible) .schedule-current-work-empty{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}

body:not(.landing-visible) .work-execution-truth-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:9px;
}
body:not(.landing-visible) .work-time-correction-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
body:not(.landing-visible) .work-time-correction-summary{
  grid-column:1/-1;
  display:grid;
  gap:2px;
  padding:9px 10px;
  border:1px solid #d8e3e1;
  border-radius:10px;
  background:#f7faf9;
}
body:not(.landing-visible) .work-time-correction-summary span{font-size:11px;color:#66777b}
body:not(.landing-visible) .work-time-correction-form>small{grid-column:1/-1;color:#66777b;line-height:1.4}

/* Remove the old tiny/pill treatment from Customer/Property operating controls. */
body:not(.landing-visible) .customer-context-open-button{
  min-height:38px!important;
  padding:7px 11px!important;
  border-radius:9px!important;
  font-size:12px!important;
  line-height:1.2;
}
body:not(.landing-visible) .customer-more-menu>summary{
  width:auto!important;
  min-width:44px;
  height:38px!important;
  padding:0 10px;
  border-radius:9px!important;
}
body:not(.landing-visible) .card-action-menu>.card-menu-trigger,
body:not(.landing-visible) .inline-action-menu>summary,
body:not(.landing-visible) .page-filter-more>summary,
body:not(.landing-visible) .recurring-card-more>summary{
  border-radius:9px!important;
}

/* Ask Osrilo: bounded phone sheet with its own transcript scroll region. */
@media(max-width:820px){
  body:not(.landing-visible) .ask-osrilo-dock{
    right:8px;
    left:8px;
    bottom:calc(78px + env(safe-area-inset-bottom,0px));
    width:auto;
    height:min(58dvh,520px);
    max-height:calc(100dvh - 126px - env(safe-area-inset-bottom,0px));
    border-radius:15px;
  }
  body:not(.landing-visible) .ask-osrilo-dock-header{
    min-height:48px;
    padding:.45rem .5rem .45rem .65rem;
  }
  body:not(.landing-visible) .ask-osrilo-dock .ask-osrilo-section{
    min-height:0;
    grid-template-rows:auto minmax(0,1fr) auto;
    padding:.42rem;
    gap:.38rem;
  }
  body:not(.landing-visible) .ask-osrilo-dock .ask-osrilo-transcript{
    min-height:0;
    max-height:none;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  body:not(.landing-visible) .ask-osrilo-dock .ask-osrilo-form{
    position:relative;
    padding:.36rem;
  }
}
@media(max-width:560px){
  body:not(.landing-visible) .schedule-current-work-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  body:not(.landing-visible) .schedule-current-work-primary>button{
    width:100%;
    min-height:44px;
  }
  body:not(.landing-visible) .schedule-current-work-footer>span{
    width:100%;
    margin-left:0;
  }
  body:not(.landing-visible) .schedule-current-work-empty{
    grid-template-columns:1fr;
  }
  body:not(.landing-visible) .work-time-correction-form{
    grid-template-columns:1fr;
  }
  body:not(.landing-visible) .work-time-correction-summary,
  body:not(.landing-visible) .work-time-correction-form>small{
    grid-column:auto;
  }
}
html.free-road-routing-disabled body:not(.landing-visible) .day-early-start-field{display:none!important}
body:not(.landing-visible) .field-work-active-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
@media(max-width:560px){body:not(.landing-visible) .field-work-active-actions{display:grid;grid-template-columns:1fr 1fr}body:not(.landing-visible) .field-work-active-actions>button{width:100%}}

/* ---------- H40.1 recurring visit outcomes ---------- */
body:not(.landing-visible) .day-operations-item.is-canceled,
body:not(.landing-visible) .day-operations-item.is-cancelled,
body:not(.landing-visible) .day-operations-item.is-rescheduled,
body:not(.landing-visible) .day-operations-item.is-weather-delayed{
  background:#f8fafc;
  border-color:#cbd5e1;
}
body:not(.landing-visible) .day-operations-status.is-canceled,
body:not(.landing-visible) .day-operations-status.is-cancelled{
  border-color:#fecaca;
  background:#fff1f2;
  color:#9f1239;
}
body:not(.landing-visible) .day-operations-status.is-rescheduled,
body:not(.landing-visible) .day-operations-status.is-weather-delayed{
  border-color:#fde68a;
  background:#fffbeb;
  color:#92400e;
}
body:not(.landing-visible) .status-canceled,
body:not(.landing-visible) .status-cancelled{
  border-color:#fecaca!important;
  background:#fff1f2!important;
  color:#9f1239!important;
}

/* ---------- H40.2 full-site consistency + Customer Account containment ----------
 * Keep the established slate / white / teal visual direction. This final layer
 * only normalizes spacing, action hierarchy, contrast, and responsive bounds.
 */
body:not(.landing-visible){
  --ui-action:#0f766e;
  --ui-action-hover:#0b5f5b;
  --ui-action-text:#fff;
  --ui-action-gap:8px;
  --ui-panel-gutter:16px;
  --brand:var(--ui-action);
  --brand-dark:var(--ui-action-hover);
}

/* Solid teal is the primary action. Text and link controls stay visually quiet. */
body:not(.landing-visible) .primary-action{
  border-color:var(--ui-action);
  background:var(--ui-action);
  color:var(--ui-action-text);
  box-shadow:0 4px 12px rgba(15,118,110,.16);
}
body:not(.landing-visible) .primary-action:hover{
  border-color:var(--ui-action-hover);
  background:var(--ui-action-hover);
  color:var(--ui-action-text);
}
body:not(.landing-visible) .secondary-button,
body:not(.landing-visible) .ghost-button{
  border:1px solid var(--ui-line-strong);
  background:#fff;
  color:#24323e;
  box-shadow:none;
}
body:not(.landing-visible) .link-button,
body:not(.landing-visible) .text-button{
  width:auto;
  min-width:0;
  min-height:0;
  margin:0;
  padding:3px 2px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:var(--ui-brand-dark);
  box-shadow:none;
  line-height:1.3;
  text-decoration:none;
}
body:not(.landing-visible) .link-button:hover,
body:not(.landing-visible) .text-button:hover{
  background:transparent;
  color:#075b57;
  text-decoration:underline;
}

/* Every action row shares one gap and keeps its controls inside the parent. */
body:not(.landing-visible) :where([class$="-actions"],[class*="-actions "]){
  gap:var(--ui-action-gap);
  min-width:0;
  max-width:100%;
}
body:not(.landing-visible) :where([class$="-actions"],[class*="-actions "])>button,
body:not(.landing-visible) :where([class$="-actions"],[class*="-actions "])>details{
  max-width:100%;
  margin:0;
}
body:not(.landing-visible) :where(
  .lead-card-actions,
  .compact-card-actions,
  .customer-card-actions,
  .estimate-card-actions,
  .invoice-card-actions,
  .material-card-actions,
  .recurring-card-actions,
  .service-call-card-actions,
  .operating-inbox-item-actions,
  .business-history-event-actions,
  .billing-addon-actions,
  .billing-subscription-actions,
  .customer-notification-review-actions
){
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--ui-line);
}

/* Menus are neutral navigation surfaces, never a stack of competing primaries. */
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .page-filter-more-grid,
  .account-menu-actions
){
  gap:5px;
  max-width:min(360px,calc(100vw - 24px));
  padding:8px;
  overflow-x:hidden;
  border-color:var(--ui-line-strong);
}
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .page-filter-more-grid,
  .account-menu-actions,
  .mobile-more-grid,
  .mobile-sheet-actions
) button{
  max-width:100%;
  margin:0;
  border-color:var(--ui-line);
  background:#fff;
  color:#24323e;
  box-shadow:none;
  line-height:1.25;
}
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .account-menu-actions
) button{
  width:100%;
  min-height:40px;
  padding:9px 11px;
  justify-content:flex-start;
  text-align:left;
}
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .page-filter-more-grid,
  .account-menu-actions,
  .mobile-more-grid,
  .mobile-sheet-actions
) button:hover{
  border-color:#b7c8d1;
  background:var(--ui-brand-soft);
  color:#183d3a;
}
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .account-menu-actions
) .menu-danger-action,
body:not(.landing-visible) .account-menu-actions .account-menu-sign-out{
  background:#fff;
  color:var(--danger);
}
body:not(.landing-visible) :where(
  .card-action-popover,
  .customer-more-popover,
  .inline-action-menu>div,
  .account-menu-actions
) .menu-danger-action:hover,
body:not(.landing-visible) .account-menu-actions .account-menu-sign-out:hover{
  border-color:#fecaca;
  background:var(--danger-soft);
  color:var(--danger);
}

/* Shared bounds stop one long label or control from widening a page or panel. */
body:not(.landing-visible) .app-content,
body:not(.landing-visible) .dashboard-page,
body:not(.landing-visible) .dashboard-page>*{
  min-width:0;
  max-width:100%;
}
body:not(.landing-visible) .dashboard-page :where(
  .section-heading,
  .page-heading-actions,
  .dashboard-section,
  .lead-card,
  .work-card,
  .service-call-card,
  .customer-account-card,
  .estimate-card,
  .invoice-card,
  .material-card
)>*{min-width:0}
body:not(.landing-visible) .modal{
  max-width:calc(100vw - 24px);
  overflow-x:hidden;
  scroll-padding-block:64px 76px;
}
body:not(.landing-visible) .details-modal-header{
  align-items:flex-start;
  min-width:0;
}
body:not(.landing-visible) .details-modal-header>div{min-width:0}
body:not(.landing-visible) .details-modal-header :where(h2,.page-subtitle){overflow-wrap:anywhere}
body:not(.landing-visible) .details-modal-header .modal-close{
  position:relative;
  z-index:8;
  flex:0 0 auto!important;
  align-self:flex-start;
}

/* Customer Account owns one scroll region and one symmetric gutter. */
body:not(.landing-visible) .customer-context-modal{
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr) auto;
  width:min(1100px,calc(100vw - 32px));
  max-width:1100px;
  max-height:min(92dvh,940px);
  padding:0;
  overflow:hidden;
  border-radius:17px;
}
body:not(.landing-visible) .customer-context-modal>*{
  min-width:0;
  max-width:100%;
}
body:not(.landing-visible) .customer-context-header{
  position:relative;
  top:auto;
  z-index:5;
  margin:0;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--ui-line);
  background:#fff;
}
body:not(.landing-visible) .customer-context-identity{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:12px 20px;
  border-bottom:1px solid #e6ecef;
  background:#fbfcfc;
}
body:not(.landing-visible) .customer-context-contact{
  min-width:0;
  overflow-wrap:anywhere;
}
body:not(.landing-visible) .customer-context-contact>*{min-width:0}
body:not(.landing-visible) .customer-context-quick-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
body:not(.landing-visible) .customer-context-quick-actions button{
  min-height:38px;
  padding:7px 11px;
  white-space:normal;
}
body:not(.landing-visible) .customer-context-tabs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(105px,1fr));
  gap:4px;
  margin:10px 20px 12px;
  padding:4px;
  overflow:visible;
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:#edf3f4;
}
body:not(.landing-visible) .customer-context-tab{
  width:100%;
  min-width:0;
  min-height:38px;
  padding:7px 6px;
  white-space:normal;
  line-height:1.2;
}
body:not(.landing-visible) .customer-context-body{
  min-width:0;
  min-height:0;
  padding:0 20px 16px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
body:not(.landing-visible) .customer-context-stack,
body:not(.landing-visible) .customer-context-grid,
body:not(.landing-visible) .customer-context-record-list,
body:not(.landing-visible) .customer-context-property-list,
body:not(.landing-visible) .customer-context-timeline{
  min-width:0;
  max-width:100%;
}
body:not(.landing-visible) .customer-context-stack{gap:12px}
body:not(.landing-visible) .customer-context-grid{gap:12px}
body:not(.landing-visible) .customer-context-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
body:not(.landing-visible) .customer-context-summary{
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
  gap:8px;
}
body:not(.landing-visible) .customer-context-money-summary{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
}
body:not(.landing-visible) .customer-context-summary>div,
body:not(.landing-visible) .customer-context-money-summary>div{
  min-width:0;
  min-height:68px;
  padding:11px 12px;
  border-radius:11px;
}
body:not(.landing-visible) .customer-context-section{
  min-width:0;
  max-width:100%;
  gap:10px;
  padding:14px;
  overflow:hidden;
  border-color:var(--ui-line);
  border-radius:13px;
}
body:not(.landing-visible) .customer-context-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:10px;
  min-width:0;
}
body:not(.landing-visible) .customer-context-section-head>div{min-width:0}
body:not(.landing-visible) .customer-context-section-head>button{
  min-height:36px;
  padding:7px 10px;
  border:1px solid var(--ui-line-strong);
  border-radius:9px;
  background:#fff;
  color:#25333f;
  box-shadow:none;
  line-height:1.2;
  white-space:normal;
}
body:not(.landing-visible) .customer-context-section-head>button:hover{
  border-color:#9eb2bd;
  background:#f5f8f9;
  color:#14222d;
  text-decoration:none;
}
body:not(.landing-visible) .customer-context-record{
  min-width:0;
  max-width:100%;
  min-height:54px;
  padding:10px 11px;
  overflow:hidden;
  border-color:#dbe4e8;
  background:#fbfdfc;
  color:#203039;
  box-shadow:none;
}
body:not(.landing-visible) .customer-context-record-main,
body:not(.landing-visible) .customer-context-record-main strong,
body:not(.landing-visible) .customer-context-record-main small{
  min-width:0;
  overflow-wrap:anywhere;
}
body:not(.landing-visible) .customer-context-record-meta{
  min-width:0;
  max-width:180px;
  overflow-wrap:anywhere;
  white-space:normal;
}
body:not(.landing-visible) .customer-context-property{
  min-width:0;
  max-width:100%;
  grid-template-columns:minmax(0,1fr) minmax(160px,auto) auto;
  gap:10px;
}
body:not(.landing-visible) .customer-context-property>*{min-width:0}
body:not(.landing-visible) .customer-context-timeline-row{
  min-width:0;
  max-width:100%;
  grid-template-columns:12px minmax(0,1fr) minmax(86px,auto) auto;
}
body:not(.landing-visible) .customer-context-timeline-row>*{min-width:0}
body:not(.landing-visible) .customer-context-timeline-row time{
  overflow-wrap:anywhere;
  white-space:normal;
  text-align:right;
}
body:not(.landing-visible) :where(
  .customer-repeat-business,
  .customer-repeat-grid,
  .customer-repeat-summary,
  .customer-recurring-depth-card,
  .customer-recurring-depth-facts,
  .customer-work-depth-card,
  .customer-work-depth-open,
  .customer-work-depth-history
){min-width:0;max-width:100%}
body:not(.landing-visible) .customer-context-footer{
  position:relative;
  bottom:auto;
  z-index:5;
  margin:0;
  padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--ui-line);
  background:#fff;
}
body:not(.landing-visible) .customer-context-footer button{
  min-height:40px;
  padding:8px 14px;
}

@media(max-width:900px){
  body:not(.landing-visible) .customer-context-modal{
    width:calc(100vw - 24px);
    max-height:calc(100dvh - 24px);
  }
  body:not(.landing-visible) .customer-context-grid-two{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-context-span-two{grid-column:auto}
  body:not(.landing-visible) .customer-context-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  body:not(.landing-visible) .customer-context-money-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.landing-visible) .customer-context-property{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-context-property-metrics{justify-content:flex-start}
  body:not(.landing-visible) .customer-context-property>button{width:100%}
  body:not(.landing-visible) .customer-context-timeline-row{grid-template-columns:12px minmax(0,1fr) auto}
  body:not(.landing-visible) .customer-context-timeline-row>button{grid-column:2/-1;justify-self:start}
}

@media(max-width:720px){
  body:not(.landing-visible) .customer-context-modal{
    width:100%;
    max-width:100%;
    max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - 8px);
    border-radius:17px 17px 8px 8px;
  }
  body:not(.landing-visible) .customer-context-header{padding:15px 14px 12px}
  body:not(.landing-visible) .customer-context-identity{
    grid-template-columns:1fr;
    align-items:stretch;
    padding:11px 14px;
  }
  body:not(.landing-visible) .customer-context-quick-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    justify-content:stretch;
  }
  body:not(.landing-visible) .customer-context-quick-actions button{width:100%}
  body:not(.landing-visible) .customer-context-tabs{
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin:9px 14px 11px;
  }
  body:not(.landing-visible) .customer-context-tab{min-height:40px;font-size:11px}
  body:not(.landing-visible) .customer-context-body{padding:0 14px 14px}
  body:not(.landing-visible) .customer-context-footer{padding:11px 14px calc(11px + env(safe-area-inset-bottom,0px))}
  body:not(.landing-visible) .customer-context-section{padding:12px}
  body:not(.landing-visible) .customer-context-record{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-context-record-meta{max-width:none;text-align:left}
}

@media(max-width:460px){
  body:not(.landing-visible) .customer-context-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.landing-visible) .customer-context-summary,
  body:not(.landing-visible) .customer-context-money-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.landing-visible) .customer-context-section-head{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-context-section-head>button{width:100%}
  body:not(.landing-visible) .customer-context-timeline-row{grid-template-columns:12px minmax(0,1fr)}
  body:not(.landing-visible) .customer-context-timeline-row time{grid-column:2;text-align:left}
  body:not(.landing-visible) .customer-context-timeline-row>button{grid-column:2;width:100%}
}

@media(max-width:360px){
  body:not(.landing-visible) .customer-context-quick-actions{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-context-summary,
  body:not(.landing-visible) .customer-context-money-summary{grid-template-columns:1fr}
}

@media(max-width:650px){
  body:not(.landing-visible) :where(
    .modal-actions,
    .customer-card-actions,
    .estimate-card-actions,
    .invoice-card-actions,
    .material-card-actions,
    .recurring-card-actions,
    .service-call-card-actions,
    .operating-inbox-item-actions,
    .business-history-event-actions,
    .billing-addon-actions,
    .billing-subscription-actions
  )>button{
    min-width:0;
    width:100%;
    white-space:normal;
  }
  body:not(.landing-visible) :where(
    .card-action-popover,
    .customer-more-popover,
    .inline-action-menu>div,
    .page-filter-more-grid,
    .account-menu-actions
  ) button{min-height:44px;padding:10px 12px}
}


/* H40.3 What’s New: client-facing release notes + always-reachable dismissal */
body:not(.landing-visible) .whats-new-modal{
  width:min(620px,calc(100vw - 36px));
  max-height:min(84dvh,780px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
body:not(.landing-visible) .whats-new-modal .details-modal-header{
  position:sticky;
  top:0;
  z-index:3;
  margin:-2px 0 10px;
  padding:2px 0 12px;
  background:#fff;
  border-bottom:1px solid #e1e8ec;
}
body:not(.landing-visible) .whats-new-modal .details-modal-header .compact-button{
  flex:0 0 auto;
}
body:not(.landing-visible) .whats-new-list{gap:10px;}
@media(max-width:820px){
  body:not(.landing-visible) .whats-new-modal{
    width:100%;
    max-height:calc(100dvh - 16px);
  }
}

/* H40.6 — whole-site fit-and-finish + canonical Flexible Work intake. */
body:not(.landing-visible) :where(
  .dashboard-section,
  .page-intro-card,
  .lead-form-card,
  .lead-card,
  .work-card,
  .customer-card,
  .customer-account-card,
  .estimate-card,
  .invoice-card,
  .service-call-card,
  .material-card,
  .recurring-service-card,
  .modal,
  .mobile-action-sheet
){box-sizing:border-box;min-width:0;max-width:100%}

body:not(.landing-visible) :where(
  .primary-action,
  .secondary-button,
  .ghost-button,
  .danger-button,
  .link-button
){min-height:40px;padding:8px 13px;border-radius:9px;line-height:1.25}
body:not(.landing-visible) :where(.primary-action,.modal-actions>button){font-weight:800}
body:not(.landing-visible) .compact-button{min-height:36px;padding:7px 10px}

body:not(.landing-visible) :where(
  .form-grid,
  .field,
  .property-picker-row,
  .page-heading-actions,
  .section-heading,
  .modal-actions
)>*{min-width:0}
body:not(.landing-visible) :where(.field,.property-picker-field) :where(input,select,textarea){box-sizing:border-box;max-width:100%}
body:not(.landing-visible) .field :where(input:not([type="checkbox"]):not([type="radio"]),select){min-height:42px}
body:not(.landing-visible) .field textarea{min-height:88px;resize:vertical}

body:not(.landing-visible) .empty-state{
  box-sizing:border-box;
  width:100%;
  min-height:112px;
  padding:24px clamp(16px,3vw,30px);
  border:1px dashed #cbd8de;
  border-radius:13px;
  background:#f8fafb;
  color:var(--ui-muted);
  line-height:1.5;
}
body:not(.landing-visible) .empty-state strong{color:var(--ui-text);font-size:14px;line-height:1.3}

body:not(.landing-visible) .modal-backdrop{
  box-sizing:border-box;
  padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
}
body:not(.landing-visible) .modal{
  max-height:calc(100dvh - max(36px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
}
body:not(.landing-visible) .details-modal-header{column-gap:16px}
body:not(.landing-visible) .details-modal-header .modal-close,
body:not(.landing-visible) .mobile-sheet-heading .mobile-sheet-close{margin-block-start:2px;margin-inline-start:12px}
body:not(.landing-visible) .modal-actions{
  align-items:center;
  gap:8px;
  margin-top:16px;
  padding-top:13px;
  padding-bottom:max(1px,env(safe-area-inset-bottom));
}

body:not(.landing-visible) .customer-intake-modal{
  display:flex;
  flex-direction:column;
  width:min(920px,calc(100vw - 36px));
  max-height:min(92dvh,920px);
  padding:0 18px 18px;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-padding-block:82px 96px;
}
body:not(.landing-visible) .customer-intake-header{
  position:sticky;
  top:0;
  z-index:8;
  flex:0 0 auto;
  margin:0 -18px 14px;
  padding:18px 22px 14px;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
body:not(.landing-visible) .customer-intake-header .modal-close{margin-inline-start:16px;margin-inline-end:2px}
body:not(.landing-visible) .customer-intake-type-step{gap:12px;min-height:0}
body:not(.landing-visible) .customer-intake-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body:not(.landing-visible) .customer-intake-type-card{min-height:96px;padding:14px}
body:not(.landing-visible) .customer-intake-type-card.is-plan-locked{border-style:dashed;background:#f8fafb}
body:not(.landing-visible) .customer-intake-wizard-progress{flex:0 0 auto;margin-bottom:12px}
body:not(.landing-visible) .customer-intake-form-section{padding:16px}
body:not(.landing-visible) .customer-intake-schedule-choice{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
body:not(.landing-visible) .customer-intake-schedule-choice button{min-height:92px;padding:13px}
body:not(.landing-visible) .customer-intake-schedule-choice button:first-child{border-color:#9bcfc9;background:#f8fcfb}
body:not(.landing-visible) .customer-intake-schedule-choice button:first-child.is-active{border-color:#148f87;background:#e9f8f5}
body:not(.landing-visible) .customer-intake-schedule-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body:not(.landing-visible) .customer-intake-free-note{border:1px solid #c8e3df;background:#eef9f7;color:#355b5b}
body:not(.landing-visible) .customer-intake-footer{
  bottom:0;
  margin:14px -18px -18px!important;
  padding:12px 18px calc(12px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 18px rgba(15,23,42,.045);
}
body:not(.landing-visible) .customer-intake-modal[data-intake-step="type"] .customer-intake-footer{display:none!important}

@media(max-width:820px){
  body:not(.landing-visible) .modal-backdrop{
    padding:max(8px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));
  }
  body:not(.landing-visible) .modal{max-height:calc(100dvh - max(14px,env(safe-area-inset-top) + env(safe-area-inset-bottom)))}
  body:not(.landing-visible) .customer-intake-modal{width:100%;max-height:calc(100dvh - max(14px,env(safe-area-inset-top)));padding:0 14px 14px}
  body:not(.landing-visible) .customer-intake-header{margin:0 -14px 11px;padding:14px 16px 11px}
  body:not(.landing-visible) .customer-intake-header .modal-close{margin-inline-start:12px;margin-inline-end:0}
  body:not(.landing-visible) .customer-intake-type-grid{grid-template-columns:1fr}
  body:not(.landing-visible) .customer-intake-type-card{min-height:82px;padding:12px 13px}
  body:not(.landing-visible) .customer-intake-footer{margin:12px -14px -14px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))}
}

@media(max-width:650px){
  body:not(.landing-visible) :where(.primary-action,.secondary-button,.ghost-button,.danger-button,.link-button){min-height:44px;padding:9px 12px}
  body:not(.landing-visible) .compact-button{min-height:40px}
  body:not(.landing-visible) .field :where(input:not([type="checkbox"]):not([type="radio"]),select){min-height:46px}
  body:not(.landing-visible) .details-modal-header{column-gap:10px}
  body:not(.landing-visible) .details-modal-header .modal-close,
  body:not(.landing-visible) .mobile-sheet-heading .mobile-sheet-close{margin-inline-start:8px}
  body:not(.landing-visible) .modal-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));align-items:stretch}
  body:not(.landing-visible) .modal-actions>button{width:100%;min-width:0;white-space:normal}
  body:not(.landing-visible) .customer-intake-header{padding:12px 14px 10px}
  body:not(.landing-visible) .customer-intake-header h2{max-width:none}
  body:not(.landing-visible) .customer-intake-form-section{padding:13px}
  body:not(.landing-visible) .customer-intake-schedule-choice{grid-template-columns:1fr;gap:8px}
  body:not(.landing-visible) .customer-intake-schedule-choice button{min-height:72px;padding:11px 12px}
  body:not(.landing-visible) .customer-intake-schedule-fields{grid-template-columns:1fr;gap:10px}
  body:not(.landing-visible) .customer-intake-footer{grid-template-columns:auto minmax(0,1fr) minmax(0,1fr)}
}

@media(max-width:390px){
  body:not(.landing-visible) .customer-intake-modal{padding-inline:11px;padding-bottom:11px}
  body:not(.landing-visible) .customer-intake-header{margin-inline:-11px;padding-inline:12px}
  body:not(.landing-visible) .customer-intake-header .modal-close{min-width:64px!important;padding-inline:10px!important}
  body:not(.landing-visible) .customer-intake-type-card{grid-template-columns:38px minmax(0,1fr) auto;gap:9px}
  body:not(.landing-visible) .customer-intake-type-icon{width:38px;height:38px}
  body:not(.landing-visible) .customer-intake-footer{grid-template-columns:1fr 1fr;margin-inline:-11px!important;margin-bottom:-11px!important;padding-inline:11px}
  body:not(.landing-visible) .customer-intake-footer .ghost-button{grid-column:1/-1;grid-row:2}
}
