/* Прежние страницы Свода, переведённые на общие элементы A11.
 * Свои правила, замер ms_customerorder: заголовок 20/24, фильтр #e3e3e3,
 * таблица Tahoma 11, строка 30, нижняя линия #ddd, шапка 2px #186999.
 * Область .legacy и переменные старого svod.css здесь не используются.
 * Шаблоны работают без прежней обёртки; состояния сверены с каталогом A13.
 */
.ms-legacy-page { margin: 0; padding: 25px 20px 30px; min-width: 0; color: #222; background: #fff; font: 400 12px/normal "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
.ms-legacy-page .ms-legacy-head { position: relative; display: flex; align-items: flex-start; gap: 20px; min-height: 31px; margin: 0 0 5px; padding: 0 0 0 25px; }
.ms-legacy-page .ms-legacy-head > div:first-of-type { min-width: 0; }
.ms-legacy-page h1 { margin: 2px 0 0; padding: 0; color: #222; font-size: 20px; font-weight: 700; line-height: 24px; }
.ms-legacy-page h2 { margin: 0 0 8px; font-size: 16px; line-height: 20px; font-weight: 700; }
.ms-legacy-page h3 { margin: 0 0 8px; font-size: 13px; line-height: 18px; font-weight: 700; }
.ms-legacy-page p { margin: 0 0 10px; line-height: 1.4; }
.ms-legacy-page p:last-child { margin-bottom: 0; }
.ms-legacy-page .ms-legacy-head p, .ms-legacy-page .ms-legacy-head .ms-legacy-sub { margin: 5px 0 10px; font-size: 12px; line-height: 16.8px; }
.ms-legacy-page .ms-legacy-help { position: absolute; top: 6.5px; left: 0; }
.ms-legacy-page .ms-legacy-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0 0 0 auto; min-height: 28px; }
.ms-legacy-page .ms-legacy-toolbar > .ms-btn:last-child { margin-right: 0; }
.ms-legacy-muted { color: #777; }
.ms-legacy-small { font-size: 11px; }
.ms-legacy-nowrap { white-space: nowrap; }
.ms-legacy-mono { font-family: Consolas, "Courier New", monospace; font-size: 11px; }
.ms-legacy-page .ms-legacy-big { font-size: 16px; line-height: 22px; }
.ms-legacy-page .ms-legacy-grid { display: grid; gap: 15px; min-width: 0; }
.ms-legacy-page .ms-legacy-grid > * { min-width: 0; }
.ms-legacy-page .ms-legacy-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-legacy-page .ms-legacy-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-legacy-page .ms-legacy-panel { margin: 0 0 15px; padding: 14px 15px 15px 20px; border: 0; border-radius: 3px; background: #e3e3e3; box-shadow: none; }
.ms-legacy-page .ms-legacy-compact { padding: 10px 15px 10px 20px; }
.ms-legacy-page .ms-legacy-panel:has(> form[method="get"]) { padding: 4px 15px 10px 20px; }
.ms-legacy-page .ms-legacy-panel.ms-legacy-flush { padding: 0; border: 0; border-radius: 0; background: #fff; }
.ms-legacy-page .ms-legacy-block-title { padding: 10px 10px 5px; }
.ms-legacy-page .ms-legacy-block-title h2 { margin-bottom: 5px; }
.ms-legacy-page .ms-legacy-tile { display: block; padding: 15px 20px; border: 1px solid #d6d6d6; border-radius: 3px; background: #e3e3e3; color: #222; text-decoration: none; }
.ms-legacy-page a.ms-legacy-tile:hover { text-decoration: none; }
.ms-legacy-page a.ms-legacy-tile:hover .ms-legacy-label, .ms-legacy-page a.ms-legacy-tile:hover .ms-legacy-tile-title { color: #f88001; text-decoration: underline; }
.ms-legacy-page a.ms-legacy-tile:active .ms-legacy-label, .ms-legacy-page a.ms-legacy-tile:active .ms-legacy-tile-title { text-decoration: none; }
.ms-legacy-page .ms-legacy-tile .ms-legacy-label { font-size: 12px; line-height: 17px; }
.ms-legacy-page a.ms-legacy-tile .ms-legacy-label { color: #186999; }
.ms-legacy-page .ms-legacy-tile .ms-legacy-value { margin: 5px 0; font-size: 24px; line-height: 29px; font-weight: 700; }
.ms-legacy-page .ms-legacy-tile .ms-legacy-sub { color: #777; font-size: 11px; line-height: 16px; }
.ms-legacy-page .ms-legacy-field { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; margin: 6px 0 0; }
.ms-legacy-page .ms-legacy-field > .ms-field-label { white-space: normal; }
.ms-legacy-page .ms-legacy-field > .ms-input { width: 244px; max-width: calc(100% - 6px); }
.ms-legacy-page .ms-legacy-field > .ms-select { max-width: 100%; }
.ms-legacy-page .ms-legacy-field > input[type="datetime-local"] { width: 244px; }
.ms-legacy-page .ms-legacy-range { width: 250px; max-width: 100%; }
.ms-legacy-page .ms-legacy-range > .ms-date { min-width: 0; }
.ms-legacy-page .ms-legacy-range > span:not(.ms-date) { flex-shrink: 0; }
.ms-legacy-page .ms-legacy-panel .ms-legacy-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 1848px; gap: 8px 14px; align-items: start; }
.ms-legacy-page .ms-legacy-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.ms-legacy-page .ms-legacy-inline { display: inline; margin: 0; }
.ms-legacy-page .ms-legacy-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ms-legacy-page .ms-legacy-chips .ms-chip { margin: 0; }
.ms-legacy-page .ms-legacy-pill { display: inline-block; padding: 1px 6px 2px; border: 0; border-radius: 2px; background: #e3e3e3; color: #555; font: 400 11px/14px Tahoma, Geneva, sans-serif; }
.ms-legacy-page .ms-legacy-pill.ok { background: #88af60; color: #fff; }
.ms-legacy-page .ms-legacy-pill.warn, .ms-legacy-page .ms-legacy-pill.bad { background: #ffc; color: #685e20; }
.ms-legacy-notice { margin: 0 0 15px; padding: 10px 15px; border: 0; border-radius: 3px; background: #ffc; color: #222; font: 400 12px/1.4 "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
.ms-legacy-notice a { color: #186999; text-decoration: underline; }
.ms-legacy-page .ms-legacy-empty { padding: 30px 20px; text-align: center; color: #222; }
.ms-legacy-page .ms-legacy-empty .ms-legacy-big { margin-bottom: 8px; }
.ms-legacy-page .ms-legacy-tablewrap { overflow-x: auto; max-width: 100%; padding: 0 10px; }
.ms-legacy-page .ms-legacy-panel:not(.ms-legacy-flush) > .ms-legacy-tablewrap { padding: 0; }
.ms-legacy-page .ms-legacy-table { width: 100%; margin: 0; padding: 0; border: 0; border-collapse: collapse; border-spacing: 0; color: #222; background: #fff; font: 400 11px/normal Tahoma, Geneva, sans-serif; }
.ms-legacy-page .ms-legacy-table th { height: 30px; padding: 0 10px; border: 0; border-top: 1px solid #fff; border-bottom: 2px solid #186999; color: #333; background: #fff; font: 400 11px/normal Tahoma, Geneva, sans-serif; text-align: left; vertical-align: middle; white-space: nowrap; }
.ms-legacy-page .ms-legacy-table td { height: 30px; padding: 0 10px; border: 0; border-bottom: 1px solid #ddd; color: #222; background: transparent; font: 400 11px/normal Tahoma, Geneva, sans-serif; vertical-align: middle; white-space: nowrap; }
.ms-legacy-page .ms-legacy-table th:first-child, .ms-legacy-page .ms-legacy-table td:first-child { padding-left: 0; }
.ms-legacy-page .ms-legacy-table th:last-child, .ms-legacy-page .ms-legacy-table td:last-child { padding-right: 0; }
.ms-legacy-page .ms-legacy-table td.ms-legacy-muted { color: #777; }
.ms-legacy-page .ms-legacy-table .ms-legacy-num { text-align: right; white-space: nowrap; }
.ms-legacy-page .ms-legacy-table a:not(.ms-btn):not(.ms-chip) { line-height: 15.4px; }
.ms-legacy-page .ms-legacy-table th:has(a) { color: #186999; }
.ms-legacy-page .ms-legacy-table th a { text-decoration: none; }
.ms-legacy-page .ms-legacy-table tr.is-selected > td { background: #e4f1fa; }
.ms-legacy-page .ms-legacy-table tbody tr:not(.ms-legacy-editor-row):not(:has(.ms-legacy-empty)):hover > td { background: #fffb8c; }
.ms-legacy-page .ms-legacy-table tr[data-list-row-href], .ms-legacy-page .ms-legacy-table tr[data-list-row-href] > td { cursor: pointer; }
.ms-legacy-page .ms-legacy-table tr.is-current > td { background: #dff3df !important; }
.ms-legacy-page .ms-legacy-table tr.ms-legacy-total > td { background: #ededed !important; font-weight: 700; cursor: auto; }
.ms-legacy-page .ms-legacy-table tr.ms-legacy-editor-row > td { white-space: normal; }
.ms-legacy-page .ms-legacy-table .ms-legacy-empty { white-space: normal; }
.ms-legacy-page .ms-legacy-table .ms-legacy-delta.up { color: #619045; }
.ms-legacy-page .ms-legacy-table .ms-legacy-delta.down { color: #c33; }
.ms-legacy-page .ms-legacy-link-button { margin: 0; padding: 0 3px; border: 0; background: transparent; color: #186999; font: inherit; cursor: pointer; }
.ms-legacy-page .ms-legacy-link-button:hover, .ms-legacy-page .ms-legacy-link-button:focus { color: #f88001; outline: none; }
.ms-legacy-page .ms-legacy-pricecards { min-width: 980px; }
.ms-legacy-page .ms-legacy-pricecards td { padding-top: 5px; padding-bottom: 5px; }
.ms-legacy-page .ms-legacy-pricecards .ms-legacy-supplier { margin: 0; }
.ms-legacy-page .ms-legacy-pricecards .ms-legacy-command { width: 150px; }
.ms-legacy-page .ms-legacy-pricecards form { margin: 0; }
.ms-legacy-page .ms-legacy-pricecards form.ms-legacy-chips { display: block; }
.ms-legacy-page .ms-legacy-suppliers { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; }
.ms-legacy-page .ms-legacy-pricecards td:first-child { min-width: 180px; }
.ms-legacy-page .ms-legacy-thumb { display: block; width: 120px; height: 80px; margin: 5px 0; border: 1px solid #ddd; border-radius: 0; box-shadow: none; }
.ms-legacy-page .ms-legacy-tagrows { min-width: 900px; }
.ms-legacy-page .ms-legacy-tagrows .ms-legacy-was { color: #c78700; }
.ms-legacy-page .ms-legacy-tagbar { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; padding: 8px 10px; }
/* «Добавить ценник» (30.09.2026): поле вне формы печати, список — как выпадающие поля МойСклада (m_lookup.css). */
.ms-legacy-page .ms-legacy-tagadd > .ms-field-label { display: block; margin-bottom: 4px; }
.ms-legacy-page .ms-legacy-tagadd-row { display: flex; gap: 5px 10px; align-items: center; flex-wrap: wrap; }
.ms-legacy-page .ms-legacy-tagadd-box { position: relative; display: block; width: 420px; max-width: 100%; }
.ms-legacy-page .ms-legacy-tagadd-box > .ms-input { box-sizing: border-box; width: 100%; }
.ms-legacy-page .ms-legacy-tagadd-list { max-height: 330px; }
.ms-legacy-page .ms-legacy-tagadd-list .ms-lookup-option { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 3px 6px; white-space: normal; }
.ms-legacy-page .ms-legacy-tagadd-list .ms-lookup-option > span:last-child { min-width: 0; }
.ms-legacy-page .ms-legacy-tagadd-list .ms-lookup-option small { display: block; color: #777; font-size: 11px; line-height: 14px; }
.ms-legacy-page .ms-legacy-tagadd-list .ms-lookup-option small.is-out { color: #c78700; }
.ms-legacy-page .ms-legacy-tagadd-img { flex: none; display: block; width: 54px; height: 36px; border: 1px solid #ddd; background: #fff; }
/* только что добавленная строка — зелёная подсветка «выделено» МойСклада; жёлтая занята наведением мыши */
.ms-legacy-page .ms-legacy-table tbody tr.is-flash > td { background: #dff3df; }
.ms-legacy-page .ms-legacy-selcount { font-weight: 700; }
.ms-legacy-page .ms-legacy-once { display: inline-block; margin: 10px 0; padding: 5px 10px; background: #fff; font: 18px/24px Consolas, monospace; }
.ms-legacy-page .ms-legacy-password-panel { max-width: 520px; }
.ms-legacy-page .ms-legacy-password-panel .ms-legacy-field { margin-bottom: 10px; }
.ms-legacy-page details > summary { color: #186999; cursor: pointer; line-height: 20px; }
.ms-legacy-embed { margin: 0; padding: 0; }
.ms-legacy-embed > .ms-legacy-panel { margin: 25px 20px; padding: 20px; border-radius: 3px; background: #e3e3e3; text-align: center; }
.ms-legacy-embed > .ms-legacy-notice { margin: 10px 20px; }
.ms-legacy-embed .ms-legacy-big { margin-bottom: 8px; font-size: 16px; line-height: 22px; }
.ms-legacy-login { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; padding: 40px 20px; background: #f3f3f3; color: #222; font: 400 12px/normal "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
.ms-legacy-login .ms-legacy-login-panel { box-sizing: border-box; width: 380px; max-width: 100%; padding: 30px 35px; border: 1px solid #ddd; border-radius: 3px; background: #fff; box-shadow: 0 1px 3px #ddd; }
.ms-legacy-login .ms-legacy-login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ms-legacy-login .ms-legacy-login-brand > span { display: flex; width: 42px; height: 42px; color: #fff; background: #1f75a8; }
.ms-legacy-login .ms-legacy-login-brand h1 { margin: 0; color: #1f75a8; font-size: 28px; line-height: 36px; font-weight: 700; }
.ms-legacy-login .ms-legacy-login-caption { margin: 10px 0 25px; text-align: center; color: #777; }
.ms-legacy-login .ms-legacy-field { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 15px; }
.ms-legacy-login .ms-input { box-sizing: border-box; width: 100%; height: 28px; padding: 5px; }
.ms-legacy-login .ms-btn-green { box-sizing: border-box; width: 100%; height: 28px; margin: 5px 0 0; }
.ms-legacy-login .ms-legacy-login-note { margin: 22px 0 0; color: #777; font-size: 11px; line-height: 16px; text-align: center; }

/* Ссылки старого интерфейса не становятся фиолетовыми; нажатие снимает подчёркивание. */
.ms-legacy-page a:where(:not(.ms-btn):not(.ms-chip):not(.ms-legacy-tile)), .ms-legacy-embed > :is(.ms-legacy-panel, .ms-legacy-notice) a { color: #186999; text-decoration: underline; }
.ms-legacy-page a:where(:not(.ms-btn):not(.ms-chip):not(.ms-legacy-tile)):visited, .ms-legacy-embed > :is(.ms-legacy-panel, .ms-legacy-notice) a:visited { color: #186999; }
.ms-legacy-page a:where(:not(.ms-btn):not(.ms-chip):not(.ms-legacy-tile)):hover, .ms-legacy-embed > :is(.ms-legacy-panel, .ms-legacy-notice) a:hover { color: #f88001; }
.ms-legacy-page a:where(:not(.ms-btn):not(.ms-chip):not(.ms-legacy-tile)):active, .ms-legacy-embed > :is(.ms-legacy-panel, .ms-legacy-notice) a:active { text-decoration: none; }
.ms-legacy-page a:focus { outline: none; }
.ms-legacy-page .ms-legacy-table td, .ms-legacy-page .ms-legacy-tile, .ms-legacy-notice, .ms-legacy-page .ms-legacy-empty { transition: none; animation: none; }
.ms-legacy-page .ms-legacy-toolbar { flex-shrink: 0; flex-wrap: nowrap; }
.ms-legacy-page .ms-legacy-periods { max-width: 100%; overflow-x: auto; white-space: nowrap; }
.ms-legacy-page .ms-legacy-periods > .ms-btn { flex-shrink: 0; }
.ms-legacy-page .ms-legacy-table th:has(a):hover { border-top-color: #186999; }
.ms-legacy-page .ms-legacy-table td p { white-space: normal; }

/* Листы А4, картинки и миллиметры задаёт только tags_print.php. Эти правила — исключительно экранная панель. */
@media screen {
  .ms-legacy-print .bar { min-height: 31px; padding: 15px 20px; gap: 10px; color: #222; background: #e3e3e3; border-bottom: 1px solid #ccc; font: 400 12px/normal "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
  .ms-legacy-print .bar .ms-btn { height: 26px; padding: 0 10px; border: 1px solid #ccc; border-radius: 3px; color: #222; background: linear-gradient(to bottom, #fff, #e6e6e6); font: 400 12px/normal "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
  .ms-legacy-print .bar .ms-btn:hover { background: linear-gradient(to bottom, #fff, #f7f7f7); }
  .ms-legacy-print .bar .ms-btn:active { background: #f2f2f2; }
  .ms-legacy-print .bar .hint { color: #777; font-size: 11px; opacity: 1; }
}
@media (max-width: 899px) {
  .ms-legacy-page { padding: 20px 12px; }
  .ms-legacy-page .ms-legacy-head { flex-wrap: wrap; gap: 5px 15px; }
  .ms-legacy-page .ms-legacy-toolbar { margin-left: 0; }
  .ms-legacy-page .ms-legacy-c2, .ms-legacy-page .ms-legacy-c3 { grid-template-columns: 1fr; }
  .ms-legacy-page .ms-legacy-panel .ms-legacy-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .ms-legacy-page .ms-legacy-table:not(.ms-legacy-pricecards):not(.ms-legacy-tagrows) { min-width: 620px; }
  .ms-legacy-page .ms-legacy-panel { padding-left: 12px; padding-right: 12px; }
  .ms-legacy-page .ms-legacy-panel.ms-legacy-flush { padding: 0; }
  .ms-legacy-page .ms-legacy-tablewrap { padding: 0; }
  .ms-legacy-page form.ms-legacy-inline { max-width: 100%; flex-wrap: wrap; }
  .ms-legacy-page .ms-legacy-password-panel .ms-btn { max-width: calc(100% - 22px); height: auto; min-height: 26px; white-space: normal; }
  .ms-legacy-login .ms-legacy-login-panel { padding: 25px; }
}
@media print {
  .ms-legacy-page { padding: 0; }
  .ms-legacy-page .ms-legacy-toolbar, .ms-legacy-page .ms-legacy-help { display: none; }
  .ms-legacy-page .ms-legacy-tablewrap { overflow: visible; }
}
/* Импорт справочников: тот же загрузчик, что у импорта документов. */
.ms-legacy-import input[type="file"] { box-sizing: border-box; height: 28px; max-width: 100%; font: 12px/20px "Helvetica Neue", Helvetica, Arial, sans-serif; }
.ms-legacy-import input[type="file"]::file-selector-button { box-sizing: border-box; height: 28px; padding: 0 12px; margin-right: 8px; border: 1px solid #ccc; border-radius: 3px; background: linear-gradient(#fff, #e5e5e5); color: #333; font: inherit; cursor: pointer; }
