* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%;
  font-family: -apple-system, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  font-size: 17px;
}
#app { max-width: 720px; margin: 0 auto; padding: 12px; padding-bottom: 16px; }

h1, h2, h3 { margin: 0 0 8px; }
.doc-title { font-size: 19px; font-weight: 700; }
.muted { color: #6b6b6b; font-size: 14px; }

.card {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

input[type=text], input[type=number], input[type=password], textarea {
  width: 100%; padding: 12px; font-size: 17px; border: 1px solid #ccc;
  border-radius: 8px; margin-bottom: 8px; background: #fff;
}

button {
  max-width: 100%; overflow-wrap: anywhere;
  font-size: 17px; padding: 14px 16px; border: none; border-radius: 8px;
  background: #1565c0; color: #fff; cursor: pointer; width: 100%;
  margin-bottom: 8px;
}
button.secondary { background: #616161; }
button.danger { background: #c62828; }
button.small { width: auto; padding: 8px 14px; font-size: 15px; }
button:disabled { background: #bdbdbd; }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.row > button.fixed { flex: none; }

.line-item {
  background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08); cursor: pointer;
}
.line-item.status-closed { border-left: 5px solid #2e7d32; }
.line-item.status-closed.short { border-left: 5px solid #ef6c00; }
.line-item.status-in_progress { border-left: 5px solid #1565c0; }
.line-item.status-pending { border-left: 5px solid #bdbdbd; }
.line-product { font-weight: 600; margin-bottom: 4px; }
.line-meta { font-size: 14px; color: #555; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; margin-left: 6px;
}
.badge.ok { background: #e8f5e9; color: #2e7d32; }
.badge.warn { background: #fff3e0; color: #ef6c00; }
.badge.info { background: #e3f2fd; color: #1565c0; }

.cell-block { margin: 10px 0; }
.cell-label { font-size: 13px; color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.03em; }
.cell-main-value { font-size: 34px; font-weight: 700; line-height: 1.15; color: #1a1a1a; }
.cell-extra-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 19px; font-weight: 600; }
.cell-extra-row button { width: auto; }

.comment-box {
  background: #fff9c4; padding: 10px; border-radius: 8px; margin: 8px 0;
  font-size: 15px;
}

.sync-dot { position: fixed; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; z-index: 20;
  background: #2e7d32; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.sync-dot::after { content: ''; position: absolute; inset: -12px; }
.sync-dot.warn { background: #ef6c00; }
.sync-dot.off { background: #c62828; }
.sync-tip { position: fixed; top: 24px; right: 6px; max-width: 80%; background: #263238; color: #fff; padding: 8px 12px;
  border-radius: 8px; font-size: 14px; z-index: 30; }

.top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding-right: 18px; }
.top-row > button { margin-bottom: 0; }
.top-row #undoBox { flex: none; }
button.undo-mini { width: 44px; padding: 6px 0; font-size: 22px; line-height: 1; margin: 0; background: #fff; color: #37474f; border: 1px solid #b0bec5; }
.it-card { padding: 10px 12px; margin-bottom: 8px; }
.it-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.it-codes { font-size: 20px; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.it-codes b { font-weight: 800; letter-spacing: .3px; }
.it-qty { font-size: 22px; margin: 4px 0; }
.it-qty button.small { padding: 2px 10px; margin: 0 0 0 4px; font-size: 15px; }
.it-cells { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.it-cells button.small { padding: 2px 10px; margin: 0 0 0 4px; }
.it-cell { display: block; font-size: 22px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.it-cell-box { min-width: 0; flex: 1; }
.it-extra { flex: none; text-align: right; }
.it-hint { font-size: 14px; margin: 4px 0; }
.it-card .comment-box, .it-card .presence-box { margin: 6px 0 0; padding: 6px 8px; font-size: 14px; }
.act-bar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 8px 0; background: #f4f5f7; z-index: 5; }
.act-bar > button { margin-bottom: 0; flex: 1; padding: 12px 8px; }
.act-bar > #skipBtn { flex-basis: 100%; }
.act-bar { flex-wrap: wrap; }
.act-bar > button#defectBtn { flex: 0 0 30%; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.topbar button { width: auto; white-space: nowrap; }
.topbar > div:last-child { flex: none; margin-left: 8px; }

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex;
  align-items: flex-end; justify-content: center; z-index: 30;
}
.sheet {
  background: #fff; width: 100%; max-width: 720px; border-radius: 16px 16px 0 0;
  padding: 18px; max-height: 85vh; overflow-y: auto;
}

.match-article { font-size: 16px; color: #1565c0; }

.error-text { color: #c62828; font-size: 14px; margin-top: 4px; }
.scan-focus-hint { font-size: 13px; color: #888; text-align: center; margin: 6px 0; }
.line-supplier { font-size: 15px; margin: 2px 0; }

/* выбор ячейки */
.cp-sheet { max-height: 92vh; overflow-y: auto; }
.cp-preview { font-size: 26px; font-weight: 700; text-align: center; padding: 8px; margin: 4px 0 10px; background: #f3f4f6; border-radius: 8px; letter-spacing: .03em; }
.cp-group { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eee; }
.cp-chip { width: auto; min-width: 54px; height: 50px; padding: 0 12px; margin: 0; font-size: 20px; font-weight: 600; background: #e5e7eb; color: #1a1a1a; border-radius: 8px; }
.cp-chip.sel { background: #1565c0; color: #fff; }
.cp-manual { margin: 10px 0 4px; }
.cp-manual summary { cursor: pointer; color: #555; padding: 6px 0; }
.cp-actions { margin-top: 10px; }

.presence-box {
  background: #e3f2fd; padding: 10px; border-radius: 8px; margin: 8px 0; font-size: 15px;
}
.extra-item { border-left: 5px solid #8e24aa; }

/* ----- камера-сканер ----- */
.cam-wrap { position: relative; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.cam-wrap video { width: 100%; max-height: 55vh; display: block; object-fit: cover; }
.cam-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: rgba(255, 64, 64, .9); box-shadow: 0 0 8px rgba(255, 64, 64, .9); }

/* ----- причины брака ----- */
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.reason-chip { width: auto; margin: 0; padding: 10px 14px; font-size: 15px; background: #eceff1; color: #1a1a1a; }
.reason-chip.sel { background: #1565c0; color: #fff; }

/* ----- крупный режим: больше, ярче, контрастнее ----- */
body.big #app, body.big .overlay .sheet { zoom: 1.28; }
body.big { background: #fff; color: #000; }
body.big .muted, body.big .line-meta, body.big .cell-label, body.big .scan-focus-hint { color: #222; }
body.big .card, body.big .line-item { box-shadow: 0 0 0 2px #000; }
body.big input[type=text], body.big input[type=number], body.big input[type=password], body.big textarea { border: 2px solid #000; }
body.big button { padding: 18px 16px; font-weight: 700; }
body.big button.small { padding: 12px 16px; }
body.big .line-product { font-size: 19px; }

.cam-frame { position: absolute; left: 10%; right: 10%; top: 25%; bottom: 25%; border: 2px dashed rgba(255,255,255,.85); border-radius: 10px; pointer-events: none; }

img, svg, canvas, video { max-width: 100%; }
.topbar > div:first-child { min-width: 0; }
/* очень узкие экраны (старые ТСД): крупный режим мягче, чтобы ряд «поле + ⌨ + 📷» помещался */
@media (max-width: 300px) {
  body.big #app, body.big .overlay .sheet { zoom: 1.05; }
  .row > button.fixed { width: 48px !important; padding-left: 4px; padding-right: 4px; }
  #addQtyBtn.fixed { width: 110px !important; }
}

button.success { background: #2e7d32; }
button.undo-btn { background: #fff; color: #37474f; border: 1px solid #b0bec5; padding: 10px 14px; font-size: 15px; text-align: left; }
.undo-sub { display: block; font-size: 12px; color: #78909c; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-head { font-weight: 700; font-size: 16px; margin: 4px 0; }
.undo-list { margin: 4px 0 12px; padding-left: 20px; font-size: 15px; line-height: 1.5; }

/* ---- меню и отбор ---- */
button.menu-btn { display: flex; align-items: center; gap: 14px; text-align: left; padding: 26px 18px; margin-bottom: 12px; font-size: 22px; font-weight: 700; background: #1565c0; }
button.menu-btn.pick { background: #00695c; }
.menu-ico { font-size: 32px; flex: none; }
.menu-name { flex: 1; min-width: 0; }
.menu-cnt { flex: none; min-width: 34px; text-align: center; background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 10px; font-size: 20px; }
.menu-cnt:empty { display: none; }
.order-info { border-left: 5px solid #00695c; overflow-wrap: anywhere; }
.oi-row { margin: 2px 0; font-size: 16px; }
.oi-k { display: inline-block; min-width: 82px; color: #6b6b6b; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.oi-promo { font-size: 22px; font-weight: 800; color: #b71c1c; margin-bottom: 4px; }
.oi-cmt { margin-bottom: 0; }
.ship-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e3f2fd; color: #1565c0; }
.ship-badge.today { background: #fff3e0; color: #e65100; }
.ship-badge.late { background: #ffebee; color: #c62828; }
.ship-badge.soon { background: #e8f5e9; color: #2e7d32; }
.badge.promo { background: #ffebee; color: #c62828; }
.pick-card.today { border: 2px solid #ef6c00; }
.pick-card.late { border: 2px solid #c62828; }
.line-ship { font-size: 16px; margin: 2px 0; }
.packs-note { font-size: 12px; color: #78909c; margin-top: 2px; }
.ack-screen { align-items: stretch; background: rgba(0,0,0,.7); }
.ack-sheet { border-radius: 0; max-height: none; max-width: none; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 12px; overflow-wrap: anywhere; }
.ack-sheet.promo { background: #fff3f3; }
.ack-sheet.cmt { background: #fffde7; }
.ack-order { color: #6b6b6b; font-size: 15px; }
.ack-title { font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ack-text { font-size: 34px; font-weight: 800; line-height: 1.2; margin: 6px 0 18px; white-space: pre-wrap; }
.paper-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.paper-row .pp-qty { flex: 0 0 72px; width: 72px; margin: 0; }
.paper-row .pp-sel { flex: 1; min-width: 0; padding: 12px 8px; font-size: 17px; border: 1px solid #ccc; border-radius: 8px; background: #fff; }
.paper-row .pp-del { flex: none; margin: 0; }
.paper-row .pp-own { flex: 1 0 100%; margin: 0; }

/* строка отбора в списке: сверху полоса с адресом ячейки (цвет = готовность), ниже товар на всю ширину */
.line-item.pick-line { display: block; padding: 0; overflow: hidden; }
.pl-cell { padding: 6px 12px; background: #eceff1; font-weight: 800; font-size: 20px; letter-spacing: .02em; overflow-wrap: anywhere; }
.pl-nocell { color: #90a4ae; font-weight: 500; font-size: 15px; letter-spacing: 0; }
.pl-main { padding: 8px 12px 10px; overflow-wrap: anywhere; }
.pl-qty { font-size: 30px; font-weight: 800; line-height: 1.15; margin: 2px 0; }
.pl-unit { font-size: 16px; font-weight: 600; color: #455a64; }
.pl-done { font-size: 14px; font-weight: 600; color: #2e7d32; margin-left: 6px; }
.pl-codes { font-size: 15px; color: #607d8b; margin-top: 2px; overflow-wrap: anywhere; }
.pl-comment { margin-top: 6px; padding: 6px 8px; background: #fff59d; border-radius: 6px; font-weight: 700; font-size: 15px; }
.line-item.pick-line.status-in_progress .pl-cell { background: #e3f2fd; }
.line-item.pick-line.status-closed .pl-cell { background: #c8e6c9; }
.line-item.pick-line.status-closed.short .pl-cell { background: #ffe0b2; }
body.big .pl-cell { border-bottom: 2px solid #000; }

/* карточка позиции при сборке */
.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pk-top button { margin: 0; }
.pk-prog { font-size: 13px; color: #455a64; font-weight: 600; flex: 1; text-align: right; padding-right: 16px; }
.pk-bar { height: 5px; background: #cfd8dc; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.pk-paper { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pk-paper > button { margin: 0; flex: none; }
#linePaperChips { display: contents; }
.paper-chip { display: inline-block; background: #e3f2fd; border: 1px solid #90caf9; border-radius: 14px; padding: 4px 6px 4px 10px; margin: 0; font-size: 16px; }
.paper-chip { white-space: nowrap; }
.paper-chip .chip-x { display: inline; width: auto; vertical-align: baseline; margin: 0 0 0 4px; padding: 0 6px; min-height: 0; background: none; border: none; color: #c62828; font-size: 16px; }
.pk-bar i { display: block; height: 100%; background: #2e7d32; }
.pk-bar.big { position: relative; height: 22px; border-radius: 11px; }
.pk-bar.big .pk-bar-t { position: absolute; left: 0; right: 0; top: 0; line-height: 22px; text-align: center; font-size: 13px; font-weight: 700; color: #102027; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.pk-cellband { background: #263238; color: #fff; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; text-align: center; }
.pk-cellband.done { background: #2e7d32; }
.pk-cellband.short { background: #ef6c00; }
.pk-celllabel { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; min-height: 1em; }
.pk-cell { font-size: 38px; font-weight: 900; letter-spacing: .03em; line-height: 1.15; overflow-wrap: anywhere; }
.pk-nocell { font-size: 20px; font-weight: 500; opacity: .75; letter-spacing: 0; }
.pk-extra { font-size: 15px; opacity: .85; margin-top: 2px; }
.pk-comment { background: #fff176; border: 3px solid #f9a825; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 21px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.pk-comment-t { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8d6e00; margin-bottom: 2px; font-weight: 700; }
.pk-card { overflow-wrap: anywhere; }
.pk-name { font-size: 21px; font-weight: 700; line-height: 1.25; }
.pk-qtyrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin: 6px 0 2px; flex-wrap: wrap; }
.pk-qty { font-size: 72px; font-weight: 900; line-height: 1; }
.pk-unit { font-size: 26px; font-weight: 700; color: #455a64; }
.pk-got { font-size: 15px; color: #455a64; }
.pk-got button { margin: 0 0 0 4px; }
.pk-scanrow { margin-top: 10px; }
.pk-scanrow input { margin-bottom: 0; }
.pk-flash { min-height: 20px; font-size: 15px; font-weight: 700; margin-top: 4px; }
.pk-flash.ok { color: #2e7d32; }
.pk-flash.bad { color: #c62828; }
body.big .pk-cell { font-size: 32px; }
body.big .pk-qty { font-size: 50px; }

/* Отбор: превышение количества */
.over-alarm { background: rgba(120,0,0,.88); }
.over-sheet { background: #fff; border: 6px solid #c62828; text-align: center; }
.over-sheet h3 { color: #c62828; font-size: 30px; font-weight: 900; margin: 4px 0; }
.over-ico { font-size: 56px; line-height: 1; }
.over-big { font-size: 22px; margin: 10px 0; }
.over-big b { font-size: 34px; }
input.qty-over { border: 3px solid #c62828 !important; background: #ffebee !important; color: #b71c1c; font-weight: 900; }

/* --- Поиск и быстрые фильтры в списке заданий --- */
.chooser-tools { margin: 0 0 10px; }
.chooser-tools input[type=search] { width: 100%; margin: 0 0 8px; font-size: 17px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.fchip { flex: none; width: auto; display: inline-block; margin: 0; padding: 8px 12px; min-height: 0; border-radius: 18px; background: #eceff1; color: #263238; border: 1px solid #b0bec5; font-size: 15px; font-weight: 700; }
.fchip .fc { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: #fff; color: #455a64; font-size: 13px; }
.fchip.on { background: #1565c0; color: #fff; border-color: #0d47a1; }
.fchip.on .fc { background: #0d47a1; color: #fff; }

/* --- Приоритетные задания --- */
.line-item.urgent { border: 2px solid #ef6c00; border-left-width: 8px; background: #fffaf3; }
.urgent-tag { display: inline-block; background: #ef6c00; color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .5px; padding: 2px 10px; border-radius: 6px; margin-bottom: 6px; }
.presence-box.urgent-box { background: #fff3e0; border-color: #ffb74d; color: #e65100; }

/* --- Отбор: скан ячейки перед взятием товара --- */
.pk-cellband.need-scan { background: #f9a825; color: #212121; animation: needScan 1.2s ease-in-out infinite; }
.pk-cellband.need-scan .pk-celllabel { font-weight: 800; opacity: 1; }
@keyframes needScan { 0%, 100% { box-shadow: 0 0 0 0 rgba(249,168,37,.7); } 50% { box-shadow: 0 0 0 8px rgba(249,168,37,0); } }
.pk-cellok { margin-top: 4px; font-size: 14px; font-weight: 700; color: #b9f6ca; }
.pk-manual { width: 100%; margin: 0 0 8px; }
.pk-locked { position: relative; }
.pk-locked > *:not(.pk-lockmsg) { opacity: .4; }
.pk-lockmsg { background: #fff8e1; border: 2px dashed #f9a825; color: #6d4c00; font-weight: 800; text-align: center; padding: 10px; border-radius: 8px; margin-bottom: 10px; }
.over-big b.over-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; overflow-wrap: anywhere; display: inline-block; }
.alarm-sink { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.over-sheet button:disabled { opacity: .55; }

/* --- Сообщения от менеджеров --- */
button.menu-btn.msg { background: #6a1b9a; }
button.menu-btn.places { background: #ef6c00; }
.msg-item { cursor: pointer; }
.msg-item.msg-new { border-left: 6px solid #6a1b9a; background: #f3e5f5; }
.msg-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.msg-subj { font-size: 17px; font-weight: 700; margin: 3px 0; }
.msg-prev { color: #555; font-size: 14px; margin-bottom: 6px; }
.msg-sep { margin: 18px 0 8px; color: #777; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.msg-h { margin: 10px 0 6px; font-size: 20px; }
.msg-body { white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 1.45; margin: 12px 0; }
.msg-file { width: 100%; text-align: left; margin-top: 6px; }
.msg-reply { padding: 8px 0; border-bottom: 1px solid #eee; }
.msg-reply:last-child { border-bottom: 0; }
.msg-actions button { width: 100%; margin-bottom: 8px; font-size: 18px; padding: 16px; }
.badge.bad { background: #ffebee; color: #c62828; }
.msg-banner { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 900; background: #4a148c; color: #fff; border-radius: 12px; padding: 10px 10px 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); display: flex; gap: 8px; align-items: center; animation: mbIn .25s ease-out; transition: transform .2s, opacity .2s; }
.msg-banner.mb-hide { transform: translateY(-120%); opacity: 0; }
.msg-banner .mb-body { flex: 1; min-width: 0; cursor: pointer; }
.msg-banner .mb-t { font-weight: 800; font-size: 16px; }
.msg-banner .mb-s { font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-banner .mb-btns { display: flex; gap: 6px; flex: none; }
.msg-banner button { margin: 0; width: auto; padding: 10px 12px; font-size: 15px; font-weight: 700; border-radius: 8px; min-height: 44px; }
.msg-banner .mb-open { background: #fff; color: #4a148c; }
.msg-banner .mb-close { background: rgba(255,255,255,.18); color: #fff; min-width: 44px; font-size: 18px; }
@keyframes mbIn { from { transform: translateY(-20px); opacity: 0; } }

/* --- Окно «Сканировать штрихкод ячейки» --- */
.cs-state { border-radius: 8px; padding: 10px 12px; font-weight: 700; margin: 6px 0 8px; font-size: 16px; }
.cs-state.ready { background: #e8f5e9; color: #1b5e20; }
.cs-state.idle { background: #fff8e1; color: #6d4c00; border: 2px dashed #f9a825; }
.cs-err { display: none; background: #ffebee; color: #b71c1c; border: 2px solid #c62828; border-radius: 8px; padding: 10px 12px; font-weight: 700; font-size: 16px; margin: 8px 0; }
.cs-err.show { display: block; }

/* --- Отбор: артикул и штрихкод под названием — по ним кладовщик узнаёт товар --- */
.pk-codes { margin: 6px 0 2px; }
.pk-code { font-size: 25px; line-height: 1.35; overflow-wrap: anywhere; }
.pk-code b { font-weight: 800; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.pk-ck { font-size: 17px; color: #607d8b; font-weight: 600; }
body.big .pk-code { font-size: 24px; }
.app-ver { text-align: center; color: #9e9e9e; font-size: 12px; margin: 14px 0 4px; }

.plr-cols { display: flex; gap: 8px; align-items: flex-start; }
.plr-col { flex: 1; min-width: 0; text-align: center; }
.plr-big { font-size: 56px; font-weight: 800; line-height: 1.1; }
.plr-paper { font-size: 56px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.plr-paper span { font-size: 22px; font-weight: 700; color: #455a64; }
.plr-none { font-size: 24px; margin-top: 10px; }
.plr-right { border-left: 1px solid #cfd8dc; padding-left: 8px; }

.badge.postponed { background: #ede7f6; color: #4527a0; }

.prev-places { background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; border-radius: 8px; padding: 8px 10px; margin: 0 0 10px; font-size: 15px; }

/* режим устройства: ТСД — камеру прячем (сканер аппаратный); смартфон — камера главная кнопка */
body.dev-tsd #camBtn, body.dev-tsd #pickCam, body.dev-tsd #csCam { display: none !important; }
body.dev-phone #camBtn, body.dev-phone #pickCam, body.dev-phone #csCam { background: #1565c0; color: #fff; flex: 1.4; font-size: 22px; }
button.menu-btn.continue { background: #2e7d32; }
button.menu-btn.continue small { display: block; font-size: 14px; font-weight: 500; opacity: .9; }
.cue-flash { position: fixed; inset: 0; z-index: 99999; pointer-events: none; animation: cueFade .45s ease-out forwards; }
@keyframes cueFade { from { opacity: 1; } to { opacity: 0; } }

.msg-banner.tb { background: #00695c; }
/* окно «Грузовые места»: номер заказа крупно */
.pl-order { font-size: 28px; font-weight: 800; line-height: 1.2; color: #111; margin: 4px 0 12px; overflow-wrap: anywhere; }

/* подсказка «ожидается по приёмке» */
.inc-btn { margin: 0 0 0 6px; padding: 2px 8px; font-size: 18px; line-height: 1.2; border-radius: 999px; border: 1px solid #93c5fd; background: #eff6ff; color: #1e40af; vertical-align: middle; cursor: pointer; width: auto; min-height: 0; }
.inc-row { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: 16px; }

/* карточка отбора: название, ШК, количество и зелёная кнопка — на одном экране 360×560; прогресс, бумага, отмена — ниже */
.pk-top { margin-bottom: 4px; }
.pk-cellband { padding: 6px 12px; margin-bottom: 6px; }
.pk-celllabel { font-size: 11px; min-height: 0; }
.pk-cell { font-size: 34px; line-height: 1.1; }
.pk-card { padding: 10px 14px; margin-bottom: 8px; }
.pk-card .pk-name { font-size: 20px; line-height: 1.2; }
.pk-card .pk-codes { margin: 4px 0 0; }
.pk-card .pk-code { font-size: 24px; line-height: 1.25; }
.pk-card .pk-qty { font-size: 68px; }
.pk-scanrow { margin-top: 6px; }
.pk-scanrow input, .pk-scanrow #pickCam { height: 46px; padding-top: 0; padding-bottom: 0; }
.pk-flash:empty { display: none; }
.pk-locked, .pk-card + .card { padding-top: 10px; padding-bottom: 10px; }
.pk-more { margin: 4px 0 8px; }
.pk-more .pk-bar { margin-bottom: 6px; }
.act-bar > #skipBtn { flex: 1 1 0; font-size: 15px; padding: 8px 6px; }
.act-bar > #closeLineBtn { flex: 1 1 0; font-size: 15px; padding: 8px 6px; }

/* поле скана товара скрыто настройкой: остаётся в фокусе и принимает сканер, но не занимает место; камера (телефон) остаётся */
.pk-scanrow.pk-scan-off { margin-top: 0; }
.pk-scanrow.pk-scan-off #pickScan { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; font-size: 16px; pointer-events: none; }
body.dev-phone .pk-scanrow.pk-scan-off { margin-top: 6px; }

/* Новое устройство ждёт подтверждения (v50) */
.dev-wait { text-align: center; }
.dev-wait .dev-code { font-size: 44px; font-weight: 800; letter-spacing: 8px; margin: 6px 0 14px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.dev-wait #devText { font-size: 16px; line-height: 1.4; }

/* Тестовая копия (v51) */
.test-banner { background: #f59e0b; color: #111; text-align: center; font-weight: 800; font-size: 14px; padding: 4px 8px; position: sticky; top: 0; z-index: 2000; }
/* фото брака (v52) */
.def-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.def-ph { position: relative; display: inline-block; }
.def-ph img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #ccc; display: block; }
.def-ph button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0; border-radius: 50%; font-size: 14px; line-height: 26px; background: #b91c1c; color: #fff; }
.def-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; font-size: 14px; }
.def-row button { margin: 0; width: auto; }
