/* Original ERP design system layered over the official Bootstrap 5 distribution. */
:root {
    --erp-primary: #4f56c7;
    --erp-primary-hover: #3f46af;
    --erp-bg: #f6f7fb;
    --erp-surface: #fff;
    --erp-border: #e3e6ee;
    --erp-text: #242938;
    --erp-muted: #697386;
    --erp-radius: .5rem;
    --erp-shadow: 0 2px 5px #24293804;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-border-radius: var(--erp-radius);
}
body { background: var(--erp-bg); color: var(--erp-text); font-size: .875rem; line-height: 1.55; }
h1 { font-size: 1.625rem; font-weight: 650; letter-spacing: -.035em; }
h2 { font-size: 1rem; font-weight: 650; letter-spacing: -.015em; }
a { color: var(--erp-primary); }
.btn { font-size: .8125rem; font-weight: 600; padding: .5625rem .9375rem; border-radius: var(--erp-radius); }
.btn-sm { font-size: .75rem; padding: .3125rem .6875rem; }
.btn-primary { --bs-btn-bg: var(--erp-primary); --bs-btn-border-color: var(--erp-primary); --bs-btn-hover-bg: var(--erp-primary-hover); --bs-btn-hover-border-color: var(--erp-primary-hover); --bs-btn-active-bg: var(--erp-primary-hover); --bs-btn-active-border-color: var(--erp-primary-hover); --bs-btn-focus-shadow-rgb: 79,86,199; }
.btn-outline-primary { --bs-btn-color: var(--erp-primary); --bs-btn-border-color: #d2d5ee; --bs-btn-hover-bg: #eeeffb; --bs-btn-hover-color: var(--erp-primary-hover); --bs-btn-hover-border-color: #b6bce2; --bs-btn-active-bg: var(--erp-primary); --bs-btn-active-border-color: var(--erp-primary); }
.btn-outline-secondary { --bs-btn-color: #566071; --bs-btn-border-color: #d8dce5; --bs-btn-hover-bg: #f1f3f8; --bs-btn-hover-border-color: #c7cdd8; --bs-btn-hover-color: var(--erp-text); }
a:focus-visible, button:focus-visible { outline: 3px solid #9298e6; outline-offset: 3px; }
button:disabled { cursor: wait; }
.workspace { margin-left: 0; min-width: 0; }
/* One shared navigation tree serves desktop dropdowns and mobile accordions. */
.shell-header { position: relative; z-index: 1000; display: grid; --shell-inset: max(2.25rem,calc((100% - 1440px)/2 + 2.25rem)); grid-template-areas: "brand account" "navigation navigation"; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 0; min-height: 64px; padding: 0; background: var(--erp-surface); }
.shell-brand { margin-left: var(--shell-inset); padding-block: .8125rem; grid-area: brand; display: flex; align-items: center; gap: .5rem; color: var(--erp-text); text-decoration: none; font-size: .85rem; font-weight: 650; white-space: nowrap; }
.shell-brand-logo { width: 50px; height: 50px; flex-shrink: 0; object-fit: contain; background: transparent; border: 0; border-radius: 0; }
.shell-brand-text { min-width: 0; }
.shell-brand small { white-space: normal; display: block; font-size: .65rem; color: var(--erp-muted); font-weight: 400; }
.shell-navigation-panel { display: contents; }
.shell-navigation { grid-area: navigation; min-width: 0; padding: .5rem var(--shell-inset); background: #f7f8fc; border-block: 1px solid var(--erp-border); }
.shell-modules { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; list-style: none; padding: 0; margin: 0; }
.shell-module { position: relative; min-width: 0; }
.shell-module-toggle, .shell-dashboard { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .75rem; border: 0; border-radius: var(--erp-radius); background: transparent; color: #596273; font-size: .75rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.shell-module-toggle:hover, .shell-dashboard:hover, .shell-module-toggle:focus-visible, .shell-dashboard:focus-visible { color: var(--erp-primary); background: #eeeffb; }
.shell-module.is-active>.shell-module-toggle, .shell-dashboard.is-active { color: var(--erp-primary-hover); background: #ebecfb; font-weight: 650; }
.shell-chevron { width: .35rem; height: .35rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-top: -.2rem; }
.shell-module-toggle[aria-expanded="true"] .shell-chevron { transform: rotate(225deg); margin-top: .2rem; }
.shell-submenu { position: absolute; top: calc(100% + .35rem); left: 0; width: max-content; min-width: 13rem; max-width: min(22rem,calc(100vw - 2rem)); padding: .35rem; margin: 0; list-style: none; background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); box-shadow: 0 4px 14px #2429380d; }
.shell-module:last-child .shell-submenu { left: auto; right: 0; }
.shell-submenu[hidden] { display: none; }
.shell-submenu a { display: block; padding: .55rem .7rem; color: #596273; font-size: .8rem; text-decoration: none; border-radius: .375rem; white-space: normal; overflow-wrap: normal; word-break: normal; }
.shell-submenu a:hover { background: #f0f1f7; color: var(--erp-text); }
.shell-submenu a[aria-current="page"] { background: #ebecfb; color: var(--erp-primary-hover); font-weight: 650; }
.shell-account { justify-self: end; margin-right: var(--shell-inset); padding-block: .8125rem; grid-area: account; display: flex; align-items: center; gap: .65rem; min-width: 0; }
.shell-account form { margin: 0; flex-shrink: 0; }
.shell-account .account-email { max-width: 240px; }
.shell-menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .5rem; background: transparent; color: var(--erp-text); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .shell-header { --shell-inset: 1.75rem; }
}
@media (max-width: 991.98px) {
    .shell-header { grid-template-areas: "brand toggle" "panel panel"; grid-template-columns: minmax(0,1fr) auto; gap: 0 .5rem; padding: .6rem 1rem; }
    .shell-brand { margin-left: 0; padding-block: 0; min-width: 0; }
    .shell-brand-logo { width: 42px; height: 42px; }
    .shell-navigation { padding: 0; background: transparent; border: 0; }
    .shell-menu-toggle { display: inline-flex; grid-area: toggle; }
    .shell-navigation-panel { display: none; grid-area: panel; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 64px); overflow-y: auto; padding: .5rem 1rem 1rem; background: var(--erp-surface); border-bottom: 1px solid var(--erp-border); box-shadow: 0 4px 12px #24293808; }
    .shell-navigation-panel.is-open { display: block; }
    .shell-modules { display: flex; flex-direction: column; align-items: stretch; gap: .15rem; }
    .shell-module-toggle, .shell-dashboard { display: flex; justify-content: space-between; width: 100%; min-height: 44px; font-size: .85rem; padding: .6rem .7rem; }
    .shell-submenu { position: static; width: auto; min-width: 0; max-width: none; border: 0; box-shadow: none; padding: .2rem 0 .4rem .75rem; }
    .shell-submenu a { min-height: 44px; padding: .7rem; }
    .shell-account { margin-right: 0; flex-wrap: wrap; justify-content: space-between; padding: .85rem .7rem 0; margin-top: .5rem; border-top: 1px solid var(--erp-border); }
    .shell-account .account-email { max-width: min(240px,calc(100vw - 7rem)); }
}
@media (max-width: 575.98px) { .shell-header { padding-inline: .75rem; } .shell-brand { font-size: .8rem; } .shell-brand small { font-size: .6rem; } .shell-account .btn { min-height: 44px; } }
@media print { .shell-header { display: none !important; } .workspace { margin-left: 0; } }
.account-block { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #eeeffa; color: var(--erp-primary-hover); font-size: .75rem; font-weight: 650; }
.account-summary { min-width: 0; line-height: 1.35; }
.account-email { display: block; font-size: .75rem; font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary small { color: var(--erp-muted); font-size: .6875rem; }
.workspace main { max-width: 1440px; margin-inline: auto; padding: 2rem 2.25rem 3rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; margin-bottom: 1.75rem; }
.page-heading h1 { margin: 0; }
.page-heading > .btn { flex-shrink: 0; }
.page-subtitle { margin: .375rem 0 0; color: var(--erp-muted); font-size: .8125rem; }
.page-date { background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); padding: .4375rem .75rem; color: var(--erp-muted); font-size: .75rem; white-space: nowrap; }
.panel, .directory-surface { background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); box-shadow: var(--erp-shadow); }
.panel { padding: 1.75rem; }
.welcome-panel { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: #f0f1fb; border-color: #e0e3f4; box-shadow: none; }
.welcome-panel h2 { margin-bottom: .3125rem; }
.welcome-panel p { font-size: .8125rem; }
.welcome-emblem { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #d9dcf0; background: #fff9; border-radius: var(--erp-radius); color: var(--erp-primary); font-size: .75rem; font-weight: 700; }
.section-heading { font-size: .9375rem; margin-bottom: 1rem; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.shortcut { display: flex; flex-direction: column; align-items: flex-start; padding: 1.375rem; background: var(--erp-surface); border: 1px solid var(--erp-border); border-radius: var(--erp-radius); text-decoration: none; color: var(--erp-text); box-shadow: var(--erp-shadow); }
.shortcut:hover { color: var(--erp-text); border-color: #bdc2e8; background: #fdfdff; }
.shortcut-icon { display: grid; place-items: center; width: 36px; height: calc(2.625rem - 2px); border: 1px solid #e9eaf5; background: #f5f5fc; border-radius: var(--erp-radius); color: var(--erp-primary); margin-bottom: 1rem; }
.shortcut-icon svg { width: 19px; height: 19px; }
.shortcut strong { font-size: .9375rem; font-weight: 650; }
.shortcut > span:not(.shortcut-icon):not(.shortcut-action) { color: var(--erp-muted); font-size: .8125rem; margin: .375rem 0 1rem; }
.shortcut .shortcut-action { margin-top: auto; align-self: flex-end; color: var(--erp-primary); font-size: 1.125rem; }
.surface-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--erp-border); }
.surface-heading h2 { font-size: .8125rem; margin: 0; }
.surface-heading span { color: var(--erp-muted); font-size: .6875rem; }
.table-scroll { overflow-x: auto; border-radius: 0 0 var(--erp-radius) var(--erp-radius); }
.table { margin-bottom: 0; vertical-align: middle; font-size: .8125rem; }
.table th { background: #fafbfe; color: #697386; font-size: .6875rem; font-weight: 650; white-space: nowrap; }
.table th, .table td { padding: .875rem 1.25rem; border-color: #edf0f5; }
.table td { overflow-wrap: anywhere; }
.table td:first-child { min-width: 9rem; font-weight: 500; }
.table tbody tr:hover td { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .badge { font-size: .6875rem; padding: .3125rem .5625rem; font-weight: 500; border-radius: .375rem; }
.table .text-bg-success { background: #e8f4ed !important; color: #246740 !important; }
.table .text-bg-secondary { background: #eff1f5 !important; color: #606b7c !important; }
.table .empty-state { padding: 2rem; color: var(--erp-muted); text-align: center; }
.pagination { margin-top: 1.25rem; margin-bottom: 0; flex-wrap: wrap; }
.page-link { color: var(--erp-primary); border-color: var(--erp-border); }
.page-link:hover { background: #f0f1fb; color: var(--erp-primary-hover); }
.page-link:focus { box-shadow: 0 0 0 .2rem #4f56c725; }
.active > .page-link { background: var(--erp-primary); border-color: var(--erp-primary); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.375rem 1.5rem; max-width: 920px; }
.account-form { max-width: 800px; }
.form-grid > div, .form-section-title { grid-column: 1 / -1; }
.form-intro { padding-bottom: 1.125rem; border-bottom: 1px solid var(--erp-border); }
.form-intro h2 { margin: .25rem 0 .375rem; }
.form-intro p { margin: 0; font-size: .8125rem; color: var(--erp-muted); }
label { display: block; color: #414a5b; font-size: .75rem; font-weight: 600; }
.form-control, .form-select { font-size: .8125rem; padding: .625rem .75rem; border-color: #d8dce7; border-radius: var(--erp-radius); color: var(--erp-text); }
label input, label select { margin-top: .4375rem; }
.form-control:focus, .form-select:focus { border-color: #9298df; box-shadow: 0 0 0 .1875rem #4f56c718; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .625rem; border-top: 1px solid var(--erp-border); padding-top: 1.25rem; margin-top: .375rem; }
.form-section-title { font-size: .875rem; padding-top: 1.375rem; margin: .375rem 0 0; border-top: 1px solid var(--erp-border); }
.form-section-title:first-of-type { border: 0; padding: 0; margin: 0; }
.field-error { display: block; color: var(--bs-danger); font-weight: 400; font-size: .75rem; margin-top: .375rem; overflow-wrap: anywhere; }
.eyebrow { color: var(--erp-muted); font-size: .625rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.notice { padding: .875rem 1rem; margin-bottom: 1.25rem; border: 1px solid transparent; border-radius: var(--erp-radius); font-size: .8125rem; overflow-wrap: anywhere; }
.notice ul { margin: 0; padding-left: 1.25rem; }
.notice-success { background: #edf8f1; border-color: #d9ecdf; color: #25603b; }
.notice-danger { background: #fff1f1; border-color: #f3dada; color: #9c3238; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; max-width: 960px; min-height: 480px; background: white; border: 1px solid var(--erp-border); border-radius: .75rem; overflow: hidden; box-shadow: 0 8px 28px #24293806; }
.auth-story { display: flex; flex-direction: column; padding: 2.5rem; background: #f4f7f5; border-right: 1px solid var(--erp-border); justify-content: center; }
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; color: var(--erp-text); text-decoration: none; font-size: .9375rem; font-weight: 650; }
.auth-brand .brand-symbol { display: block; flex-shrink: 0; width: 112px; height: 112px; max-width: 100%; object-fit: contain; border-radius: 0; }
.auth-brand-copy { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.auth-brand-copy strong { font-size: 1.375rem; line-height: 1.3; font-weight: 650; }
.auth-brand-copy > span { font-size: .8125rem; font-weight: 400; color: var(--erp-muted); }
.auth-story-content { padding-block: 1.5rem; }
.auth-story-content > p:not(.eyebrow) { max-width: 320px; font-size: .875rem; color: var(--erp-muted); }
.auth-story-rule { width: 40px; height: 2px; background: #c2d4c8; margin: 1.5rem 0; }
.auth-story-note, .auth-story-footer { color: var(--erp-muted); font-size: .6875rem; }
.auth-story-footer { margin: 0; }
.auth-card { align-self: center; width: 100%; max-width: 410px; margin-inline: auto; padding: 2.5rem; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: .5rem; }
.auth-card > p.text-secondary { font-size: .8125rem; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .75rem; background: white; z-index: 1070; }
.skip-link:focus { top: 1rem; }
@media (max-width: 1199.98px) { .workspace main { padding: 1.75rem; } }
@media (max-width: 991.98px) {
    .shortcut-grid { gap: .75rem; }
    .auth-layout { min-height: 480px; }
    .auth-story { padding: 2rem; }
    .auth-card { padding: 2rem; }
}
@media (max-width: 767.98px) {
    .workspace main { padding: 1.5rem 1rem 2rem; }
    .account-email { max-width: 150px; }
    .account-avatar { display: none; }
    .page-heading { flex-wrap: wrap; align-items: flex-start; gap: .875rem; margin-bottom: 1.25rem; }
    .page-heading h1 { font-size: 1.375rem; }
    .form-grid, .shortcut-grid { grid-template-columns: 1fr; }
    .panel { padding: 1.25rem; }
    .welcome-panel { padding: 1.125rem; }
    .surface-heading { padding: .875rem 1rem; }
    .table th, .table td { padding: .75rem 1rem; }
    .auth-page { padding: 1rem; }
    .auth-layout { display: block; min-height: 0; max-width: 440px; }
    .auth-story { padding: 1.25rem 1.5rem; border-right: 0; border-bottom: 1px solid var(--erp-border); }
    .auth-brand { flex-direction: row; align-items: center; gap: 1rem; }
    .auth-brand .brand-symbol { width: 72px; height: 72px; }
    .auth-brand-copy strong { font-size: 1.125rem; }
    .auth-brand-copy > span { font-size: .75rem; }
    .auth-story-content, .auth-story-footer { display: none; }
    .auth-card { padding: 2rem 1.5rem; max-width: none; }
}
@media (max-width: 359.98px) { .account-email { max-width: 110px; } }

/* Inventory catalog and posting screens follow the existing ERP tokens. */
.filter-bar { display:flex; align-items:flex-end; flex-wrap:wrap; gap:.75rem; margin-bottom:1.25rem; }
.filter-bar label { flex:1 1 150px; max-width:320px; }
.filter-bar label:first-child { flex-basis:240px; }
.page-actions, .action-cell { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:.5rem; }
.table td.action-cell { display:table-cell; white-space:nowrap; }
.cell-detail, .form-hint { display:block; color:var(--erp-muted); font-size:.75rem; font-weight:400; margin-top:.375rem; }
.field-wide { grid-column:1 / -1; }
.document-items { margin-top:1.75rem; border-top:1px solid var(--erp-border); }
.document-items .surface-heading { padding-inline:0; }
.document-item { padding:1rem 0; border-bottom:1px solid var(--erp-border); }
.document-item-controls { display:flex; flex-wrap:wrap; gap:.75rem; align-items:flex-end; }
.document-item-controls > * { min-width:0; flex:1 1 100%; }
.document-item-controls label > .select2-container { display:block; margin-top:.4375rem; }
.document-item-controls .item-action { display:flex; align-items:flex-end; }
.document-item .inventory-item-remove { width:100%; min-height:2.625rem; font-size:.8125rem; }
.document-item-controls .form-control, .document-item-controls .form-select { height:2.625rem; }
.document-item-controls .item-direction .form-select { padding-right:2.25rem; }
.document-item .inventory-item-remove { color:#a33c46; border-color:#d9a4aa; background:transparent; }
.document-item .inventory-item-remove:not(:disabled):hover,
.document-item .inventory-item-remove:not(:disabled):focus-visible { color:#fff; background:#a33c46; border-color:#a33c46; }
.document-item .inventory-item-remove:focus-visible { box-shadow:0 0 0 .1875rem #a33c4626; }
@media(min-width:768px) {
    .document-item-controls > * { flex-basis:calc(50% - .375rem); }
    .document-item-controls .item-variant { flex-basis:100%; }
}
@media(min-width:992px) {
    .document-item-controls { flex-wrap:nowrap; }
    .document-item-controls .item-variant { flex:4 1 0; }
    .document-item-controls .item-direction { flex:2 1 0; min-width:8rem; }
    .document-item-controls .item-quantity { flex:1.5 1 0; min-width:4rem; }
    .document-item-controls .item-cost { flex:2 1 0; min-width:5rem; }
    .document-item-controls .item-action { flex:1.5 1 0; min-width:5rem; }
}
.item-meta { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.5rem 1rem; margin-top:.5rem; color:var(--erp-muted); font-size:.75rem; }
.inventory-document { max-width:1040px; }
@media(max-width:767.98px) { .filter-bar label { max-width:none; } .item-meta { align-items:flex-start; } }

/* Align monetary and quantity columns with consistent numeric widths. */
.table .text-end { font-variant-numeric: tabular-nums; }

/* Searchable business selectors share the ERP form appearance. */
.select2-container { min-width: 0; font-size: .8125rem; width:100%; max-width:100%; }
.select2-container--default .select2-selection--single { height: 2.625rem; border: 1px solid #d8dce7; border-radius: var(--erp-radius); background: #fff; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: calc(2.625rem - 2px); padding-left: 12px; padding-right: 28px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: calc(2.625rem - 2px); }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: #9298df; box-shadow: 0 0 0 .1875rem #4f56c718; }
.select2-selection:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.select2-container--default.select2-container--disabled .select2-selection--single { background: #f1f3f6; color: #687285; }
select.is-invalid + .select2-container .select2-selection { border-color: #dc3545; }
.select2-dropdown { border-color: #d5dbe4; border-radius: 6px; z-index: 1060; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #d5dbe4; border-radius: 4px; padding: 7px; }
.select2-results__option { padding: 8px 12px; overflow-wrap: anywhere; }

/* Purchasing editors share the existing restrained ERP controls. */
.purchase-item-controls,.allocation-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}
.purchase-item-controls>label,.allocation-controls>label{min-width:0}
.purchase-line-total{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--bs-tertiary-bg,#f6f7f8)}
@media(min-width:768px){.purchase-item-controls{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1.5fr)}.allocation-controls{grid-template-columns:minmax(0,3fr) minmax(0,2fr) minmax(0,1fr)}}
@media(min-width:1200px){.purchase-item-controls{grid-template-columns:minmax(0,4fr) minmax(0,1.2fr) minmax(0,2fr) minmax(0,2fr) minmax(0,1.2fr)}}

.purchase-item-controls label > .select2-container,.allocation-controls label > .select2-container{display:block;margin-top:.4375rem}
.purchase-item-controls .item-action,.allocation-controls .item-action{display:flex;align-items:flex-end}
.purchase-item-controls .form-control,.purchase-item-controls .form-select,.allocation-controls .form-control,.allocation-controls .form-select{min-height:2.625rem}

.purchasing-form label > .input-group{margin-top:.4375rem}
.purchasing-form label .input-group > input{margin-top:0}
.purchase-item-controls .purchase-line-total{margin-top:.4375rem;height:2.625rem}

/* Supplier payment assistance remains compact and display-only. */
.payment-outstanding{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;padding:.875rem 1rem;margin-top:1rem;background:#f6f8f7;border:1px solid var(--erp-border);border-radius:var(--erp-radius);font-size:.8125rem}
.payment-outstanding output{font-weight:600;font-variant-numeric:tabular-nums}
.payment-summary{margin:1rem 0;padding:1rem;background:#f6f8f7;border:1px solid var(--erp-border);border-radius:var(--erp-radius)}
.payment-summary h2{font-size:.875rem;margin-bottom:.75rem}.payment-summary dl{display:grid;gap:.5rem;margin:0 0 .75rem}.payment-summary dl>div{display:flex;justify-content:space-between;gap:1rem}.payment-summary dt{font-size:.8125rem;font-weight:500}.payment-summary dd{margin:0;font-size:.8125rem;font-variant-numeric:tabular-nums}.payment-summary p{margin:0}
.allocation-controls output{margin-top:.4375rem;height:2.625rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:768px){.allocation-controls{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}.payment-summary{max-width:32rem;margin-left:auto}}
@media(min-width:1200px){.allocation-controls{grid-template-columns:minmax(0,4fr) minmax(0,2fr) minmax(0,2fr) minmax(0,1.2fr)}}

.payment-summary dl>div{flex-wrap:wrap}.payment-summary dd,.payment-outstanding output{min-width:0;overflow-wrap:anywhere}

/* Compact transaction detail, independent of editable form layout. */
.purchase-detail-badges{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.5rem}
.purchase-detail-badges .badge{font-size:.6875rem;font-weight:600;padding:.3rem .5rem}
.purchase-detail-summary{padding:1rem 1.25rem;margin-bottom:1rem}
.purchase-detail-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem 1.5rem}
.purchase-detail-section{min-width:0}
.purchase-detail-section h2{font-size:.6875rem;letter-spacing:.04em;text-transform:uppercase;color:var(--erp-muted);margin:0 0 .625rem}
.purchase-detail-section dl{display:grid;gap:.5rem;margin:0}
.purchase-detail-section dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:.75rem;align-items:baseline}
.purchase-detail-section dt{font-size:.6875rem;font-weight:400;color:var(--erp-muted);overflow-wrap:anywhere}
.purchase-detail-section dd{font-size:.8125rem;font-weight:500;color:var(--erp-text);margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.purchase-detail-section .purchase-detail-emphasis dd{font-weight:650}
.purchase-detail-notes{border-top:1px solid var(--erp-border);margin-top:.875rem;padding-top:.75rem;min-width:0}
.purchase-detail-notes>span{font-size:.6875rem;color:var(--erp-muted)}
.purchase-detail-notes p{font-size:.8125rem;margin:.25rem 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(min-width:768px){.purchase-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:992px){.purchase-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Sales and collections use scoped compact transaction layouts. */
.sales-form label>.input-group{margin-top:.4375rem}
.sales-form .input-group input{margin-top:0}
.sales-summary-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem 1.5rem;margin:0}
.sales-summary-grid dt{font-size:.6875rem;color:var(--erp-muted);font-weight:400}
.sales-summary-grid dd{margin:.25rem 0 0;font-size:.8125rem;font-weight:500;overflow-wrap:anywhere}
.sale-item-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}
.sale-item-controls>*{min-width:0}
.sale-item-controls label>.select2-container{display:block;margin-top:.4375rem}
.sale-item-controls output{height:2.625rem;margin-top:.4375rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sales-form .sales-customer-summary{font-size:.8125rem;overflow-wrap:anywhere;margin:.75rem 0}
.sales-customer-summary[hidden]{display:none}
.sale-customer-summary-values{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem .75rem;margin:0;padding:.625rem .75rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-bg)}
.sale-customer-summary-values>div{min-width:0}
.sale-customer-summary-values dt{font-size:.6875rem;color:var(--erp-muted);font-weight:400}
.sale-customer-summary-values dd{margin:.125rem 0 0;font-weight:500;font-variant-numeric:tabular-nums}
.sale-customer-summary-values dd>span{display:block}
.sale-customer-summary-values .sale-customer-outstanding dd{font-weight:650}
@media(min-width:576px){.sale-customer-summary-values{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:992px){.sale-customer-summary-values{grid-template-columns:repeat(3,minmax(0,1fr))}.sale-customer-summary-values:has(>div:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}}
.sales-form .sales-totals{display:grid;grid-template-columns:minmax(0,1fr);align-items:end;gap:.75rem;margin:1rem 0 0;font-size:.8125rem}
.sales-totals>label,.sale-form-summary{min-width:0}
.sale-form-summary-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-bg)}
.sale-form-summary-values>div{padding:.375rem .625rem;min-width:0}
.sale-form-summary-values>div+div{border-left:1px solid var(--erp-border)}
.sale-form-summary-values dt{font-size:.6875rem;color:var(--erp-muted);font-weight:400}
.sale-form-summary-values dd{margin:.25rem 0 0;font-weight:500;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.sale-form-summary-values .sale-form-summary-net dd{font-weight:650}
.sales-form .sale-form-schedule{border-top:1px solid var(--erp-border);padding-top:1rem;margin-top:1rem}
@media(min-width:768px){.sales-form .sales-totals{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}}
@media(min-width:992px){.sales-form .sales-totals{grid-template-columns:minmax(12rem,1fr) minmax(0,3fr)}}
@media(max-width:359px){.sale-form-summary-values{grid-template-columns:minmax(0,1fr)}.sale-form-summary-values>div+div{border-left:0;border-top:1px solid var(--erp-border)}}
.sales-schedule-row{display:grid;grid-template-columns:4rem minmax(0,1fr) minmax(0,1fr);gap:.75rem;align-items:center;margin:.5rem 0;font-size:.8125rem}
.sales-schedule{margin:1rem 0}
.sales-reschedule{max-width:16rem;margin-top:.5rem}
.sales-reschedule label{display:block;margin-bottom:.5rem;font-size:.75rem}
.sales-confirm{display:flex;align-items:center;gap:.5rem;margin:1rem 0;font-size:.8125rem}
.sales-receipt h1{font-size:1.125rem}.sales-receipt h2{font-size:.9375rem}
@media(min-width:768px){.sales-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-item-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-schedule{max-width:36rem}}
@media(min-width:992px){.sales-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.sale-item-controls{grid-template-columns:minmax(0,4fr) minmax(4rem,1fr) minmax(0,2fr) minmax(0,2fr) minmax(5rem,1fr)}}
@media print{body:has(.sales-receipt) .shell-header,body:has(.sales-receipt) .skip-link,.sales-no-print{display:none!important}body:has(.sales-receipt) .workspace{margin:0}body:has(.sales-receipt) main{padding:0}.sales-receipt{border:0;box-shadow:none}.sales-receipt .table-scroll{overflow:visible}.sales-receipt .table{min-width:0}}

/* Compact Sale identity and inline creation panels. */
.sales-entity-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.75rem;max-width:920px;margin-bottom:1rem}
.sales-entity-row label{min-width:0;display:block}.sales-entity-row .select2-container{display:block;margin-top:.4375rem}
.sales-form [data-new-customer],.sales-form [data-new-sales-location]{margin:.75rem 0;padding:.75rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius)}
.sales-form .form-grid fieldset{min-width:0}.sales-form .form-grid fieldset>label{display:block}
.sales-location-context{font-size:.8125rem;overflow-wrap:anywhere;margin:.75rem 0}
@media(max-width:575px){.sales-entity-row{grid-template-columns:minmax(0,1fr)}.sales-entity-row>button{justify-self:start}}

/* Compact separation on Sale detail, including the optional posting receipt. */
.sale-detail-section{margin-bottom:1.25rem;min-width:0}
.sale-initial-payment-toggle{margin-top:.75rem}
.sales-form .sale-initial-payment-toggle .form-check-label{margin:0;font-weight:400}
.sale-initial-payment-fields{border:0;padding:0;margin:1rem 0 0;min-width:0}
.sale-initial-payment-fields[hidden]{display:none}

/* Sales History controls occupy the first row; actions stay together below. */
.filter-bar.sales-history-filters{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.75rem;align-items:end}
.sales-history-filter-controls{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;min-width:0}
.sales-history-filters .sales-history-filter-controls>label{max-width:none;min-width:0;margin:0}
.sales-history-filter-controls .select2-container{max-width:100%}
.sales-history-reset{grid-column:2}
.sales-history-submit{grid-column:3}
@media(min-width:1200px){.sales-history-filter-controls{grid-template-columns:minmax(0,1.4fr) minmax(0,1.5fr) repeat(2,minmax(0,1fr)) repeat(2,minmax(0,.9fr))}}
@media(max-width:575.98px){.filter-bar.sales-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-history-filter-controls{grid-template-columns:minmax(0,1fr)}.sales-history-reset{grid-column:1}.sales-history-submit{grid-column:2}}

/* Match native controls and Select2 within the Sales History filter row only. */
.sales-history-filter-controls>label>.form-control,
.sales-history-filter-controls>label>.form-select{height:2.625rem}
.sales-history-filter-controls>label>.select2-container{display:block;height:2.625rem;margin:.4375rem 0 0;padding:0}
.sales-history-filter-controls .select2-selection--single{position:relative;height:2.625rem;font-size:.8125rem;border:1px solid #d8dce7;border-radius:var(--erp-radius)}
.sales-history-filter-controls .select2-selection--single .select2-selection__rendered{line-height:calc(2.625rem - 2px);padding:0 1.75rem 0 .75rem}
.sales-history-filter-controls .select2-selection--single:has(.select2-selection__clear) .select2-selection__rendered{padding-right:3rem}
.sales-history-filter-controls .select2-selection--single .select2-selection__arrow{top:1px;right:1px;height:calc(2.625rem - 2px)}
.sales-history-filter-controls .select2-selection--single .select2-selection__clear{position:absolute;top:50%;right:1.75rem;transform:translateY(-50%);float:none;height:1.5rem;line-height:1.5rem;margin:0;padding:0}

/* Sales History keeps its table on larger screens and stacks rows on mobile. */
.sales-history-table .sales-history-date,
.sales-history-table .sales-history-money,
.sales-history-table .sales-history-action,
.sales-history-table .sales-history-action .btn{white-space:nowrap;overflow-wrap:normal}
.sales-history-table .sales-history-customer .cell-detail{white-space:nowrap}
@media(max-width:767.98px){
    .sales-history-list{background:transparent;border:0;box-shadow:none}
    .sales-history-list .table-scroll{overflow:visible;border-radius:0}
    .sales-history-table{display:block;width:100%;min-width:0}
    .sales-history-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    .sales-history-table tbody{display:grid;gap:.75rem}
    .sales-history-table .sales-history-row{display:flex;flex-direction:column;min-width:0;padding:.875rem 1rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
    .sales-history-table .sales-history-row>td{display:block;min-width:0;padding:.3125rem 0;border:0;background:transparent;text-align:left!important;overflow-wrap:normal;word-break:normal}
    .sales-history-table .sales-history-row>td::before{content:attr(data-label);display:block;margin-bottom:.125rem;color:var(--erp-muted);font-size:.6875rem;font-weight:400}
    .sales-history-table .sales-history-identity{order:1;font-weight:650}
    .sales-history-table .sales-history-identity .cell-detail{overflow-wrap:break-word}
    .sales-history-table .sales-history-customer{order:2;overflow-wrap:break-word}
    .sales-history-table .sales-history-date{order:3}
    .sales-history-table .sales-history-status{order:4}
    .sales-history-table .sales-history-payment{order:5}
    .sales-history-table .sales-history-net{order:6}
    .sales-history-table .sales-history-outstanding{order:7;font-weight:650}
    .sales-history-table .sales-history-action{order:8;margin-top:.25rem}
    .sales-history-table .sales-history-action::before{display:none!important}
    .sales-history-table .sales-history-action .btn{min-width:5rem}
}

/* Collections Received keeps its table on larger screens and stacks rows on mobile. */
.collections-history-table .collections-history-date,
.collections-history-table .collections-history-money,
.collections-history-table .collections-history-action,
.collections-history-table .collections-history-action .btn{white-space:nowrap;overflow-wrap:normal}
@media(max-width:767.98px){
    .collections-history-list{background:transparent;border:0;box-shadow:none}
    .collections-history-list .table-scroll{overflow:visible;border-radius:0}
    .collections-history-table{display:block;width:100%;min-width:0}
    .collections-history-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    .collections-history-table tbody{display:grid;gap:.75rem}
    .collections-history-table .collections-history-row{display:flex;flex-direction:column;min-width:0;padding:.875rem 1rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
    .collections-history-table .collections-history-row>td{display:block;min-width:0;padding:.3125rem 0;border:0;background:transparent;text-align:left!important;overflow-wrap:normal;word-break:normal}
    .collections-history-table .collections-history-row>td::before{content:attr(data-label);display:block;margin-bottom:.125rem;color:var(--erp-muted);font-size:.6875rem;font-weight:400}
    .collections-history-table .collections-history-identity{font-weight:650}
    .collections-history-table .collections-history-action{margin-top:.25rem}
    .collections-history-table .collections-history-action::before{display:none!important}
    .collections-history-table .collections-history-action .btn{min-width:5rem}
}

@media(min-width:1200px){.collections-history-filters .sales-history-filter-controls{grid-template-columns:minmax(0,1.4fr) minmax(0,1.5fr) repeat(2,minmax(0,1fr))}}
.collections-history-table .collections-history-identity,.collections-history-table .collections-history-method{white-space:nowrap;overflow-wrap:normal}

/* Due Collections keeps its table on larger screens and stacks rows on mobile. */
.due-collections-table .due-collections-date,
.due-collections-table .due-collections-money{white-space:nowrap;overflow-wrap:normal}
@media(max-width:767.98px){
    .due-collections-list{background:transparent;border:0;box-shadow:none}
    .due-collections-list .table-scroll{overflow:visible;border-radius:0}
    .due-collections-table{display:block;width:100%;min-width:0}
    .due-collections-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    .due-collections-table tbody{display:grid;gap:.75rem}
    .due-collections-table .due-collections-row{display:flex;flex-direction:column;min-width:0;padding:.875rem 1rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
    .due-collections-table .due-collections-row>td{display:block;min-width:0;padding:.3125rem 0;border:0;background:transparent;text-align:left!important;overflow-wrap:normal;word-break:normal}
    .due-collections-table .due-collections-row>td::before{content:attr(data-label);display:block;margin-bottom:.125rem;color:var(--erp-muted);font-size:.6875rem;font-weight:400}
    .due-collections-table .due-collections-identity{font-weight:650}
}


@media(min-width:1200px){.due-collections-filters .sales-history-filter-controls{grid-template-columns:minmax(0,1.4fr) minmax(0,1.5fr) minmax(0,1fr) repeat(2,minmax(0,.9fr))}}
.due-collections-table .due-collections-identity>a{white-space:nowrap}
.due-collections-table td[data-label="Customer / Contact"] .cell-detail{white-space:nowrap}
@media(max-width:767.98px){.due-collections-table .due-collections-identity .cell-detail{overflow-wrap:break-word}}

/* Sale Detail mobile cards share the same server-rendered permission gates. */
.sale-detail-cards .sale-detail-value{white-space:nowrap;overflow-wrap:normal}
.sale-detail-reschedule summary{white-space:nowrap;list-style:none}
.sale-detail-reschedule summary::-webkit-details-marker{display:none}
.sale-detail-heading .page-actions{flex-wrap:wrap;min-width:0}
@media(max-width:767.98px){
    .sale-detail-heading .page-actions{width:100%;display:flex;gap:.5rem}
    .sale-detail-heading .page-actions .btn{max-width:100%;white-space:normal}
    .sale-detail-cards{border:0;background:transparent;box-shadow:none}
    .sale-detail-cards .surface-heading{padding:.25rem 0 .75rem}
    .sale-detail-cards .table-scroll{overflow:visible;border-radius:0}
    .sale-detail-cards table{display:block;width:100%;min-width:0}
    .sale-detail-cards thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    .sale-detail-cards tbody{display:grid;gap:.75rem}
    .sale-detail-cards tbody tr{display:block;min-width:0;padding:.875rem 1rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
    .sale-detail-cards tbody td{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:.25rem .75rem;padding:.3125rem 0;border:0;min-width:0;background:transparent;overflow-wrap:normal;text-align:left!important}
    .sale-detail-cards tbody td::before{content:attr(data-label);color:var(--erp-muted);font-size:.6875rem;font-weight:400}
    .sale-detail-cards .sale-detail-item-identity,.sale-detail-cards .sale-detail-schedule-identity{display:block;font-weight:650;overflow-wrap:break-word;margin-bottom:.375rem}
    .sale-detail-cards .sale-detail-item-identity::before,.sale-detail-cards .sale-detail-schedule-identity::before{display:none}
    .sale-detail-cards .sale-detail-due{display:block}
    .sale-detail-cards .sale-detail-due::before{float:left;margin-right:.75rem}
    .sale-detail-cards .sale-detail-due .cell-detail{clear:both;white-space:nowrap}
    .sale-detail-cards .sale-detail-states{justify-content:flex-start}
    .sale-detail-cards .sale-detail-states::before,.sale-detail-cards .sale-detail-reschedule::before{display:none}
    .sale-detail-cards .sale-detail-reschedule{display:block;margin-top:.25rem}
    .sale-detail-cards .sales-reschedule{width:100%;max-width:100%}
    .sale-detail-cards .sales-reschedule input{max-width:100%;min-width:0}
    .sale-detail-heading~.sales-location-context{overflow-wrap:break-word;word-break:normal}
}

/* Only the schedule region scrolls; narrow phones retain the stacked cards. */
.sale-detail-cards .sale-schedule-scroll{max-width:100%;min-width:0}
.sale-schedule-scroll:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
.sale-schedule-badges{display:flex;flex-wrap:wrap;gap:.375rem;align-items:center}
.sale-schedule-badges .badge{white-space:nowrap;overflow-wrap:normal}
.sale-detail-schedule .sale-detail-reschedule summary{white-space:nowrap;overflow:visible;text-overflow:clip}
@media(min-width:768px){
    .sale-detail-cards .sale-schedule-scroll{overflow-x:auto}
    .sale-detail-schedule{min-width:56rem}
    .sale-detail-schedule .sale-detail-reschedule{min-width:9rem}
    .sale-detail-schedule .sale-detail-states{min-width:10rem}
    .sale-detail-schedule .sale-detail-due .cell-detail{max-width:12rem;overflow-wrap:normal}
}
@media(max-width:767.98px){
    .sale-detail-cards .sale-schedule-scroll{overflow:visible}
    .sale-detail-cards .sale-detail-schedule{min-width:0}
}

/* Shared customer-facing receipt presentation. */
.sales-receipt{max-width:960px;margin:0 auto;color:var(--erp-text)}
.receipt-toolbar{display:flex;justify-content:flex-end;margin-bottom:.75rem}
.receipt-header{display:flex;justify-content:space-between;align-items:start;gap:1rem;border-bottom:2px solid var(--erp-border);padding-bottom:.75rem}
.sales-receipt .receipt-header h1{font-size:1.25rem;margin:0}
.sales-receipt .receipt-header h2{font-size:.9375rem;margin:0;letter-spacing:.04em;text-align:right}
.receipt-header p{font-size:.75rem;color:var(--erp-muted);margin:.25rem 0 0}
.receipt-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 1.5rem;margin:.75rem 0 1rem}
.receipt-metadata>div{display:flex;flex-wrap:wrap;gap:.25rem .75rem;min-width:0}
.receipt-metadata dt{font-weight:400;color:var(--erp-muted)}
.receipt-metadata dd{margin:0;font-weight:500}
.receipt-metadata,.receipt-context,.receipt-table,.receipt-summary{font-size:.8125rem}
.receipt-context{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.receipt-context>section{min-width:0;overflow-wrap:break-word}
.sales-receipt h3{font-size:.6875rem;text-transform:uppercase;letter-spacing:.05em;color:var(--erp-muted);margin:0 0 .5rem}
.receipt-context p{margin:0 0 .25rem}
.receipt-section{margin-top:1.125rem}
.receipt-table-scroll{overflow-x:auto;max-width:100%}
.receipt-table{width:100%;border-collapse:collapse}
.receipt-table th,.receipt-table td{padding:.5rem .625rem;border-bottom:1px solid var(--erp-border);vertical-align:top}
.receipt-table th{background:var(--erp-bg);font-size:.6875rem;font-weight:600;text-align:left}
.receipt-table td:first-child{overflow-wrap:break-word}
.receipt-table small{display:block;font-size:.6875rem;color:var(--erp-muted);margin-top:.25rem}
.receipt-table .receipt-number,.receipt-summary dd{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.receipt-table .receipt-date{white-space:nowrap}
.receipt-summary{max-width:22rem;margin:1rem 0 0 auto;border-top:1px solid var(--erp-border);padding-top:.5rem}
.receipt-summary>div{display:flex;justify-content:space-between;gap:1rem;padding:.25rem 0}
.receipt-summary dt{font-weight:400}.receipt-summary dd{margin:0}.receipt-summary .receipt-emphasis{font-weight:650}.receipt-summary .receipt-emphasis dt{font-weight:650}
.receipt-notice{padding:.5rem .75rem;border:1px solid #e6b9bb;color:#9c343a;background:#fff5f5;font-size:.8125rem;margin:.75rem 0;overflow-wrap:break-word}
.receipt-cancelled{color:#9c343a;font-weight:650!important}
.receipt-footer{text-align:center;border-top:1px solid var(--erp-border);padding-top:.75rem;margin-top:1.125rem;font-size:.75rem;break-inside:avoid}
.receipt-footer p{margin:0 0 .25rem}.receipt-footer small{display:block;color:var(--erp-muted);font-size:.6875rem;margin-top:.25rem}
@media(max-width:575.98px){.receipt-header{flex-wrap:wrap}.receipt-header h2{text-align:left!important}.receipt-context,.receipt-metadata{grid-template-columns:minmax(0,1fr)}.receipt-summary{max-width:none}.receipt-table{min-width:32rem}}
@media print{
    @page{size:A4;margin:14mm}
    body:has(.sales-receipt){background:white}
    body:has(.sales-receipt) .page-heading,body:has(.sales-receipt) .alert{display:none!important}
    .sales-receipt{max-width:none;width:100%;margin:0;padding:0;border:0;box-shadow:none;font-size:10pt}
    .sales-receipt .receipt-context,.sales-receipt .receipt-metadata{grid-template-columns:repeat(2,minmax(0,1fr))}
    .sales-receipt .receipt-table-scroll{overflow:visible}
    .sales-receipt .receipt-table{min-width:0;width:100%}
    .receipt-table thead{display:table-header-group}
    .receipt-table tr,.receipt-context>section,.receipt-metadata,.receipt-summary{break-inside:avoid}
    .receipt-section h3{break-after:avoid}
    .receipt-header{break-inside:avoid}
}

@media(min-width:1200px){.customers-directory-filters .sales-history-filter-controls{grid-template-columns:minmax(0,1.4fr) minmax(0,1.5fr) minmax(0,1fr)}}

/* Phase 5A Expenses: scoped styles preserve existing operational pages. */
.expense-form { max-width: 920px; }
.expense-form .form-hint { display: block; margin-top: .35rem; }
.expense-form label > .input-group { margin-top: .4375rem; }
.expense-form .input-group > input { margin-top: 0; }
.expense-filters .expense-filter-actions { display: flex; gap: .5rem; margin-left: auto; }
.expense-directory .expense-table td { vertical-align: middle; }
.expense-directory .expense-table th { white-space: nowrap; }
.expense-directory .expense-table .action-cell a { white-space: nowrap; }
.expense-nowrap { white-space: nowrap; }
.expense-directory .expense-directory-desktop { display: block; }
.expense-directory .expense-directory-mobile { display: none; }
.expense-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem 1.5rem; margin: 0; }
.expense-detail-grid > div { min-width: 0; }
.expense-detail-grid dt { color: var(--erp-muted); font-size: .8rem; font-weight: 500; margin-bottom: .25rem; }
.expense-detail-grid dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.expense-detail-wide { grid-column: 1 / -1; }
.expense-notes { white-space: pre-wrap; }
.expense-detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.expense-reversal-detail { margin-top: 1rem; }
.expense-reversal-detail h2 { font-size: 1rem; margin-bottom: 1rem; }
.expense-reverse-context p { margin-top: .5rem; margin-bottom: 0; }
@media (max-width: 991.98px) {
    .expense-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767.98px) {
    .expense-detail-grid { grid-template-columns: minmax(0,1fr); }
    .expense-filters .expense-filter-actions { flex: 1 1 100%; justify-content: flex-end; }
}
/* Expense cards follow the collapsed app shell, including narrow tablets. */
@media (max-width: 991.98px) {
    .expense-directory .expense-directory-desktop { display: none; }
    .expense-directory .expense-directory-mobile { display: grid; gap: .75rem; padding: .75rem; }
    .expense-directory .expense-mobile-card { min-width: 0; padding: .875rem; border: 1px solid var(--erp-border); border-radius: var(--erp-radius); background: var(--erp-surface); }
    .expense-directory .expense-mobile-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .375rem .75rem; margin-bottom: .375rem; }
    .expense-directory .expense-mobile-heading .badge { white-space: nowrap; }
    .expense-directory .expense-mobile-details { display: grid; gap: .625rem; margin: .75rem 0; }
    .expense-directory .expense-mobile-details > div, .expense-directory .expense-mobile-details dd { min-width: 0; }
    .expense-directory .expense-mobile-details dt { margin-bottom: .125rem; color: var(--erp-muted); font-size: .75rem; font-weight: 400; }
    .expense-directory .expense-mobile-details dd { margin: 0; overflow-wrap: normal; word-break: normal; }
    .expense-directory .expense-mobile-category small { white-space: nowrap; }
    .expense-directory .expense-mobile-pair { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .75rem; }
    .expense-directory .expense-mobile-card > .btn { min-width: 5rem; min-height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
}

/* Business reports follow the app shell breakpoint. */
.report-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.625rem;margin:1rem 0}
.report-summary>div{min-width:0;padding:.75rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
.report-summary span{display:block;color:var(--erp-muted);font-size:.75rem;margin-bottom:.25rem}
.report-summary strong{font-size:.9375rem;white-space:nowrap}
.report-filters>label{min-width:0}.report-filter-actions{display:flex;gap:.5rem;align-self:flex-end;margin-left:auto}
.report-filters .select2-container{max-width:100%}.report-note{font-size:.8rem;margin:.75rem 0}
.report-directory .report-desktop{display:block}.report-directory .report-mobile{display:none}
.report-nowrap{white-space:nowrap;overflow-wrap:normal!important;word-break:normal}
.report-breakdown{margin:1rem 0}.report-breakdown ul{list-style:none;margin:0;padding:.75rem}
.report-breakdown li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;padding:.375rem}
.report-breakdown small{color:var(--erp-muted)}
@media(max-width:991.98px){
.report-directory .report-desktop{display:none}.report-directory .report-mobile{display:grid;gap:.75rem;padding:.75rem}
.report-mobile-card{min-width:0;padding:.875rem;border:1px solid var(--erp-border);border-radius:var(--erp-radius);background:var(--erp-surface)}
.report-mobile-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem;margin:0 0 .75rem}
.report-mobile-card dl>div{min-width:0}.report-mobile-card dt{color:var(--erp-muted);font-size:.75rem;font-weight:400}
.report-mobile-card dd{margin:0;overflow-wrap:normal;word-break:normal}.report-mobile-card>.btn{min-height:2.5rem;min-width:5rem}
}
@media(max-width:575.98px){.report-mobile-card dl{grid-template-columns:minmax(0,1fr)}.report-filters>label{flex:1 1 100%;max-width:none}}

/* Sales Report detail is wider than the workspace; scrolling stays inside Detail. */
.sales-report-detail{min-width:0;max-width:100%}
.sales-report-detail .report-desktop{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.sales-report-detail .report-desktop .table{width:100%;min-width:100rem}
.sales-report-detail .table th{white-space:nowrap}
.sales-report-detail .table td{overflow-wrap:normal;word-break:normal}
.sales-report-detail .table [data-column="customer_name_snapshot"]{min-width:10rem}
.sales-report-detail .table [data-column="sales_location_name_snapshot"]{min-width:12rem}
.sales-report-detail .table [data-column="product_name_snapshot"]{min-width:11rem}
.sales-report-detail .table [data-column="variant_name_snapshot"]{min-width:8rem}
.sales-report-detail .table [data-column="sale_number"],
.sales-report-detail .table [data-column="sale_date"],
.sales-report-detail .table [data-column="sku_snapshot"],
.sales-report-detail .table [data-column="quantity"],
.sales-report-detail .table [data-column="status"],
.sales-report-detail .table [data-column="payment_status"],
.sales-report-detail .badge{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.sales-report-detail .table [data-column="sku_snapshot"]{min-width:8rem}
.sales-report-detail .table [data-column="quantity"]{min-width:3.5rem}
.sales-report-summary{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}
.sales-report-filters{min-width:0;max-width:100%}
@media(max-width:991.98px){
.sales-report-detail .report-desktop{display:none}
.sales-report-detail .report-mobile{display:grid}
.sales-report-card-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}
.sales-report-card-heading>div{display:flex;flex-wrap:wrap;gap:.375rem}
.sales-report-card-identity{display:grid;gap:.25rem;margin:.5rem 0 .75rem}
.sales-report-detail .sales-report-card dl{display:grid;grid-template-columns:minmax(0,1fr);gap:.375rem}
.sales-report-card dl>div{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:.25rem .75rem}
.sales-report-card dl>div[data-column="sales_location_name_snapshot"],
.sales-report-card dl>div[data-column="product_name_snapshot"]{display:block;margin-bottom:.375rem}
.sales-report-card dl>div[data-column="net_line_amount"]{font-weight:650;padding-top:.375rem;border-top:1px solid var(--erp-border)}
.sales-report-filters>label{max-width:100%;flex:1 1 12rem}
.sales-report-filters .report-filter-actions{flex-wrap:wrap}
}

/* Sales Location Performance: identity columns keep readable widths. */
.location-performance-detail{min-width:0;max-width:100%}
.location-performance-detail .report-desktop{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.location-performance-detail .report-desktop .table{width:100%;min-width:80rem}
.location-performance-detail .table th{white-space:nowrap}
.location-performance-detail .table td{overflow-wrap:normal;word-break:normal}
.location-performance-detail .table [data-column="sales_location_name_snapshot"]{min-width:13rem}
.location-performance-detail .table [data-column="sales_location_type_snapshot"]{min-width:12rem}
.location-performance-detail .table [data-column="sales_location_area_snapshot"]{min-width:10rem}
.location-performance-detail .table [data-column="sale_count"],
.location-performance-detail .table [data-column="units"],
.location-performance-detail .table [data-column="gross_margin"]{white-space:nowrap}
.location-performance-summary{grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}
@media(max-width:991.98px){
.location-performance-detail .report-desktop{display:none}
.location-performance-detail .report-mobile{display:grid}
.location-performance-detail .location-performance-identity{margin-bottom:.75rem}
.location-performance-detail .location-performance-identity h3{font-size:.9375rem;margin:0 0 .25rem;font-weight:650}
.location-performance-detail .location-performance-identity p{margin:.125rem 0;color:var(--erp-muted);font-size:.8125rem;overflow-wrap:normal;word-break:normal}
.location-performance-detail .location-performance-card dl{display:grid;grid-template-columns:minmax(0,1fr);gap:.375rem;margin:0}
.location-performance-detail .location-performance-card dl>div{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:.25rem .75rem}
}

/* Dashboard: scoped operational workspace, aligned with the app shell. */
.dashboard-workspace{min-width:0}
.dashboard-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}
.dashboard-header h1{font-size:1.5rem;margin:0 0 .25rem}
.dashboard-brand{font-weight:600;margin:0}.dashboard-tagline{color:var(--erp-muted,#64748b);font-size:.85rem;margin:.25rem 0 0}
.dashboard-header>time{text-align:right;white-space:nowrap;font-size:.85rem}.dashboard-header>time small{display:block;color:var(--erp-muted,#64748b);font-size:.75rem}
.dashboard-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.dashboard-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.6rem;margin-bottom:.75rem}
.dashboard-kpi,.dashboard-panel{background:#fff;border:1px solid var(--erp-border,#e2e8f0);border-radius:.5rem;padding:.85rem;min-width:0}
.dashboard-kpi h2{font-size:.75rem;font-weight:500;color:var(--erp-muted,#64748b);margin:0 0 .3rem}.dashboard-kpi strong{font-size:1.05rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-financial .dashboard-kpi{background:#f8fafc}
.dashboard-kpi.dashboard-kpi-highlight{background:#f3f4fc;border-color:#e1e4f4}.dashboard-kpi.dashboard-kpi-warning{background:#fcf3f2;border-color:#efddda}.dashboard-kpi.dashboard-kpi-success{background:#f0f7f3;border-color:#dceadf}.dashboard-kpi-warning strong{color:#934b46}.dashboard-kpi-success strong{color:#286044}.dashboard-kpi h2{line-height:1.4;letter-spacing:.01em}.dashboard-kpi strong{font-weight:650;letter-spacing:-.02em}
.dashboard-panels{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);align-items:start;gap:.75rem}
.dashboard-column{display:flex;flex-direction:column;gap:.75rem;min-width:0}.dashboard-column>.dashboard-panel{width:100%}.dashboard-kpi{padding:.7rem .85rem}
.dashboard-panel>header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.dashboard-panel h2{font-size:1rem;margin:0}.dashboard-panel>header a{font-size:.8rem;white-space:nowrap}.dashboard-panel>header p,.dashboard-hint{font-size:.75rem;color:var(--erp-muted,#64748b);margin:.3rem 0 .5rem}
.dashboard-empty{font-size:.85rem;color:var(--erp-muted,#64748b);margin:.75rem 0}
.dashboard-list{list-style:none;padding:0;margin:0}.dashboard-list>li{display:flex;justify-content:space-between;align-items:start;gap:.75rem;padding:.4rem 0;border-top:1px solid var(--erp-border,#e2e8f0);font-size:.82rem}.dashboard-list>li>div{min-width:0}.dashboard-list strong,.dashboard-list span,.dashboard-list small,.dashboard-list time{display:block}.dashboard-list strong{font-weight:600;word-break:normal;overflow-wrap:normal}.dashboard-list small,.dashboard-list time{font-size:.75rem;color:var(--erp-muted,#64748b)}.dashboard-list .badge{display:inline-block;font-size:.65rem}.dashboard-list time,.dashboard-money,.dashboard-sku,.dashboard-metric b,.dashboard-pairs dd{white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-metric{text-align:right;flex-shrink:0}.dashboard-metric b,.dashboard-money{font-weight:650}.dashboard-metric small{font-size:.7rem;margin-top:.15rem}.dashboard-metric small{white-space:normal}.dashboard-metric a{display:block;margin-top:.25rem}.dashboard-pairs{margin:0;font-size:.75rem;min-width:0}.dashboard-pairs>div{display:flex;justify-content:space-between;gap:.75rem}.dashboard-pairs dt{font-weight:400;color:var(--erp-muted,#64748b)}.dashboard-pairs dd{margin:0;font-weight:600}.dashboard-location-list>li{display:block}.dashboard-location-list .dashboard-pairs{margin-top:.4rem}
.dashboard-receivable-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.dashboard-receivable-summary>div{padding:.5rem;border:1px solid var(--erp-border);border-radius:.375rem;background:var(--erp-bg);min-width:0}.dashboard-receivable-summary h3{font-size:.75rem;color:var(--erp-muted);margin:0 0 .25rem;font-weight:500}.dashboard-receivable-summary b{display:block;font-size:1rem}.dashboard-receivable-summary strong{display:block;font-size:.8rem;font-variant-numeric:tabular-nums;white-space:nowrap}.dashboard-priority-heading{font-size:.8rem;margin:.5rem 0 .3rem}.dashboard-row-meta,.dashboard-variant-meta{font-size:.75rem;color:var(--erp-muted)}.dashboard-row-meta time,.dashboard-row-meta .badge{display:inline-block}.dashboard-panel-footer{display:inline-block;font-size:.8rem;margin-top:.4rem}.dashboard-location-main{display:flex;justify-content:space-between;align-items:start;gap:.75rem}.dashboard-location-main>div{min-width:0}.dashboard-location-metrics{display:flex;flex-wrap:wrap;gap:.2rem 1rem;margin:.25rem 0 0;font-size:.75rem}.dashboard-location-metrics>div{display:flex;flex-wrap:wrap;gap:.25rem}.dashboard-location-metrics dt{font-weight:400;color:var(--erp-muted)}.dashboard-location-metrics dd{margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}.dashboard-list .dashboard-money{flex-shrink:0}.dashboard-panel>header{align-items:flex-start}.dashboard-panel>header+p.dashboard-hint{margin-top:-.4rem}
.dashboard-chart{display:flex;align-items:flex-end;gap:3px;list-style:none;margin:.5rem 0;padding:0;height:8rem}.dashboard-chart>li{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.dashboard-bar{width:75%;height:var(--bar-height,0%);min-height:2px;background:#6574a8;border-radius:2px 2px 0 0}.dashboard-chart time{font-size:.6rem;line-height:1.5;flex-shrink:0}.dashboard-chart-values{font-size:.8rem;margin-top:.5rem}.dashboard-chart-values dl{margin:.5rem 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.2rem .75rem}.dashboard-chart-values dl>div{display:flex;justify-content:space-between;gap:.5rem}.dashboard-chart-values dt{font-weight:400}.dashboard-chart-values dd{margin:0;white-space:nowrap}.dashboard-low-stock-context span{display:block}.dashboard-low-stock .dashboard-empty{margin-bottom:0}
.dashboard-reports{margin-top:.75rem;padding:.65rem .85rem;border:1px solid var(--erp-border);border-radius:.5rem;background:var(--erp-surface);min-width:0}.dashboard-reports h2{font-size:.85rem;margin:0 0 .4rem}
.dashboard-report-links{display:flex;flex-wrap:wrap;gap:.3rem;font-size:.8rem}.dashboard-report-links a{display:inline-flex;align-items:center;padding:.25rem .55rem;border:1px solid var(--erp-border);border-radius:1rem;background:var(--erp-bg);color:var(--erp-text);text-decoration:none;max-width:100%}.dashboard-report-links a:hover{background:var(--erp-surface);border-color:var(--erp-primary);color:var(--erp-primary)}.dashboard-report-links a:focus-visible{outline:2px solid var(--erp-primary);outline-offset:2px}
@media(max-width:991.98px){.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-panels{grid-template-columns:1fr}.dashboard-kpi{padding:.7rem .85rem}}
@media(max-width:575.98px){.dashboard-header{align-items:flex-start;flex-direction:column;gap:.5rem}.dashboard-header>time{text-align:left}.dashboard-header>time small{display:inline;margin-left:.5rem}.dashboard-kpis{grid-template-columns:1fr}.dashboard-panel{padding:.85rem}.dashboard-chart-values dl{grid-template-columns:1fr}.dashboard-list>li{flex-wrap:wrap}.dashboard-list>li>.dashboard-pairs{width:100%}.dashboard-chart time{font-size:.5rem}}

@media(max-width:575.98px){.dashboard-receivable-summary{grid-template-columns:1fr}.dashboard-location-main{flex-wrap:wrap}.dashboard-priority-list>li{gap:.25rem .75rem}.dashboard-chart-values dl>div{flex-wrap:wrap}}

/* Executive dashboard: compact, scoped panel details. */
.dashboard-location-metrics{gap:.15rem .85rem}.dashboard-location-metrics dt{font-size:.7rem}.dashboard-location-metrics dd{font-size:.75rem}.dashboard-low-stock .dashboard-list>li{flex-direction:column;gap:.4rem}.dashboard-low-stock .dashboard-pairs{width:100%}.dashboard-priority-list .dashboard-money{margin-left:auto;text-align:right}.dashboard-panel>header{margin-bottom:.5rem}.dashboard-panel h2{font-size:.9375rem;font-weight:600}.dashboard-receivable-summary strong{font-weight:600}.dashboard-recent-sales .dashboard-metric a{font-size:.75rem}

.dashboard-location-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem .5rem}.dashboard-location-metrics>div{display:block;min-width:0}.dashboard-location-metrics dt{line-height:1.4}.dashboard-location-metrics dd{font-weight:500}.dashboard-location-metrics>div:last-child:nth-child(3){grid-column:1/-1}.dashboard-location-main{flex-wrap:wrap;gap:.25rem .75rem}.dashboard-location-main>.dashboard-money{margin-left:auto}
@media(max-width:575.98px){.dashboard-location-metrics{grid-template-columns:1fr}.dashboard-location-metrics>div:last-child:nth-child(3){grid-column:auto}}

/* Fulfillment queue and detail: scoped operational layout. */
.fulfillment-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.75rem;margin-bottom:.85rem}
.fulfillment-filters>label{flex:1 1 10rem;min-width:0}
.fulfillment-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
.fulfillment-actions form{margin:0}
.fulfillment-actions .btn,.fulfillment-nowrap{white-space:nowrap}
.fulfillment-mobile{display:none}
.fulfillment-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem 1rem;margin:.7rem 0}
.fulfillment-summary dt{font-size:.78rem;font-weight:400;color:var(--bs-secondary-color)}
.fulfillment-summary dd{margin:.15rem 0 0;font-weight:500;word-break:normal;overflow-wrap:break-word}
.fulfillment-confirmation{max-width:48rem}
.fulfillment-desktop{max-width:100%;min-width:0}
.fulfillment-desktop .table{table-layout:auto;width:100%}
.fulfillment-desktop .table th,.fulfillment-desktop .table td{padding:.65rem .65rem}
.fulfillment-desktop .table th{white-space:normal;word-break:normal;overflow-wrap:normal}
.fulfillment-desktop .table td{vertical-align:middle;overflow-wrap:normal;word-break:normal}
.fulfillment-desktop .table td:first-child{min-width:0}
.fulfillment-desktop .fulfillment-customer{min-width:10rem;white-space:normal}
.fulfillment-desktop .fulfillment-nowrap,.fulfillment-desktop .badge,.fulfillment-desktop .fulfillment-actions .btn{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.fulfillment-desktop .fulfillment-action-cell{min-width:10rem}
.fulfillment-desktop .fulfillment-actions form{max-width:100%}
@media(max-width:991.98px){
 .fulfillment-desktop{display:none}
 .fulfillment-mobile{display:grid;gap:.65rem}
 .fulfillment-card{border:1px solid var(--bs-border-color);border-radius:.5rem;padding:.75rem;min-width:0}
 .fulfillment-card-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.4rem;margin-bottom:.45rem}
 .fulfillment-card p{margin-bottom:.5rem;word-break:normal;overflow-wrap:break-word}
 .fulfillment-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:575.98px){.fulfillment-summary{grid-template-columns:minmax(0,1fr)}.fulfillment-filters>label{flex-basis:100%}}

/* Online Sale creation: scoped conditional order fields and summary. */
.sales-form .sale-office-location,.sales-form .sale-online-order,.sales-form .sale-delivery-details{border:0;padding:0;margin:0;min-width:0}
.sale-channel-row{max-width:24rem;margin-bottom:.8rem}.sale-channel-row>label{display:block}
.sales-form .sale-online-order{margin:.85rem 0}
.sales-form .sale-delivery-details{border:1px solid var(--erp-border,#e2e8f0);border-radius:.5rem;padding:.85rem;margin-top:.75rem}
.sale-delivery-details legend{float:none;width:auto;font-size:.9rem;font-weight:600;margin:0 0 .5rem}
.sale-delivery-details .sale-delivery-address{grid-column:1/-1}
.sale-order-summary{padding:.65rem .8rem;border:1px solid var(--erp-border,#e2e8f0);border-radius:.5rem;margin-top:.65rem;background:var(--erp-bg,#f8fafc)}
.sale-order-summary dl{display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;margin:0}
.sale-order-summary dt{font-size:.75rem;font-weight:400;color:var(--erp-muted,#64748b)}
.sale-order-summary dd{margin:.15rem 0 0;white-space:nowrap;font-weight:500}
.sale-order-grand-total dd{font-weight:700}.sale-order-summary .form-hint{margin:.35rem 0 0}
@media(max-width:991.98px){.sale-channel-row{max-width:none}.sale-online-order .form-grid,.sale-delivery-details .form-grid{grid-template-columns:minmax(0,1fr)}.sale-online-order input,.sale-online-order select,.sale-online-order textarea{min-width:0;width:100%}}
