/* =========================================================================
 * Pickups module — consolidated
 * ========================================================================= */

/* ---------------------------------------------------------------------
 * Pickup list row glyph
 * ------------------------------------------------------------------- */

 .pickup-glyph {
  background: color-mix(in srgb, var(--c-pickups) 12%, transparent);
  color: var(--c-pickups);
}

.pickup-glyph[data-source="wb"] {
  background: color-mix(in srgb, var(--c-wb) 12%, transparent);
  color: var(--c-wb);
}

.pickup-glyph[data-source="ozon"] {
  background: color-mix(in srgb, var(--c-ozon) 12%, transparent);
  color: var(--c-ozon);
}

/* ---------------------------------------------------------------------
* Marketplace pill
* ------------------------------------------------------------------- */

.mkt-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid currentColor;
  line-height: 1.4;
  white-space: nowrap;
}

.mkt-pill.mkt-wb {
  color: var(--c-wb);
  background: color-mix(in srgb, var(--c-wb) 12%, transparent);
}

.mkt-pill.mkt-ozon {
  color: var(--c-ozon);
  background: color-mix(in srgb, var(--c-ozon) 12%, transparent);
}

/* ---------------------------------------------------------------------
* Header title row — allow pill beside the h1
* ------------------------------------------------------------------- */

.hh .hh-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hh .hh-title-wrap h1 {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
* Pickup detail — header meta line
* ------------------------------------------------------------------- */

.pickups-detail .pickup-meta {
  padding: 0 20px 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------------
* Pickup detail — footer
* ------------------------------------------------------------------- */

.pickup-footer {
  flex: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pickup-footer-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--warn);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
}

.pickup-footer .actions {
  display: flex;
  gap: 12px;
}

.pickup-footer-closed {
  background: rgba(0, 0, 0, .2);
}

.pickup-closed-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(61, 255, 162, .35);
  border-radius: 12px;
  background: var(--ok-dim);
  color: var(--ok);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.pickup-closed-banner svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pickup-closed-banner span {
  flex: 1;
  min-width: 0;
}

/* ---------------------------------------------------------------------
* Pickup list — closed badge
* ------------------------------------------------------------------- */

.pickup-closed-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .03);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.5;
}

.batch-article-row.is-closed .pr-meta b {
  color: var(--dim);
}

.batch-article-row.is-closed .pickup-glyph {
  opacity: .55;
  filter: grayscale(.4);
}

.batch-article-row.is-closed .pr-count b {
  color: var(--dim);
}

.task.is-closed .pickup-closed-badge {
  color: var(--dim);
  border-color: var(--line2);
}

/* =========================================================================
* Route list
* ========================================================================= */

.route-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-groups {
  padding: 0 16px 16px;
}

.route-thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: #eef3f7;
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
}

.route-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.route-thumb.empty {
  background: transparent;
  border-style: dashed;
  color: var(--faint);
  padding: 10px;
}

.route-thumb.empty svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================================
* Route accordion — every route row.
*
* Shelf, box, batch, and manual all share the same shape: a rounded
* wrapper with a .route-acc-head button on top and an optional
* .route-acc-body below. The left color strip is drawn on the wrapper
* and runs the full height, including the body when expanded.
* ========================================================================= */

.route-acc {
  position: relative;
  display: block;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}

.route-acc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--tk, var(--acc));
  opacity: .85;
  z-index: 1;
  pointer-events: none;
}

.route-acc.open {
  border-color: color-mix(in srgb, var(--tk) 45%, var(--line));
}

/* ---- Head ---- */

.route-acc-head {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}

.route-acc-head:active {
  background: rgba(255, 255, 255, .03);
}

.route-acc-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 44px 12px 18px;
  min-height: 58px;
}

.route-acc-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-acc-meta b {
  font-size: 19px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-acc-meta span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: .08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-acc-count {
  text-align: right;
  line-height: 1;
  min-width: 0;
}

.route-acc-count b {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--tk);
  white-space: nowrap;
  letter-spacing: -.02em;
}

.route-acc-count small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--dim);
  margin-top: 5px;
  text-transform: uppercase;
}

.route-acc-chev {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform .18s;
}

.route-acc-chev svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-acc.open .route-acc-chev {
  transform: translateY(-50%) rotate(180deg);
}

/* ---- Body ---- */

