/* BB Perfect Proposal Manager v3.7.0 — Final UX Consolidation
 * Presentation-only final layer. Keeps application/data/security logic intact.
 */
:root{
  --bb370-page-gap:20px;
  --bb370-card-pad:18px;
  --bb370-control-h:44px;
  --bb370-mobile-header:64px;
  --bb370-mobile-nav:70px;
  --bb370-sticky-action:72px;
  --bb370-focus:0 0 0 3px color-mix(in srgb,var(--bb-primary) 22%,transparent);
}

/* --------------------------------------------------------------------------
   1. GLOBAL APPLICATION LANGUAGE
   -------------------------------------------------------------------------- */
body.bbppm-v370{font-size:14px;line-height:1.5;text-rendering:optimizeLegibility}
body.bbppm-v370 h1{font-size:30px;line-height:1.15;font-weight:760;letter-spacing:-.028em}
body.bbppm-v370 h2{font-size:20px;line-height:1.25;font-weight:730;letter-spacing:-.018em}
body.bbppm-v370 h3{font-size:16px;line-height:1.35;font-weight:700}
body.bbppm-v370 :is(p,li,td,label,input,select,textarea,button){font-size:14px}
body.bbppm-v370 :is(.description,.howto,small){font-size:12.5px;line-height:1.45}
body.bbppm-v370 a{transition:color .14s ease,background-color .14s ease,border-color .14s ease,box-shadow .14s ease}
body.bbppm-v370 :is(button,a,input,select,textarea):focus-visible{outline:none;box-shadow:var(--bb370-focus)}
body.bbppm-v370 .screen-reader-text:focus{z-index:100000}

/* Keep the top-level shell visually identical on custom and WP-backed screens. */
body.bbppm-v370 .bbppm-global-topbar{height:60px;min-height:60px;padding:8px 18px}
body.bbppm-v370 .bbppm-top-search{height:42px;border-radius:11px}
body.bbppm-v370 .bbppm-app-icon-button,
body.bbppm-v370 .bbppm-topbar-menu>summary{min-width:42px;height:42px;border-radius:11px}
body.bbppm-v370 .bbppm-app-sidebar{box-shadow:8px 0 30px rgba(8,15,35,.08)}
body.bbppm-v370 .bbppm-workspace-nav a{min-height:40px;border-radius:10px;margin:2px 10px;padding:8px 10px}
body.bbppm-v370 .bbppm-nav-label{padding:13px 18px 5px;letter-spacing:.07em;font-size:10px}

/* Desktop does not need a hamburger when the persistent sidebar is present. */
@media(min-width:1181px){
  body.bbppm-v370 .bbppm-sidebar-toggle{display:none}
  body.bbppm-v370 .bbppm-topbar-left{padding-left:2px}
}

/* --------------------------------------------------------------------------
   2. NATIVE WORDPRESS-BACKED SCREENS -> BB PERFECT WORKSPACES
   -------------------------------------------------------------------------- */
body.bbppm-native-shell.bbppm-v370 #wpcontent{padding-top:82px}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-workspace{display:grid;gap:16px}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-page-head{margin:0;padding:0 0 2px;align-items:center}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-page-title{display:grid;gap:4px}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-page-title .wp-heading-inline{font-size:30px;line-height:1.12}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-context{font-size:12.5px;line-height:1.35;color:var(--bb-muted)}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-page-actions{align-self:center}
body.bbppm-native-shell.bbppm-v370 .bbppm-native-page-actions :is(.button,.page-title-action){min-height:42px}
body.bbppm-native-shell.bbppm-v370 .wp-header-end{display:none}
body.bbppm-native-shell.bbppm-v370 .bbppm-v370-notices{display:grid;gap:8px;margin:-2px 0 2px}
body.bbppm-native-shell.bbppm-v370 .bbppm-v370-notices:empty{display:none}
body.bbppm-native-shell.bbppm-v370 .bbppm-v370-notices .notice{margin:0;border:1px solid var(--bb-border);border-left-width:4px;border-radius:10px;background:var(--bb-surface);box-shadow:none;padding:3px 12px}

