/* Readability and alignment corrections. Mobile presentation only.
 * Preserve ordinary-size page/card footprints and original form ownership;
 * enlarged text and long values can grow naturally within the page width. */
@media screen {
@media screen and (max-width: 768px) {
  
  body.mobile-ui-active #content .msm-page > .sa-page-head button:not([data-system-action=refresh]),
  body.mobile-ui-active #content .msm-page .sa-heading [data-system-action=new],
  body.mobile-ui-active #content > .mam-toolbar > button,
  body.mobile-ui-active .mep-page .ep-summary-toolbar > .ep-actions > button,
  body.mobile-ui-active .mfa-page > .fa-summary > .fa-heading > .fa-actions > button,
  body.mobile-ui-active .mum-page .ua-actions > button,
  body.mobile-ui-active #content .mpfl-page #proposalFileUploadToggle {
    font-size:14px;
  }

  
  body.mobile-ui-active .mep-dialog .ep-dialog-footer button[type=submit],
  body.mobile-ui-active .mfa-dialog .fa-dialog-footer [type=submit],
  body.mobile-ui-active .ua-modal .ua-modal-footer > button {
    font-size:14px;
  }

  
  body.mobile-ui-active .mep-dialog .ep-form :is(input,select):not([type=checkbox]):not([type=radio]),
  body.mobile-ui-active .mfa-dialog .fa-form :is(input,select,textarea):not([type=checkbox]):not([type=radio]) {
    font-size:13px;
  }

  
  body.mobile-ui-active #content .msm-page .sa-row-actions > button,
  body.mobile-ui-active #content .msm-page .sa-more > summary,
  body.mobile-ui-active .mep-page .mep-row-bottom :is(button,.ep-menu>summary,.mep-popup>summary),
  body.mobile-ui-active .mfa-page .mfa-row-bottom :is(button,.fa-more>summary,.mfa-popup>summary),
  body.mobile-ui-active .mum-page .ua-row-actions > button,
  body.mobile-ui-active .mum-page .ua-more > summary {
    font-size:13px;
    padding-left:3px;
    padding-right:3px;
  }
  body.mobile-ui-active #content .msm-page .sa-row-actions,
  body.mobile-ui-active .mep-page .mep-row-bottom .ep-actions,
  body.mobile-ui-active .mfa-page .mfa-row-bottom .fa-row-actions,
  body.mobile-ui-active .mum-page .ua-row-actions {
    column-gap:4px;
  }
  body.mobile-ui-active .msw-page .msw-material-bottom :is(button,summary) {
    font-size:13px;
    padding-left:3px!important;
    padding-right:3px!important;
  }
  body.mobile-ui-active .msw-page .msw-material-bottom .table-action-group {
    column-gap:4px;
  }
}

body.mobile-ui-active #content>.mfr-list .payables-unified-actions button {
  font-size:13px;
  font-weight:500;
}
body.mobile-ui-active #content>.mfr-list .payables-list-note {
  font-size:12px;
}


body.mobile-ui-active #content>.mrv-page .receivable-detail-amounts :is(span,strong) {
  display:block;
}


@media (max-width:350px) {
  body.mobile-ui-active #content>.mrv-page .mrv-ledger td:is(:nth-child(3),:nth-child(4),:nth-child(5))::before {
    display:block;
    margin-right:0;
  }
}


body.mobile-ui-active #content>.mrv-page #receivableEditForm .mrv-form-scroll>label:has([name=invoiceAmount],[name=receivedAmount]) {
  grid-template-rows:1fr auto;
  align-self:stretch;
}


body.mobile-ui-active #content>.mrv-page .receivable-receipt-heading {
  justify-content:flex-start;
}

