dialog.modal[open]:has([data-customer-financial-detail]) {
  width: min(94vw, 1080px) !important;
  max-width: none !important;
}

.customer-financial-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
  color: #e3f2ff;
  font-size: 13px;
  line-height: 1.45;
}

.customer-financial-header,
.customer-financial-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-financial-header { justify-content: space-between; }
.customer-financial-header h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.customer-financial-actions button { min-height: 36px; font-size: 12px; }

.customer-financial-info,
.customer-financial-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #315577;
  border-radius: 10px;
  background: #315577;
}

.customer-financial-info > div,
.customer-financial-metrics > div { min-width: 0; padding: 9px 11px; background: #0d2642; }
.customer-financial-detail dt { color: #a6c9e7; font-size: 11px; }
.customer-financial-detail dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.customer-financial-metrics dd { font-size: 15px; }

.customer-financial-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #486987;
  border-radius: 8px;
  color: #d4eaff;
  background: #102d4b;
  overflow-wrap: anywhere;
}

.customer-financial-notice.is-error { border-color: #a35b6b; color: #ffdce3; background: #3f2134; }

.customer-financial-section { min-width: 0; }
.customer-financial-section h3 { margin: 0 0 6px; font-size: 14px; }
.customer-financial-section h3 small { color: #a6c9e7; font-size: 12px; }
.customer-financial-section p { margin: 0; color: #a6c9e7; }

.customer-financial-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #315577;
  border-radius: 8px;
}

.customer-financial-table-wrap:focus-visible { outline: 2px solid #74d6ff; outline-offset: 2px; }

.customer-financial-section table { width: 100%; min-width: 510px; border-collapse: collapse; }
.customer-financial-section table:has([data-print-thermal-receipt]) { min-width: 690px; }

.customer-financial-section th,
.customer-financial-section td {
  padding: 7px 9px;
  border-bottom: 1px solid #284764;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.customer-financial-section th { color: #b8d7f0; background: #173653; font-size: 11px; }
.customer-financial-section td { font-size: 12px; }
.customer-financial-section tbody tr:last-child td { border-bottom: 0; }
.customer-financial-section td small { color: #a6c9e7; }
.customer-financial-section td button { min-height: 36px; margin-top: 4px; }

@media (max-width: 560px) {
  .customer-financial-detail { gap: 11px; }
  .customer-financial-info,
  .customer-financial-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-financial-actions button,
  .customer-financial-section td button { min-height: 44px; }
}
.manual-payment-error {
  color: #ffe1e1;
  border-color: #ad4d59;
  background: #381f2b;
  margin: 0;
}
