#view-licenses, #licenseContent, .license-services, .license-payments { min-width: 0; }
.module-row[hidden] { display: none; }
.license-plant { max-width: 520px; margin-bottom: 24px; }
.payment-notice { color: #355858; border-left: 4px solid #4e8181; background: #f2f6f6; padding: 16px 20px; line-height: 1.6; }
.license-services, .license-payments { margin-top: 32px; }
.license-note { color: #555; font-size: 14px; line-height: 1.6; }
#serviceRows button { margin: 4px 0; white-space: normal; }
#plantOrdersBody td:nth-child(2), #plantOrdersBody td:nth-child(4) { white-space: normal; min-width: 160px; }
#serviceRows input[type=checkbox], #purchaseRenew { width: 20px; height: 20px; flex: 0 0 20px; }
#serviceRows label, #purchaseRenewLabel { display: flex; align-items: center; gap: 8px; }
#serviceRows small { display: block; margin-top: 6px; }
.billing-scope { margin-top: 12px; max-width: 28rem; }
.billing-scope summary, .billing-order-details summary { color: var(--petrol, #4e8181); cursor: pointer; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
.billing-scope summary:focus-visible, .billing-order-details summary:focus-visible { outline: 2px solid var(--petrol, #4e8181); outline-offset: 3px; }
.billing-scope ul { padding: 0; margin: 12px 0 0; list-style: none; }
.billing-scope li { padding: 10px 0; border-top: 1px solid var(--line, #d2dddd); white-space: normal; overflow-wrap: anywhere; }
.billing-scope li span { display: block; margin-top: 6px; font-size: 13px; }
.billing-failed, .billing-adjustment { color: var(--danger, #a43d30); }
.billing-test-badge { display: inline-block; padding: 2px 6px; margin: 0 0 6px; border: 1px solid #4e8181; border-radius: 3px; color: #355858; background: #f2f6f6; font-size: 11px; font-weight: 600; }
.billing-order-details { min-width: 160px; max-width: 29rem; white-space: normal; overflow-wrap: anywhere; }
.billing-order-details > small { display: block; margin-top: 10px; }
.billing-order-details > p { font-size: 13px; line-height: 1.5; margin: 10px 0; }
.billing-totals { margin: 12px 0; font-size: 13px; }
.billing-totals > div { display: flex; justify-content: space-between; gap: 16px; margin: 5px 0; }
.billing-totals dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.billing-totals > div:last-child { border-top: 1px solid var(--line, #d2dddd); padding-top: 7px; font-weight: 600; }
#serviceRows td { white-space: normal; vertical-align: top; }
#serviceRows td:first-child { min-width: 185px; }
#ordersBody td { vertical-align: top; }
#ordersBody .status { white-space: normal; }
.annual-services { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding-top: 16px; border-top: 1px solid var(--line, #d2dddd); min-width: 0; }
.annual-service { display: grid; gap: 5px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.annual-service strong, .annual-service-status { font-size: 14px; line-height: 1.45; }
.annual-service small { font-size: 12px; line-height: 1.5; }
.annual-service-warning { color: var(--danger); font-weight: 600; }
#purchaseDialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; }
#purchaseDialog[open] { display: grid; gap: 20px; }
#purchaseDialog .dialog-head { align-items: center; gap: 16px; }
#purchaseDialog .dialog-head h2 { margin: 0; }
#purchaseClose { flex: 0 0 36px; }
#purchaseDialog > label, #purchaseDialog > button { margin: 0; }
#purchaseDialog .table-wrap { max-width: 100%; overflow-x: auto; }
#purchaseLines { min-width: 0; }
#purchaseLines table { table-layout: fixed; }
#purchaseLines td { padding: 14px 8px; }
#purchaseLines td:first-child { width: 55%; padding-left: 0; }
#purchaseLines td:nth-child(2) { width: 10%; text-align: center; }
#purchaseLines td:last-child { width: 35%; padding-right: 0; text-align: right; font-variant-numeric: tabular-nums; }
#purchaseLines .detail-list { margin: 8px 0 0; }
#purchaseLines .detail-list > div { align-items: baseline; }
#purchaseLines .detail-list > div:last-child { margin-top: 8px; border-top: 2px solid var(--petrol); border-bottom: 0; padding-top: 16px; color: var(--ink); }
#purchaseLines .detail-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#purchaseLines > p { margin: 16px 0 0; }
#purchaseReprice { justify-self: start; }
#purchaseError { margin: 0; color: var(--danger); overflow-wrap: anywhere; }
#purchaseError:empty { display: none; }
#purchaseConfirm { justify-self: end; max-width: 100%; }
#purchaseDialog [hidden] { display: none; }
#purchaseLines td { overflow-wrap: anywhere; white-space: normal; }
#view-licenses .table-wrap { overflow-x: auto; max-width: 100%; }
@media (max-width: 680px) {
  .billing-orders table { display: block; min-width: 0; width: 100%; }
  .billing-orders thead { display: none; }
  #ordersBody { display: block; }
  #ordersBody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 0; border-bottom: 1px solid #d2dddd; }
  #ordersBody td { display: block; min-width: 0; padding: 10px 12px; border: 0; white-space: normal; overflow-wrap: anywhere; }
  #ordersBody td:nth-child(3), #ordersBody td[colspan] { grid-column: 1 / -1; }
  #ordersBody td[data-label]::before { content: attr(data-label); display: block; color: #355858; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
  .billing-order-details { min-width: 0; max-width: 100%; }
  .annual-services { grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; }
  #purchaseDialog { padding: 20px; }
  #purchaseDialog .dialog-head h2 { font-size: 1.2rem; }
  #purchaseDialog .dialog-head { gap: 12px; }
  #purchaseDialog > button { width: 100%; justify-self: stretch; }
  .license-services table, .license-payments table { display: block; min-width: 0; width: 100%; }
  .license-services thead, .license-payments thead { display: none; }
  #serviceRows, #plantOrdersBody { display: block; }
  #serviceRows tr, #plantOrdersBody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid #d2dddd; padding: 12px 0; }
  #serviceRows td, #plantOrdersBody td { display: block; min-width: 0; padding: 10px 12px; border: 0; white-space: normal; overflow-wrap: anywhere; }
  #serviceRows td:first-child, #plantOrdersBody td:nth-child(2), #serviceRows td[colspan], #plantOrdersBody td[colspan] { grid-column: 1 / -1; }
  #serviceRows td:first-child { min-width: 0; }
  #plantOrdersBody td:nth-child(2) { order: -1; }
  #plantOrdersBody td:nth-child(2), #plantOrdersBody td:nth-child(4) { min-width: 0; }
  #serviceRows td[data-label]::before, #plantOrdersBody td[data-label]::before { content: attr(data-label); display: block; color: #355858; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
  #serviceRows button { width: 100%; font-size: 13px; padding: 10px 8px; }
}
