/* V2.2: inline navigation and neutral blue form surfaces. */
:root{--canvas:#f5f6fa;--mint:#edf3ff;--shadow:0 10px 30px rgba(23,32,51,.08)}
.sidebar .nav{overflow-y:auto;overflow-x:hidden}
.sidebar .nav-flyout{position:static;display:none;width:auto;max-height:none;margin:2px 0 8px 20px;padding:0 0 0 10px;border:0;border-left:1px solid #e1e7f0;border-radius:0;background:transparent;box-shadow:none;transform:none;transition:none;opacity:1;visibility:visible}
.sidebar .nav-group.expanded .nav-flyout{display:block;max-height:none;margin:2px 0 8px 20px;padding:0 0 0 10px;pointer-events:auto}
.sidebar .nav-flyout:before,.sidebar .nav-flyout-head,.sidebar .nav-subitem small,.sidebar .nav-subitem>span{display:none}
.sidebar .nav-subitem{display:block;min-height:34px;padding:8px 10px;margin:2px 0;border-radius:6px;background:transparent;color:#596579}
.sidebar .nav-subitem b{font-size:12px;font-weight:500}
.sidebar .nav-subitem:hover,.sidebar .nav-subitem.active{background:#edf3ff;color:#246bfd}
.sidebar .nav-subitem-primary{color:#246bfd}
.sidebar .nav-group.expanded .nav-parent{background:#edf3ff;color:#246bfd;box-shadow:none}
.sidebar .nav-group.expanded .nav-chevron{transform:rotate(90deg);color:#246bfd}
.sidebar .nav-chevron{color:#8793a6}
.draft-section-title,.draft-summary,.sales-modal-actions,.suborder-total,.suborder-table th{background:#f7f9fc;color:#596579}
.draft-photo,.item-photo{background:#f4f7fc;border-color:#cbd5e5}
.draft-photo:hover{background:#edf3ff;border-color:#246bfd}
.draft-photo-empty,.draft-photo-empty small,.item-photo span,.autosave,.draft-summary>div,.draft-summary>label{color:#66748b}
.item-photo:hover:after{background:rgba(36,107,253,.85)}
.item-photo[title*="修改"]{cursor:default}.item-photo[title*="修改"]:after{display:none}
.draft-line-total,.receipt-form-hint{background:#edf3ff;color:#246bfd}
.receipt-quick-actions button,.receipt-quick-actions button:last-child{background:#edf3ff;border-color:#cfddf7;color:#175cd3}
.field-grid input[readonly]{background:#f4f6fa;color:#596579}
.production-record-tabs,.sales-view-tabs,.segmented{background:#f0f3f8}
.production-record-tabs button,.sales-view-tabs button{color:#66748b}
.production-record-tabs button.active,.sales-view-tabs button.active{color:#246bfd;background:#fff}
.production-record-tabs span{background:#e7edf6}
.customer-picker button,.customer-picker #clearDraftCustomer{background:#fff;color:#246bfd;border-color:#cfddf7}
.customer-match-list{border-color:#dfe4ed;box-shadow:0 7px 18px rgba(23,32,51,.08)}
.customer-match-list button:hover,.receipt-explain{background:#f4f7fc;color:#66748b;border-color:#dfe4ed}
.toast{background:#253858;color:#fff}
.order-hero{background:linear-gradient(120deg,#183766,#246bfd)}
.sales-order-modal .product-draft-section .draft-photo{background:#f4f7fc;border-color:#cbd5e5}
.history-product-photo{background:#f0f3f8;color:#66748b}
.sales-row-actions button:hover{background:#edf3ff;color:#246bfd}
.doc-table th{background:#f7f9fc}
.production-requirement-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:13px 15px}.production-requirement-grid label{margin:0}.production-requirement-grid .span-2{grid-column:span 2}.production-requirement-grid .span-all{grid-column:1/-1}
.production-delivery-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0;padding:14px;border:1px solid #e2e7f0;border-radius:9px;background:#f7f9fc}.production-delivery-summary div{display:grid;gap:4px}.production-delivery-summary small{color:#788397}.production-delivery-summary .wide{grid-column:1/-1}
.production-task-sheet{font-size:12px}.production-sheet-title{display:flex;align-items:stretch;justify-content:space-between;margin:-36px -32px 18px;background:#183f6b;color:#fff}.production-sheet-title>div{display:flex;align-items:center;gap:20px;padding:20px 26px}.production-sheet-title h1{margin:0;font-size:29px;letter-spacing:.16em}.production-sheet-title>div>b{font-size:18px}.production-sheet-title>strong{display:grid;place-items:center;min-width:120px;padding:16px;background:#fff;color:#111;font-size:29px}.production-meta-table,.production-items-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:0 0 18px}.production-meta-table th,.production-meta-table td,.production-items-table th,.production-items-table td{border:1px solid #707782;padding:8px;vertical-align:middle}.production-meta-table th{width:100px;background:#f0f2f5;text-align:left}.production-items-table thead th{background:#e5e7eb;text-align:center}.production-items-table .seq{width:45px;text-align:center}.production-items-table .photo{width:120px;text-align:center}.production-items-table .qty{width:70px;text-align:center}.production-items-table img{display:block;width:105px;height:86px;margin:auto;object-fit:contain}.production-items-table .production-total th{text-align:right;background:#fff4cf}.production-items-table .production-total td{background:#fff4cf;text-align:center;font-size:18px}.production-requirements{border:1px solid #707782}.production-requirements>div{display:grid;grid-template-columns:115px 1fr;min-height:50px;border-bottom:1px solid #707782}.production-requirements>div:last-child{border:0}.production-requirements b{display:grid;place-items:center start;padding:10px;background:#f0f2f5}.production-requirements p{margin:0;padding:10px;white-space:pre-wrap;line-height:1.65}.production-signature{display:grid;grid-template-columns:repeat(3,1fr);gap:25px;margin:34px 0 20px}
.sales-info-grid label:has([data-sales-detail="markingRequired"]),.sales-info-grid label:has([data-sales-detail="markingContent"]),.production-requirements>div:nth-child(3),.production-detail-grid>section:first-child .kv:nth-of-type(3){display:none}
@media(max-width:900px){.production-requirement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.production-task-sheet{min-width:760px}.document-preview-shell{overflow:auto}}
@media(max-width:560px){.production-requirement-grid{grid-template-columns:1fr}.production-requirement-grid .span-2{grid-column:1}}
@media print{.production-sheet-title{margin:0 0 14px}.production-items-table tr{break-inside:avoid}.production-task-sheet{font-size:10px}}
.fulfillment-sales-table{min-width:1340px}.flow-status{border:0;background:transparent;padding:5px 8px;border-radius:7px;font:inherit;font-weight:700;white-space:nowrap}.flow-status[data-flow-production],.flow-status[data-flow-purchase]{cursor:pointer}.flow-status.orange{color:#b54708;background:#fff4e5}.flow-status.blue{color:#175cd3;background:#eff4ff}.flow-status.green{color:#067647;background:#ecfdf3}.flow-status.gray{color:#667085;background:#f2f4f7}.fulfillment-method-tag{display:inline-flex;padding:5px 8px;border-radius:7px;background:#f2f4f7;color:#344054;font-size:12px;font-weight:700;white-space:nowrap}.fulfillment-route-card{display:grid;gap:6px;margin:0 0 14px;padding:16px 18px;border:1px solid #dbe5f5;border-radius:10px;background:#f7f9fd}.fulfillment-route-card.direct{border-color:#cfdcff;background:#f2f6ff}.fulfillment-route-card span,.fulfillment-route-card small{color:#667085}.fulfillment-route-card b{font-size:17px;color:#17345f}
.order-meta label:has([data-order-field="fulfillmentMethod"]){display:none}.purchase-sheet-head-v23{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.purchase-sheet-head-v23 label{display:grid;gap:6px;color:#475467;font-size:12px}.purchase-sheet-head-v23 input,.purchase-sheet-head-v23 select,.purchase-entry-table-v23 input,.purchase-entry-table-v23 select{width:100%;min-width:0;border:1px solid #d0d5dd;border-radius:7px;background:#fff;padding:8px;color:#172033}.purchase-grid-wrap-v23{overflow:auto;border:1px solid #d9e0eb;border-radius:10px}.purchase-entry-table-v23{width:100%;min-width:1380px;border-collapse:collapse}.purchase-entry-table-v23 th,.purchase-entry-table-v23 td{padding:8px;border-right:1px solid #e4e7ec;border-bottom:1px solid #e4e7ec;vertical-align:middle}.purchase-entry-table-v23 thead th{background:#f2f4f7;color:#344054;white-space:nowrap}.purchase-entry-table-v23 tfoot th{background:#f8fafc;text-align:right}.purchase-entry-table-v23 th:nth-child(1){width:42px}.purchase-entry-table-v23 th:nth-child(2){width:115px}.purchase-entry-table-v23 th:nth-child(3){width:190px}.purchase-entry-table-v23 th:nth-child(4),.purchase-entry-table-v23 th:nth-child(5){width:135px}.purchase-entry-table-v23 th:nth-child(6){width:82px}.purchase-entry-table-v23 th:nth-child(7){width:95px}.purchase-entry-table-v23 th:nth-child(8){width:125px}.purchase-entry-table-v23 th:nth-child(9){width:105px}.purchase-entry-table-v23 th:nth-child(10){width:105px}.purchase-entry-table-v23 th:nth-child(11){width:160px}.history-price-v23 b,.history-price-v23 small{display:block}.history-price-v23 small{color:#667085;margin-top:3px}.history-price-v23 span{color:#98a2b3}.add-purchase-row-v23{margin-top:12px}.purchase-detail-v23{overflow:auto}.purchase-detail-v23 table{min-width:1120px}@media(max-width:900px){.purchase-sheet-head-v23{grid-template-columns:1fr 1fr}}@media(max-width:560px){.purchase-sheet-head-v23{grid-template-columns:1fr}}
.full-order-surface .simple-entry .order-form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1000px){.full-order-surface .simple-entry .order-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.full-order-surface .simple-entry .order-form-grid{grid-template-columns:minmax(0,1fr)}.full-order-surface .order-form-grid .span-2{grid-column:1}}
/* The shell uses a grid column once; do not also offset .main. */
.app-shell{grid-template-columns:218px minmax(0,1fr)}
.main{grid-column:2;margin-left:0;min-width:0}
.sidebar{padding:0 12px 12px;width:218px}
.brand{padding:0 10px;flex-shrink:0}.brand-mark{flex-shrink:0;border-radius:10px}
.brand-mark span,.brand-mark i{background:#fff}.brand-mark:after{background:#a9c7ff}
.nav{padding:12px 0;flex:1;min-height:0}.sidebar-bottom{flex-shrink:0}
.nav-item{gap:10px;color:#4b5565}.nav-item>span{display:inline-flex;align-items:center;justify-content:center;color:#66748b}
.crm-icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle}
.workspace-tab>span{background:transparent;color:#66748b}.workspace-tab.active>span{background:#edf3ff;color:#246bfd}
.workspace-tabs{top:64px;min-height:42px;padding:5px 24px 0}
.content{max-width:none;width:100%;padding:22px 24px 36px}
.page-head{gap:16px}.page-head p{max-width:650px;color:#707b8e;line-height:1.65}
.head-actions{flex-wrap:wrap;justify-content:flex-end;flex-shrink:0}
.sales-record-status-tabs button.active{background:#edf3ff;color:#175cd3;border-color:#c9d9fc}
.sales-record-status-tabs button.active span{color:inherit}
.sales-priority-board{padding:14px 16px;margin-bottom:12px}.priority-board-title{margin-bottom:10px}.priority-board-title small{display:none}
.priority-card{min-height:88px;padding:10px 14px}.priority-card strong{font-size:26px;margin-top:6px}.priority-card small{margin-top:4px}
.sales-summary{display:none}.sales-filter-panel{padding:12px 14px}.sales-filter-grid{gap:8px}
.data-table th,.table-card th{font-size:12px;color:#596579;background:#f7f9fc;font-weight:600}
.data-table td,.table-card td{padding-top:11px;padding-bottom:11px}
.table-card,.orders-card,.panel{border-radius:9px}
.row-actions{flex-wrap:wrap}.row-actions button{width:auto;min-width:32px;height:32px;white-space:nowrap}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #97baff;outline-offset:2px}
.danger-btn,.quiet-danger{color:#b42318;background:#fff;border-color:#f2c5c1}.danger-btn:hover{background:#fff0ee}
.primary-btn:disabled{background:#e5e9f0;color:#7c8799;opacity:1;cursor:not-allowed}
.status.green{background:#eaf7ef;color:#16794a}.status.orange{background:#fff4e5;color:#a65d09}.status.red{background:#fff0ee;color:#b42318}.status.gray{background:#eef1f5;color:#616c7e}
.daily-action-bar{flex-wrap:wrap}.sales-order-actions{flex-wrap:wrap}.sales-order-workarea{min-width:0}
.document-layout{grid-template-columns:240px minmax(0,1fr)}.document-list{max-height:70vh;overflow:auto}.document-preview-shell{background:#e9edf3;min-width:0;padding:20px}
.document-preview-shell .a4-sheet{width:100%;max-width:794px;min-height:900px;padding:36px 32px;overflow-wrap:anywhere}
.doc-table{table-layout:fixed}.doc-table td,.doc-table th{overflow-wrap:anywhere}.doc-table img{max-width:70px;max-height:65px;object-fit:contain}
.doc-warning{padding:9px 12px;border:1px solid #f2c5c1;background:#fff0ee;color:#b42318;margin-bottom:16px}
.document-filter{display:flex;gap:8px;margin-bottom:14px}.document-filter input{min-width:0;flex:1}.document-filter input,.document-filter select{padding:9px 12px;border:1px solid #dfe4ed;border-radius:7px;font:inherit}
.document-preview-shell .sales-share-sheet{width:100%;min-width:0;min-height:0;padding:24px;box-shadow:none}.document-preview-shell .share-brand{grid-template-columns:1fr}.document-preview-shell .share-order-no{text-align:left}.document-preview-shell .share-logo{display:none}.document-preview-shell .share-brand h1{font-size:20px}.document-preview-shell .share-items{table-layout:auto}.document-preview-shell .share-items th{width:auto}.document-preview-shell .share-total{grid-template-columns:1fr}.document-preview-shell .share-amounts{border-left:0}.document-preview-shell .share-customer,.document-preview-shell .share-payment{grid-template-columns:1fr 1fr}.pagination button:disabled{opacity:.4;cursor:not-allowed}.document-item.active{background:#edf3ff;color:#175cd3}
.login-brand{background:#183766}.login-logo .brand-mark span,.login-logo .brand-mark i{background:#246bfd}
@media(max-width:1000px){.daily-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.document-layout{grid-template-columns:190px minmax(0,1fr)}.search{width:min(390px,40vw)}.sales-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{grid-template-columns:minmax(0,1fr)}.main{grid-column:1;margin-left:0}.sidebar{width:218px}.content{padding:16px 12px}.topbar{padding:0 12px}.top-actions .date-chip,.top-actions .icon-btn,.search kbd{display:none}.search{width:auto;flex:1;min-width:0}.search input{min-width:0;width:100%}.top-actions{margin-left:8px}.workspace-tabs{padding-left:12px;top:64px}.page-head{flex-direction:column;gap:10px}.priority-board-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.priority-card{padding:8px}.priority-card strong,.priority-card>b{display:block}.priority-card>b{font-size:11px}.priority-card small{font-size:10px}.sales-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.document-layout{grid-template-columns:1fr}.document-list{max-height:180px;display:block}.document-item{min-width:0}.document-preview-shell{padding:8px}.document-preview-shell .a4-sheet{transform:none;margin:0;padding:18px 12px;min-height:0}.doc-brand h1{font-size:18px}.doc-info{grid-template-columns:1fr}.doc-table{font-size:10px}.doc-table td,.doc-table th{padding:6px 4px}}
.workspace-dialog:has(.purchase-sheet-head-v23){width:min(1480px,calc(100vw - 36px));max-width:none}
@media print{.sidebar,.topbar,.workspace-tabs,.page-head,.document-list,.document-filter,.toast,.login-screen{display:none!important}.app-shell,.main,.content,.document-layout,.document-preview-shell{display:block!important;margin:0!important;padding:0!important;width:100%!important;background:#fff!important}.document-preview-shell .a4-sheet{width:100%;max-width:none;min-height:0;transform:none;box-shadow:none;margin:0;padding:0}.doc-table thead{display:table-header-group}.doc-table tr{break-inside:avoid}.document-preview-shell{overflow:visible}.a4-sheet{box-shadow:none}@page{size:A4;margin:14mm}}
