.dispatch-form { display: grid; gap: 14px; }
.dispatch-panel { padding: 20px; box-shadow: var(--shadow-soft); }
.dispatch-section-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin-bottom: 20px; }
.dispatch-section-head h2 { margin: 0 0 5px; }
.dispatch-section-head p { margin: 0; font-size: 11px; }
.route-grid { display: grid; gap: 0; }
.locked-field { min-height: 76px; display: grid; align-content: center; margin-bottom: 17px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(241,232,220,.62); }
.locked-field span, .locked-field small { color: var(--faint); font-size: 10px; }
.locked-field strong { margin: 3px 0; font-size: 15px; }
.quality-list { display: grid; gap: 11px; }
.quality-row { position: relative; display: grid; gap: 0; padding: 15px 44px 0 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.56); }
.quality-row label { position: relative; }
.unit-label { position: absolute; right: 12px; top: 39px; z-index: 1; color: var(--faint); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.quality-row input { padding-right: 42px; font-size: 20px; font-weight: 760; }
.remove-row { position: absolute; top: 11px; right: 11px; width: 30px; height: 30px; border: 0; border-radius: 10px; color: var(--faint); background: transparent; font-size: 22px; cursor: pointer; }
.remove-row:hover { color: var(--danger); background: var(--danger-soft); }
.quality-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 15px; }
.live-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; }
.live-total span { color: var(--muted); font-size: 11px; font-weight: 760; }
.live-total strong { font: 600 24px/1 Georgia, serif; color: var(--roast-dark); }
.dispatch-submit { display: grid; gap: 15px; align-items: center; padding: 18px 4px 6px; }
.dispatch-submit p { margin: 5px 0 0; font-size: 11px; }
.send-button { min-width: 180px; }

