/*
  Рабочий экран «Индус» в фирменном стиле сайта indus65.ru (app/globals.css там же).
  Бренд — через цвет и логотип, без декоративных эффектов: это инструмент, которым
  пользуются весь день, он должен оставаться плотным и спокойным.
  Шрифты раздаём сами (static/fonts, лицензия OFL рядом): сеть клиента капризная,
  внешние CDN на пути экрана не нужны.
*/
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/golos-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/golos-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(fonts/unbounded-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(fonts/unbounded-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --saffron: #ffc61e;
  --saffron-soft: #ffdc74;
  --chili: #d8261c;
  --chili-deep: #a81a12;
  --ink: #1c1208;
  --ink-soft: #6a543c;
  --cream: #fff3d6;
  --cream-deep: #f6e3b8;

  --card: #fff;
  --line: #eadcc0;          /* разделители в белых карточках — тёплые, не серые */
  --line-strong: #d9c59c;
  --muted: var(--ink-soft);
  --idle: #b3a58f;          /* «нет движения / не возит» — нейтральная полоса */
  --ok: #2f7a3a;
  --edit: #fff8e0;          /* поля человека: жёлтые, как в принятом бланке */
  --edit-line: #eccb63;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --hdr: 56px;              /* высота шапки сайта: от неё считаются липкие элементы */
  --sec: 32px;              /* высота липкого заголовка секции заявки */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 14px/1.45 var(--body); -webkit-font-smoothing: antialiased;
}
::selection { background: var(--chili); color: var(--saffron); }
a { color: var(--ink); text-decoration-color: rgba(28, 18, 8, .35); text-underline-offset: 2px; }
a:hover { color: var(--chili-deep); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--hdr);
  background: var(--saffron); box-shadow: 0 1px 0 rgba(28, 18, 8, .16);
}
.topbar-in {
  height: 100%; max-width: 1600px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 18px; white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo {
  display: inline-flex; align-items: center; border-radius: 10px; background: var(--chili);
  color: var(--saffron); font: 900 16px/1 var(--display); letter-spacing: .04em;
  padding: 8px 11px 7px;
}
.brand-sub { font-size: 12.5px; line-height: 1.15; color: var(--ink); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: rgba(28, 18, 8, .72); text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 6px 10px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: rgba(28, 18, 8, .07); }
.nav a.active { color: var(--ink); background: rgba(255, 255, 255, .55); font-weight: 600; }
.topbar .spacer { margin-left: auto; }
.fresh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(28, 18, 8, .72); }
.fresh .btn { padding: 4px 10px; font-size: 13px; background: rgba(255, 255, 255, .6);
              border-color: rgba(28, 18, 8, .22); }
