:root{--ds-navy:#173d69;--ds-blue:#235c99;--ds-border:#d4dfeb;--ds-muted:#748397;--ds-bg:#f1f4f8}body{background:var(--ds-bg);color:#263c53;font-family:'Microsoft YaHei','PingFang SC',Arial,sans-serif;font-size:13px}.app-shell{grid-template-columns:192px minmax(0,1fr)}.sidebar{background:#143459}.brand{height:54px;padding:0 16px;border-bottom:1px solid #ffffff18}.brand strong{font-size:19px;letter-spacing:1px}.nav-link{border-radius:3px!important;font-size:13px;padding:8px 12px!important}.nav-group>summary{font-size:13px;padding:11px 14px!important}.nav-group[open]>summary{background:#ffffff0b}.nav-link.selected{background:#2b5684!important;border-left:3px solid #79b5f3}.topbar{height:54px;padding:0 18px;box-shadow:none;border-bottom:1px solid var(--ds-border);background:white}.topbar h1{font-size:19px;line-height:24px}.crumb{font-size:10px;line-height:13px;letter-spacing:1px;color:#8391a2}.user-box{gap:12px;font-size:12px}.build-badge,.role-badge{border-radius:3px;font-size:11px;padding:3px 6px}.content-panel{padding:14px 18px}.card{padding:12px 14px;border:1px solid var(--ds-border);border-radius:4px;box-shadow:none;margin-bottom:12px}.card-head{margin-bottom:9px;gap:10px;align-items:center}.card-head h2{font-size:15px;margin:0}.card-head .hint{margin:4px 0 0;max-width:1050px;line-height:1.65;font-size:12px}.hint,.wb-muted{font-size:12px;color:var(--ds-muted)}
button{font:inherit;cursor:pointer;border:1px solid #b9cce0;border-radius:3px;padding:6px 12px;min-height:31px;background:#fff;color:#24527f;line-height:18px;white-space:nowrap;transition:background .12s,border-color .12s}button:hover{background:#eaf1f9;border-color:#7196bc}button:disabled{opacity:.46;cursor:not-allowed}.primary,button.primary,.wb-button.primary,#saveOrderBtn,#submitOrderBtn,#moduleNewBtn{background:var(--ds-navy);border-color:var(--ds-navy);color:#fff}.primary:hover,button.primary:hover{background:#245584}button.danger,[data-delete],#cancelOrderBtn,[data-exception]{color:#b4494d;border-color:#dbb9bb;background:#fff}button.danger:hover,[data-delete]:hover,#cancelOrderBtn:hover,[data-exception]:hover{background:#fff0f0}.nav-link,.brand button,.nav-group button{min-height:unset}.wb-button{border-radius:3px;min-height:31px;padding:6px 12px;font-size:12px}.link-button{border:1px solid #b9cce0;border-radius:3px!important;padding:3px 8px}.action-buttons{display:flex;gap:5px;flex-wrap:wrap}input,select,textarea{font:inherit;color:#263c53;border:1px solid #c7d4e3;border-radius:3px;padding:6px 8px;background:#fff;min-height:31px}input:focus,select:focus,textarea:focus{outline:2px solid #80b1e14d;outline-offset:0;border-color:#6099d0}input:disabled,select:disabled{background:#f3f6f9;color:#8090a1}textarea{min-height:66px}.toolbar,.wb-toolbar{gap:8px;align-items:center;margin-bottom:10px}.toolbar input,.toolbar select,.wb-toolbar input,.wb-toolbar select{padding:6px 8px;min-height:31px}.document-toolbar{padding:8px 0;gap:6px;border-bottom:1px solid var(--ds-border);margin:0 0 10px;display:flex;flex-wrap:wrap;background:transparent}.document-toolbar button{min-width:unset;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 10px;font-size:14px;border:1px solid #c0d0e2;background:white;border-radius:3px}.document-toolbar button small{display:inline;font-size:12px;line-height:18px}.document-toolbar #saveOrderBtn,.document-toolbar #submitOrderBtn{background:var(--ds-navy);color:white;border-color:var(--ds-navy)}.document-card{padding:12px 0 0;background:#fff;overflow:hidden}.document-card>.form-grid,.ds-order-more{margin:0 14px}.form-grid{grid-template-columns:repeat(4,minmax(180px,1fr));gap:9px 16px}.form-grid label{grid-template-columns:92px minmax(0,1fr);gap:6px;align-items:center;font-size:12px}.form-grid label.wide{grid-column:span 2}.form-grid input,.form-grid select{width:100%;min-width:0}.form-grid .customer-field{position:relative}.customer-field .required{position:absolute;left:29px;top:6px}.input-suffix input{padding-right:22px}.status-strip{display:flex;flex-wrap:wrap;gap:22px;margin:10px 0 0;padding:8px 14px;background:#f5f8fc;border-top:1px solid var(--ds-border);border-bottom:1px solid var(--ds-border);font-size:12px}.status-strip b{color:#24527f}.ds-order-more{margin-top:9px}.ds-order-more summary{font-size:12px;color:#42678d;cursor:pointer;padding:4px 0}.ds-order-more[open] summary{margin-bottom:8px}.ds-order-more .form-grid{grid-template-columns:repeat(4,minmax(160px,1fr))}.ds-grid-totals{display:flex;align-items:center;justify-content:flex-end;gap:28px;padding:10px 14px;border-top:1px solid var(--ds-border);background:#f5f8fc;font-size:12px;position:sticky;bottom:0;z-index:2}.ds-grid-totals>span:first-child{margin-right:auto;font-weight:600}.ds-grid-totals b{margin-left:8px;font-variant-numeric:tabular-nums}.add-line{margin:8px 14px 12px!important;padding:5px 12px!important;font-size:12px}
.table-wrap{border:1px solid var(--ds-border);border-radius:2px;max-width:100%;overflow:auto;background:white}.document-card .table-wrap{border-left:0;border-right:0;border-radius:0}.table-wrap table,table{border-collapse:collapse;table-layout:fixed;font-size:12px}.table-wrap th,table th{height:35px;background:#edf3f9;color:#3e5978;font-size:12px;font-weight:600;border:1px solid var(--ds-border);padding:7px 9px;white-space:nowrap;position:relative}.table-wrap td,table td{height:35px;padding:5px 9px;border:1px solid #e0e7ef;line-height:22px;overflow:hidden;text-overflow:ellipsis}.table-wrap tbody tr:nth-child(even){background:#f8fafc}.table-wrap tbody tr:hover{background:#edf5ff}.table-wrap td button{padding:3px 8px;min-height:26px;font-size:12px;margin:1px 2px}.table-wrap td input,.table-wrap td select{height:28px;min-height:28px;padding:3px 6px;border-radius:2px}.order-lines{min-height:385px;max-height:calc(100vh - 342px)}.order-lines td{height:38px}.ds-table-tools{display:flex;justify-content:flex-end;align-items:center;padding:5px 0;min-height:31px}.ds-table-tools button{font-size:11px;min-height:25px;padding:2px 9px}.document-card>.ds-table-tools{padding:4px 14px}.col-resizer{position:absolute;right:-4px;top:0;width:8px;height:100%;border-right:0!important;cursor:col-resize;z-index:2}.col-resizer:hover{background:#91b2d050}.resizing-column{cursor:col-resize!important;user-select:none}.ds-column-menu{margin:0;padding:5px;width:200px;border:1px solid #b9cce0;border-radius:3px;box-shadow:0 6px 20px #203b5526;position:fixed}.ds-column-menu::backdrop{background:transparent}.ds-column-menu button{display:block;width:100%;text-align:left;border:0;min-height:32px}.ds-columns-dialog{width:540px;max-width:calc(100vw - 28px);padding:18px;border:1px solid var(--ds-border);border-radius:5px}.ds-columns-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 0 16px;max-height:55vh;overflow:auto}.ds-columns-list label{display:flex;align-items:center;gap:7px;font-size:12px;cursor:pointer}.ds-columns-list input{width:14px;height:14px;min-height:0;accent-color:var(--ds-navy)}dialog{border:1px solid #bccddd;border-radius:5px;padding:18px;max-height:92vh;box-shadow:0 18px 70px #1a375e33}dialog::backdrop{background:#1a304755}.dialog-form{gap:10px 18px}.dialog-form label{font-size:12px}.dialog-actions{gap:8px;padding-top:12px;margin-top:12px;border-top:1px solid var(--ds-border)}.ds-purchase-dialog{width:1440px;max-width:96vw}.direct-purchase-header{grid-template-columns:repeat(3,minmax(180px,1fr));gap:8px 18px}.direct-purchase-header label{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:6px}.direct-purchase-header textarea{height:34px;min-height:34px}.direct-purchase-grid td{height:38px}.direct-purchase-grid{max-height:48vh}.detail-toolbar{gap:8px;margin:10px 0 0}#directPurchaseTotal{padding:9px 12px;background:#f1f6fc;border:1px solid var(--ds-border);margin:0;font-weight:600}#directPurchaseGridForm>p{font-size:12px;color:#627892}
.wb-panel{padding:16px 20px;max-width:none}.wb-page-heading{margin-bottom:14px;gap:8px}.wb-page-heading>div{flex:1}.wb-page-heading h2{font-size:21px;margin:0 0 4px;color:#243d59}.wb-page-heading p{font-size:12px;margin:0;color:#8694a6}.wb-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:16px}.wb-metric{display:grid;grid-template-columns:38px 1fr;grid-template-rows:20px 28px;padding:13px 14px;text-align:left;border:1px solid #dce5ef;background:#fff;border-radius:5px;min-width:0;box-shadow:0 2px 6px #19375005}.wb-metric>span{grid-column:2;grid-row:1;font-size:12px;color:#687e98}.wb-metric strong{grid-column:2;grid-row:2;font-size:25px;line-height:28px;color:#264765}.wb-metric strong em{font-size:11px;font-weight:400;font-style:normal;margin-left:6px;color:#8394a7}.wb-metric small{display:none}.wb-metric .ds-metric-icon{grid-column:1;grid-row:1/span 2;align-self:center;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:5px;background:#e9f1ff;color:#558ac4}.wb-metric.orange .ds-metric-icon{background:#fff1de;color:#cf9240}.wb-metric.red .ds-metric-icon{background:#ffeded;color:#d16a6b}.ds-metric-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}.wb-metric.selected{border-color:#6598cc;background:#f7fbff;box-shadow:0 0 0 1px #6598cc}.wb-panel>.card{padding:12px 14px}.wb-toolbar{padding:0;gap:8px}.wb-toolbar input{max-width:300px}.wb-table td{height:62px}.wb-table td small{display:block;font-size:11px;color:#8795a6;line-height:18px}.wb-badge{border-radius:3px;padding:3px 7px;font-size:11px;display:inline-flex}.wb-tabs{gap:24px;padding:0 3px;border-bottom:1px solid var(--ds-border);margin:0 0 14px;overflow:auto;flex-wrap:nowrap}.wb-tabs button{background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;padding:10px 2px!important;min-height:38px;color:#72869c!important}.wb-tabs button.primary{border-bottom-color:#356da9!important;color:#245c97!important;font-weight:600}.wb-task-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.wb-task-card{padding:16px;border:1px solid var(--ds-border);border-radius:5px;box-shadow:0 2px 7px #16345306}.wb-task-head{margin-bottom:10px;gap:8px}.wb-task-head h3{font-size:16px;margin:0;display:flex;align-items:center;gap:8px}.ds-process-icon{display:inline-flex;justify-content:center;align-items:center;width:29px;height:29px;background:#e9f1fc;color:#3c74b4;border-radius:4px;font-size:16px}.wb-product{display:flex;align-items:center;gap:10px;font-size:13px;margin:8px 0 4px;min-height:46px}.wb-thumbnail{width:54px;height:45px;min-height:0;border:1px solid #dee5ee;padding:2px;border-radius:3px;background:#fafbfd;flex:none}.wb-thumbnail img{width:100%;height:100%;object-fit:contain}.wb-task-card>small{color:#8897a8;font-size:11px}.wb-task-card dl{grid-template-columns:80px minmax(0,1fr);font-size:12px;gap:7px;margin:13px 0}.wb-task-card dt{color:#8292a5}.wb-task-card dd{margin:0;color:#405976}.wb-quantities{padding:10px 0;border-top:1px solid #e7edf4;border-bottom:1px solid #e7edf4;margin:10px 0;gap:8px}.wb-quantities b{font-size:19px;line-height:24px}.wb-quantities small{font-size:11px}.wb-task-card progress{height:5px;margin:3px 0 12px;accent-color:#4cac7e}.wb-task-actions{gap:7px;display:flex;flex-wrap:wrap}.wb-task-actions .primary{flex:1}.wb-task-actions [data-detail]{width:100%}.wb-blocker{padding:8px;font-size:12px;border-radius:3px;margin-bottom:10px}.ds-exceptions{border:1px solid #ecd2d3;border-radius:4px;background:#fff8f8;padding:0 14px;margin-top:12px}.ds-exceptions>summary{cursor:pointer;display:flex;gap:10px;align-items:center;padding:10px 0;color:#aa5659;font-size:12px}.ds-exceptions>summary strong{margin-right:auto}.ds-exceptions .card-head{margin-top:8px}.ds-stages{display:flex;align-items:center;justify-content:center;gap:0;margin-bottom:4px}.ds-stages span{position:relative;color:#9aa9ba;font-size:10px;padding:0 6px;text-align:center}.ds-stages span:before{content:'';display:block;width:7px;height:7px;margin:0 auto 4px;background:#d3dfeb;border-radius:50%;position:relative;z-index:1}.ds-stages span+span:after{content:'';position:absolute;top:3px;right:50%;width:100%;height:1px;background:#d3dfeb}.ds-stages span.done{color:#4380bb}.ds-stages span.done:before,.ds-stages span.done:after{background:#72a4d4}.ds-due{font-size:11px;display:block;color:#74889f}.ds-due.urgent{color:#c57051}.wb-config-heading,.wb-product-picker{gap:10px}.wb-product-picker{grid-template-columns:1fr 1fr auto}.metric-grid{gap:12px}.metric-card{border-radius:4px;padding:14px;box-shadow:none}.dashboard-grid{gap:14px}.result-box{border-radius:3px}
@media(min-width:901px){body.sidebar-collapsed .app-shell{grid-template-columns:54px minmax(0,1fr)}body.sidebar-collapsed .sidebar{width:54px}body.sidebar-collapsed .brand{padding:0;justify-content:center}body.sidebar-collapsed .brand strong{display:none}body.sidebar-collapsed .nav-group>summary{font-size:0;padding:12px 0!important;text-align:center}body.sidebar-collapsed .nav-group>summary:before{content:attr(data-rail);font-size:12px;color:#cfdfef}body.sidebar-collapsed .nav-group>.nav-children{display:none}body.sidebar-collapsed .nav-link{font-size:0!important;min-height:32px}body.sidebar-collapsed .nav-link:before{content:'⌂';font-size:18px}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed){width:192px;z-index:20;box-shadow:6px 0 18px #18345126}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .brand{padding:0 16px;justify-content:space-between}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .brand strong{display:block}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-group>summary{font-size:13px;padding:11px 14px!important;text-align:left}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-group>summary:before,body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-link:before{display:none}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-group[open]>.nav-children{display:block}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-link{font-size:13px!important}}
@media(max-width:1250px){.wb-metrics{gap:8px}.wb-metric{padding:10px;grid-template-columns:32px 1fr}.wb-task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid,.ds-order-more .form-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.user-box .build-badge{display:none}}
@media(max-width:900px){.app-shell{grid-template-columns:minmax(0,1fr)}.content-panel,.wb-panel{padding:12px}.sidebar{width:192px}.topbar{padding:0 12px}.wb-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.wb-toolbar{flex-wrap:wrap}.wb-page-heading{flex-wrap:wrap}.wb-page-heading>div{min-width:65%}.wb-task-grid{grid-template-columns:1fr}.wb-product-picker,.direct-purchase-header{grid-template-columns:1fr}.ds-grid-totals{gap:10px;flex-wrap:wrap}.user-box{gap:6px}.user-box button{padding:4px 7px}.ds-columns-list{grid-template-columns:repeat(2,1fr)}.form-grid,.ds-order-more .form-grid{grid-template-columns:1fr}.form-grid label.wide{grid-column:auto}.order-lines{min-height:260px;max-height:55vh}.status-strip{gap:8px 16px}.wb-tabs{gap:18px}.wb-task-card{padding:14px}.ds-purchase-dialog{max-width:98vw;padding:12px}.card-head{flex-wrap:wrap}}
/* Navigation uses section headings; keep the compact rail consistent with grouped menus. */
.nav-group>.nav-title{padding:10px 14px!important;font-size:12px!important}.nav-children .nav-link{padding-left:26px!important}.brand{background:#123153}.customer-field{grid-template-columns:92px minmax(0,1fr)!important}.card-head>div:has(.hint){display:block}.card-head button,.user-box button,.action-form button{border-radius:3px;padding:6px 11px;font-size:12px;min-height:31px}.wb-table .wb-product{margin:0;min-height:48px}.wb-table .wb-product>div{min-width:0;white-space:normal}.wb-table td{white-space:normal}.direct-purchase-header label:has(#field_reason),.direct-purchase-header label:has(#field_remark){grid-column:span 3}.ds-purchase-dialog .table-wrap{max-height:44vh}.ds-order-more input{height:31px}.ds-grid-totals{color:#4c6480}.ds-grid-totals b{color:#203e61}.box{border-radius:5px!important;border-color:#cfdce9!important;box-shadow:0 12px 45px #16345314!important}.box .logo{color:#173d69}.box .btn{background:#173d69;border-radius:3px}.box .field input{border-radius:3px}
@media(min-width:901px){body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-title{font-size:12px!important;padding:10px 14px!important;justify-content:space-between}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-title-text,body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-arrow{display:inline!important}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-title::before{display:none}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-group.open>.nav-children{display:block!important}}
@media(max-width:900px){.direct-purchase-header label:has(#field_reason),.direct-purchase-header label:has(#field_remark){grid-column:auto}}
.metric{border-radius:4px;border-top:1px solid var(--ds-border);border-left:3px solid #507da9;padding:12px 14px}.metric b{font-size:24px;color:#254969}.hint{border-left:2px solid #abc0d5;padding:6px 9px;background:#f7f9fc}.table-wrap tbody td{background:transparent}.table-wrap tbody tr:nth-child(even) td{background:#f8fafc}.table-wrap tbody tr:hover td{background:#edf5ff}.wb-metric.orange,.wb-metric.red{border-top-color:var(--ds-border)}.dialog-head button{border:1px solid #c1d1e1;border-radius:3px;width:31px;height:31px;min-height:31px;padding:0;font-size:20px;color:#627b96}.ds-column-menu button{width:100%}.ds-table-tools button{border-radius:3px}
.ds-purchase-more{font-size:12px;margin:7px 0;color:#607b98}.ds-purchase-more summary{cursor:pointer}.ds-purchase-more label{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:6px;margin-top:8px}.ds-purchase-more textarea{min-height:34px;height:34px;width:100%}.detail-toolbar:has(+.ds-table-tools){padding-right:110px;margin-bottom:-31px;min-height:31px}.ds-purchase-dialog .ds-table-tools{padding-top:0;padding-bottom:0}
/* v1.6.13: structural restoration of the approved desktop ERP layout. */
.topbar{height:42px;gap:0;padding:0 14px;box-shadow:none}.topbar>.ds-top-brand{font-size:20px;color:#123c68;margin-right:36px;letter-spacing:.3px}.topbar>div:has(#pageTitle){display:contents}.topbar .crumb{display:none}.topbar #pageTitle{font-size:14px;padding:12px 18px 10px;border-bottom:3px solid #2475bd;line-height:17px;margin:0;align-self:stretch;font-weight:600}.ds-home-tab{border:0;border-radius:0;color:#607a97;background:transparent;margin-right:10px;padding:10px 18px;min-height:39px}.topbar .user-box{margin-left:auto}.ds-nav-icon{display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;flex:none}.ds-nav-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.nav-title{gap:10px}.nav-title-text{flex:1}.nav-link .ds-nav-icon{display:none}.brand{height:42px}.brand button{color:#e3eef9}.main:has(#salesPanel:not(.hidden)){background:white}.content-panel#salesPanel{padding:0 14px 0;display:flex;flex-direction:column;height:calc(100dvh - 42px);gap:0}.content-panel#salesPanel.hidden{display:none!important}#salesToolbar{flex:none;min-height:58px;margin:0;padding:10px 0;border:0;border-bottom:1px solid var(--ds-border);gap:10px;background:white;overflow:visible;align-items:center}#salesToolbar button{min-height:34px;padding:6px 15px;font-size:16px;min-width:96px;background:#fff;border:1px solid #adc2d9;box-shadow:0 1px 2px #23496a0a}#salesToolbar button small{font-size:12px;margin:0}#salesToolbar #saveOrderBtn,#salesToolbar #submitOrderBtn{background:#174e88;color:white;border-color:#174e88}#salesToolbar #cancelOrderBtn{color:#c3494e;border-color:#d7787c}#orderEditor{border:0;border-radius:0;padding:12px 0 0;margin:0;box-shadow:none;display:flex;flex-direction:column;flex:1;min-height:0;overflow:visible}#orderEditor.hidden{display:none!important}#orderEditor>.form-grid{margin:0;gap:10px 25px;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 0 12px}#orderEditor>.form-grid label{grid-template-columns:82px minmax(0,1fr);font-size:12px;gap:6px}#orderEditor>.form-grid .customer-field{grid-template-columns:82px minmax(0,1fr)!important}#orderEditor>.form-grid input,#orderEditor>.form-grid select{height:30px;min-height:30px;border-radius:2px;padding:3px 8px}#orderEditor .customer-field .required{left:29px;top:4px}.ds-sales-extra{border-top:1px solid #e8eef5;border-bottom:1px solid var(--ds-border);display:grid;grid-template-columns:1.15fr 1.15fr .7fr 1fr;align-items:start;gap:16px;min-height:43px;padding:7px 0;color:#4f6b89;font-size:12px}.ds-sales-extra>label{display:grid;grid-template-columns:55px minmax(0,1fr);gap:8px;align-items:center}.ds-sales-extra input{height:29px;min-height:29px;padding:4px 7px;width:100%;font-size:12px}.ds-sales-extra summary{cursor:pointer;line-height:29px}.ds-sales-extra details[open]{grid-column:span 2}.ds-sales-extra .form-grid{grid-template-columns:1fr;gap:6px;margin:6px 0}.ds-sales-extra .form-grid label{grid-column:auto;grid-template-columns:72px minmax(0,1fr)}.ds-remark label{display:grid;grid-template-columns:70px minmax(0,1fr);gap:6px;margin:6px 0}.ds-detail-head{display:flex;align-items:center;gap:20px;min-height:51px;flex:none;padding:7px 0}.ds-detail-head h2{font-size:16px;margin:0;white-space:nowrap;color:#1a395c}.ds-detail-head .status-strip{display:flex;margin:0;padding:0;border:0;background:transparent;gap:13px;align-items:center;font-size:11px;flex:1;min-width:0;flex-wrap:wrap}.ds-detail-head .status-strip>span:nth-child(3){display:none}.ds-detail-head .ds-table-tools{padding:0;display:flex;gap:8px;flex:none}.ds-detail-head .ds-table-tools button{font-size:12px;min-height:29px;padding:4px 11px;margin:0!important;background:white;border:1px solid #9fb8d3}#orderEditor .order-lines{flex:1;min-height:0;max-height:none;border:1px solid var(--ds-border);border-bottom:0;position:relative}#linesTable th{height:31px;padding:4px 7px;font-size:12px}#linesTable td{height:31px;padding:2px 6px;line-height:24px}#linesTable td input{height:26px;min-height:26px;padding:2px 5px;border:1px solid transparent;background:transparent;border-radius:0;box-shadow:none}#linesTable td input:focus{background:white;border-color:#3885c9;outline:1px solid #3885c9;outline-offset:0}#linesTable td button{min-height:23px;padding:1px 8px;font-size:11px}#salesGridTotals{flex:none;position:static;border:1px solid var(--ds-border);min-height:39px;padding:8px 12px;background:#f3f7fb;gap:44px;font-size:12px}#salesGridTotals>span:first-child{font-size:13px}#salesGridTotals b{font-size:13px;color:#133d68}.ds-sales-footer{display:flex;align-items:center;gap:10px;padding:10px 0;min-height:53px;flex:none;font-size:11px;color:#8a9aae}.ds-sales-footer>span{margin-right:auto}.ds-sales-footer button{min-height:33px;padding:6px 17px;border-radius:2px;background:#174e88;font-size:12px}.ds-sales-footer button:disabled{opacity:.45}#orderList{margin-top:12px}#orderEditor input[type=number]{appearance:textfield}#orderEditor input[type=number]::-webkit-inner-spin-button{appearance:none}
@media(min-width:901px){body.sidebar-collapsed .app-shell{grid-template-columns:54px minmax(0,1fr)}body.sidebar-collapsed .sidebar{background:linear-gradient(#153a63,#173f6b)}body.sidebar-collapsed .brand{background:transparent}body.sidebar-collapsed .nav-title::before,body.sidebar-collapsed .nav-link::before{display:none!important}body.sidebar-collapsed .nav-group>.nav-title{padding:12px 0!important;height:49px}body.sidebar-collapsed .nav-group.open>.nav-title{background:#28669f;border-left:3px solid #73baff}body.sidebar-collapsed .nav-title .ds-nav-icon{display:inline-flex}body.sidebar-collapsed .nav-link>.ds-nav-icon{display:inline-flex}body.sidebar-collapsed #mainNav>.nav-link{height:49px;text-align:center;padding:10px 0!important;overflow:hidden}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed){width:220px}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-title{height:auto}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) .nav-title-text{display:inline!important}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) #mainNav>.nav-link{font-size:13px!important;text-align:left;padding:8px 14px!important}body.sidebar-collapsed .sidebar:hover:not(.workspace-menu-dismissed) #mainNav>.nav-link>.ds-nav-icon{display:none}}
@media(max-width:1250px) and (min-width:901px){#salesToolbar{gap:6px}#salesToolbar button{min-width:unset;padding:6px 10px}#orderEditor>.form-grid{gap:8px 14px}#orderEditor>.form-grid label{grid-template-columns:76px minmax(0,1fr)}#orderEditor>.form-grid .customer-field{grid-template-columns:76px minmax(0,1fr)!important}.ds-sales-extra{grid-template-columns:1fr 1fr;gap:8px}.ds-detail-head{gap:10px}#salesGridTotals{gap:22px}}
@media(max-width:900px){.topbar>.ds-top-brand{display:none}.topbar #pageTitle{font-size:15px;padding:10px 6px}.topbar .ds-home-tab{display:none}.topbar{padding:0 10px;gap:6px}.content-panel#salesPanel{height:auto;padding:0 10px;min-height:calc(100dvh - 42px)}#salesToolbar{gap:6px;padding:8px 0;flex-wrap:wrap}#salesToolbar button{min-width:unset;font-size:13px;padding:5px 8px}#orderEditor>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}#orderEditor>.form-grid label,#orderEditor>.form-grid .customer-field{grid-template-columns:1fr!important;gap:4px}.ds-sales-extra{grid-template-columns:1fr 1fr;gap:8px}.ds-sales-extra>label{grid-template-columns:1fr}.ds-detail-head{flex-wrap:wrap;gap:6px}.ds-detail-head .status-strip{flex-basis:70%}.ds-detail-head .ds-table-tools{margin-left:auto}.ds-sales-extra details[open]{grid-column:1/-1}#orderEditor .order-lines{min-height:350px;max-height:55vh;flex:none}#salesGridTotals{gap:12px;flex-wrap:wrap}.ds-sales-footer>span{display:none}.ds-sales-footer{justify-content:flex-end}.topbar .user-box{font-size:11px;gap:5px}}
.ds-sales-extra>label:last-child{grid-template-columns:88px minmax(0,1fr)}#linesTable td{height:clamp(31px,calc((100dvh - 440px)/15),45px)}#linesTable tr:has(.product-input[data-product-id='']):not(:focus-within) .product-input::placeholder{color:transparent}#linesTable tbody tr:first-child .product-input::placeholder,#linesTable tr:has(.product-input[data-product-id]:not([data-product-id='']))+tr .product-input::placeholder{color:#899aae}#linesTable .view-line{color:#296797;border-color:#9fbcd7}.ds-detail-head{padding-bottom:7px}.ds-sales-footer{border-top:1px solid #eef2f7}
@media(max-width:900px){#linesTable td{height:31px}.ds-sales-extra>label:last-child{grid-template-columns:1fr}}

/* Product dossier and BOM workspace */
.pw-dialog{width:min(1240px,96vw);max-width:96vw;max-height:92vh;padding:0;border:1px solid #d6deec;border-radius:8px;box-shadow:0 20px 70px #17254240;color:#26364c;background:#fff;overflow:auto}.pw-dialog::backdrop{background:#13243d55}.pw-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;background:#eef2f9;border-bottom:1px solid #dce3ee}.pw-header small{font-size:12px;color:#63728a}.pw-header h2{font-size:21px;margin:5px 0 0}.pw-header h2 span{font-size:16px;font-weight:400;color:#586780}.pw-button{border:1px solid #c5cfe0;border-radius:4px;padding:8px 17px;background:#fff;color:#344a6d;cursor:pointer;font:inherit;white-space:nowrap}.pw-button.primary{background:#4657af;border-color:#4657af;color:white}.pw-button:disabled{opacity:.5;cursor:wait}.pw-tabs{display:flex;gap:12px;border-bottom:1px solid #dce3ee;padding:0 24px;overflow:auto}.pw-tabs .pw-button{background:none;border:0;border-radius:0;border-bottom:3px solid transparent;padding:17px 12px;color:#69778b}.pw-tabs .pw-button[aria-selected=true]{color:#3549a1;border-bottom-color:#4657af;font-weight:700}.pw-body{padding:22px 26px;min-height:350px}.pw-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 24px;margin-bottom:24px}.pw-fields label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#59677a}.pw-fields input,.pw-fields select,.pw-fields textarea,.pw-dialog table input:not([type=checkbox]),.pw-dialog table select{box-sizing:border-box;width:100%;min-height:36px;border:1px solid #c8d3e5;border-radius:4px;padding:7px 10px;font:inherit;color:#293950;background:#fff}.pw-fields input:disabled,.pw-fields select:disabled,.pw-fields textarea:disabled{background:#f6f8fb;color:#33445b;opacity:1}.pw-fields textarea{min-height:100px}.pw-fields label:has(textarea){grid-column:1/-1}.pw-dialog h3{font-size:15px;margin:18px 0 12px}.pw-dialog table{border-collapse:collapse;width:100%;font-size:13px}.pw-dialog th{background:#eef2f8;color:#4c5e78;font-weight:500}.pw-dialog td,.pw-dialog th{padding:10px 12px;border:1px solid #e0e6ef;text-align:left}.pw-dialog tbody tr:nth-child(even){background:#f8faff}.pw-footer{position:sticky;bottom:0;display:flex;align-items:center;gap:10px;padding:14px 24px;border-top:1px solid #dce3ee;background:white;z-index:2}.pw-footer>span:first-child{margin-right:auto;font-size:12px;color:#6c7a8e}.pw-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0}.pw-bom-toolbar{padding:0 24px}.pw-note{font-size:12px;color:#748199;line-height:1.7}.pw-bom-note{margin:0 24px}.pw-tree-root{display:flex;gap:18px;align-items:center;padding:14px 16px;background:#eef2fb;border:1px solid #d9e2f2}.pw-tree-root span{font-size:12px;color:#62728a}.pw-tree details{margin:14px 0 0 20px;padding-left:18px;border-left:1px solid #cdd7e6}.pw-tree summary{cursor:pointer;font-size:14px;font-weight:600;padding:9px 0}.pw-tree summary small{font-size:12px;color:#8894a5;font-weight:400;margin-left:12px}.pw-tree-leaf{display:flex;justify-content:space-between;gap:24px;padding:11px 16px;border-bottom:1px solid #edf0f5;font-size:13px}.pw-tree-leaf span:last-child{color:#748199;white-space:nowrap}.pw-empty{color:#8894a5;padding:25px;text-align:center}#bomWorkspace table{min-width:1650px}#bomWorkspace td:first-child{min-width:200px}#bomWorkspace td:nth-child(2){min-width:230px}#bomWorkspace input[type=number]{min-width:85px}.pw-paste{margin-top:20px}.pw-paste textarea{width:100%;box-sizing:border-box;font:inherit;border:1px solid #c8d3e5;padding:10px;margin:10px 0}.pw-image-preview{display:block;width:100%;border:0;background:#f7f8fb;padding:0;cursor:zoom-in}.pw-image-dialog{width:min(1000px,94vw);max-height:94vh;border:0;border-radius:6px;padding:16px}.pw-image-dialog img{display:block;width:100%;max-height:80vh;object-fit:contain}.pw-image-dialog button{float:right;margin-bottom:10px}.pw-dialog .image-gallery{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.pw-dialog .image-gallery img{height:200px}#productDossierForm{display:block}#productDossierForm section[hidden]{display:none!important}@media(max-width:760px){.pw-fields{grid-template-columns:1fr 1fr}.pw-header{padding:14px}.pw-header h2{font-size:17px}.pw-header h2 span{display:block;font-size:14px;margin-top:4px}.pw-body{padding:16px}.pw-tabs{gap:4px;padding:0 12px}.pw-tree-leaf{flex-direction:column;gap:6px}.pw-tree-leaf span:last-child{white-space:normal}.pw-footer{padding:12px;flex-wrap:wrap}.pw-bom-toolbar{padding:0 14px}}@media(max-width:460px){.pw-fields{grid-template-columns:1fr}}

/* Purchase documents use the same full-page structure as sales orders. */
.main:has(#purchaseDocumentPanel:not(.hidden)){background:#fff}#purchaseDocumentPanel{display:flex;flex-direction:column;height:calc(100dvh - 42px);padding:0 14px;gap:0;min-height:0}#purchaseDocumentPanel.hidden{display:none!important}.pc-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;min-height:58px;padding:10px 0;border-bottom:1px solid var(--ds-border);flex:none}.pc-toolbar button{min-height:34px;padding:6px 15px;font-size:13px;min-width:96px;border-radius:3px}.pc-toolbar .primary{background:#174e88;border-color:#174e88;color:#fff}.pc-document-editor{display:flex;flex-direction:column;flex:1;min-height:0;padding-top:12px}#directPurchaseGridForm{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}.pc-document-header{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 25px;padding-bottom:12px;flex:none}.pc-document-header label{display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center;font-size:12px;gap:6px;color:#35577e}.pc-document-header input,.pc-document-header select{width:100%;min-width:0;box-sizing:border-box;height:30px;min-height:30px;border-radius:2px;padding:3px 8px}.pc-document-header input[readonly]{background:#f6f8fb;color:#536d89}.pc-document-extras{display:flex;align-items:start;gap:28px;min-height:43px;padding:7px 0;border-top:1px solid #e8eef5;border-bottom:1px solid var(--ds-border);font-size:12px;color:#4f6b89;flex:none;flex-wrap:wrap}.pc-document-extras details{flex:1;min-width:200px}.pc-document-extras summary{line-height:29px;cursor:pointer}.pc-document-extras>span{line-height:29px;color:#8190a4}.pc-document-extras details label{display:block}.pc-document-extras details label textarea{width:100%;box-sizing:border-box;min-height:58px;margin:6px 0}.pc-document-extras details p{white-space:pre-wrap;margin:4px 0 10px}.pc-detail-heading{display:flex;align-items:center;gap:18px;min-height:51px;padding:7px 0;flex:none;flex-wrap:wrap}.pc-detail-heading h2{font-size:16px;color:#1a395c;margin:0;white-space:nowrap}.pc-detail-heading>span{font-size:11px;color:#496788}.pc-detail-heading b{color:#24527f}.pc-column-tools{display:flex;align-items:center;gap:8px;margin-left:auto}.pc-column-tools .ds-table-tools{padding:0}.pc-column-tools button{min-height:29px;padding:4px 11px;font-size:12px}.pc-document-lines{flex:1;min-height:120px;max-height:none;border:1px solid var(--ds-border);border-bottom:0;position:relative;overflow:auto}.pc-document-lines table{min-width:100%;height:auto}.pc-document-lines th{height:31px;padding:4px 7px;font-size:12px;position:sticky;top:0;z-index:1}.pc-document-lines td{height:31px;padding:2px 6px;line-height:24px;font-size:12px}.pc-document-lines td:first-child{text-align:center;color:#476889}.pc-document-lines td input,.pc-document-lines td select{height:26px;min-height:26px;padding:2px 5px;border:1px solid transparent;background:transparent;border-radius:0;box-shadow:none;width:100%;min-width:0}.pc-document-lines td input:focus,.pc-document-lines td select:focus{background:#fff;border-color:#3885c9;outline:1px solid #3885c9;outline-offset:0}.pc-document-lines td button{min-height:23px;padding:1px 8px;font-size:11px}.pc-document-lines input[type=number]{appearance:textfield}.pc-document-lines input[type=number]::-webkit-inner-spin-button{appearance:none}.pc-document-totals,#directPurchaseTotal.pc-document-totals{display:flex;align-items:center;gap:36px;justify-content:flex-end;flex-wrap:wrap;flex:none;min-height:39px;padding:8px 12px;border:1px solid var(--ds-border);background:#f3f7fb;font-size:12px;font-weight:400;margin:0}.pc-document-totals>span:first-child{margin-right:auto;font-size:13px;font-weight:600}.pc-document-totals small{font-weight:400;color:#8192a8;margin-left:10px}.pc-document-totals b{font-size:13px;color:#133d68;margin-left:8px;font-variant-numeric:tabular-nums}.pc-document-paste{font-size:12px;color:#4f6b89;flex:none;padding:6px 0;border-bottom:1px solid #eef2f7}.pc-document-paste summary{cursor:pointer;line-height:26px}.pc-document-paste p{margin:8px 0}.pc-document-paste textarea{display:block;box-sizing:border-box;width:100%;margin-bottom:8px}.pc-document-footer{display:flex;align-items:center;gap:10px;padding:10px 0;min-height:53px;flex:none;font-size:11px;color:#8a9aae}.pc-document-footer>span{margin-right:auto}.pc-document-footer button{min-height:33px;padding:6px 17px;border-radius:2px;font-size:12px}.pc-empty-row{pointer-events:none}#directPurchaseGridForm>p{margin:0}.pc-document-editor .detail-toolbar{margin:0}#purchaseDocumentPanel [data-direct-amount]{text-align:right;font-variant-numeric:tabular-nums}#purchaseDocumentPanel [data-direct-delete]{border-color:#afc4db;color:#376990}.pc-document-lines tr:not(:focus-within) [data-direct-code]::placeholder{color:transparent}.pc-document-lines tr:first-child [data-direct-code]::placeholder{color:#899aae}@media(max-width:1250px) and (min-width:901px){.pc-document-header{gap:8px 14px}.pc-document-header label{grid-template-columns:76px minmax(0,1fr)}.pc-toolbar{gap:6px}.pc-toolbar button{min-width:unset;padding:6px 10px}.pc-document-totals{gap:22px}}@media(max-width:900px){#purchaseDocumentPanel{height:auto;min-height:calc(100dvh - 42px);padding:0 10px}.pc-toolbar{gap:6px;padding:8px 0}.pc-toolbar button{min-width:unset;font-size:13px;padding:5px 8px}.pc-document-header{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}.pc-document-header label{grid-template-columns:1fr;gap:4px}.pc-document-extras{gap:8px;flex-direction:column}.pc-document-extras details{width:100%;min-width:0}.pc-detail-heading{gap:8px}.pc-column-tools{margin-left:auto}.pc-document-lines{flex:none;min-height:350px;max-height:55vh}.pc-document-totals,#directPurchaseTotal.pc-document-totals{gap:12px}.pc-document-footer>span{display:none}.pc-document-footer{justify-content:flex-end}}@media(max-height:700px) and (min-width:901px){#purchaseDocumentPanel{height:auto;min-height:calc(100dvh - 42px)}.pc-document-lines{flex:none;height:350px}.pc-document-paste[open]{margin-bottom:5px}}

@media(min-width:901px){.pc-document-lines td{height:clamp(31px,calc((100dvh - 440px)/15),45px)}}.pc-document-lines tr[data-blank="true"]:not(:first-child):not(:hover):not(:focus-within) [data-direct-type]{color:transparent;appearance:none}.pc-document-lines tr[data-blank="true"]:not(:first-child):not(:hover):not(:focus-within) [data-direct-delete]{visibility:hidden}
/* Independent documents share a compact tab bar. */
.workspace-host .main>.content-panel{display:none!important}.workspace-host .topbar #pageTitle{border:0;padding:8px 12px;font-size:13px}.workspace-bar{display:flex;align-items:stretch;background:#edf3fa;border-bottom:1px solid #c6d6e7;height:39px;min-width:0}.workspace-tab-list{display:flex;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin;gap:2px;padding:4px 8px 0}.workspace-tab{display:flex;flex:none;align-items:center;background:#e3ecf6;border:1px solid #cedbea;border-bottom:0;border-radius:3px 3px 0 0;max-width:260px}.workspace-tab.active{background:white;border-top:2px solid #2475bd}.workspace-tab>button{border:0;box-shadow:none;background:none;border-radius:0;min-height:28px;font-size:12px;color:#456483;padding:3px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-tab.active>button{color:#174e88;font-weight:600}.workspace-tab>.workspace-close{padding:3px 8px;font-size:17px;flex:none}.workspace-close:hover{background:#d7e5f5}.workspace-menu{position:relative;flex:none;font-size:12px;margin:0 10px}.workspace-menu summary{cursor:pointer;padding:10px}.workspace-menu>div{position:absolute;right:0;top:36px;z-index:50;background:white;box-shadow:0 4px 12px #183b6330;border:1px solid #cad7e6;padding:5px;width:150px}.workspace-menu button{display:block;width:100%;text-align:left;border:0;box-shadow:none}#workspaceFrames{height:calc(100dvh - 81px);min-height:250px;background:white}.workspace-frame{width:100%;height:100%;border:0;display:block}.workspace-frame.hidden{display:none}.workspace-child .sidebar,.workspace-child .topbar{display:none!important}.workspace-child .app-shell{display:block!important}.workspace-child .main{margin:0;width:100%;min-width:0}.workspace-child #salesPanel,.workspace-child #purchaseDocumentPanel{height:100dvh;min-height:100dvh}.workspace-child #notice{position:fixed;top:8px;z-index:1000}.purchase-merge-tools{display:flex;align-items:center;gap:12px;padding:8px 0;font-size:12px}.purchase-merge-tools span{color:#748397}.purchase-check{width:40px;min-width:40px;text-align:center}#moduleTable td{height:36px!important;padding-top:4px!important;padding-bottom:4px!important}.purchase-merge-tools button{border-radius:2px}.workspace-host #notice{position:fixed;top:88px;z-index:1000}
@media(max-width:900px){.workspace-host .topbar .build-badge{display:none}.workspace-host .topbar #pageTitle{display:none}.workspace-bar{height:39px}.workspace-child #salesPanel,.workspace-child #purchaseDocumentPanel{height:auto}.workspace-menu{margin:0 2px}.workspace-tab{max-width:210px}.purchase-merge-tools{flex-wrap:wrap}}
@media print{.workspace-child .pc-toolbar,.workspace-child .pc-document-footer,.workspace-child .pc-column-tools,.workspace-child #notice{display:none!important}.workspace-child #purchaseDocumentPanel,.workspace-child .pc-document-editor,.workspace-child .pc-document-lines{height:auto!important;max-height:none!important;overflow:visible!important}.workspace-child .pc-empty-row{display:none}.workspace-child .pc-document-extras details{display:none}}
.supplier-summary-lines{max-height:65vh;margin-top:14px}.sticky-status{position:sticky!important;right:0;min-width:210px;background:#f4f8fd!important;z-index:2;border-left:1px solid #b7cce1}.supplier-summary-lines th.sticky-status{z-index:4}.summary-status{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:5px}.summary-status span{background:#e5effb;color:#254e79;padding:2px 5px;border-radius:2px;font-size:11px}#supplierSummaryPanel .pc-toolbar h2{margin-right:auto;font-size:18px}
#productProcessPanel table input,#productProcessPanel table select{width:100%;min-width:90px;height:30px;border:1px solid #d2dfed;background:white;border-radius:2px}#productProcessSteps td:nth-child(5),#productProcessSteps td:nth-child(6){white-space:normal;text-align:left}#productProcessPanel .table-wrap{max-height:43vh;margin-bottom:15px}#productProcessPanel table td{height:36px;padding:4px 7px}#productionResourcesPanel .pc-toolbar h2,#productProcessPanel .pc-toolbar h2{margin-right:auto;font-size:18px}.pc-toolbar button{border-radius:2px}
#supplierPurchaseLines th.sticky-status,#supplierPurchaseLines td.sticky-status{position:sticky!important;right:0;z-index:3;background:#f4f8fd!important}#supplierPurchaseLines th.sticky-status{z-index:5}
#productProcessPanel,#productionResourcesPanel,#supplierSummaryPanel{background:#fff;min-height:calc(100dvh - 42px)}.workspace-child #productProcessPanel,.workspace-child #productionResourcesPanel,.workspace-child #supplierSummaryPanel{min-height:100dvh}