/* Toolbar / filters */
body.bbppm-v370 .bbppm-v370-view-tabs{margin:0;gap:7px}
body.bbppm-v370 .bbppm-v370-view-tabs li{float:none}
body.bbppm-v370 .bbppm-v370-view-tabs a{min-height:36px;align-items:center;padding:7px 11px;border-radius:9px;font-size:12.5px}
body.bbppm-v370 .bbppm-v370-filterbar{min-height:50px;padding:8px;margin:0;border:1px solid var(--bb-border);border-radius:12px;background:var(--bb-surface);box-shadow:var(--bb-shadow-xs)}
body.bbppm-v370 .bbppm-v370-filterbar .actions{display:flex;gap:7px;align-items:center;padding:0}
body.bbppm-v370 .bbppm-v370-filterbar select{max-width:220px}
body.bbppm-v370 .bbppm-v370-searchbox{display:flex;gap:7px;align-items:center}
body.bbppm-v370 .bbppm-v370-searchbox input[type=search]{min-height:40px}
body.bbppm-v370 .tablenav-pages{display:flex;align-items:center;gap:5px;color:var(--bb-muted)}
body.bbppm-v370 .tablenav-pages .button{min-width:38px;padding:7px}

/* Tables */
body.bbppm-v370 .bbppm-v370-table-surface{border-radius:14px;box-shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.035)}
body.bbppm-v370 .bbppm-v370-data-table{table-layout:auto}
body.bbppm-v370 .bbppm-v370-data-table thead th{height:44px;white-space:nowrap}
body.bbppm-v370 .bbppm-v370-data-table tbody td{height:56px}
body.bbppm-v370 .bbppm-v370-data-row td:first-of-type{font-weight:600}
body.bbppm-v370 .bbppm-v370-data-row .column-title strong a{font-size:14px;font-weight:730;color:var(--bb-heading)}
body.bbppm-v370 .bbppm-v370-data-row .row-actions{padding-top:5px;font-size:11.5px;opacity:.78}
body.bbppm-v370 .bbppm-v370-data-row:hover .row-actions{opacity:1}
body.bbppm-v370 .bbppm-v370-data-row .row-actions .trash a,
body.bbppm-v370 .bbppm-v370-danger-action{color:var(--bb-danger)}
body.bbppm-v370 .check-column{width:42px;text-align:center}

/* WordPress editor becomes a clear record workspace. */
body.bbppm-v370 .bbppm-v370-record-workspace{margin-top:0}
body.bbppm-v370 #post-body.columns-2{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:18px;margin:0}
body.bbppm-v370 #postbox-container-1,
body.bbppm-v370 #postbox-container-2{float:none;width:auto;margin:0}
body.bbppm-v370 #postbox-container-2{grid-column:1}
body.bbppm-v370 #postbox-container-1{grid-column:2;grid-row:1}
body.bbppm-v370 .bbppm-v370-record-main{margin-bottom:14px}
body.bbppm-v370 .bbppm-v370-record-title{padding:16px;border:1px solid var(--bb-border);border-radius:var(--bb-radius);background:var(--bb-surface);box-shadow:var(--bb-shadow-xs);margin-bottom:14px}
body.bbppm-v370 .bbppm-v370-record-title #title{border:0;background:transparent;box-shadow:none;padding:4px 2px;font-size:24px;height:46px}
body.bbppm-v370 .bbppm-v370-record-title #title:focus{box-shadow:none}
body.bbppm-v370 .bbppm-v370-section-card{margin:0 0 14px;border-radius:14px}
body.bbppm-v370 .bbppm-v370-section-card .postbox-header{min-height:50px}
body.bbppm-v370 .bbppm-v370-section-card .hndle{display:flex;align-items:center;gap:9px;font-size:14px}
body.bbppm-v370 .bbppm-v370-section-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--bb-primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--bb-primary) 10%,transparent)}
body.bbppm-v370 .bbppm-v370-section-card .inside{padding:16px}
body.bbppm-v370 .bbppm-v370-publish-card{position:sticky;top:76px}
body.bbppm-v370 .bbppm-v370-publish-card #major-publishing-actions{display:grid;grid-template-columns:1fr;gap:8px}
body.bbppm-v370 .bbppm-v370-publish-card #publishing-action{float:none;text-align:stretch;width:100%}
body.bbppm-v370 .bbppm-v370-publish-card #publish{width:100%;min-height:44px}
body.bbppm-v370 .misc-pub-section{padding:9px 0;border-bottom:1px solid color-mix(in srgb,var(--bb-border) 70%,transparent)}
body.bbppm-v370 .misc-pub-section:last-child{border-bottom:0}

