
/* BR-UI-71155-009（使用者決定）：所有單據列印時表頭緊湊——標題區不留空列、客戶資料列距 2px，與採購單／收貨單一致 */@media print{html body main .document-card header.document-title{row-gap:2px!important;padding-top:0!important;padding-bottom:0!important;margin-bottom:4px!important}html body main .document-card header.document-title h1.document-title{margin-bottom:0!important;padding-top:0!important}html body main .document-card header.document-title>.toolbar{margin-top:0!important;margin-bottom:0!important}html body main .document-card .dc-dispatch-customer .document-reference{margin:0!important;font-size:inherit!important}html body main .document-card .dc-document-kind-row{row-gap:4px!important}html body main .document-card .dc-dispatch-customer{row-gap:2px!important;margin:0 0 6px!important;align-items:start!important}html body main .document-card .dc-dispatch-customer>div{line-height:1.35!important;min-height:0!important}html body main .document-card .dc-dispatch-customer>div:empty{line-height:0!important}}
.document-card .dc-sales-document-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,40%);align-items:start;gap:16px}.document-card .dc-sales-document-head .dc-dispatch-seller{width:auto;max-width:none;margin:0 0 12px}.dc-order-created{flex-basis:100%;font-size:14px;font-weight:400}.dc-production-progress{display:block;color:var(--muted);margin-top:4px}.dc-print-value{display:none}.dc-dispatch-edit input[type=number]{text-align:right}.dc-dispatch-edit .dc-unit-price{width:100px}.dc-dispatch-edit textarea{min-height:90px;width:100%}.dc-production-document-title{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.dc-production-document-title .dc-document-state{font-size:13px}
.dc-page-actions>.dc-action-right{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.dc-dispatch-seller{text-align:right;margin:0 0 14px auto;width:max-content;max-width:48%;line-height:1.6}.dc-dispatch-customer{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px 24px;margin-bottom:16px}.dc-customer-fax{grid-column:3}.dc-dispatch-customer>div{min-width:0;overflow-wrap:anywhere}.dc-dispatch-signoff{display:grid;grid-template-columns:2fr 1fr;gap:24px;margin-top:20px;break-inside:avoid}.dc-dispatch-signoff>div:last-child{font-size:16px;font-weight:700}/* BR-UI-71203-001（使用者決定）：簽收字原本 14px 一般粗細偏小，改 16px 粗體（不加底線，照 BR-UI-71160-001） */
@media(max-width:700px){.document-card .dc-sales-document-head{grid-template-columns:1fr}.dc-dispatch-customer{grid-template-columns:1fr}.dc-customer-fax{grid-column:1}.dc-dispatch-signoff{grid-template-columns:1fr 1fr}}
@media print{.dc-customer-fax{grid-column:3}.dc-production-document-title .dc-document-state,.dc-production-document-title .dc-audit-link,.dc-production-document-title .dc-inline-print{display:none!important}.dc-dispatch-customer{grid-template-columns:1fr 1fr 1fr!important;gap:5px 12px}.dc-dispatch-seller{break-inside:avoid}.dc-production-document-title~.card{break-before:auto}.document-lines{min-width:0!important}}

.dc-brand-mark{width:28px;height:31px;object-fit:contain;vertical-align:middle;margin-right:7px}/* BR-UI-71172-001：新字標（圖片，高 21px） */.dc-brand-word{display:block;width:108px!important;height:21px!important;object-fit:contain;flex:0 0 auto}.dc-brand-home{display:inline-flex!important;align-items:center}
#recipeForm>.card:first-of-type .recipe-fields{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important}
#recipeForm .recipe-fields>.field{width:auto!important;min-width:0!important;max-width:none!important}#recipeForm .recipe-fields>.field>input,#recipeForm .recipe-fields>.field>select{width:100%!important;max-width:100%!important}
#resaleFields input[readonly]{border:0!important;box-shadow:none!important;background:transparent!important;padding-left:0!important}/* BR-RCP-71171-002（使用者回報）：系統帶出的銷售單位只是顯示，點了不出現框 */#resaleFields input[readonly]{pointer-events:none;cursor:default}#resaleFields input[readonly]:focus,#resaleFields input[readonly]:focus-visible{outline:none!important;box-shadow:none!important;border:0!important}#resaleCustomFactor .dc-resale-factor{display:flex;align-items:center;gap:6px;white-space:nowrap}#resaleCustomFactor .dc-resale-factor>input{width:120px!important;flex:0 0 120px;text-align:center!important}#resaleCustomFactor .dc-resale-factor-hint{color:#b54708;font-size:12px}
.dc-local-image-preview{display:block;width:135px;height:135px;object-fit:contain;margin:8px 0}.dc-work-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:12px 0}.dc-work-filters label{max-width:220px}.dc-work-filters input,.dc-work-filters select{max-width:100%}
body .order-catalog .catalog-photo-slot{width:56px;height:56px;flex:none;grid-row:1/5;grid-column:1}body .order-catalog .catalog-image{float:none!important;width:100%!important;height:100%!important;object-fit:contain;margin:0!important}
body .order-catalog:not(.grid-view) .catalog-item>div.catalog-product{display:grid!important;grid-template-columns:56px minmax(0,1fr);column-gap:10px;align-content:center}body .order-catalog .catalog-product>h3,body .order-catalog .catalog-product>small,body .order-catalog .catalog-product>p{grid-column:2;min-width:0;overflow-wrap:anywhere}
body .order-catalog .catalog-unit-source{display:none!important}.catalog-price-unit{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap}.catalog-unit{white-space:nowrap;font-size:14px}.catalog-unit:before{content:'／'}
body .order-catalog:not(.grid-view) .catalog-item,body .catalog-column-head{grid-template-columns:minmax(210px,2fr) minmax(120px,1fr) minmax(100px,1fr) 130px 158px!important}body .catalog-column-head>span:nth-child(5){display:none}
body .order-catalog .store-cart-control{width:150px!important;min-width:0!important;max-width:100%!important;gap:4px!important;margin-top:4px!important}body .order-catalog .store-cart-control button{width:40px!important;min-width:40px!important;max-width:40px!important;height:44px!important}body .order-catalog .store-cart-control input{width:62px!important;min-width:0!important;max-width:62px!important;height:44px!important;font-size:16px!important}
body .order-catalog.grid-view{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;align-items:stretch}body .order-catalog.grid-view .catalog-item{height:auto!important;min-height:330px!important;max-height:none!important;gap:6px!important}body .order-catalog.grid-view .catalog-photo-slot{width:100%;height:140px;margin-bottom:6px}body .order-catalog.grid-view .catalog-product{display:block!important}body .order-catalog.grid-view .catalog-cart-icon{position:static;align-self:flex-end}body .order-catalog.grid-view .store-cart-control{align-self:flex-end;margin-top:0!important}.catalog-currency-note{display:none}
@media(max-width:700px){body .order-catalog:not(.grid-view) .catalog-item{grid-template-columns:minmax(170px,1fr) 150px!important}body .order-catalog:not(.grid-view) .catalog-product{grid-column:1;grid-row:1/4}body .order-catalog:not(.grid-view) .catalog-item>div:nth-child(2),body .order-catalog:not(.grid-view) .catalog-meta{grid-column:1}body .order-catalog:not(.grid-view) .catalog-price-unit,body .order-catalog:not(.grid-view) .store-cart-control{grid-column:2}body .catalog-column-head{display:none!important}}/* 71.151（BR-UI-71151-001，使用者決定）：手機也在每個價格前顯示 NT$，不再於清單上方另放幣別說明 */
/* 71.146（使用者決定）：平板（701～1200px）清單模式與電腦版相同，一列排開：品名／編號、供應商、標籤、價格、數量；欄寬縮窄以放進直向平板。
   列高固定為數量鈕的高度，加入商品前後不變。 */
@media(min-width:701px) and (max-width:1200px){body .order-catalog:not(.grid-view) .catalog-item,body .catalog-column-head{grid-template-columns:minmax(120px,1.6fr) minmax(80px,1fr) minmax(64px,.8fr) 124px 150px!important;column-gap:10px!important}body .order-catalog:not(.grid-view) .store-cart-control{margin-top:0!important;margin-bottom:0!important}}
@media(max-width:1200px){ #recipeForm>.card:first-of-type .recipe-fields{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:600px){body .order-catalog.grid-view{grid-template-columns:repeat(2,minmax(0,1fr))!important}body .order-catalog.grid-view .catalog-item{min-height:300px!important;padding:8px!important}body .order-catalog.grid-view .catalog-photo-slot{height:110px}body .order-catalog .store-cart-control{width:100%!important;justify-content:flex-end;gap:2px!important}body .order-catalog .store-cart-control button{width:36px!important;min-width:36px!important;max-width:36px!important}body .order-catalog .store-cart-control input{width:42px!important;max-width:42px!important;padding:2px!important}body .order-catalog:not(.grid-view) .catalog-item{grid-template-columns:minmax(0,1fr) 120px!important;padding:8px!important}body .order-catalog:not(.grid-view) .catalog-item>div.catalog-product{grid-template-columns:42px minmax(0,1fr);column-gap:6px}body .order-catalog:not(.grid-view) .catalog-photo-slot{width:42px;height:48px}#recipeForm>.card:first-of-type .recipe-fields{grid-template-columns:1fr!important}}
@media(max-width:360px){body .order-catalog.grid-view{grid-template-columns:1fr!important}}

html body dialog.dc-catalog-photo{border:0!important;padding:0!important;margin:auto!important;background:transparent!important;box-shadow:none!important;outline:0!important;width:min(520px,calc(100vw - 32px))!important;max-width:none!important;max-height:calc(100vh - 32px)!important;overflow:visible!important}dialog.dc-catalog-photo::backdrop{background:rgba(15,25,40,.72)}.dc-catalog-photo-box{background:#fff;border-radius:12px;padding:12px;box-sizing:border-box}.dc-catalog-photo-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.dc-catalog-photo-head strong{font-size:16px;line-height:1.4;min-width:0;overflow-wrap:anywhere}html body .dc-catalog-photo .dc-catalog-photo-close{flex:0 0 auto;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;background:transparent!important;color:#1f2a37!important;font-size:24px!important;border:0!important;box-shadow:none!important}.dc-catalog-photo-box img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;background:#f3f6f9;border-radius:8px}.order-catalog img.catalog-image{cursor:zoom-in}

body main #storeCartForm .catalog-head{align-items:center!important;min-height:0!important;padding:10px 12px!important}body main .catalog-head>strong{align-self:center!important;margin-top:0!important;margin-bottom:0!important}body main .catalog-head label{margin:0!important}body main .catalog-head .dc-search-control,body main .catalog-head input:not([type=hidden]),body main .catalog-head select,body main .catalog-head button{height:var(--dc-tool-height,40px)!important;min-height:var(--dc-tool-height,40px)!important;box-sizing:border-box}body main .catalog-head .dc-search-control input{height:100%!important;min-height:0!important}body main .catalog-head .dc-search-control{align-items:center!important}
body main .order-catalog.grid-view.dc-no-images .catalog-item{height:auto!important;min-height:180px!important;max-height:none!important}body main .order-catalog.dc-no-images .catalog-photo-slot{display:none!important}body main .order-catalog:not(.grid-view).dc-no-images .catalog-item>div.catalog-product{grid-template-columns:minmax(0,1fr)!important}body main .order-catalog.dc-no-images .catalog-product>h3,body main .order-catalog.dc-no-images .catalog-product>small,body main .order-catalog.dc-no-images .catalog-product>p{grid-column:1!important}body main .order-catalog.grid-view.dc-no-images .catalog-product{padding-top:0!important;min-height:0!important}body main .order-catalog.grid-view.dc-no-images .catalog-product:before{display:none!important}.dc-image-placeholder{display:flex;align-items:center;justify-content:center;background:#f1f4f7;color:#a3aeb9;font-size:32px;border-radius:6px;height:130px}/* 71.151（BR-UI-71151-006，使用者決定）：無照片底圖＝灰底中間淡淡的灰色 LOGO */.dc-image-placeholder img{width:38%;max-width:64px;height:auto;opacity:.2;filter:grayscale(1);pointer-events:none}.order-catalog:not(.grid-view) .dc-image-placeholder{width:100%;height:100%}
body main .unit-batch-table .unit-code-view{box-sizing:border-box;width:100%;height:40px;padding:10px;border:1px solid transparent;border-radius:7px;align-items:center;line-height:18px}.unit-batch-table:not(.is-editing) .unit-code-view{display:flex!important}.unit-batch-table.is-editing .unit-code-view{display:none!important}body main .unit-batch-table .unit-code-input{box-sizing:border-box;height:40px;padding:10px;line-height:18px;margin:0}
@media(max-width:850px){body main .catalog-head{--dc-tool-height:44px}}


.unit-batch-table .relation-edit-row input[type=number]{appearance:textfield;padding-inline:6px!important}.unit-batch-table .relation-edit-row input::-webkit-inner-spin-button,.unit-batch-table .relation-edit-row input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.dc-default-price{margin:0 0 0 auto;text-align:right;align-self:center}.dc-default-price>span{display:block;color:var(--muted);font-size:13px}.dc-default-price>strong{display:block;color:#0b6688;font-size:26px;font-weight:800;white-space:nowrap}.dc-buyer-group-heading{display:flex;align-items:center;gap:16px;margin:12px 0 8px}.dc-buyer-group-heading h2,.dc-buyer-group-heading label{margin:0!important}.dc-buyer-group-heading label{display:flex;align-items:center;gap:6px}
body main .dc-compact-tools,body main [data-dc-list-tools]{padding-block:12px!important;margin-block:0!important;min-height:0!important;align-items:flex-end!important;gap:8px}.dc-compact-tools input,.dc-compact-tools select,.dc-compact-tools button,.dc-compact-tools .button{box-sizing:border-box;min-height:40px}.supplier-section .section-title{justify-content:flex-start;gap:12px}.supplier-section .section-title [name=active]{width:90px}.dc-date-filter-label{margin:0!important;gap:0!important}
/* BR-UI-71169-005（使用者回報）：有「日期類型」下拉的日期篩選，下拉與日期區間左右並排、間距與其他篩選相同（原本被篩選欄固定 220px 寬的規則限住，上下疊住、間距 0）；兩個各依篩選下拉與日期區間規格 220px；窄螢幕換行時上下也留間距。#dc-none 只為提高優先順序 */
html:root body main :is(.dc-compact-tools,[data-dc-list-tools]) label.field.dc-date-filter-label:has(>select):is(#dc-none,label):is(#dc-none,label){flex:0 1 auto!important;display:inline-flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;width:auto!important;min-width:0!important;max-width:100%!important}
html:root body main :is(.dc-compact-tools,[data-dc-list-tools]) label.field.dc-date-filter-label:has(>select):is(#dc-none,label):is(#dc-none,label)>:is(select,.dc-date-range){width:220px!important;min-width:0!important;max-width:100%!important;flex:0 1 220px!important}
html:root body main :is(.dc-compact-tools,[data-dc-list-tools]) label.field.dc-date-filter-label:has(>select):is(#dc-none,label):is(#dc-none,label) .dc-date-range-control{width:100%!important;max-width:100%!important}/* 日期區間鍵佔滿日期欄（原本依內容寬，字級被自動縮到 10px） */
@media(max-width:700px){html:root body main :is(.dc-compact-tools,[data-dc-list-tools]) label.field.dc-date-filter-label:has(>select):is(#dc-none,label):is(#dc-none,label){width:100%!important;flex:1 1 100%!important}html:root body main :is(.dc-compact-tools,[data-dc-list-tools]) label.field.dc-date-filter-label:has(>select):is(#dc-none,label):is(#dc-none,label)>:is(select,.dc-date-range){width:100%!important;flex:1 1 100%!important}}.dc-date-filter-label>.dc-sr-only{position:absolute!important}
/* BR-UI-71172-005（使用者回報）：日期區間鍵一律佔滿它的日期欄（較舊的日期篩選寫法也一樣，例如核對批次）；手機上日期欄佔滿整列——原本外層固定 220px、鍵依內容寬，字被自動縮到 10px */
html:root body main :is(.dc-compact-tools,[data-dc-list-tools],form) label:has(.dc-date-range-control):is(#dc-none,label) :is(.date-range-controls,.dc-date-range,.dc-date-range-inline):has(>.dc-date-range-control){width:100%!important;max-width:100%!important}
html:root body main :is(.dc-compact-tools,[data-dc-list-tools],form) label:has(.dc-date-range-control):is(#dc-none,label) .dc-date-range-control{width:100%!important;max-width:100%!important}
@media(max-width:700px){html:root body main :is(.dc-compact-tools,[data-dc-list-tools],form) label:has(.dc-date-range-control):is(#dc-none,label):is(#dc-none,label){width:100%!important;max-width:100%!important;flex:1 1 100%!important;min-width:0!important}}
/* Spacing belongs to the outer toolbar, never its nested query row. */
body main .dc-compact-tools .dc-compact-tools,body main [data-dc-slot="list-toolbar"]>[data-dc-slot="list-query"]{padding-block:0!important}


body .dc-inline-document-date{display:flex;align-items:center;gap:4px;white-space:nowrap;min-height:32px}
body .dc-inline-document-date .dc-date-wrap,body .dc-inline-document-date .dc-date-display{display:inline-block;width:150px!important;min-width:0!important;max-width:150px!important;height:32px!important;min-height:32px!important;line-height:30px;font-weight:400}
body .dc-inline-document-date .dc-date-wrap{flex:0 0 150px}body .dc-dispatch-customer{align-items:center;row-gap:8px}
body .dc-batch-heading{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
body #reconciliationSelectionSummary[hidden]{display:none!important}
body main .reconciliation-date-row,body main .reconciliation-other-row{margin:0 0 10px!important;align-items:end!important}
body main .reconciliation-date-row .reconciliation-settings-btn{align-self:end}
body main .reconciliation-date-row button,body main .reconciliation-other-row button{height:40px}
@media print{html body .dc-document-utility,html body main .dc-date-wrap{display:none!important}.dc-inline-document-date{display:block!important;min-height:0!important}.dc-work-progress{display:none!important}}
