/* Yard and handheld screen. Uses np.css tokens only. */
.yard-controls { display: grid; grid-template-columns: 180px 330px minmax(0, 1fr); gap: 16px 20px; align-items: end; padding: 16px 20px; }
.yard-shift { min-width: 0; }
.yard-person { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 3px; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: 12.5px; background: var(--paper); }
.yard-person.is-off { padding-left: 11px; border-style: dashed; background: none; }
.yard-init { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--on-night); display: grid; place-items: center; font: 600 10px var(--mono); }
.yard-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.yard-sum .kpi .value { font-size: 28px; }

/* Pick list */
.yard-scanbar { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; margin-bottom: 4px; }
.yard-scanbar .input.mono { text-transform: uppercase; }
.yard-group .card-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.yard-group .card-head h3 { flex: 0 1 auto; }
.yard-order { border-bottom: 1px solid var(--line); }
.yard-order:last-child { border-bottom: 0; }
.yard-order-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px 8px; flex-wrap: wrap; }
.yard-progress { width: 220px; display: flex; flex-direction: column; gap: 6px; }
.yard-units td { border-bottom: 1px solid var(--line); }
.yard-units tr:last-child td { border-bottom: 0; }
.yard-units { table-layout: fixed; min-width: 900px; }
.yard-c-uin { width: 120px; white-space: nowrap; }
.yard-c-loc { width: 190px; }
.yard-c-act { width: 170px; }
.yard-steps { white-space: nowrap; width: 210px; }
.yard-step { display: inline-block; font: 500 10px var(--mono); letter-spacing: .05em; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--mute); margin-right: 3px; }
.yard-step.is-done { background: var(--ink); border-color: var(--ink); color: var(--on-night); }