/* Form tables are never allowed to look like raw WP settings. */
body.bbppm-v370 .bbppm-v370-form-table{border-collapse:separate;border-spacing:0 8px}
body.bbppm-v370 .bbppm-v370-form-table th{width:220px;padding:12px 16px 12px 0;font-weight:680;color:var(--bb-heading);vertical-align:top}
body.bbppm-v370 .bbppm-v370-form-table td{padding:6px 0}
body.bbppm-v370 .bbppm-v370-form-table td>p.description{max-width:720px;margin-top:6px}
body.bbppm-v370 :is(input[type=text],input[type=email],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=time],input[type=search],select,textarea){max-width:100%}
body.bbppm-v370 select{padding-right:34px}
body.bbppm-v370 textarea{line-height:1.5;resize:vertical}
body.bbppm-v370 fieldset{border:0;margin:0;padding:0}

/* --------------------------------------------------------------------------
   3. DARK/LIGHT THEME CONSISTENCY ACROSS CUSTOM + NATIVE SCREENS
   -------------------------------------------------------------------------- */
body[data-bbppm-theme="dark"].bbppm-v370{
  --bb-app-bg:#071B17;
  --bb-surface:#0B241E;
  --bb-surface-soft:#0E2A23;
  --bb-heading:#F5FAF8;
  --bb-body:#D5E3DE;
  --bb-muted:#8FA9A0;
  --bb-border:#204039;
  --bb370-field:#0A211C;
  --bb370-hover:#102F27;
}
body[data-bbppm-theme="light"].bbppm-v370{--bb370-field:#fff;--bb370-hover:#FAFBFD}
body[data-bbppm-theme="dark"].bbppm-v370,
body[data-bbppm-theme="dark"].bbppm-v370 #wpcontent,
body[data-bbppm-theme="dark"].bbppm-v370 #wpbody-content{background:var(--bb-app-bg);color:var(--bb-body)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(.wrap,p,td,th,label){color:var(--bb-body)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(h1,h2,h3,h4,.wp-heading-inline,.column-title strong a){color:var(--bb-heading)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(.postbox,.card,.bbppm-layout-card,.bbppm-control-card,.bbppm-v370-filterbar,.bbppm-v370-record-title,.bbppm-v370-notices .notice){background:var(--bb-surface);border-color:var(--bb-border);color:var(--bb-body)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(.postbox .postbox-header,#major-publishing-actions,.bbppm-native-table-scroll,.subsubsub a){background:var(--bb-surface-soft);border-color:var(--bb-border)}
body[data-bbppm-theme="dark"].bbppm-v370 table.wp-list-table thead th,
body[data-bbppm-theme="dark"].bbppm-v370 table.widefat thead th{background:var(--bb-surface-soft);border-color:var(--bb-border);color:var(--bb-muted)}
body[data-bbppm-theme="dark"].bbppm-v370 table.wp-list-table tbody td,
body[data-bbppm-theme="dark"].bbppm-v370 table.widefat tbody td{border-color:var(--bb-border);color:var(--bb-body)}
body[data-bbppm-theme="dark"].bbppm-v370 table.wp-list-table tbody tr:hover td{background:var(--bb370-hover)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(input[type=text],input[type=email],input[type=tel],input[type=url],input[type=number],input[type=date],input[type=time],input[type=search],select,textarea){background:var(--bb370-field);border-color:#315149;color:var(--bb-heading)}
body[data-bbppm-theme="dark"].bbppm-v370 :is(input,textarea)::placeholder{color:#78958B}
body[data-bbppm-theme="dark"].bbppm-v370 .button:not(.button-primary):not(.page-title-action){background:var(--bb-surface-soft);border-color:var(--bb-border);color:var(--bb-heading)}
body[data-bbppm-theme="dark"].bbppm-v370 .subsubsub a.current{background:color-mix(in srgb,var(--bb-primary) 19%,var(--bb-surface));border-color:color-mix(in srgb,var(--bb-primary) 45%,var(--bb-border));color:#C7CAFF}
body[data-bbppm-theme="dark"].bbppm-v370 .bbppm-native-context,
body[data-bbppm-theme="dark"].bbppm-v370 :is(.description,.howto,small,.row-actions){color:var(--bb-muted)}

/* --------------------------------------------------------------------------
   4. SCREEN-SPECIFIC CONSOLIDATION
   -------------------------------------------------------------------------- */
/* Dashboard / priorities */
body.bbppm-v370-screen-dashboard .bbppm-priority-grid,
body.bbppm-v370-screen-dashboard .bbppm-overview-grid{gap:12px}
body.bbppm-v370-screen-dashboard .bbppm-priority-card,
body.bbppm-v370-screen-dashboard [class*="bbppm-kpi"]{min-width:0}
body.bbppm-v370-screen-dashboard .bbppm-priority-title h2{color:var(--bb-heading)}

/* Jobs + recurring + quote native lists */
body.bbppm-v370-screen-jobs .column-title,
body.bbppm-v370-screen-recurring .column-title,
body.bbppm-v370-screen-quotes .column-title{min-width:230px}
body.bbppm-v370-screen-jobs .bbppm-v370-data-row,
body.bbppm-v370-screen-recurring .bbppm-v370-data-row,
body.bbppm-v370-screen-quotes .bbppm-v370-data-row{--bb370-row-accent:var(--bb-primary)}

/* Schedule / dispatch / today */
body.bbppm-v370-screen-schedule :is(.bbppm-schedule-card,.bbppm-day-card,.bbppm-job-card),
body.bbppm-v370-screen-dispatch :is(.bbppm-dispatch-card,.bbppm-job-card),
body.bbppm-v370-screen-today :is(.bbppm-today-card,.bbppm-job-card){border-radius:var(--bb-radius);border-color:var(--bb-border);box-shadow:var(--bb-shadow-xs)}

/* Customers / Team cards */
body.bbppm-v370-screen-clients :is(.bbppm-customer-card,.bbppm-customer-summary),
body.bbppm-v370-screen-team :is(.bbppm-team-card,.bbppm-cleaner-card){border-radius:var(--bb-radius);box-shadow:var(--bb-shadow-xs)}

/* Finance */
body.bbppm-v370-screen-invoices :is(.bbppm-money-card,.bbppm-invoice-card,.bbppm-finance-card),
body.bbppm-v370-screen-payments :is(.bbppm-money-card,.bbppm-payment-card,.bbppm-finance-card),
body.bbppm-v370-screen-profitability :is(.bbppm-profit-card,.bbppm-finance-card){border-radius:var(--bb-radius);border-color:var(--bb-border)}
body.bbppm-v370-screen-invoices .bbppm-money-actions,
body.bbppm-v370-screen-payments .bbppm-money-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Access / organization / control screens */
body.bbppm-v370-screen-access :is(.bbppm-access-card,.bbppm-capability-card),
body.bbppm-v370-screen-organization :is(.bbppm-org-card,.bbppm-org-node),
body.bbppm-v370-screen-control .bbppm-control-card,
body.bbppm-v370-screen-interface .bbppm-builder-card{border-radius:var(--bb-radius)}

/* --------------------------------------------------------------------------
   5. JOB MESSAGING — FINAL COMPOSER / THREAD GEOMETRY
   -------------------------------------------------------------------------- */
.bbppm-v370-message-center{border-radius:var(--bb-radius);isolation:isolate}
.bbppm-v370-message-center .bbppm-message-center-head{padding:15px 16px}
.bbppm-v370-message-center .bbppm-v3-thread{min-height:86px;max-height:360px;padding:14px 16px;overscroll-behavior:contain}
.bbppm-v370-message-center .bbppm-v3-message-form{padding:14px 16px 15px;gap:12px}
.bbppm-v370-message-center .bbppm-message-compose textarea{min-height:92px;width:100%}
.bbppm-v370-message-center .bbppm-message-form-actions{grid-template-columns:minmax(180px,280px) minmax(140px,180px);justify-content:end}
.bbppm-v370-message-center .bbppm-message-send{width:100%}
body.bbppm-cleaner-app-page .bbppm-v370-message-center{margin-bottom:14px}
body.bbppm-cleaner-app-page .bbppm-v370-message-center .bbppm-message-form-actions{grid-template-columns:minmax(0,1fr) minmax(130px,170px)}

/* --------------------------------------------------------------------------
   6. ONE MOBILE SHELL: ADMIN + CLEANER + CUSTOMER
   -------------------------------------------------------------------------- */
@media(max-width:782px){
  :root{--bb-mobile-header-h:var(--bb370-mobile-header);--bb-mobile-nav-h:var(--bb370-mobile-nav)}
  body.bbppm-v370 h1{font-size:25px}
  body.bbppm-v370 h2{font-size:18px}

  /* Admin app */
  body.bbppm-native-shell.bbppm-v370 #wpcontent{margin:0;padding:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px) + 14px) 12px calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px) + 22px)}
  body.bbppm-v370 .bbppm-global-topbar{height:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px));min-height:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 10px 0;position:fixed;top:0;left:0;right:0;margin:0;border-radius:0}
  body.bbppm-v370 .bbppm-global-topbar .bbppm-topbar-left{min-width:0;flex:1}
  body.bbppm-v370 .bbppm-global-topbar .bbppm-top-search{min-width:0;width:100%;height:42px}
  body.bbppm-v370 .bbppm-global-topbar .bbppm-top-search kbd{display:none}
  body.bbppm-v370 .bbppm-topbar-actions{flex:0 0 auto}
  body.bbppm-v370 .bbppm-quick-menu,body.bbppm-v370 .bbppm-language-menu{display:none}
  body.bbppm-v370 .bbppm-mobile-nav{height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));min-height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));padding:5px 6px env(safe-area-inset-bottom,0px);grid-template-columns:repeat(5,minmax(0,1fr))}
  body.bbppm-v370 .bbppm-mobile-nav a{min-height:58px;border-radius:12px;gap:3px}
  body.bbppm-v370 .bbppm-mobile-nav a small{font-size:9px;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  body.bbppm-v370 .bbppm-mobile-nav a .dashicons{font-size:21px;width:21px;height:21px}

  /* Native page geometry */
  body.bbppm-v370 .bbppm-native-page-head{display:grid;grid-template-columns:1fr;gap:10px}
  body.bbppm-v370 .bbppm-native-page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  body.bbppm-v370 .bbppm-native-page-actions :is(.button,.page-title-action){width:100%;min-width:0;white-space:normal;text-align:center}
  body.bbppm-v370 .bbppm-v370-filterbar{display:grid;grid-template-columns:1fr;align-items:stretch;padding:8px}
  body.bbppm-v370 .bbppm-v370-filterbar .actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  body.bbppm-v370 .bbppm-v370-filterbar .actions select{width:100%;max-width:none}
  body.bbppm-v370 .bbppm-v370-searchbox{width:100%}
  body.bbppm-v370 .bbppm-v370-searchbox input[type=search]{width:100%;min-width:0}

  /* Record screen becomes single-column; action card is normal-flow on mobile. */
  body.bbppm-v370 #post-body.columns-2{display:block;margin:0}
  body.bbppm-v370 #postbox-container-1,body.bbppm-v370 #postbox-container-2{width:100%;margin:0}
  body.bbppm-v370 .bbppm-v370-publish-card{position:static}
  body.bbppm-v370 .bbppm-v370-record-title{padding:13px}
  body.bbppm-v370 .bbppm-v370-record-title #title{font-size:21px}
  body.bbppm-v370 .bbppm-v370-form-table,body.bbppm-v370 .bbppm-v370-form-table tbody,body.bbppm-v370 .bbppm-v370-form-table tr,body.bbppm-v370 .bbppm-v370-form-table th,body.bbppm-v370 .bbppm-v370-form-table td{display:block;width:100%}
  body.bbppm-v370 .bbppm-v370-form-table th{padding:8px 0 4px}
  body.bbppm-v370 .bbppm-v370-form-table td{padding:0 0 10px}

  /* WP list tables -> cards, but keep primary row information easy to scan. */
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table tr{border-radius:13px;margin:10px 0;box-shadow:0 1px 2px rgba(16,24,40,.05)}
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table td{padding:11px 12px 11px 40%;min-height:44px;overflow-wrap:anywhere}
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table td:before{width:34%;top:12px;font-size:9.5px}
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table td.column-title{padding-left:12px}
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table td.column-title:before{display:none}
  body.bbppm-v370 table.wp-list-table.bbppm-mobile-card-table .row-actions{display:flex;gap:7px;flex-wrap:wrap;padding-top:7px}

  /* Messaging */
  .bbppm-v370-message-center .bbppm-message-form-actions,
  body.bbppm-cleaner-app-page .bbppm-v370-message-center .bbppm-message-form-actions{grid-template-columns:1fr}
  .bbppm-v370-message-center .bbppm-message-send{min-height:46px}
  .bbppm-v370-message-center .bbppm-v3-thread{max-height:320px}

  /* Cleaner app: same 64 / 70 geometry; Clock action sits ABOVE the nav. */
  body.bbppm-cleaner-app-page .bbppm-cleaner-appbar{left:0;right:0;transform:none;width:100%;height:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px));min-height:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 14px 0;border-radius:0}
  body.bbppm-cleaner-app-page .bbppm-cleaner-app-main{padding-top:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px) + 12px);padding-bottom:calc(var(--bb370-mobile-nav) + var(--bb370-sticky-action) + env(safe-area-inset-bottom,0px) + 26px)}
  body.bbppm-cleaner-app-page .bbppm-cleaner-bottom-nav{left:0;right:0;transform:none;width:100%;height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));min-height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));padding:5px 5px env(safe-area-inset-bottom,0px)}
  body.bbppm-cleaner-app-page .bbppm-cleaner-bottom-nav a{min-height:58px;border-radius:12px}
  body.bbppm-cleaner-app-page .bbppm-sticky-action{bottom:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));left:0;right:0;min-height:var(--bb370-sticky-action);padding:9px 12px;background:color-mix(in srgb,var(--bb-surface) 95%,transparent);backdrop-filter:blur(16px);z-index:195}
  body.bbppm-cleaner-app-page .bbppm-sticky-action .primary{min-height:52px;border-radius:12px}
  html.bbppm-has-sticky-job-action body.bbppm-cleaner-app-page .bbppm-message-center{margin-bottom:0}

  /* Customer portal matches same chrome dimensions. */
  .bbppm-customer-app{padding:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px) + 14px) 12px calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px) + 22px)}
  .bbppm-portal-appbar{height:calc(var(--bb370-mobile-header) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 14px 0}
  .bbppm-portal-bottom-nav{height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));min-height:calc(var(--bb370-mobile-nav) + env(safe-area-inset-bottom,0px));padding:5px 5px env(safe-area-inset-bottom,0px)}
  .bbppm-portal-bottom-nav a{min-height:58px;border-radius:12px}
}