body.mobile-ui-active #quoteEditorModal .quote-form-head h3 {
  font-size: 17px;
  line-height: 24px;
}
body.mobile-ui-active #quoteEditorModal .quote-form-step-nav a strong {
  font-size: 13px;
  line-height: 18px;
}
body.mobile-ui-active #quoteEditorModal :is(.mqe-field > label,
  .quote-service-plan-fields > label > span,
  .quote-maintenance-cost-fields > label > span,
  .mqe-fold-body > label > span) {
  font-size: 13px;
  line-height: 18px;
}
body.mobile-ui-active #quoteEditorModal :is(input:not([type=checkbox]):not([type=hidden]), select) {
  font-size: 14px;
  line-height: 20px;
}
body.mobile-ui-active #quoteEditorModal textarea {
  font-size: 14px;
  line-height: 20px;
}
body.mobile-ui-active #quoteEditorModal .mqe-fold > summary > strong {
  font-size: 13px;
}
body.mobile-ui-active #quoteEditorModal #quoteForm .quote-form-save-actions button {
  font-size: 13px;
  line-height: 18px;
}


body.mobile-ui-active #content > .mlg-page .activity-scope > button,
body.mobile-ui-active #content > .mlg-page .activity-head-actions > button,
body.mobile-ui-active #content > .mlg-page .mlg-menu > summary {
  font-size: 13px;
  line-height: 20px;
}
body.mobile-ui-active #content > .mlg-page .activity-primary-filters input {
  font-size: 14px;
  line-height: 20px;
}

body.mobile-ui-active .mtr-workspace .mtr-arrangement-form > .task-schedule-field {
  margin: 0;
}
body.mobile-ui-active .mtr-workspace .task-admin-details:has(> .mtr-arrangement-form) > summary {
  margin-bottom: 0;
  padding: 11px 0;
  line-height: 22px;
}

@media screen and (max-width:768px) {
  body.mobile-ui-active #content.msw-page .msw-stock-row .material-action-group > button {
    font-size:13px!important;
    padding:4px 2px!important;
  }
  body.mobile-ui-active #content.msw-page .msw-stock-row .material-action-group {
    column-gap:2px!important;
  }
}

@media screen {
  body.mobile-ui-active #content>.mrv-page .receivable-overview-metrics {
    display:flex;
    flex-wrap:wrap;
  }
  body.mobile-ui-active #content>.mrv-page :is(.receivable-primary-metric,.receivable-reference-metric) {
    flex:1 1 0;
    min-width:min-content;
    max-width:100%;
    line-height:1.454545455;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-stat-details {
    flex:0 0 100%;
  }
  body.mobile-ui-active #content>.mrv-page .receivable-overview-metrics strong {
    white-space:nowrap;
    line-height:1.4;
  }
  
  body.mobile-ui-active #content>.mrv-page .mrv-ledger tbody>tr {
    display:flex;
    flex-wrap:wrap;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-ledger tbody>tr>td {
    flex:0 0 100%;
    line-height:1.416666667;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-ledger tbody>tr>td:is(:nth-child(3),:nth-child(4),:nth-child(5)) {
    flex:1 1 0;
    min-width:min-content!important;
    max-width:100%;
    white-space:nowrap!important;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-ledger .cell-sub,
  body.mobile-ui-active #content>.mrv-page .mrv-ledger td::before {
    line-height:1.454545455;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-ledger td:first-child strong {
    line-height:1.428571429;
  }
  body.mobile-ui-active #content>.mrv-page :is(.receivable-detail-amounts,.receivable-receipt-amounts) {
    display:flex;
    flex-wrap:wrap;
  }
  body.mobile-ui-active #content>.mrv-page :is(.receivable-detail-amounts,.receivable-receipt-amounts)>div {
    display:flex;
    flex-direction:column;
    flex:1 1 0;
    min-width:min-content;
    max-width:100%;
  }
  body.mobile-ui-active #content>.mrv-page :is(.receivable-detail-amounts,.receivable-receipt-amounts) span {
    flex:1;
    line-height:1.454545455;
  }
  body.mobile-ui-active #content>.mrv-page :is(.receivable-detail-amounts,.receivable-receipt-amounts) strong {
    white-space:nowrap;
    line-height:1.428571429;
  }
  body.mobile-ui-active #content>.mrv-page .receivable-detail-heading h2 {
    line-height:1.375;
  }
  body.mobile-ui-active #content>.mrv-page .receivable-detail-context {
    line-height:1.454545455;
  }
  body.mobile-ui-active #content>.mrv-page .receivable-receipt-heading h3 {
    line-height:1.428571429;
  }
  body.mobile-ui-active #content>.mrv-page :is(#receivableReceiptContext,#receivableReceiptSettlement,.receivable-receipt-footer>span) {
    line-height:1.454545455;
  }
  body.mobile-ui-active #content>.mrv-page .mrv-form-scroll>label {
    line-height:1.416666667;
  }
  body.mobile-ui-active #content>.mrv-page #receivableReceiptForm .mrv-form-scroll>label:has([name=amount],[name=paymentDate]) {
    grid-template-rows:1fr auto;
    align-self:stretch;
  }
  body.mobile-ui-active #content>.mfr-list .payables-unified-actions button {
    line-height:1.384615385;
  }
}

