/* Task composition: object → room, estimate → document. */
.project-context{gap:12px;min-width:0}
.project-context>.saved{margin-left:auto;max-width:180px;min-height:44px;font-size:12px}
.project-context-name{border:0;background:none;font:inherit;font-size:13px;text-align:left;overflow-wrap:anywhere;min-width:0;min-height:44px;color:var(--muted)}
.project-head h1,.project-head.project-head-inner h1{font-size:18px;line-height:1.4;margin:0}
.project-head .project-meta{margin:0 0 16px}
.project-head .tab{font-weight:600}
.work-object-info>summary{min-height:52px;cursor:pointer;padding:16px;font-weight:600}
.work-overview-main>.work-next{margin:0}
.space-edit-details{flex:none;width:44px;height:44px;min-width:44px;padding:10px}
.work-space>.space-geometry-disclosure{margin-top:16px}
.estimate-view-options{margin:12px 0;border-block:1px solid var(--line)}
.estimate-view-options>summary{min-height:44px;padding:12px 0;font-size:13px;cursor:pointer}
.estimate-view-options[open]{padding-bottom:12px}
.ux-estimate-line>.estimate-line-tools{grid-column:1/-1}
.estimate-view-options .estimate-type-filter{margin-block:10px}
.live-estimate>.info-note{padding:8px 0;margin:8px 0;font-size:13px}
.live-estimate>.warning{margin:8px 0}
.document-compose{max-width:620px}
.document-compose .flow-status,.document-compose .flow-step>legend{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.document-compose .flow-progress{margin-block:12px 16px}
.document-compose .flow-step{margin:0;padding:0;border:0}
.document-compose .ux-price-choice{margin-block:0 12px}
.document-compose .document-comment textarea{min-height:96px}
.document-scope-preview{display:grid;gap:4px;padding:12px 0;border-top:1px solid var(--line);font-size:14px;overflow-wrap:anywhere}
.document-scope-preview>span{color:var(--muted)}
.document-scope-preview.needs-attention{color:#775321}
.document-compose .dialog-actions{position:sticky;bottom:0;z-index:2;background:var(--surface,#fff);padding-block:12px max(12px,env(safe-area-inset-bottom));margin-bottom:0}
.document-compose input,.document-compose select,.document-compose textarea{font-size:16px}
@media(max-width:700px){
 .project-context.topbar{padding:4px 16px;min-height:52px;border-bottom:0;gap:6px}
 .project-context>.btn{padding:4px 0;font-size:12px;gap:6px;flex:none;min-height:44px}
 .project-context>.saved{font-size:11px;gap:6px;max-width:126px;padding:4px 0;min-height:44px}
 .project-context:has(.project-context-name){position:relative;flex-wrap:wrap;padding-right:66px;height:auto}
 .project-context-name{font-size:12px;flex:1 0 10em;max-width:100%}
 .project-context:has(.project-context-name)>.saved{position:absolute;right:16px;top:4px;margin:0;max-width:44px;width:44px;flex:none;justify-content:center}
 .project-context:has(.project-context-name)>.saved span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .project-head{padding-top:0}
 .project-head,.project-head.project-head-inner{padding:0 16px 10px}
 .project-head h1,.project-head.project-head-inner h1{font-size:16px;line-height:1.4;overflow-wrap:anywhere;margin:0 0 8px}
 .project-head .tabs{margin-top:10px}
 .work-overview .work-next{display:flex;flex-wrap:wrap;gap:6px;padding:12px}
 .work-overview .work-next>div{flex:1;min-width:140px}
 .work-overview .work-next strong{display:none}
 .work-overview .work-next p{margin:0}
 .work-overview .work-next>.btn{max-width:100%;white-space:normal;min-height:44px}
 .work-overview .work-route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .work-overview .work-route{display:flex;flex-wrap:wrap;gap:8px;align-content:start;min-height:100px;padding:12px}
 .work-overview .work-route>span:nth-child(2){flex-basis:100%}
 .work-overview .work-route>.icon:last-child{display:none}
 .work-overview .work-route small{font-size:12px}
 .work-overview .work-route strong{font-size:14px}
 .work-space>.section-head{gap:8px;align-items:center;flex-wrap:nowrap}
 .work-space>.section-head:has(.space-room-heading){display:grid;grid-template-columns:46px minmax(0,1fr) 44px;align-items:center}
 .work-space>.section-head .space-room-heading,.work-space>.section-head .space-room-heading>div{display:contents}
 .work-space>.section-head .space-room-heading h2{grid-column:1/-1;grid-row:1;margin:0}
 .work-space>.section-head .space-gallery-jump{grid-column:1;grid-row:2;min-height:44px;min-width:44px}
 .work-space>.section-head .space-room-heading p{grid-column:2;grid-row:2;margin:0;overflow-wrap:anywhere}
 .work-space>.section-head>.space-edit-details{grid-column:3;grid-row:2}
 .work-space>.section-head>.space-edit-details{font-size:16px;width:44px;height:44px;padding:10px;flex:none}
 .work-space .space-room-heading{min-width:0}
 .work-space .space-room-heading h2{overflow-wrap:anywhere;line-height:1.3}
 .work-space .space-room-heading p{font-size:12px}
 .work-space .space-plan-card{margin-block:8px;min-height:52px}
 .work-space .space-plan-card>span{min-width:0;overflow-wrap:anywhere}
 .space-records>.section-head>.ux-inline-actions{min-width:0;max-width:100%}
 .space-records .ux-inline-actions>.btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .app-mobile .nav-item{height:auto;min-height:52px}
 .app-mobile .nav-text{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}
 .work-space-tools{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px;margin:10px 0}
 .work-space-tools>.btn{max-width:none;white-space:normal;overflow-wrap:anywhere;min-height:44px;font-size:13px;padding:8px;gap:6px}
 .work-space .work-surfaces-head{margin-top:12px}
 .work-space .work-surface-card{grid-template-columns:minmax(0,1fr) 64px}
 .work-space .work-surface-row{padding:8px;gap:8px;min-height:84px}
 .work-space .work-surface-row>.surface-preview{width:32px;flex-basis:32px;height:44px}
 .work-space .work-surface-row>.wall-locator{width:32px;height:38px}
 .work-space .work-surface-copy strong{font-size:14px;line-height:1.35}
 .work-space .work-surface-shortcuts{padding:0;gap:0}
 .work-space .work-surface-shortcuts>.btn{font-size:12px;padding:4px;gap:3px;min-height:44px;width:100%}
 .work-space .work-surface-shortcuts>.btn>.icon{display:none}
 .work-surface-menu{min-width:0;width:100%}
 .work-surface-menu>summary{justify-content:center;padding:4px;min-height:44px}
 .work-surface-menu>div{position:absolute;right:0;min-width:170px;padding:6px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #20282922;z-index:3}
 .work-surface-menu{position:relative}
 .live-estimate>.section-head{align-items:center;flex-wrap:nowrap;gap:12px;margin-bottom:8px}
 .live-estimate>.section-head h2{font-size:18px;line-height:1.3}
 .live-estimate>.section-head p{font-size:12px;margin:4px 0 0}
 .live-estimate>.section-head>.btn{min-height:44px;font-size:13px;white-space:normal;padding:8px 12px;max-width:150px}
 .live-estimate .live-estimate-channels{margin:8px 0;gap:6px}
 .live-estimate .live-estimate-channels>.btn{min-height:44px;padding:8px 16px}
 .live-estimate .live-estimate-total{margin:10px 0;padding:0;gap:4px;min-height:0}
 .live-estimate .live-estimate-total>strong{font-size:26px;line-height:1.3;overflow-wrap:anywhere}
 .live-estimate .live-estimate-total>small{font-size:12px}
 .live-estimate>.warning{padding:0}
 .live-estimate>.warning>summary{min-height:44px;padding:12px}
 .live-estimate>.warning>p{padding-inline:12px}
 .live-estimate .ux-estimate-line{padding:12px 0;gap:8px;grid-template-columns:minmax(0,1fr) auto}
 .live-estimate .ux-estimate-line>div{grid-column:1/-1}
 .live-estimate .estimate-line-amount{justify-self:end;overflow-wrap:anywhere}
 .live-estimate .estimate-quantity{font-size:14px}
 .live-estimate .ux-estimate-line>div>strong{font-size:15px;line-height:1.4}
 .live-estimate .estimate-view-options{margin:8px 0}
 .document-compose{width:100%;max-width:none;max-height:100dvh;border-radius:16px 16px 0 0;padding:18px 16px 0;margin:auto 0 0}
 .document-compose .dialog-back{display:none}
 .document-compose #dialog-title{font-size:22px;margin:8px 44px 0 0}
 .document-compose .dialog-close{top:10px;right:10px}
 .document-compose .flow-progress{gap:8px;margin-block:16px}
 .document-compose .flow-progress button{min-height:44px}
 .document-compose .dialog-actions .btn{min-height:48px;font-size:14px;white-space:normal;padding:8px 10px}
 .document-compose .dialog-actions{gap:6px}
 .document-compose .form-section{margin-block:12px}
 .document-compose .form-section>summary{min-height:44px}
 .document-compose .ux-price-choice>label{min-height:44px;font-size:16px}
}

/* Team cards keep their full text above the actions on a phone. */
.employee-row-actions{display:contents}
.employee-row:has(>.employee-row-actions){flex-wrap:wrap}
@media(max-width:600px){
 .employee-directory-actions{gap:6px}
 .employee-directory-actions>.primary{flex:1 1 100%}
 .employee-directory-actions>.btn:not(.primary){flex:1 1 0;min-width:max-content;padding-inline:10px}
 .employee-row:has(>.employee-row-actions){display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px;align-items:start}
 .employee-row:has(>.employee-row-actions)>.avatar{width:36px;height:36px;min-width:0}
 .employee-row:has(>.employee-row-actions)>div:nth-child(2){min-width:0;overflow-wrap:anywhere}
 .employee-row>.employee-row-actions{display:flex;grid-column:1/-1;flex-wrap:wrap;gap:6px;justify-content:flex-end}
 .employee-row-actions>.btn{min-height:44px;flex:1 1 auto;min-width:max-content;padding-inline:8px}
}

/* A selling-rate edit belongs to its estimate row, including small phones. */
.live-estimate .estimate-price-trigger{grid-column:1/-1;justify-self:start;display:flex;flex-wrap:wrap;gap:8px;padding:6px 8px;min-height:44px;text-align:left}
.estimate-price-trigger>span{font-size:12px;color:var(--muted,#59655c)}
.live-estimate .estimate-price-editor{grid-column:1/-1;min-width:0;padding:12px;background:#f1f4e8;border-radius:12px}
.estimate-price-editor .btn{white-space:normal}.estimate-price-editor>.btn{margin-top:8px;text-align:left;justify-content:flex-start}
.estimate-price-form{display:grid;gap:8px}.estimate-price-form>p{margin:0}.estimate-price-form input{width:100%;min-width:0;min-height:44px}.estimate-price-form .ux-inline-actions{flex-wrap:wrap}
.estimate-price-form .field{margin:0}.estimate-price-form{max-width:620px}.live-estimate .ux-estimate-line:has(.estimate-price-editor){row-gap:6px}.estimate-price-form [role=alert]:empty,.estimate-price-form [data-price-draft]:empty{display:none}

/* Shared estimate views and the scoped row price editor. */
.estimate-price-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.estimate-price-fields .input-wrap{min-width:0}.estimate-price-choices>summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.estimate-price-choices .btn{margin-top:6px;text-align:left;justify-content:flex-start}.estimate-view-switch{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.estimate-view-switch .btn{white-space:normal}.estimate-profitability{grid-column:1/-1;min-width:0}.estimate-profitability dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px;margin:10px 0}.estimate-profitability dl>div{min-width:0}.estimate-profitability dt{font-size:12px;color:var(--muted,#59655c)}.estimate-profitability dd{margin:3px 0 0;font-weight:600;overflow-wrap:anywhere}.estimate-profitability-summary{padding:16px 0;border-bottom:1px solid var(--line,#dce0d6);margin-bottom:12px}.estimate-profitability-summary h3{margin:0}.estimate-profitability-summary p{margin:6px 0}.live-estimate-total[hidden]{display:none}.estimate-line-values>small{display:block}
@media(max-width:420px){.estimate-price-fields{grid-template-columns:1fr;gap:8px}.estimate-profitability dl{grid-template-columns:repeat(2,minmax(0,1fr))}.estimate-view-switch{gap:6px}.estimate-view-switch .btn{flex:1 1 auto;padding-inline:10px}}

.estimate-view-switch .btn[aria-pressed="true"]{background:var(--ink,#272920);color:var(--surface,#fff);border-color:var(--ink,#272920)}