.fresh .btn:hover { background: #fff; }
#sync-note { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.who { font-size: 13px; color: rgba(28, 18, 8, .72); }
.who a { color: inherit; margin-left: 6px; }

main { padding: 16px 16px 24px; max-width: 1600px; margin: 0 auto; }
h1 { font: 700 20px/1.2 var(--display); letter-spacing: -.005em; margin: 0 0 4px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.num, td, .total-bar { font-variant-numeric: tabular-nums; }

/* ---------- карточки, кнопки, метки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  font: 500 14px/1.2 var(--body); white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--saffron); }
.btn.primary:hover { background: var(--chili-deep); border-color: var(--chili-deep); color: var(--cream); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--card);
  white-space: nowrap;
}
.pill.out { color: var(--chili-deep); border-color: #f1b2ad; background: #fdecea; }
.pill.low { color: #7a5200; border-color: var(--saffron-soft); background: #fff6d6; }
.pill.ok  { color: var(--ok); border-color: #bfdcc3; background: #eff7ef; }
.saved { color: var(--ok); }
.error-text { color: var(--chili); font-weight: 500; }
.banner {
  border-radius: 10px; padding: 9px 14px; margin: 10px 0; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--line-strong);
}
.banner.warn { background: #fff6d6; border-color: var(--saffron); }
.banner.danger { background: #fdecea; border-color: #f1b2ad; color: var(--chili-deep); }
.section-title {
  margin: 20px 0 8px; font-size: 15px; font-weight: 650; display: flex; align-items: baseline; gap: 6px;
}
.section-title .count { color: var(--muted); font-weight: 400; }

/* ---------- таблицы ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td {
  padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap;
  vertical-align: middle;
}
th {
  font-weight: 600; font-size: 12px; line-height: 1.2; color: var(--muted); background: var(--card);
  vertical-align: bottom;
}
tbody tr:last-child > td { border-bottom: 0; }
td.name, th.name { text-align: left; white-space: normal; }
tbody tr:hover > td { background: #fffaf0; }
input, select, textarea { font: inherit; color: inherit; }
.field {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; font-size: 15px;
}
.field:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }

/* группа 1С внутри секции заявки */
tr.group-row > td {
  background: var(--cream); font-weight: 600; text-align: left; white-space: normal;
  padding: 4px 10px; font-size: 12.5px;
}
tr.group-row .count { color: var(--muted); font-weight: 400; }

/* ---------- переключатели ---------- */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
       background: var(--cream-deep); }
.seg-label { font-size: 12.5px; color: var(--muted); margin-right: 6px; }
.seg a, .seg button {
  padding: 5px 12px; border-radius: 999px; font: 500 13px/1.2 var(--body); color: var(--ink-soft);
  text-decoration: none; border: 0; background: transparent; cursor: pointer; white-space: nowrap;
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg a.on, .seg button.on { background: var(--card); color: var(--ink); font-weight: 600;
                            box-shadow: 0 1px 2px rgba(28, 18, 8, .18); }

/* ---------- вход ---------- */
body.login-page { min-height: 100vh; display: flex; }
.login-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-panel {
  background: var(--saffron); padding: 48px 56px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 32px;
}
.login-panel .logo { font-size: 30px; padding: 14px 20px 12px; border-radius: 16px; align-self: flex-start; }
.login-panel h2 { font: 700 30px/1.15 var(--display); margin: 0; max-width: 26rem; }
.login-panel p { margin: 0; color: rgba(28, 18, 8, .72); font-size: 15px; max-width: 26rem; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 360px; padding: 28px; }
.login-card h1 { font-size: 18px; margin-bottom: 18px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; padding: 11px 14px; font-size: 15px; margin-top: 4px; }
.login-card .error-text { margin: 12px 0 0; font-size: 14px; }
@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-panel { padding: 22px 20px 26px; gap: 16px; }
  .login-panel .logo { font-size: 22px; padding: 10px 14px 9px; border-radius: 12px; }
  .login-panel h2 { font-size: 20px; }
  .login-panel p { font-size: 14px; }
  .login-side { align-items: flex-start; padding: 20px 16px 32px; }
  .login-card { padding: 22px 18px; }
}

/* ---------- список поставщиков ---------- */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
             flex-wrap: wrap; margin-bottom: 14px; }
.list-head p { margin: 0; }
.search { position: relative; width: 22rem; max-width: 100%; }
.search .field { padding-left: 34px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px;
              height: 16px; color: var(--muted); pointer-events: none; }
table.suppliers td { padding-top: 6px; padding-bottom: 6px; }
table.suppliers tbody tr { cursor: pointer; }
table.suppliers td.name a { text-decoration: none; font-weight: 550; }
table.suppliers td.name a:hover { text-decoration: underline; }
table.suppliers .hz { display: inline-flex; gap: 4px; }
table.suppliers .hz .btn { padding: 3px 9px; font-size: 12.5px; }
.state { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-start; }
.empty { padding: 18px 12px; text-align: left; color: var(--muted); }

