/* Scoped refinements for the approved glass interface. */

/* Province and city order workspace. */
.order-workspace-tabs,.special-order-filters,.special-order-tools{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px
}
.order-workspace-tabs{margin:0 0 14px}
#app .desk-main .order-workspace-choice,#app .desk-main .special-order-action{
  min-height:44px;padding:8px 13px;border-radius:12px;font-size:14px;font-weight:650
}
#app .order-workspace-tabs .order-workspace-choice[aria-pressed="true"]{
  color:#fff;background:linear-gradient(145deg,#434851,#252931);border-color:#292d34
}
#app .special-order-filters .order-workspace-choice[aria-pressed="true"]{
  color:#244e79;background:#e8f1fc;border-color:#c8dbf1
}
.order-workspace-count{
  display:inline-flex;align-items:center;justify-content:center;margin-inline-start:5px;
  min-width:20px;padding:1px 6px;border-radius:999px;background:#e9edf2;color:#344458;font-size:11px
}
[aria-pressed="true"]>.order-workspace-count{background:#59616d;color:#fff}
#app .desk-main .special-order-panel{padding:18px;border-radius:20px;min-width:0}
.special-order-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.special-order-top h2{margin:0;font-size:20px}
.special-order-top p{margin:3px 0 0;color:#525b66;font-size:13px}
.special-order-tools{margin:12px 0}
.special-order-tools :is(input,select){
  width:auto;min-width:0;max-width:100%;min-height:44px;padding:8px 10px;font-size:14px;border-radius:11px
}
.special-order-tools input{flex:1;min-width:min(180px,100%)}
.special-order-list-head,.special-order-row{
  display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr) 136px;align-items:center;gap:12px;padding:10px 13px
}
.special-order-list-head{color:#525b66;font-size:12px;font-weight:650;background:#f0f2f5;border-radius:11px}
.special-order-list-head span:last-child,.special-order-action{justify-self:end}
.special-order-row{min-height:83px;border-bottom:1px solid #e2e6ec}
.special-order-row:last-child{border-bottom:0}
.special-order-main,.special-order-state{min-width:0;overflow-wrap:anywhere}
.special-order-main>b{font-size:15px}
.special-order-meta{display:flex;align-items:center;flex-wrap:wrap;gap:5px 7px;margin-top:4px;color:#525b66;font-size:12px}
.special-order-state small{display:block;margin-top:4px;color:#864027}
.special-order-pill{
  display:inline-block;max-width:100%;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:650;
  color:#244e79;background:#e8f1fc
}
.special-order-pill:is(.special-order-type,[data-tone="attention"]){color:#704713;background:#fff4e1}
.special-order-pill[data-tone="complete"]{color:#23573c;background:#e6f2eb}
#app .special-order-row .shipment-group-link{min-height:32px;padding:3px 7px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.special-order-action{min-width:110px;text-align:center}
.special-order-empty{padding:22px;text-align:center;color:#525b66}
@media (max-width:650px){
  .order-workspace-tabs{gap:6px;margin-bottom:11px}
  #app .desk-main .special-order-panel{padding:12px;border-radius:16px}
  #app .desk-main .order-workspace-choice,#app .desk-main .special-order-action{padding-inline:9px;font-size:13px}
  .special-order-tools :is(input,select){font-size:16px}
  .special-order-list-head{display:none}
  .special-order-row,.special-order-row:last-child{
    grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:start;min-height:0;padding:11px 9px;
    margin-bottom:8px;border:1px solid #e2e6ec;border-radius:12px;background:#fdfdfe
  }
  .special-order-main{grid-column:1/-1}
  .special-order-action{min-width:0;align-self:center}
  #app .special-order-row .shipment-group-link{min-height:44px}
}
@media (max-width:360px){
  .special-order-tools{display:grid}
  .special-order-tools :is(input,select){width:100%}
}

/* 下单日期筛选 */
.order-date-filter{
  margin:0 24px 14px;min-width:0;border:1px solid #d9dfe6;border-radius:13px;background:#ffffffa8
}
#app .special-order-panel .order-date-filter{margin:0 0 12px}
#app .desk-main[data-route="orders"] .order-date-panel>.toolbar{border-bottom:0;padding-bottom:10px}
#app .order-date-panel>#orders-list{border-top:1px solid #e6e8eb}
.order-date-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch}
.order-date-trigger,.order-date-clear{min-height:44px;border:0;background:none;color:#303942}
.order-date-trigger{
  display:grid;grid-template-columns:auto minmax(0,1fr) 16px;align-items:center;gap:8px;
  padding:6px 12px;border-radius:12px;text-align:left
}
.order-date-trigger:hover,.order-date-clear:hover{background:#edf0f4}
.order-date-label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:14px;font-weight:650}
.order-date-icon{width:16px;height:16px;flex:none;color:#596471}
.order-date-value{
  min-width:0;overflow-wrap:anywhere;text-align:right;color:#566270;font-size:13px;font-variant-numeric:tabular-nums
}
.order-date-filter[data-active="true"] .order-date-value{font-weight:650;color:#303942}
.order-date-trigger[aria-expanded="true"] .order-date-chevron{transform:rotate(180deg)}
.order-date-clear{
  min-width:44px;padding:6px 9px;border-left:1px solid #dfe3e9;border-radius:0 12px 12px 0;
  font-size:13px;color:#505d6b
}
.order-date-form{padding:10px 12px 12px;border-top:1px solid #e2e6eb}
.order-date-help{margin:0 0 7px;color:#5b6571;font-size:12px}
.order-date-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px}
.order-date-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(352px,100%);min-width:0}
.order-date-range label{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:12px;color:#566270;font-weight:650}
#app .order-date-range input{width:100%;min-width:0;min-height:44px;padding:6px 8px;font-size:14px;font-weight:400}
#app .order-date-range input[aria-invalid="true"]{border-color:#a43a34}
.order-date-error{margin:6px 0 0;font-size:13px;color:#a0332c}
.order-date-controls>.btn{min-height:44px}
.order-date-empty{padding:24px 12px;text-align:center;color:#566270}
@media (max-width:650px){
  .order-date-filter{margin:0 17px 12px}
  .order-date-trigger{gap:5px;padding-inline:8px}
  .order-date-form{padding:8px}
  .order-date-range{width:100%;gap:6px}
  #app .order-date-range input{padding-inline:5px}
  .order-date-value{font-size:12px}
}
@media (max-width:350px){
  .order-date-label .order-date-icon{display:none}
  .order-date-label{font-size:13px}
}

/* Business module rules formerly replaced the shared glass background. */
:is(main[data-route="catalog"], main[data-route="dealers"], main[data-route="orders"], main[data-route="products"], main[data-route="prices"])
  .btn:where(:not(.primary):not(.danger):not(.active):not(.selected):not([aria-pressed="true"]):not(:disabled):not([aria-disabled="true"])),
main[data-route="prices"] .business-customer-option:not(.selected):not(:disabled) {
  color: #25292b !important;
  background: linear-gradient(135deg, rgba(255,255,255,.61), rgba(255,255,255,.24) 56%, rgba(255,255,255,.42)) !important;
  border-color: rgba(255,255,255,.82) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}

main[data-route="prices"] .business-customer-tools > .btn:not(.danger):not(:disabled):not([aria-disabled="true"]),
main[data-route="prices"] .business-customer-option.selected:not(:disabled) {
  color: #fff !important;
  background: linear-gradient(130deg, rgba(66,70,77,.91), rgba(27,29,33,.89)) !important;
  border-color: rgba(255,255,255,.46) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}

@media (max-width: 650px) {
  main[data-route="orders"] .order-card-f .btn {
    min-height: 44px !important;
  }

  :is(main[data-route="catalog"], main[data-route="dealers"], main[data-route="orders"], main[data-route="products"], main[data-route="prices"])
    .responsive-table td::before,
  body:has(main[data-route="catalog"]) dialog .responsive-table td::before,
  body:has(main[data-route="orders"]) dialog .responsive-table td::before {
    color: #5e646d !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(main[data-route="catalog"], main[data-route="dealers"], main[data-route="orders"], main[data-route="products"], main[data-route="prices"])
    .btn:where(:not(.primary):not(.danger):not(.active):not(.selected):not([aria-pressed="true"]):not(:disabled):not([aria-disabled="true"])),
  main[data-route="prices"] .business-customer-option:not(.selected):not(:disabled) {
    background: #f5f6f7 !important;
    border-color: #d9dde2 !important;
  }

  main[data-route="prices"] .business-customer-tools > .btn:not(.danger):not(:disabled):not([aria-disabled="true"]),
  main[data-route="prices"] .business-customer-option.selected:not(:disabled) {
    background: #292c31 !important;
    border-color: #656a73 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :is(main[data-route="catalog"], main[data-route="dealers"], main[data-route="orders"], main[data-route="products"], main[data-route="prices"])
    .btn:where(:not(.primary):not(.danger):not(.active):not(.selected):not([aria-pressed="true"]):not(:disabled):not([aria-disabled="true"])),
  main[data-route="prices"] .business-customer-option:not(.selected):not(:disabled) {
    background: #f5f6f7 !important;
    border-color: #d9dde2 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  main[data-route="prices"] .business-customer-tools > .btn:not(.danger):not(:disabled):not([aria-disabled="true"]),
  main[data-route="prices"] .business-customer-option.selected:not(:disabled) {
    background: #292c31 !important;
    border-color: #656a73 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Approved dark shipment group links for province and city order lists. */
#app main.desk-main[data-route="orders"]:is([data-role="manager"],[data-role="city_manager"])
 .btn.shipment-group-link:not(:disabled):not([aria-disabled="true"]){
 color:#fff!important;
 background:linear-gradient(145deg,#434851,#252931)!important;
 border-color:#292d34!important;
 box-shadow:var(--glass-dark-shadow);
 font-weight:650;
}
#app main.desk-main[data-route="orders"]:is([data-role="manager"],[data-role="city_manager"])
 .btn.shipment-group-link:not(:disabled):not([aria-disabled="true"]):hover{
 background:linear-gradient(145deg,#363b43,#1e2228)!important;
}
#app main.desk-main[data-route="orders"]:is([data-role="manager"],[data-role="city_manager"])
 .btn.shipment-group-link:focus-visible{
 outline:2px solid #525d6c;outline-offset:3px;
}

/* Approved shipment status colors in the operations order overview. */
#app main.desk-main[data-route="orders"][data-role="operations"] .shipment-overview .tag[data-shipment-status]{
 font-weight:650;
}
#app main.desk-main[data-route="orders"][data-role="operations"] .shipment-overview .tag[data-shipment-status="dispatched"]{
 color:#22543b;background:#e7f3eb;border-color:#bcd9c6;
}
#app main.desk-main[data-route="orders"][data-role="operations"] .shipment-overview .tag[data-shipment-status="ready"]{
 color:#244e79;background:#e8f1fc;border-color:#bed2ec;
}
#app main.desk-main[data-route="orders"][data-role="operations"] .shipment-overview .tag[data-shipment-status="pending"]{
 color:#704713;background:#fff4e1;border-color:#e6cea5;
}

/* Keep recognition separate from the manual customer and product panel. */
.desk-main[data-route=catalog] .ordering-recognition{
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 margin:0 0 20px;padding:18px 24px;
}
.ordering-recognition>div{min-width:0}
.ordering-recognition h2,.ordering-entry .ordering-products>h2{margin:0;font-size:18px;line-height:1.4}
.ordering-recognition p{margin:5px 0 0;font-size:13px;line-height:1.6;color:#596169}
.ordering-recognition .btn{flex:none;min-height:42px;white-space:nowrap}
.desk-main[data-route=catalog] .ordering-entry{min-width:0;padding:0}
.desk-main[data-route=catalog] .ordering-entry>.ordering-customer{
 margin:0;padding:22px 24px;border:0;border-bottom:1px solid #e6e7e8;
 border-radius:0;background:transparent;box-shadow:none;
}
.desk-main[data-route=catalog] .ordering-entry>.ordering-customer.without-dealer{grid-template-columns:minmax(0,1fr)}
.ordering-entry .ordering-products{min-width:0;padding:18px 24px 24px}
.ordering-entry .ordering-products>h2{margin-bottom:12px}
@media(min-width:651px) and (max-width:900px){
 .desk-main[data-route=catalog] .staff-order-layout{grid-template-columns:minmax(0,1fr)}
 .desk-main[data-route=catalog] .ordering-aside{position:static}
}
@media(max-width:1080px){
 .ordering-entry .warehouse-picker{grid-template-columns:minmax(0,1fr);gap:9px}
}
@media(max-width:650px){
 .desk-main[data-route=catalog] .ordering-recognition{gap:11px;padding:15px 16px;margin-bottom:14px}
 .ordering-recognition h2,.ordering-entry .ordering-products>h2{font-size:16px}
 .ordering-recognition p{font-size:12px}
 .ordering-recognition .btn{padding-inline:12px}
 .desk-main[data-route=catalog] .ordering-entry>.ordering-customer{padding:16px}
 .ordering-entry .ordering-products{padding:15px 16px 16px}
}

/* Warehouse selection follows the customer information in the order panel. */
.warehouse-picker{
 grid-column:1/-1;min-width:0;border-top:1px solid #e6e7e8;padding-top:18px;
 display:grid;grid-template-columns:minmax(220px,.95fr) minmax(0,1.25fr);gap:22px;align-items:end;
}
.warehouse-picker select{width:100%;appearance:auto}
.warehouse-picker p{margin:0 0 8px;color:#596169;font-size:13px;line-height:1.6}
.warehouse-confirm-value{font-weight:650}
@media(max-width:650px){
 .warehouse-picker{grid-template-columns:minmax(0,1fr);gap:9px;padding-top:16px}
 .warehouse-picker p{font-size:12px;margin:0}
}

/* Read-only warehouse shown during order review and fulfillment. */
#dialog .note.warehouse-readout{
 align-items:center;min-width:0;margin:0;gap:8px;
}
#dialog .warehouse-readout .icon{flex:0 0 18px;width:18px;height:18px}
#dialog .warehouse-readout>span{min-width:0;overflow-wrap:anywhere;font-size:13px}
#dialog .warehouse-readout b{margin-inline-start:8px;font-size:16px}
#dialog .warehouse-readout b,#dialog .warehouse-summary-value{font-weight:700;color:#24272b}
#dialog[data-design-view="expense"] .dialog-body:has(>.warehouse-readout)>.between>div{
 min-width:0;overflow-wrap:anywhere;
}
#dialog[data-design-view="expense"] .dialog-body:has(>.warehouse-readout)>.between .tag{flex-shrink:0}
