/* A7. Собственные правила по замерам ms_good и ms_good_card, без ресурсов МойСклада. */
.ms-page-goods,.ms-page-goods-card { font:12px/normal "Helvetica Neue",Helvetica,Arial,sans-serif; color:#222; }
.ms-page-goods button,.ms-page-goods input,.ms-page-goods select,.ms-page-goods-card input,.ms-page-goods-card textarea { font-family:inherit; }
.ms-goods-toolbar { display:flex; align-items:center; gap:0; min-height:28px; padding:25px 20px 33px; white-space:nowrap; }
.ms-goods-toolbar h1 { margin:0 10px 0 12px; font-size:20px; line-height:24px; font-weight:700; }
.ms-goods-toolbar>.ms-help { margin:0; width:13px; height:13px; padding:0; font-size:10px; }
.ms-goods-toolbar>.ms-refresh { margin:0 10px 0 0; width:10px; }
.ms-goods-toolbar .ms-btn { margin-right:10px; }
.ms-goods-toolbar>a.ms-btn[aria-expanded] { padding-left:13px; padding-right:13px; }
.ms-goods-toolbar .ms-goods-plus { width:14px; height:14px; }
.ms-goods-plus { display:inline-flex; width:13px; height:13px; border-radius:50%; background:#29a2d4; color:white; font:bold 15px/13px Arial; align-items:center; justify-content:center; }
.ms-goods-plus.service { background:#efa900; }
.ms-goods-search { position:relative; margin:0 15px 0 5px; display:flex; }
.ms-goods-search>.ms-input { width:197px; height:17px; padding:1px 3px; font-size:12px; }
.ms-goods-search-submit { position:absolute; right:0; top:1px; width:18px; height:19px; padding:0; border:0; background:#fff; color:#999; opacity:0; }
.ms-goods-search:focus-within .ms-goods-search-submit { opacity:1; }
.ms-goods-selection { height:26px; width:47px; border:1px solid #ccc; border-radius:3px 0 0 3px; display:flex; align-items:center; justify-content:center; color:#888; }
.ms-goods-actions { display:flex; margin-right:0; }
.ms-goods-actions .ms-btn { border-left:0; border-radius:0; margin-right:0; }
.ms-goods-toolbar>[data-ms-menu="goods-print"] { border-left:0; border-radius:0 3px 3px 0; }
/* Фильтр как у МойСклада (волна 33, живая сверка 10.10.2026): сетка, поля и метки закладок — общие с фильтром списков
   документов (list.css: .ms-list-filter, 264 точки на поле, семь столбцов на широком экране). */
.ms-page-goods { --ms-list-filter-cols:7; }
/* Место панели — как у МойСклада при 2048 точках: x 20, на 10 точек ниже заголовка, дерево и список — на 25 ниже панели. */
.ms-goods-filter { margin:-25px 0 25px 20px; }
.ms-goods-filter .ms-lookup { width:100%; min-width:0; }
.ms-goods-field-plain [data-ms-lookup-open] { display:none; }
@media (max-width:1902px) { .ms-page-goods { --ms-list-filter-cols:6; } }
@media (max-width:1638px) { .ms-page-goods { --ms-list-filter-cols:5; } }
@media (max-width:1100px) { .ms-page-goods { --ms-list-filter-cols:4; } }
@media (max-width:884px) { .ms-page-goods { --ms-list-filter-cols:3; } }
@media (max-width:720px) { .ms-page-goods { --ms-list-filter-cols:2; } }
@media (max-width:520px) { .ms-page-goods { --ms-list-filter-cols:1; } }
.ms-goods-body { display:flex; align-items:flex-start; gap:44px; margin:0 66px 30px 16px; }
.ms-goods-tree { width:290px; min-width:290px; }
.ms-goods-tree a { text-decoration:none; line-height:16px; }
.ms-goods-tree-root { display:block; padding:8px 24px; min-height:16px; position:relative; }
.ms-goods-tree-root.on,.ms-goods-tree-node.on>.ms-goods-tree-row { background:#e4f1fa; }
.ms-goods-tree-root.on { clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%); }
.ms-goods-tree-row { display:flex; align-items:center; min-height:32px; padding-left:calc(30px + var(--goods-depth,0)*16px); padding-right:12px; }
.ms-goods-tree-row:hover { background:transparent; }
.ms-goods-tree a, .ms-goods-tree a:hover, .ms-goods-tree a:active, .ms-goods-tree a:visited { color:#186999; text-decoration:none; }
.ms-goods-tree-node.on>.ms-goods-tree-row { clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%); }
.ms-goods-tree-row>a:not(.ms-goods-folder-edit) { flex:1; }
.ms-goods-branch { border:0; padding:0; width:18px; min-width:18px; height:24px; background:none; color:#86b4c7; cursor:pointer; font-size:13px; }
.ms-goods-folder-edit { visibility:hidden; padding-left:6px; color:#5493b8; }
.ms-goods-tree-row:hover .ms-goods-folder-edit,.ms-goods-tree-node.on>.ms-goods-tree-row .ms-goods-folder-edit,.ms-goods-folder-edit:focus { visibility:visible; }
.ms-goods-list { flex:1; min-width:0; }
.ms-goods-table-scroll { overflow-x:auto; overflow-y:visible; padding-bottom:2px; }
.ms-goods-table { table-layout:fixed; border-collapse:collapse; font:11px/14px Tahoma,Arial,sans-serif; }
/* Подпись столбца — как у МойСклада: 5 точек разделителя слева и вся ширина под текст («Цена продажи …», не «Цена продаж…»). */
.ms-goods-table th { position:relative; height:31px; padding:0 0 0 5px; text-align:left; color:#186999; font-weight:normal; border-bottom:3px solid #1f75a8; white-space:nowrap; box-sizing:border-box; }
.ms-goods-table th:first-child { padding-left:10px; }
.ms-goods-table th>a { display:block; color:#186999; text-decoration:none; overflow:hidden; text-overflow:ellipsis; padding-right:0; }
.ms-goods-sort { position:absolute; top:1px; left:calc(50% + 2.5px); transform:translateX(-50%); color:#75858d; font-size:9px; }
.ms-goods-table td { height:32px; padding:3px 5px; border-bottom:1px solid #ddd; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-sizing:border-box; }
.ms-goods-table td:first-child { padding-left:10px; }
.ms-goods-table input[type=checkbox] { width:14px; height:14px; margin:0; vertical-align:middle; }
.ms-goods-table td a { text-decoration:none; }
.ms-goods-table tbody tr.selected { background:#e4f1fa; }
.ms-goods-table tbody tr:hover { background:#fffb8c; cursor:pointer; }
.ms-goods-table tbody tr.current { background:#dff3df !important; }
.ms-goods-table tbody tr.archived,.ms-goods-table tbody tr.archived a { color:#999; }
.ms-goods-table td.ms-goods-empty { height:30px; color:#888; text-align:center; }
/* Картинка строки (28.09.2026): клетка 24 точки без заливки, как у МойСклада; нет картинки — клетка пустая и белая. */
.ms-goods-thumb { display:flex; align-items:center; justify-content:center; width:24px; height:24px; }
.ms-goods-thumb img { display:block; width:auto; height:auto; max-width:24px; max-height:24px; }
.ms-goods-resizer { position:absolute; right:-3px; top:0; height:100%; width:6px; cursor:col-resize; z-index:1; }
.ms-goods-resizer:hover { background:#b2d8ef; }
.ms-goods-table .ms-goods-columns-cell { padding:0; overflow:visible; }
.ms-goods-columns>summary { list-style:none; cursor:pointer; display:flex; align-items:center; color:#1f75a8; gap:3px; }
.ms-goods-columns>summary::-webkit-details-marker { display:none; }
.ms-goods-columns-panel { z-index:110; color:#222; font:12px/normal "Helvetica Neue",Helvetica,Arial,sans-serif; font-weight:normal; white-space:normal; text-align:left; }
.ms-goods-table .ms-goods-columns-panel input[type=checkbox] { width:13px; height:13px; margin:2px 0 0; }
.ms-goods-columns-panel .dragging { opacity:.45; }
.ms-goods-footer { display:flex; align-items:center; justify-content:space-between; min-height:26px; padding:0 10px; }
.ms-goods-pager { display:flex; align-items:center; gap:6px; min-height:26px; font:11px/16px Tahoma,Arial,sans-serif; }
.ms-goods-pager a,.ms-goods-pager button { color:#666; text-decoration:none; border:1px solid #ccc; border-radius:2px; font:12px/11px Arial; min-width:11px; padding:0; text-align:center; background:white; cursor:pointer; }
.ms-goods-pager span { min-width:100px; text-align:center; }
.ms-goods-pager .off,.ms-goods-pager button:disabled { color:#ddd; border-color:#ddd; pointer-events:none; }
.ms-goods-dialog-field { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:10px 0; }
.ms-goods-dialog-field .ms-input { width:250px; }
.ms-goods-folder-dialog { z-index:150; }
.ms-goods-folder-dialog .ms-dialog-panel,#goods-help .ms-dialog-panel,#goods-settings .ms-dialog-panel,#goods-price-types .ms-dialog-panel { height:auto; min-height:0; max-height:calc(100vh - 80px); }
.ms-goods-folder-dialog .ms-dialog-body,#goods-help .ms-dialog-body,#goods-settings .ms-dialog-body,#goods-price-types .ms-dialog-body { flex:0 1 auto; }
.ms-page-goods-card { margin:0; padding:20px 32px 32px; width:1264px; max-width:calc(100% - 64px); }
.ms-goods-card-toolbar { height:28px; margin-bottom:28px; display:flex; align-items:center; }
.ms-goods-card-toolbar>.ms-btn { min-width:76px; }
.ms-goods-card-pager { display:flex; align-items:center; gap:10px; margin-left:8px; font-size:11px; color:#777; }
.ms-goods-card-pager a { text-decoration:none; font-size:16px; }
.ms-goods-card-pager .off { color:#ccc; }
.ms-goods-list-notice { margin:0 20px 16px; color:#93632a; }
.ms-goods-card-toolbar-right { display:flex; align-items:center; margin-left:auto; }
.ms-goods-audit { font-size:10px; line-height:12px; max-width:180px; text-align:right; text-decoration:none; }
.ms-goods-avatar { display:flex; align-items:center; justify-content:center; margin:0 8px; width:28px; height:28px; border-radius:50%; background:#ddd; color:#fff; }
.ms-goods-card-name { display:block; margin-bottom:10px; }
.ms-goods-card-name>span { display:block; height:14px; margin-bottom:10px; color:#999; }
.ms-goods-card-name>span>b { color:#e95656; }
.ms-goods-card-name>input { box-sizing:border-box; width:100%; height:29px; border:1px solid #bfbfbf; padding:1px 1px 1px 5px; font:bold 20px Arial; background:#f0f0f0; color:#888; border-radius:0; }
.ms-goods-card-columns { display:flex; align-items:flex-start; gap:32px; }
.ms-goods-card-left { width:464px; flex:0 0 464px; }
.ms-goods-card-right { width:768px; min-width:0; flex:1; margin-top:21px; }
.ms-goods-block { border-radius:2px; margin:0 0 12px; background:#f7f7f7; padding:0 0 12px; }
.ms-goods-block>summary { box-sizing:border-box; display:block; position:relative; list-style:none; padding:12px 32px 12px; min-height:40px; font-size:14px; line-height:16px; font-weight:700; cursor:pointer; }
.ms-goods-block>summary::-webkit-details-marker { display:none; }
.ms-goods-block>summary:after { position:absolute; right:18px; top:15px; content:'▾'; color:#555; font-size:13px; }
.ms-goods-block:not([open])>summary:after { content:'▸'; }
.ms-goods-block:not([open]) { padding-bottom:0; }
.ms-goods-grip { position:absolute; left:4px; top:2px; color:#bbb; font-size:11px; font-weight:normal; cursor:grab; }
.ms-goods-block-body { padding:4px 32px 0; }
.ms-goods-info { padding:9px 12px 9px 24px; border:1px solid #d1e0e8; border-radius:2px; background:#edf8fe; font-size:12px; line-height:15px; color:#334451; position:relative; margin-bottom:16px; }
.ms-goods-info:before { content:'i'; position:absolute; left:8px; top:9px; color:#1f75a8; font-weight:700; }
.ms-goods-content-block { min-height:168px; }
.ms-goods-content-block .ms-goods-info { min-height:60px; }
.ms-goods-general .ms-goods-field:not(:last-child) { margin-bottom:4px; }
.ms-goods-general { padding-bottom:9px; }
/* Блок «Изображения» (28.09.2026): картинки рамками 89 точек по четыре в ряд, как в карточке МойСклада; без картинок —
   только кнопка «+ Изображение», пустых рамок нет. */
.ms-goods-previews { display:flex; flex-wrap:wrap; margin:0 0 4px; }
.ms-goods-preview { box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:91px; height:91px; margin:0 12px 12px 0; border:1px solid #e1e1e1; background:#f4f4f4; }
.ms-goods-preview:nth-child(4n) { margin-right:0; }
.ms-goods-preview img { display:block; width:auto; height:auto; max-width:89px; max-height:89px; background:#fff; }
.ms-goods-field { display:flex; align-items:flex-start; gap:0; margin:0 0 5px; min-height:21px; }
.ms-goods-field>label { position:relative; width:160px; flex:0 0 160px; padding:4px 0 0; color:#999; font-size:12px; line-height:14px; }
.ms-goods-field>label>.ms-help { position:absolute; top:3px; width:13px; height:13px; padding:0; font-size:10px; margin:0 0 0 3px; vertical-align:middle; }
.ms-goods-image-block .ms-goods-block-body>.ms-btn { margin-left:-16px; }
.ms-goods-general .ms-goods-field:last-child input { width:80px; }
.ms-goods-field-value { flex:1; min-width:0; }
.ms-goods-field-value>input:not([type=checkbox]),.ms-goods-field-value>textarea,.ms-goods-ref-field { display:block; box-sizing:border-box; width:100%; min-height:21px; height:21px; border:1px solid #bfbfbf; border-radius:0; background:#f0f0f0; color:#888; padding:2px 3px; font-size:12px; line-height:15px; }
.ms-goods-field-value>input[type=checkbox] { margin:4px 0 0; }
.ms-goods-field-value>textarea { height:36px; resize:vertical; }
.ms-goods-ref-field { color:#186999; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; background:#f0f0f0; }
.ms-goods-ref-field:hover { color:#f88001; }
.ms-goods-block hr { border:0; border-top:1px solid #e5e5e5; margin:12px 0; }
.ms-goods-block h4 { font-size:14px; margin:18px 0 12px; }
.ms-goods-radio { display:flex; align-items:center; gap:4px; font-size:12px; margin:12px 0; }
.ms-goods-radio input { margin:0; }
/* «Неснижаемый остаток» карточки — разметкой и стилями редактора (m_refedit.css, .ms-refedit-minimum-*, волна 45). */
.ms-goods-link-button:disabled { color:#999; cursor:default; }
.ms-goods-barcode { display:flex; gap:6px; margin:0 0 6px; }
.ms-goods-barcode input { box-sizing:border-box; border:1px solid #bfbfbf; background:#f0f0f0; color:#888; height:21px; min-width:0; width:0; flex:1; }
.ms-goods-barcode input:first-child { flex:0 0 132px; }
.ms-goods-barcode button { border:1px solid #ccc; color:#bbb; background:#f8f8f8; padding:0 3px; }
.ms-goods-tabs { display:flex; width:100%; margin:0 0 32px; border-radius:3px; background:#e2e2e2; overflow:hidden; }
.ms-goods-tabs>a { height:40px; display:flex; align-items:center; justify-content:center; text-decoration:none; color:#222; border-left:1px solid #ccc; flex:1; white-space:nowrap; padding:0 15px; font-size:12px; background:#e2e2e2; }
.ms-goods-tabs>a:first-child, .ms-goods-tabs>a.on + a { border-left-color:transparent; }
.ms-goods-tabs>a:hover { background:#ccc; }
.ms-goods-tabs>a.on { background:#1f75a8; color:#fff; border-left-color:transparent; border-radius:3px; }
.ms-goods-tab-content h3 { margin:0 0 16px; font-size:16px; }
.ms-goods-prices { width:360px; }
.ms-goods-prices { padding-top:6px; }
.ms-goods-prices .ms-goods-field { width:311px; margin-bottom:6px; }
.ms-goods-prices .ms-goods-field>label { flex-basis:171px; width:171px; color:#444; }
.ms-goods-prices .ms-goods-field-value>input { text-align:right; }
.ms-goods-sale-title { display:flex; gap:5px; align-items:center; margin:34px 0 23px; }
.ms-goods-sale-title .ms-help { font-size:10px; width:13px; height:13px; padding:0; }
.ms-goods-link-button { padding:0; border:0; color:#186999; background:none; font:12px Arial; cursor:pointer; text-decoration:underline; margin-left:auto; }
.ms-goods-price-line { display:flex; align-items:center; gap:8px; }
.ms-goods-price-line>span { color:#888; font-size:11px; }
.ms-goods-prices hr { width:310px; border:0; border-top:1px solid #e5e5e5; margin:30px 0 12px; }
.ms-goods-tab-tools { display:flex; align-items:center; margin-bottom:16px; }
.ms-goods-tab-tools input { width:250px; }
.ms-goods-detail-table { border-collapse:collapse; width:100%; font:11px/16px Tahoma,Arial,sans-serif; margin:12px 0; }
.ms-goods-detail-table th { color:#186999; border-bottom:3px solid #1f75a8; padding:8px 6px; font-weight:normal; text-align:left; }
.ms-goods-detail-table td { border-bottom:1px solid #ddd; padding:7px 6px; }
.ms-goods-detail-table th[data-goods-local-sort] { cursor:pointer; }
.ms-goods-detail-table th[data-goods-local-sort]:hover { box-shadow:inset 0 1px #186999; }
.ms-goods-detail-table tbody tr:hover { background:#fffb8c; }
.ms-goods-detail-table tfoot th { font-weight:bold; border-top:1px solid #ccc; border-bottom:0; color:#444; }
.ms-goods-detail-table a { text-decoration:none; }
.ms-page-goods .num,.ms-page-goods-card .num { text-align:right; font-variant-numeric:tabular-nums; }
.ms-goods-muted,.ms-goods-stamp { color:#888; font-size:12px; line-height:17px; }
.ms-goods-stamp.stale { color:#9a6200; }
.ms-goods-error { color:#a04032; padding:12px; background:#fff5eb; }
.ms-goods-empty { color:#888; text-align:center; }
.ms-goods-report-link { display:inline-block; margin-top:14px; }
.ms-goods-movement-filter { display:flex; align-items:center; gap:12px; }
.ms-goods-movement-filter .ms-input { width:120px; }
.ms-goods-print-page { margin:20px; color:#222; font:12px Arial,sans-serif; }
.ms-goods-print-page table { border-collapse:collapse; width:100%; }
.ms-goods-print-page th,.ms-goods-print-page td { border:1px solid #bbb; padding:6px; text-align:left; }
.ms-goods-print-page h1 { font-size:22px; }
.ms-goods-print-page dt { font-weight:bold; margin-top:8px; }
.ms-goods-print-page dd { margin-left:0; }
.ms-goods-print-labels { display:flex; flex-wrap:wrap; gap:10px; }
.ms-goods-print-labels article { width:240px; min-height:125px; padding:15px; border:1px solid #888; break-inside:avoid; }
.ms-goods-print-price { font-size:26px; font-weight:bold; }
.ms-goods-print-actions { margin-bottom:20px; }
@media(max-width:1100px) {
  .ms-goods-toolbar { flex-wrap:wrap; row-gap:12px; }
  .ms-goods-tree { width:230px; min-width:230px; }
  .ms-goods-body { gap:20px; margin-right:20px; }
  .ms-page-goods-card { max-width:none; min-width:900px; }
  .ms-goods-card-left { width:380px; flex-basis:380px; }
}
@media(max-width:700px) {
  .ms-goods-body { flex-direction:column; }
  .ms-goods-tree { width:100%; max-height:240px; overflow:auto; }
  .ms-goods-list { width:100%; }
}
@media print {
  .ms-goods-print-actions { display:none; }
  .ms-goods-print-page { margin:0; }
  .ms-goods-print-page tr { break-inside:avoid; }
}

/* Состояние открытого меню сохраняется до закрытия, включая уход мыши. */
.ms-goods-card-toolbar .ms-goods-more { box-sizing:border-box; width:36px; height:28px; padding:0; justify-content:center; }
.ms-goods-more[aria-expanded="true"], .ms-goods-more[aria-expanded="true"]:hover { color:#fff; border-color:#858585; background:linear-gradient(to bottom,#848484,#909090 75%); box-shadow:inset 0 1px 3px rgba(0,0,0,.5); }
.ms-page-goods :focus, .ms-page-goods-card :focus { outline:0; }
.ms-goods-tabs a, .ms-goods-tree a, .ms-goods-tree-row, .ms-goods-table tr { transition:none; }
