:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#1a2c3d;background:#f3f5f8;font-size:15px}*{box-sizing:border-box}body{margin:0;display:grid;grid-template-columns:245px 1fr;min-height:100vh}aside{background:#132c3d;color:#fff;padding:32px 20px;display:flex;flex-direction:column;gap:40px}.brand{font-size:25px;letter-spacing:3px;font-weight:750}.brand span{display:block;font-size:14px;letter-spacing:0;font-weight:400;color:#afc6d7;margin-top:8px}nav{display:grid;gap:8px}nav[hidden]{display:none}nav button{background:transparent;color:#cedde8;border:0;text-align:left;padding:13px 12px}nav button:hover,nav button.active{background:#274659;color:white}.edition{margin-top:auto;font-size:12px;color:#aac0cf;line-height:1.7}main{padding:34px 42px;max-width:1500px;width:100%}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}h1{font-size:28px;font-weight:650;margin:0}.eyebrow{font-size:11px;font-weight:750;letter-spacing:2px;color:#658093}h2{margin:0 0 20px;font-size:19px}h3{font-size:16px;margin:0 0 12px}.panel{background:white;border:1px solid #dbe2e9;border-radius:10px;padding:25px;margin-bottom:22px}.narrow{max-width:460px}.columns{display:grid;grid-template-columns:minmax(300px,1fr) minmax(300px,1fr);gap:24px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.stat b{display:block;font-size:29px;margin-top:12px;color:#146c68}.muted,small{color:#627787}label{display:block;font-size:13px;font-weight:600;margin-bottom:15px}input,select,textarea{display:block;width:100%;padding:11px 12px;margin-top:7px;border:1px solid #bfccd7;border-radius:5px;font:inherit;background:#fff;color:#152c3e}input[type=checkbox]{display:inline;width:auto;margin-right:9px}button{font:inherit;cursor:pointer;border-radius:5px;border:1px solid #bac9d5;background:white;color:#17394d;padding:10px 15px}button.primary{background:#146c68;color:white;border-color:#146c68}button:disabled{opacity:.5;cursor:wait}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}table{border-collapse:collapse;width:100%;font-size:14px}th,td{padding:13px 9px;border-bottom:1px solid #e1e7ed;text-align:left;vertical-align:top}th{font-size:12px;color:#627787;font-weight:650}#message{border-radius:6px;padding:14px 18px;background:#e3f1ed;border:1px solid #a3cec0}#message.error{background:#fff0ed;border-color:#dfafa1}code{display:block;overflow-wrap:anywhere;white-space:normal;padding:14px;background:#eff4f7;font-size:16px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.scroll{overflow:auto}.badge{font-size:12px;padding:4px 8px;border-radius:4px;background:#e4efeb;color:#225947}.badge.blocked{background:#fae9e4;color:#8b4234}@media(max-width:1000px){body{grid-template-columns:200px 1fr}main{padding:25px}.columns,.stats{grid-template-columns:1fr}}@media(max-width:650px){body{display:block}aside{padding:18px;gap:16px}nav{grid-template-columns:1fr 1fr}.edition{display:none}main{padding:20px}header{display:block}}

