/* UX-032 approved presentation. No account, workflow or availability rules. */
body.bt-shell:not(.present-mode) .top .top-inner{gap:8px;flex-wrap:nowrap;min-height:64px}
body.bt-shell:not(.present-mode) .top .brand{order:3;margin-left:0;flex:none;min-height:44px}
body.bt-shell:not(.present-mode) .top .bt-menu-toggle,
body.bt-shell:not(.present-mode) .top .bt-top-tools,
body.bt-shell:not(.present-mode) .top .bt-top-profile,
body.bt-shell:not(.present-mode) .top .bt-header-search>summary{min-width:44px;min-height:44px;box-sizing:border-box;flex:none}
body.bt-shell:not(.present-mode) .top .bt-header-search{order:4;flex:none}
body.bt-shell:not(.present-mode) .top .bt-top-links{min-width:0;flex:1;flex-wrap:wrap}
body.bt-shell:not(.present-mode) .top .bt-top-links a{min-height:44px}
body.bt-shell:not(.present-mode) .top .bt-header-search .od-global-search{left:auto;right:0;width:min(380px,calc(100vw - 24px))}
body.od-command-mockup .cc-topbar{padding:8px 12px;min-height:64px;gap:8px}
body.od-command-mockup .cc-topbar .cc-logo{background:transparent;min-width:44px;min-height:44px}
.cc-header-band{max-width:1100px;margin:0 auto;padding:12px 20px;background:#fff}
.cc-header-band .cc-quick-card{border:0;box-shadow:none;padding:0;border-radius:0}
.cc-header-band .cc-section-head{margin:0 0 6px}
body.od-command-mockup .cc-header-band h3{font-size:14px;margin:0 0 8px}
body.od-command-mockup .cc-header-band .cc-tile{background:#c0272d;color:#fff!important;border-color:#c0272d;min-height:60px;padding:10px 8px;flex-direction:row;gap:8px}
.cc-header-band .cc-tile .ic{width:20px;height:20px}
.cc-header-band .cc-tile-grid{gap:8px}
.cc-header-band .cc-tile>span:not(.cc-alert-dot){font-size:12px}
.cc-section-head a{min-height:44px}
.od-command-availability{container-type:inline-size}
body.bt-shell .od-command-availability .od-cc-day-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;overflow:visible;max-width:100%}
body.bt-shell .od-command-availability .od-cc-day-pill{min-width:44px;min-height:44px;padding:6px 2px;box-sizing:border-box;white-space:normal}
@container (max-width:331px){body.bt-shell .od-command-availability .od-cc-day-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}
.od-command-availability [data-capacity-table]{overflow:visible;min-width:0;max-width:100%}
body.bt-shell .od-command-availability .od-capacity-table{table-layout:fixed;width:100%;min-width:0;margin-bottom:12px}
body.bt-shell .od-command-availability .od-capacity-table th,
body.bt-shell .od-command-availability .od-capacity-table td{min-width:0;white-space:normal;overflow-wrap:anywhere;padding:8px 6px}
body.bt-shell .od-command-availability .od-capacity-table th:first-child{width:64px}
.od-command-availability .od-capacity-open,.od-command-availability .od-av-visit-link,
.od-command-availability .od-av-open,.od-command-availability .od-av-close{min-height:44px;min-width:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;white-space:normal;overflow-wrap:anywhere}
.od-command-availability .od-av-visit-link{flex-direction:column;align-items:flex-start;padding:8px;gap:4px}
.od-command-availability .od-av-open{width:100%;padding:8px;border:1px solid #d5dde9;background:#eef2f7;color:#1e3a5f;border-radius:8px;font-weight:700}
.od-command-availability .od-av-panel{border:1px solid #d5dde9;border-radius:12px;padding:12px;margin:12px 0;background:#fff}
.od-av-panel>header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.od-av-panel h3{margin:0;font-size:18px}
.od-av-panel ul{list-style:none;padding:0;margin:8px 0 0}
.od-av-panel li{border-top:1px solid #d5dde9;padding:6px 0}
.od-av-panel li>a{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:44px;padding:8px}
.od-av-panel li>a>span:first-child{min-width:0;overflow-wrap:anywhere}
.od-av-panel li strong,.od-av-panel li small{display:block}
.od-av-panel .od-av-job{display:flex;align-items:center;min-width:44px;min-height:44px;flex:none}
.od-command-dispatch-section .sd-main{display:block}
.od-command-dispatch-section .sd-rail{position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;margin-top:12px}
.od-command-dispatch-section .sd-board-wrap{overflow:visible;min-width:0}
body.bt-shell .od-command-dispatch-section .sd-board{min-width:0;width:100%;grid-template-columns:64px repeat(var(--cols),minmax(0,1fr));margin-bottom:12px}
.od-command-dispatch-section .sd-colh,.od-command-dispatch-section .sd-cell{min-width:0;overflow-wrap:anywhere}
.od-command-dispatch-section .sd-colh{padding:8px 4px;white-space:normal}
.od-command-dispatch-section .sd-colh .sd-av{width:32px;height:32px}
.od-command-dispatch-section .sd-cell{padding:4px}
.od-command-dispatch-section .sd-job{white-space:normal;min-height:44px;padding:8px 6px}
.od-command-dispatch-section .sd-job strong,.od-command-dispatch-section .sd-job small{white-space:normal;overflow-wrap:anywhere}
.od-command-dispatch-section .sd-rowh{padding:8px 4px}
body.bt-shell:not(.present-mode) .bt-guided-stages.bt-ux-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
body.bt-shell:not(.present-mode) .bt-ux-stages .bt-guided-stage{min-width:0;padding:4px;overflow-wrap:anywhere}
body.bt-shell:not(.present-mode) .bt-ux-stages .bt-guided-stage strong{font-size:12px;white-space:normal}
body.bt-shell:not(.present-mode) .bt-ux-stages .bt-stage-circle{width:36px;height:36px;font-size:14px}
@media(max-width:767px){
 body.bt-shell:not(.present-mode) .top .top-inner{padding:8px 12px;gap:4px}
 body.bt-shell:not(.present-mode) .top .bt-menu-toggle>span,
 body.bt-shell:not(.present-mode) .top .bt-top-tools>span,
 body.bt-shell:not(.present-mode) .top .bt-top-profile>span,
 body.bt-shell:not(.present-mode) .top .bt-header-search>summary>span{display:none}
 body.bt-shell:not(.present-mode) .top .brand{margin-left:0}
 .cc-header-band{padding:12px 16px}
 body.od-command-mockup .cc-header-band .cc-tile{flex-direction:column;min-height:64px;gap:4px;padding:8px 4px}
 .cc-header-band .cc-tile>span:not(.cc-alert-dot){font-size:11px}
 body.bt-shell:not(.present-mode) .bt-ux-stages .bt-guided-stage strong{font-size:11px}
}

/* Estimate catalog repair: one scoped layout and a reliable hidden-state boundary.
   Names span the row; complete currency and compact Add targets share the next line. */
body.bt-shell:not(.present-mode) #eb .eb-row{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
 align-items:center;gap:8px 12px!important;padding:12px!important;min-width:0;
}
body.bt-shell:not(.present-mode) #eb .eb-main{grid-column:1/-1;grid-row:auto;min-width:0;min-height:44px;}
body.bt-shell:not(.present-mode) #eb .eb-name{white-space:normal;overflow-wrap:anywhere;font-size:16px!important;line-height:1.35;}
body.bt-shell:not(.present-mode) #eb .eb-price{
 grid-column:1;min-width:max-content;max-width:none;overflow:visible;text-overflow:clip;
 white-space:nowrap;font-size:18px!important;text-align:left;line-height:1.4;
}
body.bt-shell:not(.present-mode) #eb .eb-add{
 grid-column:2;width:auto!important;min-width:90px;min-height:48px;height:auto;margin:0!important;
 padding:10px 14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
body.bt-shell:not(.present-mode) #eb .eb-detail,
body.bt-shell:not(.present-mode) #eb .eb-picked{grid-column:1/-1;min-width:0;overflow-wrap:anywhere;}
body.bt-shell:not(.present-mode) #eb .eb-detail{white-space:normal;}
body.bt-shell:not(.present-mode) #eb #eb-ai-btn,
body.bt-shell:not(.present-mode) #eb #eb-tray-close{min-height:44px;min-width:44px;}
body.bt-shell:not(.present-mode) #eb #eb-tray-close{display:inline-flex;align-items:center;}
body.bt-shell:not(.present-mode):has(#eb) .issue-fab:not(.is-away){
 position:static;inset:auto;display:flex;min-height:44px;width:max-content;max-width:calc(100% - 32px);
 margin:12px 16px calc(110px + env(safe-area-inset-bottom,0px));
}
/* After the visible-state rules, so equal-specificity controls cannot override hidden. */
body.bt-shell:not(.present-mode) #eb [hidden]{display:none!important;}
@media(max-width:480px){.cc-brand-name{display:none}.cc-top-actions{gap:4px}}
@media(max-width:350px){.cc-top-actions{gap:0}body.bt-shell:not(.present-mode) .bt-guided-stages.bt-ux-stages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

body.bt-shell:not(.present-mode) .bt-ux-stages .bt-guided-stage::after{display:none}
body.bt-shell .hm-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.bt-shell .hm-tools .hm-tool{min-height:64px;min-width:0;background:#c0272d;color:#fff;padding:8px 4px;text-align:center;overflow-wrap:anywhere}
body.bt-shell .hm-tools .hm-tool .tool-ic{color:#fff;background:transparent}
body.bt-shell .hm-tools .hm-tool-edit{background:#fff;color:#1e3a5f;border:1px solid #d5dde9}

@media(max-width:767px){
 body.bt-shell.od-command-mockup .cc-search .od-global-search{position:absolute;top:100%;left:12px;right:12px;width:auto;max-width:none}
}
@media(max-width:767px){
 body.bt-shell:not(.present-mode) [data-portal-profile="owner"] .portal-brand-hero{padding:12px}
 body.bt-shell:not(.present-mode) [data-portal-profile="owner"] .portal-brand-hero h1{font-size:24px;margin:6px 0}
 [data-portal-profile="owner"] .portal-brand-hero .bt-eyebrow{margin:6px 0 0}
 [data-portal-profile="owner"] .portal-greeting{font-size:14px;line-height:1.35}
 body.bt-shell:not(.present-mode) [data-portal-profile="owner"] .portal-brand-hero>.portal-create-job{min-height:48px;font-size:17px;padding:10px 12px;margin-top:10px}
 [data-portal-profile="owner"] .portal-shortcuts{margin:8px 0 12px}
 [data-portal-profile="owner"] .portal-period{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:8px 0}
 [data-portal-profile="owner"] .portal-period label{min-width:0;margin:0;font-size:12px}
 [data-portal-profile="owner"] .portal-period select{min-height:44px;margin-top:4px}
 [data-portal-profile="owner"] .portal-period button{min-height:44px;min-width:44px;padding:8px}
 [data-portal-profile="owner"] .portal-metrics{gap:8px}
 [data-portal-profile="owner"] .portal-metrics>a{padding:12px;gap:6px;min-height:88px}
 [data-portal-profile="owner"] .portal-metrics~p{font-size:12px;line-height:1.4;margin:8px 0}
}

.od-command-availability .od-av-open[aria-expanded="true"]{outline:3px solid #c0272d;outline-offset:-3px}

/* GLOBAL-UI-01: one employee header, including standalone iPhone/iPad clearance.
   Last-loaded shell rules replace both prior header variants; customer/present modes isolated. */
html.bt-standalone { --bt-status-clearance:max(env(safe-area-inset-top,0px),32px); }
body.bt-shell:not(.present-mode) .bt-universal-header {
 padding:var(--bt-status-clearance,env(safe-area-inset-top,0px)) 0 0;
 min-height:calc(var(--bt-header-height,64px) + var(--bt-status-clearance,env(safe-area-inset-top,0px)));
 background:#1e3a5f;color:#fff;position:relative;z-index:210;
}
body.bt-shell:not(.present-mode) .bt-universal-header .top-inner {
 padding:8px 12px;min-height:64px;gap:4px;display:flex;flex-wrap:nowrap;
}
body.bt-shell:not(.present-mode) .bt-universal-header :is(.bt-menu-toggle,.bt-top-notifications,.bt-header-search>summary) {
 display:flex;align-items:center;justify-content:center;min-width:44px;width:44px;min-height:44px;height:44px;
 padding:8px;border:0;border-radius:6px;background:transparent;color:#fff;text-decoration:none;flex:none;
}
body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search { order:5;flex:none; }
body.bt-shell:not(.present-mode) .bt-universal-header .bt-menu-toggle>span,
body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search>summary>span {display:none;}
body.bt-shell:not(.present-mode) .bt-universal-header .brand {
 display:flex;align-items:center;gap:6px;order:3;margin-left:0;min-width:0;min-height:44px;flex:0 0 auto;
 color:#fff;text-decoration:none;
}
body.bt-shell:not(.present-mode) .bt-universal-header .brand-logo {display:flex;align-items:center;justify-content:center;flex:none;width:56px;height:56px;background:transparent;padding:0;border:0;}
body.bt-shell:not(.present-mode) .bt-universal-header .brand img {width:56px;height:56px;object-fit:contain;}
body.bt-shell:not(.present-mode) .bt-universal-header .brand-name {display:block;white-space:normal;font-size:16px;line-height:1.15;min-width:0;color:#fff;}
body.bt-shell:not(.present-mode) .bt-universal-header .brand-name em {display:block;color:#fff;font-style:normal;font-size:14px;}
body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search .od-global-search {top:100%;}
body.bt-shell.home-top::before {content:none;}
html.bt-standalone body.bt-shell:not(.present-mode) .sidenav {padding-top:calc(var(--bt-status-clearance) + 12px);}
html.bt-standalone [data-portal-preview-banner] {padding-top:calc(var(--bt-status-clearance) + 10px)!important;}
body.bt-shell .od-command-availability .od-cc-day-strip {touch-action:pan-y;}
body.bt-shell .od-command-availability .od-cc-day-pill--sel {background:#1e3a5f;color:#fff;}
@media(max-width:767px){
 /* Owner fix 2026-10-11: search is a dropdown under the header, not a full-screen takeover. */
 body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search .od-global-search {position:absolute;top:100%;left:12px;right:12px;width:auto;max-width:none;}
}
@media print {body.bt-shell:not(.present-mode) .bt-universal-header {display:none!important;}}

/* Owner mobile-only refinement: lower logo and controls 12px, desktop unchanged. */
@media(max-width:767px){
 body.bt-shell:not(.present-mode) .bt-universal-header{--bt-header-height:76px;}
 body.bt-shell:not(.present-mode) .bt-universal-header .top-inner{min-height:76px;padding-top:20px;}
}

/* Owner hotfix 2026-10-11: search is a dropdown under the header on phones, never a full-screen takeover. */
@media(max-width:600px){
 body.bt-shell:not(.present-mode) .od-global-search.is-open{
  position:absolute!important;inset:auto!important;top:100%!important;left:12px!important;right:12px!important;
  width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;
  padding:0!important;margin:0!important;background:transparent!important;display:block!important;z-index:300!important;
 }
 body.bt-shell:not(.present-mode) .od-global-search.is-open .od-global-search-entry{flex-shrink:0;display:flex!important;}
 body.bt-shell:not(.present-mode) .od-global-search.is-open #od-global-results{
  display:block!important;position:absolute!important;top:calc(100% + 5px)!important;left:0!important;right:0!important;
  max-height:50vh!important;overflow-y:auto!important;
 }
 body.bt-shell:not(.present-mode).od-search-open{overflow:visible!important;}
}

/* Anchor the header search to the header row, not its icon-sized disclosure.
   v3.66.2 merge: this C6 rule is the single owner (Claude's overlapping D1 removed from
   device-pages.css); D1's 560px cap kept so laptops get a dropdown, not a 1,200px bar. */
@media(max-width:1279px){
 body.bt-shell:not(.present-mode) .bt-universal-header .top-inner{position:relative}
 body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search{position:static}
 body.bt-shell:not(.present-mode) .bt-universal-header .bt-header-search .od-global-search{position:absolute;top:100%;left:12px;right:12px;width:auto;max-width:560px;margin:0}
}
