/* Orders refinement: shared controls, bounded column geometry, contextual editors. */
.toolbar-control{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:5px 7px;gap:4px;flex-shrink:0}.toolbar-control svg{width:17px;height:17px}.compact-global{gap:6px}.demo-control{font-size:10px;letter-spacing:.06em;color:var(--text-muted)}.region-control{font-size:17px}.notification-count{position:absolute;right:-3px;top:-5px;border-radius:9px;background:var(--danger);color:#fff;font-size:10px;font-style:normal;padding:1px 4px}.compact-global .avatar{width:27px;height:27px;font-size:10px}.compact-global [data-action=ux-profile]{border:0;background:transparent}.top-toolbar .global-search{max-width:600px;min-width:160px}.orders-compact-toolbar{display:flex;align-items:center;gap:8px;min-height:40px;flex-shrink:0}.orders-compact-toolbar h1{font-size:20px;margin:0 8px 0 0;white-space:nowrap}.orders-query{display:flex;align-items:center;position:relative;flex:1;max-width:550px;min-width:160px}.orders-query label{display:flex;align-items:center;width:100%;gap:7px}.orders-query label>svg{position:absolute;left:10px;width:15px;height:15px;color:var(--text-muted)}.orders-query input{width:100%;height:34px;padding:6px 38px 6px 32px}.orders-query>.toolbar-control{position:absolute;right:2px;top:1px;background:transparent;border:0}.orders-toolbar-secondary{display:flex;gap:6px;margin-left:auto}.orders-toolbar-secondary select{max-width:125px;height:32px;font-size:12px}.orders-refined .queue-tabs{flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;flex-shrink:0;gap:3px;padding:7px 0 4px;margin:0}.orders-refined .queue-tabs button{padding:6px 8px;flex-shrink:0;font-size:12px}.orders-refined .queue-tabs span{font-size:11px}.orders-refined .filter-chips:empty{display:none}.orders-refined .filter-chips{margin:0;padding:0 0 5px;min-height:0}.orders-refined{gap:4px;min-height:0;overflow:hidden}.orders-refined .orders-table-scroll{flex:1;min-height:0;overflow:auto;border:1px solid var(--border-subtle);border-radius:7px}.orders-refined .orders-grid-header,.orders-refined .orders-grid-row{display:flex;min-width:var(--table-width);width:max(100%,var(--table-width));gap:0}.orders-refined .orders-grid-header{height:36px;min-height:36px}.orders-refined .orders-grid-row{height:40px;min-height:40px}.orders-refined.comfortable .orders-grid-row{height:52px;min-height:52px}.orders-refined .cell{box-sizing:border-box;position:relative;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;flex-shrink:0;flex-grow:0;padding:4px 8px;overflow:hidden;font-size:13px;min-width:0;border-right:1px solid var(--border-subtle)}.orders-refined .cell small{font-size:11px;line-height:15px;overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap}.orders-refined .cell>strong{font-size:13px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.orders-refined .select-cell{flex:0 0 34px;width:34px;position:sticky;left:0;align-items:center;z-index:4;background:var(--surface)}.orders-refined .col-number{position:sticky;left:34px;z-index:4;background:var(--surface)}.orders-refined .actions-cell{position:sticky;right:0;z-index:4;flex:0 0 var(--actions-width);width:var(--actions-width);background:var(--surface);flex-direction:row;align-items:center;justify-content:center;gap:3px;overflow:visible;padding:4px}.orders-refined .orders-grid-header .cell{overflow:visible;background:var(--surface-raised);font-size:12px}.orders-refined .orders-grid-header .select-cell,.orders-refined .orders-grid-header .col-number,.orders-refined .orders-grid-header .actions-cell{z-index:7}.orders-refined .actions-cell button{padding:4px;min-width:28px;width:28px;height:28px;flex:0 0 28px}.orders-refined .actions-cell button svg{width:15px;height:15px}.orders-refined.narrow-actions .orders-grid-row .actions-cell button:first-child{display:none}.orders-refined .sort-header{height:100%;width:100%;padding:0 15px 0 0;display:flex;align-items:center;gap:3px;font-size:12px;white-space:nowrap;text-align:left;overflow:hidden;text-overflow:ellipsis}.orders-refined .resize-handle{position:absolute;top:0;bottom:0;right:-4px;width:8px;height:100%;cursor:col-resize;z-index:8;touch-action:none;border-right:0}.orders-refined .resize-handle:after{content:'';position:absolute;top:0;bottom:0;left:3px;width:1px;background:var(--border-default)}.orders-refined .resize-handle:hover:after,.orders-refined .resize-handle:focus:after{background:var(--primary);width:2px}.orders-refined .cell-value{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.orders-refined .status-button{max-width:100%;font-size:11px;padding:4px 6px}.orders-refined .delivery-cell{min-width:0;max-width:100%;overflow:hidden}.orders-refined .delivery-cell>span{font-size:11px}.orders-refined .tracking-value{display:flex;align-items:center;gap:3px;max-width:100%}.tracking-value>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.tracking-value .toolbar-control{min-width:24px;height:26px;width:24px;padding:3px}.orders-refined .order-inline-workspace{position:sticky;left:0;box-sizing:border-box;width:var(--workspace-width);max-width:var(--workspace-width);min-width:0;padding:12px;margin:0;overflow:hidden}.refined-inline-context{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:7px 0;font-size:12px}.order-comments-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;min-width:0}.order-comments-grid .panel{min-width:0;padding:10px}.cell-value{border:0;background:transparent;color:var(--text-primary);display:inline-flex;align-items:center;gap:5px;font-size:13px;line-height:18px;padding:2px 3px;text-align:left;min-width:0;max-width:100%;overflow-wrap:anywhere}.cell-value:hover{background:var(--surface-hover);color:var(--primary)}.edit-affordance{display:inline-flex;flex-shrink:0;opacity:.4}.edit-affordance svg{width:11px;height:11px}.cell-value:hover .edit-affordance{opacity:1}.cell-popover{width:300px}.cell-popover form{display:grid;gap:8px}.cell-popover label{display:grid;gap:6px}.cell-popover input,.cell-popover select,.cell-popover textarea{width:100%;min-width:0}.quantity-input{display:flex;gap:7px}.quantity-input button{flex:0 0 34px}.quantity-input input{flex:1;min-width:0}.cell-popover .form-actions{display:flex;justify-content:flex-end;gap:8px}.field-error:empty{display:none}.field-error{color:var(--danger);font-size:12px;margin:0}.order-filter-panel{display:flex;flex-direction:column;width:520px;overflow:hidden;padding:0}.order-filter-panel>.panel-heading{flex-shrink:0;margin:0;padding:12px 16px;border-bottom:1px solid var(--border-subtle)}.order-filter-panel>form{min-height:0;display:flex;flex-direction:column;overflow:hidden}.order-filter-panel .form-grid{overflow-y:auto;min-height:0;padding:12px 16px;gap:10px}.order-filter-panel .form-actions{flex-shrink:0;display:flex;align-items:center;gap:8px;border-top:1px solid var(--border-subtle);background:var(--surface);padding:12px 16px;margin:0}.order-filter-panel .form-actions small{order:-1;margin-right:auto;white-space:nowrap}.order-filter-panel .form-grid details{padding:8px 0}.order-filter-panel .form-grid details label{margin:7px 0}.order-filter-panel .form-grid input,.order-filter-panel .form-grid select{height:34px}.saved-view-list>div{display:flex;align-items:center;gap:5px;border-bottom:1px solid var(--border-subtle)}.saved-view-list>div>button:first-child{flex:1;text-align:left;justify-content:flex-start}.refined-detail{display:flex;flex-direction:column;gap:10px;min-width:0}.refined-detail-header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px}.refined-detail-header>div:first-child{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}.refined-detail-header h1{font-size:24px;margin:0}.refined-detail-header small{font-size:11px;color:var(--text-muted)}.refined-detail-header>.actions{flex-shrink:0}.order-summary-grid{display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:10px;min-width:0}.order-summary-grid .panel{min-width:0;padding:10px}.order-summary-grid .panel-body{padding:0}.order-summary-grid p{margin:4px 0}.order-summary-grid .panel h2,.order-comments-grid h2{font-size:13px}.order-summary-grid dl{display:grid;grid-template-columns:1fr auto;gap:4px;margin:6px 0;font-size:12px}.order-summary-grid dd{margin:0;text-align:right}.order-summary-grid dt{color:var(--text-muted)}.summary-tracking{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px}.refined-products{min-width:0;overflow:hidden}.refined-products.panel{padding:10px}.refined-products .table-wrap{overflow-x:auto;max-width:100%}.refined-products table{table-layout:auto;width:100%;font-size:12px}.refined-products td{height:48px;padding:5px 7px;vertical-align:middle}.refined-products th{font-size:11px;white-space:nowrap;padding:6px}.refined-products td:first-child{min-width:155px;width:28%;max-width:320px}.refined-products .product-cell{min-width:0}.refined-products .product-cell button{white-space:normal;text-align:left;line-height:16px;max-width:100%;font-size:13px}.refined-products .product-thumb{width:28px;height:28px}.refined-products td .cell-value{font-size:12px;line-height:16px}.refined-products td:first-child>.cell-value{font-size:11px;color:var(--text-muted);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.refined-products .panel-heading{padding:0 0 7px;margin:0}.refined-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:16px;padding:10px 4px 0}.refined-totals span{display:grid;gap:3px}.refined-totals small{font-size:11px;color:var(--text-muted)}.refined-totals strong{font-size:13px}.refined-ai{padding:10px}.refined-ai summary{cursor:pointer;font-size:13px}.refined-detail .detail-tabs{margin:0;min-height:34px;gap:4px;flex-wrap:wrap}.refined-detail .detail-tabs button{padding:5px 9px;font-size:12px}.refined-detail .detail-tab-body{padding:10px}.refined-detail .order-comments-grid{margin:0}.refined-detail .order-comments-grid .cell-value{white-space:pre-wrap;max-height:65px;overflow:auto}.refined-ai:not([open]){min-height:0}.refined-ai .ai-note{margin-top:8px}.popover{max-width:calc(100vw - 16px)}
@media(min-width:521px){#page-content .orders-refined .col-number{display:flex;flex-basis:var(--w-number);width:var(--w-number)}#page-content .orders-refined .col-date{display:flex;flex-basis:var(--w-date);width:var(--w-date)}#page-content .orders-refined .col-source{display:flex;flex-basis:var(--w-source);width:var(--w-source)}#page-content .orders-refined .col-customer{display:flex;flex-basis:var(--w-customer);width:var(--w-customer)}#page-content .orders-refined .col-products{display:flex;flex-basis:var(--w-products);width:var(--w-products)}#page-content .orders-refined .col-amount{display:flex;flex-basis:var(--w-amount);width:var(--w-amount)}#page-content .orders-refined .col-payment{display:flex;flex-basis:var(--w-payment);width:var(--w-payment)}#page-content .orders-refined .col-delivery{display:flex;flex-basis:var(--w-delivery);width:var(--w-delivery)}#page-content .orders-refined .col-status{display:flex;flex-basis:var(--w-status);width:var(--w-status)}#page-content .orders-refined .col-manager{display:flex;flex-basis:var(--w-manager);width:var(--w-manager)}#page-content .orders-refined .col-sourceNumber{display:flex;flex-basis:var(--w-sourceNumber);width:var(--w-sourceNumber)}#page-content .orders-refined .col-tracking{display:flex;flex-basis:var(--w-tracking);width:var(--w-tracking)}#page-content .orders-refined .col-shipmentStatus{display:flex;flex-basis:var(--w-shipmentStatus);width:var(--w-shipmentStatus)}#page-content .orders-refined .col-customerComment{display:flex;flex-basis:var(--w-customerComment);width:var(--w-customerComment)}#page-content .orders-refined .col-managerComment{display:flex;flex-basis:var(--w-managerComment);width:var(--w-managerComment)}}
@media(max-width:1100px){.orders-toolbar-secondary{display:none}.orders-compact-toolbar>.primary{font-size:12px;padding:6px 8px}.order-summary-grid{grid-template-columns:1fr 1fr}.order-summary-grid>.panel:last-child{grid-column:1/-1}.order-summary-grid>.panel:last-child dl{grid-template-columns:1fr 1fr 1fr 1fr}.refined-detail-header{align-items:flex-start}.refined-detail-header>div:first-child{gap:6px}.refined-detail-header small{display:none}}
@media(max-width:520px){.cell-popover.mobile-orders-sheet{width:100%;max-height:65dvh;min-height:0}.cell-popover input,.cell-popover textarea,.cell-popover select{font-size:16px;min-height:42px}.cell-popover .quantity-input button{height:42px;flex-basis:42px}.order-filter-panel.mobile-orders-sheet{max-height:calc(100dvh - 90px - env(safe-area-inset-bottom));width:100%;min-height:0}.order-filter-panel .form-actions{gap:6px;flex-wrap:wrap}.order-filter-panel .form-actions small{width:100%;font-size:11px}.order-filter-panel .form-grid{grid-template-columns:1fr}.filter-chips .toolbar-control{min-width:32px}.cell-value{min-height:32px}.toolbar-control{min-width:36px;height:36px}}
.refined-detail .mobile-call{display:inline-flex;align-items:center;gap:5px;padding:4px;font-size:12px}.refined-detail .mobile-call svg,.refined-detail a svg{width:15px;height:15px;flex-shrink:0}.orders-refined .orders-grid-row .col-number{flex-direction:row;align-items:center;justify-content:space-between;gap:2px}.orders-refined .col-number .tiny{min-width:18px;width:18px;padding:1px}.orders-refined .orders-grid-row .col-source{flex-direction:row;align-items:center;justify-content:flex-start;gap:5px}.orders-refined .col-source>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.orders-refined .col-payment .badge{font-size:11px;padding:3px 5px}.orders-query label>svg{pointer-events:none}.orders-query input{padding-left:32px}
:root{--text-primary:var(--text);--text-secondary:var(--secondary);--text-muted:var(--muted);--border-default:var(--border);--surface-raised:var(--raised);--surface-hover:var(--hover)}.top-toolbar.orders-active .global-search{flex:0 0 32px;min-width:32px;width:32px;padding:6px;justify-content:center}.top-toolbar.orders-active .global-search span,.top-toolbar.orders-active .global-search kbd{display:none}.top-toolbar.orders-active .compact-global{margin-left:auto}.refined-products td{max-height:56px}.refined-products .product-cell button{min-height:28px}
.orders-refined .actions-cell{margin-left:auto}.orders-refined .orders-grid-row .col-source .channel-icon{flex-shrink:0}.refined-products td:first-child .product-cell{height:auto}.refined-products .product-link{align-items:center}.order-filter-panel .form-actions button.primary{min-width:100px}
.cell-value-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-comments-grid .cell-value-text{white-space:pre-wrap;overflow-wrap:anywhere}.source-comment-origin{font-size:11px;color:var(--muted);margin:4px 0}.source-comment-origin summary{cursor:pointer}
.orders-query input:not([type="checkbox"]):not([type="color"]){padding:6px 38px 6px 32px}
@media(min-width:901px) and (max-width:1100px){.order-summary-grid{grid-template-columns:1fr 1.1fr 1fr}.order-summary-grid>.panel:last-child{grid-column:auto}.order-summary-grid>.panel:last-child dl{grid-template-columns:1fr auto}}
