:root {
  --desk-ink: #17362f;
  --desk-muted: #4f665e;
  --desk-line: #d8e2db;
  --desk-surface: rgb(255 255 255 / 91%);
  --desk-wash: #eef4ef;
  --desk-moss: #256955;
  --desk-ochre: #ad7143;
  --desk-red: #9d362e;
  --desk-red-wash: #f8eae6;
  --desk-ease: cubic-bezier(.2,.75,.25,1);
}

body { background: radial-gradient(ellipse at top left, #e7f0e8, transparent 40rem) no-repeat #f4f6f2; }
.guide-header { background: #f9fcf8; }
@supports (backdrop-filter: blur(1px)) {
  .guide-header {
    background: rgb(250 253 249 / 78%);
    backdrop-filter: blur(14px);
  }
}
.guide-brand strong { color: var(--desk-ink); }
.guide-brand small, .commerce-nav .ops-nav-group > span { color: var(--desk-muted); }
.commerce-nav button { color: var(--desk-muted); }
.commerce-nav button:hover { background: rgb(224 239 227 / 68%); color: #245b48; }
.commerce-nav button.active { background: rgb(218 235 222 / 85%); color: #215440; }
@media (min-width: 1050px) {
  .commerce-nav { justify-self: stretch; }
  .commerce-nav button.active { box-shadow: inset 3px 0 #5d9579; }
  .guide-page { max-width: none; }
}

#main-content.guide-home-page { max-width: none; }
.desk-hero { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.1rem; padding: clamp(1.25rem,3.2vw,2.35rem); border: 1px solid #d5e6db; border-radius: 1.3rem; overflow: hidden; background: linear-gradient(118deg,#fcfefc 8%,#edf6ed 58%,#e5f1f1); box-shadow: 0 10px 28px -23px #497c68; }
.desk-hero::after { content: ""; position: absolute; inset: 0 0 0 34%; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg,transparent 0 19px,#bfd8cd66 19px 20px),repeating-linear-gradient(90deg,transparent 0 19px,#bfd8cd66 19px 20px); mask-image: radial-gradient(ellipse at 85% 0%,#000,transparent 75%); }
.desk-hero h1 { font-size: clamp(1.95rem, 3.35vw, 3.2rem); margin: .3rem 0 0; line-height: 1.13; color: var(--desk-ink); }
.desk-hero time { color: var(--desk-muted); font-size: .82rem; font-weight: 650; }
.desk-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.desk-metric { text-align: left; color: var(--desk-ink); background: var(--desk-surface); border: 1px solid var(--desk-line); border-radius: .9rem; padding: .95rem 1rem; display: grid; gap: .45rem; cursor: pointer; min-width: 0; overflow: hidden; }
.desk-hero,.desk-metric { position: relative; isolation: isolate; }
.desk-metric > .desk-metric-arrow { position: absolute; top: .95rem; right: .9rem; color: #547361; }
.desk-metric > span { display: flex; gap: .45rem; align-items: center; padding-right: 1rem; color: var(--desk-muted); font-size: .8rem; }
.desk-metric .icon { width: 1rem; height: 1rem; }
.desk-metric > strong { font-size: clamp(1.35rem,2.25vw,2.2rem); font-weight: 680; line-height: 1.1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.desk-metric > small { font-size: .75rem; color: var(--desk-muted); }
.desk-metric.desk-alert { background: #fcf2ee; border-color: #edd1c9; }
.desk-metric.desk-alert strong, .desk-metric.desk-alert .icon { color: var(--desk-red); }
.ops-metrics > div.desk-alert { background: #fcf2ee; border-color: #edd1c9; }
.ops-metrics > div.desk-alert strong { color: var(--desk-red); }
.desk-metric:hover { border-color: #789b8a; }
.desk-columns { display: grid; grid-template-columns: minmax(0,2.3fr) minmax(0,1fr); gap: .9rem; }
.desk-panel { border: 1px solid var(--desk-line); border-radius: .85rem; background: var(--desk-surface); min-width: 0; margin-bottom: .9rem; overflow: hidden; }
.desk-panel > header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .9rem 1rem; border-bottom: 1px solid var(--desk-line); }
.desk-panel h2 { margin: 0; color: var(--desk-ink); font-size: 1.03rem; }
.desk-panel header p { margin: .2rem 0 0; font-size: .75rem; color: var(--desk-muted); }
.desk-panel header .btn { min-height: 2rem; padding: .25rem .45rem; white-space: nowrap; }
.desk-chart { display: grid; gap: .15rem; padding: 0 .8rem .95rem; }
.desk-chart-legend { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: end; padding: .55rem 1rem .3rem; font-size: .72rem; color: var(--desk-muted); }
.desk-chart-legend span { display: flex; gap: .3rem; align-items: center; }
.desk-chart-legend span::before { content: ""; width: .5rem; height: .5rem; border-radius: .14rem; background: var(--desk-ochre); }
.desk-chart-legend span:nth-child(2)::before { background: var(--desk-moss); }
.desk-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(2.2rem, 1.5fr) minmax(0, .7fr); align-items: center; text-align: left; gap: .55rem; padding: .47rem .45rem; background: transparent; border: 0; border-radius: .35rem; color: var(--desk-ink); cursor: pointer; }
.desk-bar-row:hover { background: var(--desk-wash); }
.desk-bar-row :is(strong,small) { min-width: 0; overflow-wrap: anywhere; font-size: .76rem; }
.desk-bar-row small { text-align: right; font-variant-numeric: tabular-nums; }
.desk-bar { display: flex; height: .6rem; background: #ecf1eb; border-radius: .2rem; overflow: hidden; }
.desk-bar i { width: var(--length); background: var(--desk-ochre); }
.desk-bar i:nth-child(2) { background: var(--desk-moss); }
.desk-stock .desk-bar i:first-child,.desk-stock .desk-chart-legend span:first-child::before { background: var(--desk-moss); }
.desk-stock .desk-bar i:nth-child(2),.desk-stock .desk-chart-legend span:nth-child(2)::before { background: var(--desk-ochre); }
.desk-agenda-row > .icon { width: .95rem; height: .95rem; color: var(--desk-muted); }
.desk-column-frame { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .45rem; margin: .3rem .8rem .85rem; }
.desk-column-axis { display: flex; flex-direction: column; justify-content: space-between; height: 8.2rem; text-align: right; font-size: .65rem; line-height: 1; color: var(--desk-muted); font-variant-numeric: tabular-nums; }
.desk-chart-columns { grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: .22rem; padding: 0; background: repeating-linear-gradient(to bottom,transparent 0 calc(2.05rem - 1px), #e6ede8 calc(2.05rem - 1px) 2.05rem) top / 100% 8.2rem no-repeat; }
.desk-chart-columns .desk-bar-row { grid-template: 8.2rem auto auto / minmax(0,1fr); justify-items: center; align-content: start; gap: .25rem; padding: 0 .2rem .35rem; text-align: center; }
.desk-chart-columns .desk-bar-row strong { grid-row: 2; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-chart-columns .desk-bar { grid-row: 1; flex-direction: column-reverse; height: 100%; width: clamp(.85rem,5vw,2.5rem); border-radius: .28rem .28rem .06rem .06rem; background: transparent; }
.desk-chart-columns .desk-bar i { width: 100%; height: var(--length); }
.desk-chart-columns .desk-bar-row small { text-align: center; color: var(--desk-muted); }
.desk-empty { margin: 0; padding: 1.4rem 1rem; color: var(--desk-muted); font-size: .86rem; }
.desk-attention { display: flex; flex-wrap: wrap; gap: .45rem; padding: .65rem .85rem; border-bottom: 1px solid var(--desk-line); }
.desk-attention .btn { min-height: 2rem; padding: .2rem .55rem; font-size: .77rem; background: var(--desk-red-wash); border-color: #ecd6d0; color: var(--desk-red); }
.desk-agenda-list { list-style: none; padding: .25rem .45rem; margin: 0; }
.desk-agenda-list li + li { border-top: 1px solid #e8eeea; }
.desk-agenda-row { display: grid; grid-template-columns: minmax(0,4.45rem) minmax(0,1fr) auto auto; align-items: center; gap: .65rem; width: 100%; padding: .7rem .55rem; border: 0; border-radius: .55rem; background: transparent; color: var(--desk-ink); text-align: left; cursor: pointer; }
.desk-agenda-row:hover,.desk-agenda-row:focus-visible { background: #edf5ee; }
.desk-agenda-row:focus-visible { outline-offset: -2px; }
.desk-agenda-date { color: var(--desk-muted); font-size: .8rem; font-weight: 650; white-space: nowrap; }
.desk-agenda-item { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.desk-agenda-item small { color: var(--desk-muted); font-size: .74rem; }
.desk-agenda-value { display: grid; gap: .2rem; justify-items: end; font-size: .81rem; font-variant-numeric: tabular-nums; }
.desk-state { background: var(--desk-wash); color: var(--desk-muted); padding: .25rem .45rem; font-size: .73rem; border-radius: .35rem; white-space: nowrap; }
.desk-state[data-priority="late"] { background: var(--desk-red-wash); color: var(--desk-red); }
.desk-state[data-priority="today"] { background: #fff1d9; color: #83551b; }

@keyframes desk-column-open { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.process-steps { margin: 0 0 1rem; }
.process-steps ol { display: flex; flex-wrap: wrap; gap: .4rem .7rem; list-style: none; margin: 0; padding: 0; }
.process-steps li,.process-steps button { display: flex; align-items: center; gap: .37rem; font-size: .76rem; font-weight: 600; color: var(--desk-muted); line-height: 1.25; }
.process-steps li + li::before { content: ""; width: .65rem; height: 1px; background: #afc0b5; }
.process-steps button { border: 0; border-radius: .35rem; background: transparent; padding: .22rem; cursor: pointer; }
.process-steps button:hover { color: var(--desk-moss); background: var(--desk-wash); }
.process-steps li b { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #eaf0ea; color: #37594b; font-size: .69rem; flex: none; }
.process-steps li[aria-current="step"] { color: var(--desk-ink); }
.process-steps li[aria-current="step"] b { color: white; background: var(--desk-moss); }

#modal:has(.pdf-review-layout) { width: min(95vw,86rem); }
.pdf-review-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.2fr); align-items: start; gap: 1rem; }
.pdf-original,.pdf-review-data { min-width: 0; }
.pdf-original { background: #edf2ee; border: 1px solid var(--desk-line); border-radius: .7rem; padding: .7rem; }
.pdf-original > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.pdf-original [data-pdf-page-label] { color: var(--desk-muted); }
.pdf-original .inline-actions { margin: .35rem 0; }
.pdf-canvas-wrap { overflow: auto; max-height: min(52vh,35rem); background: #fff; border-radius: .3rem; }
.pdf-canvas-wrap canvas { display: block; width: 100%; min-width: 32rem; height: auto; }
.pdf-original [data-pdf-status]:empty { display: none; }
.purchase-review-heading { display: grid; gap: .18rem; margin-block: .7rem; }
.purchase-review-heading :is(h3,p) { margin: 0; }
.purchase-verified { border-radius: .4rem; padding: .55rem .7rem; margin: 0; background: var(--desk-wash); color: var(--desk-moss); font-weight: 650; font-size: .85rem; }
.purchase-source-lines { overflow: auto; border: 1px solid var(--desk-line); border-radius: .45rem; }
.purchase-source-lines table { min-width: 51rem; width: 100%; }
.purchase-source-lines :is(th,td) { padding: .45rem .55rem; font-size: .78rem; font-variant-numeric: tabular-nums; }
.purchase-source-lines td small { display: block; }
.purchase-source-lines :is(thead,tfoot) { background: #edf3ed; }
.purchase-source-lines .purchase-picture { min-width: 4.4rem; text-align: center; }
.purchase-picture img { display: block; margin: 0 auto .2rem; width: min(3rem,100%); height: auto; aspect-ratio: var(--purchase-image-ratio); object-fit: fill; }
.purchase-picture a { font-size: .72rem; color: var(--desk-moss); text-underline-offset: .15em; }
.purchase-source-summary,.purchase-source-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem .8rem; margin-block: .7rem; }
.purchase-source-summary > div:last-child { grid-column: 1 / -1; }
.pdf-review-data dt { font-size: .74rem; color: var(--desk-muted); }
.pdf-review-data dd { margin: .14rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.purchase-source-terms { font-size: .83rem; white-space: pre-wrap; }
.purchase-match-issue { color: var(--desk-red); }
.purchase-arrival { margin-block: .9rem; }
.purchase-arrival h3 { margin: 0; font-size: .95rem; }
.purchase-arrival ul { padding-left: 1.45rem; }
.pdf-review-data .checkbox { display: flex; align-items: baseline; gap: .48rem; margin-block: .7rem; }
.pdf-review-data .checkbox input { flex: none; }
.pdf-upload input { max-width: 100%; }
@media (max-width: 760px) {
  .pdf-review-layout { grid-template-columns: minmax(0,1fr); }
  .pdf-canvas-wrap { max-height: 18rem; }
  .pdf-canvas-wrap canvas { min-width: 23rem; }
}

.ops-report-filters { padding: .85rem 1rem; }
.ops-report-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr) auto; align-items: end; gap: .6rem; }
.ops-report-toolbar .field,.ops-extra-filters .field { margin: 0; min-width: 0; }
.ops-extra-filters { margin-top: .65rem; }
.ops-extra-filters summary { width: fit-content; font-size: .78rem; color: var(--desk-muted); cursor: pointer; }
.ops-extra-filters > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .6rem; margin-block: .55rem; }
.ops-factory > summary { background: var(--desk-wash); border-bottom: 1px solid var(--desk-line); }
.ops-factory > summary .ops-factory-count { align-self: center; margin: 0; }
.ops-factory > summary progress { width: min(14%,6rem); }
.ops-table table { font-variant-numeric: tabular-nums; }
.ops-table tbody tr:hover { background: #f7faf7; }
.ops-factory { container-type: inline-size; }
.ops-factory .ops-table table { table-layout: fixed; min-width: 0; }
.ops-factory .ops-table th:nth-child(1) { width: 12%; }
.ops-factory .ops-table th:nth-child(2) { width: 15%; }
.ops-factory .ops-table th:nth-child(3) { width: 9%; }
.ops-factory .ops-table th:nth-child(4) { width: 13%; }
.ops-factory .ops-table th:nth-child(5) { width: 9%; }
.ops-factory .ops-table th:nth-child(6) { width: 11%; }
.ops-factory .ops-table th:nth-child(7) { width: 9%; }
.shipping-report-actions { background: #f6faf7; }
.shipping-register:empty { display: none; }
.shipping-register:not(:empty) { margin-bottom: .3rem; }
.shipping-register .btn { min-height: 2.25rem; padding: .35rem .55rem; font-size: .8rem; white-space: nowrap; }
.shipping-blocker { color: #6a5540; }
.shipping-report-actions .ops-row-actions .btn { padding-inline: .15rem; }
.ops-table td > .btn.subtle { min-height: 1.6rem; padding: .1rem 0; }
.ops-receivables .ops-report-toolbar { padding: .8rem 1rem; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr) auto; }
@container (max-width: 775px) {
  .shipping-report-table :is(table,tbody) { display: block; }
  .shipping-report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .shipping-report-table tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem .75rem; margin: .6rem; padding: .75rem; border: 1px solid var(--desk-line); border-radius: .65rem; background: #fff; }
  .shipping-report-table tbody td { min-width: 0; padding: 0; border: 0; }
  .shipping-report-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .22rem; color: var(--desk-muted); font-size: .72rem; }
  .shipping-report-table .shipping-report-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; padding: .5rem .55rem; border-radius: .45rem; }
  .shipping-report-table .shipping-register { margin: 0; }
}
.ops-form-payment { min-inline-size: 0; border: 1px solid var(--desk-line); border-radius: .62rem; padding: .7rem .8rem .75rem; margin: .9rem 0 0; }
.ops-form-payment legend { padding-inline: .2rem; color: var(--desk-ink); font-size: .92rem; font-weight: 680; }
.ops-form-payment > .form-note { margin: 0 0 .45rem; }
.ops-form-payment .field { margin-bottom: 0; }
.shipping-payment-choices { display: flex; flex-wrap: wrap; gap: .35rem .55rem; }
.shipping-payment-choices label { display: inline-flex; align-items: center; gap: .36rem; min-height: 2.45rem; padding: .32rem .55rem; border: 1px solid var(--desk-line); border-radius: .45rem; background: #fff; cursor: pointer; }
.shipping-payment-choices label:has(:checked) { background: var(--desk-wash); border-color: #8bb8a3; }
.shipping-payment-choices input[type="radio"] { margin: 0; accent-color: var(--desk-moss); }
.shipping-payment-choices + .form-grid:has(div:not([hidden])) { margin-top: .55rem; }
.shipping-paid { margin-top: .65rem; }

body:has(.dispatch-layout) { isolation: isolate; }
body:has(.dispatch-layout)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 14% 55%, rgb(196 226 207 / 48%), transparent 52%),
    radial-gradient(ellipse at 91% 85%, rgb(205 230 231 / 50%), transparent 53%);
}
@media (prefers-reduced-motion: no-preference) {
  body:has(.dispatch-layout)::before { animation: dispatch-background-glow 20s ease-in-out infinite alternate; }
}
@keyframes dispatch-background-glow {
  from { opacity: .55; transform: scale(1); }
  to { opacity: 1; transform: scale(1.08); }
}
.dispatch-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 1rem; align-items: start; }
.dispatch-layout > .dispatch-calendar { padding: 0; overflow: hidden; border-radius: .9rem; container-type: inline-size; }
.dispatch-calendar .fulfillment-heading { margin: 0; padding: .8rem 1rem; }
.dispatch-calendar .fulfillment-heading > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .85rem; }
.dispatch-calendar .fulfillment-heading p { margin: 0; font-size: .76rem; color: var(--desk-muted); }
.dispatch-month-picker { display: flex; gap: .3rem; }
.dispatch-month-picker select {
  min-width: 0;
  min-height: 2.35rem;
  padding: .18rem .35rem;
  border: 1px solid #c9dbcf;
  border-radius: .45rem;
  color: var(--desk-ink);
  background: #f4f8f4;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.dispatch-month-picker select:hover { background: #eaf3ec; border-color: #8eb7a1; }
.dispatch-grid { gap: 1px; background: var(--desk-line); border-block: 1px solid var(--desk-line); }
.dispatch-weekday { padding: .55rem 0; background: #eaf0ea; color: var(--desk-muted); font-size: .8rem; }
.dispatch-grid .dispatch-day { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .35rem; height: clamp(5.15rem, 10cqi, 7rem); min-height: 0; padding: .4rem; border: 0; border-radius: 0; background: #fff; color: var(--desk-ink); text-align: left; overflow: hidden; cursor: pointer; }
.dispatch-grid .dispatch-day.outside { background: #f0f3ee; color: #52665d; }
.dispatch-grid .dispatch-day.has-batches { background: #fffaf8; }
.dispatch-grid .dispatch-day[aria-pressed="true"] { background: #eaf4ee; color: var(--desk-ink); box-shadow: inset 0 0 0 2px var(--desk-moss); }
.dispatch-grid .dispatch-day:hover { box-shadow: inset 0 0 0 2px #7eaa95; }
.dispatch-grid .dispatch-day:focus-visible { z-index: 1; outline-offset: -3px; }
.dispatch-day-top { display: flex; justify-content: space-between; align-items: center; }
.dispatch-day-number { padding: .19rem .3rem; font-weight: 650; font-size: .9rem; }
.dispatch-day-top > small { margin-left: auto; margin-right: .25rem; color: var(--desk-red); font-variant-numeric: tabular-nums; }
.dispatch-day[aria-current="date"] .dispatch-day-number { background: var(--desk-moss); color: #fff; border-radius: .28rem; }
.dispatch-dot { width: .42rem; height: .42rem; background: var(--desk-red); border-radius: 100%; margin-right: .25rem; }
.dispatch-events { display: grid; gap: .2rem; }
.dispatch-events > span { display: flex; justify-content: space-between; align-items: center; gap: .28rem; min-width: 0; padding: .22rem .34rem; border-radius: .28rem; background: #e9efeb; color: #3e5f50; font-size: .75rem; line-height: 1.1; }
.dispatch-events > span[data-kind="pending"] { background: var(--desk-red-wash); color: #853128; }
.dispatch-events strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.dispatch-events small { display: inline; white-space: nowrap; font-size: inherit; }
.dispatch-events > small { font-size: .62rem; color: var(--desk-muted); }
.dispatch-grid .dispatch-day-counts { display: none; }
.dispatch-calendar-key { margin: 0; padding: .4rem .95rem; align-items: center; }
.dispatch-calendar-key > span:nth-child(2)::before { background: #789789; }
.dispatch-calendar-key > .btn { margin-left: auto; min-height: 2rem; padding: .25rem .45rem; }
.dispatch-queue { min-width: 0; }
.dispatch-queue-header { padding-bottom: .65rem; border-bottom: 1px solid var(--desk-line); margin-bottom: .55rem; }
.dispatch-queue-header .dispatch-filters { margin: .6rem 0 0; }
.dispatch-queue-header .dispatch-filters .btn { min-height: 2.2rem; padding: .3rem .65rem; }
.dispatch-filter-more { position: relative; }
.dispatch-filter-more > summary { cursor: pointer; padding: .35rem .58rem; font-size: .81rem; color: var(--desk-muted); }
.dispatch-filter-more > div { position: absolute; top: calc(100% + .3rem); right: 0; z-index: 3; display: grid; width: max-content; padding: .4rem; background: #fff; border: 1px solid var(--desk-line); border-radius: .55rem; box-shadow: 0 8px 22px -14px #305846; }
.dispatch-row-status { display: inline-flex; border-radius: .4rem; padding: .15rem .38rem; background: var(--desk-wash); color: var(--desk-muted); line-height: 1.35; }
.dispatch-row-status[data-state="已逾期"],.dispatch-row-status[data-state="待补库存"],.dispatch-row-status[data-state="需重新通知"] { background: var(--desk-red-wash); color: var(--desk-red); }
.dispatch-queue .dispatch-row-actions > .primary { order: -2; }
.dispatch-queue .dispatch-row-actions > .secondary { order: -1; }
.dispatch-queue .dispatch-later { margin: .55rem 0; }
.dispatch-queue .fulfillment-table th { width: auto; }
.dispatch-queue-heading h2 { scroll-margin-top: 8rem; }
@media (min-width: 1320px) {
  .dispatch-layout { grid-template-columns: minmax(0,1.9fr) minmax(22rem,1fr); }
  .dispatch-queue .fulfillment-table td:last-child .btn { padding-inline: .3rem; }
}
@media (min-width: 1320px) and (min-height: 880px) {
  .dispatch-layout > .dispatch-calendar { position: sticky; top: 1rem; }
}
@container (max-width: 485px) {
  .dispatch-grid .dispatch-day { height: 3.6rem; padding: .2rem .12rem; gap: .08rem; }
  .dispatch-day-top { justify-content: center; }
  .dispatch-day-top > small, .dispatch-events { display: none; }
  .dispatch-dot { position: absolute; top: .28rem; right: .16rem; margin: 0; width: .3rem; height: .3rem; }
  .dispatch-grid .dispatch-day-counts { display: grid; align-self: center; }
}
.move-form-grid { display: grid; gap: 1rem; }
.move-date-flow { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: .55rem; }
.move-date-flow > div { border: 1px solid var(--desk-line); border-radius: .5rem; background: var(--desk-wash); padding: .6rem .7rem; display: grid; gap: .25rem; }
.move-date-flow > div > span { font-size: .75rem; color: var(--desk-muted); }

.sales-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(15rem, .41fr); align-items: start; gap: .9rem; }
.sales-workspace form { min-width: 0; }
.sale-side { position: sticky; top: 1rem; }
.sale-side header > .icon { color: var(--desk-moss); width: 1.15rem; height: 1.15rem; }
.side-search { padding: .65rem .75rem .45rem; display: grid; gap: .25rem; }
.side-search input { min-width: 0; width: 100%; padding: .6rem; border: 1px solid var(--desk-line); border-radius: .45rem; background: #fbfdfa; }
.side-search span { color: var(--desk-muted); font-size: .71rem; }
.side-product-list { max-height: min(58vh,38rem); overflow: auto; scrollbar-width: thin; padding: 0 .35rem .35rem; }
.side-product { display: grid; grid-template-columns: 2rem minmax(0,1fr) auto; width: 100%; gap: .55rem; align-items: center; text-align: left; border: 0; border-top: 1px solid var(--desk-line); background: #fff; color: var(--desk-ink); padding: .6rem .3rem; cursor: pointer; }
.side-product[hidden] { display: none; }
.side-product:hover,.side-product:focus-visible { background: var(--desk-wash); }
.side-product:focus-visible { outline-offset: -2px; }
.side-product .product-photo { width: 2rem; height: 2rem; overflow: hidden; font-size: 0; }
.side-product .product-photo img { width: 100%; height: 100%; object-fit: contain; }
.side-product-text { min-width: 0; display: grid; gap: .15rem; }
.side-product-text strong { overflow-wrap: anywhere; font-size: .85rem; }
.side-product-text small,.side-product-stock { font-size: .71rem; color: var(--desk-muted); overflow-wrap: anywhere; }
.side-product-stock { display: flex; flex-wrap: wrap; gap: .25rem .6rem; }
.side-product-stock b { color: var(--desk-moss); }
.side-product-add { background: var(--desk-wash); color: var(--desk-moss); padding: .18rem .36rem; min-width: 1.37rem; text-align: center; font-weight: 680; border-radius: .3rem; }
.sale-item { border: 1px solid var(--desk-line); border-radius: .55rem; padding: .7rem; margin-top: .65rem; min-width: 0; }
.sale-item > header,.sale-item > header > div:first-child { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .55rem; }
.sale-item > header { margin-bottom: .6rem; }
.sale-lines .sale-item .product-photo { float: none; margin: 0; width: 2.1rem; height: 2.1rem; }
.sale-item > header .btn { min-height: 1.8rem; padding: .18rem .35rem; font-size: .75rem; }
.sale-item-fields { display: grid; gap: .55rem; }
.sale-price-fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
.sale-delivery-fields { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr); align-items: end; margin-top: .7rem; }
.sale-item-fields .field { margin: 0; }
.sale-lines .sale-item-fields :is(input,select,input[type=date],input[data-key=discount]) { width: 100%; min-width: 0; box-sizing: border-box; }
.sale-line-subtotal { min-width: 0; display: grid; align-content: center; justify-items: end; gap: .15rem; min-height: 2.75rem; padding: .25rem .5rem; color: var(--desk-ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sale-line-subtotal span { color: var(--desk-muted); font-size: .75rem; }
.sale-item .stock-line-preview { min-width: 0; max-width: none; }
.sale-item-tools .sale-pick-mobile { display: none; }
.sale-more-options { position: relative; }
.sale-more-options > summary { padding: .4rem .6rem; color: var(--desk-muted); cursor: pointer; font-size: .8rem; }
.sale-more-options > div { position: absolute; z-index: 5; right: 0; top: calc(100% + .25rem); min-width: 10rem; padding: .3rem; background: #fbfdfa; border: 1px solid var(--desk-line); border-radius: .65rem; box-shadow: 0 8px 22px -12px #496e5a; }
.sale-more-options .btn { display: flex; justify-content: start; width: 100%; min-height: 2.2rem; padding: .35rem .6rem; white-space: nowrap; }
.sale-more-options .btn:hover { background: var(--desk-wash); }

@media (max-width: 1140px) { .sale-price-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 980px) {
  .sales-workspace { grid-template-columns: minmax(0,1fr); }
  .sale-side { display: none; }
  .sale-item-tools .sale-pick-mobile { display: inline-flex; }
  .sale-more-options .sale-pick-alternate { display: none; }
}
@media (max-width: 700px) {
  .desk-metrics,.ops-report-toolbar,.ops-extra-filters > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .desk-metric > .desk-metric-arrow { display: none; }
  .desk-metric > span { padding-right: 0; }
  .desk-columns { grid-template-columns: minmax(0,1fr); gap: 0; }
  .desk-agenda-row { grid-template-columns: minmax(0,4rem) minmax(0,1fr) minmax(0,5.65rem); gap: .4rem; }
  .desk-agenda-row > .icon { display: none; }
  .desk-agenda-value { overflow-wrap: anywhere; text-align: right; }
  .ops-receivables .ops-report-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dispatch-grid .dispatch-day { height: 3.55rem; padding: .21rem .15rem; gap: .08rem; }
  .dispatch-day-top { justify-content: center; }
  .dispatch-day-top > small { display: none; }
  .dispatch-dot { position: absolute; top: .28rem; right: .14rem; margin: 0; width: .3rem; height: .3rem; }
  .dispatch-events { display: none; }
  .dispatch-grid .dispatch-day-counts { display: grid; align-self: center; }
  .dispatch-queue :is(.dispatch-queue-heading,.dispatch-filters) { gap: .35rem; }
  .move-date-flow { grid-template-columns: minmax(0,1fr); }
  .move-date-flow > span { display: none; }
  .sale-delivery-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sale-line-subtotal { grid-column: 1 / -1; grid-auto-flow: column; justify-content: end; align-items: baseline; gap: .45rem; min-height: 0; padding: .15rem 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .guide-page .btn,.desk-metric,.desk-agenda-row,.desk-bar-row,.side-product {
    transition: background-color 200ms var(--desk-ease), border-color 200ms var(--desk-ease), transform 230ms var(--desk-ease), box-shadow 230ms var(--desk-ease);
  }
  .desk-metric:active,.desk-agenda-row:active,.desk-bar-row:active { transform: scale(.985); }
  .desk-agenda-row > .icon,.desk-metric-arrow { transition: transform 230ms var(--desk-ease); }
  .desk-agenda-row:hover > .icon,.desk-metric:hover .desk-metric-arrow { transform: translateX(3px); }
  .sale-more-options[open] > div { animation: workspace-dialog-in 170ms var(--desk-ease); }
  .desk-bar i { transform-origin: left; animation: desk-bar-open 390ms cubic-bezier(.25,.75,.3,1) both; }
  .desk-chart-columns .desk-bar i { transform-origin: bottom; animation-name: desk-column-open; }
  .dispatch-events > span { transition: background-color 150ms ease; }
  .side-product-add { transition: background-color 150ms ease, transform 150ms ease; }
  .side-product:hover .side-product-add { background: #dbece0; transform: scale(1.06); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-ambient-light]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 220px 138px at var(--light-x,50%) var(--light-y,50%),#b1e3d080,transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms var(--desk-ease);
  }
  [data-ambient-light]:hover::before { opacity: 1; }
  .desk-metric:hover:not(:active) { transform: translateY(-2px); box-shadow: 0 9px 20px -14px #477760; }
  .commerce-nav button .icon { transition: transform 180ms ease; }
  .commerce-nav button:hover .icon { transform: translateX(2px); }
}
@keyframes desk-bar-open { from { transform: scaleX(.02); } to { transform: scaleX(1); } }
