/* Center entry screens and keep fields readable on wide displays. */
body main .bp-form-page:not(.company-create-page),
body main .bp-unit-page,
body main .materials-page:has(.materials-form,.service-form),
body main .accounting-page:has(.accounting-form),
body main .staff-catalog{width:100%;max-width:960px;margin:20px auto;box-sizing:border-box}
body main .employee-profile-page{max-width:960px}
body main .lab-workspace:has(.order-compact){width:100%;max-width:1040px;margin:20px auto}
body main .lab-workspace:has(.ops-entry),
body main .lab-workspace:has(.lab-order-form):not(:has(.order-compact)){width:100%;max-width:800px;margin:20px auto}
body main .permissions-page{width:100%;max-width:1180px;margin:20px auto}
body main .bp-form-page .bp-form-card,
body main .bp-unit-page .bp-form-card,
body main .lab-workspace:has(.lab-order-form,.ops-entry)>.card{padding:20px}
body main .bp-form-page:not(.company-create-page) .bp-form-card form,
body main .employee-profile-page form.employee-profile-form,
body main .materials-page .materials-form,
body main .materials-page .service-form,
body main .order-compact .order-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body main .employee-profile-page .employee-access-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body main .ops-entry,
body main .lab-order-form:not(#lab-order-form){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body main .order-compact .order-description{grid-column:1/-1}
body main .order-compact .order-calculation-columns{grid-template-columns:minmax(0,1fr)}
body main .form-group.inline-date-field label.inline-date-label{position:absolute;z-index:1;top:0;left:9px;max-width:calc(100% - 145px);height:34px;margin:0;font-size:12px;line-height:34px;font-weight:400;color:var(--text-secondary);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body main .inline-date-field>span:has(>.inline-date-label){display:contents}
@media(max-width:760px){
  body main .bp-form-page:not(.company-create-page) .bp-form-card form,
  body main .employee-profile-page form.employee-profile-form,
  body main .materials-page .materials-form,
  body main .materials-page .service-form,
  body main .order-compact .order-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:540px){
  body main .bp-form-page:not(.company-create-page) .bp-form-card form,
  body main .employee-profile-page form.employee-profile-form,
  body main .employee-profile-page .employee-access-fields,
  body main .materials-page .materials-form,
  body main .materials-page .service-form,
  body main .order-compact .order-fields,
  body main .ops-entry,
  body main .lab-order-form:not(#lab-order-form){grid-template-columns:minmax(0,1fr)}
  body main .bp-form-page .bp-form-card,
  body main .lab-workspace:has(.lab-order-form,.ops-entry)>.card{padding:14px}
  body main .bp-form-page form>.form-group,
  body main .materials-page form>.form-group{grid-column:1/-1}
}