/* ---------- мобильная шапка ---------- */
@media (max-width: 760px) {
  :root { --hdr: 0px; }
  .topbar { position: static; height: auto; }
  .topbar-in { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; white-space: normal; }
  .brand { order: 1; }
  .who { order: 2; margin-left: auto; }
  .topbar .spacer { display: none; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; margin: 0 -4px; }
  .nav a { flex: none; padding: 6px 9px; }
  .fresh { order: 4; width: 100%; flex-wrap: wrap; font-size: 12.5px; }
  main { padding: 12px 12px 24px; }
  h1 { font-size: 17px; }
  .search { width: 100%; }
  table.suppliers th:nth-child(2), table.suppliers td:nth-child(2),
  table.suppliers th:nth-child(4), table.suppliers td:nth-child(4),
  table.suppliers th.hz-h, table.suppliers td.hz-c { display: none; }
  table.suppliers th, table.suppliers td { padding-left: 6px; padding-right: 6px; }
  /* три оставшиеся колонки должны делить 100% контейнера сами, иначе нерушимые (nowrap)
     дата и метка «черновик от …» толкают всю таблицу — а с ней и страницу — за экран
     (найдено на 390px: документ 410px при вьюпорте 390px) */
  table.suppliers { table-layout: fixed; }
  table.suppliers th:nth-child(1), table.suppliers td:nth-child(1) { width: 42%; }
  table.suppliers th:nth-child(3), table.suppliers td:nth-child(3) { width: 22%; white-space: normal; }
  table.suppliers th:nth-child(5), table.suppliers td:nth-child(5) { width: 36%; }
  table.suppliers .state { justify-content: flex-end; }
  table.suppliers .pill { white-space: normal; }
}
table.suppliers .hz .btn.on { border-color: var(--ink); font-weight: 600; }

/* ---------- экран заявки ---------- */
/* Липкие элементы считаются от шапки сайта: заголовок секции под ней, шапка таблицы под
   заголовком секции. Страница прокручивается целиком — внутреннее окно прокрутки прятало
   правые колонки и половину строк. scroll-padding не даёт полю ввода, до которого дошли
   табом, спрятаться под липкими шапками сверху или под полосой итога снизу. */
html:has(body.order-page) { scroll-padding-top: calc(var(--hdr) + var(--sec) + 44px);
                            scroll-padding-bottom: 64px; }
body.order-page main { padding-top: 12px; padding-bottom: 76px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.order-head .meta { margin: 0; font-size: 13px; color: var(--muted); }
.order-head .actions { display: flex; gap: 8px; flex-shrink: 0; }
.order-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 8px 0 4px; }
.order-tools .grp { display: inline-flex; align-items: center; }
.legend { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 4px; height: 13px; border-radius: 2px; margin-right: 5px;
            vertical-align: -2px; }
.hint { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin: 0; }
.hint .help { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong);
              background: var(--card); font: 600 12px/1 var(--body); color: var(--ink); cursor: pointer; padding: 0; }
.hint .help[aria-expanded="true"] { background: var(--ink); color: var(--saffron); border-color: var(--ink); }
.hint-full { font-size: 13px; color: var(--ink); margin: 6px 0 0 30px; max-width: 70rem; }
.hint-full p { margin: 0 0 4px; }

.confirm { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0;
           padding: 12px 16px; border-radius: 12px; background: var(--card); border: 2px solid var(--ink); }
.confirm .q { font-weight: 550; margin-right: auto; }
.confirm .error-text { width: 100%; margin: 0; }

.osec > .section-title {
  position: sticky; top: var(--hdr); z-index: 12; height: var(--sec); margin: 0; padding: 7px 2px 0;
  background: var(--cream);
}
.osec + .osec { margin-top: 10px; }
.osec > .card { border-radius: 12px; }
table.order { table-layout: fixed; font-size: 13.5px; }
table.order thead th {
  position: sticky; top: calc(var(--hdr) + var(--sec)); z-index: 10;
  box-shadow: inset 0 -1px var(--line-strong); padding: 6px 6px 7px;
}
table.order thead th:first-child { border-top-left-radius: 12px; }
table.order thead th:last-child { border-top-right-radius: 12px; }
table.order td { padding: 2px 6px; height: 36px; }
table.order td.dim, table.order td.zero { color: var(--idle); }
table.order tr.group-row > td { height: 26px; padding: 3px 12px; }
table.order td.name { padding-left: 12px; line-height: 1.22; }
table.order th.name { padding-left: 12px; }
table.order .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.order .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden;
                   text-overflow: ellipsis; line-height: 1.22; }
