/* Invoice workbench: presentation only; vendor bills retain their existing editor. */
@media screen{.invoice-saved-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.invoice-saved-actions .invoice-action-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.invoice-saved-actions .invoice-secondary-actions{border-left:1px solid #e8e1ed;padding-left:8px}.invoice-saved-actions .invoice-secondary-actions .btn{font-size:11px;padding:7px 10px;min-height:32px}}
@media screen and (max-width:760px){.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample]){display:block!important;white-space:nowrap;text-overflow:ellipsis;font-size:8px}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample]) [data-action=sample]{display:none!important}.invoice-saved-actions .invoice-secondary-actions{border-left:0;padding-left:0}}
@media screen{
 .workspace:has(.invoice-workbench) .heading{min-height:34px;gap:10px;align-items:center;margin-bottom:8px;flex-wrap:wrap}.workspace:has(.invoice-workbench) .heading h1{font-size:22px}.workspace:has(.invoice-workbench) .heading p{display:none}.workbench-context-toggle{font-size:10px!important;padding:6px 10px!important;min-height:28px!important;margin-left:auto}
 .invoice-workbench-layout{grid-template-columns:minmax(0,1fr) 225px!important;gap:14px!important;align-items:start}.invoice-workbench-layout.workbench-context-hidden{grid-template-columns:1fr!important}.invoice-workbench-layout .contact-summary{grid-row:auto!important;position:relative;top:0;max-height:var(--entry-height,calc(100dvh - 200px));padding:14px!important;font-size:11px}.invoice-workbench-layout .contact-summary[hidden]{display:none!important}.invoice-workbench-layout .contact-summary h2{font-size:15px;margin-top:13px}.invoice-workbench-layout .contact-summary h3{font-size:11px;margin:18px 0 5px}.invoice-workbench-layout .contact-summary .tiny,.invoice-workbench-layout .contact-summary .muted{font-size:10px}.invoice-workbench-layout .contact-summary dl{font-size:10px;gap:9px}.invoice-workbench-layout .contact-summary li{padding:8px 0}.invoice-workbench-layout .contact-summary li div{font-size:10px}.invoice-workbench-layout .contact-summary small{font-size:9px}.invoice-workbench-layout .contact-summary>details>summary{font-size:11px;padding-right:18px}.workbench-context-close{position:absolute;right:10px;top:10px;padding:2px;border:0;background:none;color:#a89aac;font-size:16px;z-index:1}
 .invoice-workbench{padding:11px!important;border-radius:10px;min-height:320px}.invoice-workbench form{gap:5px}.invoice-workbench .entry-body{display:flex;flex-direction:column;overflow:visible;padding:0;min-height:70px;flex:1}.invoice-workbench .document-fields{display:grid!important;grid-template-columns:2.4fr 1fr .8fr!important;align-items:end;flex-shrink:0;gap:12px!important;margin-bottom:8px}.invoice-workbench .document-fields:has(#printed-customer-field:not([hidden])){grid-template-columns:2fr 1.5fr 1fr .9fr!important}.invoice-workbench .document-fields>.field:has(.contact-picker){grid-column:auto!important;display:block!important}.invoice-workbench .unified-contact-field>select{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none;clip-path:inset(50%)}.invoice-workbench .unified-contact-field>label{display:none!important}.invoice-workbench .contact-picker{display:block!important;position:relative;margin:0!important}.invoice-workbench .contact-picker>label{display:block!important;font-size:10px!important;line-height:15px;margin-bottom:4px}.invoice-workbench .contact-picker input{margin:0!important;min-height:30px!important;height:30px!important;font-size:12px!important}.invoice-workbench .contact-picker-list{min-width:280px;border-radius:6px;z-index:40}.invoice-workbench .contact-picker-list button{font-size:11px}.invoice-workbench .field>label{font-size:10px!important;line-height:15px}.invoice-workbench #printed-customer-field[hidden]{display:none!important}.workbench-terms{border-left:1px solid #eee8f1;padding-left:10px;align-self:stretch;display:flex;flex-wrap:wrap;align-content:center;gap:3px 5px}.workbench-terms>small{flex-basis:100%;font-size:9px;color:#9990a5}.workbench-terms b{background:#f4eef5;padding:3px 6px;border-radius:4px;color:#8a6c85;font-size:9px;font-weight:500}.workbench-terms span{font-size:9px;color:#a397ad;align-self:center}
 .workbench-grid-tools{border-top:1px solid #eee8f2;display:flex;align-items:center;justify-content:space-between;padding:7px 0 5px;flex-shrink:0;gap:8px}.workbench-grid-tools>strong{font-size:11px;font-weight:600}.workbench-grid-tools [data-workbench-count]{display:inline-block;margin-left:8px;background:#f3f2f7;color:#9a92a8;padding:2px 5px;border-radius:4px;font-size:8px;font-weight:400}.workbench-grid-tools>small{font-size:8px;color:#a49bae}.invoice-workbench .entry-table{margin:0;flex:1;min-height:65px;max-height:none!important;overflow:auto;border-radius:5px;scrollbar-width:thin}.invoice-workbench .entry-table table{min-width:720px;width:100%;table-layout:fixed}.invoice-workbench .entry-table th{height:25px;font-size:8px;padding:3px 5px;background:#f6f3f9;letter-spacing:.2px;font-weight:500}.invoice-workbench .entry-table td{height:24px;padding:0 5px;font-size:11px;line-height:18px;border-bottom:1px solid #efedf4}.invoice-workbench .entry-table tbody tr:nth-child(even){background:#fcfbfe}.invoice-workbench .entry-table th:nth-child(1){width:25px}.invoice-workbench .entry-table th:nth-child(2){width:auto}.invoice-workbench .entry-table th:nth-child(3){width:47px}.invoice-workbench .entry-table th:nth-child(4){width:48px}.invoice-workbench .entry-table th:nth-child(5),.invoice-workbench .entry-table th:nth-child(6){width:78px;text-align:right}.invoice-workbench .entry-table th:nth-child(7){width:80px;text-align:right}.invoice-workbench .entry-table th:nth-child(8){width:104px;text-align:right}.invoice-workbench .entry-table th:nth-child(9){width:23px}.invoice-workbench .entry-table input,.invoice-workbench .entry-table select{height:21px!important;min-height:21px!important;padding:1px 4px!important;font-size:11px!important;margin:0;border-radius:3px}.invoice-workbench .entry-table input[type=number]{text-align:right}.invoice-workbench .entry-table input[type=search]{border-color:transparent;background:transparent;color:#4c5267}.invoice-workbench .entry-table input[type=search]:focus{border-color:#b49fb9;background:white}.invoice-workbench .blank-line input[type=search]{border:1px dashed #dcd1e5!important;background:#fbf8fd!important;font-size:10px!important}.invoice-workbench .entry-table td:first-child{font-size:9px;color:#a0a4b5;text-align:center}.invoice-workbench .line-latest-cost,.invoice-workbench .line-average-cost{font-size:10px!important;color:#9b95a8;font-variant-numeric:tabular-nums}.invoice-workbench .line-amount{font-size:11px!important;font-variant-numeric:tabular-nums;color:#686071}.invoice-workbench .serial-detail{display:inline-block;max-width:100%;margin:0 0 0 3px}.invoice-workbench .serial-detail:not([open]){display:none}.invoice-workbench .entry-row:focus-within .serial-detail,.invoice-workbench .entry-row:hover .serial-detail{display:inline-block}.invoice-workbench .serial-detail input{height:24px!important;width:100%;min-width:120px}.invoice-workbench .serial-detail[open]{display:block}.invoice-workbench .line-mobile-summary,.invoice-workbench .line-mobile-toggle{display:none}.workbench-keyboard-hint{font-size:8px!important;color:#a59bae;line-height:14px;margin:3px 0 0!important;flex-shrink:0}
 .invoice-workbench .document-footer{display:flex!important;flex-direction:column;align-items:stretch!important;gap:4px;flex-shrink:0;padding-top:5px;margin:0;border-top:1px solid #eee7f2;max-height:60%;overflow:auto;scrollbar-width:thin}.workbench-settlement{display:grid;grid-template-columns:1.25fr 1fr;gap:20px;flex-shrink:0;order:0}.workbench-payment summary{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;cursor:pointer;padding:4px 0 6px;list-style:none;color:#6b556c}.workbench-payment summary::after,.invoice-workbench .entry-extra>summary::after{content:'⌄';color:#a797b0;margin-left:7px}.workbench-payment summary strong{font-size:10px;font-weight:550}.workbench-payment [data-payment-brief]{font-size:8px;color:#a08fa8;text-align:right}.workbench-pay-fields{display:grid;grid-template-columns:1.3fr 1fr;gap:9px;padding:8px 0}.workbench-pay-fields input,.workbench-pay-fields select{font-size:12px!important;height:30px!important;min-height:30px!important}.invoice-workbench .payment-splits{margin:0 0 7px}.invoice-workbench .payment-splits>summary{display:none}.invoice-workbench .payment-splits>.tiny{font-size:9px;margin:2px 0}.invoice-workbench .split-row{gap:6px;font-size:10px}.invoice-workbench .split-row input,.invoice-workbench .split-row select{height:29px!important;min-height:29px!important;font-size:11px!important}.invoice-workbench .payment-splits .btn{font-size:9px;padding:5px 8px;min-height:27px}.invoice-workbench .entry-extra{margin:0;border-top:1px solid #eee8f1}.invoice-workbench .entry-extra>summary{display:flex;justify-content:space-between;padding:5px 0;font-size:9px;list-style:none}.invoice-workbench .entry-extra-fields{padding:7px 0;gap:8px}.invoice-workbench .entry-extra-fields input{height:29px!important;min-height:29px!important;font-size:11px!important}.workbench-adjustments{display:grid;grid-template-columns:1fr 1fr;gap:7px}.workbench-adjustments>.field>label{font-size:8px!important;line-height:12px}.workbench-adjustments input{height:27px!important;min-height:27px!important;font-size:11px!important;padding:4px 7px!important}.workbench-adjustments>small{grid-column:1/-1;font-size:7px;color:#aa9ab0;line-height:13px}
 .workbench-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-top:6px;border-top:1px solid #e8e0ee;flex-shrink:0}.workbench-metrics>div{padding:5px 8px}.workbench-metrics small{font-size:8px;display:block;color:#a597b0}.workbench-metrics strong{display:block;margin-top:4px;font-size:15px!important;font-weight:650;line-height:20px;color:#6c5475;font-variant-numeric:tabular-nums}.workbench-metrics .workbench-unpaid{background:#f5eef7;border-radius:6px}.invoice-workbench .workbench-save{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;border-top:1px solid #eee8f1;padding-top:6px;min-height:34px}.invoice-workbench .workbench-save .btn{flex-basis:auto!important;margin:0!important;min-height:30px;padding:6px 14px;font-size:11px}.invoice-workbench #negative-stock-warning:empty{display:none}.invoice-workbench #negative-stock-warning:not(:empty){max-height:110px;overflow:auto;flex-shrink:0}.invoice-workbench #negative-stock-warning .strip{padding:9px;font-size:10px;margin:0}.invoice-workbench #negative-stock-warning .tiny{font-size:9px}.invoice-workbench #negative-stock-warning input{width:auto}.invoice-workbench .issued-credit-note{font-size:9px;margin:0;order:0}.invoice-workbench .workbench-correction{flex-shrink:0}.invoice-workbench .workbench-correction input{height:28px;min-height:28px;font-size:11px}.workbench-edit-note{font-size:8px!important;line-height:13px;margin:0!important;color:#9a8aab}.invoice-workbench .entry-body>p.tiny{display:none}
 .draft-preview-controls{display:flex;gap:8px;align-items:center;margin:12px 0}#modal:has(.draft-invoice){width:min(920px,calc(100vw - 24px));max-width:920px}.draft-invoice h1{font-size:20px}.draft-invoice h2{font-size:14px}.invoice-action-group{display:flex;flex-wrap:wrap;gap:7px}.invoice-action-group.secondary{padding-left:12px;border-left:1px solid #e4dce9}.invoice-more-actions>summary{cursor:pointer;font-size:11px;padding:10px;color:#8b6d88}.invoice-more-actions[open]{display:flex;flex-wrap:wrap;gap:5px}
}
@media screen and (max-width:1249px) and (min-width:761px){.invoice-workbench-layout{grid-template-columns:minmax(0,1fr) 210px!important}.invoice-workbench .entry-table table{min-width:680px}.invoice-workbench .entry-table th:nth-child(5),.invoice-workbench .entry-table th:nth-child(6){width:68px}.invoice-workbench .entry-table th:nth-child(8){width:95px}.workbench-metrics strong{font-size:13px!important}}
@media screen and (max-width:760px){
 .invoice-workbench{padding:9px!important;min-height:350px}.invoice-workbench form{gap:4px}.invoice-workbench-layout{display:block!important;position:relative}.invoice-workbench-layout .contact-summary{position:absolute;inset:0;z-index:15;height:100%;max-height:none;background:white;padding:15px!important;box-shadow:0 4px 15px #553c4922}.invoice-workbench .document-fields{grid-template-columns:1.2fr 1fr!important;gap:7px!important;margin-bottom:6px}.invoice-workbench .document-fields:has(#printed-customer-field:not([hidden])){grid-template-columns:1.2fr 1fr!important}.invoice-workbench .document-fields>.field:first-child{grid-column:1/-1!important}.invoice-workbench #printed-customer-field{grid-column:1/-1}.invoice-workbench .contact-picker input{height:34px!important;min-height:34px!important;font-size:16px!important}.invoice-workbench .field>label,.invoice-workbench .contact-picker>label{font-size:9px!important;line-height:12px}.invoice-workbench .document-fields input{height:30px!important;min-height:30px!important;font-size:14px!important}.invoice-workbench .workbench-terms{padding-left:5px;border:0;gap:3px}.workbench-terms small{font-size:8px}.workbench-terms span{font-size:8px}.workbench-terms b{font-size:8px;padding:3px 4px}.workbench-grid-tools{padding:5px 0;height:25px}.workbench-grid-tools>strong{font-size:10px}.workbench-grid-tools>small{display:none}.workbench-grid-tools [data-workbench-count]{font-size:7px;margin-left:4px}
 .invoice-workbench .entry-table{min-height:62px;overflow-x:hidden!important}.invoice-workbench .entry-table table{display:block;min-width:0!important;width:100%!important}.invoice-workbench .entry-table thead{display:none}.invoice-workbench .entry-table tbody{display:block}.invoice-workbench .entry-table tr{display:grid;grid-template-columns:16px minmax(0,1fr) 85px 15px;column-gap:5px;align-items:center;position:relative;padding:6px 5px;border-bottom:1px solid #eee5f2}.invoice-workbench .entry-table td{display:none;border:0;min-width:0;height:auto!important;padding:0!important;grid-row:auto}.invoice-workbench .entry-table td:nth-child(1){display:block;grid-column:1;grid-row:1;font-size:8px}.invoice-workbench .entry-table td:nth-child(2){display:block;grid-column:2;grid-row:1;position:static}.invoice-workbench .entry-table td:nth-child(8){display:block;grid-column:3;grid-row:1;font-size:10px!important;white-space:nowrap;text-align:right}.invoice-workbench .entry-table td:nth-child(9){display:block;grid-column:4;grid-row:1}.invoice-workbench .entry-table td:nth-child(9)>button{display:none}.invoice-workbench .entry-table input[type=search]{height:21px!important;min-height:21px!important;font-size:11px!important;padding:1px 0!important;white-space:nowrap;text-overflow:ellipsis}.invoice-workbench .line-mobile-summary{display:block;color:#a99bb6;font-size:8px;line-height:12px;white-space:nowrap}.invoice-workbench .entry-row .line-mobile-toggle{display:block;position:absolute;right:3px;top:12px;background:none;border:0;color:#a594b2;padding:0;font-size:12px;height:18px}.invoice-workbench .serial-detail{display:none!important}.invoice-workbench .entry-table tr.mobile-expanded{row-gap:7px;background:#faf6fc;padding-bottom:10px}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(3),.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(4),.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(5),.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(6),.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(7),.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(9){display:block;grid-row:auto}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(3){grid-column:2;grid-row:2}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(4){grid-column:3/5;grid-row:3}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(7){grid-column:3/5;grid-row:2}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(5){grid-column:2;grid-row:3;text-align:left}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(6){grid-column:2;grid-row:4;text-align:left}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(9){grid-column:3/5;grid-row:4;text-align:right}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(9)>button{display:inline-block;font-size:11px;line-height:18px;color:#a46f80}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(9)>button::before{content:'Remove '}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(3)::before{content:'Quantity';font-size:8px;color:#a491b0;display:block}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(7)::before{content:'Rate (PKR)';font-size:8px;color:#a491b0;display:block}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(5)::before{content:'Last cost: ';font-size:8px}.invoice-workbench .entry-table tr.mobile-expanded td:nth-child(6)::before{content:'Avg cost: ';font-size:8px}.invoice-workbench .entry-table tr.mobile-expanded .serial-detail{display:block!important}.invoice-workbench .entry-table tr.mobile-expanded input[type=number],.invoice-workbench .entry-table tr.mobile-expanded select{height:30px!important;min-height:30px!important;font-size:14px!important}.invoice-workbench .entry-table tr.blank-line{grid-template-columns:16px minmax(0,1fr);padding:8px 5px}.invoice-workbench .entry-table .blank-line input[type=search]{padding:4px!important;height:28px!important;min-height:28px!important;font-size:11px!important}.workbench-keyboard-hint{display:none}
 .invoice-workbench .document-footer{padding-top:4px;gap:4px;max-height:64%}.workbench-settlement{grid-template-columns:1fr;gap:5px}.workbench-payment summary{font-size:9px;padding:2px 0 5px}.workbench-payment summary strong{font-size:9px}.workbench-payment [data-payment-brief]{font-size:8px}.invoice-workbench .entry-extra>summary{font-size:8px;padding:4px 0}.invoice-workbench .entry-extra-fields{padding:6px 0}.workbench-adjustments{gap:6px}.workbench-adjustments input{height:26px!important;min-height:26px!important;font-size:12px!important}.workbench-adjustments>.field>label{font-size:8px!important;line-height:10px}.workbench-adjustments>small{font-size:7px;line-height:10px}.workbench-pay-fields{padding:5px 0;gap:6px}.workbench-pay-fields input,.workbench-pay-fields select{height:32px!important;min-height:32px!important;font-size:14px!important}.workbench-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding-top:5px}.workbench-metrics>div:first-child{display:none}.workbench-metrics>div{padding:4px}.workbench-metrics small{font-size:7px;line-height:12px}.workbench-metrics strong{font-size:11px!important;line-height:17px;white-space:normal;overflow-wrap:anywhere;margin-top:2px}.invoice-workbench .workbench-save{padding-top:5px;justify-content:space-between;min-height:32px}.invoice-workbench .workbench-save .btn{font-size:10px;min-height:30px;padding:6px 11px}.invoice-workbench #negative-stock-warning:not(:empty){max-height:95px}.invoice-workbench .workbench-correction input{font-size:12px!important}.invoice-action-group.secondary{padding-left:0;border:0}.invoice-more-actions>summary{padding:7px}.draft-invoice{padding:10px}.draft-invoice table{min-width:500px}
}
@media print{
 body.printing-invoice-draft #app,body.printing-invoice-draft #toast{display:none!important}body.printing-invoice-draft #modal{display:block!important;position:static!important;margin:0!important;width:100%!important;max-width:none!important;max-height:none!important;border:0!important;padding:0!important;overflow:visible!important;box-shadow:none!important}body.printing-invoice-draft #modal>*:not(#dialog-form),body.printing-invoice-draft #dialog-form>*:not(.draft-invoice){display:none!important}body.printing-invoice-draft #dialog-form{display:block!important}body.printing-invoice-draft .draft-invoice{display:block!important}body.printing-invoice-draft .draft-invoice table{min-width:0!important}
}
@media screen{.invoice-workbench .unified-contact-field>select{padding:0!important;border:0!important}}
@media screen and (min-width:761px){.invoice-workbench .entry-table td{height:23px!important;line-height:17px}.invoice-workbench .entry-row button{height:19px;line-height:18px}.invoice-workbench .entry-table input,.invoice-workbench .entry-table select{height:20px!important;min-height:20px!important}.invoice-workbench .document-footer{gap:3px}.workbench-metrics{padding-top:5px}.workbench-metrics>div{padding:4px 7px}.invoice-workbench .workbench-save{padding-top:5px;min-height:31px}.invoice-workbench .workbench-save .btn{min-height:28px;padding:5px 12px}.workbench-settlement{gap:18px}.workbench-payment summary{padding:2px 0 4px}.workbench-adjustments input{height:25px!important;min-height:25px!important}}
@media screen{.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample]){display:flex;flex-wrap:nowrap;gap:10px;padding:5px 10px;margin:0 0 8px;font-size:9px;min-height:0;align-items:center}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample])>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample])>.btn{font-size:8px;min-height:22px;padding:4px 7px;flex-shrink:0}}
@media screen and (max-width:760px){.workspace:has(.invoice-workbench) .heading{display:flex;flex-wrap:nowrap;gap:5px}.workspace:has(.invoice-workbench) .heading>.btn:not(.workbench-context-toggle){display:none}.workspace:has(.invoice-workbench) .workbench-context-toggle{margin-left:auto}.workbench-mobile-entry-tools{display:block;flex-shrink:0}.workbench-mobile-entry-tools>summary{font-size:8px;color:#9d88a8;cursor:pointer;padding:3px 0}.workbench-mobile-entry-tools>.btn{font-size:9px;padding:4px 8px;min-height:27px;margin:3px}.invoice-workbench .contact-picker-list{min-width:0}.invoice-workbench .entry-table tr.mobile-expanded .serial-detail input{height:28px!important;min-height:28px!important;font-size:12px!important}.invoice-workbench .document-footer{max-height:70%}}
@media screen and (min-width:761px){.workbench-mobile-entry-tools{display:none}}
@media screen and (min-width:761px){.invoice-workbench .entry-table input,.invoice-workbench .entry-table select{display:block}.invoice-workbench .entry-table td{height:23px!important;vertical-align:middle}.invoice-workbench .document-fields{margin-bottom:6px}.invoice-workbench .document-footer{gap:2px}.workbench-metrics{padding-top:4px}.workbench-metrics>div{padding:4px 7px}.workbench-metrics small{line-height:10px}.workbench-metrics strong{line-height:18px;margin-top:2px;font-size:14px!important}.workbench-adjustments{gap:4px}.workbench-adjustments>.field{gap:2px}.workbench-adjustments>small{line-height:10px}.invoice-workbench .workbench-save{min-height:28px;padding-top:4px}.invoice-workbench .workbench-save .btn{min-height:26px;padding:4px 11px}.workbench-keyboard-hint{line-height:11px!important;margin:2px 0 0!important}.workbench-grid-tools{padding-top:5px;padding-bottom:4px}}
@media screen and (max-width:760px){.invoice-workbench .workbench-mobile-entry-tools{display:block}.invoice-workbench .workbench-mobile-entry-tools[open]{max-height:70px;overflow:auto}.invoice-workbench .line-mobile-summary{margin-top:0!important}.invoice-workbench .entry-table input[type=search]{display:block}.invoice-workbench .entry-table tr{padding-top:5px;padding-bottom:5px}}
@media screen and (min-width:761px){.invoice-workbench .entry-table .entry-row{height:23px!important}}
@media screen{.workspace:has(.invoice-workbench) .heading>div:empty{display:none}.workbench-grid-tools{position:relative}.invoice-workbench .workbench-mobile-entry-tools{display:block;flex-shrink:0;font-size:9px}.workbench-mobile-entry-tools>summary{font-size:9px;cursor:pointer;color:#907a9b;padding:3px;list-style:none}.workbench-mobile-entry-tools>summary::after{content:' ⌄'}.workbench-mobile-entry-tools[open]{position:absolute;top:0;right:0;z-index:16;background:white;border:1px solid #e6dfed;border-radius:6px;box-shadow:0 4px 12px #4b365815;min-width:170px;padding:6px}.workbench-mobile-entry-tools>.btn{display:flex;margin:5px 0;font-size:10px;min-height:29px;padding:5px 8px}.invoice-workbench .entry-body{position:relative}}
@media screen and (max-width:760px){.invoice-workbench .workbench-mobile-entry-tools[open]{max-height:120px;overflow:auto}.invoice-workbench .workbench-mobile-entry-tools>summary{font-size:8px}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample]){height:28px!important;min-height:28px!important;max-height:28px;padding:3px 7px!important;overflow:hidden}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample])>span{display:block;line-height:12px;font-size:8px;white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}.workspace:has(.invoice-workbench)>.strip.warning:has([data-action=sample])>.btn{height:20px!important;min-height:20px!important;max-height:20px;font-size:8px!important;padding:3px 5px!important}.workspace:has(.invoice-workbench) .heading{height:32px;min-height:32px;flex-wrap:nowrap}.workbench-grid-tools>small{display:none}}

