/* v0.58.39 workspace, Work Order, Tech Bench, and customer-detail corrections. */

/* Workspace choices are all first-class and never clipped. */
.speedtex-workspace-primary{grid-template-columns:repeat(2,minmax(0,1fr))}
.speedtex-workspace-card{min-width:0;overflow:visible}
.speedtex-workspace-detail{min-width:0}
.speedtex-workspace-detail strong,.speedtex-workspace-detail small{overflow-wrap:anywhere}
.speedtex-workspace-card-tech_bench{border-color:#83cbd3;background:#f3fcfd}
.speedtex-workspace-card-tech_bench .speedtex-workspace-icon::before{content:"TB"}

/* Compact Work Order stage controls with a deliberately separate closed stage. */
.speedtex-board-lanes{display:grid!important;grid-template-columns:repeat(4,minmax(145px,1fr))!important;gap:.65rem!important;overflow:visible!important;align-items:stretch}
.speedtex-board-lanes .speedtex-board-lane{display:flex;min-width:0!important;max-width:none!important;min-height:58px;flex:none!important;overflow:visible;opacity:1}
.speedtex-board-lanes .speedtex-board-lane span{min-width:0;color:#21415d!important;overflow-wrap:anywhere}
.speedtex-board-lanes .speedtex-board-lane strong{flex:0 0 auto;min-width:2rem;height:2rem}
.speedtex-board-lane-completed{grid-column:4;border-style:dashed!important;background:#f7f9fb!important}
.speedtex-board-lane-completed::before{content:"Closed";display:block;position:absolute;transform:translateY(-1.25rem);font-size:.68rem;font-weight:800;color:#65798a;text-transform:uppercase;letter-spacing:.08em}

/* One photo workflow. */
.speedtex-media-upload-unified{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem;align-items:start}
.speedtex-media-upload-unified>.speedtex-wide{grid-column:1/-1}
.speedtex-media-upload-unified label{margin:0}
.speedtex-media-upload-unified button{width:auto;justify-self:start;min-width:14rem}
.speedtex-mobile-photo-panel .speedtex-photo-comparisons{margin-top:1rem}
.speedtex-photo-grid{gap:.8rem}

/* Progressive Tech Bench. */
.speedtex-tech-device-head{align-items:flex-start;flex-wrap:wrap}
.speedtex-tech-progress{display:inline-flex;align-items:center;min-height:2rem;padding:.35rem .65rem;border-radius:999px;background:#eaf7f1;color:#176a45;font-size:.8rem;font-weight:800}
.speedtex-checklist-groups{display:grid;gap:.65rem}
.speedtex-checklist-group{border:1px solid #d4e2e8;border-radius:.65rem;background:#fff;overflow:hidden}
.speedtex-checklist-group>summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem .9rem;cursor:pointer;color:#143d59;font-weight:800;background:#f4f8fa}
.speedtex-checklist-group>summary strong{display:inline-grid;place-items:center;min-width:2.6rem;padding:.2rem .45rem;border-radius:999px;background:#e3eef3;color:#34576d;font-size:.78rem}
.speedtex-checklist-group>.speedtex-checklist-row{margin:0 .55rem}
.speedtex-checklist-row input[hidden]{display:none!important}
.speedtex-tech-actions{display:flex;justify-content:flex-end;gap:.75rem}
.speedtex-tech-actions button{width:auto;min-width:12rem}

/* Payment/document actions align as one compact operation. */
.speedtex-document-form{align-items:end!important}
.speedtex-document-form label{margin:0}
.speedtex-document-form button{min-height:46px;margin:0}
.speedtex-document-panel .speedtex-panel-flush,.speedtex-document-form{min-height:0}

/* Completion blockers are grouped, countable, and actionable. */
.speedtex-completion-gates{padding:0!important;background:transparent!important;border:0!important}
.speedtex-completion-gates>summary{padding:1rem;border-left:4px solid #d99a21;border-radius:.65rem;background:#fff9ea}
.speedtex-gate-groups{display:grid;gap:.65rem;margin-top:.75rem}
.speedtex-gate-group{border:1px solid #ecdcae;border-radius:.65rem;background:#fffdf6}
.speedtex-gate-group>summary{padding:.8rem 1rem;cursor:pointer;font-weight:800;color:#5c4b1d}
.speedtex-gate-group ul{display:grid;gap:.45rem;margin:.25rem 1rem 1rem;padding-left:1.2rem}
.speedtex-gate-group li{padding:.4rem .5rem}
.speedtex-gate-jump{width:auto!important;min-height:34px;margin:.35rem 0 0;padding:.35rem .65rem;font-size:.78rem;background:#fff!important;color:#0b6695!important;border:1px solid #8dbbd0!important;box-shadow:none!important}

/* Customer operational forms use the available width. */
.speedtex-customer-work-order{width:100%}
.speedtex-customer-work-order .speedtex-work-order-create,.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid{width:100%;max-width:none}
.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem 1rem}
.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid>.speedtex-wide{grid-column:1/-1}
.speedtex-customer-work-order .speedtex-device-intake-choice{display:grid;grid-template-columns:minmax(14rem,.7fr) minmax(20rem,1.3fr);gap:1rem;align-items:start}
.speedtex-customer-work-order .speedtex-device-intake-choice label{margin:0}
.speedtex-customer-tab-panel[data-customer-panel="devices"]>.speedtex-detail-grid{align-items:start}
.speedtex-customer-tab-panel[data-customer-panel="devices"] input[type=number]{min-height:46px;height:auto}

/* Identifier reveal stays visually attached to the exact device. */
.speedtex-record-list>[data-speedtex-device-card]{position:relative}
.speedtex-record-list .speedtex-identifier-reveal{display:grid;gap:.55rem;margin:.75rem 0;padding:.8rem;border:1px solid #d8a45f;border-left:4px solid #d28c26;border-radius:.6rem;background:#fff9ed}
.speedtex-record-list .speedtex-identifier-reveal code{width:max-content;max-width:100%;padding:.3rem .5rem;border-radius:.35rem;background:#17243a;color:#fff;overflow-wrap:anywhere}
.speedtex-identifier-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.speedtex-identifier-actions button{width:auto;min-height:36px;padding:.4rem .7rem}
.speedtex-identifier-actions span{font-size:.78rem;color:#6a5732}

/* Communication history fills the otherwise empty left column. */
.speedtex-contact-history-inline{margin:1rem 0 0;padding:1rem 0 0;border:0;border-top:1px solid #dbe7ec;border-radius:0;box-shadow:none;background:transparent}
.speedtex-contact-history-inline h2{font-size:1rem}
.speedtex-opt-out-task{margin-top:1rem;border-top:1px solid #dbe7ec;padding-top:.8rem}
.speedtex-opt-out-task>summary{cursor:pointer;color:#0b6695;font-weight:800}
.speedtex-opt-out-task form{margin-top:.8rem}

/* Account and audit remains progressive, with destructive work collapsed. */
.speedtex-customer-tab-panel[data-customer-panel="account"]{gap:.75rem}
.speedtex-customer-tab-panel[data-customer-panel="account"]>.speedtex-admin-task{border:1px solid #d7e2e9;border-radius:.65rem;background:#fff}

@media(max-width:1050px){
  .speedtex-board-lanes{grid-template-columns:repeat(3,minmax(140px,1fr))!important}
  .speedtex-board-lane-completed{grid-column:auto}
  .speedtex-media-upload-unified{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  .speedtex-workspace-primary{grid-template-columns:1fr}
  .speedtex-board-lanes{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;padding:.2rem .2rem .55rem!important;scroll-snap-type:x proximity}
  .speedtex-board-lanes .speedtex-board-lane{flex:0 0 150px!important;scroll-snap-align:start}
  .speedtex-board-lane-completed::before{display:none}
  .speedtex-media-upload-unified,.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid,.speedtex-customer-work-order .speedtex-device-intake-choice{grid-template-columns:1fr}
  .speedtex-media-upload-unified>.speedtex-wide,.speedtex-customer-work-order .speedtex-work-order-create>.speedtex-form-grid>.speedtex-wide{grid-column:auto}
  .speedtex-media-upload-unified button,.speedtex-tech-actions button{width:100%;min-width:0}
  .speedtex-tech-actions{display:grid;grid-template-columns:1fr}
}
