:is(#orders-view,#completed-orders-view,#sales-order-party-edit-view,#order-details-view,#customers-view,#customer-forms-view,#quotations-view,#preparation-work-view,#preparation-completed-view,#deliveries-view,#reports-view,#prices-view,#pricing-lists-view,#finance-view,#finance-receipts-view,#finance-paid-view,#editor-view){color:var(--ui-text)}
/* Pricing entry owns its layout; shared modal primitives retain header/actions. */
#price-modal .price-bulk-modal-card{width:min(1400px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
#price-modal #price-form{display:flex;flex-direction:column;overflow:hidden;min-height:0}
#price-modal .price-bulk-scroll{min-height:0;overflow:auto;padding:8px;scrollbar-width:thin}
#price-modal .price-bulk-scroll>.field{margin:0 0 8px}
#price-modal .price-list-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:5px;max-height:145px;overflow:auto;padding:3px 0}
#price-modal .price-list-picker>label{display:flex;align-items:center;gap:7px;min-width:0;padding:5px 7px;border:1px solid var(--ui-line);border-radius:6px;background:#f8fafc;cursor:pointer}
#price-modal .price-list-picker input{width:14px;min-width:14px;height:14px;min-height:14px;margin:0;flex:0 0 14px}
#price-modal .price-list-picker>label:has(input:checked){border-color:#b7d4ee;background:var(--ui-blue-soft)}
#price-modal .price-list-picker span{min-width:0;display:grid;gap:2px}
#price-modal .price-list-picker b{font-size:calc(9px + var(--ui-font-step));overflow-wrap:anywhere}
#price-modal .price-list-picker small{color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));overflow-wrap:anywhere}
#price-modal .price-bulk-heading{display:flex;align-items:center;gap:8px;padding:5px 0}
#price-modal .price-bulk-heading>div{min-width:0;display:grid;gap:2px}
#price-modal .price-bulk-heading small{color:var(--ui-muted)}
#price-modal .price-bulk-heading>.button{margin-inline-start:auto;flex:0 0 auto}
#price-modal .price-bulk-table-wrap{width:100%;overflow:auto;border:1px solid var(--ui-line);border-radius:6px}
#price-modal .price-bulk-table{width:100%;table-layout:fixed}
#price-modal .price-bulk-table th:nth-child(1),#price-modal .price-bulk-table th:nth-child(9){width:3%}
#price-modal .price-bulk-table th:nth-child(2){width:35%}
#price-modal .price-bulk-table th:nth-child(n+3):nth-child(-n+6){width:11%}
#price-modal .price-bulk-table th:nth-child(7),#price-modal .price-bulk-table th:nth-child(8){width:7.5%}
#price-modal .price-bulk-table :is(th,td){padding:4px;overflow-wrap:anywhere}
#price-modal .price-bulk-table input{width:100%;min-width:0;padding-inline:4px;text-align:center}
#price-modal .price-bulk-table .smart-select-input{text-align:right;padding-left:30px}
#price-modal .price-bulk-table td:last-child{text-align:center}
#price-modal #price-form-message{flex:0 0 auto;margin:4px 8px}
#price-modal .modal-actions{position:static;margin:0;flex:0 0 auto}
@media(max-width:760px){#price-modal .price-bulk-modal-card{width:calc(100vw - 8px);max-height:calc(100dvh - 8px)}#price-modal .price-list-picker{grid-template-columns:1fr;max-height:120px}#price-modal .price-bulk-heading small{display:none}#price-modal .price-bulk-table{min-width:860px}#price-modal .price-bulk-scroll{padding:5px}}
#orders-view>.orders-reference-heading{display:none}
#orders-view>.orders-document-navigation,#preparation-work-view>.orders-document-navigation,#deliveries-view>.orders-document-navigation,#completed-orders-view>.orders-document-navigation,#sales-order-party-edit-view>.orders-document-navigation{height:30px;min-height:30px;margin-bottom:4px}
#sales-order-party-edit-view .sales-order-party-editor-card{overflow:hidden}
#sales-order-party-edit-view .sales-order-party-lookup{display:grid;grid-template-columns:minmax(190px,auto) minmax(360px,1fr) auto;align-items:end;gap:6px;padding:7px 8px;border-bottom:1px solid var(--ui-line);background:#fbfdff}
#sales-order-party-edit-view .sales-order-party-title{align-self:center;min-width:190px;line-height:1.2}
#sales-order-party-edit-view .sales-order-party-title h2{margin:0;font-size:calc(11px + var(--ui-font-step))}
#sales-order-party-edit-view .sales-order-party-title span{color:var(--ui-muted);font-size:calc(7.5px + var(--ui-font-step))}
#sales-order-party-edit-view .sales-order-party-lookup label{display:grid;gap:2px;margin:0;color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:800}
#sales-order-party-edit-view .sales-order-party-lookup textarea{min-height:48px;max-height:80px;resize:vertical}
#sales-order-party-edit-view .sales-order-party-message{margin:5px 8px;padding:5px 7px;border:1px solid #bbdecf;border-radius:6px;background:#effaf5;color:#267354;font-weight:800}
#sales-order-party-edit-view .sales-order-party-message.error{border-color:#ead0a6;background:#fff8e9;color:#8a5e17}
#sales-order-party-edit-view .sales-order-party-table{width:100%;min-width:1050px;table-layout:fixed}
#sales-order-party-edit-view .party-order-col{width:9%}#sales-order-party-edit-view .party-links-col{width:17%}#sales-order-party-edit-view .party-agent-col{width:18%}#sales-order-party-edit-view .party-customer-col{width:21%}#sales-order-party-edit-view .party-code-col{width:14%}#sales-order-party-edit-view .party-name-col{width:21%}
#sales-order-party-edit-view .sales-order-party-table td{padding:3px 4px;vertical-align:middle}
#sales-order-party-edit-view .sales-order-party-table td:first-child strong,#sales-order-party-edit-view .sales-order-party-table td:first-child small{display:block}
#sales-order-party-edit-view .sales-order-party-table td:first-child small{color:var(--ui-muted);font-size:calc(7px + var(--ui-font-step))}
#sales-order-party-edit-view .party-linked-documents{color:var(--ui-muted);font-size:calc(7.5px + var(--ui-font-step));line-height:1.35}
#sales-order-party-edit-view .sales-order-party-table :is(select,input){width:100%;height:29px;min-width:0}
#sales-order-party-edit-view .sales-order-party-actions{display:flex;justify-content:flex-start;padding:6px 8px;border-top:1px solid var(--ui-line);background:#fbfdff}
#orders-view>.orders-status-toolbar{height:var(--ui-subbar-h);min-height:var(--ui-subbar-h);padding-inline:4px}
#orders-view .orders-card>.card-toolbar{min-height:34px;padding:3px 5px;flex-direction:var(--orders-filter-layout,row);align-items:var(--orders-filter-align,center)}
#orders-view .orders-register-filter{grid-template-columns:minmax(240px,1.5fr) minmax(155px,.8fr) 125px 125px auto auto}
#orders-view .sales-orders-register-table{width:100%;min-width:0;table-layout:fixed}#orders-view .order-no-col{width:10%}#orders-view .order-date-col{width:12%}#orders-view .order-party-col{width:36%}#orders-view .order-lines-col{width:6%}#orders-view .order-status-col{width:13%}#orders-view .order-creator-col{width:15%}#orders-view .order-actions-col{width:8%}
:is(#orders-view,#completed-orders-view) .order-parties-cell strong{display:block}
:is(#orders-view,#completed-orders-view) .order-parties-cell small{display:block;margin-top:2px;color:var(--ui-muted);line-height:1.45;white-space:normal;overflow-wrap:anywhere}
#completed-orders-view .completed-orders-card>.card-toolbar{display:flex;align-items:center;gap:7px}#completed-orders-view .completed-orders-heading{display:flex;align-items:center;gap:6px;white-space:nowrap}#completed-orders-view .completed-orders-heading h2{margin:0;font-size:calc(11px + var(--ui-font-step))}#completed-orders-view .completed-orders-heading span{color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step))}#completed-orders-view .completed-orders-filter{margin-right:auto;grid-template-columns:minmax(230px,1fr) 120px 120px auto auto;width:min(760px,80%)}#completed-orders-view .completed-orders-table{min-width:920px;table-layout:fixed}
#preparation-work-view>.sales-cycle-toolbar,#deliveries-view>.sales-cycle-toolbar{height:var(--ui-subbar-h);min-height:var(--ui-subbar-h);padding-inline:5px}#preparation-work-view>.sales-cycle-toolbar h2,#deliveries-view>.sales-cycle-toolbar h2{margin:0;font-size:calc(11px + var(--ui-font-step))}#preparation-work-view>.sales-cycle-toolbar>.button,#deliveries-view>.sales-cycle-toolbar>.button{margin-right:auto}
#preparation-work-view .cutting-orders-register-table{width:100%;min-width:0;table-layout:fixed}#preparation-work-view .cutting-no-col{width:14%}#preparation-work-view .cutting-date-col{width:14%}#preparation-work-view .cutting-orders-col{width:37%}#preparation-work-view .cutting-status-col{width:12%}#preparation-work-view .cutting-creator-col{width:15%}#preparation-work-view .cutting-actions-col{width:8%}
#deliveries-view .delivery-register-table{width:100%;min-width:900px;table-layout:fixed}#deliveries-view .delivery-no-col{width:10%}#deliveries-view .delivery-order-col{width:10%}#deliveries-view .delivery-party-col{width:36%}#deliveries-view .delivery-date-col{width:14%}#deliveries-view .delivery-quantity-col{width:8%}#deliveries-view .delivery-status-col{width:14%}#deliveries-view .delivery-actions-col{width:8%}
:is(#orders-view .sales-orders-register-table,#preparation-work-view .cutting-orders-register-table,#deliveries-view .delivery-register-table) :is(th,td){font-size:calc(12px + var(--ui-font-step));line-height:1.45;padding:4px 5px;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
:is(#orders-view .sales-orders-register-table,#preparation-work-view .cutting-orders-register-table,#deliveries-view .delivery-register-table) small{display:block;font-size:calc(10px + var(--ui-font-step));line-height:1.45;white-space:normal;overflow-wrap:anywhere}
:is(#orders-view .sales-orders-register-table,#preparation-work-view .cutting-orders-register-table,#deliveries-view .delivery-register-table) :is(.order-number,.order-link){font-size:inherit;white-space:nowrap}
:is(#orders-view .sales-orders-register-table,#preparation-work-view .cutting-orders-register-table,#deliveries-view .delivery-register-table) :is(.status,.task-status){font-size:calc(10px + var(--ui-font-step));line-height:1.3;white-space:normal;max-width:100%}
#deliveries-view .workflow-banner{min-height:32px;height:auto;min-width:0}
#deliveries-view .workflow-banner>div:first-child{flex:0 0 auto}
#deliveries-view .workflow-banner .order-chips{flex:1 1 0;min-width:0;max-width:100%;padding-block:2px}
#deliveries-view .order-chip{flex:0 0 auto;max-width:none;min-height:25px;padding:3px 6px;border:1px solid var(--ui-line);border-radius:4px;background:#fff;color:var(--ui-navy);font:inherit;font-size:calc(8px + var(--ui-font-step));line-height:1.4;white-space:nowrap}
@media(max-width:620px){#orders-view .sales-orders-register-table{min-width:720px}#preparation-work-view .cutting-orders-register-table{min-width:650px}}
#order-details-view{min-width:0;overflow-x:hidden}
#order-details-view>.document-header{position:sticky;top:0;z-index:20;display:flex;align-items:center;height:var(--ui-subbar-h);min-height:var(--ui-subbar-h);gap:6px;padding-inline:4px;background:var(--ui-bg)}
#order-details-view .order-detail-header .document-title{flex:0 0 auto;min-width:0}
#order-details-view .order-detail-header h1{margin:0;font-size:calc(12px + var(--ui-font-step));line-height:1.15;white-space:nowrap}
#order-details-view .order-detail-header .document-header-actions{flex:1 1 auto;min-width:0;margin-right:auto;overflow-x:auto;scrollbar-width:thin}
#order-details-view .order-detail-header .document-header-actions>.button{flex:0 0 auto;height:27px;min-height:27px;padding-inline:8px;white-space:nowrap}
#order-details-view #order-detail-content,#order-details-view .order-detail-grid{display:grid;min-width:0;gap:5px}
#order-details-view .order-detail-grid>.content-card{min-width:0;margin:0}
#order-details-view .order-overview{padding:6px 7px}
#order-details-view .detail-metrics{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:4px;margin-bottom:6px}
#order-details-view .order-detail-metric{display:grid;align-content:center;min-width:0;min-height:48px;padding:5px 7px;border:1px solid var(--ui-line);border-radius:6px;background:#fbfdff;line-height:1.15}
#order-details-view .order-detail-metric :is(span,strong,small){display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#order-details-view .order-detail-metric span{color:var(--ui-muted);font-size:calc(7.5px + var(--ui-font-step));font-weight:800}
#order-details-view .order-detail-metric strong{margin-top:2px;color:var(--ui-text);font-size:calc(10px + var(--ui-font-step));font-weight:900}
#order-details-view .order-detail-metric small{margin-top:2px;color:var(--ui-muted);font-size:calc(7px + var(--ui-font-step));font-weight:700}
#order-details-view .order-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0}
#order-details-view .order-flow>div{display:flex;align-items:center;min-width:0;min-height:31px;gap:5px;padding:4px 6px;border:1px solid var(--ui-line);border-radius:6px;background:#f7f9fb;color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:800}
#order-details-view .order-flow i{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border:1px solid #bdcbd4;border-radius:50%;background:#fff;color:#718592;font-size:calc(7.5px + var(--ui-font-step));font-style:normal;font-weight:900}
#order-details-view .order-flow span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#order-details-view .order-flow>div.done{border-color:#b9d8c7;background:#eef8f2;color:#246b4e}
#order-details-view .order-flow>div.done i{border-color:#6eae90;background:#d8efe2;color:#175c42}
#order-details-view :is(.order-detail-lines,.order-related)>.card-toolbar{min-height:34px;padding:3px 6px}
#order-details-view :is(.order-detail-lines,.order-related)>.card-toolbar h2{font-size:calc(10.5px + var(--ui-font-step));white-space:nowrap}
#order-details-view .order-related>.card-toolbar>.button{height:27px;min-height:27px;padding-inline:8px;white-space:nowrap}
#order-details-view .order-detail-lines .table-wrap{max-width:100%;overflow:auto}
#order-details-view .order-detail-lines table{width:100%;min-width:900px;table-layout:fixed}
#order-details-view .order-detail-lines th:nth-child(1){width:42px}
#order-details-view .order-detail-lines th:nth-child(2){width:18%}
#order-details-view .order-detail-lines th:nth-child(3){width:24%}
#order-details-view .order-detail-lines th:nth-child(4){width:11%}
.sales-order-basis-card{width:min(560px,100%);max-height:calc(100dvh - 20px)}
#sales-order-basis-form{display:flex;flex-direction:column;min-height:0}
.sales-order-basis-content{overflow:auto;overscroll-behavior:contain;padding:8px 10px;min-height:0}
.sales-order-basis-columns,.sales-order-basis-line{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,.8fr) minmax(0,1fr);gap:8px;align-items:center;padding:5px 8px}
.sales-order-basis-columns{background:var(--ui-panel);color:var(--ui-muted);border-bottom:1px solid var(--ui-line);font-weight:600}
.sales-order-basis-line{border-bottom:1px solid var(--ui-line);overflow-wrap:anywhere}
.sales-order-basis-line small{display:block;color:var(--ui-muted)}
.sales-order-basis-line select{width:100%;min-width:0;height:29px;min-height:29px}
.sales-order-basis-card .modal-actions{flex:none}
@media(max-width:600px){
  .sales-order-basis-columns,.sales-order-basis-line{grid-template-columns:minmax(0,1.35fr) minmax(0,.75fr) minmax(0,1fr);gap:5px;padding-inline:4px}
}
#order-details-view .order-detail-lines th:nth-child(5){width:12%}
#order-details-view .order-detail-lines th:nth-child(6){width:12%}
#order-details-view .order-detail-lines th:nth-child(7){width:10%}
#order-details-view .order-detail-lines th:nth-child(8){width:13%}
#order-details-view .order-detail-lines :is(th,td){padding:4px 5px;vertical-align:middle}
#order-details-view .order-detail-lines td>small{display:block;margin-top:2px;color:var(--ui-muted);font-size:calc(7px + var(--ui-font-step))}
#order-details-view .order-detail-lines .specs-cell{line-height:1.35;overflow-wrap:anywhere;white-space:normal}
#order-details-view .order-detail-lines .task-status{display:inline-flex;align-items:center;max-width:100%;min-height:21px;padding:2px 5px;line-height:1.25;overflow-wrap:anywhere;white-space:normal}
#order-details-view .related-docs{display:grid;gap:3px;padding:5px 6px}
#order-details-view .related-docs>div{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,auto) auto;align-items:center;gap:6px;min-width:0;min-height:31px;padding:4px 6px;border:1px solid var(--ui-line);border-radius:6px;background:#fbfdff}
#order-details-view .related-docs>div>span{min-width:0;overflow:hidden;color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));text-overflow:ellipsis;white-space:nowrap}
#order-details-view .related-docs .order-link{justify-self:start;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#order-details-view .related-docs .status{white-space:nowrap}
#order-details-view .order-related>.empty-report{margin:0;padding:12px 8px}
#customers-view>.page-heading,#customer-forms-view>.page-heading,#quotations-view>.page-heading,#reports-view>.page-heading,#prices-view>.page-heading,#finance-view>.page-heading,#finance-receipts-view>.page-heading,#finance-paid-view>.page-heading{height:var(--ui-subbar-h);min-height:var(--ui-subbar-h)}
:is(#prices-view,#pricing-lists-view) .catalog-tabs,#finance-view .accounting-module-tabs,#finance-receipts-view .accounting-module-tabs,#finance-paid-view .accounting-module-tabs{margin-bottom:4px}
#customers-view .toolbar-actions,#quotations-view .toolbar-actions,:is(#prices-view,#pricing-lists-view) .catalog-heading-actions,#finance-view .toolbar-actions,#finance-receipts-view .toolbar-actions,#finance-paid-view .toolbar-actions{margin-right:auto}
#customers-view #customers-search{width:260px}#customers-view .customer-tree-table{min-width:980px;table-layout:fixed}#customers-view .customer-tree-table th:nth-child(1){width:31%}#customers-view .customer-tree-table th:nth-child(2){width:12%}#customers-view .customer-tree-table th:nth-child(3){width:10%}#customers-view .customer-tree-table th:nth-child(4){width:10%}#customers-view .customer-tree-table th:nth-child(5),#customers-view .customer-tree-table th:nth-child(6),#customers-view .customer-tree-table th:nth-child(7){width:9%}#customers-view .customer-tree-table th:nth-child(8){width:10%}
#customers-view .customer-tree-row>td{height:37px;padding-block:2px;vertical-align:middle}#customers-view .customer-tree-parent>td{border-top:1px solid #bfd2df;border-bottom:1px solid #bfd2df;background:#edf6fb;color:#183f59}#customers-view .customer-tree-parent>td:first-child{box-shadow:inset -3px 0 #277db6}#customers-view .customer-tree-unassigned>td{background:#fff8e8;color:#72551d}
#customers-view .customer-tree-name>div{position:relative;display:grid;grid-template-columns:18px auto minmax(130px,1fr);align-items:center;gap:6px;min-width:0;padding-right:calc(var(--customer-depth) * 23px + 2px)}#customers-view .customer-tree-rail{position:absolute;top:-20px;right:calc(var(--customer-depth) * 23px - 9px);width:18px;height:37px;border-right:1px solid #b8cad6;border-bottom:1px solid #b8cad6;border-radius:0 0 5px 0;pointer-events:none}#customers-view .customer-tree-parent .customer-tree-rail{display:none}#customers-view .customer-code{color:#245d80;font-weight:900;white-space:nowrap}#customers-view .customer-cell{display:grid;min-width:0;line-height:1.15}#customers-view .customer-cell strong,#customers-view .customer-cell small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#customers-view .customer-cell strong{font-size:calc(9.5px + var(--ui-font-step))}#customers-view .customer-cell small{color:#708797;font-size:calc(7px + var(--ui-font-step))}#customers-view .customer-actions{white-space:nowrap}
#customer-forms-view .workflow-rule{height:32px;min-height:32px}#customer-forms-view table{min-width:920px}#customer-forms-view .portal-register-notes{width:230px;max-width:280px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
#quotations-view .stats-grid{grid-template-columns:repeat(4,minmax(130px,1fr))}#quotations-view table{min-width:900px}









#prices-view .catalog-heading{height:var(--ui-subbar-h);min-height:var(--ui-subbar-h)}#prices-view .catalog-filter-strip{display:grid;grid-template-columns:minmax(230px,1fr) 150px auto auto;gap:5px;width:100%}#prices-view .catalog-products-table{min-width:980px}
#prices-view .product-catalog-card{overflow:hidden}
#prices-view .catalog-capability-toolbar{height:auto;min-height:34px;gap:6px;padding:4px 8px;background:#f8fbfd}
#prices-view .catalog-title-block{display:flex;align-items:center;gap:6px;white-space:nowrap}
#prices-view .catalog-title-block h2{margin:0;font-size:calc(11px + var(--ui-font-step))}
#prices-view .catalog-title-block span{color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:750}
#prices-view .catalog-filter-strip{display:grid;grid-template-columns:minmax(175px,270px) minmax(109px,145px);justify-content:end;width:auto;margin-inline-start:auto}
#prices-view .catalog-filter-strip :is(.table-search,select){height:25px}
@media(max-width:760px){#prices-view .catalog-capability-toolbar{height:auto;min-height:0;flex-wrap:wrap;align-items:stretch;gap:4px}#prices-view .catalog-title-block{width:100%}#prices-view .catalog-filter-strip{width:100%;margin:0;min-width:0}#prices-view .catalog-filter-strip>.table-search{min-width:0}#prices-view .catalog-filter-strip>.table-search input{min-width:0;width:100%}}
#prices-view .catalog-tree-table{width:100%;min-width:850px;table-layout:fixed}
#prices-view .catalog-tree-table th:nth-child(1){width:34%}
#prices-view .catalog-tree-table th:nth-child(2){width:12%}
#prices-view .catalog-tree-table th:nth-child(3){width:13%}
#prices-view .catalog-tree-table th:nth-child(4){width:10%}
#prices-view .catalog-tree-table th:nth-child(5){width:13%}
#prices-view .catalog-tree-table th:nth-child(6){width:9%}
#prices-view .catalog-tree-table th:nth-child(7){width:9%}
#prices-view .catalog-family-row>td{height:35px;padding-block:2px;border-top:1px solid #c8dbe8;border-bottom:1px solid #c8dbe8;background:#eef6fb;color:#173f5d;vertical-align:middle}
#prices-view .catalog-family-row.catalog-family-root>td{background:#e8f3fb;font-weight:900}
#prices-view .catalog-family-row.catalog-family-root>td:first-child{box-shadow:inset -3px 0 #277db6}
#prices-view .catalog-family-row.catalog-family-branch>td{background:#f4f8fb}

#prices-view .catalog-family-line{position:relative;display:grid;grid-template-columns:19px 20px minmax(130px,1fr) auto auto;align-items:center;gap:6px;min-width:0;height:30px;padding-right:calc(var(--tree-depth) * 22px + 2px)}
#prices-view .catalog-family-rail{position:absolute;top:-18px;right:calc(var(--tree-depth) * 22px - 9px);width:18px;height:34px;border-right:1px solid #b6c9d7;border-bottom:1px solid #b6c9d7;border-radius:0 0 5px 0;pointer-events:none}
#prices-view .catalog-family-root .catalog-family-rail{display:none}
#prices-view .catalog-tree-toggle{display:grid;place-items:center;width:18px;height:18px;margin:0;padding:0;border:1px solid #9eb9cc;border-radius:5px;background:#fff;color:#27688f;font-size:16px;font-weight:900;line-height:1;cursor:pointer;transition:transform .12s ease,background-color .12s ease}
#prices-view .catalog-tree-toggle:hover{background:#e7f4fc}
#prices-view .catalog-tree-toggle.expanded{transform:rotate(90deg);background:#e3f1fa}
#prices-view .catalog-tree-toggle:disabled{opacity:.45;cursor:default}
#prices-view .catalog-family-icon{display:grid;place-items:center;width:19px;height:19px;border-radius:5px;background:#d8eaf6;color:#21648f;font-size:12px}
#prices-view .catalog-family-identity{display:grid;min-width:0;line-height:1.15}
#prices-view .catalog-family-identity strong{overflow:hidden;font-size:calc(10px + var(--ui-font-step));font-weight:900;text-overflow:ellipsis;white-space:nowrap}
#prices-view .catalog-family-root .catalog-family-identity strong{font-size:calc(10.5px + var(--ui-font-step));font-weight:950}
#prices-view .catalog-family-identity small{overflow:hidden;color:#738b9b;font-size:calc(7.5px + var(--ui-font-step));font-weight:650;text-overflow:ellipsis;white-space:nowrap}
#prices-view .catalog-node-kind{display:inline-flex;align-items:center;justify-content:center;min-width:47px;height:20px;padding-inline:6px;border:1px solid #b7cddd;border-radius:10px;background:#edf5fa;color:#38647f;font-size:calc(7px + var(--ui-font-step));font-weight:900;white-space:nowrap}
#prices-view .catalog-node-kind.root{border-color:#7fb1d2;background:#d8ecfa;color:#15577f}
#prices-view .catalog-node-kind.product{border-color:#c9d7df;background:#f8fafb;color:#657c8a}
#prices-view .catalog-family-summary{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
#prices-view .catalog-family-summary span{display:inline-flex;align-items:center;height:20px;padding-inline:6px;border:1px solid #d2dee6;border-radius:10px;background:#fff;color:#5e7889;font-size:calc(7px + var(--ui-font-step));font-weight:800;white-space:nowrap}
#prices-view .catalog-family-action-cell{text-align:center}
#prices-view .catalog-product-row>td{height:38px;padding-block:2px;background:#fff;vertical-align:middle}

#prices-view .catalog-product-row.catalog-inactive{opacity:.62}
#prices-view .catalog-product-line{display:grid;grid-template-columns:18px auto minmax(120px,1fr);align-items:center;gap:5px;min-width:0;height:34px;padding-right:calc(var(--tree-depth) * 22px + 2px)}
#prices-view .catalog-tree-branch{color:#9ab1c1;font-size:18px;font-weight:900;line-height:1}
#prices-view .catalog-product-identity{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name sku" "meta meta";align-items:center;gap:1px 6px;min-width:0;line-height:1.12}
#prices-view .catalog-product-identity strong{grid-area:name;overflow:hidden;font-size:calc(9px + var(--ui-font-step));font-weight:850;text-overflow:ellipsis;white-space:nowrap}
#prices-view .catalog-product-identity small{grid-area:sku;color:#315f7d;font-size:calc(7.5px + var(--ui-font-step));font-weight:900;white-space:nowrap}
#prices-view .catalog-product-identity em{grid-area:meta;overflow:hidden;color:#7b909e;font-size:calc(7px + var(--ui-font-step));font-style:normal;text-overflow:ellipsis;white-space:nowrap}
#prices-view .catalog-capability-badges{display:flex;align-items:center;gap:3px;min-width:0;overflow:hidden}
#prices-view .catalog-capability-badge,#prices-view .catalog-capability-empty,#prices-view .warehouse-chip{display:inline-flex;align-items:center;max-width:100%;height:20px;padding-inline:6px;border:1px solid #d3dfe7;border-radius:10px;background:#f7fafc;color:#607a8b;font-size:calc(7px + var(--ui-font-step));font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#prices-view .catalog-unit-summary,#prices-view .catalog-balance-summary{display:grid;line-height:1.15}
#prices-view .catalog-unit-summary small,#prices-view .catalog-balance-summary small{color:#7a909f;font-size:calc(7px + var(--ui-font-step))}
#pricing-lists-view .pricing-actions-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:33px;margin-bottom:4px;padding:2px 6px;border:1px solid var(--ui-line);border-radius:7px;background:#fbfdff}
#pricing-lists-view .price-versions-command{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:35px;margin-bottom:5px;padding:4px 7px;border:1px solid var(--ui-line);border-radius:8px;background:#f8fbfd}
#pricing-lists-view .price-versions-command h2{margin:0;font-size:var(--ui-font-size,13px)}
#pricing-lists-view .price-versions-command>div{display:flex;gap:4px;margin-inline-start:auto;min-width:0}
#pricing-lists-view .pricing-kind-choice{display:flex;align-items:center;gap:5px;min-width:0;margin:0;white-space:nowrap;color:var(--ui-muted);font-size:12px}
#pricing-lists-view .pricing-kind-choice>select,#pricing-lists-view .pricing-kind-choice>.smart-select{width:185px;min-width:0}
#pricing-lists-view .pricing-kind-choice :is(select,.smart-select-trigger){height:28px;min-height:28px}
#pricing-lists-view .price-versions-command .button{height:28px;min-height:28px;padding-inline:6px;font-size:calc(9px + var(--ui-font-step))}
#pricing-lists-view .price-versions-table{width:100%;min-width:900px;table-layout:fixed}
#pricing-lists-view .price-versions-table :is(th,td){padding:3px 5px;line-height:1.3;vertical-align:middle}
#pricing-lists-view .price-versions-table th{white-space:normal;overflow-wrap:normal}
#pricing-lists-view .price-versions-table th:nth-child(1){width:20%}
#pricing-lists-view .price-versions-table th:nth-child(2){width:16%}
#pricing-lists-view .price-versions-table th:nth-child(3){width:8%}
#pricing-lists-view .price-versions-table th:nth-child(4){width:5%}
#pricing-lists-view .price-versions-table th:nth-child(5){width:19%}
#pricing-lists-view .price-versions-table th:nth-child(6){width:8%}
#pricing-lists-view .price-versions-table th:nth-child(7){width:18%}
#pricing-lists-view .price-versions-table th:nth-child(8){width:6%}
@media(max-width:760px){
  #prices-view .catalog-capability-toolbar{flex-wrap:wrap}
  #prices-view .catalog-filter-strip{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);width:100%;margin:0}
  #prices-view .catalog-heading-actions,#pricing-lists-view :is(.price-versions-command,.pricing-actions-bar,.pricing-page-actions){flex-wrap:wrap;height:auto}
  #pricing-lists-view :is(.price-versions-command>div,.pricing-page-actions){flex-wrap:wrap;justify-content:flex-end}
  #pricing-lists-view .pricing-kind-choice{width:100%}
  #pricing-lists-view .pricing-kind-choice>.smart-select{width:min(100%,190px)}
}
#pricing-lists-view .price-version-period{display:grid;gap:2px}
#pricing-lists-view .price-list-audit{display:grid;gap:2px;font-size:10px}
#pricing-lists-view .price-list-audit>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1px 3px}
#pricing-lists-view .price-list-audit>div>small{grid-column:2}
#pricing-lists-view .price-list-audit>div+div{padding-top:2px;border-top:1px solid #edf2f6}
#pricing-lists-view .price-list-audit span{color:var(--ui-muted)}
#pricing-lists-view .price-list-description{color:#536b7c}
#pricing-lists-view .price-list-item-count{text-align:center}
#pricing-lists-view .price-list-customer-count{margin-bottom:2px;font-size:9px}
#pricing-lists-view .price-list-customers{display:grid;gap:3px;max-height:52px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#pricing-lists-view .price-list-customer{display:flex;align-items:baseline;gap:5px;min-width:0}
#pricing-lists-view .price-list-customer>span{min-width:0;overflow-wrap:anywhere}
#pricing-lists-view .price-list-customer>small{flex:0 0 auto;margin-inline-start:auto;font-size:9px;direction:ltr}
#pricing-lists-view .price-list-unassigned,#pricing-lists-view .price-list-customer-more{color:var(--ui-muted);font-size:10px}
#pricing-tool-modal{z-index:4100}
#pricing-tool-modal>.pricing-tool-card{width:min(1100px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
#pricing-tool-modal form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#pricing-tool-modal .pricing-tool-body{min-height:0;overflow:auto;padding:8px}
#pricing-tool-modal .pricing-tool-fields{display:grid;grid-template-columns:minmax(180px,1fr) minmax(200px,1.2fr) 170px 145px;gap:7px;margin-bottom:8px;padding:7px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface-2)}
#pricing-tool-modal .pricing-tool-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#pricing-tool-modal .pricing-tool-summary>div{min-width:0;padding:6px 7px;border:1px solid var(--ui-line);border-radius:5px;background:#fbfdff}
#pricing-tool-modal .pricing-tool-summary small{display:block;color:var(--ui-muted);font-size:11px}
#pricing-tool-modal .pricing-tool-summary strong{display:block;margin-top:3px;overflow-wrap:anywhere;font-size:12px}
#pricing-tool-modal .pricing-tool-note{margin:6px 0;padding:6px 8px;border:1px solid var(--ui-line);border-radius:5px;background:#f7fafc;color:#4e687b;font-size:11px;line-height:1.6}
#pricing-tool-modal .pricing-tool-candidates h3{display:flex;align-items:center;gap:8px;margin:10px 0 5px;font-size:13px}
#pricing-tool-modal .pricing-tool-candidates h3 small{margin-inline-start:auto;color:var(--ui-muted);font-size:10px;font-weight:normal}
#pricing-tool-modal .pricing-tool-candidates table{width:100%;min-width:650px;table-layout:fixed}
#pricing-tool-modal .pricing-tool-candidates th:first-child{width:28%}
#pricing-tool-modal .pricing-tool-candidates th:nth-child(2){width:17%}
#pricing-tool-modal .pricing-tool-candidates th:nth-child(3){width:11%}
#pricing-tool-modal .pricing-tool-candidates :is(th,td){padding:5px 7px;white-space:normal;overflow-wrap:anywhere}
#pricing-tool-modal .pricing-tool-candidates td small{display:block;color:var(--ui-muted);font-size:10px}
#pricing-tool-modal .pricing-candidate-selected>td{background:var(--ui-success-soft);color:#176745}
#pricing-tool-modal .modal-actions{flex:0 0 auto;margin:0}
.pricing-explain-button{margin-top:4px;max-width:100%;font-size:10px}
@media(max-width:760px){#pricing-tool-modal .pricing-tool-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#pricing-tool-modal .pricing-tool-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
#pricing-lists-view .pricing-list-status{display:inline-block;max-width:100%;padding:3px 6px;border-radius:6px;background:#edf2f6;color:#526c80;font-weight:700}
#pricing-lists-view .pricing-list-status.active{background:#edf7f1;color:#24764e}
#pricing-lists-view .pricing-list-status.pending,#pricing-lists-view .pricing-list-status.future{background:#fff7e9;color:#89651f}
#pricing-lists-view .pricing-list-status.expired{background:#f4f3f2;color:#7d7771}
#pricing-lists-view .price-start-control{display:flex;align-items:center;gap:4px;min-width:0}
#pricing-lists-view .price-start-control input{width:104px;min-width:0;height:28px;padding:2px 3px;font-size:11px}
#pricing-lists-view .price-start-control button{flex:0 0 auto;min-height:26px;padding:2px 5px}
#pricing-lists-view .pricing-rate-state{display:inline-block;border-radius:5px;padding:2px 5px;color:#52715e;background:#f0f7f2;white-space:nowrap}
#pricing-lists-view .pricing-rate-state.missing{color:#8b7660;background:#fbf6ed}
#price-modal .price-editor-line-status{display:block;min-height:14px;margin-top:3px;color:var(--ui-muted);font-size:11px}
#pricing-lists-view .price-versions-table td{overflow-wrap:anywhere}
#pricing-lists-view .price-versions-table td small{display:block;color:var(--ui-muted)}
#pricing-lists-view .price-versions-table thead th:last-child,#pricing-lists-view .price-versions-table tr:not(.price-tree-section)>td:last-child{position:sticky;inset-inline-end:0;z-index:1;background:#fbfdff;box-shadow:2px 0 4px rgb(20 59 90 / 4%)}
#pricing-lists-view .price-tree-section td{background:#eef4f8;color:var(--ui-navy);font-weight:800;border-top:1px solid #d7e4ed}
#pricing-lists-view .price-tree-name{padding-inline-start:calc(var(--price-tree-depth,0)*16px);border-inline-start:calc(var(--price-tree-depth,0)*2px) solid #d2e2ee}
#pricing-lists-view .price-tree-name strong{display:block}
#pricing-lists-view .price-versions-pages{display:flex;align-items:center;gap:5px;padding:4px 6px;flex-wrap:wrap;font-size:11px}
#pricing-lists-view .price-versions-pages>span{margin-inline-end:auto;color:var(--ui-muted)}
#price-list-modal>.modal-card,#price-version-modal>.modal-card{width:min(720px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
#price-assignment-modal>.modal-card{width:min(960px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
@media(max-width:600px){#price-assignment-modal table{min-width:690px}}
#price-list-modal form,#price-version-modal form,#price-assignment-modal form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#price-list-modal .modal-form,#price-version-modal .modal-form,#price-assignment-modal .modal-form{flex:1 1 auto;min-height:0;overflow:auto}
#price-list-modal .modal-actions,#price-version-modal .modal-actions,#price-assignment-modal .modal-actions{flex:0 0 auto}
#price-list-modal .pricing-clone-note{flex:0 0 auto;margin:0;padding:5px 9px;border-top:1px solid var(--ui-line);background:#f5f9fc;color:var(--ui-muted);font-size:calc(9px + var(--ui-font-step));line-height:1.45}
@media(max-width:600px){#price-list-modal .form-grid.two{grid-template-columns:minmax(0,1fr)}}
#price-assignment-modal .price-assignment-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px;margin-bottom:6px}
#price-assignment-modal table{width:100%;table-layout:fixed}
#price-assignment-modal th:nth-child(1){width:25%}
#price-assignment-modal th:nth-child(2),#price-assignment-modal th:nth-child(3){width:19%}
#price-assignment-modal th:nth-child(4){width:28%}
#price-assignment-modal th:nth-child(5){width:9%}
#price-assignment-modal td{overflow-wrap:anywhere}
#price-assignment-modal input[type=date]{width:100%;min-width:0;font-size:12px}
#price-assignment-modal .price-assignment-help{display:block;margin:5px 0;font-size:11px;line-height:1.6;color:var(--ui-muted)}
#price-assignment-modal .price-assignment-paging{display:flex;justify-content:flex-end;margin-top:3px}
#price-assignment-confirmation-modal{z-index:4100;padding:8px}
#price-assignment-confirmation-modal>.modal-card{display:flex;flex-direction:column;width:min(670px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:hidden}
#price-assignment-confirmation-modal .modal-header,#price-assignment-confirmation-modal .modal-actions{flex:0 0 auto}
#price-assignment-confirmation-modal .modal-header h2{font-size:15px;line-height:1.6;margin:0}
#price-assignment-confirmation-modal .price-assignment-confirmation-content{flex:1 1 auto;min-height:0;overflow:auto;padding:8px 12px;font-size:12px;line-height:1.7}
#price-assignment-confirmation-modal article{border:1px solid var(--ui-line);border-radius:6px;padding:8px 10px;margin:7px 0;background:#f8fbfe;overflow-wrap:anywhere}
#price-assignment-confirmation-modal article header{display:flex;flex-wrap:wrap;gap:6px 16px;color:var(--ui-text)}
#price-assignment-confirmation-modal article p{margin:4px 0}
#price-assignment-confirmation-modal article small{display:block;color:var(--ui-muted)}
#pricing-lists-view .pricing-status-filter{display:flex;align-items:center;gap:8px;min-width:0;padding:3px 6px;margin-bottom:4px;border:1px solid var(--ui-line);border-radius:7px;background:#fbfdff}
#pricing-lists-view .pricing-status-filter label{display:flex;align-items:center;gap:5px;min-width:0;white-space:nowrap}
#pricing-lists-view .pricing-status-filter label:first-child :is(select,.smart-select){width:280px;min-width:0}
#pricing-lists-view .pricing-status-filter label:nth-child(2) :is(select,.smart-select){width:195px;min-width:0}
#pricing-lists-view .pricing-status-filter :is(select,.smart-select-trigger,.button){height:28px;min-height:28px}
#pricing-lists-view .pricing-status-filter .button{margin-inline-start:auto;padding-inline:14px}
#pricing-lists-view .pricing-status-table{width:100%;min-width:850px;table-layout:fixed}
#pricing-lists-view .pricing-status-table th:first-child{width:22%}
#pricing-lists-view .pricing-status-table th:nth-child(6){width:26%}
#pricing-lists-view .pricing-status-table td{overflow-wrap:anywhere}
#pricing-lists-view .pricing-status-table small{display:block;color:var(--ui-muted)}
@media(max-width:600px){#pricing-lists-view .price-versions-command{align-items:stretch;flex-direction:column}#pricing-lists-view .price-versions-command>div{flex-wrap:wrap;margin:0;justify-content:flex-end}#pricing-lists-view .pricing-status-filter{display:grid;grid-template-columns:minmax(0,1fr)}#pricing-lists-view .pricing-status-filter label{justify-content:space-between}#pricing-lists-view .pricing-status-filter label :is(select,.smart-select){width:min(260px,70vw)}#pricing-lists-view .pricing-status-filter .button{justify-self:end}}
#pricing-priority-modal>.modal-card{width:min(620px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
#pricing-priority-modal form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#pricing-priority-modal .modal-form{min-height:0;overflow:auto}
#pricing-priority-modal .modal-actions{flex:0 0 auto}
#pricing-priority-rows{list-style:none;margin:0;padding:0;display:grid;gap:6px}
#pricing-priority-rows li{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid #e1eaf1;border-radius:6px;background:#f8fbfe}
#pricing-priority-rows strong{font-size:var(--ui-font-size,13px);overflow-wrap:anywhere}
#pricing-priority-rows li>div{display:flex;gap:4px}
#pricing-priority-rows .small-action{min-width:28px;height:28px}
#pricing-priority-modal .pricing-priority-rank{text-align:center;color:#176194;font-weight:700}
#pricing-priority-modal .pricing-priority-hint{font-size:12px;color:#60788f;margin:10px 0 0;line-height:1.6}
#pricing-lists-view .pricing-page-actions{display:flex;flex:0 1 auto;align-items:center;justify-content:flex-end;gap:4px;min-width:0;margin-inline-start:auto}
#pricing-lists-view .pricing-page-actions>.button{flex:0 0 auto;height:27px;min-height:27px;padding-inline:8px;white-space:nowrap}
#pricing-lists-view .pricing-list-card{min-width:0;overflow:hidden}
.smart-select-list[data-option-layout="pricing"] .smart-select-group{padding:7px 8px 4px;background:#f5f9fc;color:#45647c;border-bottom:1px solid #e8eff4}
.smart-select-list[data-option-layout="pricing"] .smart-select-option{display:grid;gap:3px;padding:7px 8px;line-height:1.45;white-space:normal}
.smart-select-list[data-option-layout="pricing"] .smart-select-option-title{font-weight:800;font-size:13px;overflow-wrap:anywhere}
.smart-select-list[data-option-layout="pricing"] .smart-select-option-description{font-weight:400;font-size:11px;color:#6c8193;overflow-wrap:anywhere}
#pricing-lists-view .pricing-list-choice{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"label field";align-items:center;gap:5px;flex:0 1 390px;min-width:230px;margin:0;color:#365970;font-size:calc(8px + var(--ui-font-step));font-weight:850}
#pricing-lists-view .pricing-list-choice>span{grid-area:label;white-space:nowrap}
#pricing-lists-view .pricing-list-choice>select,#pricing-lists-view .pricing-list-choice>.smart-select{grid-area:field;min-width:0}
#pricing-lists-view .pricing-list-choice :is(select,.smart-select-trigger){width:100%;height:27px;min-height:27px}

#pricing-lists-view .pricing-list-toolbar{min-width:0;min-height:35px;padding:3px 6px;border-bottom:1px solid var(--ui-line);background:#fbfdff}
#pricing-lists-view .pricing-list-filters{display:grid;grid-template-columns:minmax(150px,180px) minmax(170px,200px) minmax(190px,260px);align-items:center;gap:6px;width:min(100%,652px);min-width:0}
#pricing-lists-view .pricing-filter-field{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px;min-width:0;margin:0;color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:800}
#pricing-lists-view .pricing-filter-field>span{white-space:nowrap}
#pricing-lists-view .pricing-filter-field>.smart-select{min-width:0;width:100%}
#pricing-lists-view .pricing-list-filters :is(select,input,.smart-select-trigger,.table-search){width:100%;height:28px;min-height:28px}
#pricing-lists-view .pricing-list-filters>.table-search{display:flex;align-items:center;min-width:0;margin:0}
#pricing-lists-view .pricing-items-table{width:100%;min-width:940px;table-layout:fixed}
#pricing-lists-view .pricing-items-table th:nth-child(1){width:30%}
#pricing-lists-view .pricing-items-table th:nth-child(2){width:10%}
#pricing-lists-view .pricing-items-table th:nth-child(3),#pricing-lists-view .pricing-items-table th:nth-child(4),#pricing-lists-view .pricing-items-table th:nth-child(5){width:12%}
#pricing-lists-view .pricing-items-table th:nth-child(6),#pricing-lists-view .pricing-items-table th:nth-child(7),#pricing-lists-view .pricing-items-table th:nth-child(8){width:8%}
#pricing-lists-view .pricing-items-table :is(th,td){overflow-wrap:anywhere}
#pricing-lists-view .pricing-family-row>td{height:32px;padding:2px 6px;border-block:1px solid #c8dbe8;background:#eef6fb;color:#173f5d;vertical-align:middle}

#pricing-lists-view .pricing-family-line{display:grid;grid-template-columns:18px 19px minmax(130px,1fr) auto auto;align-items:center;gap:5px;min-width:0;padding-right:calc(var(--pricing-depth) * 20px)}
#pricing-lists-view .pricing-family-line>strong{overflow:hidden;font-size:calc(9.5px + var(--ui-font-step));font-weight:900;text-overflow:ellipsis;white-space:nowrap}
#pricing-lists-view .pricing-family-line>small,#pricing-lists-view .pricing-family-line>em{color:#6e8797;font-size:calc(7px + var(--ui-font-step));font-style:normal;font-weight:750;white-space:nowrap}
#pricing-lists-view .pricing-tree-toggle{display:grid;place-items:center;width:18px;height:18px;margin:0;padding:0;border:1px solid #9eb9cc;border-radius:5px;background:#fff;color:#27688f;font-size:15px;font-weight:900;line-height:1;cursor:pointer;transition:transform .12s ease,background-color .12s ease}
#pricing-lists-view .pricing-tree-toggle.expanded{transform:rotate(90deg);background:#e3f1fa}
#pricing-lists-view .pricing-family-icon{display:grid;place-items:center;width:19px;height:19px;border-radius:5px;background:#d8eaf6;color:#21648f;font-size:11px}
#pricing-lists-view .pricing-product-row>td{height:35px;padding:3px 5px;vertical-align:middle}

#pricing-lists-view .pricing-product-line{display:grid;grid-template-columns:17px minmax(0,1fr);align-items:center;gap:4px;min-width:0;padding-inline-start:calc(var(--pricing-depth) * 18px)}
#pricing-lists-view .pricing-tree-branch{color:#9ab1c1;font-size:16px;font-weight:900}
#pricing-lists-view .pricing-product-identity{display:grid;min-width:0;line-height:1.15}
#pricing-lists-view .pricing-product-identity>strong,#pricing-lists-view .pricing-product-identity>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#pricing-lists-view .pricing-product-identity>strong{font-size:calc(8.5px + var(--ui-font-step));font-weight:850}
#pricing-lists-view .pricing-product-identity>small{color:#6f8797;font-size:calc(7px + var(--ui-font-step));font-weight:750}
#prices-view .registered-price{color:#174f71;font-weight:900;white-space:nowrap}
#prices-view .price-not-set{color:#8da0ad}
#finance-view table,#finance-receipts-view table,#finance-paid-view table{min-width:900px}
#editor-view>.document-header{position:sticky;top:0;z-index:30;background:var(--ui-bg)}
#editor-view .editor-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(180px,18vw,250px);gap:6px;min-width:0}
#editor-view .editor-main{display:grid;align-content:start;gap:5px;min-width:0}
#editor-view .order-head-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;padding:6px}
#editor-view .order-creator-field{padding:5px 7px;border:1px solid var(--ui-line);border-radius:6px;background:#f8fbfd}
#editor-view .lines-table-wrap{max-height:max(160px,calc(100dvh - 260px));max-width:100%;overscroll-behavior:contain}
#editor-view .lines-table{width:100%;min-width:1040px;table-layout:fixed}
#editor-view .entry-sequence-col{width:30px}#editor-view .entry-product-col{width:230px}#editor-view .entry-quantity-col{width:70px}#editor-view .entry-basis-col{width:100px}#editor-view .entry-measure-col{width:75px}#editor-view .entry-density-col{width:70px}#editor-view .entry-color-col{width:80px}#editor-view .entry-actual-col{width:80px}#editor-view .entry-total-col{width:95px}#editor-view .entry-actions-col{width:60px}
#editor-view .lines-table :is(th,td){min-width:0;overflow-wrap:anywhere;white-space:normal;padding:4px}
#editor-view .line-product-cell .smart-select-input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#editor-view .lines-table .line-input{width:100%;min-width:0}
#editor-view .line-actions{display:flex;align-items:center;justify-content:center;gap:3px}
#editor-view .add-line-wide{width:calc(100% - 8px);margin:4px}
#editor-view .editor-actions{display:flex;align-items:center;gap:4px}
@media(max-width:1000px){#editor-view .editor-layout{grid-template-columns:minmax(0,1fr)}#editor-view .editor-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#editor-view>.document-header{height:auto;display:grid;grid-template-columns:minmax(0,1fr);padding-block:4px}#editor-view .document-title{min-width:0}#editor-view .document-title h1{font-size:12px}#editor-view .document-actions{width:100%;flex-wrap:wrap;justify-content:flex-end}#editor-view .document-actions .button{padding-inline:6px}#editor-view .order-head-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#editor-view .editor-sidebar{grid-template-columns:minmax(0,1fr)}}
#editor-view .editor-sidebar{display:grid;align-content:start;gap:5px;min-width:0}#editor-view .editor-sidebar>.content-card{min-width:0;margin:0;padding:7px 9px}#editor-view .editor-sidebar .summary-heading{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:5px}#editor-view .editor-sidebar .summary-heading h2,#editor-view .editor-sidebar .timeline-card>h2{margin:0;color:#173f5c;font-size:calc(11px + var(--ui-font-step))}#editor-view .editor-sidebar .summary-heading>span{color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:750}#editor-view .editor-sidebar :is(h2,strong,span){min-width:0;overflow-wrap:anywhere}#editor-view .editor-sidebar .summary-grid{display:grid;gap:1px}#editor-view .editor-sidebar .summary-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;min-height:24px;padding:2px 0;border-top:1px solid #e5edf3}#editor-view .editor-sidebar .summary-row span{color:#5c7385;font-size:calc(8px + var(--ui-font-step))}#editor-view .editor-sidebar .summary-row strong{font-size:calc(9px + var(--ui-font-step));white-space:nowrap}#editor-view .editor-sidebar .timeline-card>h2{margin-bottom:4px}#editor-view .editor-sidebar .timeline-item{display:grid;grid-template-columns:9px minmax(0,1fr);align-items:start;gap:6px;padding:4px 0;border-top:1px solid #e5edf3}#editor-view .editor-sidebar .timeline-item>i{width:8px;height:8px;margin-top:4px;border:2px solid #9cb3c3;border-radius:50%;background:#fff}#editor-view .editor-sidebar .timeline-item.active>i{border-color:var(--ui-blue);background:var(--ui-blue)}#editor-view .editor-sidebar .timeline-item>div{display:grid;gap:1px;min-width:0}#editor-view .editor-sidebar .timeline-item strong{font-size:calc(8.5px + var(--ui-font-step));line-height:1.25}#editor-view .editor-sidebar .timeline-item span{color:var(--ui-muted);font-size:calc(7.5px + var(--ui-font-step));line-height:1.25}
.cutting-create-modal{width:min(680px,95vw)}.cutting-create-modal>.cutting-create-body{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9bfd0 transparent}.cutting-preview-modal,.batch-preparation-modal{width:min(1120px,97vw)}.cutting-preview-modal{height:min(760px,96vh)}.cutting-preview-modal>.modal-header,.cutting-preview-modal>.cutting-preview-notes,.cutting-preview-modal>.form-message,.cutting-preview-modal>.modal-actions{flex:0 0 auto}.cutting-preview-modal>#cutting-preview-content{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:5px 8px}.cutting-preview-modal>.cutting-preview-notes{padding:5px 9px}.cutting-preview-modal>.modal-actions{margin-top:0}.cutting-order-options{display:grid;gap:4px;max-height:46vh;overflow:auto}.cutting-order-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;min-height:34px;padding:4px 6px;border:1px solid var(--ui-line);border-radius:6px}
.customer-modal-card,.quotation-modal-card,.price-list-modal-card{width:min(1050px,97vw)}
.sales-settings-modal-card{width:min(920px,calc(100vw - 24px));height:min(670px,calc(100dvh - 24px))}.sales-settings-modal-card>.modal-header{flex:none;align-items:flex-start;padding:10px 14px}.sales-settings-modal-card>.modal-header h2{margin:0;font-size:17px}.sales-settings-modal-card>.modal-header p{margin:2px 0;color:var(--ui-muted);font-size:11px}.sales-settings-modal-card>#sales-settings-form{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;overflow:hidden}.sales-settings-tabs{flex:none;margin:0;padding:6px 10px;border-bottom:1px solid var(--ui-line);border-radius:0;background:#f8fafc}.sales-settings-body{flex:1 1 auto;min-height:0;padding:12px;overflow:auto}.sales-settings-panel{display:grid;gap:12px}.sales-settings-panel>header h3{margin:0;color:var(--ui-navy);font-size:15px}.sales-settings-panel>header p{margin:3px 0 0;color:var(--ui-muted);font-size:11px}.sales-setting-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}.sales-setting-card,.sales-setting-switch{display:flex;align-items:flex-start;gap:9px;padding:11px;border:1px solid var(--ui-line);border-radius:8px;background:#fff;cursor:pointer}.sales-setting-card:has(input:checked){border-color:#8bbbe1;background:#f1f7fc;box-shadow:0 0 0 1px rgba(11,114,217,.08)}.sales-setting-card input,.sales-setting-switch input{flex:none;width:17px;min-height:17px;margin:2px 0 0;accent-color:var(--ui-blue)}.sales-setting-card span,.sales-setting-switch span{display:grid;gap:3px}.sales-setting-card b,.sales-setting-switch b{color:var(--ui-navy);font-size:12px}.sales-setting-card small,.sales-setting-switch small{color:var(--ui-muted);font-size:10px;line-height:1.6}.sales-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.sales-settings-grid>.field{margin:0}.sales-settings-grid>.sales-setting-switch{min-height:68px}.sales-settings-impact,.sales-settings-current,.sales-settings-fixed{display:grid;gap:3px;padding:10px 12px;border:1px solid #cddde8;border-radius:7px;background:#f6f9fb}.sales-settings-impact b,.sales-settings-current span,.sales-settings-fixed b{color:var(--ui-blue);font-size:11px}.sales-settings-impact span,.sales-settings-current strong,.sales-settings-fixed span{color:var(--ui-navy);font-size:12px}.sales-settings-fixed small{color:var(--ui-muted);font-size:10px}.sales-settings-modal-card .modal-actions>span{margin-inline-end:auto;color:var(--ui-muted);font-size:10px}.sales-settings-modal-card .form-message:not(.hidden){flex:none;margin:0 10px 6px}.sales-settings-nav{margin-top:3px;border-top:1px solid var(--ui-line)!important}
.delivery-modal-card{width:min(1320px,calc(100vw - 20px));max-height:calc(100dvh - 20px);min-width:0;overflow:hidden}
#delivery-modal .delivery-create-scroll{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;padding:8px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#delivery-modal .delivery-create-scroll>*{flex:none;min-width:0}
#delivery-modal .delivery-order-section{display:grid;grid-template-columns:minmax(0,600px) minmax(0,1fr);align-items:start;gap:8px;padding:7px 8px;border:1px solid var(--ui-line);border-radius:7px;background:#f8fbfd}
#delivery-modal .delivery-order-field{min-width:0;margin:0;gap:4px}
#delivery-modal .delivery-order-field .smart-select-input{width:100%;min-height:32px}
#delivery-modal .delivery-selected-orders{display:flex;flex-wrap:wrap;gap:4px;padding-block-start:18px}
#delivery-modal .delivery-selected-orders:empty{display:none}
#delivery-modal .delivery-selected-orders>span{display:flex;align-items:center;gap:5px;padding:2px 5px;background:var(--ui-blue-soft);border:1px solid var(--ui-line);border-radius:5px}
#delivery-modal .delivery-selected-orders .icon-button{height:22px;width:22px;min-height:22px}
#delivery-modal .delivery-selected-orders small{color:var(--ui-muted)}
#delivery-detail-modal .delivery-command-bar{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:4px;flex:none;padding:4px 0;border-bottom:1px solid var(--ui-line)}
#delivery-detail-modal .delivery-change-history{flex:none;border:1px solid var(--ui-line);border-radius:5px;padding:5px}
#delivery-detail-modal .delivery-change-history>summary{cursor:pointer;color:var(--ui-navy)}
#delivery-detail-modal .delivery-change-history table{min-width:520px;font-size:calc(8px + var(--ui-font-step))}
#delivery-action-modal .delivery-action-card{width:min(760px,calc(100vw - 20px));max-height:calc(100dvh - 20px)}
#delivery-action-modal #delivery-action-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#delivery-action-modal .delivery-action-content{min-height:0;overflow:auto;padding:8px;overscroll-behavior:contain}
#delivery-action-modal #delivery-action-fields{display:grid;gap:6px;min-width:0}
#delivery-action-modal .field{min-width:0;margin:0;gap:3px}
#delivery-action-modal .field :is(input,select){width:100%;min-width:0;height:30px;min-height:30px}
#delivery-action-modal .delivery-block-dimensions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;align-items:end}
#delivery-action-modal .delivery-checkbox-options{max-height:230px;overflow:auto;border:1px solid var(--ui-line);border-radius:5px;padding:4px}
#delivery-action-modal .delivery-checkbox-options label{display:flex;align-items:center;gap:6px;min-height:30px;padding:3px 4px;border-bottom:1px solid #edf2f6}
#delivery-action-modal .delivery-checkbox-options input{width:15px;height:15px;min-height:15px;margin:0}
#delivery-action-modal .document-source-note{font-size:calc(8px + var(--ui-font-step));line-height:1.6;margin:6px 0;color:var(--ui-muted)}
@media(max-width:600px){#delivery-action-modal .form-grid{grid-template-columns:minmax(0,1fr)}#delivery-action-modal .delivery-action-card{width:calc(100vw - 10px);max-height:calc(100dvh - 10px)}}
#delivery-modal #delivery-form{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;overflow:hidden}
#delivery-modal .delivery-transport-panel,#delivery-detail-modal .delivery-transport-panel{flex:none;min-width:0;border:1px solid var(--ui-line);border-radius:7px;background:#fbfdff}
.delivery-transport-panel>h3{margin:0;padding:5px 8px;border-bottom:1px solid var(--ui-line);border-radius:7px 7px 0 0;background:#f0f5f9;color:var(--ui-navy);font-size:calc(10px + var(--ui-font-step));font-weight:850}
#delivery-modal .delivery-create-fields,#delivery-detail-modal .delivery-edit-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:7px 8px}
.delivery-transport-panel .field{min-width:0;margin:0;gap:3px}
.delivery-transport-panel :is(input,select,textarea,.smart-select-input){width:100%;min-width:0;min-height:30px}
#delivery-modal .delivery-create-fields .delivery-notes-field{grid-column:span 3}
#delivery-modal .delivery-create-fields textarea{height:30px;max-height:65px;resize:vertical}
#delivery-modal .delivery-order-preview{margin:0;border:1px solid var(--ui-line);border-radius:7px;background:#f8fafb}
#delivery-modal .delivery-order-preview>.empty-report{margin:0}
#delivery-modal [data-delivery-preview-status]:empty{display:none}
#delivery-modal .delivery-preview-head{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:#cbd7df}
#delivery-modal .delivery-preview-head>div{min-width:0;padding:6px 8px;background:#fff}
#delivery-modal .delivery-preview-head span,#delivery-modal .delivery-preview-head strong,#delivery-modal .delivery-preview-head small{display:block}
#delivery-modal .delivery-preview-head span{color:#526675;font-size:calc(7px + var(--ui-font-step))}
#delivery-modal .delivery-preview-head strong{margin-top:2px;overflow:hidden;color:#172f43;font-size:calc(9px + var(--ui-font-step));text-overflow:ellipsis;white-space:nowrap}
#delivery-modal .delivery-preview-head small{margin-top:1px;color:var(--ui-muted);font-size:calc(7px + var(--ui-font-step))}
#delivery-modal .delivery-preview-lines{overflow:visible;border-top:1px solid #c5d1d9}
#delivery-modal .delivery-preview-lines table{width:100%;min-width:0;table-layout:fixed}
#delivery-modal .delivery-preview-lines :is(th,td){padding:4px 3px;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
#delivery-modal .delivery-preview-lines td :is(strong,small){display:block;white-space:normal;overflow-wrap:anywhere}
#delivery-modal .delivery-preview-lines th:nth-child(1){width:4%}
#delivery-modal .delivery-preview-lines th:nth-child(2){width:5%}
#delivery-modal .delivery-preview-lines th:nth-child(3){width:18%}
#delivery-modal .delivery-preview-lines th:nth-child(4){width:5%}
#delivery-modal .delivery-preview-lines th:nth-child(5){width:6%}
#delivery-modal .delivery-preview-lines th:nth-child(6){width:13%}
#delivery-modal .delivery-preview-lines th:nth-child(7){width:12%}
#delivery-modal .delivery-preview-lines th:nth-child(8){width:10%}
#delivery-modal .delivery-preview-lines th:nth-child(9){width:8%}
#delivery-modal .delivery-preview-lines th:nth-child(10){width:10%}
#delivery-modal .delivery-preview-lines th:nth-child(11){width:9%}
#delivery-modal [data-delivery-mode="FULL"] [data-delivery-include],#delivery-modal [data-delivery-mode="FULL"] tr>:nth-child(8){display:none}
#delivery-modal .delivery-line-skipped{opacity:.55}
#delivery-modal .delivery-preview-lines input[type="checkbox"]{width:16px;height:16px;min-height:16px;flex:0 0 16px;vertical-align:middle;accent-color:#11805e}
#delivery-modal [data-delivery-weight-select]{accent-color:#267fac}
#delivery-modal .delivery-allocation-note{padding:5px 8px;margin:0;color:var(--ui-muted);font-size:11px}
#delivery-modal .delivery-preview-lines .delivery-table-input{width:100%;height:27px;min-height:27px;padding:2px 4px;text-align:center}
#delivery-modal .delivery-block-dimensions{display:grid;gap:3px}
#delivery-modal .delivery-block-dimension{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:3px;min-width:0;font-size:10px}
#delivery-modal .delivery-block-dimension>span{color:var(--ui-muted);white-space:nowrap}
#delivery-modal .measurement-error,#delivery-detail-modal .measurement-error{color:#ac3434;font-size:11px}
#delivery-detail-modal .delivery-block-dimension{display:block;min-width:0;margin:0}
#delivery-detail-modal .delivery-block-dimension>span{display:none}
#delivery-modal .delivery-weight-toolbar{display:flex;align-items:center;gap:7px;margin:4px;padding:5px 7px;border:1px solid #9eb9ca;border-radius:5px;background:#f2f7fa;color:#36586e;font-size:calc(8px + var(--ui-font-step));font-weight:750}
#delivery-modal .delivery-weight-groups{display:grid;gap:5px;margin:5px}
#delivery-modal .delivery-weight-group-card{overflow:hidden;border:1px solid #6996b1;border-inline-start:4px solid #126c99;border-radius:6px;background:#fff;box-shadow:0 1px 3px rgba(15,55,80,.08)}
#delivery-modal .delivery-weight-group-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px;background:#edf5f9}
#delivery-modal .delivery-weight-group-card>header strong{display:block;color:#123f5a;font-size:calc(10px + var(--ui-font-step))}
#delivery-modal .delivery-weight-group-card>header small{display:block;margin-top:1px;color:#567184;font-size:calc(7.5px + var(--ui-font-step))}
#delivery-modal .delivery-weight-group-lines{display:grid;gap:2px;padding:5px 8px}
#delivery-modal .delivery-weight-group-lines>div{display:grid;grid-template-columns:28px minmax(150px,1fr) minmax(65px,auto);align-items:center;gap:5px;min-height:23px;padding:2px 5px;border:1px solid #d5e1e8;border-radius:4px;background:#fff;color:#244b64;font-size:calc(8.5px + var(--ui-font-step))}
#delivery-modal .delivery-weight-group-lines small{margin:0;color:#6c8291;font-size:calc(7.5px + var(--ui-font-step))}
#delivery-modal .delivery-weight-group-fields{display:grid;grid-template-columns:170px minmax(190px,1fr);align-items:end;gap:5px;padding:0 8px 6px}
#delivery-modal .delivery-weight-group-fields label{display:grid;gap:2px;color:#38586c;font-size:calc(7.5px + var(--ui-font-step));font-weight:800}
#delivery-modal .delivery-weight-group-fields input{height:29px;min-height:29px;padding:2px 6px;font-weight:850}
#delivery-modal .delivery-weight-price-status{align-self:center;margin:0;padding:5px 7px;border-radius:4px;background:#eef4f7;color:#31566d;font-size:calc(8px + var(--ui-font-step));font-weight:800}
#delivery-modal .delivery-weight-grouped{background:#f3f8fb}
#delivery-modal .delivery-weight-member{display:inline-flex;align-items:center;min-height:24px;padding:2px 6px;border:1px solid #80a9be;border-radius:4px;background:#eaf3f7;color:#174e6b;font-size:calc(8px + var(--ui-font-step));font-weight:850;white-space:nowrap}
@media(max-width:760px){
  #delivery-modal{padding:4px}
  #delivery-modal>.delivery-modal-card{width:calc(100vw - 8px);max-height:calc(100dvh - 8px)}
  #delivery-modal .delivery-create-scroll{padding:6px}
  #delivery-modal .delivery-order-section{grid-template-columns:minmax(0,1fr)}
  #delivery-modal .delivery-selected-orders{padding-block-start:0}
  #delivery-modal .delivery-create-fields,#delivery-detail-modal .delivery-edit-fields{grid-template-columns:repeat(2,minmax(0,1fr));padding:6px}
  #delivery-modal .delivery-create-fields .delivery-notes-field{grid-column:1/-1}
  #delivery-modal .delivery-preview-head{grid-template-columns:repeat(2,minmax(0,1fr))}
  #delivery-modal .delivery-weight-toolbar{align-items:flex-start;flex-direction:column}
  #delivery-modal .delivery-weight-group-fields{grid-template-columns:minmax(0,1fr)}
  #delivery-modal .delivery-weight-group-lines>div{grid-template-columns:24px minmax(0,1fr)}
  #delivery-modal .delivery-weight-group-lines small{grid-column:2}
  #delivery-modal .delivery-preview-lines table,#delivery-modal .delivery-preview-lines tbody{display:block;width:100%}
  #delivery-modal .delivery-preview-lines thead{display:none}
  #delivery-modal .delivery-preview-lines tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:7px;border-bottom:1px solid var(--ui-line)}
  #delivery-modal .delivery-preview-lines td{display:flex;flex-direction:column;min-width:0;width:auto;height:auto;border:0;padding:2px;text-align:right}
  #delivery-modal .delivery-preview-lines td::before{content:attr(data-label);color:var(--ui-muted);font-size:10px;margin-bottom:3px}
  #delivery-modal .delivery-preview-lines td:nth-child(3){grid-column:1/-1}
  #delivery-modal .delivery-preview-lines td:first-child,#delivery-modal .delivery-preview-lines td:nth-child(2){flex-direction:row;align-items:center;gap:7px}
}
#customer-request-modal>.portal-review-card{display:flex;flex-direction:column;width:min(1280px,calc(100vw - 20px));max-height:calc(100dvh - 20px);min-width:0;padding:0;overflow:hidden}
#customer-request-modal .modal-header{flex:0 0 auto;min-width:0;padding:8px 10px;border-bottom:1px solid #dce6ee}
#customer-request-modal .modal-header h2{margin:0;font-size:calc(15px + var(--ui-font-step))}
#customer-request-modal .modal-header p{margin:0;font-size:calc(9px + var(--ui-font-step));color:var(--ui-muted)}
#customer-request-modal #portal-review-content{display:flex;flex-direction:column;gap:6px;padding:7px 9px}
#customer-request-modal .portal-review-head{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;flex:0 0 auto}
#customer-request-modal .portal-review-head>div{display:grid;align-content:start;gap:2px;min-width:0;padding:5px 7px;border:1px solid #dce6ee;border-radius:5px;background:#f8fbfd;overflow-wrap:anywhere}
#customer-request-modal .portal-review-head span,#customer-request-modal .portal-review-head small{font-size:calc(8px + var(--ui-font-step));color:var(--ui-muted)}
#customer-request-modal .portal-review-head strong{font-size:calc(10px + var(--ui-font-step));color:#173f5c}
#customer-request-modal .portal-stock-note{display:flex;flex-wrap:wrap;gap:4px 8px;flex:0 0 auto;padding:5px 7px;border:1px solid #dce6ee;border-radius:5px;background:#f5f9fc;font-size:calc(9px + var(--ui-font-step));line-height:1.5}
#customer-request-modal .portal-review-lines{flex:0 0 auto;max-width:100%;overflow:auto;border:1px solid #d5e1e8;border-radius:5px}
#customer-request-modal .portal-review-lines table{width:100%;min-width:1040px;table-layout:fixed}
#customer-request-modal .portal-review-lines th,#customer-request-modal .portal-review-lines td{padding:5px 4px;font-size:calc(9px + var(--ui-font-step));white-space:normal;overflow-wrap:anywhere;vertical-align:middle;text-align:right}
#customer-request-modal .portal-review-lines th{background:#edf4fa;color:#254e68}
#customer-request-modal .portal-review-lines th:first-child{width:30px}
#customer-request-modal .portal-review-lines th:nth-child(2){width:18%}
#customer-request-modal .portal-review-lines th:nth-child(5){width:15%}
#customer-request-modal .review-product small,#customer-request-modal .portal-stock-available small{display:block;font-size:calc(8px + var(--ui-font-step));color:var(--ui-muted)}
#customer-request-modal .portal-stock-available{background:#f0f8f3;color:#226249}
#customer-request-modal .portal-stock-available.negative{background:#fff3f1;color:#9b3944}
#customer-request-modal .portal-line-cancelled{color:#87929a;background:#f7f8f9}
#customer-request-modal .portal-review-total{display:flex;justify-content:space-between;gap:8px;flex:0 0 auto;padding:5px 7px;border-radius:4px;background:#edf4fa;font-size:calc(10px + var(--ui-font-step))}
#customer-request-modal .portal-review-audit{display:grid;gap:3px;flex:0 0 auto;font-size:calc(8px + var(--ui-font-step));color:var(--ui-muted)}
#customer-request-modal #portal-review-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:5px;flex:0 0 auto;padding:7px 9px;border-top:1px solid #dce6ee}
#customer-request-modal #portal-review-actions button{width:auto;min-height:29px;padding:4px 9px;font-size:calc(10px + var(--ui-font-step))}
#customer-request-modal #portal-review-message{flex:0 0 auto;margin:0 9px 5px}
@media(max-width:650px){
  #customer-request-modal .portal-review-head{grid-template-columns:repeat(2,minmax(0,1fr))}
  #customer-request-modal .portal-review-lines table,#customer-request-modal .portal-review-lines tbody{display:block;min-width:0;width:100%}
  #customer-request-modal .portal-review-lines thead{display:none}
  #customer-request-modal .portal-review-lines tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:4px;padding:5px;border-bottom:1px solid #dce6ee}
  #customer-request-modal .portal-review-lines td{display:block;min-width:0;height:auto;min-height:0;border:0;padding:3px;line-height:1.5}
  #customer-request-modal .portal-review-lines td:before{content:attr(data-label);display:block;font-size:9px;color:var(--ui-muted);margin-bottom:2px}
  #customer-request-modal .portal-review-lines td.review-product{grid-column:1/-1}
  #customer-request-modal #portal-review-actions{gap:4px}
}
.agent-customers-card>#agent-customers-content,.report-modal-card>#customer-report-content,.portal-review-card>#portal-review-content{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9bfd0 transparent}
#delivery-detail-modal>.delivery-modal-card{width:min(1240px,calc(100vw - 20px));height:auto}
.delivery-source-orders{display:flex;flex-wrap:wrap;align-items:center;gap:4px 9px;padding:5px 8px;border-top:1px solid var(--ui-line);background:#fff}
.delivery-source-orders>span{color:var(--ui-muted);font-weight:750}
.delivery-source-orders .order-link{border:1px solid var(--ui-line);border-radius:5px;background:#f7fbfe;padding:3px 6px;color:var(--ui-blue);font:inherit;font-weight:750;white-space:nowrap;cursor:pointer}
#delivery-detail-modal .modal-header{min-width:0}
#delivery-detail-modal .modal-header>div:first-child{flex:1 1 auto;min-width:0}
#delivery-detail-modal .modal-header .document-sequence-nav{flex:0 0 auto;white-space:nowrap}
#delivery-detail-modal #delivery-detail-content{display:flex;flex:1 1 auto;min-width:0;min-height:0;flex-direction:column;gap:7px;padding:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
#delivery-detail-modal .delivery-detail-summary{flex:none;min-width:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:7px;background:#f8fbfd}
#delivery-detail-modal .delivery-detail-head{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,.8fr)}
#delivery-detail-modal .delivery-detail-head>div{display:grid;align-content:start;gap:3px;min-width:0;padding:6px 8px;border-inline-end:1px solid var(--ui-line);line-height:1.25}
#delivery-detail-modal .delivery-detail-head>div:last-child{border-inline-end:0}
#delivery-detail-modal .delivery-detail-head span,#delivery-detail-modal .delivery-detail-head small{color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:700;overflow-wrap:anywhere}
#delivery-detail-modal .delivery-detail-head strong{min-width:0;color:#173f5c;font-size:calc(10px + var(--ui-font-step));font-weight:850;overflow-wrap:anywhere}
#delivery-detail-modal .delivery-detail-head .status{justify-self:start;white-space:normal}
#delivery-detail-modal .document-source-note{flex:0 0 auto;margin:0;padding:5px 7px;border:1px solid #d5e1e8;border-radius:6px;background:#f8fafc;color:#536f81;font-size:calc(7.5px + var(--ui-font-step));line-height:1.3}
#delivery-detail-modal .document-source-note>strong{margin-inline-end:5px;color:#254e68}
#delivery-detail-modal .delivery-edit-fields .delivery-notes-field{grid-column:1/-1}
#delivery-detail-modal .delivery-measure-wrap{flex:0 0 auto;min-height:0;max-height:none;margin:0;border:1px solid var(--ui-line);border-radius:7px;background:#fff}
#delivery-detail-modal .delivery-measure-wrap table{width:100%;min-width:0;table-layout:fixed}
#delivery-detail-modal .delivery-measure-wrap thead{position:sticky;top:0;z-index:3}
#delivery-detail-modal .delivery-measure-wrap :is(th,td){height:31px;padding:3px 4px;vertical-align:middle}
#delivery-detail-modal .delivery-measure-wrap th{border-bottom:1px solid var(--ui-line);background:#eaf1f6;color:#244b66;white-space:normal}
#delivery-detail-modal .delivery-measure-wrap th:first-child{width:24%}
#delivery-detail-modal .delivery-measure-wrap th:nth-child(n+2):nth-child(-n+5){width:7.5%}
#delivery-detail-modal .delivery-measure-wrap th:nth-child(6){width:8.5%}
#delivery-detail-modal .delivery-measure-wrap th:nth-child(7){width:13%}
#delivery-detail-modal .delivery-measure-wrap th:nth-child(8){width:16.5%}
#delivery-detail-modal .delivery-measure-wrap th:nth-child(9){width:8%}
#delivery-detail-modal .delivery-measure-wrap th:not(:first-child){text-align:center}
#delivery-detail-modal .delivery-measure-row>td:first-child{line-height:1.15}
#delivery-detail-modal .delivery-measure-row>td:first-child :is(strong,small){display:block;overflow-wrap:anywhere}
#delivery-detail-modal .delivery-measure-row>td:first-child strong{font-size:calc(8.5px + var(--ui-font-step));font-weight:900}
#delivery-detail-modal .delivery-measure-row>td:first-child small{color:#6c8393;font-size:calc(7px + var(--ui-font-step));font-weight:750}
#delivery-detail-modal .delivery-measure-row>td:not(:first-child){text-align:center}
#delivery-detail-modal .delivery-measure-wrap .delivery-table-input{width:100%;height:27px;min-height:27px;min-width:0;padding:2px 5px;text-align:center}
#delivery-detail-modal .delivery-weight-groups-detail{display:grid;gap:5px;flex:0 0 auto;margin:0}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-card{overflow:hidden;border:1px solid var(--ui-line);border-inline-start:3px solid #6b9cb8;border-radius:7px;background:#fff}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-card>header{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,178px) auto;align-items:end;gap:7px;padding:6px 8px;background:#f0f5f9}
#delivery-detail-modal .delivery-weight-groups-detail header>div{display:grid;gap:3px;min-width:0}
#delivery-detail-modal .delivery-weight-groups-detail header>div>small{color:var(--ui-muted)}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-table-input{width:100%;min-width:0;height:28px;text-align:center}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-card>header label{display:grid;gap:2px;color:#38586c;font-size:calc(7.5px + var(--ui-font-step));font-weight:800}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-lines{display:flex;flex-wrap:wrap;gap:4px;padding:6px 8px}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-lines>span{display:inline-flex;align-items:center;gap:4px;min-height:23px;padding:2px 6px;border:1px solid #d5e1e8;border-radius:5px;background:#fff;color:#244b64;font-size:calc(7.5px + var(--ui-font-step))}
#delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-lines>span small{color:var(--ui-muted)}
#delivery-detail-modal .delivery-measure-total{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex:0 0 auto;min-height:31px;padding:4px 6px;border:1px solid #b9d6c7;border-radius:6px;background:#eff8f3}
#delivery-detail-modal .delivery-measure-total>span{display:inline-flex;align-items:center;gap:4px;min-height:21px;padding-inline:7px;border-inline-start:1px solid #c9ded3;color:#416657;font-size:calc(8px + var(--ui-font-step));font-weight:750;white-space:nowrap}
#delivery-detail-modal .delivery-measure-total>span:first-child{border-inline-start:0}
#delivery-detail-modal .delivery-measure-total b{color:#135d45;font-size:calc(9px + var(--ui-font-step));font-weight:900}
#delivery-detail-modal .delivery-detail-footer{display:flex;flex:0 0 auto;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-top:0}
.delivery-detail-footer :is(.delivery-export-actions,.delivery-footer-actions){display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
.delivery-detail-footer .delivery-footer-actions{margin-inline-start:auto;justify-content:flex-end}
@media(max-width:760px){
  #delivery-detail-modal{padding:4px}
  #delivery-detail-modal>.delivery-modal-card{width:calc(100vw - 8px);max-height:calc(100dvh - 8px)}
  #delivery-detail-modal .modal-header{gap:4px;padding-inline:5px}
  #delivery-detail-modal .modal-header h2{font-size:calc(11px + var(--ui-font-step))}
  #delivery-detail-modal .modal-header .document-sequence-nav>span{display:none}
  #delivery-detail-modal #delivery-detail-content{padding:6px}
  #delivery-detail-modal .delivery-detail-head{grid-template-columns:repeat(2,minmax(0,1fr))}
  #delivery-detail-modal .delivery-detail-head>div:first-child{grid-column:1/-1;border-inline-end:0;border-bottom:1px solid var(--ui-line)}
  #delivery-detail-modal .delivery-weight-groups-detail .delivery-weight-group-card>header{grid-template-columns:minmax(0,1fr) minmax(94px,.65fr)}
  #delivery-detail-modal .delivery-weight-groups-detail header>.small-action{grid-column:1/-1;justify-self:end}
  #delivery-detail-modal .delivery-measure-total{flex-wrap:wrap;justify-content:flex-start}
  #delivery-detail-modal .delivery-measure-wrap table,#delivery-detail-modal .delivery-measure-wrap tbody{display:block;width:100%}
  #delivery-detail-modal .delivery-measure-wrap thead{display:none}
  #delivery-detail-modal .delivery-measure-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:7px;border-bottom:1px solid var(--ui-line)}
  #delivery-detail-modal .delivery-measure-row>td{display:flex;flex-direction:column;width:auto;height:auto;min-width:0;padding:2px;border:0;text-align:right}
  #delivery-detail-modal .delivery-measure-row>td::before{content:attr(data-label);color:var(--ui-muted);font-size:10px;margin-bottom:3px}
  #delivery-detail-modal .delivery-measure-row>td:first-child{grid-column:1/-1}
  #delivery-detail-modal .delivery-measure-row>td:nth-child(7),#delivery-detail-modal .delivery-measure-row>td:nth-child(8){grid-column:span 1}
  #delivery-detail-modal .delivery-measure-wrap .delivery-table-input{height:32px;min-height:32px}
  #delivery-detail-modal .delivery-detail-footer{padding-inline:6px}
}
@media(max-width:900px){#order-details-view .detail-metrics{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}#order-details-view .order-detail-header .document-title{max-width:38%}#order-details-view .order-detail-header h1{overflow:hidden;text-overflow:ellipsis}}
@media(max-width:900px){#orders-view .orders-register-filter{grid-template-columns:minmax(150px,1fr) minmax(120px,.7fr) 105px 105px auto auto}#completed-orders-view .completed-orders-card>.card-toolbar{align-items:stretch;flex-direction:column}#completed-orders-view .completed-orders-filter{width:100%;margin:0}#pricing-lists-view .pricing-list-filters{grid-template-columns:minmax(140px,170px) minmax(160px,190px) minmax(180px,240px)}}
@media(max-width:760px){#order-details-view>.document-header{position:sticky;display:grid;grid-template-columns:minmax(0,1fr);height:auto;min-height:var(--ui-subbar-h);gap:3px;padding:4px}#order-details-view .order-detail-header .document-title{width:100%;max-width:none}#order-details-view .order-detail-header .document-header-actions{justify-content:flex-start;width:100%;margin:0}#order-details-view .detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#order-details-view .order-detail-metric{min-height:46px}#order-details-view .order-flow{grid-template-columns:repeat(2,minmax(0,1fr))}#order-details-view .related-docs>div{grid-template-columns:minmax(0,1fr) auto}#order-details-view .related-docs>div>span{grid-column:1/-1;grid-row:2}#order-details-view .order-related>.card-toolbar{align-items:center}#order-details-view .order-related>.card-toolbar h2{min-width:0;overflow:hidden;text-overflow:ellipsis}#order-details-view .order-related>.card-toolbar>.button{flex:0 0 auto}}
@media(max-width:760px){#orders-view{--orders-filter-layout:column;--orders-filter-align:stretch}#orders-view>.orders-document-navigation>button,#preparation-work-view>.orders-document-navigation>button,#deliveries-view>.orders-document-navigation>button,#completed-orders-view>.orders-document-navigation>button,#sales-order-party-edit-view>.orders-document-navigation>button{flex:0 0 auto;min-width:max-content;padding-inline:3px;font-size:calc(7.5px + var(--ui-font-step))}#orders-view .orders-status-toolbar{height:auto;min-height:auto}#orders-view .orders-register-filter{grid-template-columns:1fr 1fr}#orders-view .orders-register-filter>:first-child{grid-column:1/-1}#completed-orders-view .completed-orders-filter{grid-template-columns:1fr 1fr}#completed-orders-view .completed-orders-filter>:first-child{grid-column:1/-1}#sales-order-party-edit-view .sales-order-party-lookup{grid-template-columns:1fr}#reports-view .sales-kpi-grid,#quotations-view .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#reports-view .sales-report-layout{grid-template-columns:1fr}#prices-view .catalog-filter-strip{grid-template-columns:1fr 1fr}#prices-view .catalog-filter-strip>:first-child{grid-column:1/-1}#pricing-lists-view .pricing-actions-bar{align-items:stretch;flex-direction:column;gap:4px}#pricing-lists-view .pricing-page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin:0}#pricing-lists-view .pricing-page-actions>.button{min-width:0;padding-inline:4px}#pricing-lists-view .pricing-list-choice{flex:auto;width:100%;min-width:0;grid-template-columns:auto minmax(0,1fr)}#pricing-lists-view .pricing-filter-field{grid-template-columns:1fr;gap:2px}#pricing-lists-view .pricing-list-filters{grid-template-columns:1fr 1fr;width:100%;margin:0}#pricing-lists-view .pricing-list-filters>.table-search{grid-column:1/-1}}
/* Retained sale cancellation history; production/stock facts stay unchanged. */
.cancelled-sale-line{background:#f8f2f2;color:#815757}
.cancelled-sale-line .locked-line-label{color:#aa3535;font-weight:600}
#agent-root-modal .modal-card{width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
@media(max-width:760px){.sales-settings-modal-card{width:calc(100vw - 8px);height:calc(100dvh - 8px)}.sales-setting-options,.sales-settings-grid{grid-template-columns:1fr}.sales-settings-tabs>button{flex:1 1 0;min-width:0;padding-inline:4px}.sales-settings-body{padding:8px}}
#agent-root-modal .modal-body{padding:12px;overflow-y:auto}
#agent-root-modal .field{width:100%}
#customers-view .customer-classification-root>td{background:#e4edf5;color:#183b56;border-color:#b8ccdc}
#customers-view .customer-classification-root .customer-cell{grid-column:2 / -1}
@media(max-width:680px){#customers-view .card-toolbar{flex-wrap:wrap;min-width:0}#customers-view .toolbar-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;gap:4px}#customers-view .toolbar-actions .table-search{grid-column:1 / -1;width:100%;max-width:none}#customers-view .toolbar-actions>button{width:100%;min-width:0}}