body.mobile-ui-active #quoteEditorModal .quote-form-head h3 { line-height:1.4117647059; }
body.mobile-ui-active #quoteEditorModal .quote-form-step-nav a strong,
body.mobile-ui-active #quoteEditorModal :is(.mqe-field > label,
  .quote-service-plan-fields > label > span,
  .quote-maintenance-cost-fields > label > span,
  .mqe-fold-body > label > span) { line-height:1.3846153846; }
body.mobile-ui-active #quoteEditorModal .mqe-field > small,
body.mobile-ui-active #quoteEditorModal .quote-venue-status { line-height:1.5; }
body.mobile-ui-active #quoteEditorModal .quote-section-heading span,
body.mobile-ui-active #quoteEditorModal .quote-service-subsection-heading span { line-height:1.5454545455; }
body.mobile-ui-active #quoteEditorModal .quote-form-step-nav a { height:auto; }
body.mobile-ui-active #quoteEditorModal :is(input:not([type=checkbox]):not([type=hidden]),select) {
  line-height:1.4285714286;
  min-height:max(34px,calc(1.4285714286em + 11px));
  height:auto;
}
body.mobile-ui-active #quoteEditorModal textarea { line-height:1.4285714286; }
body.mobile-ui-active #quoteEditorModal .quote-form-head-actions button,
body.mobile-ui-active #quoteEditorModal .mqe-editor-menu > summary { line-height:1.8333333333;height:auto; }
body.mobile-ui-active #quoteEditorModal #quoteForm .quote-form-save-actions button { line-height:1.3846153846;height:auto; }
body.mobile-ui-active #quoteEditorModal #quoteForm .quote-form-save-actions .quote-draft-save-state { line-height:1.6; }

/* Accounts share a narrow line with login/phone metadata. Use the available
 * inter-action gap instead of widening this row and losing a visible record. */
body.mobile-ui-active .mum-page .ua-row-actions > button,
body.mobile-ui-active .mum-page .ua-more > summary {
  padding-left:0; padding-right:0;
}
body.mobile-ui-active .mum-page .ua-row-actions { column-gap:3px; }
/* Keep the original 44px personal action and provide space around its label. */
body.mobile-ui-active .mobile-system-shell .mobile-workspace .mobile-person-logout {
  padding-left:12px; padding-right:12px;
}
/* A text refresh action has the same quiet appearance on both main pages. */
body.mobile-ui-active .mobile-system-shell #content .mobile-workspace .mobile-workspace-refresh {
  background-color:transparent;
}
}