.route-acc-body {
  padding: 4px 12px 8px;
  background: rgba(255, 255, 255, .01);
  border-top: 1px solid var(--line);
}

.route-acc:not(.open) .route-acc-body {
  display: none;
}

/* ---- Row states ---- */

.route-acc.empty {
  opacity: .55;
}

.route-acc.empty::before {
  filter: grayscale(.7);
  opacity: .55;
}

.route-acc.empty .route-acc-count b {
  color: var(--dim);
}

.route-acc.done {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
}

.route-acc.done .route-acc-count b {
  color: var(--ok);
}

.route-acc.done .route-acc-chev {
  color: var(--ok);
  transform: translateY(-50%);
}

/* ---- Manual bucket tint ---- */

.route-acc.manual::before {
  background: var(--c-operations);
  opacity: .55;
}

.route-acc.manual.is-catalog::before {
  background: var(--err);
}

.route-acc.manual.is-stock::before {
  background: var(--faint);
}

/* =========================================================================
* Scan busy state — dim the route while a scan is in flight
* ========================================================================= */

.pickups-detail.is-busy .route-groups {
  opacity: .55;
  transition: opacity .15s;
  pointer-events: none;
}

/* =========================================================================
* Accordion card (shared by pickup detail)
* ========================================================================= */

.lastp-wrap {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
}

.lastp-wrap.collapsed {
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: transform .1s, border-color .15s, background .15s;
}

.lastp-wrap.collapsed:active {
  transform: scale(.995);
}

.lastp-wrap.collapsed:disabled {
  opacity: .6;
  pointer-events: none;
}

.lastp-wrap.collapsed .lastp {
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.lastp-wrap.expanded {
  flex: 1;
  min-height: 0;
  max-height: 30vh;
}

.lastp-chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--dim);
  pointer-events: none;
}

.lastp-chev svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lastp-chev.up svg {
  transform: rotate(180deg);
}

.lastp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.lastp-head:active {
  background: rgba(255, 255, 255, .03);
}

.lastp-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.lastp-head .lastp-chev {
  position: static;
  transform: none;
  flex: none;
}

.lastp-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 10px 8px;
}

/* ---- Order rows inside an accordion body ---- */

.lp-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.lp-row:last-child {
  border-bottom: 0;
}

.lp-thumb {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f7;
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
}

.lp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-thumb.empty {
  background: transparent;
  border-style: dashed;
  color: var(--faint);
  padding: 6px;
}

.lp-thumb.empty svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lp-meta b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-meta span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.lp-badge.is-picked {
  color: var(--ok);
  background: var(--ok-dim);
}

.lp-badge.is-not {
  color: var(--faint);
  background: transparent;
  border-color: var(--line2);
}

/* ---- Manual order rows ---- */

.manual-hint {
  padding: 10px 14px 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}

.manual-orders {
  padding: 4px 0 10px;
}

.manual-order-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.35;
}

.manual-order-row + .manual-order-row {
  border-top: 1px solid var(--line);
}

.manual-order-row .lp-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .03);
}

.manual-order-row .lp-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.manual-order-row .lp-meta b {
  font-size: 13px;
  font-weight: 600;
}

.manual-order-row .lp-meta span {
  font-size: 11.5px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-order-row code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .05);
}

.manual-order-row .lp-badge {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.manual-order-row .lp-badge.is-picked {
  color: var(--ok);
  background: rgba(61, 255, 162, .1);
}

.manual-order-row .lp-badge.is-not {
  color: var(--faint);
  background: rgba(255, 255, 255, .05);
}

/* =========================================================================
* Scan flash — the combined collect + print transition card
*
* Shown for both WB and OZON.
*
* Fresh scan   → auto-dismisses after 1.2s. Green glow on the card.
* Reprint scan → persists. Amber glow on the card. Two action buttons
*                pinned to the bottom of the card.
*
* The card border/shadow colors are driven by #card[data-tone], not
* by the .scan-flash element itself. The flash section just holds the
* content — the glow is on the parent card.
* ========================================================================= */

.scan-flash {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
}

/* Reprint card glow — amber, matches the verify card's previous look. */
.dev[data-tone="reprint"] #card {
  border-color: rgba(255, 176, 32, .62);
  box-shadow:
      0 24px 60px rgba(0, 0, 0, .55),
      0 0 46px rgba(255, 176, 32, .2),
      inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* The bar at the top of the card takes the card's tone color. */
.scan-flash .ov-bar {
  --ovc: var(--ok);
}

.dev[data-tone="reprint"] .scan-flash .ov-bar {
  --ovc: var(--warn);
}

/* ---- Body ---- */

.scan-flash-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- Two-tile grid ---- */

.scan-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scan-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line2);
  background: #eef3f7;
}