table.order .sub .st { font-weight: 550; }
table.order tr.st-out .sub .st { color: var(--chili-deep); }
table.order tr.st-low .sub .st { color: #8a5d00; }
/* полоса статуса — 4 px у левого края строки */
table.order tr.line > td:first-child { box-shadow: inset 4px 0 0 transparent; }
table.order tr.st-out > td:first-child { box-shadow: inset 4px 0 0 var(--chili); }
table.order tr.st-low > td:first-child { box-shadow: inset 4px 0 0 var(--saffron); }
table.order tr.st-idle > td:first-child { box-shadow: inset 4px 0 0 var(--idle); }
table.order td.dim { color: var(--idle); }
table.order td.calc { color: var(--muted); }
table.order td.transit { color: #8a5d00; font-weight: 550; }
table.order td.put { padding-right: 4px; }
.putbox { display: inline-flex; align-items: center; gap: 4px; }
input.boxes { width: 54px; text-align: right; padding: 4px 6px; border-radius: 7px; height: 30px;
              border: 1px solid var(--edit-line); background: var(--edit); font-variant-numeric: tabular-nums; }
input.boxes.zero { color: var(--idle); }
/* стрелки у числового поля съедают ширину и мешают читать число — вводят с клавиатуры */
input.boxes::-webkit-outer-spin-button, input.boxes::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.boxes { -moz-appearance: textfield; appearance: textfield; }
input.boxes.edited { border-color: var(--ink); background: #fff1b8; font-weight: 600; }
input.note { width: 100%; padding: 4px 7px; border-radius: 7px; height: 30px;
             border: 1px solid var(--edit-line); background: var(--edit); }
input.note::placeholder { color: var(--idle); }
input.boxes:focus, input.note:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
input.boxes:disabled, input.note:disabled { background: #f7f2e6; border-color: var(--line); color: var(--ink-soft); }
input.boxes.bad { border-color: var(--chili); outline: 1px solid var(--chili); }
.who-mark { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--ink); color: var(--saffron);
            font: 700 10px/18px var(--body); text-align: center; cursor: help; }
.who-mark.none { visibility: hidden; }
.why-btn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent; background: transparent;
           color: var(--muted); cursor: pointer; padding: 0; display: inline-grid; place-items: center; }
.why-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--card); }
.why-btn svg { width: 14px; height: 14px; transition: transform .15s; }
.why-btn[aria-expanded="true"] { color: var(--ink); background: var(--cream); }
.why-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
tr.detail > td { text-align: left; white-space: normal; background: #fffaf0; height: auto;
                 padding: 8px 12px 10px 12px; font-size: 13px; color: var(--ink); box-shadow: none; }
tr.detail .why-text { max-width: 80rem; }
tr.detail .extra { color: var(--muted); margin-top: 3px; }
tbody tr.detail:hover > td { background: #fffaf0; }

.total-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--card);
  border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 18px -12px rgba(28, 18, 8, .35);
}
.total-bar .in { max-width: 1600px; margin: 0 auto; padding: 9px 16px; display: flex; align-items: center; gap: 16px; }
.total-bar .sum { font-size: 15px; }
.total-bar .sum b { font-weight: 650; }
.total-bar .sep { color: var(--line-strong); margin: 0 6px; }
.total-bar .btn { margin-left: auto; }
.foot-note { font-size: 12.5px; margin-top: 16px; }

