.operations-module{min-width:0}.operations-module .customer-toolbar>.os-field{flex:1;min-width:0}.operations-module .customer-filter{align-items:end}.operations-module .customer-filter>.os-field{min-width:140px}.operations-list{display:grid;gap:8px}.operations-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-field)}.operations-copy{display:grid;gap:4px;min-width:0}.operations-copy strong{font-size:14px;overflow-wrap:anywhere}.operations-copy small,.operations-copy span{font-size:12px;color:var(--text-secondary);overflow-wrap:anywhere}.operations-actions{display:flex;flex-wrap:wrap;gap:6px}.operations-actions button{min-height:44px;width:auto;margin:0;padding:8px 12px;font-size:12px;border-radius:10px}.operations-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}.operations-summary:empty{display:none}.operations-summary>div{display:grid;gap:5px;padding:12px;background:var(--surface-field);border:1px solid var(--line);border-radius:12px}.operations-summary small{font-size:11px;color:var(--text-secondary)}.operations-summary strong{font-size:18px;overflow-wrap:anywhere}.operations-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}.operations-fields>.full{grid-column:1/-1}.operations-fields>label:has(textarea){grid-column:1/-1}.operations-group{display:grid;gap:6px}.operations-group h3{font-size:14px;margin:0}.operations-permission{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px}.operations-permission>strong{grid-column:1/-1;font-size:13px}.operations-items{display:grid;gap:8px}.operations-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border:1px solid var(--line);border-radius:12px}.operations-item>label:first-child{grid-column:1/-1}.operations-item button{min-height:44px;padding:8px;font-size:12px}.operations-total{padding:12px;background:var(--accent-soft);color:var(--text-link);border-radius:10px}.operations-dialog .modal-content-scroll{padding:2px 4px 8px}.operations-dialog a.glass-button{display:flex;align-items:center;justify-content:center;min-height:44px;font-size:12px}
@media(max-width:700px){.operations-card{align-items:stretch;flex-direction:column;padding:12px}.operations-actions button{flex:1}.operations-summary{gap:6px;grid-template-columns:1fr 1fr}.operations-summary>div:last-child{grid-column:1/-1}.operations-summary strong{font-size:16px}.operations-fields{grid-template-columns:1fr;gap:10px}.operations-permission{grid-template-columns:1fr}.operations-module .customer-toolbar>.os-field{flex-basis:100%}.operations-module .customer-new{flex:1}}
.estimate-conversion .conversion-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border-radius:12px;background:var(--surface-field);border:1px solid var(--line)}
.conversion-summary>div{display:grid;gap:3px;min-width:0}.conversion-summary strong{font-size:14px;overflow-wrap:anywhere}.conversion-summary small,.conversion-progress{font-size:12px;color:var(--text-secondary)}
.estimate-conversion .conversion-progress{margin:0}.conversion-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field);min-width:0}.conversion-item.is-incomplete{border-color:var(--text-warning)}
.conversion-item-head{display:grid;gap:3px;min-width:0;align-content:center}.conversion-item-head strong{font-size:13px;overflow-wrap:anywhere}.conversion-item-head small{font-size:12px;color:var(--text-secondary)}
.conversion-types{display:flex;gap:3px;align-self:start;border:1px solid var(--line);border-radius:11px;padding:3px}.estimate-conversion .conversion-types button{margin:0;width:auto;min-height:38px;padding:6px 10px;border:0;box-shadow:none;background:transparent;font-size:12px;border-radius:8px;color:var(--text-secondary)}.estimate-conversion .conversion-types button[aria-pressed=true]{background:var(--accent-soft);color:var(--text-link);font-weight:650}.estimate-conversion .conversion-types button:hover{background:var(--surface-hover)}.estimate-conversion button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
.estimate-conversion .conversion-choose{grid-column:1/-1;min-height:44px;margin:0;padding:8px 12px;text-align:left;font-size:12px;white-space:normal;overflow-wrap:anywhere;border-radius:10px;width:100%}.conversion-choose[hidden]{display:none!important}
.conversion-details{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap;color:var(--text-secondary);font-size:12px}.conversion-details:empty{display:none}.conversion-stock{display:flex;flex:1;min-width:70px;flex-direction:column;gap:3px;padding:7px 8px;background:var(--surface-hover);border-radius:8px}.conversion-stock small{font-size:10px}.conversion-stock strong{font-size:14px;color:var(--text-primary)}.conversion-stock.is-pending{background:var(--surface-warning);color:var(--text-warning)}.conversion-stock.is-pending strong{color:inherit}.conversion-foot{display:flex;gap:10px;align-items:center}.conversion-foot small{font-size:11px;color:var(--text-secondary);flex:1}.estimate-conversion .conversion-foot button{width:auto;min-height:44px;padding:7px 10px;margin:0;font-size:11px;flex-shrink:0}
@media(max-width:480px){.estimate-conversion .operations-fields{gap:8px}.conversion-item{padding:10px;grid-template-columns:minmax(0,1fr)}.conversion-types{justify-self:start}.conversion-item-head{display:flex;justify-content:space-between;gap:8px}.conversion-item-head small{flex-shrink:0}.conversion-foot{align-items:flex-start}.conversion-summary>strong{flex-shrink:0}}
.operations-card.estimate-converted{border-inline-start:3px solid var(--text-success)}.estimate-converted-link{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin:3px 0}.operations-copy .estimate-converted-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:7px;background:var(--surface-success);color:var(--text-success);font-size:11px;font-weight:600;line-height:1.3}.estimate-converted-badge::before{content:'✓';font-size:12px}.operations-copy .estimate-converted-link>strong{font-size:12px;color:var(--text-primary);font-variant-numeric:tabular-nums}.estimate-converted .operations-actions{flex-shrink:0}@media(max-width:600px){.estimate-converted .operations-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.estimate-converted .operations-actions button{min-width:0;white-space:normal;overflow-wrap:anywhere}}
.operations-module .customer-filter>label[hidden]{display:none!important}
.estimate-indicators{margin:0 0 12px;gap:8px}.estimate-indicators .estimate-indicator{display:grid;align-content:space-between;gap:7px;min-width:0;text-align:left;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field);color:var(--text-primary);box-shadow:none;min-height:82px}.estimate-indicator small{font-size:12px;color:var(--text-secondary);line-height:1.3;overflow-wrap:anywhere}.estimate-indicator strong{font-size:22px;font-variant-numeric:tabular-nums}.estimate-indicators .estimate-indicator:hover{background:var(--surface-hover)}.estimate-indicators .estimate-indicator:active{background:var(--surface-pressed)}.estimate-indicators .estimate-indicator[aria-pressed=true]{border-color:var(--text-link);background:var(--accent-soft)}.estimate-indicator[aria-pressed=true] small,.estimate-indicator[aria-pressed=true] strong{color:var(--text-link)}.estimate-indicator:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}.estimate-indicators:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.operations-summary.estimate-indicators{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.estimate-indicators .estimate-indicator{padding:10px 8px;min-height:88px}.estimate-indicator small{font-size:11px}.estimate-indicator strong{font-size:20px}.operations-summary.estimate-indicators:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}}
.operations-card.estimate-list-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:14px;gap:16px}.estimate-list-card .operations-copy{gap:10px}.estimate-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.estimate-card-identity{display:grid;gap:4px;min-width:0}.estimate-card-identity>strong{font-size:14px}.estimate-list-card .estimate-approval{flex-shrink:0;max-width:48%;padding:5px 8px;border-radius:7px;font-size:11px;font-weight:600;background:var(--surface-hover);line-height:1.3}.estimate-approval[data-state=approved]{color:var(--text-success);background:var(--surface-success)}.estimate-approval[data-state=awaiting_approval],.estimate-approval[data-state=pending]{color:var(--text-warning);background:var(--surface-warning)}.estimate-approval[data-state=declined],.estimate-approval[data-state=cancelled]{color:var(--text-error);background:var(--surface-error)}.estimate-card-customer{display:flex;gap:6px;align-items:baseline;min-width:0;flex-wrap:wrap}.estimate-card-customer>strong{font-size:13px;overflow-wrap:anywhere}.estimate-card-facts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.estimate-card-facts>div{display:grid;gap:3px}.estimate-list-card .estimate-card-facts>div:first-child>strong{font-size:20px;color:var(--text-primary);font-variant-numeric:tabular-nums}.estimate-card-facts>div:last-child>strong{font-size:13px}.estimate-list-card .operations-actions{display:flex;flex-wrap:wrap;max-width:300px;justify-content:flex-end}.estimate-list-card .estimate-cancel{color:var(--text-error)}.estimate-card-delivery{display:flex;flex-wrap:wrap;gap:3px 12px}.estimate-list-card .estimate-card-delivery small{font-size:11px}.estimate-list-card .estimate-expired{color:var(--text-warning)}
@media(max-width:700px){.operations-card.estimate-list-card{grid-template-columns:minmax(0,1fr);padding:12px;gap:10px}.estimate-list-card .operations-copy{gap:8px}.estimate-list-card .operations-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:none;border-top:1px solid var(--line);padding-top:10px;gap:6px}.estimate-list-card .operations-actions>button{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}.estimate-list-card .operations-actions>button:only-child{grid-column:1/-1}.estimate-list-card .operations-actions>button:last-child:nth-child(3){grid-column:1/-1}.estimate-card-head{gap:8px}.estimate-list-card .estimate-card-facts>div:first-child>strong{font-size:18px}}
.estimate-editor .operations-fields{gap:12px}.estimate-editor-customer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}.estimate-editor-customer>div{display:grid;gap:3px;min-width:0}.estimate-editor-customer strong{font-size:14px;overflow-wrap:anywhere}.estimate-editor small{font-size:11px;color:var(--text-secondary)}.estimate-editor-customer button{flex-shrink:0;margin:0;width:auto;min-height:44px;padding:8px 12px;font-size:12px}.estimate-editor-data{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:10px}.estimate-editor-data>label:has(textarea){grid-column:1/-1}.estimate-editor-items>header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.estimate-editor-items>header>strong{font-size:14px}.estimate-editor-items>header>button{margin:0 0 0 auto;width:auto;padding:8px 10px;min-height:44px;font-size:12px}.estimate-editor .estimate-editor-item{gap:8px;background:var(--surface-field)}.estimate-item-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:8px}.estimate-item-footer>div{display:grid;gap:3px}.estimate-item-footer strong{font-size:14px}.estimate-item-footer>button{width:auto;margin:0;min-height:44px;font-size:12px;color:var(--text-error)}.estimate-editor .customer-dialog-actions{flex-wrap:wrap}.estimate-editor .estimate-editor-total{flex:0 0 100%;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 10px;margin-bottom:4px;border-bottom:1px solid var(--line);min-width:0}.estimate-editor-total strong{font-size:20px;font-variant-numeric:tabular-nums;color:var(--text-primary);overflow-wrap:anywhere}.estimate-editor-status{display:grid;gap:4px;padding:10px;background:var(--surface-hover);border-radius:10px}.estimate-editor-status strong{font-size:13px}.estimate-editor .estimate-editor-pdf{justify-self:start;width:auto;padding:8px 12px}.estimate-editor .os-note{margin:0;font-size:11px}@media(max-width:480px){.estimate-editor-data{grid-template-columns:minmax(0,1fr)}.estimate-editor-customer{align-items:flex-start;flex-wrap:wrap;padding:10px}.estimate-editor-customer>div{flex:1 1 150px}.estimate-editor-customer>button{flex:0 1 auto}.estimate-editor .operations-fields{gap:10px}.estimate-editor .estimate-editor-total strong{font-size:18px}}
.estimate-editor .customer-dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.estimate-editor .customer-dialog-actions>button{grid-column:auto!important;width:100%;margin:0;min-width:0}.estimate-editor .customer-dialog-actions>.estimate-editor-total{grid-column:1/-1}.estimate-editor .customer-dialog-actions>button:only-of-type{grid-column:1/-1!important}
/* Estimate editor: customer identity, compact line items and a persistent total. */
dialog.estimate-editor{width:860px;max-width:calc(100vw - 24px)}
.estimate-editor>.mobile-dialog-scroll{padding:12px}
.estimate-editor .customer-dialog-header{padding-bottom:12px;border-bottom:1px solid var(--line)}
.estimate-editor .estimate-editor-customer{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.estimate-editor-customer-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--text-link)}
.estimate-editor-customer-icon .icon{width:18px;height:18px}
.estimate-editor .estimate-editor-customer strong{font-size:var(--type-body);line-height:1.4}
.estimate-editor .estimate-editor-customer button{box-shadow:none;border-color:var(--line);border-radius:10px}
.estimate-customer-action-icon{display:none}
.estimate-editor .estimate-editor-data textarea{min-height:72px}
.estimate-editor .estimate-editor-items>header{margin-bottom:10px}
.estimate-editor .estimate-editor-items>header>button{display:inline-flex;align-items:center;gap:8px;box-shadow:none;border-color:var(--line)}
.estimate-editor-items>header>button .icon{width:18px;height:18px}
.estimate-editor .estimate-editor-item{grid-template-columns:minmax(0,1fr) 84px 128px 144px;align-items:end;padding:12px;gap:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}
.estimate-editor .estimate-editor-item>label:first-child{grid-column:auto}
.estimate-editor .estimate-item-footer{grid-column:auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 0 0 10px;border:0;border-left:1px solid var(--line);min-height:44px;min-width:0}
.estimate-editor .estimate-item-footer strong{font-size:var(--type-body);font-variant-numeric:tabular-nums;line-height:1.4}
.estimate-editor .estimate-item-footer>.estimate-item-remove{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;padding:0;border:0;background:transparent;box-shadow:none;border-radius:10px}
.estimate-item-remove .icon{width:18px;height:18px}
.estimate-editor .estimate-item-remove:hover{background:var(--surface-hover)}
.estimate-editor .estimate-item-remove:active{background:var(--surface-pressed)}
.estimate-editor .estimate-item-remove:disabled{opacity:.35;cursor:default}
.estimate-editor .estimate-editor-total{padding:10px 12px;margin:0 0 4px;border:1px solid var(--accent-ring);border-radius:12px;background:var(--accent-soft)}
.estimate-editor .estimate-editor-total small{color:var(--text-primary);font-size:var(--type-label)}
.estimate-editor .estimate-editor-total strong{font-size:24px;line-height:1.2;letter-spacing:-.4px}
.estimate-editor .estimate-editor-send{display:inline-flex;align-items:center;justify-content:center;gap:8px;color:var(--text-link)}
.estimate-editor-send>.icon{width:18px;height:18px;flex:none}
.estimate-editor .customer-dialog-actions>.estimate-editor-delivery{grid-column:1/-1;flex:1 0 100%;width:100%;min-width:0}
.estimate-editor-send>span{min-width:0;white-space:normal;line-height:1.35}
.estimate-editor .customer-dialog-actions>.estimate-editor-pdf{display:inline-flex;align-items:center;justify-content:center;min-height:var(--control-target);box-sizing:border-box;margin:0;justify-self:stretch;text-decoration:none}
@media(max-width:700px){
 .estimate-editor-new .customer-dialog-actions>.estimate-editor-send{grid-column:1/-1!important}
 dialog.estimate-editor{max-width:calc(100vw - 20px)}
 .estimate-editor>.mobile-dialog-scroll{padding:10px 8px}
 .estimate-editor .estimate-editor-customer{grid-template-columns:28px minmax(0,1fr) 44px;gap:8px;padding:0 0 12px}
 .estimate-editor-customer-icon{width:28px;height:28px;border-radius:8px}
 .estimate-editor .estimate-editor-customer>button{grid-column:3;justify-self:end;display:grid;place-items:center;width:44px;height:44px;padding:0;max-width:100%}
 .estimate-customer-action-label{display:none}
 .estimate-customer-action-icon{display:grid;place-items:center}
 .estimate-customer-action-icon .icon{width:18px;height:18px}
 .estimate-editor .estimate-editor-item{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:8px}
 .estimate-editor .estimate-editor-item>label:first-child{grid-column:1/-1}
 .estimate-editor .estimate-item-footer{grid-column:1/-1;padding:6px 0 0;border-left:0;border-top:1px solid var(--line)}
 .estimate-editor .estimate-editor-total{padding:10px}
 .estimate-editor .estimate-editor-total strong{font-size:22px}
}