.scan-tile.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scan-tile.sticker {
  background: #fff;
  padding: 8px;
}

.scan-tile.sticker img {
  width: 150%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: rotate(90deg);
  transform-origin: center;
}

.scan-tile.empty {
  background: transparent;
  border-style: dashed;
  color: var(--faint);
}

.scan-tile.empty > svg {
  width: 52%;
  height: 52%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-tile-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #0d1119;
  background: rgba(255, 255, 255, .88);
  padding: 2px 6px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

/* ---- Sticker slot states (OZON label fetch) ---- */

.scan-sticker-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  width: 100%;
  height: 100%;
}

.scan-sticker-state-icon {
  width: 36px;
  height: 36px;
  color: var(--dim);
}

.scan-sticker-state-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-sticker-state-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.4;
}

.scan-sticker-state.is-loading {
  color: var(--acc);
}

.scan-sticker-state.is-loading .scan-sticker-state-label {
  color: var(--acc);
}

.scan-sticker-state.is-error {
  color: var(--err);
}

.scan-sticker-state.is-error .scan-sticker-state-label {
  color: var(--err);
}

.scan-sticker-state .btn.sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  letter-spacing: .12em;
  border-radius: 8px;
}

/* ---- Sticker number ---- */

.scan-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
}

.scan-number-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
}

.scan-number-value {
  font-family: var(--mono);
  font-size: clamp(22px, 7cqw, 34px);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(201, 255, 30, .22);
}

/* Reprint — amber text shadow on the number to match the card glow. */
.dev[data-tone="reprint"] .scan-number-value {
  text-shadow: 0 0 22px rgba(255, 176, 32, .28);
}

/* ---- Counter — plain, no ring ---- */

.scan-counter {
  font-family: var(--mono);
  font-size: clamp(20px, 6cqw, 28px);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin-top: auto;   /* push counter down so action buttons sit at the bottom */
}

/* ---- Action buttons — pinned to the bottom of the card ---- */

.scan-flash .scan-reprint-actions {
  flex: none;
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding-top: 8px;
}

.scan-flash .scan-reprint-actions .btn {
  flex: 1;
  min-height: 60px;
  font-size: 17px;
  letter-spacing: .14em;
  border-radius: 15px;
}

/* Fresh scans get no action buttons and the counter sits at the bottom. */
.scan-flash.is-fresh .scan-counter {
  margin-top: auto;
  padding-bottom: 4px;
}


/* =========================================================================
* Busy state on the ring (run session)
* ========================================================================= */

.ex-mid.is-busy .ringwrap {
  opacity: .45;
  transition: opacity .15s;
}

.ex-mid.is-busy .countbox {
  opacity: .5;
}

/* =========================================================================
* WB delivery flow — boxes view
* ========================================================================= */

.deliver-step {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 20px 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}

.deliver-step .ds-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acc-dim);
  border: 1px solid rgba(201, 255, 30, .4);
  color: var(--acc);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
}

.deliver-step .ds-lbl {
  color: var(--ink);
  font-weight: 700;
}

.deliver-step .ds-of {
  color: var(--faint);
}

.deliver-hero {
  padding: 12px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.deliver-hero-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}

.deliver-hero-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--dim);
  line-height: 1.5;
}

.counter {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.cnt-btn {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--line2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, border-color .15s, background .15s;
}

.cnt-btn:hover,
.cnt-btn:active {
  border-color: var(--acc);
  background: var(--acc-dim);
  color: var(--acc);
}

.cnt-btn:active {
  transform: scale(.94);
}

.cnt-btn[disabled] {
  opacity: .35;
  pointer-events: none;
}

.cnt-val {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--acc);
  letter-spacing: -.04em;
  min-width: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(201, 255, 30, .25);
}

.counter-range {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--faint);
  text-transform: uppercase;
  margin-top: 12px;
}

.deliver-hint {
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--faint);
  text-align: center;
  line-height: 1.5;
}

/* =========================================================================
* WB delivery flow — PVZ view
* ========================================================================= */

.deliver-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 4px 16px;
}

.deliver-cargo {
  display: flex;
  gap: 6px;
}

