.accounting-module-header {display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px 16px}
.accounting-module-header h2 {min-width:0;margin:0;color:#254c3d;font-size:16px;font-weight:650;line-height:1.35}
.accounting-header-actions {display:flex;align-items:center;justify-content:flex-end;flex:none;gap:6px;margin-inline-start:auto}
.accounting-header-actions .accounting-icon {margin:0;border-radius:6px;color:#506f60}
.accounting-header-actions .accounting-icon svg {width:16px;height:16px}
.accounting-header-actions .accounting-icon:hover {background:#edf3ee!important}
.accounting-header-actions button:focus-visible {outline:2px solid #658d73;outline-offset:2px}
@media(pointer:coarse){
 .accounting-header-actions .accounting-icon {width:40px;height:40px}
}

.accounting-document-tabs {display:flex;flex-wrap:wrap;gap:8px}
.finance-operational-tabs {padding-inline-start:12px}
.accounting-document-body {padding:16px 0}
.accounting-document-body > h3 {font-size:16px;color:#274b39;margin:0 0 10px}
.accounting-coa-tools {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.accounting-coa-tools input {width:min(100%,420px)}
.accounting-coa-download {padding:6px 10px;border:1px solid #d8e4da;border-radius:6px;color:#305940;background:#f5f8f5;text-decoration:none;font-size:12px;font-weight:600}
.accounting-coa-download:hover {background:#eaf2eb}
.accounting-master-coa table {min-width:460px}
.accounting-master-coa td:first-child {font-variant-numeric:tabular-nums}
.accounting-master-coa td small {margin:0 0 2px;color:#617265}
.accounting-master-coa .accounting-coa-group-row td {background:#f3f7f3}
.accounting-master-coa .accounting-coa-group-row td:nth-child(2) {color:#254c3d}
.accounting-coa-row-actions {width:48px;text-align:right}
.accounting-coa-row-actions .accounting-icon:hover {background:#edf3ee!important;border-radius:6px}
.accounting-coa-editor .document-fields {grid-template-columns:1fr;margin:14px 0}
.accounting-coa-save-status {font-size:12px;color:#305940;margin:0 0 8px}
.accounting-coa-editor [role=status]:empty,.accounting-coa-save-status:empty {display:none}
.accounting-coa-position {width:100%;max-width:300px;border:1px solid #e1e7e2;border-radius:7px}
.accounting-coa-position table {min-width:0;table-layout:fixed}
.accounting-table-scroll.accounting-coa-position :is(th,td),.accounting-coa-position td:first-child {min-width:0;white-space:normal;overflow-wrap:anywhere}
.accounting-coa-position th:last-child,.accounting-coa-position td:last-child {width:70px;text-align:center}
.accounting-coa-position tbody tr:last-child td {border-bottom:0}
.accounting-document-dialog {width:min(1060px,calc(100vw - 30px));padding:16px 20px 20px;overflow:auto}
.accounting-document-dialog .sales-dialog-head {margin-bottom:10px}
.document-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
.document-actions:empty {display:none}
.document-actions .accounting-icon {border:1px solid #dae3d8;border-radius:7px;width:37px;height:36px;background:#fff}
.document-actions .accounting-icon:enabled:hover {background:#eaf2ea}
.document-download-group {position:relative;display:inline-flex}
.document-download-options {position:absolute;display:grid;inset:100% auto auto 0;z-index:5;min-width:85px;padding:4px;background:#fff;border:1px solid #dce4d9;border-radius:7px;box-shadow:0 6px 18px #25382d1a}
.document-download-options[hidden],.document-fields label[hidden] {display:none}
.document-download-options a {padding:7px 10px;color:#25503c;text-decoration:none}
.document-download-options a:hover {background:#edf3ed}
.accounting-document-form {padding:14px 0;border-top:1px solid #dce4d9}
.document-fields {display:grid;grid-template-columns:minmax(180px,.7fr) minmax(200px,1fr);gap:12px 16px;max-width:830px;margin-bottom:16px}
.document-fields label {display:grid;gap:5px}
.document-fields input,.document-fields select,.accounting-document-lines input,.accounting-document-lines select {min-height:34px;padding:6px 8px}
.accounting-document-picker {position:relative;display:block;width:100%;min-width:0}
.accounting-document-search {display:block;width:100%;min-width:0;box-sizing:border-box;min-height:34px;padding:6px 9px;border:1px solid #d5dfd4;border-radius:7px;background:#fff;color:#25382d;font:inherit;font-size:12px}
.accounting-document-search:focus {outline:2px solid #8eae91;outline-offset:1px}
.accounting-document-options {position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:45;max-height:240px;overflow:auto;padding:5px;background:#fff;border:1px solid #d9e2dc;border-radius:7px;box-shadow:0 8px 22px #18332820}
.accounting-document-options[hidden] {display:none}
.accounting-document-option {display:block;width:100%;padding:8px 9px;border:0;border-radius:4px;background:transparent;color:#254134;text-align:left;white-space:normal;font:inherit;font-size:12px}
.accounting-document-option:hover,.accounting-document-option:focus,.accounting-document-option[aria-selected=true] {background:#edf3ed!important}
.accounting-document-empty {margin:0;padding:8px;color:#708074;font-size:12px}
.accounting-document-lines td:first-child .accounting-document-search {min-width:190px}

.document-fields label button {justify-self:start;min-height:32px;padding:5px 9px}
.accounting-document-lines {margin-bottom:8px}
.accounting-document-lines table {min-width:600px}
.accounting-document-lines td {padding:6px 9px}
.accounting-document-lines td:first-child select {min-width:190px}
.accounting-document-lines td input[type=number] {min-width:90px;text-align:right}
.accounting-document-lines td input[type=text] {min-width:135px}
.accounting-voucher-lines td:first-child {width:44%;min-width:260px}
.accounting-voucher-lines .accounting-document-options {position:relative;inset:auto;margin-top:4px;max-height:280px}
.accounting-voucher-lines .accounting-document-search,.accounting-voucher-lines .accounting-document-option {font-size:14px}
.document-total[hidden],.accounting-document-lines[hidden],.document-rv-payments[hidden] {display:none}
.document-total {display:block;text-align:right;font-weight:650;margin:12px 0;font-variant-numeric:tabular-nums}
.document-creator {color:#617265;font-size:12px;margin:10px 0}
.document-list-filters {display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 12px;margin:0 0 12px}
.document-list-filters label {min-width:140px}
.document-pagination {display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:12px}
.accounting-coa-matrix th:not(:first-child),.accounting-coa-matrix td:not(:first-child) {text-align:center}
.accounting-coa-matrix input[type=checkbox],.document-rv-payments input[type=checkbox] {width:16px;height:16px;min-height:16px;accent-color:#28543f}
.document-rv-payments input[type=checkbox] {padding:0}
.accounting-coa-matrix + button {margin-top:10px}
.financial-period {display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.financial-period label {display:grid;gap:4px;font-size:12px}
.financial-period input,.financial-period button {min-height:34px;padding:6px 8px}
.financial-tabs {margin-bottom:12px}
.financial-tabs + section h3 {margin:0;color:#254c3d}
.financial-tabs + section > p {margin:6px 0 12px}
.financial-table {margin:0 0 12px;max-height:62vh}
.financial-table table {min-width:360px}
.financial-period .document-rv-toggle {margin-inline-start:auto;padding-inline:12px}
.document-rv-toggle[hidden] {display:none}
.document-rv-toggle[aria-expanded=true] {background:#eaf2ea}
.document-booking-receivables td > small {display:block;margin-top:4px}
.financial-table .accounting-number {font-variant-numeric:tabular-nums}
.financial-table .financial-subtotal td {background:#f5f8f4;font-weight:600}
.financial-table .financial-total td {background:#e9f1eb;font-weight:700}
.financial-table .financial-difference td,.financial-notice {color:#724b17;background:#fff6e4}
.financial-notice {margin:8px 0;padding:8px 10px;border-radius:5px;font-size:12px}
.financial-notice p {margin:6px 0 0}
@media(max-width:650px){
 .document-fields {grid-template-columns:1fr}
 .accounting-document-dialog {padding:12px}
 .document-list-filters label {min-width:120px}
}


/* Cash Receipt uses the compact form and toolbar sizing used by Sales. */
.accounting-document-body > .cash-receipt-title {margin:0 0 4px;font-size:14px;font-weight:600;line-height:1.4}
.cash-receipt-actions.sales-form-toolbar {position:static;z-index:auto;border:0;margin-bottom:6px;padding:0}
.cash-receipt-form {padding:10px 0;font-size:12px;line-height:1.4}
.cash-receipt-form .document-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;max-width:660px;margin-bottom:12px}
.cash-receipt-form :is(.document-fields,.financial-period) label {min-width:0;gap:4px;font-size:11px;font-weight:400;line-height:1.4}
.cash-receipt-form :is(.document-fields,.document-booking-receivables,.document-rv-payments) :is(input:not([type=checkbox]),.workspace-date-control) {
 box-sizing:border-box;min-width:0;min-height:30px;height:30px;padding:5px 9px;border-radius:6px;
 font-family:inherit;font-size:12px;font-weight:400;line-height:1.4
}
.cash-receipt-form .accounting-document-search:not(:focus) {text-overflow:ellipsis}
.cash-receipt-form .document-fields .workspace-date-control {justify-self:stretch}
.cash-receipt-form .document-booking-receivables h4 {margin:0 0 8px;font-size:13px;font-weight:600}
.cash-receipt-form .financial-period {gap:6px 10px;margin-bottom:8px}
.cash-receipt-form .document-rv-toggle {min-height:30px;font-size:11px;padding-block:4px}
.cash-receipt-form .document-booking-receivables [role=status] {margin:0 0 8px}
.cash-receipt-form :is(.financial-table,.document-rv-payments) :is(th,td) {padding:6px 9px}
.cash-receipt-form .document-booking-receivables td input {width:100%;max-width:145px;text-align:right;font-variant-numeric:tabular-nums}
.cash-receipt-form .document-booking-receivables td > small {margin-top:3px}
.cash-receipt-form .document-total {margin:8px 0}
@media(max-width:540px){
 .cash-receipt-form .document-fields {grid-template-columns:minmax(0,1fr)}
}

.document-receipt-amount {display:flex;align-items:center;gap:5px}
.cash-receipt-form .document-receipt-amount button {flex:none;min-height:28px;padding:4px 7px;font-size:11px}
.cash-receipt-form .document-booking-receivables .financial-period button[hidden] {display:none}
