/* The first important layer keeps dialog controls usable despite legacy overrides. */
@layer portal-fit-repair {
 body dialog.customerHoursSimple[open],body dialog.billingAttachmentDialog[open]{
  display:flex!important;flex-direction:column!important;box-sizing:border-box!important;
  position:fixed!important;inset:8px!important;margin:0!important;
  width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;
  height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;
  padding:0!important;overflow:hidden!important;
 }
 body dialog.customerHoursSimple>header,body dialog.billingAttachmentDialog>header{flex:0 0 auto!important;position:relative!important;}
 body dialog.customerHoursSimple>.driverReportBody,body dialog.billingAttachmentDialog>.attachmentBody{
  flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding:16px!important;
 }
 body .customerHoursSimple .driverReportControls>label{min-width:0!important;}
 body .customerHoursSimple .customerHoursFooter{flex-wrap:wrap!important;}
 body .billingAttachmentDialog header{display:flex!important;gap:12px!important;align-items:center!important;padding:12px!important;}
 body .billingAttachmentDialog iframe{width:100%!important;height:55dvh!important;border:1px solid #cad8e8!important;}
 body .billingAttachmentDialog input{max-width:100%!important;box-sizing:border-box!important;}
 body :is(#settlementDialog,.customerHoursSimple,.billingAttachmentDialog) button{
  background:#1762e8!important;color:white!important;border:1px solid #1762e8!important;
  border-radius:10px!important;min-height:44px!important;height:auto!important;white-space:normal!important;
  padding:8px 12px!important;
 }
 body #settlementDialog .settleToolbar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:8px!important;}
 body #settlementDialog .settleToolbar>button{width:100%!important;min-width:0!important;}
 body :is(#settlementDialog,.customerHoursSimple,.billingAttachmentDialog) button:disabled{opacity:.55!important;}
 body .billingAttachmentDialog [hidden]{display:none!important;}
 @media(max-width:600px){
  body .customerHoursSimple .driverReportControls{grid-template-columns:minmax(0,1fr)!important;}
  body .customerHoursSimple .card .driverReportControls{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body #settlementDialog .settleToolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body #settlementDialog .settleToolbar>button:last-child{grid-column:1/-1!important;}
 }
}
