
/* V5.1.161 FIX 07 — Chart summary/action row only */
.chart-documentation .chart-doc-summary-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:38px!important;
}
.chart-documentation .chart-doc-summary-row .encounter-doc-actions{
  position:static!important;
  margin:0 0 0 auto!important;
  padding:0!important;
  flex:0 0 auto!important;
}
@media(max-width:900px){
  .chart-documentation .chart-doc-summary-row{flex-wrap:wrap!important}
  .chart-documentation .chart-doc-summary-row .encounter-doc-actions{margin-left:0!important}
}

/* V5.1.161 FIX 08 — tightly scoped cleanup */
/* Restore breathing room around Chart Diagnosis without moving Chart action buttons. */
.chart-diagnosis-panel{margin-top:14px!important;margin-bottom:14px!important;}
/* Patient Add / Intake-style insurance fields: separate payment choice from carrier row. */
#patientPaymentSection [data-insurance-fields]{margin-top:14px!important;}

/* V5.1.161 FIX 09 — space between document tabs and the active document's section tabs. */
.chart-documentation .v306-doc-row{margin-bottom:8px!important;}

/* V5.1.190 FIX2 — keep Chart Diagnosis aligned with the clinical document width. */
.chart-diagnosis-panel{max-width:1550px!important;width:calc(100% - 24px)!important;box-sizing:border-box!important;margin:14px auto!important;}
.chart-diagnosis-panel .chart-dx-grid{grid-template-columns:repeat(4,minmax(160px,260px))!important;justify-content:start!important;}
@media(max-width:800px){.chart-diagnosis-panel{width:100%!important}.chart-diagnosis-panel .chart-dx-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* V5.1.190 FIX3: align Diagnosis exactly with Chart Documentation and normalize Treatment billing actions. */
.chart-diagnosis-panel{max-width:1380px!important;width:100%!important;box-sizing:border-box!important;margin:14px auto!important;}
.p-open-billing{display:inline-flex!important;align-items:center!important;gap:6px!important;}
.p-open-billing .button,.p-open-billing button.button{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:30px!important;height:30px!important;padding:4px 10px!important;line-height:20px!important;margin:0!important;}
@media(max-width:800px){.chart-diagnosis-panel{max-width:100%!important;width:100%!important;}}
