/* dm_installments.css - module styles of the installments pages p40-p48 (owner: installments module, D-136).
   Tokens from app.css only (--dm-*, --ut-*), no hex colours, selectors under the page ids (#t_PageBody / .dm-i-*). */

/* ---------------------------------------------------------------- shared parts */
.dm-i-kpis .a-CardView-title { font-size: 13px; color: var(--dm-muted); font-weight: 600; }
.dm-i-kpis .a-CardView-subTitle { font-size: 20px; font-weight: 700; color: var(--ut-body-text-color, inherit); white-space: nowrap; }
.dm-i-kpis .a-CardView-body { font-size: 12px; color: var(--dm-muted); }
.dm-kpi--ok .a-CardView-subTitle { color: var(--dm-ok) !important; }
.dm-kpi--warn .a-CardView-subTitle { color: var(--dm-warn) !important; }
.dm-kpi--bad .a-CardView-subTitle { color: var(--dm-bad) !important; }
.dm-i-foot { margin-top: 4px; }
.dm-i-list .a-IRR-table td { vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.dm-i-bar { display: block; width: 100%; max-width: 140px; height: 6px; margin-top: 4px; accent-color: var(--dm-brand); }
.dm-i-markup { color: var(--dm-info); }
.dm-i-late { color: var(--dm-bad); font-weight: 700; }
.ep-btn-soft--red { --a-button-text-color: var(--dm-bad); --a-button-border-color: var(--dm-bad); }

/* status pills of plans, rows, cheques, receipts, promises */
.dm-pill--OVERDUE, .dm-pill--BOUNCED, .dm-pill--BROKEN, .dm-pill--DEFAULTED, .dm-pill--CANCELLED { color: var(--dm-bad); }
.dm-pill--PARTIAL, .dm-pill--PRESENTED, .dm-pill--GRACE, .dm-pill--RESCHEDULED, .dm-pill--IMPORT { color: var(--dm-warn); }
.dm-pill--PAID, .dm-pill--CLEARED, .dm-pill--KEPT, .dm-pill--COMPLETED { color: var(--dm-ok); }
.dm-pill--PENDING, .dm-pill--HELD, .dm-pill--RETURNED, .dm-pill--ON_TIME, .dm-pill--CLOSED { color: var(--dm-muted); }

/* view pills (radio group as pills) */
.dm-i-pills .t-Form-fieldContainer--radioButtonGroup .apex-item-grid { gap: 4px; }
.dm-i-pills .apex-item-radio label { white-space: nowrap; }

/* ---------------------------------------------------------------- round 5 (D-152): mockup look shared by p40-p48 */
.dm-i-sub { display: block; font-size: .8125rem; font-weight: 400; color: var(--dm-muted); margin-top: .2rem; line-height: 1.3; }
.t-BreadcrumbRegion-titleText:has(.dm-i-sub) { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
/* tinted total tiles (mockup .dm-total): label coloured, value dark, no icon */
.dm-i-t { --k: var(--dm-muted); border-radius: var(--dm-radius) !important; box-shadow: none !important;
  border: 1px solid color-mix(in srgb, var(--k) 25%, var(--ut-component-background-color)) !important;
  background: color-mix(in srgb, var(--k) 6%, var(--ut-component-background-color)) !important; }
.dm-i-t .a-CardView-header { padding: .7rem 1rem; }
.dm-i-t .a-CardView-title { font-size: .75rem !important; font-weight: 600 !important; color: color-mix(in srgb, var(--k) 85%, var(--ut-body-text-color)) !important; }
.dm-i-t .a-CardView-subTitle { font-size: 1.2rem !important; font-weight: 700 !important; color: var(--ut-body-text-color) !important; margin-top: .15rem; white-space: nowrap; }
.dm-i-t .a-CardView-body:empty { display: none; }
.dm-i-t--info { --k: var(--dm-info); } .dm-i-t--accent { --k: var(--dm-accent); } .dm-i-t--ok { --k: var(--dm-ok); }
.dm-i-t--bad { --k: var(--dm-bad); } .dm-i-t--warn { --k: var(--dm-warn); }
.dm-i-kpis .a-CardView-items { gap: .75rem; }
/* status pills with icons (mockup App.badge) */
.dm-i-st { display: inline-flex; flex-wrap: wrap; gap: 4px; white-space: nowrap; }
.dm-i-st .dm-pill, .dm-i-pill { display: inline-flex; align-items: center; gap: 3px; background: color-mix(in srgb, currentColor 9%, var(--ut-component-background-color));
  border-color: color-mix(in srgb, currentColor 45%, var(--ut-component-background-color)); }
.dm-i-st .dm-pill:empty { display: none; }
.dm-i-st .dm-pill::before { font-family: "Font APEX Small", "Font APEX"; font-size: 10px; }
.dm-i-st .dm-pill--ACTIVE::before { content: "\f05d"; }
.dm-i-st .dm-pill--OVERDUE::before { content: "\f071"; }
.dm-i-st .dm-pill--PARTIAL::before { content: "\f017"; }
.dm-i-st .dm-pill--DEFAULTED::before { content: "\f05e"; }
.dm-i-st .dm-pill--COMPLETED::before { content: "\f00c"; }
.dm-i-st .dm-pill--CANCELLED::before { content: "\f00d"; }
/* late / part paid rows: pink with a red left bar, amber bar (mockup dm-row-out / dm-row-low) */
.dm-i-rowmark { display: none; }
.a-IRR-table tr:has(.dm-i-row--late) > td, .t-Report-report tr:has(.dm-i-row--late) > td { background: color-mix(in srgb, var(--dm-bad) 5%, var(--ut-component-background-color)); }
.a-IRR-table tr:has(.dm-i-row--late) > td:first-child, .t-Report-report tr:has(.dm-i-row--late) > td:first-child { box-shadow: inset 3px 0 0 var(--dm-bad); }
.a-IRR-table tr:has(.dm-i-row--part) > td:first-child, .t-Report-report tr:has(.dm-i-row--part) > td:first-child { box-shadow: inset 3px 0 0 var(--dm-warn); }
/* foot line under a report: "n of m rows (filtered)" left, hint right */
.dm-i-rowfoot .a-CardView-items { display: block; margin: 0; }
.dm-i-rowfoot .a-CardView { border: 0; background: transparent; box-shadow: none; min-height: 0; }
.dm-i-rowfoot .a-CardView-header { padding: .5rem 1rem; }
.dm-i-rowfoot .a-CardView-headerBody { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; align-items: baseline; }
.dm-i-rowfoot .a-CardView-title, .dm-i-rowfoot .a-CardView-subTitle { font-size: .75rem !important; font-weight: 400 !important; color: var(--dm-muted) !important; margin: 0; }
.dm-i-rowfoot .a-CardView-body { display: none; }
.dm-i-list .a-IRR-pagination:not(:has(a, button)) { display: none; }

/* filter card (mockup "Filters" card): title + Filters / Reset buttons right, segmented pills, extra selects only after "Filters" */
.dm-i-fcard { border-radius: var(--dm-radius); }
.dm-i-fcard > .t-Region-header .t-Region-title { font-size: .9375rem; font-weight: 600; }
.dm-i-fcard .t-Form-fieldContainer--radioButtonGroup .t-Form-labelContainer { display: none; }
.dm-i-fcard .apex-item-grid { display: inline-flex; }
.dm-i-fcard .apex-item-grid-row { display: inline-flex; flex-wrap: wrap; gap: 0; }
.dm-i-fcard .apex-item-option { margin: 0; }
.dm-i-fcard .apex-item-option input + label { border: 1px solid var(--dm-line); margin: 0 -1px 0 0; border-radius: 0; padding: .55rem 1rem; font-weight: 600; min-height: 40px;
  background: var(--ut-component-background-color); color: var(--ut-body-text-color); box-shadow: none; }
.dm-i-fcard .apex-item-option:first-child input + label { border-radius: 999px 0 0 999px; }
.dm-i-fcard .apex-item-option:last-child input + label { border-radius: 0 999px 999px 0; }
.dm-i-fcard .apex-item-option input:checked + label { background: var(--dm-brand); border-color: var(--dm-brand); color: var(--dm-on-brand); }
.dm-i-fcard > .t-Region-bodyWrap > .t-Region-body { padding-top: 0; }
.dm-i-fcard .t-Form-fieldContainer--radioButtonGroup, .dm-i-fcard .t-Form-fieldContainer--radioButtonGroup .t-Form-inputContainer { padding-top: 0; margin-top: 0; }
@media (max-width: 640px) {
  .dm-i-fcard .apex-item-grid { display: flex !important; flex-wrap: wrap; gap: .4rem; }
  .dm-i-fcard .apex-item-grid-row { display: contents !important; }
  .dm-i-fcard .apex-item-option { width: auto !important; flex: none !important; }
  .dm-i-fcard .apex-item-option input + label, .dm-i-fcard .apex-item-option:first-child input + label,
  .dm-i-fcard .apex-item-option:last-child input + label { border-radius: 999px; margin: 0; padding: .45rem .8rem; }
}
.dm-i-fbox { background: var(--ut-component-background-color); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: 1rem; margin-bottom: 1rem; }
.dm-i-fbox .dm-search, .dm-i-fbox .t-Form-fieldContainer:has(.dm-search) { max-width: 520px; }
.dm-i-st .dm-pill--HELD::before { content: "\f023"; } .dm-i-st .dm-pill--PRESENTED::before { content: "\f017"; }
.dm-i-st .dm-pill--BOUNCED::before { content: "\f071"; } .dm-i-st .dm-pill--CLEARED::before { content: "\f05d"; }
.dm-i-st .dm-pill--HELD { color: var(--dm-info); }
.dm-i-rowbtn { min-width: 36px; min-height: 36px; color: var(--dm-muted); }
#p44_cheques td[headers="ACTION_HTML"] { text-align: right; width: 48px; }
.dm-i-more-f { display: none; margin-top: .5rem; }
.dm-i-more-f.is-open { display: block; }
.dm-i-ic-wa { color: var(--dm-ok); font-size: 16px; display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; }
.dm-i-ic-wa[href=""] { display: none; }
#p42_due td[headers="PAY_LINK"] a, #p42_due td[headers="WA_LINK"] a { color: var(--dm-muted); }
#p42_due td[headers="WA_LINK"] a.dm-i-ic-wa { color: var(--dm-muted); }
#p42_due td[headers="TICK"] input, #p42_due th input { width: 18px; height: 18px; cursor: pointer; }
#dm_p42_remind[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- p40 summary block (mockup .dm-isum) */
#p40_isum { --ic-ended: var(--dm-bad); --ic-new: var(--dm-info); --ic-paid: var(--dm-ok); --ic-adv: var(--dm-teal); --ic-cov: var(--dm-teal);
  --ic-later: color-mix(in srgb, var(--dm-warn) 55%, var(--ut-component-background-color)); --ic-over: color-mix(in srgb, var(--dm-warn) 70%, var(--dm-bad));
  background: var(--ut-component-background-color); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: 1rem; margin-bottom: 1rem; }
#p40_isum .t-Region, #p40_isum > div > .t-Region { margin: 0; }
#p40_isum .a-CardView-items { display: grid; gap: .75rem; margin: 0; }
#p40_isum_top .a-CardView-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#p40_isum_cats .a-CardView-items { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
#p40_isum .dm-i-sc { --t: var(--dm-muted); cursor: pointer; min-height: 0; box-shadow: none; border-radius: var(--dm-radius);
  border: 1px solid var(--dm-line); border-left: 4px solid var(--t); background: color-mix(in srgb, var(--t) 6%, var(--ut-component-background-color)); }
