/* Shared compact truck drawing; keeps tactile slots inside its own scroll area. */
#dispatch .stage-grid > *, #load-plan-form, .loading-truck-config, .loading-truck-bed { min-width: 0; }
/* Planning precedes loading; a full row keeps the whole standard truck visible on desktop. */
#dispatch > .stage-grid.two-up { grid-template-columns: minmax(0, 1fr); }
.loading-truck-config { display: grid; gap: 12px; padding: 14px; border: 1px solid #c7dfd1; border-radius: 12px; background: #f8fcf9; }
.loading-truck-config h3, .loading-truck-config p { margin: 0; }
.loading-truck-legend { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .78rem; margin: 4px 0 10px; }
.loading-fumi-key { color: #765c0c; font-weight: 700; }
.loading-truck-scroll { overflow-x: auto; overscroll-behavior-inline: contain; padding: 10px 3px 22px; max-width: 100%; }
.loading-truck { display: flex; align-items: stretch; gap: 6px; width: max-content; }
.loading-truck-cab { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; flex: 0 0 62px; min-height: 110px; position: relative; border: 2px solid #376553; border-radius: 23px 5px 5px 23px; background: #e5f0e9; color: #214b3c; }
.loading-truck-cab::before, .loading-truck-cab::after { content: ""; position: absolute; width: 23px; height: 8px; background: #315246; border-radius: 3px; left: 18px; }
.loading-truck-cab::before { top: -7px; } .loading-truck-cab::after { bottom: -7px; }
.loading-truck-cab strong { font-size: .58rem; }
.loading-truck-window { width: 36px; height: 27px; display: block; border: 2px solid #568373; border-radius: 8px 2px 2px 8px; background: #c3dfdd; }
.loading-truck-bed { display: grid; gap: 7px; padding: 7px; border: 2px solid #789b8c; background: #fff; border-radius: 4px; flex: none; }
.loading-truck-row { display: grid; grid-template-columns: 14px; grid-auto-flow: column; grid-auto-columns: 44px; gap: 5px; align-items: center; }
.loading-row-number { font-size: .65rem; color: #526f63; text-align: center; }
#dispatch .loading-position { padding: 2px; border: 1px solid #9ab5a8; border-radius: 5px; width: 44px; height: 48px; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 1px; background: #f9fcfa; color: #285942; text-align: center; line-height: 1; }
#dispatch .loading-position strong { font-size: .84rem; } #dispatch .loading-position span { font-size: .66rem; min-height: 10px; }
#dispatch .loading-position.is-fumigation { background: #fff1b9; border: 2px solid #a88000; color: #67500b; }
#dispatch .loading-position.is-occupied { background: #d5eddc; border-color: #397b50; }
#dispatch .loading-position.is-occupied.is-fumigation { background: #f0ecc0; }
#dispatch .loading-position:disabled { opacity: 1; cursor: default; }
#dispatch .loading-position.is-tail-choice:not(:disabled) { outline: 1px dashed #ae860a; outline-offset: 1px; cursor: pointer; }
#dispatch .loading-position:focus-visible { outline: 3px solid #216a9b; outline-offset: 2px; }
.loading-truck-doors { display: grid; place-items: center; flex: 0 0 22px; border-right: 4px double #517463; color: #315d4b; writing-mode: vertical-rl; letter-spacing: .1em; font-size: .62rem; }
.loading-config-help { font-size: .8rem; line-height: 1.5; }
.dispatch-waiting { border: 1px solid #c6dfd0; padding: 16px; border-radius: 12px; margin-bottom: 18px; background: #f5faf6; }
.dispatch-waiting-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.dispatch-waiting-card { display: grid; align-content: start; gap: 10px; background: #fff; padding: 14px; border: 1px solid #d5e6dd; border-radius: 9px; min-width: 0; }
.dispatch-waiting-card header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dispatch-waiting-card p { margin: 0; overflow-wrap: anywhere; }
.dispatch-waiting-card details p { margin-top: 8px; }
.dispatch-waiting-card summary { cursor: pointer; color: #245b45; font-size: .8rem; }
.dispatch-date-conflict { color: #865315; font-size: .8rem; }
@media (max-width: 600px) { .loading-truck-config { padding: 10px; } .loading-truck-cab { flex-basis: 49px; } .dispatch-waiting { padding: 10px; } .loading-truck-legend { font-size: .7rem; } }
