/* ── ГУПР · Склад · Сборка (pages/gupr-pick.js) ──────────────────────────────
   Основной экран — планшет: шрифты, кнопки и поля крупнее обычного,
   цели нажатия не меньше 48px. */

.gp-muted { font-size: 13px; color: var(--text-muted); }

/* ── Галерея ─────────────────────────────────────────────────────────────── */
.gp-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.gp-top .page-title { font-size: 24px; }
.gp-select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 15px;
}

.gp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.gp-empty {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
}

.gp-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  min-height: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.gp-tile:hover { box-shadow: var(--shadow); }
.gp-tile:active { transform: scale(.99); }
.gp-tile--started { border-left-color: var(--orange); }
.gp-tile__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gp-tile__num { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gp-tile__ship { font-size: 13px; font-weight: 600; color: var(--blue); }
.gp-tile__client {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gp-tile__nums { font-size: 16px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.gp-tile__comment {
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--orange-light);
  color: #92400e;
  font-size: 13.5px;
}
.gp-tile__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 13px; color: var(--text-secondary); }
.gp-tile__foot .gp-progress { flex: 1; }
.gp-tile__meta { font-size: 12.5px; color: var(--text-muted); }

.gp-progress { height: 6px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.gp-progress span { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width var(--t-med); }
.gp-progress--lg { height: 8px; width: 140px; margin-top: 4px; }

/* Очередь и проверка партии перед отгрузкой. */
.gs-groups { display: flex; flex-direction: column; gap: 20px; }
.gs-group { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.gs-group--pickup { border-left: 4px solid #b7791f; }
.gs-group__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.gs-group__head h2 { margin: 0; font-size: 18px; }
.gs-group__details, .gs-group__total { margin-top: 4px; color: var(--text-secondary); font-size: 13px; }
.gs-pickup-label { display: inline-block; padding: 3px 8px; border-radius: 4px; background: #fff2d8; color: #855600; font-size: 13px; font-weight: 700; }
.gs-warehouse { max-width: min(600px, 100%); }
.gs-tile { border-left-color: var(--green); }
.gs-tile__phone, .gs-tile__vehicle { font-size: 14px; font-weight: 600; }
.gs-missing { color: var(--text-muted); font-weight: 400; }
.gs-body { flex: 1; overflow-y: auto; padding: 20px; }
.gs-layout { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1400px; margin: 0 auto; }
.gs-panel { padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.gs-panel h2 { margin: 0 0 16px; font-size: 18px; }
.gs-panel h2 span { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.gs-details { display: grid; gap: 13px; }
.gs-detail { display: flex; flex-direction: column; gap: 3px; font-size: 15px; overflow-wrap: anywhere; }
.gs-detail > span { font-size: 12px; color: var(--text-muted); }
.gs-comment { margin-top: 18px; border: 0; border-radius: var(--radius); }
.gs-order-comment { margin-top: 12px; color: var(--text-secondary); font-size: 14px; }
.gs-lines { display: flex; flex-direction: column; }
.gs-line { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.gs-line__code { font-size: 15px; color: var(--text-muted); }
.gs-line:last-child { border-bottom: 0; }
.gs-line__no { color: var(--text-muted); }
.gs-line__qty { text-align: right; font-weight: 700; white-space: nowrap; }
.gs-line__qty small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.gs-actions { display: flex; justify-content: flex-end; max-width: 1400px; margin: 18px auto 0; }
@media (max-width: 760px) { .gs-layout { grid-template-columns: 1fr; } .gs-body { padding: 12px; } .gs-line { grid-template-columns: 22px minmax(0, 1fr); } .gs-line__qty { grid-column: 2; text-align: left; } }

/* ── Заявка во весь экран ────────────────────────────────────────────────── */
.gp-full {
  position: fixed;
  inset: 0;
  z-index: 400;   /* поверх меню; окна (modal) — 500 */
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  overflow: hidden;
}

.gp-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gp-back {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.gp-back:active { background: var(--bg-hover); }
.gp-bar__main { flex: 1; min-width: 0; }
.gp-bar__title { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-bar__num { margin-right: 12px; font-size: 15px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gp-bar__sub { margin-top: 2px; font-size: 14px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-bar__progress { text-align: right; font-size: 15px; color: var(--text-secondary); white-space: nowrap; }
.gp-bar__progress b { font-size: 20px; color: var(--text-primary); }

.gp-comment, .gp-locked {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.gp-comment { background: var(--orange-light); color: #92400e; }
.gp-locked { background: var(--bg-hover); color: var(--text-secondary); }

.gp-work {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
}

/* Список позиций */
.gp-list {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--border);
}
.gp-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  text-align: left;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.gp-list__item--ok { background: var(--green-subtle); }
.gp-list__item--cur { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.gp-list__item--sum { align-items: center; }
.gp-list__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-list__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.gp-list__maker { font-size: 12.5px; color: var(--text-muted); line-height: 1.3; }
.gp-list__qty { margin-top: 2px; font-size: 14px; color: var(--text-secondary); }

.gp-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}
.gp-step--ok { background: var(--green); border-color: var(--green); color: #fff; }

/* Одна позиция в работе */
.gp-focus {
  overflow-y: auto;
  padding: 24px 32px 32px;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gp-pos { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.gp-ok { color: var(--green); }
.gp-name { margin: 4px 0 0; font-size: 26px; font-weight: 800; line-height: 1.2; }
.gp-maker { font-size: 17px; font-weight: 600; color: var(--blue); }
.gp-code { font-size: 26px; line-height: 1.2; color: var(--text-muted); }
.gp-ordered {
  margin: 14px 0 6px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 18px;
}
.gp-ordered b { font-size: 22px; }

.gp-label { margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--text-secondary); }
.gp-qty { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.gp-qty__input {
  flex: 1;
  min-width: 180px;
  height: 64px;
  padding: 0 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.gp-qty__input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-light); }
.gp-qty__input::placeholder { color: var(--border); font-weight: 600; }
.gp-diff { min-height: 22px; font-size: 15px; color: var(--text-secondary); }
.gp-diff--warn { color: var(--orange); font-weight: 600; }

.gp-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.gp-place {
  height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
}
.gp-place--on { border-color: var(--green); background: var(--green); color: #fff; }
.gp-place:disabled { opacity: .6; }

.gp-btn {
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
}
.gp-btn--ghost { border: 2px solid var(--border); background: var(--bg-card); color: var(--text-secondary); }
.gp-btn--main {
  margin-top: 22px;
  min-height: 64px;
  background: var(--green);
  color: #fff;
  font-size: 20px;
}
.gp-btn--main:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.gp-btn:active:not(:disabled) { transform: scale(.99); }
.gp-who { margin-top: 8px; }

.gp-sum { width: 100%; margin: 12px 0 6px; border-collapse: collapse; font-size: 15px; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
.gp-sum th { padding: 10px 12px; text-align: left; font-size: 12px; color: var(--text-muted); text-transform: uppercase; background: var(--bg-stripe); }
.gp-sum td { padding: 12px; border-top: 1px solid var(--border); vertical-align: top; }
.gp-sum tbody tr { cursor: pointer; }
.gp-sum tbody tr:active { background: var(--bg-hover); }
.gp-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Узкий экран и планшет в портрете: позиции — лентой сверху */
@media (max-width: 900px) {
  .gp-work { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .gp-list { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .gp-list__item { width: 240px; flex-shrink: 0; }
  .gp-focus { padding: 18px 16px 24px; }
  .gp-bar { flex-wrap: wrap; gap: 10px; }
  .gp-bar__progress { text-align: left; }
}

/* Итог сборки: число мест и места — на всю заявку */
.gp-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding: 16px 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.gp-block .gp-label { margin-top: 6px; }
.gp-label .gp-muted { font-weight: 400; }
.gp-stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gp-stepper__btn {
  width: 56px; height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-secondary);
}
.gp-stepper__btn:disabled { opacity: .4; }
.gp-stepper__val {
  width: 96px; height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  outline: none;
}
.gp-stepper__val:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-light); }