@media(max-width:520px){
  :root{--bb370-card-pad:14px}
  body.bbppm-v370 .bbppm-native-page-actions{grid-template-columns:1fr}
  body.bbppm-v370 .bbppm-v370-filterbar .actions{grid-template-columns:1fr}
  body.bbppm-v370 .bbppm-v370-view-tabs{overflow:auto;flex-wrap:nowrap;scrollbar-width:none}
  body.bbppm-v370 .bbppm-v370-view-tabs::-webkit-scrollbar{display:none}
  body.bbppm-v370 .bbppm-v370-view-tabs a{white-space:nowrap}
  body.bbppm-cleaner-app-page .bbppm-job-section,
  .bbppm-customer-app .bbppm-portal-card{padding:14px}
  .bbppm-v370-message-center .bbppm-message-center-head{padding:12px 13px}
  .bbppm-v370-message-center .bbppm-v3-thread{padding:11px 12px}
  .bbppm-v370-message-center .bbppm-v3-message-form{padding:12px}
  .bbppm-thread-message{max-width:96%}
}

/* Large desktop: cleaner content width, no stretched forms/tables. */
@media(min-width:1440px){
  body.bbppm-native-shell.bbppm-v370 #wpcontent{padding-left:30px;padding-right:30px}
  body.bbppm-v370 .bbppm-native-workspace{padding-bottom:28px}
}

/* Print: no application chrome. */
@media print{
  .bbppm-global-topbar,.bbppm-app-sidebar,.bbppm-mobile-nav,.bbppm-cleaner-appbar,.bbppm-cleaner-bottom-nav,.bbppm-sticky-action,.bbppm-assistant-fab{display:none}
  body.bbppm-native-shell #wpcontent{margin:0;padding:0}
}

/* Accessibility preferences */
@media(prefers-contrast:more){
  body.bbppm-v370{--bb-border:currentColor}
  body.bbppm-v370 :is(.button,input,select,textarea,.postbox,.card){border-width:2px}
}
@media(prefers-reduced-motion:reduce){
  body.bbppm-v370 *,body.bbppm-cleaner-app-page *, .bbppm-customer-app *{transition:none;animation:none;scroll-behavior:auto}
}