.estimate-whatsapp{display:grid;gap:4px;min-width:0;padding-top:8px;border-top:1px solid var(--line)}.estimate-list-card .estimate-whatsapp-badge{display:inline-flex;justify-self:start;align-items:center;gap:6px;max-width:100%;padding:5px 8px;border:1px solid var(--line);border-radius:8px;font-size:11px;font-weight:600;line-height:1.35;background:var(--surface-hover);color:var(--text-secondary);overflow-wrap:anywhere}.estimate-whatsapp-badge>span:first-child{flex-shrink:0}.estimate-list-card .estimate-whatsapp-badge[data-state=sent]{background:var(--surface-success);color:var(--text-success)}.estimate-list-card .estimate-whatsapp-badge[data-state=waiting],.estimate-list-card .estimate-whatsapp-badge[data-state=warning]{background:var(--surface-warning);color:var(--text-warning)}.estimate-list-card .estimate-whatsapp-badge[data-state=error]{background:var(--surface-error);color:var(--text-error)}.estimate-list-card .estimate-whatsapp-note{font-size:11px;line-height:1.4;color:var(--text-secondary);overflow-wrap:anywhere}

/* Estimate listing: compact cards, without kanban behavior. */
.estimate-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:12px;align-items:start}.estimate-card-grid>.operations-card.estimate-list-card{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface-field);box-shadow:0 2px 6px rgba(0,0,0,.025);min-width:0}.estimate-card-grid .operations-copy{gap:8px}.estimate-card-grid .estimate-card-identity{gap:8px}.estimate-card-grid .estimate-card-identity>small{font-size:11px;font-weight:600}.estimate-card-grid .estimate-card-identity>strong{font-size:16px;line-height:1.35}.estimate-card-grid .estimate-card-customer>small{display:none}.estimate-card-grid .estimate-card-customer>strong{font-size:13px;font-weight:400}.estimate-card-grid .estimate-card-facts{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 12px;align-items:baseline}.estimate-card-grid .estimate-card-facts>div{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}.estimate-card-grid .estimate-card-facts>div:first-child>strong{font-size:15px}.estimate-card-grid .estimate-card-facts>div:last-child>strong{font-size:11px;font-weight:400;color:var(--text-secondary)}.estimate-card-grid .estimate-approval{align-self:flex-start;max-width:100%;font-size:11px;font-weight:500;padding:4px 8px}.estimate-card-grid .estimate-whatsapp{border:0;padding:0}.estimate-delivery-details>summary{list-style:none;cursor:pointer;min-height:32px;display:flex;align-items:center}.estimate-delivery-details>summary::-webkit-details-marker{display:none}.estimate-delivery-details>summary:focus-visible{outline:2px solid var(--text-link);outline-offset:2px;border-radius:8px}.estimate-delivery-details>summary .estimate-whatsapp-badge::after{content:'⌄';margin-left:3px}.estimate-delivery-details[open]>summary .estimate-whatsapp-badge::after{content:'⌃'}.estimate-delivery-details .estimate-whatsapp-note{display:block;margin-top:4px}.estimate-card-grid .operations-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;max-width:none;width:100%;gap:6px;border-top:1px solid var(--line);padding-top:8px}.estimate-card-grid .operations-actions>button{flex:1 1 auto;width:auto!important;min-height:38px;padding:7px 9px;font-size:11px;line-height:1.35;border-radius:9px;margin:0;white-space:normal;overflow-wrap:anywhere}.estimate-card-grid>.modal-state,.estimate-card-grid>.listing-error{grid-column:1/-1}@media(max-width:700px){.estimate-card-grid{grid-template-columns:1fr;gap:10px}.estimate-card-grid .operations-actions>button{min-height:44px}}