/* One mobile page-size control remains reachable even for empty/single-page lists. */
@media screen {
body.mobile-ui-active .business-record-pagination {display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;padding:7px 0;min-width:0;}
body.mobile-ui-active .business-record-pagination .list-page-jump {display:none!important;}
body.mobile-ui-active .business-record-pagination .list-page-size {display:flex!important;width:auto;}
body.mobile-ui-active .mobile-system-shell .project-contract-page-shell .project-contract-detail-panel .business-record-pagination .list-page-size {display:flex!important;}
body.mobile-ui-active .business-record-pagination .list-page-size>span {display:none;}
body.mobile-ui-active .business-record-pagination [data-page-size] {width:84px;min-height:32px;height:32px;padding:4px;font-size:13px;}
body.mobile-ui-active .business-record-pagination :is(button,input) {width:auto;min-height:32px;margin:0;padding:4px 7px;}
body.mobile-ui-active .business-record-page-wrap {min-width:0;max-width:100%;}
body.mobile-ui-active .business-record-list {display:grid;gap:6px;min-width:0;}
body.mobile-ui-active :is(.business-record-list,.mobile-client-card-list)>:is(.customer-page-hidden,.list-page-hidden) {display:none!important;}
body.mobile-ui-active .client-card-page-wrap {min-width:0;max-width:100%;}
body.mobile-ui-active .mobile-system-shell .mobile-quote-compact .list-pagination {display:flex!important;}
body.mobile-ui-active .mobile-system-shell .mobile-quote-compact .list-pagination .list-page-size,
body.mobile-ui-active .mobile-system-shell .quote-page-stack .customer-fixed-pagination .list-page-size,
body.mobile-ui-active .ca-workspace .ca-pagination .list-page-size {display:flex!important;}
body.mobile-ui-active .project-contract-page-shell .mp-list-compact .customer-fixed-pagination.mp-list-single-page .list-pagination-controls,
body.mobile-ui-active .mca-refined [data-ca-groups] .customer-fixed-pagination:has([data-page-step="-1"]:disabled):has([data-page-step="1"]:disabled) .list-pagination-controls {display:flex!important;}
body.mobile-ui-active .mobile-system-shell .project-contract-page-shell .mp-list-compact .customer-fixed-pagination.mp-list-single-page {display:flex!important;}
body.mobile-ui-active .mobile-system-shell .project-contract-page-shell .mp-list-compact .customer-fixed-pagination [data-page-size] {font-size:13px!important;}
body.mobile-ui-active .mobile-system-shell .mobile-quote-compact .list-pagination .list-page-size select {width:84px;min-height:32px;padding:4px;font-size:13px;}
body.mobile-ui-active .mobile-system-shell .quote-page-stack .customer-fixed-pagination .list-page-size>span {display:none;}
}

/* Interface clarity: keep original text size and all shared paging controls. */
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area] .mobile-person-actions > [data-mobile-personal-applications] { min-height:48px; padding-top:11px; padding-bottom:11px; }
body.mobile-ui-active .mobile-overview-list-summary[hidden], body.mobile-ui-active [data-overview-list-count][hidden] { display:none !important; }
body.mobile-ui-active .mobile-personal-section { margin-top:16px; }

/* Explicitly audited, static sales/execution explanation nodes only. */
@media screen {
  body.mobile-ui-active [data-sales-explanation] { display: none !important; }
  body.mobile-ui-active .mw-workspace > .mw-start:has(> [data-mw="create"]) > h3 { display: none; }
  body.mobile-ui-active .mw-workspace > .mw-start:has(> [data-mw="create"]) { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
  body.mobile-ui-active #quoteExportHint:empty { display: none; }
}

/* Audited, static presentation notes only; form labels, status, warnings and help stay. */
body.mobile-ui-active [data-support-clarity-note] {
  display: none !important;
}
/* Reappears automatically when the original preview renderer inserts an actual file. */
body.mobile-ui-active .proposal-file-upload-preview:has(> [data-support-clarity-note]:only-child) {
  display: none !important;
}

/* Original record owners set the mode and available height. Override only their legacy
   mobile natural-flow declarations; a short explicit page remains its natural height. */
body.mobile-ui-active #mainView #content :is(.list-page-scroll,.fw-table-scroll,.payables-unified-table)[data-page-size-mode="fixed"] {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: var(--list-page-height) !important;
  overflow-y: auto !important;
  scrollbar-gutter: auto !important;
  overscroll-behavior-y: contain;
}
body.mobile-ui-active #content .mca-refined [data-ca-groups] .customer-fixed-pagination .list-pagination-controls {
  display: flex !important;
}
body.mobile-ui-active #content .pt-record-pagination {
  margin: 6px 0 0;
}
body.mobile-ui-active #mainView #content .ca-workspace .customer-fixed-pagination .list-page-size {
  display: flex !important;
}

