/* MK Accounting v1.10 compact voucher workspace */
.modal{padding:0;border:0;border-radius:16px;max-width:min(1080px,96vw);width:100%;box-shadow:0 24px 70px rgba(2,35,40,.28)}
.modal::backdrop{background:rgba(2,30,34,.7);backdrop-filter:blur(3px)}
.modal-body{padding:18px 20px;max-height:92vh;overflow:auto}
.modal-head{position:sticky;top:-18px;z-index:4;margin:-18px -20px 14px;padding:15px 20px;background:#fff;border-bottom:1px solid #dce7e8}
.modal-head h2{font-size:1.25rem;margin:0}.modal .form-grid{gap:10px 12px}.modal .form-group{gap:4px;font-size:.82rem;font-weight:650}
.modal .form-control{min-height:38px;padding:7px 10px;border-radius:8px;font-size:inherit;background:#fff}
.modal textarea.form-control{min-height:68px}.modal h3{font-size:.95rem;margin:14px 0 7px;color:#164d52}
.modal .table-wrap{border:1px solid #dbe7e8;border-radius:10px;max-height:300px}.modal table{font-size:.83rem}.modal th{padding:8px;background:#edf6f6}.modal td{padding:6px}
.modal .actions{position:sticky;bottom:-18px;z-index:3;margin:15px -20px -18px;padding:12px 20px;background:#fff;border-top:1px solid #dce7e8;box-shadow:0 -8px 18px rgba(3,45,50,.05)}
.quick-add-wrap{display:flex;align-items:stretch;gap:6px}.quick-add-wrap>select{min-width:0;flex:1}.quick-add-wrap>.dp-combobox{flex:1 1 auto}.quick-add-wrap>select.dp-combobox-native{position:static!important;width:auto!important;height:auto!important;margin:0!important;padding:.65rem .75rem!important;opacity:1!important;pointer-events:auto!important;flex:1 1 auto}.quick-add-btn{flex:0 0 auto;padding:0 11px!important;min-height:38px;font-weight:750;white-space:nowrap}
.quick-add-dialog{max-width:min(620px,94vw)}.quick-add-dialog .modal-body{max-height:88vh}.quick-add-status{display:none;margin:8px 0}.quick-add-status.show{display:block}
.voucher-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:10px 12px;margin-top:8px;border-radius:9px;background:#eaf5f5;color:#073f45;font-size:1rem}
@media(max-width:720px){.modal{max-width:100vw;width:100%;height:100%;max-height:100vh;border-radius:0}.modal-body{max-height:100vh;padding:14px}.modal-head{top:-14px;margin:-14px -14px 12px;padding:13px 14px}.modal .form-grid{grid-template-columns:1fr}.modal .wide{grid-column:1}.modal .actions{bottom:-14px;margin:12px -14px -14px;padding:11px 14px}.quick-add-btn{padding:0 9px!important}.modal table{min-width:720px}}

/* Professional document layout based on conventional accounting forms */
.voucher-document{background:#fff;color:#172426}
.voucher-document .modal-head{background:#f8fbfb}.voucher-document>.alert{margin:0 0 12px}
.voucher-masthead{display:grid;grid-template-columns:minmax(0,1fr) 230px;border:1px solid #9cb1b3;border-radius:10px 10px 0 0;overflow:hidden;margin-bottom:0;background:#fff}
.voucher-brand{padding:18px 20px;min-height:108px;background:linear-gradient(135deg,#f5fbfb,#fff)}
.voucher-brand-row{display:flex;align-items:center;gap:12px}.voucher-brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#073f45;color:#f4b41a;font-weight:850;font-size:1rem}
.voucher-brand h3{margin:0;color:#073f45;font-size:1.2rem;letter-spacing:.02em}.voucher-brand p{margin:5px 0 0;color:#587073;font-size:.78rem;line-height:1.45}
.voucher-identity{border-left:1px solid #9cb1b3}.voucher-identity h2{margin:0;padding:14px 16px;background:#073f45;color:#fff;text-align:center;text-transform:uppercase;letter-spacing:.08em;font-size:1.08rem}
.voucher-id-row{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #b5c4c6}.voucher-id-row span,.voucher-id-row strong{padding:8px 10px;font-size:.76rem}.voucher-id-row span{background:#edf4f4;color:#526a6d}.voucher-id-row strong{text-align:right;color:#073f45}
.voucher-document>.form-grid{border:1px solid #9cb1b3;border-top:0;padding:12px;background:#fbfdfd;grid-template-columns:repeat(4,minmax(0,1fr))}
.voucher-document>.form-grid .voucher-party{grid-column:span 2}.voucher-document>.form-grid .wide{grid-column:span 2}
.voucher-lines-panel{margin-top:12px;border:1px solid #8ca4a7;border-radius:8px;overflow:hidden;background:#fff}.voucher-lines-heading{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:#073f45;color:#fff}.voucher-lines-heading strong{font-size:.88rem;text-transform:uppercase;letter-spacing:.06em}.voucher-lines-heading small{color:#d5e8e9}
.voucher-single-line{display:grid;grid-template-columns:minmax(260px,2.2fr) minmax(90px,.6fr) minmax(120px,.8fr) minmax(90px,.6fr);gap:0}.voucher-single-line .form-group{padding:8px;border-right:1px solid #c6d3d4;margin:0}.voucher-single-line .form-group:last-child{border-right:0}
.voucher-document .table-wrap{border-color:#8ca4a7;border-radius:0}.voucher-document table thead th{background:#073f45;color:#fff;border-right:1px solid #54777a;text-transform:uppercase;letter-spacing:.035em;font-size:.72rem}.voucher-document table tbody td{border-right:1px solid #d3dede;border-bottom:1px solid #e3ebec}
.voucher-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,36%);border:1px solid #8ca4a7;border-top:0;background:#fff}.voucher-payment-note{padding:13px;color:#526a6d;font-size:.78rem;line-height:1.5}.voucher-grand-total{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-left:1px solid #8ca4a7;background:#f1f7f7}.voucher-grand-total span{font-size:.82rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em}.voucher-grand-total strong{font-size:1.28rem;color:#073f45}
.voucher-document .source-doc-box,.voucher-evidence-panel{margin:12px 0 0;padding:11px;border:1px dashed #9eb3b5;border-radius:8px;background:#fafcfc}.voucher-document .source-doc-box legend{padding:0 7px;color:#315d61;font-weight:750}
.voucher-inline{padding:0!important;border:1px solid #9cb1b3;border-radius:10px;overflow:hidden}.voucher-inline .voucher-masthead{border:0;border-bottom:1px solid #9cb1b3;border-radius:0}.voucher-inline>.form-grid{border:0}.voucher-inline>.voucher-masthead,.voucher-inline>.voucher-summary{grid-column:1/-1;width:100%}.voucher-inline>.voucher-masthead+label{margin-left:12px}.voucher-inline>.actions{margin:0 12px 12px}
@media(max-width:900px){.voucher-document>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.voucher-single-line{grid-template-columns:2fr 1fr}.voucher-summary{grid-template-columns:1fr}.voucher-grand-total{border-left:0;border-top:1px solid #8ca4a7}}
@media(max-width:620px){.voucher-masthead{grid-template-columns:1fr}.voucher-identity{border-left:0;border-top:1px solid #9cb1b3}.voucher-brand{min-height:auto;padding:14px}.voucher-document>.form-grid{grid-template-columns:1fr}.voucher-document>.form-grid .voucher-party,.voucher-document>.form-grid .wide{grid-column:1}.voucher-single-line{grid-template-columns:1fr}.voucher-single-line .form-group{border-right:0;border-bottom:1px solid #d3dede}.voucher-payment-note{padding:10px}.voucher-grand-total{padding:12px}}
.sales-lines-table{min-width:930px;table-layout:fixed}.sales-lines-table th:nth-child(1){width:24%}.sales-lines-table th:nth-child(2){width:23%}.sales-lines-table th:nth-child(3){width:9%}.sales-lines-table th:nth-child(4){width:7%}.sales-lines-table th:nth-child(5){width:12%}.sales-lines-table th:nth-child(6){width:8%}.sales-lines-table th:nth-child(7){width:13%}.sales-lines-table th:nth-child(8){width:4%}.sales-lines-table .form-control{width:100%;min-width:0}.sales-lines-table output{display:block;text-align:right;font-weight:700;white-space:nowrap}.sales-lines-table .line-unit{text-align:center}.voucher-lines-panel>.add-sales-line{margin:9px 11px}.voucher-totals{border-left:1px solid #8ca4a7}.voucher-totals>div{display:flex;justify-content:space-between;gap:14px;padding:7px 14px;border-bottom:1px solid #d5e0e1}.voucher-totals>div:last-child{border-bottom:0}.voucher-totals span{font-size:.78rem;text-transform:uppercase;color:#516b6e}.voucher-totals strong{color:#073f45;white-space:nowrap}.voucher-totals .voucher-grand-total{border-left:0;border-top:0}.source-doc-box{clear:both}.source-doc-box>p{margin:0 0 8px;color:#607779;font-size:.78rem}
@media(max-width:900px){.voucher-totals{border-left:0;border-top:1px solid #8ca4a7}}