.logo-editor{padding:20px 0;border-top:1px solid #dbe2e9}.logo-editor img{display:block;max-width:240px;max-height:110px;object-fit:contain;margin:15px 0}.logo-editor img[hidden]{display:none}

.key-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.key-preview button{min-height:95px;display:flex;flex-direction:column;justify-content:space-between}.key-preview .selected{outline:3px solid #146c68}.key-color-green{background:#dceee5!important}.key-color-blue{background:#dceafa!important}.key-color-yellow{background:#fff2ba!important}.key-color-rose{background:#f9e0e5!important}.key-color-purple{background:#ebdff6!important}.key-color-neutral{background:#f0f2f3!important}

/* The same geometry is used in the office preview and in the cash print view. */
.bon-designed .bon-heading{text-align:center;margin-bottom:20px;break-inside:avoid}
.bon-designed .bon-heading h2{font-size:22px;line-height:1.25;margin:0 0 8px;text-align:center;overflow-wrap:anywhere}
.bon-designed .bon-logo{display:block;max-width:65%;width:auto;max-height:90px;height:auto;margin:0 auto 14px;object-fit:contain}
.bon-designed .bon-heading .bon-address{font-size:13px;line-height:1.5;margin:0;text-align:center;text-wrap:balance}
.bon-designed .bon-heading .bon-contact{font-size:11px;line-height:1.5;margin:4px 0 0;text-align:center;overflow-wrap:anywhere}
.bon-designed .bon-tax-id{display:table;max-width:100%;box-sizing:border-box;margin:17px auto 0;padding:8px 16px;border:1px solid #c4d4cd;border-radius:5px;text-align:center}
.bon-designed .bon-tax-id span{display:block;font-size:10px;line-height:1.4}
.bon-designed .bon-tax-id strong{display:block;font-size:15px;line-height:1.6;font-weight:600;overflow-wrap:anywhere}
.bon-designed .bon-metadata{margin:0 0 17px;font-size:12px;line-height:1.7;break-inside:avoid}
.bon-designed .bon-metadata p{margin:0}
.bon-designed .bon-total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:14px 0;padding:12px 0;border-top:1px solid #aabfb4;border-bottom:1px solid #aabfb4;break-inside:avoid}
.bon-designed .bon-total span{font-size:14px}
.bon-designed .bon-total strong{font-size:26px;line-height:1.2;text-align:right;margin-left:auto;font-weight:700;white-space:nowrap}
.bon-designed .bon-tax-section{margin-top:19px;break-inside:avoid}
.bon-designed .bon-tax-section h3{font-size:12px;margin:0 0 7px}
.bon-designed .bon-tax{font-size:11px;width:100%;border-collapse:collapse}
.bon-designed .bon-tax th,.bon-designed .bon-tax td{text-align:right;padding:3px 0;font-variant-numeric:tabular-nums}
.bon-designed .bon-tax th:first-child,.bon-designed .bon-tax td:first-child{text-align:left}
.bon-designed .bon-farewell{text-align:center;margin:22px 0 18px}
.bon-designed .bon-farewell .bon-thanks{font-size:14px;font-weight:600;margin:0;line-height:1.5}
.bon-designed .bon-farewell .bon-free-text{font-size:12px;line-height:1.55;margin:12px 0 0;white-space:pre-line;overflow-wrap:anywhere}
.bon-designed .bon-test-note{display:block;font-size:10px;text-align:center;line-height:1.4;margin:12px 0 0}
@media print{.bon-designed .bon-total strong{font-size:26px}.bon-designed .bon-heading{color:black}.bon-designed .bon-tax-id{border-color:#777}}
#medlix-layout .mx-tabs .bon-page-tab{font-size:14px;font-weight:600;line-height:1.1;min-height:40px;max-height:44px;padding:3px 7px;overflow-wrap:anywhere;overflow:hidden}
#medlix-layout .mx-tabs .bon-page-arrow{flex:0 0 34px;font-size:25px;padding:0}
#medlix-layout .mx-tabs #catalog-group{flex:0 1 160px;max-width:23%;font-size:12px;min-height:40px}

.receipt-settings{border-top:1px solid #ccdcd3;padding:22px 0;margin-top:22px}.receipt-settings p{font-size:13px;color:#50625b}#office-receipt-paper{max-width:420px;padding:26px;margin:24px auto 0;border:1px solid #d7e2dc;border-radius:4px;color:#172d29;background:white;font-family:Arial,sans-serif;font-size:14px}#office-receipt-paper .mx-paper-row{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #e2e9e5}#office-receipt-paper .mx-paper-row small{display:block;font-size:12px}.bon-code-placeholder{width:130px;margin:12px auto;padding:32px 8px;border:1px dashed #9eafa6;text-align:center;font-size:12px}.bon-code-placeholder small{font-size:10px}

.import-counts{display:flex;flex-wrap:wrap;gap:1.5rem}.import-counts strong{display:block;font-size:1.6rem;color:#166b69}#csv-preview small{display:block;margin-top:.35rem;color:#526975}#csv-mapping details{margin:1rem 0}#csv-mapping summary{cursor:pointer;font-weight:600;padding:.6rem 0}

/* Article selection remains usable with several thousand imported products. */
.layout-search-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
.layout-article-result{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:72px;text-align:left;padding:12px 14px}
.layout-article-result:hover,.layout-article-result:focus-visible{background:#eef7f3;border-color:#146c68;outline:2px solid #146c68}
.layout-article-result strong,.layout-article-result small{display:block;overflow-wrap:anywhere}
.layout-article-result small{margin-top:5px;font-size:12px}
.layout-article-price{flex-shrink:0;text-align:right}.layout-article-price .inactive{color:#8b4234}
.layout-selected-article{padding:14px 16px;border-left:4px solid #146c68;background:#edf5f1;margin:8px 0 18px}
.layout-selected-article>span{display:block;font-size:12px;color:#526975;margin-bottom:4px}
.layout-selected-article>strong{display:block;margin-bottom:6px}.layout-selected-article p{margin-bottom:0;font-size:13px}
@media(max-width:850px){.layout-search-results{grid-template-columns:1fr}}

.promotion-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin-bottom:24px}.promotion-groups label{margin:0}

/* A selected article replaces the long list instead of opening thousands of rows below it. */
#article-editor[hidden],#article-list[hidden]{display:none!important}
#article-list .scroll{max-height:55vh;overflow:auto}
#article-list thead th{position:sticky;top:0;background:white;z-index:1}
#article-editor{scroll-margin-top:20px}
.article-editor-toolbar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:18px}
.article-editor-toolbar p{margin:0;font-weight:600;overflow-wrap:anywhere}


/* The office owns the only navigation and the task area. */
#nav [hidden]{display:none!important}#nav details{border-top:1px solid #365061;padding-top:10px;margin-top:4px}#nav summary{padding:10px 12px;cursor:pointer;color:#c5d5df;font-size:13px}#nav details button{display:block;width:100%}#nav{gap:3px}body>aside{position:sticky;top:0;height:100vh;overflow:auto;gap:24px}body>main{min-width:0}#office-workspace{min-width:0;color:#1a2c3d}#office-workspace header{display:block}#office-workspace input[type=radio]{width:auto;display:inline}#office-workspace .panel{margin-bottom:20px}#office-workspace .page-head h1{font-size:21px}.office-task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.office-task-grid button{min-height:74px;text-align:left;font-weight:600;background:#f7fafb}.office-tasks h2{margin-bottom:18px}
@media(max-width:750px){body>aside{position:static;height:auto;overflow:visible}.office-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#nav details{grid-column:1/-1}}
@media print{body{display:block;background:white}body>aside,body>main>header,#message,#inventory-status{display:none!important}body>main{padding:0;max-width:none}#content,#office-workspace{padding:0;margin:0}}

.key-preview button{min-width:0;overflow-wrap:anywhere}.key-preview button>*{min-width:0;max-width:100%}

.bon-designed .bon-heading{display:block;width:100%;min-width:0}.bon-designed .bon-heading>*{max-width:100%}.bon-designed .bon-logo{margin-left:auto;margin-right:auto}.office-document{max-width:800px;margin:auto}.office-document .document-row{display:flex;justify-content:space-between;gap:20px;margin:12px 0}.office-document .document-row strong,.office-document td.amount,.office-document th.amount{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.office-document .document-total{border-top:2px solid #254d42;border-bottom:1px solid #254d42;padding:14px 0;font-size:24px}.office-document .signature-space{height:80px;border-bottom:1px solid #333;margin:30px 0 8px}.document-actions{display:flex;gap:12px;margin:20px 0}@media print{body.print-office-document{display:block}body.print-office-document>aside,body.print-office-document main>header,body.print-office-document #message,body.print-office-document #content>*:not(#event-detail),body.print-office-document .document-actions{display:none!important}body.print-office-document main{padding:0;max-width:none}.office-document{border:0;padding:0}}

.office-document .document-signature{height:25mm;border-bottom:1px solid #333;margin-top:30px;break-inside:avoid}

.label-toolbar{position:sticky;top:0;z-index:10;box-shadow:0 2px 8px #0002}.label-toolbar .actions{margin:6px 0}.label-toolbar label{margin:8px 0}.label-result{display:flex;gap:15px;align-items:center;padding:12px 0;border-bottom:1px solid #ddd}.label-result>span{flex:1}.label-money{text-align:right;white-space:nowrap}[data-label-quantity]{min-width:70px}

.claim-amount{text-align:right;white-space:nowrap}.pending-claims{margin:16px 0;padding:16px;border:1px solid #b78b38;background:#fff8e8;border-radius:8px}.pending-claim{display:flex;justify-content:space-between;gap:16px;margin:8px 0}.pending-claim strong{text-align:right;white-space:nowrap}

.product-lookup{padding:16px;background:#f1f7f4;border:1px solid #cadfd2;border-radius:10px;margin:16px 0}.product-lookup h3{margin-top:0}.product-lookup .actions{align-items:end;flex-wrap:wrap}.product-lookup [data-lookup-result]{overflow-wrap:anywhere}.product-lookup input[type=checkbox]{width:auto}

.analysis-controls{position:sticky;top:0;z-index:3;box-shadow:0 3px 12px #142d3d18}.analysis-controls .actions{align-items:end;flex-wrap:wrap}.analysis-table{overflow:auto}.analysis-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.analysis-bar{height:18px;min-width:0;background:#087c83;border-radius:3px}.analysis-table th{white-space:nowrap}.analysis-table td:nth-child(3){min-width:80px}#analytics-nav summary{font-weight:bold}
/* Office billing: compact workflow, secondary configuration collapsed. */
.billing-dates{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:16px}
.billing-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.billing-details{margin-top:24px}.billing-review{padding:20px 0;border-top:1px solid #d5ded8;margin-top:24px}
.billing-pdf{width:100%;height:75vh;min-height:420px;border:1px solid #d5ded8;border-radius:8px;background:#fff}
.billing-error{margin-top:20px;padding:20px;background:#fff3ec;border-left:4px solid #a44720}.billing-error p,#message{white-space:pre-line}
#customer-billing{border-top:1px solid #d5ded8;margin:20px 0;padding-top:12px}
#billing-settings details{margin:18px 0}#billing-settings summary,#customer-billing summary,.billing-details summary{cursor:pointer;padding:10px 0}
@media(max-width:600px){.billing-dates{grid-template-columns:1fr}.billing-pdf{min-height:320px}}
.billing-preview-scroll{max-height:680px;overflow:auto;background:#eef1f4;border:1px solid #d5ded8;border-radius:8px;padding:20px}
.billing-paper{max-width:800px;margin:auto;background:white;padding:35px;color:#243d36;font-size:14px}
.billing-paper header{display:block;text-align:center;border-bottom:1px solid #d5ded8;padding-bottom:18px;margin-bottom:24px}.billing-paper header p{margin:4px 0}.billing-logo{max-width:160px;max-height:65px}
.billing-address{display:flex;justify-content:space-between;gap:20px;margin-bottom:24px}.billing-paper td{padding:12px 6px}.billing-paper th{background:#f0f4f1}.billing-total{font-size:20px}.billing-total strong{margin-left:24px}
.billing-taxes{width:auto;margin:0 0 24px auto}.billing-taxes th,.billing-taxes td{text-align:right;white-space:nowrap}
.billing-paper footer{font-size:11px;border-top:1px solid #d5ded8;margin-top:30px;padding-top:12px;overflow-wrap:anywhere}
@media(max-width:700px){.billing-preview-scroll{padding:5px}.billing-paper{padding:15px;min-width:520px}}
.hw-top{position:sticky;top:0;z-index:3;background:#fff}.hw-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.hw-tabs button[aria-pressed=true]{background:#163c48;color:white}.hw-tabs button{min-height:48px}.hw-top label{max-width:520px}#hw-status{font-weight:600}#hw-unsaved{min-height:1.4em}

.hw-check{display:flex;align-items:center;gap:12px;margin:20px 0}.hw-check input{width:22px;height:22px}.hw-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.hw-image{border:1px solid #c7d8dc;border-radius:8px;padding:10px;overflow:hidden}.hw-image img{width:100%;height:110px;object-fit:contain;background:#e7eeee}.hw-image span{display:block;overflow-wrap:anywhere;margin:8px 0}.hw-image button{padding:8px;margin:2px}

.hw-top{position:static}

/* Office article workflow */
.article-guided{max-width:880px;margin:auto}.article-steps{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.article-steps button{flex:1;min-width:170px}.article-steps .active{background:#176f6b;color:white}.article-guided [data-article-panel]{max-width:660px}.article-guided [data-article-panel]>label{margin:16px 0}.article-guided [data-article-panel]>h3{margin-bottom:6px}.article-guided input,.article-guided select{min-height:44px}.article-save-hint{padding:12px;background:#eef5f3;border-radius:8px;margin-top:24px}.article-footer{justify-content:flex-end;position:sticky;bottom:0;background:white;padding:16px 0}.article-lookup-details{margin:18px 0;padding:12px;border:1px solid #d4dfdf;border-radius:8px}.article-lookup-details summary{cursor:pointer}.ua-heading,.ua-row{display:flex;align-items:center;justify-content:space-between;gap:24px}.ua-row{padding:20px 0;border-bottom:1px solid #d9e3e5}.ua-row p{margin:5px 0}.ua-code{font-size:1.2rem;overflow-wrap:anywhere}.ua-detail{max-width:820px;margin:auto}.ua-choice{display:flex;gap:12px;margin-top:30px;flex-wrap:wrap}.ua-empty{padding:35px 0;text-align:center}.ua-context{padding:10px;background:#e8f3f1}.article-guided [hidden],.ua-row[hidden]{display:none!important}@media(max-width:650px){.ua-row,.ua-heading{align-items:stretch;flex-direction:column;gap:10px}.article-steps{display:grid}.article-footer{flex-wrap:wrap}}
/* Compact price maintenance. */
.price-workflow{max-width:1000px}.price-workflow #price-find{display:flex;gap:12px;align-items:end}.price-workflow #price-find label{flex:1}.price-workflow #price-editor:empty{display:none}.price-workflow #price-editor{border-top:1px solid #d8e2e9;margin-top:24px;padding-top:12px}.price-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:650px}.price-pair input{font-size:1.6rem;font-weight:700}.price-pair small{font-weight:400;color:#526773}.price-workflow #price-effect{padding:12px;background:#eef5f3;border-radius:6px}@media(max-width:650px){.price-pair{grid-template-columns:1fr}.price-workflow #price-find{display:block}}