.estimate-list-card .estimate-whatsapp-badge span{font-size:inherit;color:inherit}.estimate-card-grid .estimate-approval{justify-self:start}

.estimates-module .listing-control-bar .customer-filter{display:flex;flex-wrap:wrap;gap:8px}.estimates-module .listing-control-bar .customer-filter>.os-field{flex:1 1 140px;min-width:0;margin:0}.estimates-module .listing-control-bar .customer-filter select{width:100%;min-width:0;font-size:12px}.estimates-module .listing-control-bar .customer-filter>.os-field[hidden]{display:none!important}@media(max-width:700px){.estimates-module .listing-control-bar .customer-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.estimates-module .listing-control-bar .customer-filter>.os-field{min-width:0;width:100%;font-size:11px}.estimates-module .listing-control-bar .customer-filter select{min-height:44px;padding:7px 8px}}

/* Match the service-order card rhythm, with actions in the top layer. */
.estimate-card-grid>.operations-card.estimate-list-card{position:relative;padding:14px;gap:0;border-radius:15px}.estimate-card-grid .operations-copy{gap:6px}.estimate-card-grid .estimate-card-head{padding-right:32px}.estimate-card-grid .estimate-card-identity{gap:7px}.estimate-card-grid .estimate-card-identity>small{font-size:10px;letter-spacing:.04em;font-weight:500;color:var(--text-subtle)}.estimate-card-grid .estimate-card-identity>strong{font-size:15px;font-weight:700;line-height:1.3}.estimate-card-grid .estimate-card-customer>strong{font-size:12px;line-height:1.4;color:var(--text-primary)}.estimate-card-grid .estimate-card-facts{margin:4px 0 2px;gap:4px 10px}.estimate-card-grid .estimate-card-facts small{font-size:10px;color:var(--text-subtle)}.estimate-card-grid .estimate-card-facts>div:first-child>strong{font-size:12px;font-weight:600}.estimate-card-grid .estimate-card-facts>div:last-child>strong{font-size:10px;color:var(--text-subtle)}.estimate-card-grid .estimate-approval{border-radius:6px;font-size:10px;padding:4px 7px}.estimate-card-grid .estimate-whatsapp-badge{font-size:10px;padding:4px 7px;border-radius:6px}.estimate-card-grid .estimate-menu-toggle{position:absolute;right:4px;top:3px;display:grid;place-items:center;width:38px;min-width:38px;min-height:38px;margin:0;padding:0;border:0;border-radius:8px;box-shadow:none;background:transparent;color:var(--text-subtle);font-size:25px;line-height:1}.estimate-card-grid .estimate-menu-toggle:hover{background:var(--surface-hover)}.estimate-card-grid .estimate-menu-toggle:active{background:var(--surface-pressed)}.estimate-menu-toggle:focus-visible,.estimate-actions-menu button:focus-visible{outline:2px solid var(--text-link);outline-offset:1px}
.estimate-actions-menu[popover]{position:fixed;inset:auto;margin:0;box-sizing:border-box;width:208px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field);color:var(--text-primary);box-shadow:0 8px 28px #0002}.estimate-actions-menu[popover]:popover-open{display:grid;gap:0}:root .estimate-actions-menu[popover] button{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;justify-content:stretch;gap:8px;box-sizing:border-box;text-align:left;width:100%;min-height:44px;margin:0;padding:6px 8px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-primary);font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}.estimate-actions-menu[popover] button.submit-button{color:var(--text-link);font-weight:600}.estimate-actions-menu[popover] button.estimate-cancel{color:var(--text-error)}.estimate-actions-menu[popover] button:hover{background:var(--surface-hover)}.estimate-actions-menu[popover] button:active{background:var(--surface-pressed)}@media(max-width:700px){.estimate-card-grid .estimate-menu-toggle{width:44px;min-height:44px;top:0;right:0}.estimate-card-grid .estimate-card-identity>strong{font-size:16px}.estimate-card-grid .estimate-card-customer>strong{font-size:12px}}

.estimate-clickable{cursor:pointer}.estimate-clickable :is(.estimate-approval,.estimate-converted-link,.estimate-whatsapp,.estimate-card-delivery){cursor:default}.estimate-card-grid .estimate-card-open{display:block;min-width:0;min-height:0;width:100%;margin:0;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;color:var(--text-primary);text-align:left;font:inherit;font-size:15px;font-weight:700;line-height:1.3;white-space:normal;overflow-wrap:anywhere}.estimate-card-grid .estimate-card-open:is(:hover,:active){background:transparent;color:var(--text-primary);box-shadow:none}.estimate-card-open:focus-visible{outline:2px solid var(--text-link);outline-offset:4px}.estimate-clickable:has(.estimate-card-open:focus-visible){border-color:var(--text-link)}@media(max-width:700px){.estimate-card-grid .estimate-card-open{font-size:16px}}

.estimate-card-tags{display:flex;flex-wrap:wrap;align-items:center;gap:5px;cursor:default}.estimate-card-grid .estimate-validity{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 7px;border-radius:6px;font-size:10px;font-weight:500;line-height:1.3;overflow-wrap:anywhere;background:var(--surface-warning);color:var(--text-warning);border:1px solid var(--border-warning,var(--line))}.estimate-card-grid .estimate-validity[data-state=expired]{background:var(--surface-error);color:var(--text-error);border-color:var(--border-error)}.estimate-validity::before{content:'◷';font-size:11px}

@media(max-width:700px){.estimates-module .listing-control-bar .customer-filter>.estimate-validity-filter{grid-column:1/-1;order:1}}

/* Estimate workflow board, with exclusive deadline columns and per-stage pages. */
.estimate-board-host{display:block;min-width:0}.estimate-board{display:flex;align-items:flex-start;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding:2px 2px 8px;scroll-snap-type:x proximity}.estimate-board::-webkit-scrollbar{display:none}.estimate-stage-panel{flex:0 0 300px;min-width:0;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--surface-field) 65%,transparent);scroll-snap-align:start}.estimate-stage-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 2px 14px;font-size:12px;line-height:1.4}.estimate-stage-heading strong{display:flex;align-items:center;gap:7px;min-width:0;color:var(--text-primary)}.estimate-stage-heading strong::before{content:'';width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:var(--text-link)}.estimate-stage-heading>span{font-size:12px;font-weight:600;color:var(--text-secondary)}.estimate-stage-panel[data-stage=overdue] .estimate-stage-heading strong::before,.estimate-stage-panel[data-stage=declined] .estimate-stage-heading strong::before{background:var(--text-error)}.estimate-stage-panel:is([data-stage=due_soon],[data-stage=pending],[data-stage=awaiting_approval]) .estimate-stage-heading strong::before{background:var(--text-warning)}.estimate-stage-panel:is([data-stage=approved],[data-stage=converted]) .estimate-stage-heading strong::before{background:var(--text-success)}.estimate-stage-cards{grid-template-columns:minmax(0,1fr);gap:10px}.estimate-stage-empty{margin:0;padding:26px 8px;font-size:12px;line-height:1.5;text-align:center;color:var(--text-secondary)}.estimate-board-controls{display:flex;justify-content:flex-end;gap:5px;margin-bottom:10px}.estimate-board-controls button{display:grid;place-items:center;min-height:40px;width:40px;margin:0;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-link);font-size:24px;box-shadow:none}.estimate-board-controls button:hover{background:var(--surface-hover)}.estimate-board-controls button:disabled{opacity:.4;cursor:default}.estimate-board-tabs{display:none}.estimate-stage-panel>.customer-pagination{margin-top:10px;width:100%;min-width:0}.estimate-stage-panel>.customer-pagination[hidden]{display:none!important}.estimate-stage-panel .listing-pagination{padding:6px;gap:2px}.estimate-stage-panel .listing-pagination button{min-width:30px;padding:5px}.estimate-stage-panel .listing-pagination-range{font-size:10px}
@media(max-width:700px){.estimate-board-controls{display:none}.estimate-board-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:10px}.estimate-board-tabs button{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:44px;margin:0;padding:7px 9px;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-secondary);box-shadow:none;font-size:11px;text-align:left;line-height:1.3;white-space:normal}.estimate-board-tabs button small{font-size:11px;font-weight:700}.estimate-board-tabs button[aria-selected=true]{background:var(--accent-soft);border-color:var(--accent-ring);color:var(--text-link)}.estimate-board{display:block;overflow:visible;padding:0}.estimate-stage-panel{display:none;width:100%;padding:10px}.estimate-stage-panel.is-selected{display:block}.estimate-stage-heading{padding-bottom:10px}.estimate-board-tabs button:focus-visible{outline:2px solid var(--text-link);outline-offset:1px}}
.estimate-board{contain:inline-size;width:100%;box-sizing:border-box}.estimate-board-host{max-width:100%}

@media(max-width:700px){.estimate-board-tabs button[aria-selected=true]{border-color:var(--text-link);color:var(--text-link);font-weight:600}}

.estimate-card-grid .estimate-order-action{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 0}.estimate-card-grid .estimate-order-action>strong{font-size:11px;color:var(--text-success)}.estimate-card-grid .estimate-order-action>button{width:auto;min-height:36px;margin:0;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-field);color:var(--text-link);box-shadow:none;font-size:11px;font-weight:600;line-height:1.35}.estimate-card-grid .estimate-order-action>button:hover{background:var(--surface-hover)}.estimate-card-grid .estimate-order-action>button:active{background:var(--surface-pressed)}@media(max-width:700px){.estimate-card-grid .estimate-order-action>button{min-height:44px}}

