/* v0.58.40 final density and alignment corrections from visual acceptance review. */

/* Workspace: radio cards are choices, not ordinary required form fields. */
.speedtex-workspace-intro p:last-child{max-width:48rem;margin-bottom:0;line-height:1.55}
label.speedtex-workspace-card::after{display:none!important;content:none!important}
.speedtex-workspace-card{display:grid!important;grid-template-columns:auto auto minmax(0,1fr);align-items:center!important;min-height:7rem!important;padding:1rem 1.1rem!important;overflow:hidden!important}
.speedtex-workspace-card .speedtex-workspace-detail{align-content:center}

/* Work Order overview and intake facts: exactly two useful columns. */
.speedtex-work-order-overview>.speedtex-facts,
.speedtex-work-order-overview .speedtex-work-order-more>.speedtex-facts,
.speedtex-intake-panel>.speedtex-facts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important}
.speedtex-work-order-overview>.speedtex-facts>div,
.speedtex-work-order-overview .speedtex-work-order-more>.speedtex-facts>div,
.speedtex-intake-panel>.speedtex-facts>div{display:grid!important;grid-template-columns:minmax(9rem,.72fr) minmax(0,1.28fr)!important;align-items:start;gap:.55rem;padding:.72rem .8rem}

/* Tech Bench: use both columns, then return to full width for the checklist. */
.speedtex-tech-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start}
.speedtex-tech-form>.speedtex-tech-diagnostic{grid-column:1!important}
.speedtex-tech-form>.speedtex-tech-work{grid-column:2!important}
.speedtex-tech-form>.speedtex-tech-checklist{grid-column:1/-1!important}
.speedtex-tech-form>.speedtex-tech-results{grid-column:1!important}
.speedtex-tech-form>.speedtex-tech-summary{grid-column:2!important}
.speedtex-tech-form>.speedtex-tech-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,14rem));justify-content:end;gap:.75rem}
.speedtex-tech-actions button{width:100%!important;min-width:0!important;min-height:46px!important;height:46px!important;margin:0!important;padding:.65rem .85rem!important;line-height:1.2!important}

/* Customer paperwork fields remain readable and equal-height. */
.speedtex-documents-panel .speedtex-document-form{display:grid!important;grid-template-columns:minmax(12rem,.85fr) minmax(14rem,1fr) minmax(18rem,1.25fr) auto!important;gap:.8rem!important;align-items:end!important}
.speedtex-documents-panel .speedtex-document-form label{display:grid!important;grid-template-columns:1fr!important;gap:.35rem!important;min-width:0;margin:0!important}
.speedtex-documents-panel .speedtex-document-form label::after{grid-column:1!important}
.speedtex-documents-panel .speedtex-document-form select,
.speedtex-documents-panel .speedtex-document-form button{width:100%;min-height:46px;height:46px;margin:0!important}
.speedtex-documents-panel .speedtex-document-form button{width:auto;min-width:10.5rem;white-space:nowrap}

/* Customer Repairs & Sales: remove the inherited outer two-column form. */
.speedtex-customer-work-order .speedtex-work-order-create{display:block!important;width:100%!important;max-width:none!important}
.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:none!important;gap:.85rem 1rem!important}
.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid>label{min-width:0;margin:0!important}
.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid>.speedtex-wide{grid-column:1/-1!important}
.speedtex-customer-work-order .speedtex-work-order-create>fieldset,
.speedtex-customer-work-order .speedtex-work-order-create>button{display:block;width:100%;margin-top:1rem}

/* Communications: history is full width first and never horizontally scrolls. */
.speedtex-contact-history-primary{order:-1;width:100%;margin:0 0 1rem!important;padding:1rem!important;border:1px solid #d7e2e9!important;border-radius:.75rem!important;background:#fff!important}
.speedtex-contact-history-primary .speedtex-table-wrap{width:100%;overflow:visible!important}
.speedtex-contact-history-primary table{width:100%!important;min-width:0!important;table-layout:fixed}
.speedtex-contact-history-primary th,
.speedtex-contact-history-primary td{padding:.55rem .45rem!important;font-size:.76rem;line-height:1.3;white-space:normal!important;overflow-wrap:anywhere;vertical-align:top}
.speedtex-contact-history-primary th:nth-child(1){width:14%}
.speedtex-contact-history-primary th:nth-child(2){width:19%}
.speedtex-contact-history-primary th:nth-child(3){width:10%}
.speedtex-contact-history-primary th:nth-child(4){width:11%}
.speedtex-contact-history-primary th:nth-child(5){width:10%}
.speedtex-contact-history-primary th:nth-child(6){width:12%}
.speedtex-contact-history-primary th:nth-child(7){width:9%}
.speedtex-contact-history-primary th:nth-child(8){width:15%}
.speedtex-customer-tab-panel[data-customer-panel="communications"]>.speedtex-detail-grid{align-items:start}

/* Account & Audit: opened tasks use their full width with no empty grid cell. */
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task>summary{padding:.9rem 1rem}
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task>.speedtex-detail-grid,
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task>.speedtex-detail-grid-two{display:grid!important;grid-template-columns:1fr!important;gap:0!important;width:100%}
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task article{width:100%;max-width:none;min-height:0!important}
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task[open]{padding-bottom:0}

@media(max-width:1050px){
  .speedtex-documents-panel .speedtex-document-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .speedtex-documents-panel .speedtex-document-form button{width:100%}
}

@media(max-width:760px){
  .speedtex-workspace-card{grid-template-columns:auto auto minmax(0,1fr)}
  .speedtex-work-order-overview>.speedtex-facts,
  .speedtex-work-order-overview .speedtex-work-order-more>.speedtex-facts,
  .speedtex-intake-panel>.speedtex-facts,
  .speedtex-tech-form,
  .speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid,
  .speedtex-documents-panel .speedtex-document-form{grid-template-columns:1fr!important}
  .speedtex-tech-form>*{grid-column:1!important}
  .speedtex-tech-form>.speedtex-tech-actions{grid-column:1!important;grid-template-columns:1fr!important}
  .speedtex-contact-history-primary .speedtex-table-wrap{overflow-x:auto!important}
  .speedtex-contact-history-primary table{min-width:42rem!important}
}