#p40_isum .dm-i-sc:hover, #p40_isum .dm-i-sc:focus-visible { border-color: var(--t); }
#p40_isum .dm-i-sc.is-on { box-shadow: inset 0 0 0 2px var(--t); }
#p40_isum .dm-i-sc .a-CardView-header { padding: .75rem 1rem .1rem; }
#p40_isum .dm-i-sc .a-CardView-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
#p40_isum .dm-i-sc .a-CardView-subTitle { font-size: .8125rem; color: var(--dm-muted); font-weight: 400; margin-top: .1rem; }
#p40_isum .dm-i-sc .a-CardView-header { border: 0; box-shadow: none; }
#p40_isum .dm-i-sc .a-CardView-body { padding: 0 1rem .75rem; font-size: .75rem; color: var(--dm-muted); border: 0; min-height: 0; }
#p40_isum_cats .dm-i-sc .a-CardView-subTitle::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--t);
  margin-right: .35rem; vertical-align: .05em; }
.dm-i-sc--OPEN { --t: var(--dm-brand) !important; } .dm-i-sc--CLOSED { --t: var(--dm-muted) !important; }
.dm-i-sc--ENDED_BALANCE { --t: var(--ic-ended) !important; } .dm-i-sc--NEW { --t: var(--ic-new) !important; } .dm-i-sc--PAID_THIS_MONTH { --t: var(--ic-paid) !important; }
.dm-i-sc--PAID_ADVANCE { --t: var(--ic-adv) !important; } .dm-i-sc--COVERED { --t: var(--ic-cov) !important; } .dm-i-sc--DUE_LATER { --t: var(--ic-later) !important; }
.dm-i-sc--OVERDUE { --t: var(--ic-over) !important; }
.dm-i-isum-h h3 { margin: .9rem 0 .75rem; font-size: .875rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
#p40_isum_paid { margin-top: .75rem; }
#p40_isum_paid .a-CardView-items { display: block; }
#p40_isum_paid .a-CardView { min-height: 0; box-shadow: none; border: 1px solid var(--dm-line); border-left: 4px solid var(--dm-ok); border-radius: var(--dm-radius);
  background: color-mix(in srgb, var(--dm-ok) 6%, var(--ut-component-background-color)); }
#p40_isum_paid .a-CardView-header { padding: .75rem 1rem; }
#p40_isum_paid .a-CardView-headerBody { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
#p40_isum_paid .a-CardView-title { font-size: 1.35rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#p40_isum_paid .a-CardView-subTitle { font-size: .8125rem; color: var(--dm-muted); margin: 0; }
#p40_isum_paid .a-CardView-body { display: none; }
.dm-i-isum-links a { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font-size: .8125rem; }
#p40_plans .a-IRR-buttons .t-Button { margin-left: .5rem; }

/* phone cards: shown only below 640 px; the report table is hidden there (toolbar with the main button stays) */
.dm-i-phone-cards { display: none; }
@media (max-width: 480px) { #p40_isum_cats .a-CardView-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .dm-i-phone-cards { display: block; }
  .dm-i-list .a-IRR-tableContainer, .dm-i-list .a-IRR-paginationWrap, .dm-i-list .a-IRR-noDataMsg { display: none; }
  .dm-i-list .a-IRR-toolbar { flex-wrap: wrap; }
  .dm-i-t .a-CardView-subTitle { font-size: 1.05rem !important; }
  .dm-i-kpis .a-CardView-items { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .6rem; }
  .dm-i-kpis .a-CardView-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dm-i-list .a-IRR-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; }
  .dm-i-list .a-IRR-buttons, .dm-i-list .a-IRR-controls { width: auto; flex: 0 0 auto; }
  .dm-i-kpis .a-CardView-items--grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dm-i-kpis .a-CardView-subTitle { font-size: 17px; }
  .dm-i-pills .apex-item-grid-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
}

/* ---------------------------------------------------------------- p41 plan - round 5 (D-152, mockup plan/1) */
/* title bar: title + sub line never squeezed; buttons in one row right, wrap below on narrow screens */
#p41_title .t-BreadcrumbRegion-body { flex: 0 1 auto; min-width: 14rem; }
#p41_title .t-BreadcrumbRegion-titleText { white-space: nowrap; }
#p41_title .t-BreadcrumbRegion-buttons { flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
#p41_title .t-BreadcrumbRegion-buttons .t-Button { margin: 0; }
.ep-btn-soft--green { --a-button-text-color: var(--dm-ok); --a-button-border-color: var(--dm-ok);
  --a-button-background-color: color-mix(in srgb, var(--dm-ok) 8%, var(--ut-component-background-color)); }
.ep-btn-soft--blue { --a-button-background-color: color-mix(in srgb, var(--dm-info) 8%, var(--ut-component-background-color)); }
.ep-btn-soft--red { --a-button-background-color: color-mix(in srgb, var(--dm-bad) 6%, var(--ut-component-background-color)); }
/* header card (mockup #p41_head) */
#p41_head { background: var(--ut-component-background-color); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); margin-bottom: 1rem; }
#p41_head .a-CardView-items { margin: 0; }
#p41_head .a-CardView { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; }
#p41_head .a-CardView-header { display: none; }
#p41_head .a-CardView-body { padding: 0; }
.dm-i-ph { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.dm-i-ava { width: 72px; height: 72px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.6rem; font-weight: 700;
  background: color-mix(in srgb, var(--dm-info) 14%, var(--ut-component-background-color)); color: var(--dm-info); }
.dm-i-ph-main { flex: 1 1 260px; min-width: 0; }
.dm-i-ph-name { margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.dm-i-ph-name small { font-size: 1rem; color: var(--dm-muted); font-weight: 600; }
.dm-i-ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin-top: .35rem; font-size: .8125rem; color: var(--dm-muted); }
.dm-i-ph-meta > span { display: inline-flex; align-items: center; gap: .3rem; }
.dm-i-ph-meta .fa { font-size: 13px; }
.dm-i-linkbtn { border: 0; background: none; padding: 0; color: var(--dm-brand); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; min-height: 32px; }
.dm-i-linkbtn:hover { text-decoration: underline; }
.dm-i-ph-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; font-size: .8125rem; color: var(--dm-muted); }
.dm-i-ph-side b { color: var(--ut-body-text-color); }
/* five amount cards (mockup ep-kpi) */
#p41_kpis .a-CardView-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1rem; }
#p41_kpis .a-CardView { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; height: 100%; }
#p41_kpis .a-CardView-header { display: none; }
#p41_kpis .a-CardView-body { padding: 0; height: 100%; }
.dm-i-kpi { --k: var(--dm-muted); display: flex; flex-direction: column; gap: .55rem; height: 100%; box-sizing: border-box; padding: .9rem 1rem .8rem; min-height: 112px;
  border-radius: var(--dm-radius); background: color-mix(in srgb, var(--k) 7%, var(--ut-component-background-color)); border: 1px solid color-mix(in srgb, var(--k) 24%, var(--ut-component-background-color)); }
