@media screen{
dialog[open]:not(.print-preview){display:flex;flex-direction:column;max-height:92dvh;overflow:hidden;width:min(940px,96vw);border:1px solid #dbe2ec;border-radius:16px;box-shadow:0 28px 90px #15213940}dialog[open].wide:not(.print-preview){width:min(1160px,97vw)}dialog:not(.print-preview) .modal-head{position:static;flex:none;padding:20px 26px;background:#fff;border-bottom:1px solid #e2e8f0}dialog:not(.print-preview) .modal-head h2{font-size:20px;color:#1e293b}dialog:not(.print-preview) #modalBody{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px 26px 0;background:#f7f9fc}dialog:not(.print-preview) .form-actions{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border-top:1px solid #dce4ef;padding:16px 26px;margin:24px -26px 0;box-shadow:0 -5px 18px #17243a05}dialog:not(.print-preview) label{color:#475569;font-size:13px;line-height:1.6}dialog:not(.print-preview) input,dialog:not(.print-preview) select{min-height:46px;border:1px solid #ccd6e4;background:#fff;border-radius:8px;font-size:14px}dialog:not(.print-preview) input:focus,dialog:not(.print-preview) select:focus{outline:3px solid #1246be20;border-color:#1246be}dialog:not(.print-preview) .grid{gap:18px;grid-template-columns:repeat(2,minmax(0,1fr))}.entry-intro{margin-bottom:22px}.entry-intro>span{font-size:11px;color:#1242b2;font-weight:700}.entry-intro p{margin:8px 0;color:#526178;line-height:1.8;font-size:13px}.entry-section{background:#fff;border:1px solid #dfe6ef;border-radius:12px;padding:20px;margin-bottom:18px}.entry-section-head{display:flex;gap:12px;align-items:start;padding-bottom:16px;margin-bottom:14px;border-bottom:1px solid #edf1f6}.entry-section-head>span{display:grid;place-items:center;background:#f0f4ff;color:#1243b5;border-radius:8px;min-width:34px;height:34px;font:600 12px Arial}.entry-section h3{font-size:15px;color:#24324a;margin:0 0 4px}.entry-section-head p{font-size:12px;line-height:1.7;color:#64748b;margin:0}.entry-summary{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap;background:#f3f7fc;border:1px solid #dde6f2;border-radius:8px;padding:13px 15px;font-size:12px;color:#475569}.entry-summary b{font-family:Arial,sans-serif;color:#17243a;font-size:16px}.save-status{margin-left:auto;color:#64748b;font-size:11px}.danger-zone{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border:1px dashed #e6b2c0;border-radius:8px;color:#9f1239;font-size:12px}.invoice-quick-entry{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0}.invoice-quick-entry small{color:#64748b;margin-right:auto}.invoice-context{background:#fff;border-color:#dfe6ef}.checkout-summary{background:#fff;border:1px solid #dfe6ef;box-shadow:0 4px 14px #14233605}.checkout-summary .grand-total{font-size:22px!important;color:#123fa9!important}.cart-line{background:#fff;border:1px solid #e2e8f0;margin:8px 0;border-radius:9px}.cart-line>div b{font-size:14px;color:#24324a}.cart-line small{color:#64748b}.cart-line>[data-line-total]{color:#17243a}.cart-heading{background:#eaf0f7;color:#526178}.payment-overview{background:linear-gradient(115deg,#133688,#1246be);padding:22px;border-radius:12px;color:#fff;margin-bottom:20px}.payment-overview h3{font:700 30px Arial;margin:12px 0;direction:ltr;text-align:right}.payment-overview span{font-size:14px}.payment-overview small{color:#e3ebff}.workflow-payment{max-width:650px}.stocktake-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.stocktake-guide>div{background:#f6f8fc;border:1px solid #e2e8f0;border-radius:10px;padding:18px}.stocktake-guide b{color:#123c9f;font-size:14px}.stocktake-guide p{color:#64748b;font-size:12px}.count-grid{display:grid;grid-template-columns:minmax(180px,3fr) 1fr 1.3fr 1fr;gap:16px;align-items:center;border-bottom:1px solid #edf1f6;padding:14px 0}.count-grid b{font-size:13px}.count-grid small{display:block;color:#64748b;font-size:11px}.count-heading{color:#64748b;font-size:12px}.count-grid input{text-align:center;width:100%}.count-book{font:600 16px Arial}.count-book small{display:none}.count-short{color:#be123c}.count-extra{color:#0f766e}.count-equal{color:#64748b}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:901px){.invoice-editor .checkout-summary{position:sticky;bottom:0;align-self:start}.invoice-editor .checkout-grid{grid-template-columns:minmax(0,1fr) 360px}}
@media(max-width:650px){dialog[open]:not(.print-preview){width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}dialog:not(.print-preview) .modal-head{padding:15px}.modal-head h2{font-size:17px!important}dialog:not(.print-preview) #modalBody{padding:16px 14px 0}dialog:not(.print-preview) .form-actions{margin:18px -14px 0;padding:12px 14px;gap:8px}.save-status{width:100%;font-size:10px}.form-actions button{flex:1;min-height:44px}.entry-section{padding:15px}.entry-section-head p{font-size:11px}dialog:not(.print-preview) .grid{grid-template-columns:1fr;gap:14px}dialog:not(.print-preview) input,dialog:not(.print-preview) select{font-size:16px}.invoice-quick-entry small{width:100%;font-size:11px}.invoice-context.grid{grid-template-columns:1fr 1fr!important}.stocktake-guide{grid-template-columns:1fr}.count-heading{display:none}.count-grid{grid-template-columns:1fr 1fr 1fr;gap:12px}.count-grid>div:first-child{grid-column:1/-1}.count-book small{display:block}.entry-summary{font-size:11px}.entry-summary b{font-size:14px}.payment-overview h3{font-size:26px}}
}
.count-document th:first-child{width:32%}.count-document th:nth-child(2){width:14%}
@media screen{.account-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.account-tabs button{display:flex;gap:12px;align-items:center}.account-tabs b{background:#ffffff30;border-radius:6px;padding:2px 8px;font-family:Arial}.account-tabs .ghost b{background:#e6e9f1}.account-kind{color:#123fa9}.account-tabs+section .toolbar{flex-wrap:wrap}}
#modal label[hidden]{display:none!important}
.account-statement .account-currency{margin-top:24px}.account-statement h3{color:#133688}.account-statement h4{margin:18px 0 8px;font-size:12px}.account-statement table{table-layout:fixed;width:100%}.account-statement td{overflow-wrap:anywhere}.account-statement .statement-note{font-size:10px;color:#666e78;line-height:1.7;margin-top:24px}.account-statement .cell-sub{white-space:normal}.account-statement .table-wrap{overflow:visible}
@media print{.account-statement h3,.account-statement h4{break-after:avoid}.account-statement tr{break-inside:avoid}.account-statement thead{display:table-header-group}.account-statement .account-currency{break-inside:auto}.account-statement th,.account-statement td{font-size:10px;padding:7px 5px}}
.account-statement .statement-empty{font-size:11px;color:#636b77;padding:10px 0;border-bottom:1px solid #eee}
.account-statement table th,.account-statement table td{width:auto!important}.account-statement table th:first-child,.account-statement table td:first-child{width:auto!important}.account-statement .document-party{margin-bottom:18px}.account-statement bdi{white-space:nowrap}
@media print{.account-statement .dual-logo-header{min-height:22mm;padding-bottom:3mm}.account-statement .document-heading{padding-top:3mm}.account-statement .document-date{margin:2mm 0}.account-statement .document-party{padding:3mm 0;margin:0 0 3mm;min-height:0}.account-statement .account-currency{margin-top:4mm}.account-statement h4{margin:3mm 0 2mm}.account-statement .document-signatures{margin-top:4mm}.account-statement .document-signatures span{height:5mm}.account-statement .document-footer{margin-top:3mm}.account-statement .statement-note{margin-top:3mm;font-size:7pt}.account-statement .statement-empty{padding:1mm 0;font-size:8pt}.account-statement td,.account-statement th{padding:1.3mm;font-size:8pt}}
/* Item wizard: progress, clickable path crumbs, big tiles (wrap on phones), segmented toggles, collapsed extra options; in-page confirm. */
@media screen{.item-wizard [hidden]{display:none!important}.wizard-head{margin-bottom:18px}.wizard-progress{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:12px}.wizard-progress i{height:6px;border-radius:9px;background:#e2e8f0}.wizard-progress i.done{background:#1246be}.wizard-meta{display:flex;align-items:baseline;gap:10px;margin:0}.wizard-meta b{background:#f0f4ff;color:#123c9f;border-radius:20px;padding:3px 11px;font-size:12px;white-space:nowrap}.wizard-meta strong{font-size:19px;color:#1e293b}
.wizard-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px;min-height:40px}.wizard-crumbs button{min-height:40px;padding:6px 14px;background:#fff;color:#133688;border:1px solid #d3dbec;border-radius:999px;font-size:14px;font-weight:600;box-shadow:none}.wizard-crumbs button:hover{border-color:#1246be}.wizard-crumbs button[aria-current]{background:#1246be;border-color:#1246be;color:#fff}.wizard-crumbs button.skip{color:#64748b;border-style:dashed;font-weight:500}.wizard-crumbs>span{color:#94a3b8;font-size:16px}.wizard-crumbs-empty{color:#94a3b8;font-size:12px}
.wizard-ask{font-size:15px;font-weight:600;color:#334155;margin:0 0 12px}.wizard-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.wizard-tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-height:96px;padding:14px 16px;text-align:right;background:#fff;color:#1e293b;border:1.5px solid #dbe3ee;border-radius:14px;box-shadow:0 2px 8px #0f172a0a;overflow-wrap:anywhere}.wizard-tile b{font-size:18px;line-height:1.4}.wizard-tile small{font-size:12px;font-weight:500;color:#64748b}.wizard-tile:hover{border-color:#1246be;box-shadow:0 6px 16px #1246be1a}.wizard-tile[aria-pressed=true]{border-color:#1246be;background:#f1f5ff;box-shadow:inset 0 0 0 1.5px #1246be}.wizard-tile.add{align-items:center;border-style:dashed;border-color:#a4b7e3;background:#fffafb;color:#1246be}.wizard-tile.add b{font-size:16px}.wizard-tile.skip{background:#f8fafc;border-style:dashed;color:#475569}.wizard-tile.skip b{font-size:15px}
.wizard-new{grid-column:1/-1;display:flex;gap:8px;align-items:end;flex-wrap:wrap;background:#fff;border:1.5px solid #1246be;border-radius:14px;padding:12px}.wizard-new label{flex:1 1 220px}.wizard-new button{min-height:46px}
.wizard-toggle{border:0;padding:0;margin:0;min-width:0}.wizard-toggle>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.wizard-toggle legend{padding:0;margin-bottom:5px;color:#475569;font-size:13px}.wizard-toggle label{position:relative;margin:0}.item-wizard .wizard-toggle input{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}.wizard-toggle span{display:flex;align-items:center;justify-content:center;min-height:48px;border:1.5px solid #ccd6e4;border-radius:10px;background:#fff;color:#334155;font-size:15px;font-weight:600}.wizard-toggle input:checked+span{border-color:#1246be;background:#f1f5ff;color:#123c9f;box-shadow:inset 0 0 0 1px #1246be}.wizard-toggle input:focus-visible+span{outline:3px solid #1246be40;outline-offset:2px}
.item-wizard label small{color:#64748b;font-size:11px}.wizard-more{border:1px solid #dfe6ef;border-radius:12px;background:#fff}.wizard-more summary{cursor:pointer;padding:14px 16px;font-weight:600;color:#334155;min-height:48px}.wizard-more summary small{margin-right:8px;font-weight:400}.wizard-more>.grid{padding:0 16px 16px}.item-wizard .danger-zone{margin-top:18px}
.page-confirm{position:absolute;inset:0;z-index:40;display:grid;place-items:center;padding:16px;background:#0f172a66}.page-confirm>div{width:min(420px,100%);background:#fff;border-radius:14px;padding:22px;box-shadow:0 24px 60px #0f172a40}.page-confirm p{margin:0 0 18px;font-size:15px;line-height:1.8;color:#1e293b}.page-confirm>div>div{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.page-confirm button{min-height:44px}
@media(max-width:650px){.wizard-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wizard-tile{min-height:88px;padding:12px}.wizard-tile b{font-size:16px}.wizard-meta strong{font-size:17px}.wizard-crumbs button{font-size:13px;padding:6px 12px}.wizard-new label{flex-basis:100%}.wizard-new button,.page-confirm button{flex:1}.item-wizard .form-actions .save-status{display:none!important}.item-wizard .form-actions [type=submit]{flex:1 1 40%;order:-1}}}