.estimate-stage-heading:has(.estimate-stage-pending){flex-wrap:wrap;row-gap:5px}.estimate-stage-heading .estimate-stage-pending{flex-basis:100%;min-width:0;min-height:32px;margin:0;padding:5px 14px;border:1px solid var(--line);border-radius:9px;background:transparent;box-shadow:none;font-family:inherit;font-size:11px;font-weight:500;line-height:1.4;color:var(--text-warning);text-align:left;cursor:pointer;overflow-wrap:anywhere}.estimate-stage-heading .estimate-stage-pending:hover{background:var(--surface-hover)}.estimate-stage-heading .estimate-stage-pending:active,.estimate-stage-heading .estimate-stage-pending[aria-pressed="true"]{background:var(--surface-pressed)}.estimate-stage-heading .estimate-stage-pending:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.estimate-stage-heading .estimate-stage-pending{min-height:44px}}
.estimate-pending-empty{display:grid;gap:9px;padding:16px 8px}.estimate-pending-empty strong{font-size:12px;color:var(--text-primary)}.estimate-pending-empty p{margin:0;overflow-wrap:anywhere}.estimate-pending-empty button{min-width:0;max-width:100%;min-height:40px;margin:2px 0 0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-link);box-shadow:none;font-size:11px;line-height:1.4;white-space:normal}.estimate-pending-empty button:hover{background:var(--surface-hover)}.estimate-pending-empty button:active{background:var(--surface-pressed)}.estimate-pending-empty button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.estimate-pending-empty button{min-height:44px}}
.estimate-board-single-stage .estimate-board-controls{display:none}.estimate-board-single-stage .estimate-board-tabs{grid-template-columns:minmax(0,1fr)}
.estimate-stage-heading.has-status-filter{flex-wrap:wrap;row-gap:6px}.estimate-stage-heading.has-status-filter>strong{color:var(--text-link)}.estimate-stage-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;flex-basis:100%;min-width:0}.estimate-stage-filter-label{font-size:10px;line-height:1.4;color:var(--text-secondary)}.estimate-stage-filter button{width:auto;min-width:0;max-width:100%;min-height:32px;margin:0;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-field);box-shadow:none;color:var(--text-link);font-size:10px;line-height:1.4;white-space:normal}.estimate-stage-filter button:hover{background:var(--surface-hover)}.estimate-stage-filter button:active{background:var(--surface-pressed)}.estimate-stage-filter button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.estimate-stage-filter button{min-height:44px}}
.permissions-guidance{margin:0 0 12px;font-size:12px;line-height:1.5;color:var(--text-secondary)}.permissions-protected{display:inline-flex;padding:6px 9px;border:1px solid var(--line);border-radius:8px;font-size:11px;color:var(--text-secondary);background:var(--surface-field)}
.permissions-editor .permissions-identity{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}.permissions-identity strong{font-size:14px;overflow-wrap:anywhere}.permissions-identity small{font-size:11px;color:var(--text-secondary)}.permissions-editor .permissions-guidance{margin:0;font-size:11px}.permissions-editor .permission-module{min-width:0;margin:0;padding:8px 10px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}.permission-module legend{padding:0 5px;font-size:13px;font-weight:650;color:var(--text-primary)}.permission-module-description{margin:0 0 8px;font-size:11px;line-height:1.4;color:var(--text-secondary)}.permission-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}:root dialog.permissions-editor .permission-option{align-items:flex-start;flex-wrap:nowrap;padding:8px;gap:8px;margin:0}:root dialog.permissions-editor .permission-option-copy{display:grid;gap:3px;min-width:0}.permission-option-copy strong{font-size:12px;font-weight:600}.permission-option-copy small{font-size:11px;line-height:1.4;color:var(--text-secondary)}@media(max-width:400px){.permission-options{grid-template-columns:minmax(0,1fr)}}
:root dialog.permissions-editor label.permission-option:has(>input[type=checkbox]){display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:8px}:root dialog.permissions-editor label.permission-option>.permission-option-copy{grid-column:2;min-width:0}:root dialog.permissions-editor .permission-option-copy small{font-weight:400}
.team-access-summary{display:grid;gap:5px;margin-top:7px;min-width:0}.team-access-group{display:grid;grid-template-columns:120px minmax(0,1fr);gap:6px 10px;padding:6px 8px;border:1px solid var(--line);border-radius:9px;background:var(--surface-field)}.operations-copy .team-access-group strong{font-size:10px;line-height:1.5;font-weight:600;color:var(--text-secondary)}.operations-copy .team-access-group span{font-size:11px;line-height:1.5;color:var(--text-secondary)}.operations-copy .team-access-group.is-write strong{color:var(--text-link)}.team-access-badge{justify-self:start;padding:5px 8px;border:1px solid var(--line);border-radius:8px;font-size:11px}.operations-copy .team-access-badge.is-write{color:var(--text-link)}.operations-copy .team-access-summary>small{font-size:10px;color:var(--text-warning)}@media(max-width:700px){.team-access-group{grid-template-columns:minmax(0,1fr);gap:2px}}
.operations-actions .team-permissions-action{color:var(--text-link);border:1px solid var(--line);background:var(--surface-field);box-shadow:none}.operations-actions .team-permissions-action:hover{background:var(--surface-hover)}.operations-actions .team-permissions-action:active{background:var(--surface-pressed)}.operations-actions .team-permissions-action:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
.team-access-links{display:flex;flex-wrap:wrap;gap:4px;min-width:0}.operations-copy .team-access-link{display:inline-flex;align-items:center;justify-content:center;min-width:0;max-width:100%;min-height:32px;margin:0;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:transparent;box-shadow:none;color:var(--text-secondary);font:inherit;font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;cursor:pointer}.operations-copy .team-access-link:hover{background:var(--surface-hover);color:var(--text-link)}.operations-copy .team-access-link:active,.operations-copy .team-access-link[aria-pressed=true]{background:var(--surface-pressed);color:var(--text-link);border-color:var(--text-link)}.operations-copy .team-access-link:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.operations-copy .team-access-link{min-height:44px}}
.operations-copy .team-access-link[hidden]{display:none}.operations-copy .team-access-toggle{grid-column:2;justify-self:start;min-height:32px;max-width:100%;margin:0;padding:5px 8px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-link);font:inherit;font-size:11px;line-height:1.4;white-space:normal;cursor:pointer}.operations-copy .team-access-toggle:hover{background:var(--surface-hover)}.operations-copy .team-access-toggle:active{background:var(--surface-pressed)}.operations-copy .team-access-toggle:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.operations-copy .team-access-toggle{grid-column:1;min-height:44px}}
.operations-summary.team-access-controls{display:flex;justify-content:flex-end;gap:0;margin:0 0 6px}.team-access-controls .team-access-bulk{min-height:32px;max-width:100%;margin:0;padding:5px 9px;border:1px solid var(--line);border-radius:9px;background:var(--surface-field);box-shadow:none;color:var(--text-link);font:inherit;font-size:11px;line-height:1.4;white-space:normal;cursor:pointer}.team-access-controls .team-access-bulk:hover{background:var(--surface-hover)}.team-access-controls .team-access-bulk:active{background:var(--surface-pressed)}.team-access-controls .team-access-bulk:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.team-access-controls .team-access-bulk{min-height:44px}}
.operations-summary.team-access-controls{align-items:center;flex-wrap:wrap;gap:4px 8px}.team-access-controls .team-access-count{color:var(--text-secondary);font-size:10px;line-height:1.4;white-space:nowrap}
.operations-card[hidden],.team-access-bulk[hidden]{display:none!important}.team-access-controls button.team-access-count{min-height:32px;max-width:100%;margin:0;padding:5px 8px;border:1px solid var(--line);border-radius:9px;background:var(--surface-field);box-shadow:none;white-space:normal;cursor:pointer}.team-access-controls button.team-access-count:hover{background:var(--surface-hover)}.team-access-controls button.team-access-count:active,.team-access-controls button.team-access-count[aria-pressed=true]{background:var(--surface-pressed);color:var(--text-link);border-color:var(--text-link)}.team-access-controls button.team-access-count:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}.team-expanded-empty{padding:12px;color:var(--text-secondary);font-size:12px}.team-expanded-empty p{margin:0 0 8px}@media(max-width:700px){.team-access-controls button.team-access-count{min-height:44px}}
.team-query-empty[hidden]{display:none!important}.team-expanded-empty{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-field)}.team-expanded-empty-copy{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.team-expanded-empty-copy strong{font-size:13px;color:var(--text-primary);line-height:1.4}.team-expanded-empty-copy p{margin:0;font-size:12px;line-height:1.5}.team-expanded-empty-copy small{font-size:11px;line-height:1.5}.team-expanded-empty .team-expanded-show-all{flex-shrink:0;min-height:36px;max-width:100%;padding:6px 10px;margin:0;border:1px solid var(--line);border-radius:9px;background:transparent;box-shadow:none;color:var(--text-link);font:inherit;font-size:12px;white-space:normal;cursor:pointer}.team-expanded-empty .team-expanded-show-all:hover{background:var(--surface-hover)}.team-expanded-empty .team-expanded-show-all:active{background:var(--surface-pressed)}.team-expanded-empty .team-expanded-show-all:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}@media(max-width:700px){.team-expanded-empty{align-items:flex-start;flex-direction:column;gap:8px;padding:12px}.team-expanded-empty .team-expanded-show-all{min-height:44px}}
.listing-error.team-list-error{padding:14px;gap:6px;align-items:flex-start;text-align:left;border-radius:12px}.listing-error.team-list-error h3{font-size:13px}.listing-error.team-list-error p{font-size:12px;max-width:520px}.listing-error.team-list-error .listing-error-retry{min-height:44px;margin-top:2px;padding:7px 11px}
.operations-list>.team-query-empty{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.operations-list>button.team-query-empty{justify-self:start;width:auto;max-width:100%;min-height:44px;margin:0;padding:7px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface-field);box-shadow:none;color:var(--text-link);white-space:normal}.operations-list>button.team-query-empty:hover{background:var(--surface-hover)}.operations-list>button.team-query-empty:active{background:var(--surface-pressed)}.operations-list>button.team-query-empty:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
.finance-entry-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);min-width:0}.finance-entry-summary strong{min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.4}.finance-entry-summary span{color:var(--text-primary);font-size:14px;font-weight:650;overflow-wrap:anywhere}.finance-module .operations-summary>div{min-width:0}.finance-module .operations-summary strong{overflow-wrap:anywhere;line-height:1.3}.finance-module .operations-actions{flex-shrink:0}.finance-module .operations-copy{overflow-wrap:anywhere}@media(max-width:700px){.finance-module .operations-actions{width:100%}.finance-module .operations-actions button{flex:1 1 80px;min-width:0}.finance-module .operations-summary strong{font-size:15px}.finance-dialog .finance-entry-summary{padding:9px 10px}}
.estimates-module .listing-error{grid-column:1/-1}.estimate-editor .estimate-editor-total,.estimate-editor .estimate-item-footer>div,.estimate-conversion .conversion-summary>div{min-width:0}.estimate-editor .estimate-editor-total strong,.estimate-editor .estimate-item-footer strong,.estimate-conversion .conversion-summary strong{overflow-wrap:anywhere}.estimate-actions-menu{max-height:calc(100dvh - 16px);overflow-y:auto}
.estimate-actions-menu .estimate-menu-icon{display:grid;place-items:center;width:18px;height:18px;flex:none}
.estimate-actions-menu .estimate-menu-icon>.icon{width:18px;height:18px}
.estimate-actions-menu .estimate-menu-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.estimate-actions-menu[popover] button.estimate-cancel:is(:hover,:active){color:var(--text-error)}
.operations-list.team-profile-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:16px;align-items:stretch}
.team-profile-grid>.operations-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:20px;padding:24px 20px 18px;border-radius:16px;min-width:0}
.team-profile-card>.operations-copy{text-align:center;justify-items:center;width:100%;gap:6px}
.team-profile-card .team-profile-avatar{position:relative;display:grid;place-items:center;width:88px;height:88px;margin:0 0 8px;border-radius:50%;background:var(--accent-soft);color:var(--text-link);font-size:28px;font-weight:600;letter-spacing:1px}
.team-profile-card .team-profile-status{position:absolute;right:1px;bottom:3px;width:20px;height:20px;border:4px solid var(--surface-field);border-radius:50%;background:var(--text-subtle)}
.team-profile-card .team-profile-status[data-active=true]{background:var(--text-success)}
.team-profile-card>.operations-copy>strong{font-size:18px;line-height:1.35;color:var(--text-primary)}
.team-profile-card>.operations-copy>small{max-width:100%;font-size:12px}
.team-profile-card .team-access-summary{width:100%;margin-top:10px;gap:8px}
.team-profile-card .team-access-group{grid-template-columns:minmax(0,1fr);justify-items:center;gap:5px;padding:0;border:0;background:transparent}
.team-profile-card .team-access-links{justify-content:center}
.team-profile-card .team-access-badge{justify-self:center;border-radius:20px}
.team-profile-card .team-access-link{border-radius:20px;background:var(--surface-hover)}
.team-profile-card .team-access-toggle{grid-column:1;justify-self:center}
.team-profile-card>.operations-actions{margin-top:auto;display:flex;flex-wrap:wrap;gap:8px;padding-top:14px;border-top:1px solid var(--line)}
.team-profile-card>.operations-actions:empty{display:none}
.team-profile-card>.operations-actions>button{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;border:1px solid var(--line);background:transparent;box-shadow:none;color:var(--text-secondary)}
.team-profile-card>.operations-actions>button:hover{background:var(--surface-hover);color:var(--text-link)}
.team-profile-card>.operations-actions>button:active{background:var(--surface-pressed)}
.team-profile-grid>:is(.team-expanded-empty,.team-query-empty,.listing-error){grid-column:1/-1}
@media(max-width:600px){.operations-list.team-profile-grid{gap:12px}.team-profile-grid>.operations-card{padding:20px 16px 16px;gap:16px}}
/* Profile cards follow the reference: portrait, role, circular access shortcuts, paired actions. */
.operations-list.team-profile-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),336px));align-items:stretch}
.team-profile-grid>.team-profile-card{min-height:344px;padding:24px 25px 22px;gap:22px;border-radius:8px}
.team-profile-card>.operations-copy{gap:2px}
.team-profile-card .team-profile-avatar,.user-profile-dialog .team-profile-avatar{position:relative;display:grid;place-items:center;width:100px;height:100px;border-radius:50%;background:var(--surface-hover);color:var(--text-secondary);font-size:30px;font-weight:500;margin:0 0 6px}
.team-profile-avatar>img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.team-profile-card .team-profile-status{width:32px;height:32px;right:0;bottom:0;border-width:3px;background:var(--surface-pressed)}
.team-profile-card .team-profile-status[data-active=true]{background:var(--surface-success)}
.team-profile-card .team-profile-status::after{content:'';position:absolute;inset:8px;border-radius:50%;background:var(--text-subtle)}
.team-profile-card .team-profile-status[data-active=true]::after{background:var(--text-success)}
.team-profile-card>.operations-copy>strong{font-size:20px;font-weight:550;line-height:1.3}
.team-profile-card>.operations-copy>.team-profile-role{font-size:14px;color:var(--text-subtle)}
.team-profile-card>.operations-copy>.team-profile-email{display:none}
.team-profile-card .team-access-summary{display:flex;justify-content:center;flex-wrap:wrap;align-items:center;gap:8px;min-height:40px;margin-top:12px}
.team-profile-card .team-access-group{display:contents}
.team-profile-card .team-access-group>strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.team-profile-card .team-access-links{gap:8px}
.team-profile-card .team-access-link,.team-profile-card .team-access-badge{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:var(--surface-hover);font-size:13px;font-weight:500}
.team-profile-card .is-write .team-access-link,.team-profile-card .team-access-badge.is-write{background:var(--accent-soft);color:var(--text-link)}
.team-profile-card .team-access-badge:not(.is-write){width:auto;border-radius:8px;padding:4px 8px;font-size:11px}
.team-profile-card .team-access-badge .icon{width:20px;height:20px}
.team-profile-card>.operations-actions{padding:0;border:0;gap:10px}
.team-profile-card>.operations-actions>button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:8px;border-radius:5px;font-size:14px;font-weight:400;color:var(--text-secondary)}
.team-profile-card>.operations-actions>button .icon{width:18px;height:18px;flex-shrink:0}
.team-profile-card>.operations-actions>button:disabled{opacity:.5;cursor:not-allowed}
.profile-photo-preview{display:flex;justify-content:center}
#user-avatar{border:1px solid var(--line);padding:0;cursor:pointer;overflow:hidden}
#user-avatar>img{width:100%;height:100%;object-fit:cover}
#user-avatar:focus-visible{outline:2px solid var(--text-link);outline-offset:3px}
@media(max-width:600px){.operations-list.team-profile-grid{grid-template-columns:minmax(0,336px);justify-content:center}.team-profile-grid>.team-profile-card{padding:24px 20px 22px;gap:22px}.team-profile-card .team-access-link{min-height:44px;width:44px;height:44px}}
/* Personal profile: independent compact sections and a single photo action block. */
.user-profile-dialog .profile-section{min-width:0;margin:0;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-field)}
.user-profile-dialog .profile-section>legend{padding:0 6px;font-size:12px;font-weight:650;color:var(--text-primary)}
.user-profile-dialog .profile-section-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.user-profile-dialog .profile-photo-section{grid-template-columns:80px minmax(0,1fr);align-items:center;gap:16px}
.user-profile-dialog .profile-photo-preview .team-profile-avatar{width:80px;height:80px;margin:0;font-size:26px;border:3px solid var(--surface-field);box-shadow:0 0 0 1px var(--line)}
.user-profile-dialog .profile-photo-copy{min-width:0;display:grid;gap:5px}
.user-profile-dialog .profile-photo-copy>strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere;color:var(--text-primary)}
.user-profile-dialog .profile-photo-copy>p,.user-profile-dialog .profile-section-hint{margin:0;font-size:12px;line-height:1.5;color:var(--text-secondary);overflow-wrap:anywhere}
.user-profile-dialog .profile-photo-copy>small{font-size:11px;color:var(--text-subtle);line-height:1.4}
.user-profile-dialog .profile-photo-actions{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0}
.user-profile-dialog .profile-photo-actions>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-height:44px;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:9px;box-shadow:none;background:transparent;font-size:12px;line-height:1.4;white-space:normal;color:var(--text-secondary)}
.user-profile-dialog .profile-photo-actions>.profile-photo-choose{background:var(--accent-soft);color:var(--text-link)}
.user-profile-dialog .profile-photo-actions>button:hover{background:var(--surface-hover)}
.user-profile-dialog .profile-photo-actions>button:active{background:var(--surface-pressed)}
.user-profile-dialog .profile-photo-actions>button:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
.user-profile-dialog .profile-photo-actions>button:disabled{opacity:.6;cursor:wait}
.user-profile-dialog .profile-photo-actions .icon{width:16px;height:16px;flex-shrink:0}
.user-profile-dialog .profile-photo-actions>[hidden],.user-profile-dialog input[type=file][hidden]{display:none!important}
@media(max-width:600px){.user-profile-dialog .profile-section{padding:10px}.user-profile-dialog .profile-section-fields{grid-template-columns:minmax(0,1fr);gap:10px}.user-profile-dialog .profile-photo-section{grid-template-columns:64px minmax(0,1fr);gap:12px}.user-profile-dialog .profile-photo-preview .team-profile-avatar{width:64px;height:64px;font-size:22px}.user-profile-dialog .profile-photo-copy>strong{font-size:13px}.user-profile-dialog .profile-photo-copy>p{font-size:11px}}
.user-profile-dialog .profile-section-fields>.full{grid-column:1/-1}
.profile-crop-dialog{width:400px}
.profile-crop-body{display:grid;justify-items:center;gap:12px;min-width:0}
.profile-crop-dialog .profile-crop-hint{margin:0;font-size:12px;line-height:1.5;color:var(--text-secondary);text-align:center}
.profile-crop-preview{display:block;width:min(100%,260px);height:auto;aspect-ratio:1;border-radius:50%;border:1px solid var(--line);box-shadow:0 0 0 5px var(--surface-field);touch-action:none;cursor:grab}
.profile-crop-preview:active{cursor:grabbing}
.profile-crop-preview:focus-visible{outline:2px solid var(--text-link);outline-offset:5px}
.profile-crop-body>small{font-size:11px;color:var(--text-subtle);text-align:center;line-height:1.4}
.profile-crop-dialog .profile-crop-zoom{display:grid;grid-template-columns:1fr auto;gap:4px;width:100%;margin:0;font-size:12px;color:var(--text-secondary)}
.profile-crop-zoom>input{grid-column:1/-1;width:100%;min-width:0;height:44px;padding:0;margin:0;accent-color:var(--text-link);cursor:pointer}
.profile-crop-zoom>output{font-variant-numeric:tabular-nums;color:var(--text-primary)}
.profile-crop-body>.profile-crop-reset{min-height:44px;width:auto;margin:0;padding:7px 12px;border-radius:9px;box-shadow:none;font-size:12px;color:var(--text-secondary)}
.profile-crop-body>.profile-crop-reset:hover{background:var(--surface-hover)}
.profile-crop-body>.profile-crop-reset:active{background:var(--surface-pressed)}
.profile-crop-body>.feedback{max-width:100%;font-size:12px;overflow-wrap:anywhere}
@media(max-width:600px){.profile-crop-preview{width:min(100%,220px)}.profile-crop-body{gap:10px}}
@media(max-height:500px){.profile-crop-preview{width:150px}}
/* Operational empty searches use the same full-width surface as the catalogs. */
.operations-list>.operations-empty{grid-column:1/-1;width:100%;border-radius:22px}
.operations-list:has(>.operations-empty:not([hidden])){grid-template-columns:minmax(0,1fr)}