/* Share short metadata rows, retaining text, original font sizes and original actions. */
body.mobile-ui-active .mobile-system-shell .mobile-overview .mobile-overview-record-meta { gap:1px 6px; }
body.mobile-ui-active .mobile-system-shell .mobile-overview .mobile-overview-record-meta > .mobile-overview-record-status { display:inline; }
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area] .mobile-work-item-meta { display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline;gap:1px 7px; }
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area] .mobile-work-item-meta > .mobile-work-item-context { display:inline;grid-column:auto;min-width:0; }
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area] .mobile-work-item-state { margin-left:auto; }
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area] .mobile-work-item-foot { margin-top:0;padding-top:0;border-top:0; }
body.mobile-ui-active #content .mca-refined .ca-catalog-row .ca-group-head > div:first-child { display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px; }
body.mobile-ui-active #content .mca-refined .ca-catalog-row .ca-group-head > div:first-child > h3 { flex:1 1 130px;min-width:0;margin:0; }
body.mobile-ui-active #content .mca-refined .ca-catalog-row .ca-catalog-reminders { display:flex;flex-wrap:wrap;gap:3px;margin:0; }
body.mobile-ui-active #content .mca-refined .ca-catalog-row .ca-catalog-count > small { display:inline;flex-basis:auto;margin-right:8px; }
body.mobile-ui-active #content>.mre-page .reim-table .reim-record-row td:nth-child(7) { display:flex!important;flex-wrap:wrap;align-items:baseline;gap:1px 6px; }
body.mobile-ui-active #content>.mre-page .reim-table .reim-record-row td:nth-child(7)>small { display:inline;margin:0; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(1) { display:contents!important; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(1)>.cell-main { grid-column:1;grid-row:1;min-width:0; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(1)>.cell-sub { grid-column:1;grid-row:2;min-width:0;overflow-wrap:anywhere; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(3) { grid-column:2!important;grid-row:2!important;justify-self:end; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(5) { grid-row:3!important; }
body.mobile-ui-active #content.msw-page .msw-stock-row>td:nth-child(6) { grid-row:3!important; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row { grid-template-columns:auto minmax(0,1fr) auto; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>td:nth-child(2) { grid-column:1/3!important;grid-row:1!important; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>td:nth-child(4) { grid-column:3!important;grid-row:1!important; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>td:nth-child(3) { grid-column:1!important;grid-row:2!important; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>td:nth-child(8) { grid-column:2!important;grid-row:2!important;white-space:normal;overflow-wrap:anywhere; }
body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>.mad-attendance-actions { grid-column:3!important;grid-row:2!important; }

body.mobile-ui-active #content>.attendance-management-page.mam-page #attendanceMainTable tbody>tr.mad-attendance.mam-row>td:nth-child(3) { align-self:end; }

/* An expanded personal-application list uses its own focused screen; collapse restores the original profile actions. */
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area="mine"]:has(> .mobile-personal-section) > :is(.mobile-person-card,.mobile-person-actions,.mobile-person-logout) { display:none; }
body.mobile-ui-active .mobile-system-shell .mobile-workspace[data-mobile-hub-area="mine"] > .mobile-personal-section { margin-top:0; }

/* Reserve the measured navigation once on record-list screens. */
body.mobile-ui-active .mobile-system-shell #content.mobile-system-content:has(.list-page-scroll) { padding-bottom:var(--mobile-list-nav-height, calc(60px + env(safe-area-inset-bottom))); }
body.mobile-ui-active #content .receivable-list-panel:has(.list-page-scroll) { padding-bottom:0; margin-bottom:0; }