/* Customer rate hints reuse loaded history and preserve compact invoice rows. */
@media screen{.invoice-workbench .customer-rate-inline{display:grid;grid-template-columns:minmax(55px,1fr) 83px;gap:4px;align-items:center}.invoice-workbench [data-last-customer-price]{display:block;min-width:0;text-align:right;line-height:10px;color:#806580}.invoice-workbench [data-last-customer-price] span{display:block;font-size:7px;white-space:nowrap}.invoice-workbench [data-last-customer-price] b{display:block;font-size:9px;font-weight:500}.invoice-workbench .entry-table th:nth-child(7){width:150px}}
@media screen and (max-width:760px){.invoice-workbench .customer-rate-inline{grid-template-columns:minmax(0,1fr) 83px}.invoice-workbench [data-last-customer-price] span{white-space:normal}}
@media print{[data-last-customer-price]{display:none!important}}

/* Always-visible invoice settlement row; additional accounts stay below it. */
@media screen{
 .invoice-workbench .workbench-settlement{display:flex;flex-direction:column;gap:5px}
 .invoice-workbench .workbench-payment-row{display:grid;grid-template-columns:minmax(0,1.25fr) repeat(2,minmax(0,1fr)) minmax(0,1.2fr) auto;gap:8px;align-items:end}
 .invoice-workbench .workbench-payment-row>.field{min-width:0;margin:0;gap:3px}
 .invoice-workbench .workbench-payment-row label{font-size:10px!important;line-height:13px}
 .invoice-workbench .workbench-payment-row input,.invoice-workbench .workbench-payment-row select{width:100%;min-width:0;height:30px!important;min-height:30px!important;padding:4px 7px!important;font-size:12px!important}
 .invoice-workbench .workbench-payment-row>[data-add-split]{font-size:10px;white-space:nowrap;min-height:30px;padding:5px 8px;margin:0}
 .invoice-workbench .workbench-settlement>.payment-splits{margin:0}
 .invoice-workbench .workbench-settlement .split-row{margin:5px 0 0;align-items:end}
 .invoice-workbench .workbench-settlement .split-row label{display:grid;gap:3px;min-width:0}
 .invoice-workbench .workbench-settlement .split-row .btn{min-height:29px}
}
@media screen and (max-width:760px){
 .invoice-workbench .workbench-payment-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .invoice-workbench .workbench-payment-row input,.invoice-workbench .workbench-payment-row select{height:34px!important;min-height:34px!important;font-size:14px!important}
 .invoice-workbench .workbench-payment-row>[data-add-split]{grid-column:1/-1;justify-self:start;min-height:34px}
 .invoice-workbench .workbench-settlement .split-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}
}
@media screen{.invoice-workbench .workbench-customer-credit{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:5px 0;font-size:10px;border-top:1px solid #eee8f1}.invoice-workbench .workbench-customer-credit label{display:flex;gap:6px;align-items:center}.invoice-workbench .workbench-customer-credit input[type=checkbox]{width:14px;min-width:14px;height:14px;min-height:14px}.workbench-customer-credit [data-credit-preview]{color:#714b67;font-variant-numeric:tabular-nums}}

/* Walk-in name + WhatsApp number share the header row with Customer, Date and Terms (no stacking). */
.invoice-workbench #printed-customer-field:not([hidden]){display:contents}
@media screen and (min-width:761px){.invoice-workbench .document-fields:has(#printed-customer-field:not([hidden])){grid-template-columns:1.6fr 1.3fr 1.1fr .9fr .8fr!important}.invoice-workbench .document-fields>.field label,.invoice-workbench #printed-customer-field>.field label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Item rows fit inside the box (no sideways overflow); the last-price hint sits under the rate box. */
@media screen and (min-width:761px){
 .invoice-workbench #cart table,.invoice-workbench .entry-table table{min-width:0!important;width:100%}
 .invoice-workbench .entry-table th:nth-child(5),.invoice-workbench .entry-table th:nth-child(6){width:76px!important}
 .invoice-workbench .entry-table th:nth-child(8){width:96px!important}
}
@media screen{
 .invoice-workbench .customer-rate-inline{display:flex!important;flex-direction:column;align-items:stretch;gap:1px;min-width:0}
 .invoice-workbench .customer-rate-inline [data-last-customer-price]{font-size:10px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.75;text-align:right;min-width:0}
 .invoice-workbench .customer-rate-inline [data-last-customer-price] span{display:none}
 .invoice-workbench .customer-rate-inline [data-last-customer-price] b{font-weight:500}
 .invoice-workbench .customer-rate-inline [data-last-customer-price] b::before{content:'Last: '}
}
/* v168: laptop screens - give the items grid room; page scrolls instead of squeezing the grid */
@media screen and (max-height:900px){
 .invoice-workbench-layout.entry-with-summary,.invoice-workbench.document-editor{height:auto!important;max-height:none!important;grid-template-rows:auto!important}
 .invoice-workbench form{height:auto!important;max-height:none!important}
 .invoice-workbench .entry-body{flex:none!important;height:auto!important;min-height:0!important;max-height:none!important}
 .invoice-workbench .entry-table{height:auto!important;min-height:210px!important;max-height:min(46dvh,420px)!important;overflow-y:auto!important}
 .invoice-workbench .document-footer{flex:none!important;max-height:none!important;overflow:visible!important}
}
/* Save buttons sit beside the totals so the item list gets the height. */
@media screen{
 .invoice-workbench .workbench-metrics{grid-template-columns:repeat(4,minmax(0,1fr)) auto;align-items:center}
 .invoice-workbench .workbench-metrics>.workbench-save{border-top:0;padding:0;align-items:center}
}
@media screen and (max-width:760px){
 .invoice-workbench .workbench-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
 .invoice-workbench .workbench-metrics>.workbench-save{grid-column:1/-1;border-top:1px solid #eee8f1;padding-top:5px}
}
/* Short laptop screens: --items-height is the spare window height measured in invoice-workbench.js. */
@media screen and (min-width:761px) and (max-height:900px){
 .invoice-workbench .entry-table{flex:none!important;height:var(--items-height,210px)!important;max-height:none!important}
}
/* Vendor bill: one payment row, a tall item list and Save at the bottom, with no inner scroll area. */
@media screen{
 .workspace:has(.bill-workbench) .heading{margin-bottom:8px;align-items:center}.workspace:has(.bill-workbench) .heading p{display:none}
 .document-editor.bill-workbench{height:auto!important;max-height:none!important;min-height:0}
 .bill-workbench form{height:auto!important;max-height:none!important}
 .bill-workbench .entry-body{flex:none!important}
 .document-editor.bill-workbench .bill-tools{height:auto;display:flex;flex-wrap:wrap;gap:8px}
 .bill-workbench .bill-tools #bill-import-pdf{margin-left:auto}
 .document-editor.bill-workbench .document-footer{display:flex!important;flex-direction:column;align-items:stretch!important;gap:6px}
 .bill-workbench .bill-payment-row{display:grid;grid-template-columns:minmax(0,1.25fr) repeat(3,minmax(0,1fr)) auto;gap:8px;align-items:end}
 .bill-workbench .bill-payment-row>.field,.bill-workbench .document-footer .field{margin:0;min-width:0}
 .bill-workbench .document-footer .payment-splits{margin:0}.bill-workbench .payment-splits>summary{display:none}
 .bill-workbench .document-footer .entry-extra{margin:0;border-top:1px solid #eee8f1}
 .bill-workbench .document-footer #form-error:empty,.bill-workbench .issued-credit-note[hidden]{display:none}
 .bill-workbench .document-footer .entry-total{border-top:1px solid #eee8f1;padding-top:6px}
}
@media screen and (min-width:761px){
 .bill-workbench .entry-body{overflow:visible!important}
 .document-editor.bill-workbench .entry-table{flex:none!important;height:var(--items-height,210px)!important;min-height:210px!important;max-height:none!important;overflow:auto!important}
}
@media screen and (max-width:760px){
 .bill-workbench .bill-payment-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bill-workbench .bill-payment-row>[data-add-split]{grid-column:1/-1;justify-self:start}
}
@media screen and (min-width:761px){.main .workspace:has(.bill-workbench){padding-bottom:12px!important}}
@media screen and (max-width:760px){#app .document-editor.bill-workbench .entry-table{overflow-x:auto!important}}