body.in-workspace .authorization-pin-dialog{width:440px}

/* Profile: identity rail and a clear, continuous editing column. */
body.in-workspace dialog.user-profile-dialog{width:1040px;max-width:calc(100vw - 32px)}
.user-profile-dialog .profile-heading{display:grid;gap:4px;min-width:0}
.user-profile-dialog .profile-heading p{margin:0;color:var(--text-secondary);font-size:var(--type-meta);line-height:1.5}
:root body.in-workspace .user-profile-dialog .operations-fields{display:grid;grid-template-columns:252px minmax(0,1fr);gap:var(--space-fields);align-items:start}
.user-profile-dialog .profile-details{grid-column:2;grid-row:1/3;display:grid;gap:var(--space-fields);min-width:0}
.user-profile-dialog .profile-section{min-width:0;margin:0;padding:var(--space-fields);border:1px solid var(--line);border-radius:16px;background:var(--surface-field)}
.user-profile-dialog .profile-section-title{display:flex;align-items:center;gap:var(--space-inline);margin:0 0 var(--space-fields);color:var(--text-primary);font-size:var(--type-section-title);line-height:1.4}
.profile-section-symbol{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:8px;background:var(--accent-soft);color:var(--text-link)}
.profile-section-symbol .icon{width:16px;height:16px}
:root body.in-workspace .user-profile-dialog .profile-section-fields{gap:var(--space-fields);align-content:start}
.user-profile-dialog .profile-section-photo{grid-column:1;grid-row:1;position:relative;overflow:hidden}
.user-profile-dialog .profile-section-photo::before{content:'';position:absolute;inset:0 0 auto;height:3px;background:var(--text-link);opacity:.65}
.user-profile-dialog .profile-section-photo .profile-section-title{font-size:var(--type-label);color:var(--text-secondary)}
.user-profile-dialog .profile-section-photo .profile-section-symbol{display:none}
:root body.in-workspace .user-profile-dialog .profile-photo-section{grid-template-columns:minmax(0,1fr);justify-items:center;gap:var(--space-inline)}
.user-profile-dialog .profile-photo-preview .team-profile-avatar{width:72px;height:72px;margin:0;border:3px solid var(--surface-field);box-shadow:0 0 0 1px var(--accent-ring)}
.user-profile-dialog .profile-photo-copy{display:flex;flex-direction:column;align-items:center;gap:var(--space-inline);text-align:center;min-width:0;width:100%}
.user-profile-dialog .profile-photo-copy>strong{font-size:var(--type-section-title);font-weight:650;line-height:1.4}
.user-profile-dialog .profile-identity-role{padding:3px 8px;border-radius:20px;background:var(--accent-soft);color:var(--text-link);font-size:var(--type-meta);line-height:1.4}
.user-profile-dialog .profile-photo-copy>p{font-size:var(--type-meta)}
.user-profile-dialog .profile-photo-copy>small{font-size:var(--type-meta)}
.user-profile-dialog .profile-photo-actions{display:flex;justify-content:center;gap:var(--space-inline);margin:0;width:100%}
.user-profile-dialog .profile-photo-actions>button{padding:var(--action-padding-block) var(--action-padding-inline);min-height:var(--control-target);font-size:var(--type-action)}
.user-profile-dialog .profile-section-pin{grid-column:1;grid-row:2}
.user-profile-dialog .profile-section-pin .profile-section-title{align-items:flex-start;font-size:var(--type-label)}
.user-profile-dialog .profile-pin-summary{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-fields);min-width:0}
.profile-pin-status{order:-1;font-size:var(--type-meta);color:var(--text-secondary);border:1px solid var(--line);border-radius:20px;padding:4px 8px;overflow-wrap:anywhere}
.profile-pin-status[data-configured=true]{color:var(--text-success);background:var(--surface-success)}
.user-profile-dialog .profile-pin-summary>.profile-section-hint{font-size:var(--type-meta)}
body.in-workspace .user-profile-dialog .profile-pin-manage{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:var(--control-target);min-height:var(--control-target);margin:0;box-shadow:none;font-size:var(--type-action);background:var(--accent-soft);border-color:var(--accent-ring);color:var(--text-link)}
body.in-workspace .user-profile-dialog .profile-pin-manage:hover{background:var(--surface-hover)}
body.in-workspace .user-profile-dialog .profile-pin-manage:active{background:var(--surface-pressed)}
.profile-pin-manage .icon{width:18px;height:18px;flex-shrink:0}.profile-pin-retry[hidden]{display:none!important}
@media(max-width:899px){
 :root body.in-workspace .user-profile-dialog .operations-fields{grid-template-columns:minmax(0,1fr)}
 .user-profile-dialog .profile-details{grid-column:1;grid-row:auto}
 .user-profile-dialog .profile-section-photo,.user-profile-dialog .profile-section-pin{grid-column:1;grid-row:auto}
 :root body.in-workspace .user-profile-dialog .profile-photo-section{grid-template-columns:64px minmax(0,1fr);justify-items:stretch}
 .user-profile-dialog .profile-photo-preview .team-profile-avatar{width:64px;height:64px}
 .user-profile-dialog .profile-photo-copy{align-items:flex-start;text-align:left}
 .user-profile-dialog .profile-photo-actions{justify-content:flex-start;flex-wrap:wrap}
 .user-profile-dialog .profile-pin-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
 .user-profile-dialog .profile-pin-summary>.profile-section-hint{grid-column:1/-1}
 .user-profile-dialog .profile-pin-status{order:0;justify-self:start}
 .user-profile-dialog .profile-pin-manage{justify-self:end;max-width:100%}
}
@media(max-width:700px){body.in-workspace dialog.user-profile-dialog{max-width:calc(100vw - 16px)}.user-profile-dialog .profile-details{gap:var(--space-fields)}}
/* Budget editor: compact sections and a quiet tool row, shared by draft and consultation. */
:root body.in-workspace .estimate-editor .estimate-section{padding:var(--action-padding-inline);border:1px solid var(--line);border-radius:var(--action-radius);background:var(--surface-field);gap:var(--space-fields);min-width:0}
:root body.in-workspace .estimate-editor .estimate-section-heading{grid-column:1/-1;display:flex;align-items:center;gap:var(--space-inline);margin:0;font-size:var(--type-label);color:var(--text-secondary)}
.estimate-section-heading>.icon,.estimate-items-icon>.icon{width:18px;height:18px;flex:none;color:var(--text-link)}
.estimate-items-icon{display:flex;align-items:center}
:root body.in-workspace .estimate-editor .estimate-editor-document{padding-top:var(--space-inline);border-top:1px solid var(--line);min-width:0}
:root body.in-workspace .estimate-editor .customer-dialog-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-inline)}
:root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-editor-total{flex:1 0 100%;box-sizing:border-box;margin:0}
:root body.in-workspace .estimate-editor .estimate-editor-total strong{font-size:var(--type-dialog-title);line-height:1.4;letter-spacing:0}
:root body.in-workspace .estimate-editor .customer-dialog-actions>button{width:auto;flex:0 1 auto}
:root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-tool{display:inline-flex;align-items:center;justify-content:center;flex:0 0 var(--control-target);width:var(--control-target);height:var(--control-target);padding:0;box-shadow:none;background:transparent;border-color:var(--line);font-size:0}
:root body.in-workspace .estimate-editor .estimate-tool>span{display:none}
:root body.in-workspace .estimate-editor .estimate-tool>.icon{width:18px;height:18px}
:root body.in-workspace .estimate-editor .estimate-editor-send{color:var(--text-link);background:var(--accent-soft);border:1px solid var(--accent-ring);box-shadow:none}
:root body.in-workspace .estimate-editor .estimate-tool:hover{background:var(--surface-hover)}
:root body.in-workspace .estimate-editor .estimate-tool:active{background:var(--surface-pressed)}
@media(max-width:700px){
 :root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-editor-send{flex:1 0 100%;order:1}
 :root body.in-workspace .estimate-editor .customer-dialog-actions>button[type=submit]{margin-left:auto}
 :root body.in-workspace .estimate-editor .estimate-editor-items>header{flex-wrap:wrap}
 :root body.in-workspace .estimate-editor .estimate-editor-data{grid-template-columns:minmax(0,1fr)}
}
:root body.in-workspace dialog.estimate-conversion{width:720px;max-width:calc(100vw - 24px)}
:root body.in-workspace .estimate-conversion .conversion-types{border:0;padding:0;gap:var(--space-inline);width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
:root body.in-workspace .estimate-conversion .conversion-types button{display:flex;align-items:center;justify-content:center;gap:var(--space-inline);min-height:var(--control-target);border:1px solid var(--line);background:var(--surface-field);font-size:var(--type-action);padding:var(--action-padding-block) var(--action-padding-inline);min-width:0}
:root body.in-workspace .estimate-conversion .conversion-types button[aria-pressed=true]{border-color:var(--accent-ring);background:var(--accent-soft);color:var(--text-link)}
:root body.in-workspace .estimate-conversion .conversion-types button:hover{background:var(--surface-hover)}
:root body.in-workspace .estimate-conversion .conversion-types button:active{background:var(--surface-pressed)}
:root body.in-workspace .estimate-conversion .conversion-types .icon{width:18px;height:18px;flex:none}
:root body.in-workspace .estimate-conversion .conversion-item{grid-template-columns:minmax(0,1fr);padding:var(--action-padding-inline);gap:var(--space-inline)}
:root body.in-workspace .estimate-conversion .conversion-item-head{display:flex;align-items:start;justify-content:space-between;gap:var(--space-inline)}
:root body.in-workspace .estimate-conversion .conversion-item-head small{flex-shrink:0;font-size:var(--type-meta)}
@media(max-width:480px){:root body.in-workspace .estimate-conversion .conversion-foot{flex-wrap:wrap}}
/* The budget board uses the same paired stage navigation as service orders. */
:root body.in-workspace .estimates-module .customer-toolbar>.estimate-board-controls{display:flex;align-self:end;flex:0 0 auto;gap:0;margin:0;padding:0;border:1px solid var(--line);border-radius:11px;background:var(--surface-field);box-shadow:none}
:root body.in-workspace .estimates-module .estimate-board-controls>button{display:grid;place-items:center;width:var(--control-target);height:var(--control-target);min-height:var(--control-target);min-width:var(--control-target);margin:0;padding:0;border:0;border-radius:10px;background:transparent;box-shadow:none;color:var(--text-link)}
:root body.in-workspace .estimates-module .estimate-board-controls>button:disabled{opacity:.3;cursor:default}
:root body.in-workspace .estimates-module .estimate-board-controls>button:not(:disabled):hover{background:var(--surface-hover)}
:root body.in-workspace .estimates-module .estimate-board-controls>button:not(:disabled):active{background:var(--surface-pressed)}
:root body.in-workspace .estimates-module .estimate-board-controls>button:focus-visible{outline:2px solid var(--text-link);outline-offset:-3px}
:root body.in-workspace .estimates-module .estimate-board-controls[hidden]{display:none}
@media(max-width:700px){:root body.in-workspace .estimates-module .customer-toolbar>.estimate-board-controls{display:none}}

/* Keep contact and birthday fields in two compact rows on wide profile dialogs. */
@media(min-width:900px){
 :root body.in-workspace .user-profile-dialog.is-self-profile .profile-section-personal .profile-section-fields{grid-template-columns:repeat(6,minmax(0,1fr))}
 .user-profile-dialog.is-self-profile .profile-section-personal .profile-section-fields>label{grid-column:span 2}
 .user-profile-dialog.is-self-profile .profile-section-personal .profile-section-fields>label:nth-child(-n+2){grid-column:span 3}
}

/* Compact collaborator editor: a single reading column, without nested cards. */
:root body.in-workspace dialog.team-editor{width:720px;max-width:calc(100vw - 24px);padding:var(--space-panel)}
:root body.in-workspace .team-editor .operations-fields{grid-template-columns:minmax(0,1fr);gap:var(--space-section);align-items:start}
.team-editor-section{min-width:0;margin:0;padding:0;border:0;background:transparent}
.team-editor-section+.team-editor-section{border-top:1px solid var(--line);padding-top:var(--space-fields)}
.team-editor-section>header{display:flex;align-items:center;gap:var(--space-inline);margin-bottom:var(--space-inline);min-width:0}
:root body.in-workspace .team-editor-section h3{margin:0;font-size:var(--type-label);line-height:1.4;font-weight:650;color:var(--text-primary)}
.team-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-fields);align-items:start;min-width:0}
:root body.in-workspace .team-editor .os-field{display:grid;gap:var(--space-inline);min-width:0;font-size:var(--type-label);line-height:1.4;margin:0}
:root body.in-workspace .team-editor :is(input,select){min-width:0;width:100%;font-size:var(--type-control);margin:0}
.team-editor .os-note{margin:0;font-size:var(--type-meta);line-height:1.4;color:var(--text-secondary)}
.team-editor-secret{display:flex;align-items:center;min-width:0;position:relative;border:1px solid var(--line);border-radius:var(--action-radius);background:var(--surface-field)}
:root body.in-workspace dialog.team-editor .team-editor-secret>input{border:0;box-shadow:none;background:transparent;border-radius:var(--action-radius);padding-inline-end:calc(var(--control-target) + var(--space-inline))}
.team-editor-secret:focus-within{outline:2px solid var(--text-link);outline-offset:1px}
:root body.in-workspace .team-editor-secret>button{position:absolute;inset-inline-end:0;top:0;bottom:0;width:var(--control-target);min-width:var(--control-target);max-width:var(--control-target);min-height:var(--control-target);height:100%;padding:var(--space-inline);display:grid;place-items:center;background:transparent;border:0;box-shadow:none;color:var(--text-secondary);border-radius:0 var(--action-radius) var(--action-radius) 0;cursor:pointer}
.team-secret-toggle .icon{width:18px;height:18px}
:root body.in-workspace .team-editor .team-editor-state{display:flex;align-items:center;gap:var(--space-inline);align-self:end;min-height:var(--control-target);padding:var(--space-inline);color:var(--text-primary);cursor:pointer}
:root body.in-workspace .team-editor :is(.team-editor-state,.team-editor-branch)>input{width:18px;height:18px;min-width:18px;min-height:18px;flex:none;margin:0;accent-color:var(--accent)}
.team-editor-branches .team-editor-fields{grid-template-columns:minmax(0,1fr);gap:var(--space-inline)}
.team-editor-count{margin-inline-start:auto;color:var(--text-secondary);font-size:var(--type-meta);text-align:end;line-height:1.4}
.team-editor-branches-list{display:flex;flex-wrap:wrap;gap:var(--space-inline);max-height:180px;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent;padding:2px}
.team-editor-branch-option{min-width:0;max-width:100%;flex:0 1 280px;border:1px solid var(--line);border-radius:var(--action-radius);background:transparent}
.team-editor-branch-option.is-selected{border-color:var(--accent-ring);background:var(--accent-soft)}
.team-editor-branch-option:hover{background:var(--surface-hover)}.team-editor-branch-option:active{background:var(--surface-pressed)}
:root body.in-workspace dialog.team-editor.mobile-scroll-shell label.team-editor-branch{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;flex-wrap:nowrap;gap:var(--space-inline);height:100%;box-sizing:border-box;min-height:var(--control-target);padding:var(--action-padding-block) var(--action-padding-inline);cursor:pointer}
.team-editor-branch-copy{display:grid;gap:2px;min-width:0}.team-editor-branch-copy strong{font-size:var(--type-body);font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}.team-editor-branch-copy small{font-size:var(--type-meta);color:var(--text-secondary);overflow-wrap:anywhere}
:root body.in-workspace .team-editor .team-editor-secret>button:hover{background:var(--surface-hover)}
:root body.in-workspace .team-editor .team-editor-secret>button:active{background:var(--surface-pressed)}
.team-editor-branch:focus-within,.team-editor-state:focus-within{outline:2px solid var(--text-link);outline-offset:2px}
.team-editor-permission-note{grid-column:1/-1}.team-editor [hidden]{display:none!important}
@media(max-width:420px){.team-editor-fields{grid-template-columns:minmax(0,1fr)}.team-editor-section>header{flex-wrap:wrap}.team-editor-count{flex-basis:100%;text-align:start;margin:0}}