/* Marshalling */
.yard-bays { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.yard-bay { padding: 16px; min-height: 180px; border-style: solid; }
.yard-bay.is-empty { border-style: dashed; border-color: var(--line-2); background: transparent; }
.yard-bay-unit { padding: 10px 0; border-top: 1px solid var(--line); }
.yard-bay-unit:first-of-type { border-top: 0; padding-top: 0; }

/* Returns */
.yard-returns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.yard-pf { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }

/* Handheld */
.yard-hh { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; }
.yard-hh-side .yard-list { margin: 10px 0 0; padding-left: 18px; }
.yard-device { width: 340px; max-width: 100%; background: var(--night); border-radius: 38px 38px 46px 46px; padding: 16px 16px 22px; box-shadow: inset 0 0 0 2px var(--night-3), 0 24px 40px -22px rgba(21, 20, 15, .7); position: relative; }
.yard-device::before { content: ''; position: absolute; right: -6px; top: 140px; width: 6px; height: 64px; background: var(--night-3); border-radius: 0 4px 4px 0; }
.yard-dev-top { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 10px; }
.yard-dev-brand { font: 500 10px var(--mono); letter-spacing: .2em; color: var(--on-night-mute); }
.yard-led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.yard-window { width: 44px; height: 10px; border-radius: 5px; background: var(--night-3); }
.yard-screen { background: var(--card); border-radius: 12px; overflow: hidden; border: 3px solid var(--night-3); position: relative; }
.yard-screen.is-scanning::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; top: 30%; background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: yard-sweep .38s ease-in-out; }
@keyframes yard-sweep { from { top: 10%; } to { top: 90%; } }
.yard-sbar { display: flex; justify-content: space-between; background: var(--ink); color: var(--on-night); font: 500 10.5px var(--mono); padding: 5px 10px; }
.yard-sbody { height: 470px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.yard-keys { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin-top: 16px; }
.yard-key { height: 50px; border-radius: 14px; border: 0; background: var(--night-3); color: var(--on-night); font: 600 12.5px var(--sans); letter-spacing: .04em; cursor: pointer; box-shadow: 0 3px 0 var(--night-2); }
.yard-key:active, .yard-key.is-firing { transform: translateY(2px); box-shadow: 0 1px 0 var(--night-2); }
.yard-key-scan { background: var(--on-night); color: var(--night); font: 700 14px var(--mono); letter-spacing: .14em; height: 58px; margin-top: -4px; }
.yard-key:focus-visible { outline: 2px solid var(--on-night); outline-offset: 2px; }
.yard-grip { height: 6px; width: 80px; margin: 16px auto 0; border-radius: 3px; background: var(--night-3); }

.hh-title { font: 500 21px/1.15 var(--serif); }
.hh-p { margin: 0; color: var(--ink-2); }
.hh-sub { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 4px; }
.hh-mute { color: var(--mute); font-size: 12px; }
.hh-mono { font-family: var(--mono); font-size: 13px; }
.hh-list { display: flex; flex-direction: column; gap: 6px; }
.hh-scroll { max-height: 210px; overflow-y: auto; }
.hh-btn { border: 1px solid var(--line-2); background: var(--paper); border-radius: 10px; padding: 9px 12px; cursor: pointer; font: 500 13.5px var(--sans); color: var(--ink); text-align: left; }
.hh-btn:hover:not([disabled]) { background: var(--paper-2); }
.hh-btn[disabled] { opacity: .5; cursor: not-allowed; }
.hh-big { min-height: 48px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.hh-big b { font: 600 13px var(--mono); width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--ink); color: var(--on-night); }
.hh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hh-static { padding: 6px 2px; border-bottom: 1px solid var(--line); }
.hh-pill { margin-left: auto; font: 600 12px var(--mono); background: var(--paper-2); border-radius: var(--pill); padding: 1px 9px; }
.hh-primary { background: var(--ink); color: var(--on-night); border-color: var(--ink); justify-content: center; }
.hh-primary:hover:not([disabled]) { background: var(--night-3); }
.hh-warn { color: var(--bad); border-color: rgba(150, 47, 32, .45); }
.hh-mini { padding: 4px 9px; font-size: 12px; color: var(--bad); }
.hh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hh-two .hh-btn { text-align: center; justify-content: center; }
.hh-scan { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 6px; }
.hh-input { width: 100%; border: 2px solid var(--ink); border-radius: 10px; padding: 9px 10px; background: var(--paper); font: 500 14px var(--mono); text-transform: uppercase; min-width: 0; }
.hh-area { min-height: 76px; text-transform: none; font: 400 13.5px var(--sans); resize: none; }
.hh-ok { text-align: center; font-weight: 600; }
.hh-row-sp { display: flex; justify-content: space-between; align-items: center; }
.hh-step { font: 700 12px var(--mono); letter-spacing: .12em; background: var(--ink); color: var(--on-night); padding: 4px 9px; border-radius: 6px; }
.hh-uin { font: 600 28px/1.1 var(--mono); letter-spacing: -.01em; }
.hh-dl { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 3px 10px; margin: 2px 0; font-size: 13px; }
.hh-dl dt { color: var(--mute); font: 500 10.5px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.hh-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.hh-am { font: 700 10px var(--mono); background: var(--bad); color: var(--on-night); padding: 1px 5px; border-radius: 4px; }
.hh-flash { border-radius: 9px; padding: 8px 10px; font-size: 12.5px; border-left: 3px solid var(--ink); background: var(--paper-2); }
.hh-flash.bad { background: var(--bad-bg); border-left-color: var(--bad); color: var(--bad); }
.hh-flash.warn { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn); }
.hh-flash.ok { background: var(--ok-bg); border-left-color: var(--ok); color: var(--ok); }
.hh-ok-mark { width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: var(--on-night); display: grid; place-items: center; font-size: 24px; margin-top: 6px; }

@media (max-width: 1180px) {
  .yard-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yard-bays { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yard-returns { grid-template-columns: 1fr; }
  .yard-controls { grid-template-columns: 180px minmax(0, 1fr); }
  .yard-shift { grid-column: 1 / -1; }
}
@media (max-width: 920px) {
  .yard-hh { grid-template-columns: 1fr; justify-items: center; }
  .yard-hh-side { width: 100%; }
}
@media (max-width: 560px) {
  .yard-controls { grid-template-columns: 1fr; }
  .yard-sum, .yard-bays { grid-template-columns: 1fr 1fr; }
  .yard-progress { width: 100%; }
}
