.customer-category-switch { display:flex; gap:9px; flex-wrap:wrap; margin-bottom:18px; }
.customer-category-switch button { display:flex; align-items:center; gap:12px; padding:12px 18px; border-radius:7px; background:#fbfcfc; color:#4b6257; }
.customer-category-switch button.active { color:#087a56; border-color:#0a7f5a; background:#eff8f3; box-shadow:inset 0 0 0 1px #0a7f5a; }
.customer-category-switch b { font-size:11px; padding:2px 6px; border-radius:8px; background:#e6efea; }
.customer-review-banner { display:flex; justify-content:space-between; align-items:center; gap:12px; background:#fff9ed; border:1px solid #ead9b8; border-radius:6px; padding:10px 12px; margin-bottom:14px; font-size:12px; }
.customer-profile-dialog { width:min(680px,calc(100vw - 40px)); max-height:calc(100dvh - 44px); box-sizing:border-box; border:1px solid #d5e0dd; border-radius:8px; padding:0; overflow:auto; color:var(--text); background:#fff; box-shadow:0 16px 48px #12332526; }
.customer-profile-dialog::backdrop { background:rgb(23 39 35 / 32%); }
.customer-profile-dialog .customer-detail-head { flex-wrap:wrap; }
.customer-profile-dialog #customerNewOrderBtn[hidden],.customer-profile-dialog #customerMergeBtn[hidden] { display:none!important; }
.customer-profile-tabs { display:flex; border-bottom:1px solid #dbe5df; gap:18px; margin:18px 0; }
.customer-profile-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:none; padding:10px 4px; }
.customer-profile-tabs button.active { color:#087a56; border-bottom-color:#0a7f5a; font-weight:600; }
.customer-profile-fields { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; margin:0; }
.customer-profile-fields>div { padding:15px 0; border-bottom:1px solid #edf1ef; }
.customer-profile-fields .full { grid-column:1/-1; }
.customer-profile-fields dt { font-size:11px; color:#718078; margin-bottom:8px; }
.customer-profile-fields dd { margin:0; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.customer-profile-state { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
.metric-link { color:#087a56!important; text-decoration:underline; text-underline-offset:3px; }
.customer-directory-wrap .customer-directory td:nth-child(2) { text-align:left; }
@media(max-width:760px){.customer-category-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px}.customer-category-switch button{padding:10px;justify-content:space-between}.customer-profile-dialog{width:calc(100vw - 20px);padding:14px;max-height:calc(100dvh - 20px)}.customer-profile-dialog .customer-detail-head{gap:10px}.customer-profile-fields{gap:0 12px}.customer-review-banner{align-items:flex-start;flex-direction:column}}

/* The customer picker keeps search behind a compact, accessible icon. */
@media screen {
  #customerLinkDialog [hidden], #ownerMergeDialog [hidden], #ownerOrderActionsDialog [hidden], #customerProfileDialog [hidden] { display:none!important; }
  #customerLinkDialog .owner-order-fields { margin-top:20px; }
  #customerLinkDialog .owner-order-fields .customer-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  #customerLinkDialog .owner-order-wide { grid-column:1/-1; }
  #customerLinkDialog .owner-order-fields .field { min-width:0; margin:0; }
  #customerLinkDialog .owner-order-fields input,#customerLinkDialog .owner-order-fields select { width:100%; box-sizing:border-box; }
  #customerLinkDialog .owner-order-grouping { margin-top:24px!important; padding-top:16px; border-top:1px solid var(--erp-line,#d5dfda); }
  #customerLinkDialog #ownerOrderGroupingHint { margin:8px 0 0; line-height:1.7; overflow-wrap:anywhere; }
  #customerLinkDialog #ownerOrderError { margin:0 20px 12px; }
  #customerLinkDialog [aria-invalid="true"] { border-color:var(--erp-danger,#b42318)!important; }
  .owner-order-actions { display:flex; flex-wrap:wrap; gap:6px; }
  #customerProfileDialog[data-owner-group="true"] .owner-order-actions button { white-space:nowrap; }
  @media(min-width:641px) {
    #customerProfileDialog[data-owner-group="true"] .customer-orders col:last-child { width:112px!important; }
    #customerProfileDialog[data-owner-group="true"] .customer-orders th:last-child { width:112px; }
    #customerProfileDialog[data-owner-group="true"] .owner-order-actions { flex-direction:column; align-items:flex-start; }
  }
  .order-overview-link-actions { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; min-width:0; padding:12px 16px; border:1px solid var(--erp-line,#d5dfda); border-radius:6px; background:var(--erp-surface,#fff); }
  .order-overview-link-actions>span,.order-overview-link-actions>small { color:var(--erp-muted,#52635b); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
  .order-overview-link-actions>button { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:100%; color:var(--erp-primary,#0a7f5a); font-weight:600; white-space:normal; text-align:left; }
  #ownerOrderActionsDialog { width:min(520px,calc(100vw - 28px)); }
  .owner-order-action-options { display:grid; gap:12px; }
  .owner-order-action-options>button { width:100%; padding:16px; text-align:left; white-space:normal; }
  .owner-order-action-options strong,.owner-order-action-options button>span { display:block; overflow-wrap:anywhere; }
  .owner-order-action-options strong { font-size:15px; }
  .owner-order-action-options button>span { margin-top:6px; font-size:12px; line-height:1.7; color:var(--erp-muted,#52635b); font-weight:400; }
  #ownerMergeDialog { width:min(760px,calc(100vw - 28px)); }
  #ownerMergeDialog .customer-dialog-head { align-items:flex-start; }
  #ownerMergeDialog .customer-dialog-head>div { min-width:0; }
  #ownerMergeDialog .customer-dialog-head>button { flex-shrink:0; }
  #ownerMergeDialog p { overflow-wrap:anywhere; }
  #ownerMergeSearch { width:100%; }
  .owner-merge-anchor { margin:0 0 16px; }
  .owner-merge-options { display:grid; gap:8px; max-height:320px; overflow:auto; overscroll-behavior:contain; padding:2px; }
  .owner-merge-option { display:flex; align-items:flex-start; gap:12px; margin:0; padding:12px; border:1px solid var(--erp-line,#d5dfda); border-radius:6px; background:var(--erp-surface,#fff); cursor:pointer; }
  .owner-merge-option:has(input:checked) { background:var(--erp-selected,#eaf5ef); border-color:var(--erp-primary,#0a7f5a); }
  .owner-merge-option input[type="checkbox"] { flex:0 0 18px; width:18px!important; height:18px; min-height:18px; margin:3px 0 0; }
  .owner-merge-order-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
  .owner-merge-order-copy strong,.owner-merge-order-copy>span,.owner-merge-order-copy small { display:block; }
  .owner-merge-order-copy>span { margin-top:4px; font-size:13px; font-weight:400; }
  .owner-merge-order-copy small { margin-top:4px; color:var(--erp-muted,#52635b); font-size:12px; line-height:1.7; font-weight:400; }
  #ownerMergePreview { margin:16px 0 0; line-height:1.7; }
  .owner-merge-selection { margin-top:16px; padding-top:12px; border-top:1px solid var(--erp-line,#d5dfda); }
  .owner-merge-selection>strong { font-size:13px; }
  #ownerMergeSelected { margin:8px 0 0; padding-left:20px; max-height:144px; overflow:auto; }
  #ownerMergeSelected li { padding:2px 0; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
  #ownerMergeError { margin-top:12px; }
  #ownerOrderActionsDialog .customer-dialog-head>div { min-width:0; overflow-wrap:anywhere; }
  #ownerOrderActionsDialog .customer-dialog-head>button { flex-shrink:0; }
  #customerTab .customer-directory .customer-name-cell,#customerTab .customer-directory .customer-address-cell { text-align:left; overflow-wrap:anywhere; }
  #customerTab .customer-directory .customer-address-cell { min-width:120px; max-width:240px; }
  #customerProfileDialog #customerPdfBtn { background:var(--erp-primary,#0a7f5a)!important; border-color:var(--erp-primary,#0a7f5a)!important; color:#fff!important; -webkit-text-fill-color:#fff!important; }
  #customerProfileDialog #customerPdfBtn:not(:disabled):hover { background:var(--erp-primary-hover,#066b4b)!important; border-color:var(--erp-primary-hover,#066b4b)!important; }
  #customerProfileDialog #customerPdfBtn:disabled,#customerProfileDialog #customerPdfBtn:disabled:hover { background:var(--erp-surface-muted,#f1f5f4)!important; border-color:var(--erp-line,#d5dfda)!important; color:var(--erp-disabled,#59675f)!important; -webkit-text-fill-color:var(--erp-disabled,#59675f)!important; cursor:not-allowed; opacity:1; }
  #customerProfileDialog .customer-pdf-hint { flex-basis:100%; margin:0; text-align:right; color:var(--erp-muted,#52635b); }
  @media(max-width:600px) {
    #ownerMergeSearch { font-size:16px; }
    .owner-merge-option { padding:12px; }
    .owner-order-action-options>button { min-height:80px; }
    #customerTab .customer-directory .customer-address-cell { max-width:none; }
    #customerLinkDialog .owner-order-fields .customer-create-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
    #customerLinkDialog .owner-order-fields input,#customerLinkDialog .owner-order-fields select { font-size:16px; }
    #customerProfileDialog .customer-detail-head { flex-wrap:wrap; }
    #customerProfileDialog .customer-detail-actions { flex-wrap:wrap; }
  }
  #customerEditDialog [hidden], #orderContactBtn[hidden] { display:none!important; }
  .company-contacts-section { margin-top:24px; }
  .company-contacts-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
  .company-contact-edit-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) auto; align-items:end; gap:12px; padding:12px 0; border-bottom:1px solid var(--erp-line,#d5dfda); }
  .company-contact-edit-row .field { min-width:0; margin:0; }
  .company-contact-edit-row input { width:100%; box-sizing:border-box; }
  .company-contact-edit-action { display:flex; align-items:center; gap:8px; padding-bottom:2px; white-space:nowrap; }
  .company-contact-edit-row.is-inactive { background:var(--erp-surface-soft,#f8faf9); }
  .company-contact-read-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:12px; padding:12px 0; border-bottom:1px solid var(--erp-line,#d5dfda); overflow-wrap:anywhere; }
  .company-contact-read-row small { color:var(--erp-muted,#52635b); }
  #orderContactDialog { width:min(600px,calc(100vw - 32px)); }
  .order-contact-options { display:grid; gap:8px; }
  #orderContactDialog .order-contact-option { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:12px 16px; text-align:left; background:var(--erp-surface,#fff); }
  .order-contact-option>span:first-child { min-width:0; overflow-wrap:anywhere; }
  .order-contact-option>span:last-child { flex-shrink:0; color:var(--erp-primary,#0a7f5a); }
  .order-contact-option strong,.order-contact-option small { display:block; }
  .order-contact-option small { margin-top:4px; color:var(--erp-muted,#52635b); }
  .company-contact-create { margin-top:24px; }
  .company-contact-create summary { cursor:pointer; color:var(--erp-primary,#0a7f5a); padding:8px 0; }
  .company-contact-create .customer-create-grid { margin:12px 0; }
  @media(max-width:600px) {
    .company-contact-edit-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
    .company-contact-edit-action { grid-column:1/-1; justify-content:flex-end; }
    .company-contact-edit-row input { font-size:16px; }
    .company-contact-read-row { grid-template-columns:minmax(0,1fr) auto; }
    .company-contact-read-row>span { grid-column:1; }
    .company-contact-read-row>small { grid-column:2; grid-row:1/3; align-self:center; }
    .company-contacts-heading { flex-wrap:wrap; }
  }
}
#customerLinkDialog .customer-dialog-head>div { min-width:0; }
#customerLinkDialog .customer-dialog-head>button { flex:0 0 auto; white-space:nowrap; }
#customerLinkDialog .customer-picker-toolbar { display:flex; align-items:flex-end; gap:10px; }
#customerLinkDialog .customer-picker-category { flex:1; min-width:0; margin:0; display:flex; flex-direction:column; gap:6px; }
#customerLinkDialog .customer-picker-category label { margin:0; line-height:20px; }
#customerLinkDialog .customer-picker-category select { width:100%; height:40px; min-height:40px; margin:0; }
#customerLinkDialog .customer-picker-search-toggle { flex:0 0 40px; width:40px; height:40px; min-height:40px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0!important; background:transparent!important; color:#627479; box-shadow:none!important; }
#customerLinkDialog .customer-picker-search-toggle:hover,#customerLinkDialog .customer-picker-search-toggle[aria-expanded="true"] { background:#edf6f2!important; color:#19796f; }
#customerLinkDialog .customer-picker-search-toggle svg,#customerLinkDialog .customer-picker-search-panel svg { width:19px; height:19px; }
#customerLinkDialog .customer-picker-count { margin:8px 0 0; line-height:20px; color:#627479; }
#customerLinkDialog .customer-picker-search-panel { display:flex; align-items:center; gap:8px; margin:8px 0 0; padding:0 2px; border-bottom:1px solid #a9c9bc; }
#customerLinkDialog .customer-picker-search-panel[hidden] { display:none!important; }
#customerLinkDialog .customer-picker-search-panel input { flex:1; min-width:0; min-height:38px; padding:8px 4px; border:0!important; border-radius:0; background:transparent!important; box-shadow:none!important; }
#customerLinkDialog .customer-picker-search-panel button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 32px; width:32px; height:32px; min-height:32px; padding:0; border:0!important; background:transparent!important; color:#627479; box-shadow:none!important; }
#customerLinkDialog .customer-picker-list { margin-top:10px; }
#customerLinkDialog .customer-picker-list .outstanding-empty { padding:24px 12px; }
#customerLinkDialog .customer-picker-search-toggle:focus-visible,#customerLinkDialog .customer-picker-search-panel button:focus-visible { outline:2px solid #19796f; outline-offset:2px; }

/* Customer records stay compact; the separate account view restores reconciliation. */
#customerTab .customer-view-switch { display:flex; gap:24px; margin:0 0 16px; border-bottom:1px solid #d5e0dd; }
#customerTab .customer-view-switch button { border:0!important; border-bottom:2px solid transparent!important; border-radius:0!important; padding:0 2px 12px; min-height:38px; background:transparent!important; color:#627479; font-size:15px; box-shadow:none!important; }
#customerTab .customer-view-switch button.active { border-bottom-color:#19796f!important; color:#19796f!important; font-weight:600; }
#customerTab .customer-toolbar { align-items:center; gap:12px; }
#customerTab .customer-toolbar .left { flex:1 1 640px; display:flex; flex-flow:row wrap; gap:8px; }
#customerTab .customer-toolbar .right { flex:0 0 auto; }
#customerTab .customer-toolbar input { flex:1 1 220px; width:auto!important; min-width:180px; max-width:320px; }
#customerTab .customer-toolbar select { flex:0 1 auto; width:auto!important; min-width:128px; }
#customerTab .customer-category-switch { gap:8px; margin-bottom:12px; }
#customerTab .customer-category-switch button { padding:8px 12px; min-height:36px; gap:8px; }
#customerTab .customer-category-switch b { font-weight:600; }
#customerTab .customer-directory { table-layout:auto; width:100%; }
#customerTab .customer-directory th,#customerTab .customer-directory td { padding:12px; }
#customerTab .customer-directory td:first-child { white-space:nowrap; width:92px; font-variant-numeric:tabular-nums; color:#627479; }
#customerTab .customer-directory td:last-child { width:124px; }
#customerTab .customer-directory .customer-name-cell { min-width:140px; }
#customerTab .customer-directory .customer-money-cell { white-space:nowrap; text-align:right; }
#customerTab .customer-row-actions { display:flex; gap:6px; align-items:center; justify-content:center; }
#customerTab .customer-row-actions button { white-space:nowrap; flex:0 0 auto; min-width:48px; }
#customerTab .customer-reconcile-btn { color:#19796f!important; background:#eff8f5!important; border-color:#b8d8cf!important; }
#customerTab .customer-account-status { display:inline-block; white-space:nowrap; color:#627479; font-size:12px; }
#customerTab .customer-account-status.open { color:var(--erp-warning,#865a0c); }
#customerTab .customer-account-status.settled { color:#19796f; }
#customerTab .customer-money-cell .metric-link { padding:4px 0; border:0!important; background:transparent!important; text-decoration:none; font-variant-numeric:tabular-nums; }
#customerProfileDialog[data-section="ledger"],#customerProfileDialog[data-section="orders"] { width:min(1140px,calc(100vw - 40px)); }
#customerProfileDialog .customer-detail-view { padding:0; }
#customerProfileDialog .customer-detail-head { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:16px; min-height:0; margin:0; padding:20px 24px 16px; border:0!important; background:#fff!important; }
#customerProfileDialog .customer-detail-identity { flex:1; }
#customerProfileDialog .customer-detail-identity strong { font-size:20px; line-height:1.4; font-weight:600; overflow-wrap:anywhere; }
#customerProfileDialog .customer-detail-identity span { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; margin-top:5px; color:#627479; }
#customerProfileDialog .customer-detail-identity i { font-style:normal; color:#a8b6b1; }
#customerProfileDialog .customer-detail-actions { display:flex; flex-wrap:nowrap; align-items:center; gap:12px; width:auto; flex:0 0 auto; }
#customerProfileDialog .customer-detail-actions button { width:auto!important; flex:0 0 auto; }
#customerProfileDialog .customer-profile-close { width:32px!important; height:32px; min-height:32px; padding:0; border:0!important; background:transparent!important; box-shadow:none!important; color:#627479; font-size:25px; font-weight:400; line-height:1; }
#customerProfileDialog .customer-profile-close:hover { background:#f0f4f2!important; color:#223236; }
#customerProfileDialog .customer-profile-tabs { gap:24px; margin:0 24px; border-bottom:1px solid #d5e0dd; }
#customerProfileDialog .customer-profile-tabs button { padding:10px 0 12px; min-height:40px; font-size:14px; color:#627479; background:transparent!important; box-shadow:none!important; border:0!important; border-bottom:2px solid transparent!important; border-radius:0!important; }
#customerProfileDialog .customer-profile-tabs button.active { border-bottom-color:#19796f!important; color:#19796f!important; font-weight:600; }
#customerProfileDialog #customerContacts { margin:0; padding:20px 24px 0; border:0!important; border-radius:0; background:#fff!important; }
#customerProfileDialog .customer-profile-fields { grid-template-columns:1fr 1fr; gap:20px 32px; margin:0 0 20px; }
#customerProfileDialog .customer-profile-fields>div { padding:0; border:0; min-width:0; }
#customerProfileDialog .customer-profile-fields dt { margin:0 0 5px; font-size:12px; color:#627479; }
#customerProfileDialog .customer-profile-fields dd { min-height:22px; font-size:14px; line-height:1.65; color:#223236; }
#customerProfileDialog .customer-profile-fields .metric-link { padding:0; min-height:22px; border:0!important; background:transparent!important; text-decoration:none; font-size:14px; }
#customerProfileDialog .customer-profile-fields .metric-link span { padding-left:8px; }
#customerProfileDialog .customer-profile-note { padding-top:16px!important; border-top:1px solid #edf1ef!important; }
#customerProfileDialog .customer-profile-note dd { white-space:pre-wrap; max-height:140px; overflow:auto; }
#customerProfileDialog .customer-profile-state { margin:0; padding:12px 0; border-top:1px solid #edf1ef; }
#customerProfileDialog .customer-profile-state button { color:#627479; border:0!important; background:transparent!important; }
#customerProfileDialog .customer-ledger-label { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; padding:18px 24px 10px; }
#customerProfileDialog .customer-ledger-label strong { font-size:14px; font-weight:600; }
#customerProfileDialog .customer-ledger-label span { font-size:12px; color:#627479; }
#customerProfileDialog #customerSummary { margin:0 24px 16px; padding:0; gap:8px; border:0!important; background:#fff!important; grid-template-columns:repeat(4,minmax(0,1fr)); }
#customerProfileDialog #customerSummary>div { padding:10px 12px; min-width:0; text-align:left; border:1px solid #e3ebe7; border-radius:6px; background:#f7f9f8; }
#customerProfileDialog #customerSummary>div:nth-child(n+5) { background:#fff; }
#customerProfileDialog #customerSummary span { font-size:12px; margin-bottom:6px; color:#627479; }
#customerProfileDialog #customerSummary strong { font-size:19px; font-variant-numeric:tabular-nums; font-weight:600; overflow-wrap:anywhere; }
#customerProfileDialog #customerSummary>div:nth-child(n+5) strong { font-size:15px; color:#4e625a; }
#customerProfileDialog .customer-statement-toolbar { margin:0 24px; padding:12px 0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid #d5e0dd; }
#customerProfileDialog .customer-statement-selection { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
#customerProfileDialog .customer-selection-metric { display:flex; align-items:center; gap:5px; min-height:28px; padding:0; border:0!important; border-radius:4px!important; background:transparent!important; box-shadow:none!important; color:#223236; }
#customerProfileDialog .customer-selection-metric span { font-size:12px; color:#627479; }
#customerProfileDialog .customer-selection-metric strong { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
#customerProfileDialog .customer-statement-actions { display:flex; flex-wrap:wrap; gap:8px; }
#customerProfileDialog .customer-orders-wrap { margin:0 24px 24px; border:1px solid #d5e0dd; border-radius:6px; overflow:auto; }
#customerProfileDialog[data-section="orders"] .customer-orders-wrap { margin-top:18px; }
#customerProfileDialog .customer-orders { min-width:900px; }
#customerProfileDialog .customer-orders th,#customerProfileDialog .customer-orders td { padding:10px 8px; }
#customerProfileDialog .customer-orders td[data-label="状态"] { white-space:normal; overflow-wrap:anywhere; line-height:1.55; }
#customerProfileDialog .customer-orders td.address-cell button { max-width:100%; white-space:normal; text-align:left; }
#customerProfileDialog .customer-orders input[type="checkbox"] { width:16px!important; height:16px; cursor:pointer; }
#customerProfileDialog[data-section="orders"] .customer-orders .customer-order-main>td:first-child,#customerProfileDialog[data-section="orders"] .customer-orders thead th:first-child { display:none; }
#customerProfileDialog button:focus-visible,#customerTab .customer-row-actions button:focus-visible,#customerTab .customer-view-switch button:focus-visible { outline:2px solid #19796f; outline-offset:3px; }
@media screen and (min-width:641px) {
  /* Orders omit selection: size the eight visible columns, not the ledger colgroup. */
  #customerProfileDialog[data-section="orders"] .customer-orders { min-width:1040px; }
  #customerProfileDialog[data-section="orders"] .customer-orders colgroup { display:none; }
  #customerProfileDialog[data-section="orders"] .customer-orders th:nth-child(2) { width:24%; }
  #customerProfileDialog[data-section="orders"] .customer-orders th:nth-child(3) { width:11%; }
  #customerProfileDialog[data-section="orders"] .customer-orders th:nth-child(4) { width:17%; }
  #customerProfileDialog[data-section="orders"] .customer-orders th:nth-child(n+5):nth-child(-n+8) { width:10%; }
  #customerProfileDialog[data-section="orders"] .customer-orders th:nth-child(9) { width:8%; }
  #customerProfileDialog[data-section="orders"] .customer-orders td.address-cell button { min-width:140px; overflow-wrap:anywhere; }
}
@media(max-width:760px) {
  #customerTab .customer-toolbar .left,#customerTab .customer-toolbar .right { width:100%; flex-basis:auto; }
  #customerTab .customer-toolbar .left { display:grid; grid-template-columns:1fr 1fr; }
  #customerTab .customer-toolbar input { grid-column:1/-1; width:100%!important; max-width:none; min-width:0; }
  #customerTab .customer-toolbar select { min-width:0; width:100%!important; }
  #customerTab .customer-toolbar .right { justify-content:space-between; }
  #customerTab { min-width:0; width:100%; box-sizing:border-box; }
  #customerTab .customer-directory,#customerTab [data-mode="ledger"] .customer-directory { min-width:0; }
  #customerTab .customer-directory td:first-child,#customerTab .customer-directory td:last-child { width:auto; }
  #customerTab .customer-row-actions { justify-content:flex-end; }
  #customerProfileDialog,#customerProfileDialog[data-section="ledger"],#customerProfileDialog[data-section="orders"] { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:0; }
  #customerProfileDialog .customer-detail-head { padding:16px; gap:8px; }
  #customerProfileDialog .customer-detail-identity strong { font-size:18px; }
  #customerProfileDialog .customer-detail-actions { gap:6px; }
  #customerProfileDialog .customer-profile-tabs { margin:0 16px; gap:20px; }
  #customerProfileDialog #customerContacts { padding:16px 16px 0; }
  #customerProfileDialog .customer-profile-fields { gap:16px; }
  #customerProfileDialog .customer-ledger-label { padding:16px 16px 10px; }
  #customerProfileDialog #customerSummary { grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 16px 12px; }
  #customerProfileDialog #customerSummary strong { font-size:17px; }
  #customerProfileDialog .customer-statement-toolbar { margin:0 16px; }
  #customerProfileDialog .customer-statement-actions { width:100%; }
  #customerProfileDialog #customerPdfBtn { margin-left:auto; }
  #customerProfileDialog .customer-orders-wrap { margin:0 16px 16px; }
}
@media(max-width:640px) {
  #customerProfileDialog .customer-orders { min-width:0; }
  #customerProfileDialog .customer-orders td.address-cell button { justify-self:end; }
}