.team-editor-main-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--space-fields);align-items:end;min-width:0}
.team-editor-main-grid>.os-field{grid-column:span 4}
.team-editor-main-grid>:is(.team-editor-field-name,.team-editor-field-email,.team-editor-field-password){grid-column:span 6}
.team-editor-main-grid>:is(.team-editor-field-role,.team-editor-field-active){grid-column:span 3}
.team-editor-main-grid>:is(.team-editor-field-password,.team-editor-field-role){align-self:start}
:root body.in-workspace .team-editor-main-grid>.team-editor-state{align-self:start;margin-top:0;padding-inline:0}
.team-editor-branches{border-top:1px solid var(--line);padding-top:var(--space-fields)}
@media(max-width:700px){
 .team-editor-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .team-editor-main-grid>.os-field{grid-column:auto}
 .team-editor-main-grid>:is(.team-editor-field-name,.team-editor-field-email,.team-editor-field-password){grid-column:1/-1}
}
@media(max-width:420px){.team-editor-main-grid{grid-template-columns:minmax(0,1fr)}:root body.in-workspace .team-editor-main-grid>.team-editor-state{margin-top:0}}

:root body.in-workspace dialog.team-editor.mobile-scroll-shell label.team-editor-state{display:flex;flex-wrap:nowrap;padding:0;gap:var(--space-inline)}

