.rm-workspace .rm-filters,.rm-dialog .rm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.rm-dialog .rm-line-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.rm-workspace .rm-filters{grid-template-columns:minmax(180px,1fr) minmax(200px,1fr) minmax(150px,.7fr) auto;align-items:end}
.rm-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px;color:var(--muted,#718096)}
.rm-field :is(input,select,textarea){box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:8px 10px;border:1px solid var(--line,#dbe4e7);border-radius:6px;background:var(--surface,#fff);font:inherit;color:var(--text,#24333e)}
.rm-field textarea{min-height:64px;resize:vertical}.rm-field input:read-only{background:var(--hover,#f5f8f8)}
.rm-field input[type=hidden]{display:none}
.rm-field output{box-sizing:border-box;display:flex;align-items:center;min-height:40px;padding:8px 10px;border:1px solid var(--line,#dbe4e7);border-radius:6px;background:var(--hover,#f5f8f8);color:var(--text,#24333e);overflow-wrap:anywhere}
.rm-form-total{margin-right:auto;max-width:60%;font-size:13px;line-height:1.6;overflow-wrap:anywhere}.rm-form-total strong{color:#087e79}
.rm-workspace .rm-table.rm-receipt-table :is(th,td){padding:10px 4px}
.rm-workspace .rm-receipt-table{min-width:1040px}.rm-workspace .rm-receipt-table th{width:auto}.rm-workspace .rm-receipt-table th:nth-child(1),.rm-workspace .rm-receipt-table th:nth-child(2){width:8.5%}.rm-workspace .rm-receipt-table th:nth-child(3){width:10%}.rm-workspace .rm-receipt-table th:nth-child(4),.rm-workspace .rm-receipt-table th:nth-child(5){width:11%}.rm-workspace .rm-receipt-table th:nth-child(6){width:7%}.rm-workspace .rm-receipt-table th:nth-child(7){width:4%}.rm-workspace .rm-receipt-table th:nth-child(8){width:6%}.rm-workspace .rm-receipt-table th:nth-child(9){width:10%}.rm-workspace .rm-receipt-table th:nth-child(10){width:5%}.rm-workspace .rm-receipt-table th:nth-child(11){width:10%}.rm-workspace .rm-receipt-table th:nth-child(12){width:9%}
.rm-workspace .rm-receipt-table .actions .button{padding:6px 8px;white-space:nowrap}
.rm-workspace .rm-receipt-table .rm-unit{white-space:nowrap}
.rm-combo{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 34px}
.rm-combo>input:not([type=hidden]){border-radius:6px 0 0 6px}.rm-combo>input:read-only{grid-column:1/-1;border-radius:6px}
.rm-combo>[data-rm-toggle]{border:1px solid var(--line,#dbe4e7);border-left:0;border-radius:0 6px 6px 0;background:#fff;color:#42515d;cursor:pointer}
.rm-choices{position:absolute;z-index:80;top:calc(100% + 4px);left:0;right:0;max-height:240px;overflow:auto;background:#fff;padding:5px;border:1px solid var(--line,#dbe4e7);border-radius:6px;box-shadow:0 8px 24px #20303020}
.rm-choices[hidden]{display:none}.rm-choices.rm-above{top:auto;bottom:calc(100% + 4px)}
.rm-choices button{display:block;width:100%;padding:8px 10px;border:0;border-radius:4px;background:#fff;color:#24333e;text-align:left;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.rm-choices button:hover,.rm-choices button:focus{background:#eaf6f3}.rm-choices span{display:block;padding:8px;color:#718096}.rm-supplier-add{justify-content:end;align-items:start}
.rm-workspace .rm-table{width:100%;table-layout:fixed}.rm-workspace .rm-table :is(th,td){text-align:center;vertical-align:middle;overflow-wrap:anywhere;padding:12px 8px}
.rm-workspace .rm-statement-table th:first-child{width:11%}.rm-workspace .rm-statement-table th:nth-child(2){width:17%}.rm-workspace .rm-statement-table th:nth-child(3){width:19%}.rm-workspace .rm-statement-table th:last-child{width:16%}
.rm-workspace .rm-statement-table{min-width:980px}.rm-muted{font-size:12px;color:var(--muted,#718096);line-height:1.6}
.rm-warning{padding:12px 14px;border:1px solid #edcc92;background:#fff7e7;color:#8a5b10;border-radius:6px;margin:12px 0;line-height:1.7}
.rm-error{color:#b33434;min-height:20px;margin:10px 0}.rm-span{grid-column:1/-1}
.rm-dialog{box-sizing:border-box;width:min(1060px,calc(100vw - 64px));max-height:calc(100vh - 64px);padding:0;border:1px solid var(--line,#dbe4e7);border-radius:12px;color:var(--text,#24333e);background:#fff}
.rm-dialog::backdrop{background:rgba(30,42,49,.48)}.rm-dialog-header,.rm-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 24px;background:#fff}
.rm-dialog-header{border-bottom:1px solid var(--line,#dbe4e7)}.rm-dialog-header h2{font-size:19px;margin:0}
.rm-dialog-body{padding:20px 24px;overflow:auto;max-height:calc(100vh - 250px)}.rm-dialog-footer{border-top:1px solid var(--line,#dbe4e7);justify-content:flex-end}
.rm-line{padding:16px;margin-top:16px;border:1px solid var(--line,#dbe4e7);border-radius:8px}.rm-line-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.rm-line summary{cursor:pointer;color:#087e79;padding:12px 0}.rm-line details .rm-grid{margin-top:4px}.rm-section{font-weight:700;font-size:14px;color:var(--text,#24333e)}
.rm-summary{display:flex;flex-wrap:wrap;gap:20px;padding:14px 0;align-items:center}.rm-summary strong{font-size:19px;color:#087e79}
.rm-dialog table{width:100%;border-collapse:collapse;table-layout:fixed}.rm-dialog :is(th,td){padding:8px;text-align:center;vertical-align:middle;overflow-wrap:anywhere;border-bottom:1px solid var(--line,#dbe4e7)}
.rm-history details{margin:10px 0}.rm-history summary{cursor:pointer;line-height:1.8}.rm-pager{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:16px 0}
.a4-sheet.rm-print table{width:100%;table-layout:fixed}.a4-sheet.rm-print table :is(th,td){text-align:center;vertical-align:middle;overflow-wrap:anywhere;white-space:normal;font-size:11px;border:1px solid #555}
.a4-sheet.rm-print .rm-statement-table th:first-child{width:14%}.a4-sheet.rm-print .rm-statement-table th:nth-child(2){width:20%}.a4-sheet.rm-print .rm-statement-table th:nth-child(3){width:18%}

@media screen and (min-width:1001px){
 .rm-workspace .rm-filters{padding:10px 12px;gap:8px 10px;grid-template-columns:minmax(180px,1fr) minmax(220px,1.2fr) minmax(140px,.7fr) auto}
 .rm-workspace .rm-filters:has(>div:empty){grid-template-columns:minmax(180px,280px) minmax(250px,1fr) auto}
 .rm-workspace .rm-filters>div:empty{display:none}
 .rm-field{gap:4px}.rm-field :is(input,select){min-height:34px;padding:6px 8px}
 .rm-field output{min-height:34px;padding:6px 8px}
 .rm-workspace .rm-receipt-table{min-width:0}
 .rm-workspace .rm-table :is(th,td){padding:8px 5px}
 .rm-workspace .rm-receipt-table .actions{gap:4px}
 .rm-workspace .rm-receipt-table .actions .button{padding:5px 6px;white-space:normal}
 .rm-dialog-header,.rm-dialog-footer{padding:10px 16px;gap:8px}
 .rm-dialog-body{padding:12px 16px;max-height:calc(100dvh - 170px)}
 .rm-dialog .rm-grid,.rm-dialog .rm-line-grid{gap:8px 10px}
 .rm-line{padding:10px;margin-top:10px}.rm-line-head{margin-bottom:8px}
 .rm-line summary{padding:8px 0}
 .rm-workspace .rm-pager{padding:10px 12px;gap:8px}
 .rm-dialog .rm-summary{gap:12px;padding:10px 0}
}