@media (max-width: 1180px) {
  /* узкий экран: таблица шире окна — прокрутка внутри карточки, липкие шапки не держим */
  .osec > .card { overflow-x: auto; }
  table.order { min-width: 1160px; }
  table.order thead th { position: static; }
  .legend { margin-left: 0; }
}
@media (max-width: 760px) {
  .order-head { flex-direction: column; }
  .legend { display: none; }
  .order-tools { gap: 8px; }
  .total-bar .in { flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; }
  .total-bar .sum { font-size: 13.5px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- накладные по этажам ---------- */
.pick-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pick-head .back { margin: 0 0 6px; font-size: 13px; }
.pick-head .back a { color: var(--muted); }
.pick-head .meta { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.print-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-bar { position: sticky; top: var(--hdr); z-index: 15; background: var(--cream); margin: 12px 0 0; padding: 8px 0; }
.pick-bar-in { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pick-bar .doc-short { display: none; font-weight: 650; }
.pick-bar .counter { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pick-bar .counter.all { color: var(--ok); }
.pick-bar .btn.small { margin-left: auto; }
.btn.armed { border-color: var(--chili); color: var(--chili-deep); }
.psec .section-title { margin-top: 12px; }
table.pick { font-size: 14px; }
table.pick th.ln, table.pick td.ln { width: 3.5rem; color: var(--muted); }
table.pick td.ln .lnl { display: none; }
table.pick th.pk, table.pick td.pk { width: 8rem; color: var(--muted); }
table.pick th.q, table.pick td.q { width: 9rem; }
table.pick td.q b { font-weight: 650; }
table.pick th.amt, table.pick td.amt { width: 8.5rem; }
table.pick th.chk-h, table.pick td.chk-c { width: 4.5rem; text-align: center; }
table.pick td { padding-top: 5px; padding-bottom: 5px; }
.chk { width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid var(--line-strong); background: #fff;
       color: transparent; cursor: pointer; display: inline-grid; place-items: center; padding: 0;
       -webkit-tap-highlight-color: transparent; }
.chk svg { width: 20px; height: 20px; }
.chk:hover { border-color: var(--ink); }
tr.pl.done .chk { background: var(--ok); border-color: var(--ok); color: #fff; }
tr.pl.done > td { background: #f3f8f1; }
tr.pl.done td.name { color: var(--ink-soft); }
tr.ftotal > td { font-weight: 650; background: var(--cream); }
table.pick tr.ftotal > td.name { text-align: right; }

@media (max-width: 760px) {
  .print-actions { display: none; }   /* печатают с компьютера; на телефоне собирают */
}
@media (max-width: 480px) {
  .pick-head h1 { font-size: 16px; }
  .pick-bar { margin: 8px -12px 0; padding: 8px 12px; top: 0; box-shadow: 0 1px 0 var(--line-strong); }
  .pick-bar-in { gap: 8px 10px; }
  .pick-bar .doc-short { display: inline; font-size: 13px; }
  .pick-bar .seg { order: 3; width: 100%; overflow-x: auto; }
  .pick-bar .seg button { flex: 1; padding: 9px 10px; font-size: 14px; }
  .pick-bar .counter { margin-left: auto; }
  .pick-bar .btn.small { margin-left: 0; }
  .psec .card { background: transparent; border: 0; }
  table.pick, table.pick tbody { display: block; }
  table.pick thead { display: none; }
  table.pick tr.pl {
    display: grid; grid-template-columns: 52px auto 1fr auto; column-gap: 8px;
    grid-template-areas: "chk name name qty" "chk ln pk amt";
    align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px 10px 6px; margin-bottom: 8px;
  }
  table.pick tr.pl > td { display: block; border: 0; padding: 0; width: auto; background: transparent; height: auto; }
  table.pick tr.pl:hover > td { background: transparent; }
  table.pick tr.pl > td.chk-c { grid-area: chk; align-self: stretch; display: flex; align-items: center; justify-content: center; }
  table.pick td.name { grid-area: name; font-size: 16px; line-height: 1.3; font-weight: 500; }
  table.pick td.q { grid-area: qty; font-size: 19px; text-align: right; padding-left: 8px; white-space: nowrap; }
  table.pick td.ln { grid-area: ln; font-size: 12.5px; text-align: left; margin-top: 4px; }
  table.pick td.ln .lnl { display: inline; }
  table.pick td.pk.none { visibility: hidden; }
  table.pick td.pk { grid-area: pk; font-size: 12.5px; text-align: left; margin-top: 4px; white-space: normal; }
  table.pick td.amt { grid-area: amt; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
  .chk { width: 44px; height: 44px; border-radius: 12px; }
  .chk svg { width: 24px; height: 24px; }
  table.pick tr.pl.done { background: #f3f8f1; border-color: #bfdcc3; }
  table.pick tr.ftotal { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px;
                         background: var(--cream-deep); margin-bottom: 4px; }
  table.pick tr.ftotal > td { display: block; border: 0; padding: 0; width: auto; background: transparent; }
  table.pick tr.ftotal > td:empty { display: none; }
}

/* ---------- список накладных ---------- */
.pick-search { display: flex; gap: 8px; align-items: center; }
.pick-search .field { width: 15rem; padding: 7px 11px; font-size: 14px; }
table.sales tbody tr[data-href] { cursor: pointer; }
table.sales td.name a { font-weight: 550; text-decoration: none; }
table.sales td.name a:hover { text-decoration: underline; }
table.sales .m-date { display: none; }
@media (max-width: 760px) {
  .pick-search { width: 100%; }
  .pick-search .field { flex: 1; width: auto; }
  table.sales .hide-m { display: none; }
  table.sales th, table.sales td { padding-left: 7px; padding-right: 7px; }
  table.sales td.name { font-size: 13.5px; }
  table.sales .m-date { display: block; font-size: 12px; color: var(--muted); }
}

/* ---------- ошибка ---------- */
.error-card { max-width: 44rem; padding: 22px 24px; border-top: 4px solid var(--chili); }
.error-card pre { white-space: pre-wrap; background: var(--cream); padding: 12px 14px; border-radius: 10px;
                  border: 1px solid var(--line); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- контроль: удалённые в 1С документы ---------- */
.ctl-help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; padding: 12px 16px;
            font-size: 13.5px; line-height: 1.45; margin-bottom: 4px; }
.ctl-note { margin: -2px 0 8px; font-size: 13px; }
.ctl-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ctl-summary .pill { font-size: 14px; padding: 3px 12px; font-weight: 500; }
.ctl-why { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
table.ctl .ctl-check { font-weight: 600; }
table.ctl tr.to-check > td:first-child { box-shadow: inset 3px 0 0 var(--chili); }
table.ctl td.ctl-verdict { white-space: normal; min-width: 12rem; }
table.ctl td.ctl-changes { white-space: normal; font-size: 13.5px; }
table.ctl tr.ev[data-items] { cursor: pointer; }
table.ctl .m-sub { display: none; }
table.ctl tr.items-row > td { background: var(--cream); padding: 6px 12px 10px; }
table.ctl tr.items-row:hover > td { background: var(--cream); }
table.ctl-items { width: auto; min-width: 28rem; max-width: 100%; font-size: 13px; }
table.ctl-items th, table.ctl-items td { background: transparent; padding: 4px 8px; }
table.ctl-items td.name { white-space: normal; }
@media (max-width: 760px) {
  .ctl-help { grid-template-columns: 1fr; padding: 10px 12px; font-size: 13px; }
  table.ctl .hide-m { display: none; }
  table.ctl th, table.ctl td { padding-left: 7px; padding-right: 7px; }
  table.ctl td.name { font-size: 13.5px; }
  table.ctl .m-sub { display: block; font-size: 12px; color: var(--muted); }
  table.ctl-items { min-width: 0; width: 100%; }
  table.ctl td.ctl-amt { white-space: normal; }
  table.ctl td.ctl-amt span { white-space: nowrap; }
}

/* название позиции — ссылка на карточку движения товара (/item); выглядит как текст */
a.item-link { color: inherit; text-decoration: none; }
a.item-link:hover { color: var(--chili-deep); text-decoration: underline; }