/* Consultation of another collaborator is compact; My profile keeps its existing layout. */
:root body.in-workspace dialog.user-profile-dialog:not(.is-self-profile){width:560px;max-width:calc(100vw - 24px);padding:var(--space-panel)}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .operations-fields{grid-template-columns:minmax(0,1fr);gap:var(--space-fields);align-items:start}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-details{grid-column:1;grid-row:auto;display:grid;gap:var(--space-fields);min-width:0}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section{grid-column:1;grid-row:auto;padding:0;border:0;border-radius:0;background:transparent}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section-photo{overflow:visible;padding-bottom:var(--space-fields);border-bottom:1px solid var(--line)}
.user-profile-dialog:not(.is-self-profile) .profile-section-photo::before,.user-profile-dialog:not(.is-self-profile) .profile-section-photo>.profile-section-title{display:none}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-photo-section{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;justify-items:stretch;gap:var(--space-fields)}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-photo-preview .team-profile-avatar{width:56px;height:56px;font-size:var(--type-page-title);margin:0;border:0;box-shadow:none}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-photo-copy{display:flex;flex-flow:row wrap;align-items:center;justify-content:flex-start;gap:var(--space-inline);text-align:start}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-photo-copy>strong{font-size:var(--type-body)}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section-title{font-size:var(--type-label);margin:0 0 var(--space-inline)}
.user-profile-dialog:not(.is-self-profile) .profile-section-symbol,.user-profile-dialog:not(.is-self-profile) .profile-heading>p{display:none}
:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-fields)}
@media(max-width:420px){:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section-fields{grid-template-columns:minmax(0,1fr)}}

