/* Карточки документов. Размеры замерены локально, чужие ресурсы не используются. */
@font-face {
  font-family: 'Svod Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Svod Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Onest-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;
}
.ms-page-card {
  --card-font: 'Svod Onest', Arial, sans-serif;
  --first-label: 82.38px; --second-label: 55.31px; --third-label: 108px;
  padding: 20px 40px 64px; margin: 0; color: #222; background: #fff;
  font: 400 12px/normal 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
}
.ms-page-card *, .ms-page-card *::before, .ms-page-card *::after { box-sizing: content-box; }
.ms-page-card [hidden] { display: none !important; }
.ms-page-card input, .ms-page-card textarea, .ms-page-card button { font-family: inherit; }
.ms-card-readonly { position: fixed; top: 0; left: calc(50% - 6.78px); transform: translateX(-50%); z-index: 100; box-sizing: border-box; width: 236.45px; height: 26px; padding: 5px 24px 5px 7px; border: 0; border-radius: 0 0 5px 5px; background: #d4e8ae; color: #000; box-shadow: 0 0 5px #333; white-space: nowrap; font-size: 12px; line-height: 16px; }
.ms-card-readonly button { border: 0; padding: 0; background: none; color: #829054; cursor: pointer; font-size: 16px; line-height: 12px; margin-left: 4px; }
.ms-card-toolbar { display: flex; align-items: flex-start; height: 31px; position: sticky; top: 0; z-index: 10; background: #fff; padding: 0; }
.ms-card-modern .ms-card-toolbar { height: 34px; align-items: center; }
.ms-card-toolbar .ms-btn { flex-shrink: 0; }
.ms-card-pager { display: flex; align-items: center; gap: 5px; height: 28px; margin-right: 10px; white-space: nowrap; }
.ms-card-arrows { display: flex; }
.ms-card-arrows .ms-btn { width: 27px; height: 26px; padding: 0; margin: 0 0 0 -1px; border-radius: 0; color: #888; }
.ms-card-arrows .ms-btn:first-child { margin-left: 0; border-radius: 3px 0 0 3px; }
.ms-card-arrows .ms-btn:last-child { border-radius: 0 3px 3px 0; }
.ms-card-print { position: relative; margin-right: 0; }
.ms-card-print summary { list-style: none; }
.ms-card-modern .ms-card-print summary { padding-left: 11.5px; padding-right: 11.5px; }
.ms-card-print summary::-webkit-details-marker { display: none; }
.ms-card-print-options { position: absolute; top: 28px; left: 0; width: max-content; min-width: 160px; border: 1px solid #999; border-radius: 0; background: white; box-shadow: 0 1px 3px #c8c8c8; z-index: 30; padding: 0; animation: none; transition: none; }
.ms-card-print-options a { display: block; padding: 4px 15px; line-height: 15px; color: #222; text-decoration: none; white-space: nowrap; }
.ms-card-print-options a:hover, .ms-card-print-options a:focus { background: #dcdcdc; color: #222; outline: 0; }
.ms-card-print-options a:visited { color: #222; }
/* Меню «Печать» по шаблонам МойСклада (волна 47): черта между формами, этикетками и «Комплект...»; «Настроить...» — неактивен. */
.ms-card-print-options hr.ms-card-print-sep { margin: 3px 0; border: 0; border-top: 1px solid #ccc; height: 0; }
.ms-card-print-options .ms-card-print-off { display: block; padding: 4px 15px; line-height: 15px; color: #999; white-space: nowrap; cursor: default; }
/* Меню печати и в редакторе: одна строка, 15 + 4 + 4 = 23 px (ms_menu_print). */
.ms-docedit .ms-card-print .ms-card-print-options a { white-space: pre; overflow-wrap: normal; }
.ms-card-owner { width: 140px; flex-shrink: 0; text-align: right; margin: 0 28px 0 0; color: #186999; padding-top: 1px; }
.ms-card-owner small, .ms-card-changes small { display: block; font-size: 10px; line-height: 11px; }
.ms-card-owner > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ms-card-owner small { color: #909090; }
.ms-card-changes { color: #186999; padding-top: 1px; text-align: right; white-space: nowrap; }
.ms-card-changes div > span:first-child { color: #909090; }
/* «Изменения: Пряда М. / дата» у МойСклада — синим без подчёркивания (живая сверка 10.10.2026). */
.ms-card-changes a, .ms-card-changes a:visited { color: #186999; text-decoration: none; }
.ms-card-changes a:hover { text-decoration: underline; }
/* Старый вид МойСклада (b-editor-toolbar, эталон ms_card_demand, 14.10.2026): владелец — от левого края блока без отступа
   сверху, «Изменения» — сразу за ним (+8 px), серым без двоеточия, имя — синим следом; как у формы старого вида. */
.ms-card-classic .ms-card-toolbar .ms-card-owner { text-align: left; padding-top: 0; margin-right: 0; }
.ms-card-classic .ms-card-toolbar .ms-card-changes { padding-top: 0; padding-left: 8px; }
.ms-card-classic .ms-card-toolbar .ms-card-changes-label { color: #8c8c8c; margin-right: 7px; }
.ms-card-heading { display: flex; align-items: center; gap: 12px; margin-top: 10px; min-height: 24px; white-space: nowrap; }
.ms-card-modern .ms-card-heading { margin-top: 11px; min-height: 31px; }
.ms-card-heading h1 { display: flex; align-items: center; margin: 0; padding: 0; font: 400 18px/normal 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; white-space: pre; }
.ms-card-number { padding: 0 5px; border: 1px solid transparent; margin-right: 5px; line-height: 22px; }
.ms-card-moment { width: 151px; height: 20px; padding: 0 0 0 17px; border: 0; background: white; color: #545454; font-size: 18px; opacity: 1; -webkit-text-fill-color: #545454; }
.ms-card-payment { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; }
.ms-card-payment i { display: block; width: 10px; height: 10px; border: 2px solid #f08300; border-radius: 50%; }
.ms-card-payment.paid i { border-color: #86aa60; background: #86aa60; position: relative; }
.ms-card-payment.paid i::after { content: ''; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; position: absolute; left: 1px; top: 1px; transform: rotate(-45deg); }
.ms-card-state { display: inline-block; background: #bdae00; border-radius: 2px; color: #fff; line-height: 18px; padding: 2px 12px; font-size: 12px; font-weight: 400; }
.ms-card-flag { display: flex; align-items: center; gap: 8px; margin-left: 28px; margin-right: 7px; }
.ms-card-check { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; margin: 0; font: inherit; }
.ms-card-check input { appearance: none; position: relative; width: 13px; height: 13px; margin: 0; padding: 0; border: 1px solid #c9d2e0; border-radius: 3px; background: #f4f4f4; opacity: 1; }
.ms-card-check input:checked::after { content: ''; position: absolute; left: 3px; top: 2px; width: 6px; height: 3px; border-left: 1.5px solid #8e9aae; border-bottom: 1.5px solid #8e9aae; transform: rotate(-45deg); }
.ms-card-classic .ms-card-check input { appearance: auto; box-sizing: border-box; width: 13px; height: 13px; border: initial; border-radius: initial; background: initial; accent-color: auto; cursor: default; }
.ms-card-classic .ms-card-check input::after, .ms-card-classic .ms-card-check input::before { content: none; }
.ms-card-fields { display: flex; align-items: flex-start; gap: 50px; margin-top: 15px; width: max-content; max-width: 100%; }
.ms-card-field-column { flex-shrink: 0; }
.ms-card-column-0 { --label-width: var(--first-label); }
.ms-card-column-1 { --label-width: var(--second-label); }
.ms-card-column-2 { --label-width: var(--third-label); }
.ms-card-field { display: grid; grid-template-columns: var(--label-width) auto; margin: 0 0 10px; align-items: start; }
.ms-card-label { display: block; position: relative; padding-top: 4px; height: 17px; font-size: 12px; white-space: nowrap; }
.ms-card-required::before { content: '*'; color: #e74827; position: absolute; left: -6px; }
.ms-card-value { min-width: 250px; }
.ms-page-card .ms-card-input { box-sizing: border-box; display: block; width: 250px; height: 21px; min-height: 0; padding: 0 5px 0 2px; margin: 0; border: 1px solid #bfbfbf; border-radius: 0; box-shadow: none; background: #f0f0f0; color: #888; -webkit-text-fill-color: #888; opacity: 1; font: 400 12px/14px Arial, sans-serif; }
.ms-page-card .ms-card-account { margin-top: 5px; }
.ms-card-balance { margin-top: 8px; height: 14px; line-height: 14px; }
.ms-card-balance .is-debt { color: #f00; }
.ms-card-balance .is-credit { color: #84ab0f; }
.ms-card-field-agent { margin-bottom: 14px; }
.ms-card-column-1 > .ms-card-field:nth-child(-n+2) { margin-bottom: 36px; }
.ms-card-field:last-child { margin-bottom: 0; }
.ms-card-classic .ms-card-column-0 .ms-card-input:not(.ms-card-account):not(.ms-card-date), .ms-card-classic .ms-card-column-1 .ms-card-input:not(.ms-card-date) { width: 228px; }
.ms-page-card.ms-card-classic .ms-card-field-incoming .ms-card-input:first-child { width: 164px; }
.ms-page-card .ms-card-date { width: 122px; }
.ms-card-classic .ms-card-field-date { margin-bottom: 11px; }
.ms-card-modern .ms-card-date { background: white; border: 0; width: 120px; padding-left: 7px; color: #545454; -webkit-text-fill-color: #545454; }
.ms-card-incoming { display: flex; align-items: center; gap: 5px; }
.ms-card-textarea { box-sizing: content-box; display: block; width: 250px; height: 30px; padding: 3px; border: 1px solid #bfbfbf; border-radius: 0; margin: 0; color: #888; -webkit-text-fill-color: #888; background: #f0f0f0; opacity: 1; font-size: 12px; line-height: normal; resize: none; }
.ms-card-modern .ms-card-textarea { height: 28px; }
.ms-card-attributes .ms-card-textarea { resize: both; }
.ms-card-column-2 .ms-card-textarea { box-sizing: border-box; width: 280px; height: 36px; }
.ms-card-column-2 .ms-card-address { height: 64px; }
/* Комментарий к доставке заказа и отгрузки растягивается мышью (своё отличие Свода, 22.10.2026): длинный текст читается целиком. */
.ms-card-column-2 .ms-card-address-comment { min-width: 280px; min-height: 36px; max-width: min(720px, calc(100vw - 48px)); resize: both; }
.ms-card-field-address { margin-bottom: 13px; }
.ms-card-attributes { display: flex; gap: 50px; margin-top: 10px; padding-bottom: 10px; width: max-content; max-width: 100%; }
.ms-card-attribute-column { display: grid; grid-template-columns: max-content max-content; align-content: start; column-gap: 10px; row-gap: 12px; }
.ms-card-attribute { display: contents; }
/* Счётчик вкладки «Связанные документы» заказа (замер МойСклада 10.10.2026: 16 px, 12/16, #f1f4f9, скругление 8). */
.ms-docedit-tab-count { display: inline-block; box-sizing: border-box; min-width: 16px; height: 16px; margin-left: 8px; padding: 0 4px; border-radius: 8px; background: #f1f4f9; color: #222; font-size: 12px; line-height: 16px; font-weight: 400; text-align: center; vertical-align: 1px; }
.ms-card-attribute > label { position: relative; padding-top: 4px; height: 17px; white-space: nowrap; }
/* Подсказка допполя — «?» левее подписи, в промежутке столбцов (МойСклад, «Причина отмены заказа», волна 31). */
.ms-card-attribute-help { position: absolute; left: -25px; top: 4px; display: inline-flex; width: 16px; height: 16px; color: #8d9aa8; cursor: help; }
.ms-card-attribute-help svg { width: 16px; height: 16px; }
.ms-card-modern .ms-card-attribute-text > div { padding-bottom: 3px; }
.ms-card-modern .ms-card-check-attribute input { width: 14px; height: 14px; }
.ms-card-check-attribute > span { display: none; }
.ms-card-check-attribute { height: 21px; }
.ms-card-modern { --first-label: 120.66px; }
.ms-card-modern .ms-card-field-agent { margin-bottom: 9.5px; }
.ms-card-modern .ms-card-column-1 > .ms-card-field:nth-child(2) { margin-bottom: 31.5px; }
.ms-card-modern .ms-card-date { height: 20px; }
.ms-card-modern .ms-card-field-date { margin-bottom: 10px; }
.ms-card-modern .ms-card-moment { width: 144px; padding-left: 7px; margin-left: 13.5px; }
.ms-card-modern .ms-card-heading h1 { margin-right: 11.5px; }
.ms-card-modern .ms-card-payment { gap: 4px; margin-top: -2px; }
.ms-card-classic .ms-card-field-date:last-child { margin-bottom: 0; }
.ms-card-classic .ms-card-attribute-column { column-gap: 15px; }
.ms-card-modern .ms-card-column-2 { margin-left: 2.73px; }
.ms-card-type-invoiceout, .ms-card-type-invoicein, .ms-card-type-facturein, .ms-card-type-factureout { --first-label: 114.59px; }
.ms-card-type-invoicein .ms-card-column-0 { min-width: 397px; }
.ms-card-type-invoicein .ms-card-column-1, .ms-card-type-facturein .ms-card-column-1 { margin-left: 5px; }
.ms-card-classic .ms-card-attributes { padding-bottom: 2px; }
.ms-card-field-return { grid-template-columns: 116px auto; margin-top: 1px; }
.ms-card-type-salesreturn .ms-card-tabs { margin-top: 21px; }
.ms-card-type-purchaseorder .ms-card-fields { padding-bottom: 1px; }
.ms-card-type-demand .ms-card-heading { height: 26px; min-height: 26px; }
.ms-card-type-demand .ms-card-attributes { margin-top: 13px; }
.ms-card-type-demand .ms-card-other { margin-top: 25px; }
.ms-card-type-demand .ms-card-tabs { margin-top: 16px; }
.ms-card-type-supply { --second-label: 105.15px; }
.ms-card-type-demand { --second-label: 88.64px; --third-label: 108px; }
.ms-card-type-salesreturn .ms-card-column-0 { min-width: 395.36px; }
.ms-card-type-salesreturn { --second-label: 88.64px; }
.ms-card-type-purchaseorder { --first-label: 120.66px; }
/* Полученный отчёт комиссионера МойСклада (живая сверка 22.10.2026, окно 1996): подписи слева с 40 px, поля — с 189;
   справа подписи с 555, поля — с 666; «Период» — две даты, «Комиссия» — способ и процент «%», «(?) Прочие услуги … руб». */
.ms-card-type-commissionreportin { --first-label: 149px; --second-label: 111px; }
.ms-card-type-commissionreportin .ms-card-column-0 { min-width: 465px; }
.ms-card-period, .ms-card-commission, .ms-card-overhead-field { display: flex; align-items: center; }
.ms-page-card .ms-card-period .ms-card-period-date { width: 116px; padding-left: 12px; }
.ms-page-card .ms-card-period .ms-card-period-date + .ms-card-period-date { margin-left: 13px; }
.ms-page-card.ms-card-classic .ms-card-column-1 .ms-card-commission-type { width: 249px; }
.ms-page-card.ms-card-classic .ms-card-column-1 .ms-card-commission-percent { width: 55px; margin-left: 4px; text-align: right; }
.ms-card-commission > span { align-self: flex-start; margin: 5px 0 0 5px; }
.ms-page-card.ms-card-classic .ms-card-column-1 .ms-card-overhead-value { width: 66px; text-align: right; }
.ms-card-overhead-field > span { align-self: flex-start; margin: 7px 0 0 8px; }
.ms-card-overhead-label-help { position: absolute; left: -25px; top: 3px; display: inline-flex; width: 15px; height: 15px; color: #8d9aa8; cursor: help; }
.ms-card-overhead-label-help svg { width: 15px; height: 15px; }
/* Итоги полученного отчёта: три блока справа от комментария (с 778 px, суммы — до 1164): заголовок 18 px жирным, строки
   12 px; от верха заголовка до первой строки 33 px, далее 27 (перед «НДС:») или 30; черта между блоками. */
.ms-card-type-commissionreportin .ms-card-bottom { gap: 76px; }
.ms-card-classic.ms-card-type-commissionreportin { --ms-card-comment-width: 662px; }
.ms-card-totals.ms-card-cin { width: 386px; }
.ms-page-card .ms-card-totals.ms-card-cin > .ms-card-cin-block { display: block; }
.ms-card-type-commissionreportin .ms-card-fields { margin-top: 13px; }
.ms-card-type-commissionreportin .ms-card-column-0 > .ms-card-field-agent { margin-bottom: 10px; }
.ms-card-type-commissionreportin .ms-card-column-0 > .ms-card-field-incoming { margin-bottom: 11px; }
.ms-card-type-commissionreportin .ms-card-column-1 > .ms-card-field-commission { margin-bottom: 8px; }
.ms-page-card .ms-card-type-commissionreportin .ms-card-reward-button, .ms-page-card.ms-card-type-commissionreportin .ms-card-reward-button { min-width: 84px; }
.ms-page-card.ms-card-classic.ms-card-type-commissionreportin .ms-card-field-incoming .ms-card-input:first-child { width: 168px; }
.ms-page-card.ms-card-type-commissionreportin .ms-card-field-incoming .ms-card-date { width: 116px; }
.ms-card-type-commissionreportin .ms-card-add-position { padding-right: 50px; }
.ms-page-card.ms-card-type-commissionreportin .ms-card-add-position .ms-btn { height: 25px; min-height: 0; }
.ms-card-type-commissionreportin .ms-card-bottom { margin-top: 22px; }
.ms-card-cin-block > summary, .ms-card-cin-head { position: relative; display: flex; align-items: center; height: 20px; list-style: none; cursor: pointer; }
.ms-card-cin-head { cursor: default; }
.ms-card-cin-block > summary::-webkit-details-marker { display: none; }
.ms-card-cin-block strong { font: 700 18px/20px 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000; white-space: nowrap; }
.ms-card-cin-payout strong { color: #222; }
.ms-card-cin-help { display: inline-flex; width: 15px; height: 15px; margin-left: 8px; color: #8d9aa8; cursor: help; }
.ms-card-cin-help svg { width: 15px; height: 15px; }
.ms-card-cin-sum { margin-left: auto; }
.ms-card-cin-arrow { position: absolute; right: -32px; top: 2px; display: inline-flex; width: 16px; height: 16px; color: #222; transform: rotate(180deg); }
.ms-card-cin-arrow svg { width: 16px; height: 16px; }
.ms-card-cin-block:not([open]) .ms-card-cin-arrow { transform: none; }
.ms-card-cin-row { display: flex; justify-content: space-between; align-items: center; height: 14px; margin-top: 16px; font-size: 12px; line-height: 14px; }
.ms-card-cin-block > summary + .ms-card-cin-row, .ms-card-cin-head + .ms-card-cin-row { margin-top: 13px; }
.ms-card-cin-payout .ms-card-cin-head + .ms-card-cin-row { margin-top: 12px; }
.ms-card-cin-row.ms-card-cin-vat { margin-top: 13px; }
.ms-card-cin-block + .ms-card-cin-block { margin-top: 23px; padding-top: 21px; border-top: 1px solid #e6e6e6; }
.ms-card-cin-block + .ms-card-cin-payout { margin-top: 25px; padding-top: 18px; }
.ms-card-cin-vat .ms-card-check { gap: 5px; }
.ms-card-cin-subhead b { font-weight: 700; }
.ms-card-duplicates { height: 21px; margin: 10px 0 0; }
/* Документ из «Корзины» (27.09.2026): пометка над заголовком. */
.ms-card-bin { display: inline-block; margin: 10px 0 0; padding: 5px 10px; background: #fff4d6; border: 1px solid #f0d27a; color: #5a4a12; }
.ms-card-duplicates span { display: inline-block; border-radius: 50%; width: 15px; height: 15px; line-height: 15px; text-align: center; color: white; background: #86aa60; }
.ms-card-other { margin-top: 13px; margin-bottom: 0; }
.ms-card-other summary { color: #e4540b; cursor: pointer; }
.ms-card-other-body { border-left: 1px solid #ddd; padding: 10px; line-height: 24px; }
.ms-card-tabs { display: flex; gap: 0; align-items: flex-end; margin-top: 20px; height: 24px; }
.ms-card-tab { cursor: pointer; outline: 0; display: inline-flex; align-items: center; gap: 8px; height: 22px; padding: 0 10px; border: 1px solid transparent; border-bottom: 1px solid #186999; color: #186999; text-decoration: none; font-size: 13px; white-space: nowrap; }
.ms-card-tab.on { font-weight: 700; color: #222; border: 1px solid #186999; border-bottom-color: white; }
.ms-card-tab:visited { color: #186999; }
.ms-card-tab:hover { color: #f88001; text-decoration: none; }
.ms-card-tab.on, .ms-card-tab.on:hover, .ms-card-tab.on:visited { color: #222; cursor: default; }
.ms-card-modern .ms-card-tabs { gap: 16px; height: 43px; margin-top: 25px; border-bottom: 1px solid #ced7e3; font-family: var(--card-font); }
.ms-card-modern .ms-card-tab { position: relative; height: 32px; padding: 0 0 11px; border: 0; font: 400 14px/normal var(--card-font); color: #222; }
.ms-card-modern .ms-card-tab::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: transparent; border-radius: 1.5px; transition: background-color .2s ease; }
.ms-card-modern .ms-card-tab.on::after { background: #036ce5; }
.ms-card-modern .ms-card-tab:hover, .ms-card-modern .ms-card-tab:active, .ms-card-modern .ms-card-tab:visited, .ms-card-modern .ms-card-tab.on { color: #222; cursor: pointer; }
.ms-card-modern .ms-card-tab:first-child span { letter-spacing: -.17px; }
.ms-card-modern .ms-card-tab:last-child span { letter-spacing: -.03px; }
.ms-card-modern .ms-card-tab svg { width: 18px; height: 24px; }
.ms-card-position-tools { display: flex; gap: 16px; align-items: center; height: 36px; margin: 0; }
.ms-card-all { padding: 5px 12px; background: #f1f4f9; border-radius: 7px; color: #243858; font-size: 14px; white-space: nowrap; }
.ms-card-search { position: relative; display: block; width: 312px; }
.ms-card-search input { box-sizing: border-box; width: 100%; height: 28px; margin: 0; padding: 0 30px 0 12px; color: #091739; border: 1px solid #c1cce5; border-radius: 8px; background: white; outline: none; font: 400 14px/20px var(--card-font); }
.ms-card-search input::placeholder { color: #9fa7af; opacity: 1; }
.ms-card-search input:focus { border-color: #091739; }
.ms-card-modern .ms-card-search { border-radius: 8px; outline: 1px solid #bec6d7; }
.ms-card-modern .ms-card-search:focus-within { outline-color: #091739; }
.ms-card-modern .ms-card-search input { border: 0; }
.ms-card-search svg { position: absolute; right: 10px; top: 6px; color: #8996a5; pointer-events: none; }
.ms-card-modern .ms-card-position-tools { height: 46px; font-family: var(--card-font); }
.ms-card-classic .ms-card-positions { position: relative; padding-top: 10px; }
/* В старой таблице поиск занимает место выбора наименования в строке заголовков. */
.ms-card-classic .ms-card-position-tools { position: absolute; z-index: 1; top: 15px; left: 0; height: 22px; margin: 0; gap: 3px; }
.ms-card-classic .ms-card-table th.ms-card-cell-name, .ms-card-classic .ms-card-table th.ms-card-cell-seq { font-size: 0; }
.ms-card-classic .ms-card-all { width: 43px; height: 22px; line-height: 22px; padding: 0; border-radius: 0; background: white; font-size: 11px; }
.ms-card-classic .ms-card-search input { font-family: Arial,sans-serif; font-size: 12px; height: 22px; border-radius: 3px; }
.ms-card-classic .ms-card-search svg { top: 4px; }
.ms-card-vat-toggles { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 14px; padding-right: 14px; }
.ms-card-switch input { box-sizing: border-box; width: 28px; height: 16px; border: 0; border-radius: 10px; background: #e5e8ed; }
.ms-card-switch input:checked { background: #68a7ef; }
.ms-card-switch input::before { content: ''; display: block; position: absolute; left: 1px; top: 1px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.ms-card-switch input:checked::before { left: 13px; }
.ms-card-switch input:checked::after { left: 16px; top: 5px; width: 6px; height: 3px; border-color: #4d91df; }
.ms-card-table-scroll { overflow-x: auto; }
.ms-card-table { border-collapse: collapse; table-layout: fixed; margin: 0; padding: 0; font: 400 12px/14px 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.ms-card-classic .ms-card-table-scroll { margin-left: -30px; }
.ms-card-classic .ms-card-table { border-collapse: separate; border-spacing: 0; }
.ms-card-table th { height: 31px; padding: 0 5px 0 0; border-bottom: 1px solid #186999; font-weight: 400; text-align: right; white-space: nowrap; overflow: hidden; }
.ms-card-table td { height: 29px; padding: 0 5px 0 0; border-bottom: 1px solid #bfbfbf; text-align: right; vertical-align: middle; overflow: hidden; }
.ms-card-table .ms-card-cell-name { text-align: left; padding: 0; }
.ms-card-table .ms-card-cell-name b { font-weight: 700; }
.ms-card-table .ms-card-cell-mark, .ms-card-table .ms-card-cell-unit, .ms-card-table .ms-card-cell-gtd, .ms-card-table .ms-card-cell-rnpt, .ms-card-table .ms-card-cell-country { text-align: left; }
.ms-card-table th.ms-card-cell-name { color: #186999; padding-left: 10px; }
/* Картинка позиции (28.09.2026): клетка 26 точек без заливки (tiny-image МойСклада); нет картинки — пустая и белая. */
.ms-card-image { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.ms-card-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; }
.ms-card-table .ms-card-cell-image { padding: 0; }
.ms-card-item-name { display: block; overflow-wrap: anywhere; }
.ms-card-classic .ms-card-item-name { padding: 2px 0; }
.ms-card-position-archived .ms-card-cell-name { color: #999; }
.ms-card-archive { display: inline-block; width: 11.69px; height: 14px; line-height: 14px; text-align: center; color: white; background: #aaa; font-weight: 700; }
.ms-card-search-empty td, .ms-card-table .ms-card-empty { height: 50px; padding: 0 15px; text-align: left; color: #888; }
.ms-card-modern .ms-card-table { width: 100%; min-width: 0; table-layout: auto; font: 400 12px/20px var(--card-font); color: #091739; border: 0; box-shadow: inset 0 1px #d1d6df; }
.ms-card-modern .ms-card-table th { height: 32px; padding: 0; border: 0; color: #5f6d79; font-weight: 400; box-shadow: inset 0 -1px #d1d6df; }
.ms-card-modern .ms-card-table td { height: 28px; padding: 0; border: 0; color: #9fa7af; box-shadow: inset 0 -1px #eef1f6; }
.ms-card-modern .ms-card-table .ms-card-cell-name { color: #091739; text-align: left; }
.ms-card-modern .ms-card-table th.ms-card-cell-name { color: #5f6d79; }
.ms-card-modern .ms-card-table .ms-card-cell-name b { color: #6f7d88; }
.ms-card-modern .ms-card-table .ms-card-cell-seq { color: #7e8b97; text-align: center; }
.ms-card-modern .ms-card-table .ms-card-cell-image { padding: 0; }
.ms-card-modern .ms-card-image { width: 22px; height: 22px; }
.ms-card-modern .ms-card-item-name { width: 0; min-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-card-modern .ms-card-table .ms-card-available { background: #eaf4d3; color: #091739; }
.ms-card-modern .ms-card-table .ms-card-shortage { background: #ffe6d5; color: #091739; }
.ms-card-quantity { height: 32px; display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding-right: 10px; border-bottom: 1px solid #e9edf3; font: 700 14px/19px var(--card-font); }
.ms-card-quantity b { font-weight: 700; }
.ms-card-bottom { display: flex; align-items: flex-start; margin-top: 20px; gap: 65px; }
.ms-card-comment { box-sizing: border-box; width: 663px; height: 83px; border: 1px solid #e4e4e4; border-radius: 0; padding: 3px; background: #fafafa; color: #222; opacity: 1; font: 400 12px/normal Arial,sans-serif; resize: vertical; }
.ms-card-comment::placeholder { color: #999; font-style: italic; }
.ms-card-totals { width: 340px; flex-shrink: 0; }
.ms-card-totals > div:not(.ms-card-total-quantity):not(.ms-card-vat-included) { display: flex; justify-content: space-between; align-items: center; }
.ms-card-subtotal { font-size: 18px; line-height: 21px; font-weight: 700; }
.ms-card-vat-total { line-height: 20px; }
.ms-card-vat-included { height: 20px; }
.ms-card-grand { margin-top: 14px; font-size: 18px; line-height: 21px; }
.ms-card-profit { color: #999; font: 400 10px/11px Arial,sans-serif; }
.ms-card-total-quantity { margin-top: 40px; line-height: 14px; }
.ms-card-overhead { display: flex; align-items: center; gap: 5px; margin-top: 10px; border-top: 1px solid #ccc; padding-top: 10px; }
.ms-page-card .ms-card-overhead .ms-card-overhead-sum { display: inline-block; width: 35px; text-align: right; }
.ms-card-overhead-kind { color: #2a7ab0; }
.ms-card-type-invoiceout .ms-card-comment, .ms-card-type-factureout .ms-card-comment, .ms-card-type-salesreturn .ms-card-comment { width: 568px; }
.ms-card-type-invoicein .ms-card-comment, .ms-card-type-facturein .ms-card-comment { width: 633px; }
.ms-card-type-purchaseorder .ms-card-comment { width: 718px; }
.ms-card-modern .ms-card-bottom { margin-top: 24px; gap: 60px; font-family: var(--card-font); }
.ms-card-modern .ms-card-comment { width: 0; flex: 1; height: 64px; border-color: #bfbfbf; background: rgba(239,239,239,.3); padding: 12px 6px; font: 400 14px/normal var(--card-font); }
.ms-card-modern .ms-card-comment::placeholder { color: #bbb; font-style: normal; }
.ms-card-modern .ms-card-totals { display: grid; grid-template-columns: max-content max-content; column-gap: 20px; row-gap: 8px; width: auto; min-width: 0; padding-right: 10px; text-align: right; }
.ms-card-modern .ms-card-totals > div { display: contents !important; }
.ms-card-modern .ms-card-totals > div > span { font: 400 14px/18px var(--card-font); }
.ms-card-modern .ms-card-totals .ms-card-grand > strong { font: 700 20px/24px var(--card-font); letter-spacing: -.125px; }
.ms-card-modern .ms-card-totals > div { grid-template-columns: max-content minmax(100px,auto); column-gap: 20px; text-align: right; margin: 0; font-size: 14px; font-weight: 400; line-height: 20px; }
.ms-card-modern .ms-card-totals > div + div { margin-top: 6px; }
.ms-card-modern .ms-card-totals .ms-card-grand { font-size: 20px; line-height: 24px; }
.ms-card-external { margin-top: 26px; color: #07f; font: 400 14px/20px var(--card-font); }
.ms-card-external summary { display: inline; list-style: none; cursor: pointer; }
.ms-card-external summary::-webkit-details-marker { display: none; }
.ms-card-external .ms-card-input { margin-top: 8px; }
.ms-card-classic .ms-card-external { font: 400 12px/20px Arial,sans-serif; margin-top: 20px; }
.ms-card-linked { padding-top: 20px; }
.ms-card-linked h2 { font-size: 16px; font-weight: 400; margin: 0 0 12px; }
.ms-card-linked table { border-collapse: collapse; min-width: 800px; margin-bottom: 24px; }
.ms-card-linked th { font-weight: 400; color: #186999; text-align: left; border-bottom: 2px solid #186999; }
.ms-card-linked td, .ms-card-linked th { padding: 8px 16px 8px 0; }
.ms-card-linked td { border-bottom: 1px solid #ddd; }
.ms-card-linked a, .ms-card-linked a:visited { color: #186999; text-decoration: underline; outline: 0; }
.ms-card-linked a:hover { color: #f88001; }
.ms-card-linked a:active { text-decoration: none; }
.ms-card-linked tbody tr:hover td { background: #fffb8c; cursor: pointer; }
.ms-print { margin: 0; background: white; color: #222; }
.ms-print .ms-page-card { padding: 20px; }
.ms-card-print-now { float: right; }
@media (max-width: 900px) {
  .ms-page-card { padding-left: 20px; padding-right: 20px; }
  .ms-card-toolbar { overflow-x: auto; }
  .ms-card-heading { overflow-x: auto; padding-bottom: 4px; }
  .ms-card-fields, .ms-card-attributes { max-width: 100%; overflow-x: auto; }
  .ms-card-bottom { flex-direction: column; gap: 20px; }
  .ms-card-classic .ms-card-comment, .ms-card-modern .ms-card-comment { width: 100%; flex: none; }
  .ms-card-totals { align-self: flex-end; }
  /* Итоги полученного отчёта комиссионера (волна 48в): стрелка свёртки — в 32 px правее блока; на узком экране блок уже окна
     на её место, подпись и сумма переносятся строкой (было: блок 386 px со стрелкой выходил вбок на 8–25 px). */
  .ms-card-totals.ms-card-cin { width: min(386px, calc(100% - 34px)); margin-right: 34px; }
  .ms-card-cin-block > summary, .ms-card-cin-head, .ms-card-cin-row { height: auto; min-height: 14px; flex-wrap: wrap; }
  .ms-card-modern .ms-card-position-tools { height: auto; min-height: 45px; flex-wrap: wrap; padding: 6px 0; }
  .ms-card-modern .ms-card-vat-toggles { width: 100%; justify-content: flex-end; }
  .ms-card-classic .ms-card-position-tools { max-width: 100%; }
  .ms-card-vat-toggles { padding-right: 0; }
  .ms-card-classic .ms-card-table-scroll { margin-left: -10px; }
}
@media print {
  .ms-card-print-now, .ms-card-toolbar, .ms-card-readonly, .ms-card-position-tools, .ms-card-tabs { display: none !important; }
  .ms-print .ms-page-card { padding: 0; }
  .ms-page-card { font-size: 10px; }
  .ms-card-fields, .ms-card-attributes { gap: 15px; flex-wrap: wrap; max-width: 100%; }
  .ms-card-table-scroll { overflow: visible; margin-left: 0 !important; }
  .ms-card-table { width: 100% !important; min-width: 0 !important; table-layout: auto; font-size: 9px !important; }
  .ms-card-table col { width: auto !important; }
  .ms-card-table .ms-card-item-name { white-space: normal; }
  .ms-card-bottom { gap: 20px; }
  .ms-card-comment { flex: 1; width: 35% !important; }
  .ms-card-totals { width: 300px; }
  .ms-card-linked { break-before: auto; }
  .ms-card-linked table { min-width: 0; width: 100%; }
  .ms-card-external { color: #222; }
  .ms-card-table thead { display: table-header-group; }
  .ms-card-table tr { break-inside: avoid; }
}


/* Состояния карточки, вторая волна. Без переходов, кроме подчёркивания вкладки. */
.ms-page-card input, .ms-page-card textarea { user-select: text; transition: none; animation: none; }
.ms-page-card input:disabled, .ms-page-card textarea:disabled { cursor: default; }
.ms-card-number { cursor: auto; }
.ms-card-number:hover, .ms-card-number:focus { border-color: #bfbfbf; outline: 0; }
.ms-card-moment-wrap { display: inline-flex; align-items: center; position: relative; }
.ms-card-modern .ms-card-moment-wrap::after { content: ''; position: absolute; left: 5px; right: -8.5px; top: -1px; bottom: -1px; border: 1px solid transparent; pointer-events: none; box-sizing: border-box; }
.ms-card-modern .ms-card-moment-wrap:hover::after { border-color: #bfbfbf; }
.ms-card-help { display: inline-flex; width: 15px; height: 15px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; flex: none; }
.ms-card-help svg { display: block; width: 15px; height: 15px; }
.ms-card-help:hover { --ms-icon-help-ring: #186999; }
.ms-card-readonly button { display: inline-flex; align-items: center; vertical-align: middle; }
.ms-card-readonly button { position: absolute; right: 8px; top: 11px; width: 8px; height: 7px; margin: 0; }
.ms-card-readonly button svg { width: 8px; height: 7px; }
.ms-card-duplicates > svg { vertical-align: middle; }
.ms-card-modern .ms-card-arrows .ms-btn { box-sizing: border-box; width: 29px; height: 28px; border: 0; box-shadow: inset 0 0 0 1px #ccc; border-radius: 4px; color: #888; transition: none; }
.ms-card-modern .ms-card-arrows .ms-btn:first-child { border-radius: 4px 0 0 4px; }
.ms-card-modern .ms-card-arrows .ms-btn:last-child { border-radius: 0 4px 4px 0; }
.ms-card-modern .ms-card-arrows .ms-btn[aria-disabled=true] { color: #c0c0c0; cursor: not-allowed; background: linear-gradient(#fff,#e6e6e6); }
.ms-card-classic .ms-card-arrows .ms-btn[aria-disabled=true] { color: #c0c0c0; cursor: default; }
.ms-card-check, .ms-card-check input, .ms-card-payment, .ms-card-state { transition: none; animation: none; }
.ms-card-modern .ms-card-check:not(.ms-card-switch) input { box-sizing: border-box; width: 16px; height: 16px; border: 1px solid #cbd0db; border-radius: 4px; background: #f5f5f5; cursor: default; }
.ms-card-modern .ms-card-check:not(.ms-card-switch) input:checked::after { border-color: #9fa7af; }
.ms-card-switch { cursor: default; }
.ms-card-cell-inner { display: contents; }
.ms-card-modern .ms-card-cell-inner { display: block; box-sizing: border-box; padding: 4px 8px; line-height: 20px; }
.ms-card-modern th .ms-card-cell-inner { padding: 6px 8px; width: 0; min-width: 100%; overflow: hidden; }
.ms-card-modern .ms-card-cell-filler .ms-card-cell-inner { padding: 0; min-width: 0; width: 0; }
.ms-card-modern .ms-card-attributes { width: auto; }
.ms-card-modern .ms-card-cell-image .ms-card-cell-inner { display: flex; align-items: center; justify-content: center; padding: 0; height: 28px; }
.ms-card-modern .ms-card-cell-seq .ms-card-cell-inner { display: flex; align-items: center; justify-content: center; height: 28px; padding: 0; }
.ms-card-modern th.ms-card-cell-seq .ms-card-cell-inner { height: 32px; }
.ms-card-position { cursor: pointer; outline: 0; transition: none; }
.ms-card-position > td { cursor: pointer; transition: none; }
.ms-card-position-select { box-sizing: border-box; appearance: auto; width: 13px; height: 13px; padding: 0; margin: 0; cursor: pointer; }
.ms-card-position [data-card-select] { display: none; }
.ms-card-position:hover [data-card-select], .ms-card-position:focus-within [data-card-select], .ms-card-position.is-selected [data-card-select] { display: inline-block; }
.ms-card-position:hover .ms-card-row-number, .ms-card-position:focus-within .ms-card-row-number, .ms-card-position.is-selected .ms-card-row-number { display: none; }
.ms-card-modern .ms-card-position:not(.is-selected):hover, .ms-card-modern .ms-card-position:not(.is-selected):focus-within { background: #f1f4f9; }
.ms-card-modern .ms-card-position.is-selected { background: #dff0fe; }
.ms-card-modern .ms-card-position:hover .ms-card-item-label, .ms-card-modern .ms-card-position:focus-within .ms-card-item-label { color: #0b7cff; }
.ms-card-modern .ms-card-item-label:hover { text-decoration: underline; }
.ms-card-modern .ms-card-position-archived .ms-card-item-label, .ms-card-modern .ms-card-position-archived:hover .ms-card-item-label { color: #9fa7af; }
.ms-card-classic .ms-card-position.is-selected > td { background: #e4f1fa; }
.ms-card-classic .ms-card-position, .ms-card-classic .ms-card-position > td { cursor: auto; }
.ms-card-modern .ms-card-position-select { appearance: none; width: 16px; height: 16px; border: 1px solid #d1d6df; border-radius: 3px; background: #fff; position: relative; outline: 0; transition: none; }
.ms-card-modern .ms-card-position-select:hover, .ms-card-modern .ms-card-position-select:focus-visible { border-color: #5f6d79; }
.ms-card-modern .ms-card-position-select:active { border-color: #091739; }
.ms-card-modern .ms-card-position-select:checked, .ms-card-modern .ms-card-position-select:indeterminate { background: #036ce5; border-color: #036ce5; }
.ms-card-modern .ms-card-position-select:checked:hover { background: #0b7cff; border-color: #0b7cff; }
.ms-card-modern .ms-card-position-select:checked:active { background: #005dc9; border-color: #005dc9; }
.ms-card-modern .ms-card-position-select:focus-visible { box-shadow: 0 0 0 4px #d5dff433; }
.ms-card-modern .ms-card-position-select:checked:focus-visible { background: #2f8fff; border-color: #2f8fff; }
.ms-card-modern .ms-card-position-select:checked::after { content: ''; position: absolute; width: 7px; height: 4px; left: 3px; top: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }
.ms-card-modern .ms-card-position-select:indeterminate::after { content: ''; position: absolute; left: 3px; top: 6px; width: 8px; height: 2px; background: #fff; }
.ms-card-modern .ms-card-position-select:disabled { background: #f1f4f9; border-color: #d1d6df; box-shadow: none; cursor: default; }
.ms-card-modern .ms-card-position-select:checked:disabled { background: #d1d6df; }
.ms-card-modern .ms-card-table-scroll::-webkit-scrollbar { width: 15px; height: 15px; }
.ms-card-modern .ms-card-table-scroll::-webkit-scrollbar-track { background: #fff; }
.ms-card-modern .ms-card-table-scroll::-webkit-scrollbar-thumb { background: #d1d6df; border: 4px solid #fff; border-radius: 8px; }
.ms-card-external summary:hover { text-decoration: underline; }
.ms-card-external summary:focus { outline: 0; }
.ms-card-linked a, .ms-card-external summary { transition: none; }
@media print {
  .ms-card-position [data-card-select], .ms-card-position-select { display: none !important; }
  .ms-card-position .ms-card-row-number { display: inline !important; }
  .ms-card-position, .ms-card-position > td { background: transparent !important; }
}


/* GWT: сжимается колонка наименования; остальные сохраняют измеренные ширины. */
.ms-card-classic {
  --ms-card-visible-table: clamp(calc(var(--ms-card-table-width) - 200px), calc(100vw - 80px), var(--ms-card-table-width));
  --ms-card-table-shrink: calc(var(--ms-card-table-width) - var(--ms-card-visible-table));
  --ms-card-comment-width: 663px;
}
.ms-card-classic .ms-card-tabs, .ms-card-classic .ms-card-positions { width: var(--ms-card-visible-table); }
.ms-card-classic .ms-card-table { width: var(--ms-card-visible-table); }
.ms-card-classic .ms-card-table-scroll { overflow: visible; }
.ms-card-classic .ms-card-col-name { width: calc(505px - var(--ms-card-table-shrink)) !important; }
.ms-card-classic .ms-card-comment { width: calc(var(--ms-card-comment-width) - var(--ms-card-table-shrink)); }
.ms-card-type-invoiceout, .ms-card-type-factureout, .ms-card-type-salesreturn { --ms-card-comment-width: 568px; }
.ms-card-type-invoicein, .ms-card-type-facturein { --ms-card-comment-width: 633px; }
.ms-card-type-purchaseorder { --ms-card-comment-width: 718px; }
@media (max-width: 900px) {
  .ms-card-classic .ms-card-tabs, .ms-card-classic .ms-card-positions { width: auto; }
  .ms-card-classic .ms-card-table-scroll { overflow-x: auto; }
  .ms-card-classic .ms-card-comment { width: 100%; }
}
@media print {
  .ms-card-classic .ms-card-tabs, .ms-card-classic .ms-card-positions { width: auto; }
  .ms-card-classic .ms-card-table { width: 100%; }
  .ms-card-classic .ms-card-col-name { width: auto !important; }
  .ms-print .ms-card-position-tools { display: none; }
}

/* Настройка представления меняет только столбцы, без записи позиций. */
.ms-card-column-settings { position: relative; flex: none; }
.ms-card-settings-button { display: flex; align-items: center; justify-content: center; width: 20px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; color: #036ce5; background: transparent; cursor: pointer; list-style: none; outline: none; transition: none; }
.ms-card-settings-button::-webkit-details-marker { display: none; }
.ms-card-settings-button:hover { background: rgba(132,160,202,.08); }
.ms-card-column-menu { position: absolute; right: 0; top: 32px; z-index: 25; width: 240px; padding: 12px; border: 1px solid #d1d6df; border-radius: 8px; box-shadow: 0 4px 12px #09173926; color: #091739; background: #fff; font: 400 14px/20px var(--card-font); transition: none; animation: none; }
.ms-card-column-menu > strong { display: block; padding: 0 4px 8px; }
.ms-card-column-menu > label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; cursor: pointer; }
.ms-card-column-menu > label:hover { background: #f1f4f9; }
.ms-card-column-menu input { margin: 0; width: 16px; height: 16px; accent-color: #036ce5; }
.ms-card-columns-reset { border: 0; padding: 8px 4px 0; color: #036ce5; background: transparent; cursor: pointer; }
.ms-card-modern .ms-card-table th { position: relative; }
.ms-card-resizer { position: absolute; right: 0; top: 0; width: 6px; height: 100%; background: transparent; opacity: 0; cursor: col-resize; touch-action: none; user-select: none; outline: none; transition: width .3s ease; }
.ms-card-resizer::before { content: ''; position: absolute; right: 0; top: 0; width: 1px; height: 100%; background: #d1d6df; transition: width .3s ease; }
.ms-card-modern th:hover > .ms-card-resizer, .ms-card-resizer:focus-visible, .ms-card-resizer.is-resizing { opacity: 1; }
.ms-card-resizer:hover::before, .ms-card-resizer:focus-visible::before, .ms-card-resizer.is-resizing::before { width: 100%; }
.ms-card-modern th:has(.ms-card-resizer):hover { box-shadow: inset 0 -1px #d1d6df, -1px 0 #d1d6df; }
@media (max-width: 900px) {
  .ms-card-readonly { position: relative; top: auto; left: auto; transform: none; margin: -10px auto 10px; max-width: 100%; }
  .ms-card-modern .ms-card-vat-toggles { width: auto; padding-right: 0; }
}
@media print {
  .ms-card-resizer, .ms-card-column-settings { display: none !important; }
  .ms-card-classic .ms-card-table th.ms-card-cell-name, .ms-card-classic .ms-card-table th.ms-card-cell-seq { font-size: 9px; }
}

/* Самостоятельный печатный просмотр показывает те же подписи, что печать браузера. */
.ms-print .ms-card-position-tools { display: none; }
.ms-print .ms-card-classic .ms-card-table th.ms-card-cell-name, .ms-print .ms-card-classic .ms-card-table th.ms-card-cell-seq { font-size: 9px; }

/* Флажок занимает ровно 21 px: строчная базовая линия не увеличивает шаг сетки. */
.ms-card-modern .ms-card-attribute-boolean > div { display: flex; align-items: center; height: 21px; }

/* Меню и дополнительные виды документов, 27.09.2026. Только управление просмотром. */
.ms-card-action-menu { position: relative; flex: none; }
.ms-card-action-menu summary { list-style: none; }
.ms-card-action-menu summary::-webkit-details-marker { display: none; }
.ms-card-action-options { position: absolute; top: 28px; left: 0; min-width: 190px; padding: 3px 0; border: 1px solid #999; background: #fff; box-shadow: 0 1px 3px #c8c8c8; z-index: 30; }
.ms-card-action-options button { display: block; width: 100%; box-sizing: border-box; border: 0; background: transparent; padding: 5px 15px; color: #999; font: 12px/16px Arial,sans-serif; text-align: left; white-space: nowrap; }
.ms-card-action-options button:disabled { cursor: default; }
.ms-card-action-options a { display: block; padding: 5px 15px; color: #222; font: 12px/16px Arial,sans-serif; white-space: nowrap; text-decoration: none; }
.ms-card-action-options a:hover, .ms-card-action-options a:focus { background: #dcdcdc; text-decoration: none; }
.ms-card-toolbar > .ms-card-action-menu + .ms-card-action-menu { margin-left: -1px; }
.ms-card-toolbar .ms-card-print, .ms-card-toolbar > button { margin-left: -1px; }
/* «Изменить ▾ | Создать документ ▾ | Печать ▾ | Отправить ▾ | ЭДО ▾» — встык одной рамкой, как в карточке МойСклада
   (эталон ms_card_customerorder_ro, живая сверка 10.10.2026); скругление — только у крайних. */
.ms-card-toolbar > button.ms-btn, .ms-card-toolbar > :is(.ms-card-action-menu, .ms-card-print) > summary.ms-btn { margin-right: 0; border-radius: 0; }
.ms-card-pager + button.ms-btn, .ms-card-pager + :is(.ms-card-action-menu, .ms-card-print) > summary.ms-btn { margin-left: 10px; border-radius: 3px 0 0 3px; }
.ms-card-toolbar > button.ms-btn:has(+ .ms-card-owner), .ms-card-toolbar > :is(.ms-card-action-menu, .ms-card-print):has(+ .ms-card-owner) > summary.ms-btn { border-radius: 0 3px 3px 0; }
.ms-card-owner { margin-left: 25px; }
.ms-card-owner a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-card-reference { position: relative; width: max-content; }
.ms-card-reference-open { position: absolute; left: calc(100% + 5px); top: 3px; display: inline-flex; }
.ms-card-item-label, .ms-card-item-label:visited { color: inherit; text-decoration: none; }
.ms-card-item-label:hover { text-decoration: underline; }
.ms-card-live-notice { padding: 8px 0; color: #777; }
.ms-card-paid-documents, .ms-card-extra-table { border-collapse: collapse; min-width: 756px; font-size: 12px; }
.ms-card-paid-documents { min-width: 1165px; }
.ms-card-paid-documents th, .ms-card-extra-table th { text-align: left; font-weight: 400; color: #186999; padding: 7px 15px 7px 0; border-bottom: 1px solid #186999; }
.ms-card-paid-documents td, .ms-card-extra-table td { padding: 7px 15px 7px 0; border-bottom: 1px solid #ddd; }
.ms-card-paid-documents .ms-card-check span { display: none; }
.ms-card-main-details, .ms-card-extra { padding-top: 20px; overflow-x: auto; }
.ms-card-payment-tools { margin: 10px 0 8px; display: flex; gap: 10px; }
.ms-card-extra-tools { display: flex; gap: 15px; align-items: center; margin-bottom: 12px; color: #888; }
.ms-card-note-text { white-space: pre-wrap; max-width: 650px; overflow-wrap: anywhere; }
.ms-card-basis { display: flex; gap: 20px; margin-bottom: 20px; }
.ms-card-data-pager { margin: 16px 0; display: flex; gap: 10px; }
.ms-card-commission-totals { display: grid; grid-template-columns: max-content max-content; gap: 10px 35px; margin: 16px 0; }
.ms-card-commission-totals dd { margin: 0; text-align: right; }
.ms-card-stock-dialog { position: fixed; z-index: 1300; inset: 0; display: flex; align-items: center; justify-content: center; background: #0003; }
.ms-card-stock-panel { box-sizing: border-box; width: 710px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border: 1px solid #bbb; box-shadow: 0 5px 20px #0005; padding: 20px; color: #222; font: 12px Arial,sans-serif; }
.ms-card-stock-close { float: right; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.ms-card-stock-content h2 { margin: 0 25px 15px 0; font-size: 18px; font-weight: 400; }
.ms-card-stock-content p { color: #888; }
.ms-card-stock-content table { width: 100%; border-collapse: collapse; }
.ms-card-stock-content th { font-weight: 400; color: #186999; border-bottom: 2px solid #186999; }
.ms-card-stock-content td, .ms-card-stock-content th { padding: 8px 6px; text-align: right; }
.ms-card-stock-content td:first-child, .ms-card-stock-content th:first-child { text-align: left; }
.ms-card-stock-content td { border-bottom: 1px solid #ddd; }
.ms-card-stock-content tbody tr:hover { background: #fffb8c; }
.ms-card-type-enter .ms-card-column-1 > .ms-card-field, .ms-card-type-loss .ms-card-column-1 > .ms-card-field,
.ms-card-type-move .ms-card-column-1 > .ms-card-field, .ms-card-type-inventory .ms-card-column-1 > .ms-card-field,
.ms-card-type-internalorder .ms-card-column-1 > .ms-card-field { margin-bottom: 10px; }
.ms-card-type-paymentin, .ms-card-type-paymentout, .ms-card-type-cashin, .ms-card-type-cashout { --first-label: 127px; --second-label: 106px; }
.ms-card-type-paymentin .ms-card-column-1 > .ms-card-field, .ms-card-type-paymentout .ms-card-column-1 > .ms-card-field,
.ms-card-type-cashin .ms-card-column-1 > .ms-card-field, .ms-card-type-cashout .ms-card-column-1 > .ms-card-field { margin-bottom: 10px; }
.ms-card-field-money .ms-card-input { width: 104px !important; text-align: right; }
.ms-card-type-counterpartyadjustment { --second-label: 140px; }
.ms-card-type-bonustransaction { --second-label: 136px; }
.ms-card-type-bonustransaction .ms-card-column-1 > .ms-card-field, .ms-card-type-counterpartyadjustment .ms-card-column-1 > .ms-card-field { margin-bottom: 10px; }
.ms-card-type-commissionreportout { --first-label: 120px; --third-label: 130px; }
@media print { .ms-card-action-menu, .ms-card-payment-tools, .ms-card-extra-tools, .ms-card-reference-open, .ms-card-stock-dialog { display: none !important; } }

.ms-card-status-toggle { list-style: none; cursor: pointer; }
.ms-card-status-toggle::-webkit-details-marker { display: none; }
.ms-card-status-toggle .ms-card-state::after { content: ""; display: inline-block; margin-left: 10px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.ms-card-type-bonustransaction { --first-label: 126px; --second-label: 104px; }
.ms-card-field-number .ms-card-input { width: 104px !important; text-align: right; }

.ms-card-add-position { display: flex; align-items: center; gap: 20px; height: 36px; margin-left: -30px; padding: 0 30px; border-bottom: 1px solid #186999; }
.ms-card-add-position input { box-sizing: border-box; width: 507px; height: 23px; border: 1px solid #ccc; background: #fafafa; color: #999; font: italic 12px Arial,sans-serif; }
.ms-card-add-position > button:last-child { margin-left: auto; }
.ms-card-modern .ms-card-add-position { margin-left: 0; padding: 0; border-color: #eef1f6; height: 30px; }
.ms-card-modern .ms-card-add-position input { width: 560px; border-radius: 8px; padding: 0 10px; font: 12px var(--card-font); }
.ms-card-price-actions { display: flex; align-items: center; gap: 0; width: 268px; flex: none; }
.ms-card-price-actions button { padding: 0 10px; border: 0; border-right: 1px solid #ddd; color: #8fa8c1; font: 12px/18px var(--card-font); background: transparent; }
.ms-card-lower-blocks { padding-top: 55px; }
.ms-card-lower-block { min-height: 54px; margin-bottom: 22px; }
.ms-card-lower-title { display: inline-block; color: #e4540b; margin: 0 20px 0 -15px; text-decoration: none; }
.ms-card-lower-title:hover { text-decoration: none; }
.ms-card-lower-title::before { content: ''; display: inline-block; margin-right: 6px; border: 4px solid transparent; border-top: 6px solid #e4540b; border-bottom: 0; vertical-align: 2px; }
.ms-card-lower-add { gap: 4px; }
.ms-card-lower-block p { margin: 6px 0; font-size: 10px; color: #999; }
/* «Нет задач», список задач и таблица файлов — как внизу карточки МойСклада (живая сверка 10.10.2026). */
.ms-card-lower-block .ms-card-lower-empty { margin: 8px 0 0; font-size: 11px; color: #999; }
.ms-card-lower-tasks { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; }
.ms-card-lower-tasks li { margin: 0 0 4px; }
.ms-card-lower-tasks li span { margin-left: 10px; color: #777; }
.ms-card-lower-files { width: 757px; margin-top: 12px; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.ms-card-lower-files th { padding: 0 0 4px; border-bottom: 2px solid #4a98c6; color: #2a7ab0; font-weight: 400; text-align: left; white-space: nowrap; }
.ms-card-lower-files th:first-child { width: 299px; padding-left: 41px; }
.ms-card-lower-files th:nth-child(2) { width: 62px; }
.ms-card-lower-files th:nth-child(3) { width: 172px; }
.ms-card-lower-files td { padding: 5px 0; border-bottom: 1px solid #e6e6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-card-lower-files td:first-child { padding-left: 41px; }
.ms-card-lower-pager { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: 11px; color: #222; }
.ms-card-lower-pager > span:nth-child(3) { margin: 0 25px 0 23px; }
.ms-card-lower-page { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 12px; height: 12px; border: 1px solid #ddd; color: #ccc; font-size: 9px; line-height: 1; }
/* Волна 35: у формы правки заголовок блока сворачивает его, как у МойСклада; файлы своей записи (DocFiles) загружаются
   и удаляются прямо в блоке — обёртка doc_files.php (вид lower) не рисует своей рамки. */
button.ms-card-lower-title { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.ms-card-lower-title::before { transition: transform .12s; }
.ms-card-lower-block.is-collapsed .ms-card-lower-title::before { transform: rotate(-90deg); }
.ms-card-lower-block.is-collapsed > :not(.ms-card-lower-title):not(.ms-card-lower-add):not(.ms-card-lower-files-root),
.ms-card-lower-block.is-collapsed .ms-card-lower-files-root > :not(.ms-card-lower-add) { display: none; }
.ms-card-lower-files-root { display: contents; }
.ms-card-lower-block .ms-card-lower-status { margin: 8px 0 0; color: #555; font-size: 11px; }
.ms-card-lower-block .ms-card-lower-status:empty { display: none; }
.ms-card-lower-files th:nth-child(5) { width: 24px; }
.ms-card-lower-delete { width: 18px; height: 18px; padding: 0; border: 0; background: none; color: #999; font: 14px/18px Arial, sans-serif; cursor: pointer; }
.ms-card-lower-delete:hover, .ms-card-lower-delete:focus-visible { color: #e4540b; }
/* Как у МойСклада: блоки видны только на «Главной» — на «Связанных документах» формы их нет. */
.ms-docedit:has([data-docedit-panel="positions"][hidden]) .ms-card-lower-blocks { display: none; }
.ms-card-type-loss { --second-label: 110px; --ms-card-comment-width: 503px; }
.ms-card-type-enter { --ms-card-comment-width: 503px; }
.ms-card-type-internalorder { --first-label: 120.66px; --ms-card-comment-width: 568px; }
.ms-card-type-move { --second-label: 74px; }
/* Узкий экран (до 900 px, 13.10.2026): страница карточки без выхода вбок. Выводили её строка «Добавить позицию» (ряд не уже
   700 px), таблица «Файлы» под документом старого вида (757 px по МойСкладу: ширина страницы 773–777 px на 375 и 600 px),
   строка вкладок (у заказа с «Проверить комплектацию…» — 1102 px) и таблица «Связанных документов» (не уже 800 px). Поле
   добавления — во всю строку, кнопки переносятся; файлы — списком, как «Задачи» рядом: имя во всю ширину (переносится, не
   режется), под ним серым размер, дата и сотрудник, «×» — в конце строки; вкладки листаются в своей строке, как у формы;
   таблицы связей — по ширине экрана, а что шире (возврат комиссионера на 320 px) — листается в своём блоке. Итоги (340 px)
   на 320 px уходили за ЛЕВЫЙ край (прижаты вправо) — «Промежуточный итог» не читался: не шире строки. Широкий экран — как был. */
@media (max-width: 900px) {
  .ms-page-card .ms-card-totals { max-width: 100%; }
  .ms-card-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .ms-card-modern .ms-card-tabs { border-bottom: 0; box-shadow: inset 0 -1px #ced7e3; }
  .ms-card-modern .ms-card-tab::after { bottom: 0; }
  .ms-card-linked { overflow-x: auto; }
  .ms-card-linked table { min-width: 0; }
  .ms-page-card .ms-card-add-position { flex-wrap: wrap; gap: 6px 10px; height: auto; min-height: 36px; margin: 0; padding: 6px 0; }
  .ms-page-card .ms-card-add-position input { flex: 1 1 240px; width: auto; min-width: 0; }
  .ms-page-card .ms-card-add-position > button:last-child { margin-left: 0; }
  .ms-card-modern .ms-card-price-actions { display: none; }
  .ms-card-lower-files, .ms-card-lower-files > thead, .ms-card-lower-files > thead > tr, .ms-card-lower-files > tbody { display: block; width: auto; }
  .ms-card-lower-files th { display: none; }
  .ms-card-lower-files th:first-child { display: block; width: auto; padding-left: 0; }
  .ms-card-lower-files > tbody > tr { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) max-content; align-items: center; column-gap: 12px; padding: 5px 0; border-bottom: 1px solid #e6e6e6; }
  .ms-card-lower-files td { padding: 0; border: 0; color: #777; }
  .ms-card-lower-files td:first-child { grid-column: 1 / -1; padding: 0 0 3px; color: #222; white-space: normal; overflow-wrap: anywhere; }
  .ms-card-lower-files td:nth-child(2)::after { content: '\00a0МБ'; }
}
@media print { .ms-card-add-position, .ms-card-price-actions, .ms-card-lower-blocks { display: none; } }

.ms-card-heading .ms-card-status-toggle .ms-btn { height: 22px; min-height: 0; line-height: 22px; padding-top: 0; padding-bottom: 0; }
.ms-card-classic .ms-card-column-2 { margin-left: 3px; }

.ms-card-type-inventory .ms-card-position-tools { position: static; height: 30px; margin: 8px 0; }
.ms-card-type-inventory .ms-card-table th.ms-card-cell-name, .ms-card-type-inventory .ms-card-table th.ms-card-cell-seq { font-size: 12px; }

/* Замеры Q3: сохраняем место действий и размеры старого редактора (27.09.2026). */
.ms-card-toolbar > .ms-card-save { box-sizing: border-box; width: 81.64px; height: 28px; margin: 0 10px 0 0; }
.ms-card-bonus-status { cursor: default; }
.ms-card-type-paymentin .ms-card-fields .ms-card-textarea,
.ms-card-type-paymentout .ms-card-fields .ms-card-textarea,
.ms-card-type-cashin .ms-card-fields .ms-card-textarea,
.ms-card-type-cashout .ms-card-fields .ms-card-textarea { height: 42px; }
.ms-card-type-paymentin .ms-card-tabs, .ms-card-type-paymentout .ms-card-tabs,
.ms-card-type-cashin .ms-card-tabs, .ms-card-type-cashout .ms-card-tabs { margin-top: 26px; }
.ms-card-classic .ms-card-table th.ms-card-cell-name { padding-left: 0; overflow: visible; }
.ms-card-classic .ms-card-table th.ms-card-cell-price { overflow: visible; }
.ms-card-column-choice { position: relative; display: inline-block; vertical-align: middle; font-size: 12px; }
.ms-card-column-choice summary { list-style: none; }
.ms-card-column-choice summary::-webkit-details-marker { display: none; }
.ms-page-card .ms-card-name-button, .ms-page-card .ms-card-price-button, .ms-page-card .ms-card-reward-button { box-sizing: border-box; height: 23px; min-height: 0; margin: 0; padding: 0 8px; font-size: 11px; color: #186999; background: #fff; }
.ms-page-card .ms-card-name-button { width: 112.27px; }
.ms-page-card .ms-card-price-button { width: 62.45px; }
.ms-card-column-choice .ms-card-action-options { top: 23px; font-size: 12px; text-align: left; }
.ms-card-column-choice .ms-card-action-options button:not(:disabled) { color: #222; cursor: pointer; }
.ms-card-column-choice .ms-card-action-options button:not(:disabled):hover,
.ms-card-column-choice .ms-card-action-options button:not(:disabled):focus { background: #dcdcdc; }
.ms-card-column-choice .ms-card-search { width: 260px; margin: 5px 10px; }
@media print { .ms-card-column-choice { display: none; } }

.ms-card-type-enter .ms-card-fields .ms-card-field:last-child,
.ms-card-type-loss .ms-card-fields .ms-card-field:last-child,
.ms-card-type-move .ms-card-fields .ms-card-field:last-child,
.ms-card-type-inventory .ms-card-fields .ms-card-field:last-child,
.ms-card-type-internalorder .ms-card-fields .ms-card-field:last-child { margin-bottom: 0; }

.ms-card-classic .ms-card-column-choice { top: 2px; }

/* w25-e1 begin: document form */
/* w25-e1: общие вкладки формы; таблица и поля принадлежат редактору. */
[data-doc-form-tabs] { display: flex; gap: 0; }
[data-doc-form-tabs] .ms-docedit-tab { display: inline-flex; align-items: center; gap: 7px; }
[data-doc-form-tabs] .ms-docedit-tab:focus-visible { outline: 2px solid #629bca; outline-offset: -2px; }
.ms-doc-form-panel { padding: 16px 12px; }
.ms-doc-form-panel[hidden], [data-docedit-form-limit][hidden] { display: none !important; }
.ms-doc-form-panel h2 { font-size: 16px; font-weight: 400; }
.ms-doc-form-panel .ms-card-extra-table { width: 100%; }

/* w25-e1 end: document form */

/* Волна 33 (эталон карточки только для чтения ms_card_customerorder_ro и живая сверка 10.10.2026): справа от вкладок —
   «Проверить комплектацию», «Импортировать», «Добавить из справочника», у подписей «Наименование», «Цена», «Скидка» — стрелка,
   в строке — «···», перед «Добавить позицию» — «+». Всё на месте и неактивно; дата без рамки, «Сохранить» нет — как у эталона. */
.ms-card-tab-actions { display: inline-flex; align-items: center; gap: 16px; margin-left: auto; align-self: center; padding-bottom: 8px; font: 400 14px/20px var(--card-font); }
.ms-card-tab-action { color: #9fb3c8; cursor: default; white-space: nowrap; }
.ms-card-tab-add { height: 28px; padding: 0 12px; border: 1px solid #c1cce5; border-radius: 8px; background: #fff; color: #9fb3c8; font: 400 14px/normal var(--card-font); white-space: nowrap; }
.ms-card-modern th .ms-card-cell-inner:has(.ms-card-head-chevron) { position: relative; padding-right: 22px; }
.ms-card-head-chevron { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; color: #8a96a3; }
.ms-card-head-chevron > svg { width: 10px; height: 10px; }
.ms-card-modern td.ms-card-cell-name .ms-card-cell-inner { position: relative; padding-right: 30px; }
.ms-card-row-menu { position: absolute; right: 8px; top: 4px; color: #8a96a3; letter-spacing: 1px; line-height: 20px; cursor: default; }
.ms-card-add-plus { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: -12px; color: #9fb3c8; }
.ms-card-modern .ms-card-table [data-card-stock] { color: inherit; text-decoration: none; }