.deliver-cargo button {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  background: var(--panel2);
  color: var(--dim);
  border: 1px solid var(--line2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  transition: border-color .15s, color .15s, background .15s;
}

.deliver-cargo button[aria-pressed="true"] {
  color: var(--acc);
  border-color: rgba(201, 255, 30, .45);
  background: var(--acc-dim);
}

.pvz-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}

.pvz-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-align: left;
  transition: border-color .15s, background .15s;
}

.pvz-row:hover,
.pvz-row:active {
  border-color: var(--line2);
  background: rgba(255, 255, 255, .03);
}

.pvz-row.selected {
  border-color: rgba(201, 255, 30, .55);
  background: var(--acc-dim);
}

.pvz-radio {
  font-size: 18px;
  line-height: 1;
  color: var(--dim);
  text-align: center;
}

.pvz-row.selected .pvz-radio {
  color: var(--acc);
}

.pvz-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pvz-meta b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pvz-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deliver-error {
  margin: 12px 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 71, 87, .45);
  border-radius: 12px;
  background: var(--err-dim);
  color: var(--err);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deliver-error b {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.deliver-error span {
  color: var(--ink);
}

/* =========================================================================
* WB delivery flow — print view
* ========================================================================= */

.deliver-success {
  margin: 16px 20px 6px;
  padding: 16px 18px;
  border: 1px solid rgba(61, 255, 162, .45);
  border-radius: 14px;
  background: var(--ok-dim);
  color: var(--ok);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.4;
}

.deliver-success svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deliver-success b {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 2px;
}

.deliver-success span {
  color: var(--ink);
  font-weight: 400;
  text-transform: none;
  letter-spacing: .06em;
}

.print-list {
  margin: 12px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.print-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.pr-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pr-info b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  text-transform: uppercase;
}

.pr-info span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--dim);
}

.pr-count {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 40px;
}

.print-row .btn.sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 10px;
}

/* =========================================================================
* Spinner (used by buttons during async work)
* ========================================================================= */

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
* WB three-tile action bar
* ========================================================================= */

.pickup-footer-actions {
  padding: 10px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pickup-footer-actions .pickup-footer-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--warn);
  line-height: 1.4;
}

.pickup-footer-actions .pickup-footer-hint.ready {
  color: var(--ok);
}

.action-bar {
  display: flex;
  gap: 8px;
}

.action-tile {
  flex: 1;
  min-width: 0;
  min-height: 62px;
  padding: 8px 6px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--panel2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--dim);
  text-align: center;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  cursor: pointer;
}

.action-tile:hover {
  border-color: var(--line);
}

.action-tile:active {
  transform: scale(.97);
}

.action-tile .at-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.action-tile .at-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-tile .at-check {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ok);
  color: #0b0e07;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 0 8px rgba(61, 255, 162, .55);
}

.action-tile .at-check svg {
  width: 100%;
  height: 100%;
  stroke-width: 3.2;
}

.action-tile .at-lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.action-tile[data-state="done"] {
  color: var(--ok);
  border-color: rgba(61, 255, 162, .4);
  background: var(--ok-dim);
}

.action-tile[data-state="done"] .at-check {
  display: inline-flex;
}

.action-tile[data-state="ready"] {
  color: var(--acc);
  border-color: rgba(201, 255, 30, .55);
  background: var(--acc-dim);
  animation: actionPulse 1.2s ease-in-out infinite alternate;
}

@keyframes actionPulse {
  to {
      box-shadow: 0 0 18px rgba(201, 255, 30, .35);
  }
}

.action-tile[data-state="disabled"] {
  opacity: .35;
  pointer-events: none;
}

/* =========================================================================
* PVZ picker — search, default badge, save-default checkbox
* ========================================================================= */

.pvz-search-wrap {
  padding: 6px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pvz-search {
  margin-bottom: 0;
}

.pvz-count {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--faint);
  text-transform: uppercase;
  padding-left: 2px;
}

.pvz-default-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid rgba(201, 255, 30, .4);
  background: var(--acc-dim);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.5;
}

.pvz-save-default {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 4px 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--dim);
  cursor: pointer;
}

.pvz-save-default input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--acc);
  cursor: pointer;
}

.pvz-save-default span {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

/* =========================================================================
* Pickup boxes view
* ========================================================================= */

.box-summary {
  padding: 8px 20px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--dim);
  text-transform: uppercase;
}