:root body.in-workspace .user-profile-dialog:not(.is-self-profile) .profile-section-photo .profile-photo-section{grid-template-columns:56px minmax(0,1fr)}
.user-profile-dialog:not(.is-self-profile) .profile-photo-preview{justify-self:start}

/* Align the checkbox with the control below the adjacent Profile label. */
:root body.in-workspace dialog.team-editor.mobile-scroll-shell label.team-editor-state{box-sizing:border-box;padding-block-start:calc(var(--type-label)*1.4 + var(--space-inline));min-height:calc(var(--control-target) + var(--type-label)*1.4 + var(--space-inline))}
@media(max-width:420px){:root body.in-workspace dialog.team-editor.mobile-scroll-shell label.team-editor-state{padding-block-start:0;min-height:var(--control-target)}}
.access-profiles-content{min-width:0;margin-top:var(--space-panel)}
.access-profiles-tabs{margin:0}
.access-profiles-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,140px) auto;align-items:end;gap:var(--space-inline);margin-block:var(--space-fields)}
.access-profiles-toolbar .os-field{margin:0;min-width:0}
.access-profiles-toolbar .submit-button{width:auto}
.access-profiles-list{display:grid;gap:var(--space-inline)}
.access-profile-row{display:flex;align-items:center;gap:var(--space-inline);padding:var(--space-fields);background:var(--surface-field);border:1px solid var(--line);border-radius:var(--action-radius)}
.access-profile-copy{min-width:0;flex:1;display:grid;gap:4px}
.access-profile-copy strong{font-size:var(--type-body);overflow-wrap:anywhere}
.access-profile-copy small{font-size:var(--type-meta);color:var(--muted);overflow-wrap:anywhere}
.access-profile-heading{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-inline)}
.access-profile-actions{display:flex;flex-wrap:nowrap;gap:var(--space-inline)}
.access-profile-actions button{width:var(--control-target);height:var(--control-target);padding:var(--space-inline);flex:none}
.access-profile-actions .icon{width:18px;height:18px}
.access-profile-basics{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px);gap:var(--space-fields);border-bottom:1px solid var(--line);padding-bottom:var(--space-fields)}
.access-profile-basics .os-field{margin:0;min-width:0}
.access-profile-basics .os-field:last-child{grid-column:1/-1;display:flex;align-items:center;flex-direction:row;gap:var(--space-inline);min-height:var(--control-target)}
.access-profile-basics input[type=checkbox]{width:20px;height:20px;min-height:0;flex:none}
@media(max-width:700px){.access-profiles-toolbar{grid-template-columns:minmax(0,1fr) minmax(90px,120px)}.access-profiles-toolbar>button{grid-column:1/-1;justify-self:start}.access-profile-row{padding:var(--space-inline)}.access-profile-basics{grid-template-columns:minmax(0,1fr)}}

.access-profile-status{font-size:var(--type-meta);color:var(--muted);background:var(--surface-hover);border-radius:999px;padding:4px 8px}
.access-profile-status[data-active=true]{color:var(--text-success)}

/* Cargo identifies the work; the selected access profile alone grants permissions. */
@media(min-width:701px){.team-editor-main-grid>.team-editor-field-jobTitle{grid-column:span 6}.team-editor-main-grid>.team-editor-field-password{grid-column:span 6}.team-editor-main-grid>.team-editor-field-role{grid-column:span 6}.team-editor-main-grid>.team-editor-field-active{grid-column:span 6}}
@media(min-width:701px){.team-editor-main-grid>.team-editor-field-jobTitle{align-self:start}}
/* Independent estimate follows the service-order workspace hierarchy. */
:root body.in-workspace dialog.estimate-editor{width:1080px;max-width:calc(100vw - 24px);height:min(900px,calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
:root body.in-workspace .estimate-editor>.mobile-dialog-scroll{height:100%;max-height:100%;box-sizing:border-box;padding:var(--space-panel);overflow:hidden}
:root body.in-workspace .estimate-editor .customer-dialog-header{display:grid;grid-template-columns:minmax(0,1fr) var(--control-target);align-items:start;gap:var(--space-fields) var(--space-inline);margin:0;padding:0 0 var(--space-fields);border-bottom:1px solid var(--line)}
.estimate-editor .estimate-heading-row{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-fields);min-width:0;min-height:var(--control-target)}
.estimate-editor .estimate-heading-row h2{margin:0;font-size:var(--type-dialog-title);overflow-wrap:anywhere}
.estimate-heading-badges{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-inline);min-width:0}
.estimate-heading-status,.estimate-heading-expired{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-field);color:var(--text-secondary);font-size:var(--type-meta);line-height:1.4}
.estimate-heading-status::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.estimate-heading-status[data-state=approved]{color:var(--text-success)}
.estimate-heading-status[data-state=awaiting_approval]{color:var(--text-warning)}
.estimate-heading-status[data-state=declined],.estimate-heading-status[data-state=cancelled]{color:var(--text-error)}
.estimate-heading-expired{color:var(--text-error);background:var(--surface-error);border-color:var(--border-error,var(--line))}
.estimate-editor .estimate-heading-identity{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:var(--space-section);min-width:0;align-items:start}
:root body.in-workspace .estimate-editor .estimate-editor-customer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;padding:0;gap:var(--space-inline);margin:0;border:0;border-radius:0;background:transparent;min-width:0}
.estimate-editor .estimate-editor-customer-icon{display:none}
.estimate-editor .estimate-editor-customer>div,.estimate-heading-subject{display:grid;gap:4px;min-width:0}
.estimate-editor .estimate-editor-customer strong,.estimate-heading-subject strong{font-size:var(--type-body);line-height:1.4;overflow-wrap:anywhere}
.estimate-editor .estimate-editor-customer button{margin:0;font-size:var(--type-action)}
.estimate-heading-subject>small{font-size:var(--type-meta)}
.estimate-heading-branch{grid-column:1/-1}
.estimate-heading-branch:empty{display:none}
.estimate-editor .customer-dialog-header>.estimate-editor-delivery{grid-column:1/-1;min-width:0}
:root body.in-workspace .estimate-editor .operations-fields{display:block;padding:var(--space-fields) 0 0;min-width:0}
:root body.in-workspace .estimate-editor .estimate-workspace-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-fields);min-width:0}
:root .estimate-workspace-panel[hidden]{display:none!important}
:root body.in-workspace .estimate-editor .estimate-editor-tabs{margin:var(--space-fields) 0 0;flex-shrink:0;gap:4px;border-bottom:1px solid var(--line);scrollbar-width:none}
:root body.in-workspace .estimate-editor .estimate-editor-tabs>button{width:auto;flex:0 0 auto;min-height:var(--control-target);padding:var(--action-padding-block) var(--action-padding-inline);font-size:var(--type-action);background:var(--surface-field);white-space:nowrap}
.estimate-editor .estimate-workspace-panel>.work-schedule{margin:0}
:root body.in-workspace .estimate-editor .estimate-editor-total{flex:1 1 150px;padding:0;margin:0;border:0;border-radius:0;background:transparent;display:grid;justify-content:start;gap:2px}
:root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-editor-total{flex:1 1 150px}
:root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-control-more{display:none}
:root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-editor-send{flex:0 1 auto;order:0}
.estimate-editor .estimate-editor-status{background:var(--surface-field);border:1px solid var(--line);padding:var(--space-fields)}
@media(max-width:700px){
 :root body.in-workspace dialog.estimate-editor{height:calc(100dvh - var(--mobile-nav-height,0px) - 16px);max-height:calc(100dvh - var(--mobile-nav-height,0px) - 16px);max-width:calc(100vw - 16px)}
 :root body.in-workspace .estimate-editor .customer-dialog-header{gap:var(--space-inline);padding-bottom:var(--space-inline)}
 .estimate-editor .estimate-heading-row{gap:var(--space-inline);align-content:center}
 .estimate-heading-badges{gap:4px}
 .estimate-editor .estimate-heading-identity{gap:var(--space-inline)}
 :root body.in-workspace .estimate-editor .estimate-editor-customer{grid-template-columns:minmax(0,1fr) var(--control-target);gap:4px}
 :root body.in-workspace .estimate-editor .estimate-editor-customer>button{grid-column:2}
 .estimate-editor .estimate-editor-customer .customer-message-entry{grid-column:1/-1}
 .estimate-editor .estimate-editor-customer>div>small:last-child{display:none}
 :root body.in-workspace .estimate-editor .customer-dialog-actions{display:flex;gap:var(--space-inline);padding-top:var(--space-inline)}
 :root body.in-workspace .estimate-editor .customer-dialog-actions>button:not(.estimate-control-more):not(.estimate-control-save),:root body.in-workspace .estimate-editor .customer-dialog-actions>a{display:none!important}
 :root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-control-more{display:flex;order:1;flex:0 0 auto}
 :root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-control-save{display:flex;order:2;flex:1 1 0;min-width:0}
 :root body.in-workspace .estimate-editor .customer-dialog-actions>.estimate-editor-total{flex:1 0 100%;display:flex;justify-content:space-between;align-items:center;order:0;padding-bottom:var(--space-inline);border-bottom:1px solid var(--line)}
}
