:root{--tblr-primary:#206bc4}
body{font-family:Inter,"Segoe UI",Arial,sans-serif}
.page{display:flex;flex-direction:row;min-height:100vh}
.app-main{flex:1;min-width:0;display:flex;flex-direction:column}
.app-main>.navbar{flex:none}
.app-main>.page-wrapper{flex:1;min-width:0}
.app-sidebar{width:238px;flex:0 0 238px;position:sticky;top:0;height:100vh;z-index:1020;display:flex;flex-direction:column;background:#fff;border-right:1px solid #e4e8ee}
.sidebar-head{height:57px;flex:none;padding:0 20px;display:flex;align-items:center;border-bottom:1px solid #e4e8ee}
.sidebar-body{padding:25px 12px 17px;flex:1;overflow-y:auto;display:flex;flex-direction:column}
.sidebar-label{padding:0 12px 9px;color:#8c98a8;font-size:10px;font-weight:700;letter-spacing:.1em}
.sidebar-overview-slot{margin:180px 4px 0;flex:1;min-height:150px;display:flex;align-items:flex-end}
.sidebar-link,.sidebar-logout{width:100%;min-height:40px;display:flex;align-items:center;gap:11px;padding:9px 12px;border:0;border-radius:6px;background:transparent;color:#4e5d70;text-decoration:none;text-align:left;font-size:13px;font-weight:500}
.sidebar-link.active{background:#eaf2fb;color:#206bc4;font-weight:600}
.sidebar-link:hover,.sidebar-logout:hover{background:#f1f5f9;color:#206bc4}
.sidebar-icon{width:18px;height:18px;flex:none}
.sidebar-footer{border-top:1px solid #e4e8ee;padding:11px 12px}
.sidebar-logout{cursor:pointer}
.sidebar-scrim[hidden]{display:none!important}
.sidebar-scrim{position:fixed;inset:0;z-index:1035;border:0;background:rgba(15,30,50,.45)}
@media(max-width:991.98px){.app-sidebar{position:fixed;left:0;transform:translateX(-100%);transition:transform .2s;box-shadow:12px 0 30px rgba(20,35,55,.12)}.app-sidebar.open{transform:translateX(0);z-index:1040}.sidebar-overview-slot{margin-top:32px;flex:none;min-height:0}}
.navbar-brand{display:flex;align-items:center;gap:7px;text-decoration:none;white-space:nowrap}
.homeone-mark{display:grid;place-items:center;width:32px;height:32px;background:#206bc4;color:#fff;border-radius:5px;font-weight:800;font-size:19px;letter-spacing:-2px}
.homeone-word{color:#172f50;font-size:16px;font-weight:750;letter-spacing:-.6px}
.brand-section{border-left:1px solid #aebdcd;padding-left:7px;color:#415675;font-size:12px;font-weight:600}
.page-header{padding-top:1.5rem}
.invoice-overview{width:100%;margin:0;padding:8px 10px;gap:4px;flex:none;border-color:#dce3eb;box-shadow:none}
.invoice-overview[hidden]{display:none!important}
.invoice-overview-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.invoice-overview-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px}
.invoice-overview-head strong{font-size:13px;color:#26374f}
.invoice-overview-refresh{border:0;background:transparent;color:#526984;font-size:21px;line-height:1;cursor:pointer}
.invoice-overview-refresh:hover,.invoice-overview-refresh:focus-visible{color:#206bc4}
.invoice-overview-year{grid-column:1/-1;width:100%;min-width:0;padding:4px 7px;border:1px solid #d9e0e8;border-radius:4px;background:#fff;color:#34445c;font-size:12px;cursor:pointer}
.invoice-overview-metric{display:grid;grid-template-columns:7px auto;column-gap:4px;align-items:center;min-width:0;color:#52647b;font-size:10px;line-height:1.2}
.invoice-overview-metric strong{grid-column:2;color:#273950;font-size:15px;line-height:1.1}
.invoice-overview-dot{width:7px;height:7px;border-radius:50%}
.invoice-overview-dot.is-blue{background:#206bc4}.invoice-overview-dot.is-amber{background:#e7a51b}
.page .container-xl{max-width:none;width:100%;padding-inline:clamp(16px,2vw,40px)}
.sync-action{position:relative;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.sync-buttons{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.sync-primary-button{min-height:44px;padding:10px 16px;font-size:14px;font-weight:600;white-space:nowrap}
.download-panel{position:absolute;z-index:60;top:calc(100% + 8px);right:0;width:min(340px,calc(100vw - 32px));display:grid;gap:10px;padding:16px;background:#fff;border:1px solid #d9e0e8;border-radius:7px;box-shadow:0 18px 35px rgba(30,48,75,.16);text-align:left}
.download-panel[hidden]{display:none!important}
.download-panel strong{font-size:14px}
.download-panel label{font-size:12px;font-weight:600}
.download-select-wrap{position:relative}
.download-select-wrap::after{content:"";position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:2px solid #526b8b;border-bottom:2px solid #526b8b;transform:translateY(-70%) rotate(45deg);pointer-events:none}
.download-select-wrap .form-select{width:100%;padding-right:38px;appearance:none;background-image:none;cursor:pointer}
.download-dates{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.download-dates>div{display:grid;gap:5px;min-width:0}
.download-panel .btn{justify-self:end}
.sync-action:focus-visible{outline:2px solid #206bc4;outline-offset:4px;border-radius:3px}
.sync-help{color:#64738b;font-size:11px;line-height:1.3;text-align:right}
.action-error-alert{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;padding:12px 16px;border:1px solid #efb8b8;border-radius:6px;background:#fff4f4;color:#8e2424}
.action-error-alert[hidden]{display:none}
.action-error-alert>div{min-width:0}
.action-error-title{display:block;margin-bottom:3px}
.action-error-preview{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70ch;font-size:12px}
.action-error-open{flex:none}
@media(max-width:640px){.action-error-alert{align-items:flex-start}.action-error-preview{max-width:52vw}}
@media(max-width:640px){.card-header{flex-wrap:wrap;gap:12px}.card-actions{width:100%;margin-inline:0;padding-inline-start:0}.sync-action{align-items:stretch;width:100%}.sync-buttons{display:grid;grid-template-columns:1fr;width:100%}.sync-primary-button{width:100%}.download-panel{position:static;width:100%}.sync-help{text-align:left}}
.table-scroll-top{height:18px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid #e4e9ef}
.table-scroll-top[hidden]{display:none!important}
.table-scroll-top>div{height:1px}
.table td,.table th{white-space:nowrap}
.table td:nth-child(4){min-width:210px}
.card-footer{flex-wrap:wrap}
#resultCount{white-space:nowrap}
.filter-toolbar{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.search-controls{display:flex;width:min(620px,100%);height:40px}
.quick-select{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.quick-select .btn{min-height:34px;white-space:normal}
.quick-select .btn:disabled{opacity:.55}
.search-controls .form-control{min-width:0;flex:1;border-radius:6px 0 0 6px}
.search-icon-button{position:relative;display:grid;place-items:center;width:44px;min-width:44px;padding:0;border-left:0;border-radius:0}
.search-icon-button:last-child{border-radius:0 6px 6px 0}
.search-icon-button[aria-expanded=true]{background:#e3eefa;color:#1769bc}
.filter-indicator{position:absolute;top:6px;right:5px;width:6px;height:6px;border-radius:50%;background:#1976d2}
.filter-indicator[hidden],.active-filters[hidden],.filter-panel[hidden],.custom-date-fields[hidden]{display:none!important}
.filter-panel{position:absolute;z-index:50;top:calc(100% - 1px);left:16px;width:min(500px,calc(100% - 32px));max-height:min(70vh,600px);overflow-y:auto;background:#fff;border:1px solid #d9e0e8;border-radius:0 0 7px 7px;box-shadow:0 18px 35px rgba(30,48,75,.16)}
.filter-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-bottom:1px solid #e4e9ef}
.filter-panel-head strong{font-size:13px}
.filter-panel-body{padding:18px}
.filter-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.custom-date-fields{display:grid;gap:16px}
.filter-grid .form-label{font-size:12px}
.active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex-basis:100%}
.filter-chip{display:inline-flex;align-items:center;gap:8px;padding:5px 9px;border-radius:5px;background:#e3eefa;color:#1769bc;font-size:11px}
.filter-chip button{border:0;background:transparent;color:inherit;font-size:16px;line-height:1;padding:0 0 1px;cursor:pointer}
@media(max-width:640px){.filter-grid,.custom-date-fields{gap:12px}.filter-panel-body{padding:14px}.filter-panel-head{padding:12px 14px}}
@media(max-width:640px){.quick-select{width:100%}.quick-select .btn{flex:1 1 145px}}
.doc-number{font-weight:600;color:#1d4f91}
.doc-type,.client-sub{display:block;color:var(--tblr-secondary-color);font-size:12px;margin-top:2px}
.client-name{font-weight:500}
.mark{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;color:var(--tblr-secondary-color)}
.mark.is-missing{font-family:inherit;font-size:11px;font-weight:700;color:#b42332;background:#fde8e8;padding:3px 6px;border-radius:4px;white-space:nowrap}
.qr-badge{font-size:12px}
.print-status{display:grid;gap:3px;width:150px;margin-inline:auto;font-size:11px;text-align:left}
.print-status-line{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:2px 5px;border-radius:3px}
.print-status-name{color:#66758c}
.print-status-value{font-weight:700;color:#b42332}
.print-status-value.is-printed{color:#17804b}
.row-actions{display:flex;justify-content:center;gap:6px}
.row-actions .btn{white-space:nowrap}
.selection-bar{position:fixed;z-index:1030;left:calc(50% + 119px);top:24px;transform:translate(-50%,-160%);transition:transform .2s;width:min(880px,calc(100% - 286px));display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff;border:1px solid #d9e1eb;border-radius:7px;box-shadow:0 10px 35px rgba(25,44,75,.18);padding:12px 14px;pointer-events:none;visibility:hidden}
.selection-bar.visible{transform:translate(-50%,0);pointer-events:auto;visibility:visible}
@media(max-width:991.98px){.selection-bar{left:50%;top:64px;width:calc(100% - 24px);max-height:calc(100dvh - 76px);overflow:auto}body.has-selection .page-header{padding-top:calc(var(--selection-bar-height,90px) + 32px)}}
.selection-count{flex:none}
.selection-count strong{display:block}
.selection-count .btn{font-size:11px;margin-top:2px}
.selection-actions{display:flex;align-items:stretch;gap:14px}
.selection-action-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px}
.selection-print{border-right:1px solid #dce4ed;padding-right:14px}
.selection-action-hint{max-width:220px;color:#8c4851;font-size:10px;line-height:1.2}
.selection-action-hint[hidden]{display:none!important}
.selection-group-label{font-size:10px;line-height:1;color:#66758c;font-weight:700;letter-spacing:.04em;white-space:nowrap}
.selection-print-buttons{display:flex;gap:6px}
.modal-backdrop{position:fixed;z-index:1050;inset:0;background:rgba(18,33,55,.65);display:flex;align-items:center;justify-content:center;padding:16px}
.modal-backdrop[hidden]{display:none}
.preview-modal{background:#fff;border-radius:7px;width:min(880px,100%);max-height:96vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 16px 60px rgba(0,0,0,.22)}
.preview-header,.preview-toolbar,.preview-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 20px}
.preview-header{border-bottom:1px solid #e6e9ee}
.preview-toolbar{padding-top:10px;padding-bottom:10px}
.preview-stage{background:#e9edf2;overflow:auto;padding:25px;display:flex;justify-content:center;align-items:flex-start;min-height:0}
.preview-footer{border-top:1px solid #e6e9ee}
.preview-footer>span{max-width:450px}
.print-confirmation[hidden]{display:none!important}
.print-confirmation{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;background:#eef5fc;border-top:1px solid #d6e6f6}
.print-confirmation strong,.print-confirmation small{display:block}
.print-confirmation small{margin-top:3px;color:#64738b;font-size:11px}
.print-confirmation-actions{display:flex;gap:7px;flex:none}
.toast-local{position:fixed;z-index:1100;right:20px;bottom:20px;background:#182b46;color:#fff;padding:10px 14px;border-radius:5px;opacity:0;pointer-events:none;transition:opacity .2s}
.toast-local.show{opacity:1}
#printRoot{display:none}
.label-qr svg{display:block;width:100%;height:100%}
@media(max-width:700px){.selection-bar{display:block}.selection-actions{margin-top:9px;display:flex;flex-wrap:wrap;gap:9px}.selection-print{border-right:0;padding-right:0}.selection-print-buttons{flex-wrap:wrap}.selection-actions .btn{white-space:normal;padding:4px;font-size:11px}.preview-header,.preview-toolbar,.preview-footer,.print-confirmation{padding:10px}.preview-footer,.print-confirmation{flex-wrap:wrap}.preview-stage{display:block;text-align:center;padding:12px}.invoice-paper{transform:scale(.55);transform-origin:top left;margin-bottom:-315px}.label-paper{transform:scale(.7);transform-origin:top left;margin-bottom:-142px}}

.invoice-paper{width:540px;min-height:700px;background:#fff;color:#172642;box-shadow:0 8px 30px rgba(30,50,80,.13);padding:34px 39px;flex:none;font-family:Arial,sans-serif;position:relative}.paper-top{display:flex;justify-content:space-between;gap:15px}.paper-logo{font:bold 24px "Segoe UI",Arial;color:#0b2c79;letter-spacing:-1.5px}.paper-logo span{color:#2684ed}.paper-type{text-align:right}.paper-type strong{display:block;font-size:13px;color:#142b58}.paper-type small{display:block;font-size:9px;color:#6b7d96;margin-top:5px}.paper-rule{height:2px;background:#1a67d4;margin:25px 0}.paper-parties{display:grid;grid-template-columns:1fr 1fr;gap:30px}.paper-label{font-size:8px;text-transform:uppercase;letter-spacing:1px;color:#8da0bb;font-weight:800;margin-bottom:7px}.paper-party strong{font-size:10px;display:block}.paper-party p{font-size:9px;line-height:1.55;color:#5e6c80;margin:4px 0}.paper-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;background:#f3f7fc;margin:26px 0 22px;padding:13px}.paper-meta small{display:block;font-size:8px;color:#8798ae;margin-bottom:5px}.paper-meta strong{font-size:10px}.paper-items{width:100%;min-width:0}.paper-items th{background:#f6f8fb;color:#5e7191;font-size:8px;padding:8px 6px}.paper-items td{font-size:9px;padding:10px 6px;border-bottom:1px solid #e7ebf1}.paper-items th:last-child,.paper-items td:last-child{text-align:right}.paper-totals{width:170px;margin:19px 0 0 auto;font-size:9px}.paper-totals div{display:flex;justify-content:space-between;margin:8px 0;color:#66768b}.paper-totals .grand{color:#1a315a;font-size:12px;font-weight:800}.paper-qr-block{position:absolute;left:39px;right:39px;bottom:32px;border-top:1px solid #dfe6ef;padding-top:15px;display:flex;align-items:center;gap:13px}.paper-qr{width:75px;height:75px;flex:none}.paper-qr-info strong{display:block;font-size:9px;margin-bottom:5px}.paper-qr-info p{font-size:8px;line-height:1.45;color:#6c7c92;margin:2px 0}.label-paper{width:380px;height:475px;background:#fff;box-shadow:0 8px 30px rgba(30,50,80,.13);padding:27px;flex:none;color:#111;font-family:Arial,sans-serif;display:flex;flex-direction:column;align-items:center;text-align:center}.label-top{border-bottom:2px solid #111;width:100%;padding-bottom:16px;display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:800}.label-top span{font-size:11px;font-weight:700}.label-title{font-size:10px;letter-spacing:2px;font-weight:800;margin-top:28px}.label-qr{width:215px;height:215px;margin-top:14px}.label-code{font-size:17px;font-weight:800;letter-spacing:1px;margin-top:20px}.label-client{font-size:11px;margin-top:8px}.label-bottom{margin-top:auto;border-top:2px solid #111;padding-top:12px;width:100%;font-size:8px;letter-spacing:.8px;text-align:left}
@media print{@page{margin:0}body{margin:0!important;background:#fff!important}.page,.selection-bar,.modal-backdrop,.toast-local{display:none!important}#printRoot{display:block!important}#printRoot .invoice-paper{width:210mm;height:297mm;min-height:297mm;box-shadow:none;padding:17mm 19mm;break-after:page;page-break-after:always}#printRoot .invoice-paper:last-child,#printRoot .label-paper:last-child{break-after:auto;page-break-after:auto}#printRoot .paper-qr-block{left:19mm;right:19mm;bottom:22mm}#printRoot .label-paper{width:100mm;height:150mm;box-shadow:none;padding:8mm;break-after:page;page-break-after:always}#printRoot .label-qr{width:60mm;height:60mm}#printRoot .label-top{font-size:13px}}


.missing-qr{display:grid;place-items:center;height:75px;border:1px dashed #d1dbea;background:#f8fafe;color:#b16b48;font-size:8px;text-align:center}


.mark{background:transparent;padding:0}
.page,.page-wrapper{background:#f6f8fd;color:#273142}
.page .text-secondary{color:#657286!important}
.app-sidebar{background:#fff;border-right:0}
.sidebar-head{background:#dfe8f1;border-bottom-color:#d8e1eb}
.sidebar-body,.sidebar-footer{border-right:1px solid #e1e6ed}
.sidebar-footer{border-top-color:#e1e6ed}
.sidebar-label{color:#6b7890}
.sidebar-link,.sidebar-logout{color:#303b4c}
.sidebar-link.active{background:#e3eefa;color:#1769bc}
.sidebar-link:hover,.sidebar-logout:hover{background:#edf4fb;color:#1769bc}
.app-main>.navbar{height:57px;min-height:57px;background:#dfe8f1;border-bottom:1px solid #d8e1eb}
.page-pretitle{color:#64738b}
.page-title,.card-title{color:#1f2a3a}
.card{background:#fff;border-color:#e0e5eb}
.card-header,.card-body,.card-footer{background:#fff;border-color:#e0e5eb!important}
.table>thead>tr>th{background:#fff;color:#344054;border-bottom-color:#dfe4ea}
.table>tbody>tr>td{background:#fff;color:#2d3747;border-bottom-color:#e7ebf0}
#invoices .table>tbody>tr:nth-child(even)>td{background:#f3f7fc}
#invoices .table-hover>tbody>tr:nth-child(even):hover>td{background:#eaf2fa}
.table>thead>tr>th:nth-child(n+7),.table>tbody>tr>td:nth-child(n+7){text-align:center!important}
.table-hover>tbody>tr:hover>td{background:#f7f8fa}
.table>tbody>tr.is-ignored>td{background:#f3f5f7}
.table-hover>tbody>tr.is-ignored:hover>td,.table>tbody>tr.is-ignored:focus-within>td{background:#e9edf1}
#invoices .table>tbody>tr.is-ignored>td{background:#f3f5f7}
#invoices .table-hover>tbody>tr.is-ignored:hover>td,#invoices .table>tbody>tr.is-ignored:focus-within>td{background:#e9edf1}
.order-state-badge{display:inline-block;margin-left:7px;padding:2px 6px;border-radius:4px;background:#e2e8ef;color:#43546b;font-size:11px;font-weight:700;vertical-align:middle;white-space:nowrap}
.order-state-badge.is-ready{background:#e6f1ff;color:#1769bc}
.order-restore{margin-left:7px;font-size:11px;vertical-align:middle;white-space:nowrap}
.form-control,.form-select{background:#fff;border-color:#d9e0e8;color:#283445}
.form-control::placeholder{color:#8b97a7}
.form-control:focus,.form-select:focus{background:#fff;border-color:#6ea5dd}
.btn-outline-secondary{color:#465466;border-color:#cbd4df}
.btn-outline-primary{color:#1769bc;border-color:#6ea5dd}
.btn-primary{background:#1976d2;border-color:#1976d2}
.doc-number{color:#1769bc}
.qr-badge.bg-green-lt{background:#e4f5eb!important;color:#17804b!important}
.qr-badge.bg-orange-lt{background:#fff0e3!important;color:#bd5b20!important}
.selection-bar{background:#fff;border-color:#dce4ed}
.preview-modal,.preview-header,.preview-toolbar,.preview-footer{background:#fff}
.preview-header,.preview-footer{border-color:#e0e5eb}
.preview-stage{background:#edf2f7}
.preview-modal .text-secondary{color:#657286!important}
.preview-modal .h3{color:#1f2a3a}
.live-invoice{height:auto;min-height:700px}
.live-invoice .paper-qr-block{position:static;margin-top:32px;overflow-wrap:anywhere}
.live-invoice .paper-party p{overflow-wrap:anywhere}
.live-invoice .paper-items{table-layout:fixed}
.live-invoice .paper-items th:first-child,.live-invoice .paper-items td:first-child{width:40%;overflow-wrap:anywhere}
.live-invoice .paper-items th:not(:first-child),.live-invoice .paper-items td:not(:first-child){text-align:right}
.live-invoice .paper-qr svg{width:100%;height:100%}
.live-label .label-title{margin-top:16px}
.live-label .label-qr{width:180px;height:180px;margin-top:10px}
.live-label .label-code{margin-top:10px}
.live-label .label-client{line-height:1.4;overflow-wrap:anywhere}
body.preview-open{overflow:hidden}
#invoicesView[hidden],#errorsView[hidden],#selectionBar[hidden]{display:none!important}
.error-card .card-header{justify-content:space-between;gap:16px}
.error-card-actions{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.error-toolbar{padding:16px 20px}
.error-search{display:flex;gap:10px;max-width:770px}
.error-search .form-control{min-width:0;flex:1}
.error-select-wrap{position:relative;width:245px;flex:none}
.error-select-wrap::after{content:"";position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:2px solid #64748b;border-bottom:2px solid #64748b;transform:translateY(-70%) rotate(45deg);pointer-events:none}
.error-select-wrap .form-select{width:100%;padding-right:38px;appearance:none;background-image:none}
.error-selection{display:flex;align-items:center;gap:12px;padding:10px 20px;border-bottom:1px solid #e4e9ef;font-size:12px}
.error-selection[hidden]{display:none!important}
.error-table{min-width:920px}
.error-table td{white-space:normal;vertical-align:top}
.error-table th:first-child,.error-table td:first-child{width:54px;min-width:54px;text-align:center;vertical-align:middle}
.error-table td:nth-child(3){min-width:150px}
.error-table .doc-number{white-space:nowrap}
.error-table .mark{overflow-wrap:anywhere}
.error-ineligible{display:block;margin-top:4px;color:#8c4851;font-size:11px}
.error-table-status{display:grid;justify-items:start;gap:4px;min-width:170px}
.error-status{display:inline-flex;align-items:center;border-radius:4px;padding:3px 7px;font-size:11px;font-weight:700;background:#edf2f8;color:#64748b}
.error-status.is-error{background:#fff0f0;color:#b7414b}
.error-status.is-success{background:#e5f5eb;color:#18784b}
.error-message-cell{min-width:260px;max-width:390px}
.error-message-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;color:#596a80;font-size:12px}
.error-message-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;flex:1;min-width:0;max-height:2.7em;line-height:1.35;overflow:hidden;overflow-wrap:anywhere}
.error-message-toggle{flex:none;white-space:nowrap}
.error-message-modal{width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3ec;border-radius:8px;background:#fff;color:#28354a;box-shadow:0 18px 55px rgba(15,30,50,.25)}
.error-message-modal::backdrop{background:rgba(18,33,55,.62)}
.error-message-modal-head,.error-message-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px}
.error-message-modal-head{border-bottom:1px solid #e4e9ef}
.error-message-modal-head h2{margin:2px 0;font-size:18px}
.error-message-modal-body{max-height:calc(100dvh - 190px);overflow:auto;padding:20px}
.error-message-modal-foot{justify-content:flex-end;border-top:1px solid #e4e9ef}
.error-message{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#28354a;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}
@media(max-width:760px){.error-search{flex-direction:column}.error-select-wrap{width:100%}.error-card-actions{align-items:stretch;width:100%}}
@media(max-width:430px){.error-toolbar{padding:12px}.error-selection{padding:10px 12px}}
@page{size:auto;margin:0}
@page invoice-page{size:A4;margin:0}
@page label-page{size:100mm 150mm;margin:0}
@media print{
  .page{display:none!important}
  .modal-backdrop,.selection-bar,.error-message-modal,.toast-local{display:none!important}
  #printRoot{display:block!important}
  #printRoot .live-invoice{page:invoice-page;height:auto;min-height:297mm;break-after:page;page-break-after:always}
  #printRoot .live-invoice:last-child{break-after:auto;page-break-after:auto}
  #printRoot .live-invoice .paper-qr-block{position:static;margin-top:12mm}
  #printRoot .live-invoice .paper-items thead{display:table-header-group}
  #printRoot .live-label{page:label-page}
  #printRoot .live-label .label-qr{width:48mm;height:48mm}
}
/* Invoice and receipt preview styles. */
.invoice-number-series {
  color: #22344f;
}

.doc-number {
  white-space: nowrap;
}

.error-message {
  display: block;
  padding: 12px 14px;
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #fff;
  color: #28354a;
}

.paper-issuer strong,
.paper-issuer p { overflow-wrap: anywhere; }
.issuer-placeholder { letter-spacing: .02em; overflow-wrap: anywhere; }
.live-invoice .paper-totals { width: 220px; }

.receipt-paper {
  box-sizing: border-box;
  width: 61mm;
  max-width: 100%;
  flex: none;
  padding: 0;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 30px rgba(30,50,80,.13);
  font: 10px/1.4 Arial, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
}
.receipt-paper * { box-sizing: border-box; }
.receipt-head, .receipt-footer { text-align: center; }
.receipt-head strong { display: block; font-size: 15px; line-height: 1.2; }
.receipt-head div { margin-top: 3px; font-weight: 700; }
.receipt-rule { border-top: 1px dashed #111; margin: 5px 0; }
.receipt-meta > div, .receipt-totals > div { display: flex; justify-content: space-between; gap: 8px; }
.receipt-meta > div + div, .receipt-totals > div + div { margin-top: 3px; }
.receipt-meta span, .receipt-totals span:first-child { flex: 1; }
.receipt-meta strong, .receipt-totals span:last-child { text-align: right; }
.receipt-party { margin: 5px 0; }
.receipt-issuer { font-weight: 600; }
.receipt-party > strong, .receipt-items > strong { display: block; margin-bottom: 3px; font-size: 9px; }
.receipt-party > div { min-width: 0; }
.receipt-item { padding: 2px 0; break-inside: avoid; border-bottom: 1px dotted #777; }
.receipt-items .receipt-item:last-child { border-bottom: 0; }
.receipt-shipping { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.receipt-shipping strong { flex: none; white-space: nowrap; }
.receipt-item-name { font-weight: 700; }
.receipt-item-details { display: flex; justify-content: space-between; gap: 8px; margin-top: 1px; }
.receipt-item-details span { min-width: 0; }
.receipt-item-details strong { flex: none; white-space: nowrap; }
.receipt-grand { font-size: 13px; }
.receipt-footer > div + div { margin-top: 2px; }
.receipt-footer { overflow-wrap: anywhere; font-size: 8px; line-height: 1.25; }
.receipt-footer .powered-by,.paper-qr-info .powered-by { margin-top: 7px; font-weight: 700; }
.paper-qr-info { min-width: 0; overflow-wrap: anywhere; }
.paper-qr-info > div { font-size: 8px; line-height: 1.3; margin-top: 2px; }
.receipt-qr { width: 22mm; height: 22mm; margin: 5px auto 2px; }
.receipt-qr svg { display: block; width: 100%; height: 100%; }

@media (max-width: 700px) {
  .preview-toolbar, .preview-toolbar .btn-group { flex-wrap: wrap; }
  .receipt-paper { margin-inline: auto; }
}

@page receipt-page { size: auto; margin: 0; }
@media print {
  #printRoot .live-receipt {
    page: receipt-page;
    width: 61mm;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    color: #000;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  #printRoot .live-receipt:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  #printRoot .live-receipt .receipt-totals,
  #printRoot .live-receipt .receipt-footer { break-inside: avoid; }
}