.box-list {
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.box-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .15s, background .15s;
}

.box-glyph {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--c-boxes) 12%, transparent);
  color: var(--c-boxes);
  display: grid;
  place-items: center;
}

.box-glyph svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.box-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.box-meta b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  text-transform: uppercase;
}

.box-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.box-meta small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--faint);
  text-transform: uppercase;
  margin-top: 2px;
}

.box-meta small.is-printed {
  color: var(--ok);
}

.box-row .btn.sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: .1em;
  border-radius: 9px;
}

.box-actions {
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.box-actions .btn {
  min-height: 48px;
  font-size: 15px;
  letter-spacing: .12em;
  border-radius: 12px;
}

/* =========================================================================
* Pickup boxes — creation screen
* ========================================================================= */

.box-creation {
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.box-creation-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
}

.box-creation-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--dim);
  line-height: 1.5;
  max-width: 320px;
}

/* =========================================================================
* Settings — warehouse default PVZ read-only display
* ========================================================================= */

.wh-pvz-display {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wh-pvz-display b {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}

.wh-pvz-display span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--dim);
}

/* =========================================================================
 * OZON label tile — inline PDF iframe
 *
 * OZON labels are PDFs served from ir.ozone.ru. The URL is normalized
 * to HTTPS client-side. The PDF renders inline in the sticker tile so
 * the operator never downloads and reopens a file.
 * ========================================================================= */

/* The sticker tile must establish a positioning context for the
   absolutely-positioned iframe wrapper. */
   .scan-tile.sticker {
    position: relative;
}

.scan-sticker-pdf {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: inherit;
    overflow: hidden;
}

.scan-pdf-frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
    display: block;
}

.scan-pdf-actions {
    flex: none;
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--panel);
    border-top: 1px solid var(--line);
}

.scan-pdf-actions .btn {
    flex: 1;
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: .1em;
    border-radius: 7px;
}

/* If the tile has no URL yet (label pending), the sticker-state block
   sits in the middle — the absolutely-positioned PDF wrapper doesn't
   exist until the URL arrives. */
.scan-tile.sticker .scan-sticker-state {
    position: relative;
    z-index: 1;
}

/* Prefill chip — read-only display of an admin-set value with an edit affordance */

.prefill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}

.prefill-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prefill-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.prefill-meta b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prefill-edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--dim);
  cursor: pointer;
  transition: background .12s, color .12s;
}

.prefill-edit:hover {
  background: rgba(255,255,255,.08);
  color: var(--ink);
}

.prefill-edit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Prefill chip — read-only display of an admin-set value with an edit affordance */

.prefill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}

.prefill-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.prefill-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.prefill-meta b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prefill-edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--dim);
  cursor: pointer;
  transition: background .12s, color .12s;
}

.prefill-edit:hover,
.prefill-edit:active {
  background: rgba(255,255,255,.08);
  color: var(--ink);
}

.prefill-edit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prefill-search {
  padding: 10px 14px;
}

/* =============================================================================
   Period picker — week timeline segment
   Scoped to the picker's rail so generic .seg stays the segmented control
   (as defined in components.css).
   ============================================================================= */

.timeline-rail .seg:hover,
.timeline-rail .seg:active {
    border-color: var(--line2);
    background: rgba(255, 255, 255, .03);
}

.timeline-rail .seg.selected {
    border-color: rgba(201, 255, 30, .55);
    background: var(--acc-dim);
}

.timeline-rail .seg.adjacent {
    opacity: .8;
}

.timeline-rail .seg.disabled {
    opacity: .4;
    pointer-events: none;
}

.timeline-rail .seg-dates {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .02em;
}

.timeline-rail .seg-dur {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .12em;
    color: var(--dim);
    text-transform: uppercase;
    margin-top: 2px;
}

.timeline-rail .seg-metric {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--acc);
    letter-spacing: -.01em;
    margin-top: 4px;
}

.timeline-rail .seg.selected .seg-metric {
    color: var(--acc);
}

.timeline-rail .dur-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--line);
    margin-top: 6px;
    overflow: hidden;
}

.timeline-rail .dur-bar-fill {
    height: 100%;
    background: var(--acc);
    border-radius: 2px;
}

.timeline-rail .seg.selected .dur-bar-fill {
    background: var(--acc);
    box-shadow: 0 0 6px rgba(201, 255, 30, .55);
}