.dm-i-kpi--info { --k: var(--dm-info); } .dm-i-kpi--ok { --k: var(--dm-ok); } .dm-i-kpi--accent { --k: var(--dm-accent); }
.dm-i-kpi--bad { --k: var(--dm-bad); } .dm-i-kpi--warn { --k: var(--dm-warn); }
.dm-i-kpi-top { display: flex; align-items: center; gap: .7rem; }
.dm-i-kpi-ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--k); color: var(--ut-component-background-color); font-size: 18px; }
.dm-i-kpi-l { font-size: .8125rem; font-weight: 600; color: color-mix(in srgb, var(--k) 85%, var(--ut-body-text-color)); }
.dm-i-kpi-n { font-size: 1.45rem; font-weight: 700; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-i-kpi-n small { font-size: .62em; font-weight: 600; color: var(--dm-muted); margin-right: .15rem; }
.dm-i-kpi-f { font-size: .75rem; color: var(--dm-muted); margin-top: auto; }
.dm-i-kpi-f--bad { color: var(--dm-bad); font-weight: 700; }
/* tabs (Region Display Selector) + panels = one white box (same look as p12) */
#p41_tabs { background: var(--ut-component-background-color); border: 1px solid var(--dm-line); border-bottom: 0; border-radius: var(--dm-radius) var(--dm-radius) 0 0; margin-bottom: 0; }
#p41_tabs .apex-rds-container { border: 0; background: transparent; }
#p41_tabs .apex-rds { display: flex; flex-wrap: wrap; gap: .15rem; border-bottom: 1px solid var(--dm-line); padding: 0 .75rem; background: transparent; box-shadow: none; }
#p41_tabs .apex-rds .apex-rds-item a { display: inline-flex; align-items: center; gap: .45rem; padding: .8rem .9rem .7rem; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: transparent; font-weight: 600; font-size: .8125rem; color: var(--dm-muted); white-space: nowrap; box-shadow: none; }
#p41_tabs .apex-rds .apex-rds-item.apex-rds-selected a, #p41_tabs .apex-rds .apex-rds-item a[aria-selected="true"] { color: var(--dm-brand); border-bottom-color: var(--dm-brand); }
.dm-i-plan .dm-tab-n { margin-left: .2rem; font-size: .6875rem; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; border: 1px solid var(--dm-line); color: var(--dm-muted); text-align: center; line-height: 1.45; display: inline-block;
  background: color-mix(in srgb, var(--ut-body-text-color) 4%, var(--ut-component-background-color)); }
.dm-i-plan .dm-tab-n:empty { display: none; }
.dm-i-plan > div > :is(#p41_schedule, #p41_payments, #p41_guarantors, #p41_cheques, #p41_history, #p41_iqrar), :is(#p41_schedule, #p41_payments, #p41_guarantors, #p41_cheques, #p41_history, #p41_iqrar) {
  border: 1px solid var(--dm-line); border-top: 0; border-radius: 0 0 var(--dm-radius) var(--dm-radius); box-shadow: none; }
/* schedule: status pills with icons, late row pink + red bar, part paid amber bar, no zebra */
:is(#p41_schedule, #p41_payments, #p41_promises, #p41_cheques) .dm-pill { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px;
  background: color-mix(in srgb, currentColor 9%, var(--ut-component-background-color)); border-color: color-mix(in srgb, currentColor 45%, var(--ut-component-background-color)); }
:is(#p41_schedule, #p41_payments, #p41_cheques) .dm-pill::before { font-family: "Font APEX Small", "Font APEX"; font-size: 10px; }
#p41_schedule .dm-pill--PAID::before, #p41_payments .dm-pill--ACTIVE::before, #p41_cheques .dm-pill--CLEARED::before { content: "\f05d"; }
#p41_schedule .dm-pill--PENDING::before { content: "\f017"; }
#p41_schedule .dm-pill--OVERDUE::before, #p41_cheques .dm-pill--BOUNCED::before { content: "\f071"; }
#p41_schedule .dm-pill--PARTIAL::before { content: "\f042"; }
#p41_schedule .dm-pill--PENDING { color: var(--dm-info); }
#p41_schedule tr:has(.dm-pill--OVERDUE) > td { background: color-mix(in srgb, var(--dm-bad) 5%, var(--ut-component-background-color)) !important; }
#p41_schedule tr:has(.dm-pill--OVERDUE) > td:first-child { box-shadow: inset 3px 0 0 var(--dm-bad); }
#p41_schedule tr:has(.dm-pill--PARTIAL) > td:first-child { box-shadow: inset 3px 0 0 var(--dm-warn); }
#p41_schedule tr:has(.dm-pill--OVERDUE) td[headers="DAYS_LATE_TEXT"] { color: var(--dm-bad); font-weight: 700; }
#p41_schedule .t-Region-body { display: flex; flex-direction: column; }
#p41_schedule .t-Region-body > .container:has(#p41_sched_check) { order: 9; }
#p41_tabs .apex-rds-item a .fa { margin-right: .4rem; }
@media (max-width: 640px) { #p41_schedule td, #p41_schedule th, #p41_payments td { white-space: nowrap; } }
#p41_schedule td[headers="OPEN_TEXT"] { font-weight: 700; }
.dm-i-check { margin: .75rem 0 0; font-size: .875rem; display: flex; align-items: center; gap: .35rem; }
.dm-i-check--ok { color: var(--dm-ok); } .dm-i-check--bad { color: var(--dm-bad); }
/* Iqrar Nama tab */
.dm-i-iqbox { border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.dm-i-iqbox h3 { margin: 0 0 .35rem; font-size: .9375rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.dm-i-iqbox p { margin: 0; color: var(--dm-muted); font-size: .8125rem; }
#p41_iqrar #dm_p41_iqrar_tab { margin: .6rem 0 0; }
#p41_iqbox { display: flex; flex-direction: column; align-items: flex-start; }
#p41_iqbox > * { order: 9; } #p41_iqbox > h3, #p41_iqbox > p { order: 0; }
/* More menu (inline popup below the button) */
.dm-i-more .t-DialogRegion-body { padding: .35rem 0; }
.dm-i-more .t-Button { justify-content: flex-start; width: 100%; margin: 0; padding: .55rem 1rem; border-radius: 0; font-weight: 400; min-height: 40px;
  --a-button-background-color: transparent; --a-button-border-color: transparent; --a-button-text-color: var(--ut-body-text-color); box-shadow: none; }
.dm-i-more .t-Button:hover { --a-button-background-color: color-mix(in srgb, var(--dm-brand) 8%, var(--ut-component-background-color)); }
.dm-i-more .t-DialogRegion-buttons:not(:has(.t-Button)) { display: none; }
/* Qist Card = print-only paper (mockup printSlip #p41_print) */
#p41_qcard { display: none; }
.dm-i-qc-head { text-align: center; border-bottom: 1px dashed CanvasText; padding-bottom: 3mm; margin-bottom: 3mm; font-size: 12px; }
.dm-i-qc-shop { font-size: 18px; font-weight: 700; }
.dm-i-qc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 6mm; font-size: 12px; margin-bottom: 3mm; }
.dm-i-qc-tot { width: 30%; min-width: 60mm; margin: 0 0 3mm auto; font-size: 12px; }
.dm-i-qc-tot > div { display: flex; justify-content: space-between; gap: 4mm; padding: 1mm 0; }
.dm-i-qc-guar { font-size: 11px; margin: 2mm 0; }
.dm-i-qc-foot { border-top: 1px dashed CanvasText; padding-top: 3mm; margin-top: 3mm; font-size: 11px; }
.dm-i-qc-sign { display: flex; gap: 8mm; margin-top: 10mm; }
.dm-i-qc-sign span { flex: 1; border-top: 1px solid CanvasText; padding-top: 1mm; text-align: center; }
@media print {
  body:has(#p41_qcard) #p41_qcard { display: block !important; }
  body:has(#p41_qcard) .dm-i-plan, body:has(#p41_qcard) #p41_pick, body:has(#p41_qcard) .dm-i-plan #p41_schedule,
  body:has(#p41_qcard) .dm-i-plan #p41_guarantors { display: none !important; }
  #p41_qcard .t-Report-report { width: 100% !important; font-size: 11px; }
  #p41_qcard .t-Report-report, #p41_qcard .t-Report-report td, #p41_qcard .t-Report-report th { border: 0 !important; }
  #p41_qcard .t-Report-report thead th { border-bottom: 1px solid CanvasText !important; background: transparent !important; }
  #p41_qcard .t-Report-report tbody td { border-bottom: 1px solid GrayText !important; padding: 2mm 2mm !important; }
  #p41_qcard .t-Report-report td:nth-child(6), #p41_qcard .t-Report-report th:nth-child(6) { padding-left: 6mm !important; }   /* C3 2026-10-21: + Status column -> right half starts at column 6 */
  .dm-receipt--THERMAL_80#p41_qcard .dm-i-qc-meta { grid-template-columns: 1fr; }
  .dm-receipt--THERMAL_80#p41_qcard .dm-i-qc-tot { width: 100%; }
  .dm-receipt--THERMAL_80#p41_qcard .dm-i-qc-sign { flex-direction: column; gap: 10mm; }
}
@media (max-width: 1100px) { #p41_kpis .a-CardView-items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  #p41_title .t-BreadcrumbRegion-top, #p41_title .t-BreadcrumbRegion { flex-wrap: wrap; }
  #p41_title .t-BreadcrumbRegion-body { flex: 1 1 100%; }
  #p41_title .t-BreadcrumbRegion-buttons { justify-content: flex-start; flex: 1 1 100%; margin-top: .5rem; }
  .dm-i-ph { flex-wrap: wrap; padding: .85rem; gap: .75rem; }
  .dm-i-ava { width: 48px; height: 48px; font-size: 1.05rem; }
  .dm-i-ph-side { margin-left: 0; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  #p41_kpis .a-CardView-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  #p41_kpis .a-CardView-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dm-i-kpi { min-height: 0; padding: .7rem .75rem; }
  .dm-i-kpi-ic { width: 28px; height: 28px; font-size: 13px; }
  .dm-i-kpi-n { font-size: 1.1rem; }
  #p41_tabs .apex-rds { gap: .4rem; padding: .75rem; }
  #p41_tabs .apex-rds .apex-rds-item a { padding: .45rem .7rem; border: 1px solid var(--dm-line); border-radius: 999px; }
  #p41_schedule .t-Report-wrap, #p41_payments .t-Report-wrap, #p41_guarantors .t-Report-wrap { overflow-x: auto; }
}
.dm-i-head .a-CardView-title { font-size: 20px; }
.dm-i-sched tr:last-child td { font-weight: 700; }
.dm-i-preview .t-Form-itemText, .dm-i-preview .display_only { font-weight: 600; color: var(--dm-info); }

/* ---------------------------------------------------------------- p43 recovery cards - round 5 (mockup .dm-rec card) */
#p43_cards .a-CardView-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
#p43_cards .a-CardView { min-width: 0; height: 100%; border: 1px solid var(--dm-line); border-radius: var(--dm-radius); box-shadow: none; }
#p43_cards .a-CardView-header { display: none; }
#p43_cards .a-CardView-body { padding: .9rem 1rem .25rem; }
#p43_cards .a-CardView-actions { border: 0; padding: .25rem 1rem .9rem; justify-content: flex-start; }
#p43_cards .a-CardView-actions .a-CardView-actionsPrimary { display: flex; gap: .5rem; flex-wrap: wrap; }
.dm-i-rc { min-width: 0; overflow-wrap: anywhere; font-size: .875rem; }
.dm-i-rc p { margin: .2rem 0; }
.dm-i-rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.dm-i-rc-head h3 { margin: 0 0 .2rem; font-size: 1rem; font-weight: 700; }
.dm-i-rc-head small { color: var(--dm-muted); font-weight: 600; font-size: .8125rem; }
.dm-i-rc-line { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; color: var(--dm-muted); }
.dm-i-rc-line .fa { color: var(--dm-muted); font-size: 13px; }
.dm-i-rc-tel a, .dm-i-rc-guar a { font-weight: 600; }
.dm-i-rc-late { color: var(--dm-bad); font-weight: 700; }
.dm-i-rc-line b { color: var(--ut-body-text-color); }
.dm-i-rc-line .dm-i-rc-late { color: var(--dm-bad); }
.dm-i-rc-visit { font-size: .75rem; color: var(--dm-muted); }
.dm-i-rc .dm-i-rc-prom { color: var(--ut-body-text-color); }
#p43_cards .a-CardView-button--hot, #p43_cards .a-CardView-actions .t-Button--hot { --a-button-background-color: var(--dm-brand); --a-button-border-color: var(--dm-brand);
  --a-button-text-color: var(--dm-on-brand); background-color: var(--dm-brand); border-color: var(--dm-brand); color: var(--dm-on-brand); }
#p43_cards .js-p43-visit { color: var(--dm-info); border-color: var(--dm-info); background: color-mix(in srgb, var(--dm-info) 8%, var(--ut-component-background-color)); }
.dm-pill--PROMISE { color: var(--dm-info); }
.dm-i-reg-aside { float: right; font-size: .75rem; font-weight: 400; color: var(--dm-muted); }
.dm-i-empty { text-align: center; padding: 1.25rem .5rem; }
.dm-i-empty .fa { font-size: 22px; color: var(--dm-muted); padding: .5rem; border-radius: 50%; background: color-mix(in srgb, var(--ut-body-text-color) 5%, var(--ut-component-background-color)); }
.dm-i-empty p { margin: .5rem 0 0; font-weight: 600; }
@media (max-width: 760px) { #p43_cards .a-CardView-items { grid-template-columns: 1fr; } }
.dm-i-rc > div:empty { display: none; }
.dm-i-rc > div { margin: 2px 0; }
.dm-i-rc-late { color: var(--dm-bad); font-weight: 600; }
.dm-i-rc-prom { color: var(--dm-warn); }
.dm-i-rcards .a-CardView-badge { color: var(--dm-bad); }

/* ---------------------------------------------------------------- p45 take payment */
/* round 5 (D-152): soft grey Back, full-width search box with the label inside, title sub line */
:is(#p41_title, #p45_title, #p46_title) .ep-btn-soft--grey { --a-button-background-color: color-mix(in srgb, var(--dm-muted) 10%, var(--ut-component-background-color));
  --a-button-border-color: color-mix(in srgb, var(--dm-muted) 35%, var(--ut-component-background-color)); --a-button-text-color: var(--ut-body-text-color); }
.dm-find.dm-i-find45 .t-Form-fieldContainer { max-width: none; }
.dm-i-find45 .t-Region-header .t-Region-title { font-size: .9375rem; font-weight: 600; }
.dm-i-find45 .t-Region-header { border-bottom: 0; }
.dm-i-amount input, input.dm-i-amount { font-size: 22px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-i-change { margin-left: 8px; }
.dm-i-reason { color: var(--dm-bad); margin: 0 12px 0 0; font-size: 13px; }
#p45_items td:last-child, #p45_items th:last-child { display: none; }
#p45_items.dm-i-manual-on td:last-child, #p45_items.dm-i-manual-on th:last-child { display: table-cell; }
#p45_items input.dm-i-alloc { width: 110px; text-align: right; }
#p45_chips thead { display: none; }
#p45_chips td { border: 0; padding: 0; }
#p45_chips .t-Button { margin: 0 6px 6px 0; min-height: 36px; }
#P45_RECEIVED1_CONTAINER { display: none; }
#dm_p45_save[disabled], #dm_p45_saveprint[disabled] { opacity: .55; cursor: not-allowed; }
/* owner 2026-10-18: summary + Save buttons always in sight - desktop: right column that stays on screen while scrolling;
   phone: summary first. D-187 (mockup p45_actions): Save + Save & Print sit at the bottom of the Summary card, right-aligned, same height,
   one line; at 390 px they stack full-width (the old fixed bottom bar is gone) */
#p45_summary .t-Region-buttons--bottom { padding: 12px 16px 16px; border-top: 1px solid var(--dm-line); }
#p45_summary .t-Region-buttons--bottom .t-Region-buttons-left { display: none; }
#p45_summary .t-Region-buttons--bottom .t-Region-buttons-right { display: flex; flex-wrap: nowrap; gap: 8px; justify-content: flex-end; margin-left: auto; }
#p45_summary .t-Region-buttons--bottom .t-Button { flex: 0 0 auto; min-height: 44px; margin: 0; white-space: nowrap; }
#p45_save_bar { margin: 0; }
#p45_save_bar .t-Region-body { padding: 0 16px; }
.dm-i-kpi-f2:empty { display: none; }                       /* p41 qist card: 2nd line only when another plan is due earlier (D-187) */
.dm-i-kpi-f2 { display: block; margin-top: 2px; }
.dm-i-saved-row { margin: 0 0 8px; }
.dm-i-saved-print { font-weight: 600; }
.dm-i-pick { font-size: 1rem; }
.dm-i-pick--all { color: var(--dm-muted); }
@media (min-width: 641px) {
  #p45_side { position: sticky; top: 64px; }
}
.dm-p45-barsum { display: none; }
@media (max-width: 640px) {
  .col:has(> #p45_side) { order: -1; }
  /* D-252 (owner 2026-10-26 "han ye kro"): Save / Save & Print in a bar fixed at the bottom with "This payment Rs. X", like New Sale -
     type the amount below the summary and save without scrolling back up */
  html.page-45 .t-Body-content { padding-bottom: 120px; }
  html.page-45 { scroll-padding-bottom: 120px; }   /* a focused field (amount) is scrolled ABOVE the fixed bar, never under it */
  #p45_summary .t-Region-buttons--bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; margin: 0; padding: 8px 16px 10px;
    display: flex; align-items: center; gap: 10px; background: var(--ut-component-background-color); border-top: 1px solid var(--dm-line);
    box-shadow: 0 -4px 12px color-mix(in srgb, CanvasText 10%, transparent); }
  #p45_summary .t-Region-buttons--bottom .t-Region-buttons-right { flex-direction: row; align-items: center; width: auto; margin-left: auto; gap: 8px; }
  #p45_summary .t-Region-buttons--bottom .t-Button { width: auto; min-height: 44px; }
  .dm-p45-barsum { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .dm-p45-barsum small { font-size: 12px; color: var(--dm-muted); }
  .dm-p45-barsum b { font-size: 17px; color: var(--dm-brand); white-space: nowrap; }
}

/* ---------------------------------------------------------------- p46 receipt (paper stays light, D-013) */
.dm-i-receipt { background: var(--ut-component-background-color); }
.dm-i-receipt .t-Region-body { padding: 20px; }
.dm-i-rhead { text-align: center; margin-bottom: 8px; }
.dm-i-shop { font-size: 20px; font-weight: 700; }
.dm-i-rtitle { text-align: center; font-weight: 700; letter-spacing: .5px; border-top: 1px solid var(--dm-line); border-bottom: 1px solid var(--dm-line); padding: 6px 0; margin: 8px 0; }
.dm-i-rdl { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 4px 12px; margin: 8px 0; }
.dm-i-rdl dt { color: var(--dm-muted); font-weight: 600; }
.dm-i-rdl dd { margin: 0; }
.dm-i-ramount { font-size: 18px; }
.dm-i-words .t-Form-itemText, .dm-i-words .display_only { font-style: italic; }
.dm-i-signs { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; }
.dm-i-signs span { border-top: 1px solid var(--dm-line); padding-top: 4px; min-width: 40%; text-align: center; font-size: 12px; }
.dm-i-void p { color: var(--dm-bad); font-weight: 700; text-align: center; border: 2px solid var(--dm-bad); padding: 8px; transform: rotate(-3deg); }
.dm-i-preview-label { font-size: 11px; color: var(--dm-muted); text-transform: uppercase; }
.dm-i-receipt[dir="rtl"] .dm-i-words { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; }

/* p46 round 5 (D-152, mockup receipt/1 + print paper) */
#p46_receipt .t-Region-body { padding: 24px; }
.dm-i-rhead { border-bottom: 1px dashed var(--dm-line); padding-bottom: 10px; margin-bottom: 12px; }
.dm-i-rphones .fa { font-size: 12px; }
.dm-i-rmeta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: .875rem; line-height: 1.6; margin-bottom: 14px; }
.dm-i-rtot { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 50%; margin: 0 0 4px auto; font-weight: 700; border-top: 1px solid var(--dm-line); padding-top: 10px; }
.dm-i-rtot dd { margin: 0; text-align: right; }
#p46_receipt .dm-i-words-box { width: 50%; margin-left: auto; }
#p46_receipt .dm-i-words-box .t-Form-fieldContainer, #p46_receipt .dm-i-words-box .t-Form-inputContainer { padding: 0; border: 0; background: transparent; }
#p46_receipt .dm-i-words .display_only, #p46_receipt .dm-i-words { font-style: italic; }
.dm-i-paidfor > .t-Region-header, .dm-i-paidfor .t-Region-title { font-size: 1.05rem; font-weight: 700; }
#p46_paid_for .t-Report-report { width: 100%; }
#p46_receipt .dm-i-rfoot .dm-i-rdl { width: 60%; margin-left: auto; grid-template-columns: auto 1fr; }
#p46_receipt .dm-i-rfoot .dm-i-rdl dt { color: var(--ut-body-text-color); font-weight: 400; }
#p46_receipt .dm-i-rfoot .dm-i-rdl dd { text-align: right; font-weight: 700; }
.dm-i-rpolicy { border-top: 1px dashed var(--dm-line); padding-top: 14px; margin-top: 14px; font-size: .8125rem; }
.dm-i-rpolicy:empty { border-top: 1px dashed var(--dm-line); padding: 0; }
/* 2026-10-21 C1 (owner-approved): "Left on this item <item (plan)>: Rs X" = ONE full-width row above the balance block (was wrapped in its narrow right column) */
#p46_receipt .dm-i-rfoot .dm-i-ritem { width: 100%; margin: 10px 0 4px; padding-top: 8px; border-top: 1px dashed var(--dm-line); overflow-wrap: anywhere; }
#p46_receipt .dm-i-rfoot .dm-i-ritem b { font-weight: 700; }
.dm-i-walog .t-Region-body { text-align: center; display: flex; flex-direction: column-reverse; align-items: center; }
#p46_receipt .dm-i-words-box, #p46_receipt .dm-i-words-box * { border: 0 !important; background: transparent !important; box-shadow: none !important; }
#p46_history tr:not(:has(td)), #p46_history .t-Report-pagination, #p46_history .t-Report-paginationText { display: none !important; }
#p46_history tbody tr:not(:has(td[headers])) { display: none !important; }
#p46_paid_for { background: transparent; }
#p46_paid_for > .t-Region-header { padding-left: 0; background: transparent; border: 0; }
#p46_paid_for :is(.t-Region-headerItems, .t-Region-title) { padding-left: 0; margin-left: 0; }   /* print fixes r7: "Paid for" starts on the paper's left edge (screen too) */
#p46_paid_for .t-Report-report :is(th, td) { padding-left: 12px; padding-right: 12px; }       /* header cell and value cell share one padding */
#p46_paid_for > .t-Region-bodyWrap > .t-Region-body { padding: 0; }
.dm-i-walog .t-Button { margin: 0 auto .5rem; }
#p46_history thead { display: none; }
#p46_history .t-Report-report, #p46_history td { border: 0 !important; background: transparent !important; }
#p46_history tbody tr { display: list-item; list-style: disc; margin-left: 1.25rem; color: var(--dm-muted); }
#p46_history tbody td { display: inline; padding: 2px 4px 2px 0 !important; }
#p46_history td[headers="WHAT"] { color: var(--ut-body-text-color); }
@media print {
  #p46_receipt .dm-i-rmeta, #p46_receipt .dm-i-rtot { color: CanvasText; }
  #p46_receipt .dm-i-paidfor > .t-Region-header { display: block !important; background: transparent !important; padding: 0 0 1mm !important; }
  #p46_receipt #p46_paid_for, #p46_receipt #p46_paid_for > .t-Region-bodyWrap > .t-Region-body { border: 0 !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; }
  #p46_receipt .dm-i-paidfor .t-Region-title { font-size: 13px !important; }
  #p46_receipt .dm-i-rtot { border-top: 1px solid CanvasText; padding-top: 2mm; }
  #p46_receipt .dm-i-rpolicy { border-top-color: CanvasText; }
  .dm-receipt--THERMAL_80 .dm-i-rmeta { grid-template-columns: 1fr; }
  .dm-receipt--THERMAL_80 .dm-i-rtot, .dm-receipt--THERMAL_80.dm-i-receipt .dm-i-words-box, .dm-receipt--THERMAL_80 .dm-i-rfoot .dm-i-rdl { width: 100% !important; }
}
@media (max-width: 640px) {
  .dm-i-rmeta { grid-template-columns: 1fr; }
  .dm-i-rtot, #p46_receipt .dm-i-words-box, #p46_receipt .dm-i-rfoot .dm-i-rdl { width: 100%; }
  /* D-248 (owner: "receipt below text not understandable" on the phone): label above, value below on the full width, left aligned */
  #p46_receipt .dm-i-rfoot .dm-i-rdl { grid-template-columns: 1fr; gap: 2px 0; }
  #p46_receipt .dm-i-rfoot .dm-i-rdl dt { color: var(--dm-muted); font-size: .8125rem; margin-top: 8px; }
  #p46_receipt .dm-i-rfoot .dm-i-rdl dd { text-align: left; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- p47 */
.dm-i-amt-CANCELLED { color: var(--dm-muted); text-decoration: line-through; }

/* ---------------------------------------------------------------- p48 dashboard */
.dm-i-collected .a-CardView-subTitle { font-size: 24px; font-weight: 700; color: var(--dm-ok); }
.dm-i-coll > div { margin: 2px 0; }
.dm-i-coll-split { font-weight: 600; }
.dm-i-cats .a-CardView-subTitle { font-size: 22px; font-weight: 700; }
.dm-i-cat { border-left: 4px solid var(--dm-line) !important; }
.dm-i-cat--ENDED_BALANCE, .dm-i-cat--OVERDUE { border-left-color: var(--dm-bad) !important; }
.dm-i-cat--NEW { border-left-color: var(--dm-info) !important; }
.dm-i-cat--PAID_THIS_MONTH, .dm-i-cat--PAID_ADVANCE, .dm-i-cat--COVERED { border-left-color: var(--dm-ok) !important; }
.dm-i-cat--DUE_LATER { border-left-color: var(--dm-warn) !important; }

/* ---------------------------------------------------------------- print: only the content (receipt / lists), always light */
@media print {
  .t-Header, .t-Body-nav, .t-Footer, .t-BreadcrumbRegion-buttons, .dm-no-print, .dm-find, .dm-filters, .dm-i-pills,
  .a-IRR-toolbar, .a-IRR-pagination, .t-Region-headerItems--buttons, .js-p43-visit, .dm-i-phone-cards { display: none !important; }
  .t-Body-content, .t-Body-main { margin: 0 !important; padding: 0 !important; }
  html, body, .dm-i-receipt { color-scheme: light; background: Canvas !important; color: CanvasText !important; }
}

/* ---------------------------------------------------------------- p47 Payments - round 5 (D-152, mockup payments): list card (8) + cash by user (4) */
#p47_totals .dm-i-t .a-CardView-body:not(:has(.dm-sub:not(:empty))) { display: none; }
.dm-i-t .a-CardView-body { padding: 0 1rem .7rem; border: 0; }
.dm-i-t .a-CardView-body .dm-sub { display: block; font-size: .75rem; line-height: 1.45; }
.dm-i-t .a-CardView-body .dm-sub:empty { display: none; }
.dm-i-lcard > .t-Region-bodyWrap > .t-Region-body { padding: 0; }
.dm-i-lcard .dm-i-list, .dm-i-lcard .dm-i-list .a-IRR { border: 0; box-shadow: none; margin: 0; }
#p47_payments .a-IRR-toolbar { display: none; }
.dm-i-tbar { padding: .75rem 1rem; border-bottom: 1px solid var(--dm-line); margin: 0; }
.dm-i-tbar .row, .dm-i-tbar .container > .row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.dm-i-tbar .col { flex: 0 0 auto; width: auto; max-width: none; padding: 0; }
.dm-i-tbar .col:has(.dm-search) { flex: 1 1 16rem; }
.dm-i-tbar .t-Form-fieldContainer { margin: 0; padding: 0; }
.dm-i-tbar .t-Button { min-height: 40px; margin: 0; }
#p47_more_f { padding: .5rem 1rem; border-bottom: 1px solid var(--dm-line); margin: 0; }
.dm-i-users .t-Region-title { font-size: .9375rem; font-weight: 600; }
.dm-i-users .t-Report-report, .dm-i-users .t-Report-report td { border: 0 !important; background: transparent !important; }
.dm-i-users .t-Report-report td { padding: .2rem 0; }
.dm-i-u-name { font-weight: 700; }
.dm-i-u .dm-sub { display: block; padding-left: 1.1rem; }
.dm-i-u--total { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--dm-line); padding-top: .7rem; margin-top: .4rem; }
.dm-i-u--total .dm-i-u-amt, .dm-i-u--total .dm-i-u-name { font-weight: 700; }
.dm-i-u--total .dm-sub, .dm-i-u--note .dm-i-u-name, .dm-i-u--note .dm-i-u-amt { display: none; }
.dm-i-u--note .dm-sub { padding: .4rem 0 0; }
@media (max-width: 640px) { .dm-i-tbar .col:has(.dm-search) { flex-basis: 100%; } }
.dm-i-tbar .container { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dm-i-tbar .container > .row { display: contents; }
.dm-i-tbar .t-Form-labelContainer, .dm-i-tbar .t-Form-fieldContainer--floatingLabel .t-Form-label { display: none; }
.dm-i-tbar .t-Form-fieldContainer--floatingLabel .apex-item-text { padding-top: .5rem; padding-bottom: .5rem; }
.dm-i-tbar .container > .row > .col { flex: 0 0 auto !important; width: auto !important; max-width: none !important; }
.dm-i-tbar .container > .row > .col:has(.dm-search) { flex: 1 1 12rem !important; min-width: 0; }
.dm-i-tbar .col:has(.dm-search) { display: flex !important; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dm-i-tbar .col:has(.dm-search) > .t-Form-fieldContainer { flex: 1 1 14rem; min-width: 0; }

/* ---------------------------------------------------------------- p48 Installments Summary - round 5 (D-152, mockup inst-summary) */
.dm-i-strip .a-CardView-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--ut-component-background-color);
  border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: .5rem 0; margin: 0 0 1rem; }
.dm-i-strip .a-CardView { border: 0; box-shadow: none; background: transparent; min-height: 0; }
.dm-i-strip .a-CardView-header { padding: .35rem 1.25rem; }
.dm-i-strip .a-CardView-title { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-i-strip .a-CardView-subTitle { font-size: .75rem; color: var(--dm-muted); margin: 0; }
.dm-i-money .a-CardView-items--grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.dm-i-money .dm-i-t .a-CardView-icon, .dm-i-colcard .a-CardView-icon { background: var(--k, var(--dm-ok)); color: var(--dm-on-brand); border-radius: 50%; }
.dm-i-money .dm-i-t .a-CardView-subTitle { font-size: 1.45rem !important; }
.dm-i-money .dm-i-t .a-CardView-body { padding: 0 1rem .8rem; font-size: .75rem; color: var(--dm-muted); }
.dm-i-colcard { border-radius: var(--dm-radius); border: 1px solid color-mix(in srgb, var(--dm-ok) 25%, var(--ut-component-background-color));
  background: color-mix(in srgb, var(--dm-ok) 6%, var(--ut-component-background-color)); height: calc(100% - 1rem); }
.dm-i-colcard .a-CardView { border: 0; box-shadow: none; background: transparent; }
.dm-i-colcard .a-CardView-title { color: var(--dm-ok); font-weight: 600; font-size: .8125rem; }
.dm-i-colcard .a-CardView-subTitle { font-size: 1.45rem; font-weight: 700; color: var(--ut-body-text-color); }
.dm-i-colcard .a-CardView-body { font-size: .75rem; color: var(--dm-muted); padding-top: 0; }
.dm-i-tip { font-size: 12px; color: var(--dm-muted); cursor: help; }
.dm-i-colbar { margin: 0 .5rem; }
.dm-i-lines .t-Report-report, .dm-i-lines .t-Report-report td, .dm-i-upcoming .t-Report-report td:first-child { background: transparent !important; }
.dm-i-lines .t-Report-report td { border: 0 !important; padding: .15rem .5rem; font-size: .8125rem; }
.dm-i-lines td[headers="AMOUNT_TEXT"] { font-weight: 700; }
.dm-i-ln::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--c, var(--dm-muted)); }
.dm-i-ln--ok { --c: var(--dm-ok); } .dm-i-ln--warn { --c: var(--dm-warn); } .dm-i-ln--teal { --c: var(--dm-teal); }
.dm-i-ln--pct::before { display: none; }
.dm-i-lines tr:has(.dm-i-ln--pct) td { border-top: 1px solid var(--dm-line) !important; padding-top: .6rem; font-weight: 600; font-size: .75rem; }
.dm-i-tbadge { margin-left: auto; float: right; font-size: .6875rem; font-weight: 400; color: var(--dm-muted); border: 1px solid var(--dm-line); border-radius: 999px; padding: .1rem .55rem; }
.dm-i-dot::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .45rem; background: var(--t, var(--dm-muted)); }
.dm-i-sc--COVERED { --t: color-mix(in srgb, var(--dm-teal) 60%, var(--dm-ok)) !important; } .dm-i-sc--OVERDUE { --t: color-mix(in srgb, var(--dm-warn) 55%, var(--dm-bad)) !important; }
.dm-i-catrow--total::before, .dm-i-sc--TOTAL::before { display: none; }
.dm-i-cattable tr:has(.dm-i-catrow--total) td { font-weight: 700; border-top: 2px solid var(--dm-line); }
.dm-i-cattable .t-Report-report th { background: color-mix(in srgb, var(--ut-body-text-color) 4%, var(--ut-component-background-color)); font-weight: 600; }
.dm-i-dflt:not(:empty) { font-size: .6875rem; color: var(--dm-bad); border: 1px solid color-mix(in srgb, var(--dm-bad) 45%, transparent); border-radius: 999px; padding: .05rem .5rem; margin-left: .3rem;
  background: color-mix(in srgb, var(--dm-bad) 8%, var(--ut-component-background-color)); }
.dm-i-aging .t-Report-report td { border: 0 !important; background: transparent !important; padding: 0; }
.dm-i-ag { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--dm-line); }
.dm-i-ag-r { text-align: right; } .dm-i-ag-r .dm-sub { display: block; }
.dm-i-meter { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ut-body-text-color) 8%, var(--ut-component-background-color)); }
.dm-i-meter::-webkit-meter-bar { background: color-mix(in srgb, var(--ut-body-text-color) 8%, var(--ut-component-background-color)); border: 0; border-radius: 999px; height: 10px; }
.dm-i-meter::-webkit-meter-optimum-value, .dm-i-meter::-webkit-meter-suboptimum-value, .dm-i-meter::-webkit-meter-even-less-good-value { background: var(--b, var(--dm-warn)); border-radius: 999px; }
.dm-i-meter::-moz-meter-bar { background: var(--b, var(--dm-warn)); border-radius: 999px; }
.dm-i-ag--1_30 { --b: var(--dm-warn); } .dm-i-ag--31_60 { --b: color-mix(in srgb, var(--dm-warn) 70%, var(--dm-bad)); }
.dm-i-ag--61_90 { --b: color-mix(in srgb, var(--dm-warn) 45%, var(--dm-bad)); } .dm-i-ag--90_PLUS { --b: var(--dm-bad); }
.dm-i-ag--total { grid-template-columns: 1fr auto; border-bottom: 0; border-top: 1px solid var(--dm-line); font-weight: 700; }
.dm-i-ag--total .dm-i-meter, .dm-i-ag--note .dm-i-meter, .dm-i-ag--note .dm-i-ag-r { display: none; }
.dm-i-ag--note { display: block; border: 0; font-size: .75rem; color: var(--dm-muted); padding-top: 1rem; }
.dm-i-upcoming .t-Report-report td { padding: .55rem .25rem; }
.dm-i-upcoming .dm-sub { display: block; }
.dm-i-noplan { font-size: .8125rem; color: var(--dm-muted); }
.dm-i-noplan .t-Report-report, .dm-i-noplan .t-Report-report td { border: 0 !important; background: transparent !important; padding: .25rem 0; }
@media (max-width: 640px) {
  .dm-i-strip .a-CardView-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-i-money .a-CardView-items--grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dm-i-money .dm-i-t .a-CardView-subTitle { font-size: 1.05rem !important; white-space: normal; }
  /* C6 2026-10-21 (D-192 exact amounts "Rs. 9,652,200"): phone p48 money tiles = icon + label on top, the amount full card width on one line (mockup) */
  #p48_portfolio .a-CardView-header { flex-wrap: wrap; }
  #p48_portfolio .a-CardView-titleWrap { display: contents; }
  #p48_portfolio .a-CardView-subTitle { flex: 1 0 100%; white-space: nowrap !important; margin-top: .35rem; }
  .dm-i-cattable { overflow-x: auto; }
  .dm-i-ag { grid-template-columns: 5.5rem 1fr auto; gap: .5rem; }
}
.dm-i-cattable { --ic-ended: var(--dm-bad); --ic-new: var(--dm-info); --ic-paid: var(--dm-ok); --ic-adv: var(--dm-teal); --ic-cov: var(--dm-teal);
  --ic-later: var(--dm-warn); --ic-over: color-mix(in srgb, var(--dm-warn) 55%, var(--dm-bad)); }
.dm-i-money .dm-i-t { min-height: 8.6rem; }
.dm-i-money .a-CardView-items { gap: 1rem; }

/* round 7 final QA (align_scan): phone list toolbar - Actions and New Sale the same height */
@media (max-width: 767px) { .dm-i-list .a-IRR-toolbar .a-IRR-button--actions, .dm-i-list #dm_p40_new_sale { height: 40px; min-height: 40px; } .dm-i-list .a-IRR-toolbar .a-IRR-actions { display: flex; align-items: center; } }

@media (max-width: 767px) { .dm-i-list .a-IRR-controls, .dm-i-list .a-IRR-buttons, .dm-i-list .a-IRR-actions, .dm-i-list #dm_p40_new_sale { margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; align-self: center; } }
@media (max-width: 767px) { .dm-i-list .a-IRR-toolbar { align-items: flex-start; } .dm-i-list .a-IRR-controlGroup { margin: 0; } .dm-i-list .a-IRR-controls, .dm-i-list .a-IRR-buttons { align-self: flex-start; height: auto; } }
@media (max-width: 767px) { .dm-i-list .a-IRR-controlGroup, .dm-i-list .a-IRR-controls { height: 40px; padding: 0; } }

/* D-189: p45 plan cards - the product name is the clickable thing, plan no. small for reference, line 2 = bought / installment / paid / next / open */
#p45_pick .a-CardView-item { margin-bottom: .5rem; }
#p45_pick .dm-i-pick { font-size: 1.05rem; font-weight: 600; }
.dm-i-pick-no { font-size: .75rem; color: var(--dm-muted); margin-left: .5rem; font-weight: 400; }
#p45_pick .a-CardView-subTitle { white-space: normal; }

/* ---- shopkeeper review (2026-10-21): p45 search rows = photo / initials + name + code + father / husband + area (row 2) ---- */
#p45_results td a { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
#p45_results .dm-fa { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; object-fit: cover;
  font-weight: 700; font-size: .85rem; background: color-mix(in srgb, var(--dm-brand) 14%, transparent); color: var(--dm-brand); }
#p45_results .dm-fw { display: block; min-width: 0; }
#p45_results .dm-fw b { font-weight: 600; }
#p45_results .dm-fc { color: var(--dm-muted); font-size: .8125rem; font-weight: 400; }
#p45_results .dm-fl { display: block; color: var(--dm-muted); font-size: .75rem; font-weight: 400; }
/* qist card: paid so far / remaining / next qist (row 7) */
.dm-i-qc-prog { margin-top: 0; }
/* phone: plan chip never over the customer name; open items table fits (rows 13, 14) */
@media (max-width: 640px) {
  #p45_customer .a-CardView-header { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; grid-template-areas: "icon body" "badge badge"; }
  #p45_customer .a-CardView-badge { grid-area: badge; margin: .35rem 0 0; max-width: 100%; }
  #p45_customer .a-CardView-badgeValue { white-space: normal; }
  #p45_items .t-Report-report th, #p45_items .t-Report-report td { padding: 6px 4px; font-size: 12px; }
  #p45_items .t-Report-report th#DUE_TEXT, #p45_items .t-Report-report td[headers="DUE_TEXT"],
  #p45_items .t-Report-report th#PAID_TEXT, #p45_items .t-Report-report td[headers="PAID_TEXT"] { display: none; }
}/* D-206 #18: plan picker in the Inline Dialog - cards fill the dialog, no extra frame */
#p45_pick_dlg #p45_pick .a-CardView-item:last-child { margin-bottom: 0; }
#p45_pick_dlg .dm-i-pickfilter { margin-bottom: .5rem; }
/* D-206 #3: Change plan / Change customer (X) as card buttons on the customer card */
#p45_customer .a-CardView-actions { border-top: 1px solid var(--dm-line); }
/* D-206 #11 (Builder C): p41 Reschedule - the date picker popup always above its inline dialog (both got z-index 901; a click in the
   dialog moved the dialog on top of the open calendar) */
html.page-41 .ui-dialog.ui-dialog-datepicker { z-index: 1200 !important; }
/* D-206 #13 (Builder C): qist card - summary split: left = Cash price / Advance / Installment total / Installments,
   right = Paid / Remaining / Next qist; due dates in one line (more rows per page) */
.dm-i-qc-tots { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; margin-bottom: 3mm; }
.dm-i-qc-tots > .dm-i-qc-tot { width: 46%; min-width: 0; margin: 0; }
#p41_qcard td[headers="D1"], #p41_qcard td[headers="D2"] { white-space: nowrap; }
@media print {
  #p41_qcard .t-Report-report tbody td { padding: 1.2mm 2mm !important; }
  .dm-receipt--THERMAL_80#p41_qcard .dm-i-qc-tots { flex-direction: column; gap: 2mm; }
  .dm-receipt--THERMAL_80#p41_qcard .dm-i-qc-tots > .dm-i-qc-tot { width: 100%; }
}
/* D-206 follow-up (owner 2026-10-24: "as little scrolling as possible"): p45 Save / Save & Print visible in the first screen at 1366x768 -
   compact customer card + region heads + summary rows; the Summary card is sticky under the title bar on desktop */
#p45_customer .a-CardView-header { padding-top: 10px; padding-bottom: 4px; }
#p45_customer .a-CardView-body { padding-top: 6px; padding-bottom: 6px; }
#p45_customer .a-CardView-actions { padding-top: 6px; padding-bottom: 6px; }
#p45_payment > .t-Region-header, #p45_side > .t-Region-header, #p45_summary > .t-Region-header { padding-top: 8px; padding-bottom: 4px; min-height: 0; }
#p45_payment > .t-Region-bodyWrap > .t-Region-body { padding-top: 4px; }
#p45_summary .t-Report-report td { padding-top: 6px; padding-bottom: 6px; }
#p45_summary .t-Region-buttons--bottom { padding-top: 8px; padding-bottom: 10px; }
@media (min-width: 992px) {
  #p45_side { top: 164px; }
}
/* D-206 #13 follow-up (Builder C): qist card on 80 mm (RECEIPT_FORMAT THERMAL_80) - roll-width page, schedule ONE column 1..N
   (the SQL gives one column for THERMAL_80), short "Sign" heading, all inside 72 mm; A4 keeps two columns */
#p41_qcard .dm-qc-hs { display: none; }
@media print {
  html.page-41 body:has(#p41_qcard.dm-receipt--THERMAL_80) { page: dm-80; }
  #p41_qcard.dm-receipt--THERMAL_80 { width: 72mm !important; max-width: 72mm; font-size: 10px !important; overflow: hidden; }
  #p41_qcard.dm-receipt--THERMAL_80 .dm-i-qc-shop { font-size: 14px; }
  #p41_qcard.dm-receipt--THERMAL_80 :is(.dm-i-qc-head, .dm-i-qc-meta, .dm-i-qc-tot, .dm-i-qc-guar, .dm-i-qc-foot) { font-size: 10px; }
  #p41_qcard.dm-receipt--THERMAL_80 .t-Report-report { table-layout: auto; width: 100% !important; font-size: 9px; }
  #p41_qcard.dm-receipt--THERMAL_80 :is(th, td):is([id="N2"], [id="D2"], [id="A2"], [id="S2"], [id="T2"], [headers="N2"], [headers="D2"], [headers="A2"], [headers="S2"], [headers="T2"]) { display: none !important; }
  #p41_qcard.dm-receipt--THERMAL_80 .t-Report-report :is(th, td) { padding: .9mm .6mm !important; white-space: nowrap; font-size: 9px !important; }
  #p41_qcard.dm-receipt--THERMAL_80 .t-Report-report td:nth-child(6), #p41_qcard.dm-receipt--THERMAL_80 .t-Report-report th:nth-child(6) { padding-left: .6mm !important; }
  #p41_qcard.dm-receipt--THERMAL_80 :is(th, td):is([id="S1"], [headers="S1"]) { width: 9mm; }
  #p41_qcard.dm-receipt--THERMAL_80 .dm-qc-hl { display: none; }
  #p41_qcard.dm-receipt--THERMAL_80 .dm-qc-hs { display: inline; }
  #p41_qcard.dm-receipt--THERMAL_80 .dm-i-qc-tot > div > b { text-align: right; }
}

/* ======================================================================= D-226 (Builder F, 2026-10-24) "less scroll" p40 / p42 / p43 / p48
   Owner rule: main content + main action on the first screen at 1366x768. Layout only (page metadata did the rest:
   p40 month summary = collapsible region collapsed, Filters beside Search, 25 rows; p42 25 rows; p43 officer summary collapsed
   under the KPI strip; p48 category donut beside its table, three charts in one row). */
/* KPI chips a little lower on the list pages */
:is(#p40_totals, #p42_totals, #p43_totals) .dm-i-t .a-CardView-header { padding: .4rem .9rem; }
:is(#p40_totals, #p42_totals, #p43_totals) .dm-i-t .a-CardView-subTitle { font-size: 1.05rem !important; margin-top: 0; }
:is(#p40_totals, #p42_totals, #p43_totals) .a-CardView-items { gap: .5rem; }
/* p40: the folded month summary is one thin line; its inner heading repeats the region title -> hidden */
#p40_isum .dm-i-isum-h { display: none; }
#p40_isum.dm-i-isum--fold { padding: 0; margin-bottom: .75rem; }
#p40_isum.dm-i-isum--fold > .t-Region-bodyWrap > .t-Region-body { padding: 0 1rem 1rem; }
:is(#p40_isum, #p43_by_officer, #R4120040000000003) > .t-Region-header .t-Region-headerItems { padding-top: .2rem; padding-bottom: .2rem; }
#p40_isum_open { min-height: 40px; }
:is(#p40_isum, #p43_by_officer, #R4120040000000003).is-collapsed > .t-Region-bodyWrap { display: none; }
#p40_isum > .t-Region-header .t-Region-headerItems--title { flex: 1 1 auto; min-width: 0; }
@media (max-width: 639px) {
  #p40_isum > .t-Region-header { flex-wrap: wrap; }
  #p40_isum > .t-Region-header > .t-Region-headerItems--buttons { flex: 1 0 100%; padding-top: 0; }
}

/* p42 / p43: Filters title + view pills + Filters / Reset buttons on one row (More filters still opens below the pills) */
@media (min-width: 768px) {
  :is(#p42_filters, #p43_filters) { display: flex; flex-wrap: wrap; align-items: center; }
  :is(#p42_filters, #p43_filters) > .t-Region-header { display: contents; }
  :is(#p42_filters, #p43_filters) > .t-Region-header > .t-Region-headerItems--title { order: 1; flex: 0 0 auto; padding-right: .75rem; }
  :is(#p42_filters, #p43_filters) > .t-Region-bodyWrap { order: 2; flex: 1 1 0; min-width: 0; }
  :is(#p42_filters, #p43_filters) > .t-Region-header > .t-Region-headerItems--buttons { order: 3; flex: 0 0 auto; }
  :is(#p42_filters, #p43_filters) > .t-Region-bodyWrap > .t-Region-body { padding: .4rem 0; }
  :is(#p42_filters, #p43_filters) > .t-Region-bodyWrap > .t-Region-body > .container > .row > .col { padding-left: 0; padding-right: 0; }
  :is(#p42_filters, #p43_filters) .t-Form-fieldContainer { padding-top: 0; padding-bottom: 0; }
}
/* p43: compact recovery cards, three per row on wide screens */
#p43_cards .a-CardView-body { padding: .55rem .8rem .1rem; }
#p43_cards .a-CardView-actions { padding: .2rem .8rem .55rem; }
#p43_cards .dm-i-rc p { margin: .1rem 0; line-height: 1.35; }
#p43_cards .dm-i-rc-line:has(.dm-i-rc-late), #p43_cards .dm-i-rc-prom { display: block; }
#p43_cards .dm-i-rc-line:has(.dm-i-rc-late) b, #p43_cards .dm-i-rc-prom .fa { display: inline !important; margin-right: .3rem; }
#p43_by_officer .dm-i-reg-aside { margin-left: .5rem; }
#p43_cards .dm-i-rc-head h3 { margin-bottom: .1rem; }
#p43_cards .a-CardView-actions .t-Button, #p43_cards .a-CardView-actions .a-CardView-button { min-height: 32px; padding-top: .3rem; padding-bottom: .3rem; }
@media (min-width: 1200px) { #p43_cards .a-CardView-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; } }
@media (max-width: 767px) { #p43_cards .a-CardView-actions .t-Button, #p43_cards .a-CardView-actions .a-CardView-button { min-height: 40px; } }
/* p48: the three charts of the last row at equal height (no gap under the shorter ones); trend note wraps */
@media (min-width: 992px) {
  .row:has(> .col > #p48_trend) > .col { display: flex; flex-direction: column; }
  .row:has(> .col > #p48_trend) > .col > .t-Region { flex: 1 1 auto; }
  .row:has(> .col > #p48_bycat) > .col > .t-Region { height: auto; }
}
#p48_trend .t-Region-footer, #p48_trend .dm-sub { white-space: normal; overflow-wrap: anywhere; }
/* ======================================================================= end D-226 (Builder F) */
/* ======================================================================= D-228 (MAIN, 2026-10-24) p45 / p46 "which product, which month"
   Summary "This payment goes to": one block per plan (product chip + plan no muted, one line per qist); open items: product bold,
   month under the due date, rows this payment touches highlighted. Display only. */
.dm-p45-goes + .dm-p45-goes { margin-top: 8px; }
.dm-p45-goes-h { margin-bottom: 2px; }
.dm-p45-goes .dm-p45-prod, .dm-p46-paid .dm-p45-prod { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--dm-brand-tint, color-mix(in srgb, var(--dm-brand) 12%, transparent)); color: var(--dm-brand); }
.dm-p45-planno { color: var(--dm-muted); font-size: 12px; }
.dm-p45-goes ul, .dm-p46-paid ul { margin: 2px 0 0; padding-left: 18px; }
.dm-p45-goes li, .dm-p46-paid li { margin: 1px 0; line-height: 1.4; }
.dm-p45-due { color: var(--dm-muted); font-size: 12px; }
.dm-p45-full { color: var(--dm-ok); }
.dm-p45-left { color: var(--dm-warn); }
#p45_items strong.dm-p45-prod { color: var(--ut-body-text-color, inherit); font-weight: 700; }
#p45_items .dm-p45-month { display: block; color: var(--dm-muted); font-size: 12px; }
#p45_items tr:has(.dm-p45-this) > td { background: color-mix(in srgb, var(--dm-brand) 8%, transparent) !important; }
#p45_items .dm-p45-this { font-weight: 700; color: var(--dm-brand); white-space: nowrap; }
#p45_items .dm-p45-this--PART { color: var(--dm-warn); }
#p45_summary dt.t-AVPList-label:has(+ dd .dm-p45-goes) { width: 100%; float: none; padding-bottom: 0; border-bottom: 0; }
#p45_summary dd.t-AVPList-value:has(.dm-p45-goes) { width: 100%; float: none; margin-left: 0; padding-top: 2px; font-size: 13px; }
#p45_summary .dm-p45-goes .dm-p45-prod { font-size: 13px; }
#p45_summary .dm-p45-goes ul { padding-left: 16px; }
.dm-p45-full, .dm-p45-left { white-space: nowrap; }
#p45_summary > .t-Region-header { padding-top: .25rem; }
#p45_summary > .t-Region-header .t-Region-headerItems { padding-top: .35rem; padding-bottom: .35rem; }
#p45_summary > .t-Region-bodyWrap > .t-Region-body { padding-top: .25rem; }
#p45_summary .t-AVPList-label, #p45_summary .t-AVPList-value { padding-top: 5px; padding-bottom: 5px; }
.dm-p46-paid { display: block; line-height: 1.35; }
@media print {
  .dm-p46-paid { font-size: 11px; }
  .dm-p46-paid .dm-p45-prod { display: inline; padding: 0; background: none; color: inherit; font-size: inherit; }
  .dm-p46-paid .dm-p45-planno, .dm-p46-paid .dm-p45-due { font-size: 10px; color: inherit; }
  .dm-p46-paid .dm-p45-full, .dm-p46-paid .dm-p45-left { color: inherit; }
  #p46_paid_for td:last-child, #p46_paid_for th:last-child { white-space: nowrap; min-width: 0 !important; padding-left: 4px; padding-right: 0; }
  #p46_paid_for td:first-child, #p46_paid_for th:first-child { padding-left: 0; padding-right: 4px; }
}
/* owner 2026-10-24: month / date and the paid words highlighted like the product chip */
.dm-p45-when, .dm-p45-goes .dm-p45-full, .dm-p45-goes .dm-p45-left, .dm-p46-paid .dm-p45-full, .dm-p46-paid .dm-p45-left {
  display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.dm-p45-when { background: color-mix(in srgb, var(--dm-info) 14%, transparent); color: var(--dm-info); }
.dm-p45-when .dm-p45-due { color: inherit; font-weight: 400; }
.dm-p45-goes .dm-p45-full, .dm-p46-paid .dm-p45-full { background: color-mix(in srgb, var(--dm-ok) 14%, transparent); }
.dm-p45-goes .dm-p45-left, .dm-p46-paid .dm-p45-left { background: color-mix(in srgb, var(--dm-warn) 14%, transparent); }
#p45_items .dm-p45-month { display: inline-block; margin-top: 2px; padding: 0 8px; border-radius: 999px; font-weight: 700;
  background: color-mix(in srgb, var(--dm-info) 14%, transparent); color: var(--dm-info); }
#p45_items .dm-p45-this { display: inline-block; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--dm-ok) 14%, transparent); color: var(--dm-ok); }
#p45_items .dm-p45-this--PART { background: color-mix(in srgb, var(--dm-warn) 14%, transparent); color: var(--dm-warn); }
@media print { .dm-p46-paid .dm-p45-full, .dm-p46-paid .dm-p45-left { background: none; padding: 0; } }
/* owner 2026-10-24: chips wrapped onto a 2nd line overlapped -> each qist line is a wrapping flex row with a gap */
.dm-p45-goes ul, .dm-p46-paid ul { list-style: none; padding-left: 0; }
.dm-p45-goes li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0; line-height: 1.5; }
.dm-p45-when, .dm-p45-goes .dm-p45-full, .dm-p45-goes .dm-p45-left, .dm-p46-paid .dm-p45-full, .dm-p46-paid .dm-p45-left { line-height: 1.6; }
/* owner 2026-10-24: no month badge in the open items Due Date column (the date alone is enough there) */
#p45_items .dm-p45-month { display: none; }
/* owner 2026-10-24 v3 "professional": one aligned row per qist (Qist # | Month | Amount | Status), no wrapping chips */
#p45_summary ul.dm-q { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content max-content; column-gap: 10px; row-gap: 0;
  margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
#p45_summary ul.dm-q > li { display: contents; }
#p45_summary ul.dm-q > li > span { padding: 4px 0; border-bottom: 1px solid var(--dm-line, rgba(127,127,127,.2)); white-space: nowrap; }
#p45_summary ul.dm-q > li:last-child > span { border-bottom: 0; }
#p45_summary .dm-q-no { color: var(--dm-muted); }
#p45_summary .dm-q-mon { color: var(--dm-info); font-weight: 600; white-space: normal !important; }
#p45_summary .dm-q-amt { text-align: right; font-variant-numeric: tabular-nums; }
#p45_summary .dm-q-st { font-weight: 600; text-align: right; }
#p45_summary .dm-q-st--CLEARS { color: var(--dm-ok); }
#p45_summary .dm-q-st--PART { color: var(--dm-warn); }
#p45_summary .dm-q-fold > span { font-style: italic; }
#p45_summary .dm-p45-goes-h { margin: 2px 0 0; }
/* ======================================================================= end D-228 */
/* D-249 A: p46 method lines (mockup: one row per method line, TID on non-cash) under Amount received, same column as the words */
#p46_receipt .dm-i-paylines { width: 50%; margin: 0 0 4px auto; }
#p46_receipt .dm-i-paylines .t-AVPList-label, #p46_receipt .dm-i-paylines .t-AVPList-value { padding-top: 2px; padding-bottom: 2px; }
#p46_receipt .dm-i-paylines .t-Report-report, #p46_receipt .dm-i-paylines .t-AVPList { border: 0; background: transparent; }
.dm-receipt--THERMAL_80 #p46_receipt .dm-i-paylines, .dm-receipt--THERMAL_80.dm-i-receipt .dm-i-paylines { width: 100%; }
@media (max-width: 640px) { #p46_receipt .dm-i-paylines { width: 100%; } }
/* D-249 A: p48 "by category" table was 510 px in a 340 px card on phone - Collected / Overdue columns were cut off (money hidden):
   headers wrap, smaller cells, and the table scrolls inside its card if it still does not fit */
@media (max-width: 640px) {
  #p48_bycat table th, #p48_bycat table td { white-space: normal; font-size: 12px; padding-left: 6px; padding-right: 6px; }
  #p48_bycat table td:not(:first-child) { white-space: nowrap; }
  #p48_bycat .t-Report-tableWrap, #p48_bycat .t-Report-wrap { max-width: 100%; overflow-x: auto; }
}