.dispatch-success { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; padding: 14px 16px; border: 1px solid rgba(102,112,75,.18); border-radius: 18px; background: var(--leaf-soft); }
.success-check { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--leaf); font-weight: 900; }
.dispatch-success strong, .dispatch-success small { display: block; }
.dispatch-success strong { font-size: 13px; }
.dispatch-success small { margin-top: 2px; color: #65704b; font-size: 10px; }
.movement-hero { display: grid; gap: 24px; align-items: end; margin-bottom: 26px; }
.movement-hero h1 { margin-top: 10px; font-size: clamp(38px, 8vw, 68px); }
.movement-hero h1 em { font-style: normal; }
.movement-hero p { margin: 0; font-size: 12px; }
.movement-total { width: fit-content; min-width: 150px; padding: 18px; border-radius: 22px; color: #fffaf2; background: linear-gradient(145deg, var(--roast), var(--roast-dark)); box-shadow: var(--shadow); }
.movement-total span, .movement-total small { display: block; opacity: .72; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.movement-total strong { display: inline-block; margin: 6px 4px 2px 0; font: 600 36px/.9 Georgia, serif; }
.movement-card { padding: 20px; box-shadow: var(--shadow-soft); }
.movement-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 15px; }
.movement-card-head h2 { margin: 5px 0 0; }
.status.transit { color: #795629; background: #f2e3c9; }
.movement-items { display: grid; }
.movement-item { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.movement-item span { font-size: 13px; font-weight: 750; }
.movement-item strong { font: 600 20px/1 Georgia, serif; }
.movement-item strong small { color: var(--faint); font: 800 9px/1 sans-serif; text-transform: uppercase; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

@media (min-width: 620px) {
  .dispatch-panel, .movement-card { padding: 28px; }
  .route-grid { grid-template-columns: 1fr 1fr; gap: 13px; }
  .quality-row { grid-template-columns: minmax(0, 1.5fr) minmax(180px, .7fr); gap: 13px; padding-right: 50px; }
  .quality-actions { flex-direction: row; justify-content: space-between; align-items: center; }
  .live-total { min-width: 220px; gap: 20px; }
  .dispatch-submit { grid-template-columns: 1fr auto; }
  .movement-hero { grid-template-columns: 1fr auto; }
}

.pending-count { display: inline-flex; margin-top: 12px; padding: 6px 9px; border-radius: 999px; color: #6d4c22; background: #f2e3c9; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.arrival-stack { display: grid; gap: 12px; }
.arrival-card { display: grid; gap: 16px; padding: 19px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,250,242,.78); box-shadow: var(--shadow-soft); text-decoration: none; }
.arrival-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.arrival-ref { color: var(--roast); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.arrival-card h2 { margin: 5px 0 0; font-size: 22px; }
.arrival-card h2 em { color: var(--roast); font-style: normal; }
.arrival-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font-size: 10px; }
.arrival-meta span + span::before { content: '·'; margin-right: 16px; color: var(--faint); }
.arrival-bottom { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; padding-top: 15px; border-top: 1px solid var(--line); }
.arrival-bottom > div:nth-child(2) { display: none; }
.arrival-bottom small { display: block; margin-bottom: 3px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.arrival-bottom strong { font: 600 25px/1 Georgia, serif; }
.arrival-bottom strong span { color: var(--faint); font: 800 9px/1 sans-serif; text-transform: uppercase; }
.arrival-open { align-self: center; color: var(--roast); font-size: 11px; font-weight: 850; }
.empty-arrivals { padding: 50px 20px; text-align: center; box-shadow: var(--shadow-soft); }
.empty-arrivals h2 { margin: 12px 0 6px; }
.empty-arrivals p { margin: 0; font-size: 12px; }
.empty-mark { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; color: white; background: var(--leaf); font-weight: 900; }

.receive-header { display: grid; gap: 22px; align-items: end; margin-bottom: 25px; }
.receive-header h1 { margin: 10px 0 10px; font-size: clamp(38px, 8vw, 68px); }
.receive-header h1 em { color: var(--roast); font-style: normal; }
.receive-header p { margin: 0; font-size: 11px; }
.receive-total { background: linear-gradient(145deg, #5f6548, #393e2d); }
.receive-form { display: grid; gap: 14px; }
.receive-panel { padding: 20px; box-shadow: var(--shadow-soft); }
.receive-intro { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin-bottom: 20px; }
.receive-intro h2 { margin: 0 0 5px; }
.receive-intro p { margin: 0; font-size: 11px; }
.receive-table { display: grid; }
.receive-table-head { display: none; }
.receive-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.receive-quality, .receive-sent, .receive-diff { display: grid; align-content: center; min-height: 46px; }
.receive-row small { margin-bottom: 4px; color: var(--faint); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.receive-quality strong { font-size: 14px; }
.receive-sent strong, .receive-diff strong { font: 600 19px/1 Georgia, serif; }
.receive-sent strong span { color: var(--faint); font: 800 8px/1 sans-serif; text-transform: uppercase; }
.receive-input { grid-column: 1 / -1; position: relative; }
.receive-input label { margin: 0; position: relative; }
.receive-input input { padding-right: 43px; font-size: 22px; font-weight: 780; }
.receive-unit { top: 39px; }
.receive-diff { text-align: right; }
.receive-diff.loss strong, .difference-value.loss, .difference-summary.loss strong, .closed-summary .loss strong { color: var(--danger); }
.receive-diff.gain strong, .difference-value.gain, .difference-summary.gain strong, .closed-summary .gain strong { color: #7b5b23; }
.receive-diff.exact strong, .difference-value.exact, .difference-summary.exact strong, .closed-summary .exact strong { color: var(--leaf); }
.receipt-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,250,242,.72); box-shadow: var(--shadow-soft); }
.receipt-summary > div { min-width: 0; padding: 14px 12px; border-right: 1px solid var(--line); }
.receipt-summary > div:last-child { border-right: 0; }
.receipt-summary span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.receipt-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; font: 600 16px/1 Georgia, serif; white-space: nowrap; }
.receipt-summary strong small { color: var(--faint); font: 800 8px/1 sans-serif; text-transform: uppercase; }

.comparison-head { display: none; }
.comparison-item { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comparison-item > span { grid-column: 1 / -1; }
.comparison-item strong:nth-of-type(2), .comparison-item strong:nth-of-type(3) { text-align: right; }
.difference-value { text-align: right; }
.closed-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.closed-summary > div { padding: 13px 10px; border-right: 1px solid var(--line); }
.closed-summary > div:last-child { border-right: 0; }
.closed-summary span { display: block; margin-bottom: 4px; color: var(--faint); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.closed-summary strong { font-size: 11px; }
.received-foot { margin-top: 14px; color: var(--muted); font-size: 10px; text-align: right; }

@media (min-width: 620px) {
  .arrival-card { padding: 22px; }
  .arrival-bottom { grid-template-columns: 1fr 1fr auto; }
  .arrival-bottom > div:nth-child(2) { display: block; }
  .receive-header { grid-template-columns: 1fr auto; }
  .receive-panel { padding: 28px; }
  .receive-row { grid-template-columns: minmax(120px, 1.2fr) minmax(110px, .7fr) minmax(180px, 1fr) minmax(120px, .8fr); align-items: center; }
  .receive-input { grid-column: auto; }
  .receive-row small { display: none; }
  .receive-input label { font-size: 0; }
  .receive-unit { top: 18px; }
  .receive-diff { text-align: right; }
  .receipt-summary > div { padding: 17px 18px; }
  .receipt-summary strong { font-size: 21px; }
  .comparison-head { display: grid; grid-template-columns: minmax(130px, 1.3fr) repeat(3, minmax(100px, .7fr)); gap: 12px; padding: 10px 0; color: var(--faint); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .comparison-head span:not(:first-child) { text-align: right; }
  .comparison-item { grid-template-columns: minmax(130px, 1.3fr) repeat(3, minmax(100px, .7fr)); align-items: center; }
  .comparison-item > span { grid-column: auto; }
}

@media (min-width: 900px) {
  .arrival-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty-arrivals { grid-column: 1 / -1; }
}
