/* Q58: traditional PC document workspace. Business values remain in original controls. */
/* Q60: existing master data uses a single ledger; filtering never rebuilds entry fields. */
body.classic #app .master-table-panel {margin-top:10px;}
body.classic #app .master-table-panel .master-finder {border:0;padding:0 0 8px;margin:0;}
body.classic #app .master-table-panel .master-finder-controls {display:grid;grid-template-columns:minmax(180px,360px) 140px auto;gap:10px;align-items:end;justify-content:start;}
body.classic #app .master-table-panel .master-find-count {margin:5px 0;font-size:11px;color:#70767d;}
body.classic #app .master-data-table {width:100%;table-layout:fixed;border-collapse:collapse;}
body.classic #app .master-data-table :is(th,td) {overflow-wrap:anywhere;white-space:normal;text-align:left;font-weight:400;}
body.classic #app .master-data-table th:last-child {width:22%;}
body.classic #app .master-grid-actions .record-actions {display:flex;flex-wrap:wrap;gap:5px;}
body.classic #app .master-grid-actions .locked {display:block;font-size:11px;}
body.classic #app .master-table-panel [hidden] {display:none!important;}
body.classic #app .master-list-intro {padding:0 0 8px;}
@media(max-width:700px) {
 body.classic #app .master-table-panel .master-finder-controls {grid-template-columns:minmax(0,1fr);}
 body.classic #app .master-grid-actions button {min-height:40px;padding:7px 10px;}
}
body.classic {font-size:13px;color:#303030;background:#f3f4f5;}
body.classic .app-shell {grid-template-columns:140px minmax(0,1fr);}
body.classic .sidebar {width:140px;padding:12px 8px;background:#f1f2f3;}
body.classic .brand strong {font-size:16px;}
body.classic .sidebar button {font-size:13px;min-height:30px;padding:5px 12px;}
body.classic .nav-section {padding-top:14px;font-size:13px;color:#6e747c;}
body.classic .workspace {padding:0 14px 20px;}
body.classic .topbar {min-height:38px;padding:5px 0;border-bottom:0;background:transparent;}
body.classic .topbar h1 {font-size:13px;font-weight:400;}
body.classic .topbar :is(span,small,.classic-preview-note) {font-size:11px;}
body.classic .document-tabs {display:flex;flex-wrap:wrap;gap:2px;border-bottom:1px solid #aeb9c5;min-height:32px;padding:0 3px;background:#e9edf1;}
body.classic .document-tab {display:flex;align-items:center;border:1px solid transparent;border-bottom:0;margin-top:3px;}
body.classic .document-tab.active {border-color:#aeb9c5;background:#fff;margin-bottom:-1px;}
body.classic .document-tab button {min-height:29px;border:0;background:transparent;font-size:13px;padding:5px 10px;}
body.classic .document-tab button.document-tab-close {padding:4px 7px 4px 0;min-width:18px;color:#737c84;}
body.classic #app {padding:12px 0 0;}
body.classic #app :is(.sheet-document,.expense-sheet-page,.classic-expense-record,.mat-panel,.panel) {border:1px solid #d2d6db;padding:12px;background:#fff;}
body.classic :is(button,.sheet-button) {font-size:13px;min-height:26px;padding:4px 10px;}
body.classic :is(input,select,textarea) {font-size:13px;min-height:28px;padding:4px 6px;}
body.classic input::placeholder {font-size:13px;color:#999;}
body.classic label {font-size:13px;}
body.classic :is(h2,h3) {font-size:15px;}
body.classic .document-modebar {display:flex;align-items:center;gap:0;border-bottom:1px solid #d7dce1;margin:-12px -12px 8px;background:#f7f8f9;padding:0 10px;}
body.classic #app .document-modebar :is(button,strong) {font-size:13px;padding:8px 14px;border:0;background:transparent;min-height:32px;border-bottom:2px solid transparent;font-weight:400;}
body.classic #app .document-modebar strong {border-bottom-color:#447fac;background:#fff;color:#245875;}
body.classic .document-modebar>span {margin-left:auto;font-size:11px;color:#777;}
body.classic #app.sheet-page .sheet-toolbar {gap:6px;padding:4px 0 8px;}
body.classic #app.sheet-page .sheet-toolbar h2 {font-size:16px;font-weight:400;}
body.classic #app.sheet-page :is(button,.sheet-button) {font-size:13px;min-height:26px;padding:4px 10px;}
body.classic #app.sheet-page .sheet-fields {grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 14px;padding:8px 0 12px;}
body.classic #app.sheet-page .sheet-fields label {grid-template-columns:60px minmax(0,1fr);font-size:13px;}
body.classic #app.sheet-page :is(input,select,textarea) {font-size:13px;min-height:28px;height:28px;}
body.classic #app .document-grid-tools {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:4px 0 6px;}
body.classic .document-grid-tools>span {margin-right:auto;font-size:11px;color:#7d8288;}
body.classic #app.sheet-page .sheet-subhead {margin:16px 0 5px;font-size:13px;}
body.classic #app.sheet-page .sheet-subhead :is(b,span) {font-size:13px;font-weight:400;}
body.classic #app.sheet-page .sheet-footer {padding:6px 8px;margin-top:0;font-size:13px;gap:10px;}
body.classic #app.sheet-page .sheet-footer.document-sum {border-top:0;justify-content:space-between;}
body.classic .document-sum>span {color:#888;font-size:11px;}
body.classic #app.sheet-page .sheet-cellbar {margin:12px 0 0;padding:0 0 5px;}
body.classic #app.sheet-page .sheet-cellbar>span {font-size:11px;color:#777;max-width:130px;}
body.classic #app.sheet-page .sheet-cellbar>input {font-size:13px;}
body.classic .sheet-error:empty {display:none;}
body.classic #app .classic-expense-tabs {margin-bottom:0;background:#f7f8f9;border:1px solid #d2d6db;border-bottom:0;}
body.classic #app .classic-expense-tabs button {font-size:13px;min-height:32px;padding:7px 14px;}
body.classic #app .expense-sheet-page {container-type:inline-size;container-name:classic-expense;}
body.classic #app .expense-worksheet .expense-document-toolbar {margin:0 0 8px;padding:0 0 8px;}
body.classic #app .expense-document-toolbar h2 {font-size:16px;font-weight:400;}
body.classic #app .expense-sheet-page .expense-sheet-context {margin:8px 0;gap:8px 16px;}
body.classic #app .expense-sheet-page .expense-sheet-context label {font-size:13px;}
body.classic #app .expense-sheet-page .expense-sheet-context label>:is(input,select) {font-size:13px;min-height:28px;height:28px;padding:4px 6px;}
body.classic #app .expense-worksheet .classic-expense-categories {margin:6px 0;padding:5px 0;}
body.classic #app .expense-worksheet .classic-expense-categories :is(button,span) {font-size:13px;min-height:26px;padding:3px 7px;}
body.classic #app .expense-sheet-page :is([data-expense-hook=draft],.expense-sheet-boundary) {font-size:13px;}
body.classic #app .document-row-inspector {display:none;}
body.classic .product-cell-pick {position:relative;display:block;padding-right:22px;}
body.classic #app .product-cell-pick>button {position:absolute;right:0;top:0;width:22px;min-width:0;padding:0;height:26px;min-height:26px;border:0;background:transparent;}
body.classic.logged-out #documentTabs {display:none;}
/* A single shared header on desktop, not repeated field labels or paired records. */
@media screen and (min-width:1100px) {
 body.classic #app table.reflow-table:not(.ledger-entry-table) {display:table!important;table-layout:fixed!important;min-width:0!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) thead {display:table-header-group!important;position:static!important;clip-path:none!important;width:auto!important;height:auto!important;overflow:visible!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) :is(tbody,tfoot) {display:table-row-group!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) tr {display:table-row!important;border:0!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) :is(th,td) {display:table-cell!important;position:static!important;clip-path:none!important;min-width:0!important;height:auto!important;padding:6px 8px!important;font-size:13px!important;line-height:1.4!important;border:1px solid #d6dce1!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) td::before {display:none!important;}
 body.classic #app table.reflow-table:not(.ledger-entry-table) :is(button,span,input) {font-size:13px!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) {display:table!important;table-layout:fixed!important;width:100%!important;min-width:0!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) thead {display:table-header-group!important;position:static!important;clip-path:none!important;width:auto!important;height:auto!important;overflow:visible!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is(tbody,tfoot) {display:table-row-group!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is(thead,tbody,tfoot)>tr {display:table-row!important;border:0!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is(th,td) {display:table-cell!important;position:static!important;clip-path:none!important;width:auto!important;min-width:0!important;max-width:none!important;height:29px!important;min-height:0!important;padding:1px 5px!important;border:1px solid #d6dce1!important;vertical-align:middle!important;line-height:1.35!important;font-size:13px!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) th {width:var(--reflow-width,auto)!important;height:30px!important;background:#f2f3f5!important;font-weight:400!important;white-space:nowrap!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) td::before {display:none!important;content:none!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) tbody tr {background:#fff!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) tbody tr:is(:focus-within,.kd-current-row) {background:#f1f8fd!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is(input:not([type=hidden]):not(.editable-choice-native),select:not(.editable-choice-native),textarea) {height:26px!important;min-height:26px!important;margin:0!important;padding:3px 2px!important;font-size:13px!important;line-height:20px!important;font-weight:400!important;border:0!important;background:transparent!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .editable-choice {--choice-control-height:26px;min-height:26px!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .editable-choice-input {padding-right:20px!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) button.editable-choice-arrow {width:18px!important;min-width:18px!important;height:26px!important;min-height:0!important;border:0!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is(.sheet-remove,.sheet-remove-cost,.expense-remove,[data-mat-remove]) {font-size:13px!important;height:26px!important;min-height:26px!important;min-width:0!important;width:auto!important;padding:3px 0!important;white-space:nowrap!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .expense-remove {border:0!important;background:transparent!important;color:#a12c26!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .outbound-available :is(b,span) {font-size:13px!important;font-weight:400!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .outbound-available {border-radius:0!important;background:transparent!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) :is([data-specification],.outbound-line-status,.outbound-available) {font-size:13px!important;min-height:0!important;margin:0!important;padding:0!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) [data-money-hint] {display:none!important;}
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .complete-value:not([hidden]) {font-size:11px!important;line-height:1.35!important;}
 /* Full text remains editable in the document's current-cell bar. Do not
    duplicate it below every desktop input and expand all ledger rows. */
 body.classic #app table.ledger-entry-table:not(.expense-sheet-table) .complete-value:not([hidden]) {display:none!important;}
 body.classic #app table.expense-sheet-table :is([data-rate-hint],.expense-save-rate,.expense-use-product-rate) {font-size:10px!important;line-height:1.3!important;min-height:0!important;padding:0!important;margin:0!important;}
 body.classic #app table.expense-sheet-table [data-rate-hint]:empty {display:none;}
 body.classic #app table.expense-sheet-table :is(.expense-save-rate,.expense-use-product-rate) {display:inline-block;padding-right:3px!important;}
 body.classic #app table.expense-sheet-table :is([data-rate-hint],.expense-save-rate,.expense-use-product-rate) {display:none!important;}
 body.classic #app .document-row-inspector {display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;padding:6px 8px;margin:0 0 8px;background:#fafbfc;border:1px solid #d6dce1;font-size:13px;}
 body.classic #app .document-row-inspector [data-inspector-rate] {color:#777;margin-right:auto;}
 body.classic #app .document-row-inspector button {font-size:13px;min-height:24px;padding:2px 7px;}
 body.classic #app .document-inspector-value {flex-basis:100%;display:flex;align-items:center;gap:12px;font-size:11px;color:#777;}
 body.classic #app .document-inspector-value input {flex:1;min-width:0;font-size:13px;height:26px;min-height:26px;}
 body.classic #app table.expense-sheet-table [hidden] {display:none!important;}
 body.classic #app table.reflow-table :is(tr,th,td,button,input,span)[hidden] {display:none!important;}
 body.classic #app .material-page :is(.mat-fields,.mat-toolbar) {margin:6px 0;gap:8px;}
 body.classic #app .material-page .mat-fields :is(input,label) {font-size:13px;min-height:28px;}
 body.classic #app .material-page .mat-editbar {font-size:13px;grid-template-columns:80px minmax(0,1fr);}
 body.classic #app .material-page .mat-editbar textarea {height:28px;min-height:28px;}
}
body.classic .product-dialog {width:850px;max-width:calc(100vw - 28px);height:530px;max-height:90dvh;margin:auto;padding:0;border:1px solid #9faab6;border-radius:2px;background:#fff;color:#333;box-shadow:0 12px 40px #0003;font-size:13px;}
body.classic .product-dialog::backdrop {background:#15243555;}
body.classic .product-dialog[open] {display:flex;flex-direction:column;}
body.classic .product-dialog header {display:flex;align-items:center;justify-content:space-between;background:#f1f3f6;border-bottom:1px solid #cfd5dc;padding:6px 14px;}
body.classic .product-dialog header strong {font-weight:400;font-size:14px;}
body.classic .product-dialog header button {padding:0 6px;font-size:20px;background:transparent;border:0;}
body.classic .product-dialog-search {display:flex;align-items:center;gap:8px;padding:16px 16px 6px;}
body.classic .product-dialog-search input {width:310px;min-width:0;font-size:13px;}
body.classic .product-dialog-status {margin:4px 16px 10px;min-height:18px;font-size:13px;color:#666;}
body.classic .product-dialog-grid {flex:1;min-height:0;overflow:auto;border:1px solid #d0d6dd;margin:0 16px;}
body.classic .product-dialog table {width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;}
body.classic .product-dialog :is(th,td) {padding:6px 10px;border:1px solid #d7dce2;line-height:1.5;text-align:left;overflow-wrap:anywhere;}
body.classic .product-dialog th {background:#f1f3f5;font-weight:400;position:sticky;top:0;}
body.classic .product-dialog .pick-check {width:58px;text-align:center;}
body.classic .product-dialog .pick-unit {width:72px;}
body.classic .product-dialog input:is([type=checkbox],[type=radio]) {width:15px;height:15px;min-height:0;accent-color:#4782b4;}
body.classic .product-dialog tr[aria-selected=true] {background:#eaf3fa;}
body.classic .product-dialog tr:focus-visible {outline:2px solid #4686b8;outline-offset:-2px;}
body.classic .product-dialog footer {display:flex;align-items:center;gap:8px;padding:12px 16px;}
body.classic .product-dialog footer span {margin-right:auto;}
body.classic #productDialogConfirm {background:#416681;border-color:#416681;color:#fff;}
@media(max-width:1099px) {
 body.classic .app-shell {grid-template-columns:126px minmax(0,1fr);}
 body.classic .sidebar {width:126px;}
 body.classic #app.sheet-page .sheet-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px) {
 body.classic .app-shell {display:block;}
 body.classic .sidebar {width:100%;}
 body.classic .workspace {padding:0 8px 16px;}
 body.classic .sidebar nav button:not([hidden]) {min-height:44px;}
 body.classic .document-tab button {min-height:38px;}
 body.classic .document-modebar>span {display:none;}
 body.classic #app.sheet-page .sheet-fields {grid-template-columns:minmax(0,1fr);}
 body.classic #app.sheet-page :is(input,select,textarea,button) {min-height:44px;height:auto;font-size:16px;}
 body.classic #app.sheet-page .sheet-toolbar h2 {flex-basis:100%;}
 body.classic #app .document-grid-tools>span {flex-basis:100%;}
 body.classic #app .expense-sheet-page .expense-sheet-context {grid-template-columns:minmax(0,1fr);}
 body.classic #app .expense-sheet-page .expense-sheet-context label {display:block;font-size:14px;}
 body.classic #app .expense-sheet-page .expense-sheet-context label>:is(input,select,.editable-choice) {display:block;flex:none;width:100%!important;min-width:0;min-height:44px;height:auto;font-size:16px;margin-top:4px;}
 body.classic .product-dialog {width:calc(100vw - 12px);height:90dvh;max-width:calc(100vw - 12px);}
 body.classic .product-dialog-search {padding:8px;gap:5px;flex-wrap:wrap;}
 body.classic .product-dialog-search input {flex:1;width:160px;font-size:16px;min-height:44px;}
 body.classic .product-dialog button {min-height:44px;}
 body.classic .product-dialog-grid {margin:0 8px;}
 body.classic .product-dialog :is(th,td) {padding:7px 4px;font-size:13px;}
 body.classic .product-dialog .pick-check {width:40px;}
 body.classic .product-dialog .pick-unit {width:42px;}
 body.classic .product-dialog input:is([type=checkbox],[type=radio]) {width:20px;height:20px;}
}
@media print {body.classic :is(.document-tabs,.document-modebar,.document-grid-tools,.product-dialog) {display:none!important;}}
