:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #16202a;
  --muted: #6d7885;
  --line: #e5e9ee;
  --primary: #15191f;
  --primary-soft: #eef0f3;
  --accent: #6d4aff;
  --danger: #bd2c37;
  --success: #127a4a;
  --warning: #8b5d00;
  --shadow: 0 12px 34px rgba(28, 38, 49, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; background: #101318; color: #fff; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #101318; font-weight: 900; letter-spacing: -.04em; }
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; margin-top: 2px; font-size: 12px; color: #99a3af; }
.sidebar nav { display: grid; gap: 6px; margin-top: 34px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 11px; color: #bdc5cf; border: 0; background: transparent; text-align: left; cursor: pointer; }
.nav-link:hover, .nav-link.active { background: #252a32; color: #fff; }
.nav-link span { width: 19px; text-align: center; }
.logout-form { margin-top: auto; padding-top: 24px; }
.button-link { font: inherit; }
.main-content { min-width: 0; padding: 30px 34px 50px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
h2 { margin: 0 0 16px; font-size: 21px; }
h4 { margin: 0 0 12px; }
.page-header p, .muted, .help { color: var(--muted); }
.page-header p { margin: 7px 0 0; }
.header-actions, .button-row, .settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.inline-form { display: inline-flex; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700; transition: .15s ease; display: inline-flex; justify-content: center; align-items: center; gap: 7px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--primary); }
.btn-secondary { color: var(--text); background: #fff; border-color: #dbe0e6; }
.btn-ghost { color: var(--text); background: transparent; border-color: #dbe0e6; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-full { width: 100%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.summary-card { padding: 18px 19px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 24px rgba(28,38,49,.05); }
.summary-card span { display: block; min-height: 35px; color: var(--muted); font-size: 13px; }
.summary-card strong { font-size: 30px; letter-spacing: -.04em; }
.summary-card small { margin-left: 5px; color: var(--muted); }
.summary-card.accent { background: #1a1f27; color: #fff; border-color: #1a1f27; }
.summary-card.accent span, .summary-card.accent small { color: #b9c0ca; }
.toolbar-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px; margin-bottom: 16px; }
.search-form { flex: 1; max-width: 680px; display: flex; gap: 8px; }
.search-form input { flex: 1; }
.toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
input { width: 100%; border: 1px solid #d8dee5; border-radius: 9px; padding: 10px 11px; outline: none; background: #fff; color: var(--text); }
input:focus { border-color: #8b98a8; box-shadow: 0 0 0 3px rgba(67, 82, 101, .09); }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 16px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .055em; color: #77818d; background: #fafbfc; border-bottom: 1px solid var(--line); }
td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.article-cell { display: grid; gap: 3px; min-width: 230px; }
.article-cell strong { font-size: 15px; }
.article-cell span { color: #596574; font-size: 13px; }
.article-cell small { color: #8a939f; }
.stock-edit-form { display: flex; align-items: center; gap: 7px; width: 185px; }
.stock-edit-form input { width: 90px; font-weight: 800; text-align: center; }
.mini-btn { border: 0; background: #eef1f4; border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.wb-total-button { border: 0; background: #f0edff; color: #3d25a4; border-radius: 11px; padding: 9px 13px; cursor: pointer; display: inline-flex; align-items: baseline; gap: 7px; min-width: 92px; }
.wb-total-button strong { font-size: 20px; }
.wb-total-button span { font-size: 12px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid #dfe3e8; border-radius: 9px; background: #fff; cursor: pointer; font-size: 18px; }
.align-right { text-align: right; }
.detail-row td { background: #fafbfc; padding: 18px 22px 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; }
.detail-box { padding: 13px; border: 1px solid #e1e5ea; border-radius: 12px; background: #fff; }
.detail-box span { min-height: 35px; display: block; color: var(--muted); font-size: 12px; }
.detail-box strong { font-size: 23px; }
.warehouse-list { margin-top: 18px; }
.warehouse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.warehouse-item { display: grid; gap: 3px; padding: 11px; background: #fff; border: 1px solid #e3e7eb; border-radius: 10px; }
.warehouse-item span { color: var(--muted); font-size: 12px; }
.warehouse-item b { margin-top: 3px; }
.detail-note { margin: 16px 0 0; color: #6f7985; font-size: 12px; line-height: 1.5; }
.empty-state { text-align: center; padding: 65px 20px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }
.alert { margin-bottom: 16px; border-radius: 11px; padding: 13px 15px; border: 1px solid transparent; line-height: 1.45; }
.alert-success { color: #0d613a; background: #eaf8f1; border-color: #bfe7d2; }
.alert-error { color: #8d1d27; background: #ffeff1; border-color: #f1c3c8; }
.alert-warning { color: #725000; background: #fff7dd; border-color: #ead99d; }
.alert-info { color: #285781; background: #edf6ff; border-color: #c7def3; }
.settings-panel { padding: 22px; }
.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 7px; font-weight: 700; font-size: 13px; }
.wide-form { max-width: 900px; }
.field-group .help { margin: 8px 0 0; font-size: 13px; line-height: 1.55; }
.advanced-settings { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.advanced-settings summary { cursor: pointer; font-weight: 750; }
.two-col-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 15px; }
.compact-fields { align-items: end; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; }
.check-label input { width: auto; }
.action-divider { border-top: 1px solid var(--line); margin: 24px 0; }
.info-panel { margin-top: 16px; padding: 22px; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.info-grid div { border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
.info-grid p { color: var(--muted); font-size: 13px; margin: 7px 0 0; line-height: 1.45; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.status-ok { color: #0d613a; background: #e4f7ed; }
.status-error { color: #991f2a; background: #ffebee; }
.log-table td { font-size: 13px; vertical-align: top; }
.log-table td:last-child { min-width: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-cell { text-align: center; padding: 50px; color: var(--muted); }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,15,20,.58); }
.modal-card { position: relative; width: min(480px, 100%); padding: 24px; background: #fff; border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.modal-close { position: absolute; right: 13px; top: 11px; width: 34px; height: 34px; border: 0; background: #eef1f4; border-radius: 9px; cursor: pointer; font-size: 23px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #11151a; }
.login-card { width: min(410px, 100%); padding: 30px; border-radius: 19px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.login-brand { margin-bottom: 34px; color: var(--text); }
.login-card h1 { margin-bottom: 20px; }
.login-card label { display: grid; gap: 7px; margin-bottom: 14px; font-size: 13px; font-weight: 750; }
@media (max-width: 1050px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar-panel { align-items: stretch; flex-direction: column; }
  .toolbar-right { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 13px; }
  .sidebar nav { margin-top: 14px; grid-template-columns: repeat(3, 1fr); }
  .nav-link { justify-content: center; padding: 10px; font-size: 12px; }
  .logout-form { display: none; }
  .main-content { padding: 20px 13px 40px; }
  .page-header { flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .two-col-form, .info-grid { grid-template-columns: 1fr; }
  .search-form { max-width: none; flex-wrap: wrap; }
  .search-form input { flex-basis: 100%; }
}

/* clean v2: единый внутренний каталог и несколько кабинетов */
select { width: 100%; border: 1px solid #d8dee5; border-radius: 9px; padding: 10px 11px; outline: none; background: #fff; color: var(--text); font: inherit; }
.summary-grid-wide { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.summary-card.platform-wb { border-top: 3px solid #7b3ff2; }
.summary-card.platform-ozon { border-top: 3px solid #1769ff; }
.summary-card.platform-yandex { border-top: 3px solid #f04444; }
.multi-account-table { min-width: 1480px; }
.multi-account-table th, .multi-account-table td { white-space: nowrap; }
.multi-account-table .article-cell { min-width: 260px; white-space: normal; }
.sticky-col { position: sticky; z-index: 3; background: #fff; }
thead .sticky-col { z-index: 5; background: #fafbfc; }
.sticky-col-1 { left: 0; min-width: 290px; }
.sticky-col-2 { left: 290px; min-width: 200px; box-shadow: 8px 0 12px rgba(21, 32, 42, .04); }
.account-head { min-width: 170px; }
.platform-wb { --platform-color: #7b3ff2; --platform-soft: #f0eaff; --platform-text: #4f23aa; }
.platform-ozon { --platform-color: #1769ff; --platform-soft: #eaf1ff; --platform-text: #0b47ba; }
.platform-yandex { --platform-color: #ef4444; --platform-soft: #ffeded; --platform-text: #a91e1e; }
.market-total-button { border: 0; border-radius: 11px; padding: 9px 12px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 112px; background: var(--platform-soft, #eef1f4); color: var(--platform-text, #27313c); }
.market-total-button strong { font-size: 20px; }
.market-total-button span { font-size: 11px; }
.product-detail-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.product-detail-header div { display: grid; gap: 3px; }
.product-detail-header span { color: var(--muted); font-size: 13px; }
.btn-small { padding: 7px 10px; font-size: 12px; }
.account-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.account-detail-card { border: 1px solid var(--line); border-left-width: 4px; border-radius: 13px; padding: 14px; background: #fff; min-width: 0; }
.platform-border-wb { border-left-color: #7b3ff2; }
.platform-border-ozon { border-left-color: #1769ff; }
.platform-border-yandex { border-left-color: #ef4444; }
.account-detail-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.account-detail-card > header b { font-size: 18px; }
.detail-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.detail-mini-grid span { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; background: #f6f8fa; border-radius: 8px; color: #596574; font-size: 12px; }
.detail-mini-grid b { color: var(--text); }
.compact-location-list { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; }
.compact-location-list > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.compact-location-list span { overflow: hidden; text-overflow: ellipsis; }
.small-text { font-size: 12px; }

.account-groups { display: grid; gap: 24px; }
.platform-section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.platform-section-title h2 { margin: 0; }
.platform-section-title span { color: var(--muted); font-size: 13px; }
.account-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 14px; }
.account-card { padding: 19px; border-left-width: 4px; }
.account-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.account-card-header h3 { margin: 8px 0 0; font-size: 18px; }
.platform-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--platform-soft, #eef1f4); color: var(--platform-text, #27313c); }
.status-stack { display: grid; justify-items: end; gap: 4px; }
.status-stack small { color: var(--muted); }
.status-dot { font-size: 11px; color: #7c8792; }
.status-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #aeb6bf; }
.status-dot.ok { color: var(--success); }
.status-dot.ok::before { background: var(--success); }
.account-form { gap: 12px; }
.inset-form { margin-top: 12px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; border-top: 1px solid var(--line); margin-top: 17px; padding-top: 15px; }
.account-actions form { display: grid; gap: 5px; }
.tiny-check { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.tiny-check input { width: auto; }

.matching-toolbar { align-items: stretch; }
.matching-filters { max-width: none; display: grid; grid-template-columns: 240px 210px minmax(260px, 1fr) auto; }
.matching-table { min-width: 1200px; }
.match-form { display: flex; gap: 6px; min-width: 340px; }
.match-form input { min-width: 240px; }
.text-button { border: 0; background: transparent; padding: 5px 0 0; color: #516173; text-decoration: underline; cursor: pointer; font-size: 11px; }
.matched-note { display: block; margin-top: 5px; color: var(--success); }

@media (max-width: 900px) {
  .account-card-grid { grid-template-columns: 1fr; }
  .matching-filters { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .sticky-col-2 { box-shadow: none; }
}


/* clean v2.4: поступления на собственный склад */
.receipt-entry-panel { padding: 22px; margin-bottom: 16px; }
.receipt-form { display: grid; grid-template-columns: minmax(260px, 1.5fr) 180px 150px auto; gap: 12px; align-items: end; }
.receipt-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.receipt-form .btn { min-height: 42px; }
.receipt-help { margin: 12px 0 0; font-size: 12px; }
.receipts-summary { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.receipts-toolbar { justify-content: flex-start; }
.receipt-table { min-width: 850px; }
.qty-in { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e7f7ee; color: #0f7143; font-weight: 850; }
.empty-inline { padding: 16px; background: #f6f8fa; border-radius: 10px; color: var(--muted); }
.compact-empty { padding: 42px 20px; }
@media (max-width: 1000px) { .receipt-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) { .receipt-form, .receipts-summary { grid-template-columns: 1fr; } }
.table-subtitle { display:block; color:var(--muted); font-size:12px; margin-top:3px; }
.badge { display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; background:#eef1f5; font-size:12px; font-weight:700; white-space:nowrap; }
.badge-info { background:#e8f1ff; color:#1459b8; }
.badge-success { background:#e7f7ed; color:#19733b; }
.badge-warning { background:#fff3d9; color:#8b5a00; }
.warning-card { border-top:3px solid #d99a00; }

/* v2.7 — комплекты поступления SML */
.kit-panel { margin-top: 18px; }
.kit-form { display: grid; gap: 16px; }
.kit-main-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kit-components { display: grid; gap: 10px; }
.kit-component-row { display: grid; grid-template-columns: 44px minmax(220px, 1fr) minmax(150px, 220px); gap: 12px; align-items: end; padding: 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; }
.component-badge { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #111827; color: white; font-weight: 800; align-self: center; }
.kit-list { display: grid; gap: 10px; margin-top: 18px; }
.kit-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; }
.kit-card strong { display: block; font-size: 16px; }
.kit-card > div > span { display: block; color: #6b7280; margin-top: 2px; }
.kit-composition { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.kit-composition span { background: #f3f4f6; border-radius: 999px; padding: 4px 9px; font-size: 12px; color: #374151; }
@media (max-width: 860px) {
  .kit-main-fields { grid-template-columns: 1fr; }
  .kit-component-row { grid-template-columns: 42px 1fr; }
  .kit-component-row label:last-child { grid-column: 2; }
}

/* v2.8 — массовое сопоставление через Excel */
.matching-excel-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}
.matching-excel-copy { max-width: 760px; }
.matching-excel-copy h2 { margin: 0 0 8px; font-size: 19px; }
.matching-excel-copy p { margin: 6px 0; line-height: 1.45; }
.matching-excel-actions { min-width: 330px; display: grid; gap: 10px; }
.excel-upload-form { display: grid; gap: 8px; }
.excel-upload-form input[type="file"] {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border, #dfe3ea);
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 900px) {
  .matching-excel-panel { flex-direction: column; align-items: stretch; }
  .matching-excel-actions { min-width: 0; }
}

/* v2.10 — единый список складов маркетплейсов */
.warehouses-summary { margin-bottom: 16px; }
.warehouses-info-panel { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; margin-bottom:24px; }
.warehouses-info-panel p { margin:5px 0 0; color:var(--muted); max-width:900px; }
.warehouse-groups { display:grid; gap:26px; }
.warehouse-account-list { display:grid; gap:14px; }
.warehouse-account-card { padding:0; overflow:hidden; border-left-width:4px; }
.warehouse-account-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:18px 20px; border-bottom:1px solid var(--line); }
.warehouse-account-header h3 { margin:7px 0 3px; font-size:18px; }
.warehouse-account-header small { color:var(--muted); }
.warehouse-account-actions { display:flex; align-items:center; gap:10px; }
.warehouse-count { min-width:38px; height:38px; padding:0 10px; border-radius:12px; display:grid; place-items:center; background:#f0f2f5; font-weight:900; }
.warehouse-table-wrap { border:0; border-radius:0; }
.warehouse-table { min-width:1050px; width:100%; }
.warehouse-table td, .warehouse-table th { vertical-align:middle; }
.warehouse-id { display:inline-flex; padding:5px 8px; border-radius:7px; background:#f4f6f8; font-size:12px; color:#334155; }
.warehouse-empty { display:grid; gap:4px; padding:22px 20px; color:var(--muted); }
.warehouse-empty strong { color:var(--text); }
@media (max-width:760px) {
  .warehouses-info-panel, .warehouse-account-header { flex-direction:column; align-items:stretch; }
  .warehouse-account-actions { justify-content:space-between; }
}

/* v2.11 — маршрутизация фактических остатков на конкретные склады */
.stock-routing-panel { margin-bottom: 26px; padding: 20px; }
.stock-routing-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.stock-routing-head h2 { margin:0 0 6px; }
.stock-routing-head p { margin:0; color:var(--muted); max-width:850px; }
.stock-route-create { display:grid; grid-template-columns:minmax(220px,1.1fr) minmax(320px,1.6fr) 150px 170px auto; gap:10px; align-items:end; }
.stock-route-create label, .route-settings-form label { display:grid; gap:5px; font-size:12px; font-weight:700; }
.route-formula-note { margin:12px 0 14px; padding:10px 12px; border-radius:10px; background:#f6f8fa; color:#586574; font-size:12px; }
.stock-routes-wrap { margin-top:10px; }
.stock-routes-table { min-width:1280px; width:100%; }
.stock-routes-table td { vertical-align:middle; }
.route-target-qty { font-size:18px; font-weight:900; margin-bottom:6px; }
.route-settings-form { display:grid; grid-template-columns:75px 75px; gap:5px 7px; min-width:170px; }
.route-settings-form input[type="number"] { width:72px; padding:6px 7px; }
.route-settings-form .route-enabled { display:flex; align-items:center; gap:5px; grid-column:1 / -1; }
.route-settings-form .route-enabled input { width:auto; }
.route-settings-form .text-button { grid-column:1 / -1; justify-self:start; }
.route-error { display:block; max-width:280px; margin-top:5px; color:#b42318; line-height:1.25; }
.danger-text { color:#b42318; }
@media (max-width:1150px) { .stock-route-create { grid-template-columns:1fr 1fr; } .stock-route-create .btn { align-self:end; } }
@media (max-width:760px) { .stock-routing-head { flex-direction:column; } .stock-route-create { grid-template-columns:1fr; } }

/* v2.12 — массовые правила складов через Excel */
.route-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.route-head-actions form{margin:0}.route-excel-box{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:14px 0 18px;padding:14px 16px;border:1px solid var(--border,#dfe3ea);border-radius:12px;background:#f8fafc}.route-excel-box>div{display:flex;flex-direction:column;gap:4px}.route-excel-box span{color:#64748b;font-size:13px}.route-excel-box form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.route-excel-box input[type=file]{max-width:320px}@media(max-width:900px){.route-excel-box{align-items:flex-start;flex-direction:column}}
.kit-stock-result { min-width: 180px; display:grid; gap:4px; text-align:right; align-content:center; }
.kit-stock-result small { color:var(--muted); }
.kit-stock-result strong { font-size:24px; }
@media (max-width: 760px) { .kit-stock-result { text-align:left; min-width:0; } }

/* clean v2.16: фильтры и сортировка FBS / EDBS */
.fbs-filter-panel { padding: 18px; margin-bottom: 16px; }
.filter-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.filter-panel-heading h2 { margin: 0 0 4px; font-size: 18px; }
.filter-panel-heading p { margin: 0; font-size: 12px; }
.fbs-filter-form { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.fbs-filter-form label { display: grid; gap: 6px; min-width: 0; }
.fbs-filter-form label > span { font-size: 12px; font-weight: 800; color: #5f6b78; }
.fbs-filter-form select, .fbs-filter-form input { min-width: 0; }
.fbs-filter-actions { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; padding-top: 2px; }
.orders-table-caption { padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 12px; }
.orders-table-caption strong { color: var(--text); }
@media (max-width: 1100px) { .fbs-filter-form { grid-template-columns: repeat(2, minmax(190px, 1fr)); } }
@media (max-width: 700px) { .fbs-filter-form { grid-template-columns: 1fr; } .filter-panel-heading { flex-direction: column; } }

/* v2.20 — обработка заказов, подбор и печать */
.processing-summary { margin-bottom:16px; }
.processing-filter-panel { margin-bottom:16px; padding:18px; }
.processing-filters { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:12px; align-items:end; }
.processing-filters label { display:grid; gap:6px; }
.processing-filters label>span { font-size:12px; font-weight:800; color:#5f6b78; }
.processing-search { grid-column:span 2; }
.processing-filter-actions { display:flex; gap:8px; align-items:center; }
.processing-help { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; margin-bottom:16px; padding:14px 16px; color:var(--muted); font-size:13px; }
.processing-help strong { color:var(--text); }
.processing-table-panel { overflow:hidden; }
.processing-toolbar { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); background:#fafbfc; position:sticky; top:0; z-index:3; }
.processing-select-all { display:flex; gap:8px; align-items:center; font-size:13px; white-space:nowrap; }
.processing-select-all input { width:auto; }
.processing-select-all span { color:var(--muted); margin-left:4px; }
.processing-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.processing-table { min-width:1250px; }
.processing-table .check-col { width:42px; text-align:center; }
.processing-table .check-col input { width:18px; height:18px; }
.processing-table .nowrap { white-space:nowrap; }
.order-number { font-size:14px; }
.processing-items { display:grid; gap:5px; min-width:270px; }
.processing-item { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:6px 8px; background:#f7f8fa; border-radius:8px; }
.processing-item span { display:grid; gap:1px; }
.processing-item small { color:var(--muted); font-size:11px; }
.processing-item-warning { background:#fff5df; }
.processing-units { font-size:20px; font-weight:900; text-align:center; }
.processing-stage { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.stage-new { background:#eef1f5; color:#344054; }
.stage-picking { background:#e8f1ff; color:#1459b8; }
.stage-assembled { background:#fff3d9; color:#8b5a00; }
.stage-packed { background:#e7f7ed; color:#19733b; }
@media(max-width:1050px){.processing-filters{grid-template-columns:repeat(2,minmax(180px,1fr))}.processing-search{grid-column:auto}.processing-toolbar{align-items:flex-start;flex-direction:column}.processing-actions{justify-content:flex-start}}
@media(max-width:650px){.processing-filters{grid-template-columns:1fr}.processing-help{display:grid}.processing-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.processing-actions .btn{justify-content:center}}


/* EXPRESS WB EDBS v2.25 */
.express-nav { position: relative; }
.express-nav::after { content:'EDBS'; margin-left:auto; font-size:9px; font-weight:900; letter-spacing:.05em; padding:3px 5px; border-radius:6px; background:#7b3ff2; color:#fff; }
.express-header { align-items:center; }
.express-title-row { display:flex; align-items:center; gap:8px; margin-bottom:9px; }
.express-logo { display:inline-flex; align-items:center; padding:6px 10px; border-radius:9px; background:linear-gradient(135deg,#7b3ff2,#b337e8); color:white; font-size:12px; font-weight:950; letter-spacing:.09em; }
.express-submark { color:#6f7882; font-weight:800; font-size:12px; }
.express-panel { padding:0; overflow:hidden; }
.express-tabs { display:flex; align-items:end; gap:3px; padding:0 16px; border-bottom:1px solid var(--line); overflow-x:auto; }
.express-tab { position:relative; min-width:120px; padding:17px 12px 14px; display:flex; align-items:center; justify-content:center; gap:7px; color:#646e79; font-size:13px; font-weight:750; white-space:nowrap; }
.express-tab b { min-width:20px; height:20px; padding:0 6px; display:inline-grid; place-items:center; border-radius:8px; background:#f0f2f5; color:#7b3ff2; font-size:11px; }
.express-tab.active { color:#171b21; }
.express-tab.active::after { content:''; position:absolute; left:12px; right:12px; bottom:-1px; height:3px; border-radius:3px 3px 0 0; background:#7b3ff2; }
.express-tab.active b { background:#f0e8ff; color:#6b27cf; }
.express-filters { display:grid; grid-template-columns:260px minmax(280px,1fr) auto auto; gap:12px; align-items:end; padding:16px; }
.express-filters label { display:grid; gap:6px; color:#5f6b77; font-size:12px; font-weight:750; }
.express-search input { width:100%; }
.express-orders-panel { padding:0; overflow:hidden; }
.express-toolbar { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:15px 16px; border-bottom:1px solid var(--line); background:#fbfcfd; }
.express-primary { background:#7b3ff2 !important; border-color:#7b3ff2 !important; color:#fff !important; }
.express-primary:hover { filter:brightness(.95); }
.express-table { min-width:1180px; }
.express-table thead th { background:#fafbfc; color:#606b76; font-size:11px; font-weight:800; text-transform:none; }
.express-table tbody tr:hover { background:#fbf9ff; }
.express-cabinet { display:inline-flex; max-width:220px; padding:6px 9px; border-radius:9px; background:#f1ecff; color:#5f2abd; font-size:12px; font-weight:800; }
.express-status { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; border-radius:8px; font-size:12px; font-weight:800; white-space:nowrap; }
.express-status-new { background:#f2eefc; color:#6932bd; }
.express-status-assembly { background:#fff2d7; color:#8b5d00; }
.express-status-delivery { background:#e9f1ff; color:#225db8; }
.express-status-archive { background:#edf0f3; color:#66717d; }
.express-empty-icon { width:54px; height:54px; margin:0 auto 12px; border-radius:16px; display:grid; place-items:center; background:#f0e8ff; color:#7b3ff2; font-size:25px; }
@media (max-width:900px) {
  .express-filters { grid-template-columns:1fr 1fr; }
  .express-toolbar { align-items:flex-start; flex-direction:column; }
}
@media (max-width:600px) {
  .express-filters { grid-template-columns:1fr; }
  .express-tabs { padding:0 6px; }
  .express-tab { min-width:105px; }
}

/* EXPRESS v2.26 — данные доставки и чат покупателя */
.express-table-detailed { min-width: 1780px; }
.express-table-detailed td { vertical-align: top; }
.express-order-cell { min-width: 145px; }
.express-product-list { min-width: 300px; }
.express-price-cell { min-width: 120px; font-size: 15px; }
.express-delivery-cell { min-width: 180px; max-width: 240px; }
.express-delivery-cell strong { display:block; line-height:1.35; }
.express-contact-cell { min-width: 310px; max-width: 390px; display:grid; gap:5px; }
.express-contact-cell > strong { font-size:12px; }
.express-contact-cell small { display:block; color:var(--muted); font-size:11px; line-height:1.35; }
.express-address { display:block; font-size:12px; line-height:1.4; }
.express-phone { display:inline-flex; width:max-content; font-weight:850; color:#6230b7; text-decoration:none; }
.express-chat-col { width:86px; min-width:86px; text-align:center; }
.express-chat-button { display:inline-grid; gap:3px; place-items:center; min-width:58px; padding:7px 8px; border-radius:10px; border:1px solid #e2d8f8; background:#f7f2ff; color:#6127bb; text-decoration:none; }
.express-chat-button span { font-size:18px; line-height:1; }
.express-chat-button b { font-size:10px; }
.express-chat-button:hover { background:#efe5ff; border-color:#cdb6f5; }

.express-chat-header-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.express-chat-layout { display:grid; grid-template-columns:minmax(290px,360px) minmax(520px,1fr); gap:16px; align-items:start; }
.express-order-card { padding:0; overflow:hidden; position:sticky; top:16px; }
.express-order-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; border-bottom:1px solid var(--line); background:#fbfcfd; }
.express-order-card-head > strong { font-size:18px; }
.express-order-card-section { padding:15px 16px; border-bottom:1px solid var(--line); display:grid; gap:9px; }
.express-order-card-section:last-child { border-bottom:0; }
.express-order-card-section h3 { margin:0; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#6b7480; }
.express-order-card-item { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:9px 10px; border-radius:10px; background:#f7f8fa; }
.express-order-card-item div { display:grid; gap:2px; }
.express-order-card-item strong { font-size:12px; line-height:1.35; }
.express-order-card-item small { color:var(--muted); font-size:11px; }
.express-order-card-field { display:grid; gap:3px; }
.express-order-card-field > span { font-size:11px; color:var(--muted); }
.express-order-card-field > strong { font-size:13px; line-height:1.4; }
.express-order-card-field small { font-size:11px; color:var(--muted); }
.express-tech-info { color:var(--muted); font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.express-tech-info small { overflow-wrap:anywhere; }

.express-chat-panel { padding:0; overflow:hidden; min-height:650px; display:grid; grid-template-rows:auto 1fr auto; }
.express-chat-panel-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border-bottom:1px solid var(--line); background:#fbfcfd; }
.express-chat-panel-head h2 { margin:0 0 3px; font-size:18px; }
.express-chat-panel-head p { margin:0; color:var(--muted); font-size:12px; }
.express-chat-live { padding:5px 8px; border-radius:999px; background:#e7f7ed; color:#19733b; font-size:11px; font-weight:800; }
.express-chat-thread { height:540px; overflow:auto; padding:20px; background:linear-gradient(180deg,#fafbfc 0%,#f6f3fb 100%); display:flex; flex-direction:column; gap:10px; }
.express-message { display:flex; width:100%; }
.express-message.seller { justify-content:flex-end; }
.express-message.buyer { justify-content:flex-start; }
.express-message-bubble { max-width:min(72%,680px); padding:10px 12px 7px; border-radius:14px; box-shadow:0 1px 2px rgba(20,24,30,.05); display:grid; gap:5px; }
.express-message.buyer .express-message-bubble { background:#fff; border:1px solid #e5e8ec; border-bottom-left-radius:4px; }
.express-message.seller .express-message-bubble { background:#eee5ff; color:#3f176f; border:1px solid #decafc; border-bottom-right-radius:4px; }
.express-message-bubble span { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45; }
.express-message-bubble small { justify-self:end; color:#818996; font-size:10px; }
.express-chat-composer { padding:14px 16px; border-top:1px solid var(--line); background:#fff; display:grid; gap:9px; }
.express-chat-composer textarea { width:100%; resize:vertical; min-height:76px; max-height:180px; }
.express-chat-composer-bottom { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.express-chat-composer-bottom small { color:var(--muted); }
.express-chat-notice { margin:auto; max-width:620px; padding:30px; display:grid; gap:9px; text-align:center; color:var(--muted); }
.express-chat-notice strong { color:var(--text); font-size:16px; }
.express-chat-notice.error { margin:20px; border:1px solid #f2c5c5; border-radius:12px; background:#fff4f4; color:#9d3030; }
.express-chat-notice.error strong { color:#8f2424; }
.express-chat-notice.compact { margin:auto; padding:18px; }
.express-chat-empty-icon { width:56px; height:56px; margin:0 auto 5px; display:grid; place-items:center; border-radius:18px; background:#f0e8ff; font-size:25px; }

@media (max-width:1100px) {
  .express-chat-layout { grid-template-columns:1fr; }
  .express-order-card { position:static; }
}
@media (max-width:700px) {
  .express-chat-header-actions { justify-content:flex-start; }
  .express-chat-thread { height:460px; padding:12px; }
  .express-message-bubble { max-width:88%; }
  .express-chat-composer-bottom { align-items:flex-start; flex-direction:column; }
}

/* Обработка заказов v2.27 — рабочий экран в стиле EXPRESS */
.processing-page-header { align-items:center; }
.processing-title-row { display:flex; align-items:center; gap:8px; margin-bottom:9px; }
.processing-logo { display:inline-flex; align-items:center; padding:6px 10px; border-radius:9px; background:#20252b; color:#fff; font-size:12px; font-weight:950; letter-spacing:.08em; }
.processing-submark { color:#6f7882; font-weight:800; font-size:12px; }
.processing-workspace-panel { padding:0; overflow:hidden; }
.processing-tabs { display:flex; align-items:end; gap:3px; padding:0 16px; border-bottom:1px solid var(--line); overflow-x:auto; }
.processing-tab { position:relative; min-width:116px; padding:17px 12px 14px; display:flex; align-items:center; justify-content:center; gap:7px; color:#646e79; font-size:13px; font-weight:750; white-space:nowrap; }
.processing-tab b { min-width:20px; height:20px; padding:0 6px; display:inline-grid; place-items:center; border-radius:8px; background:#f0f2f5; color:#2a628f; font-size:11px; }
.processing-tab.active { color:#171b21; }
.processing-tab.active::after { content:''; position:absolute; left:12px; right:12px; bottom:-1px; height:3px; border-radius:3px 3px 0 0; background:#2c6f9f; }
.processing-tab.active b { background:#e9f3fa; color:#205d89; }
.processing-modern-filters { display:grid; grid-template-columns:190px 240px 180px minmax(260px,1fr) auto auto; gap:12px; align-items:end; padding:16px; }
.processing-modern-filters label { display:grid; gap:6px; color:#5f6b77; font-size:12px; font-weight:750; }
.processing-modern-search input { width:100%; }
.processing-orders-panel { padding:0; overflow:hidden; }
.processing-modern-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 16px; border-bottom:1px solid var(--line); background:#fbfcfd; }
.processing-selection-block { display:grid; gap:4px; min-width:180px; }
.processing-selection-block small { color:var(--muted); font-size:11px; }
.processing-main-actions { justify-content:flex-end; }
.processing-main-actions .btn { white-space:nowrap; }
.btn-marketplace { border:1px solid #c7dcf5; background:#edf6ff; color:#1461a5; }
.btn-marketplace:hover { background:#e2f0ff; }
.processing-market-tools-row { padding:12px 16px; border-bottom:1px solid var(--line); background:#fff; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.processing-market-tools { min-width:min(100%,720px); flex:1 1 650px; border:1px solid #e2e5e9; border-radius:12px; background:#fbfcfd; overflow:hidden; }
.processing-market-tools.has-selection { border-color:#cbbdf5; box-shadow:0 0 0 2px rgba(105,67,196,.05); }
.processing-market-tools summary { list-style:none; cursor:pointer; padding:12px 14px; display:flex; align-items:center; gap:9px; user-select:none; }
.processing-market-tools summary::-webkit-details-marker { display:none; }
.processing-market-tools summary strong { font-size:13px; }
.processing-market-tools summary small { color:var(--muted); font-size:11px; }
.processing-market-tools .details-arrow { margin-left:auto; transition:transform .15s ease; color:#7a838d; }
.processing-market-tools[open] .details-arrow { transform:rotate(180deg); }
.processing-market-tools-body { padding:14px; border-top:1px solid #e5e8ec; background:#fff; }
.processing-market-tools-note { margin-bottom:12px; color:#616d79; font-size:12px; line-height:1.45; }
.processing-wb-grid { display:grid; grid-template-columns:1.1fr 1.35fr 1fr 160px; gap:10px; }
.processing-wb-grid label { display:grid; gap:6px; color:#5f6b77; font-size:12px; font-weight:750; }
.processing-wb-actions { justify-content:flex-start; margin-top:12px; }
.processing-tool-status { margin-top:10px; padding:8px 10px; border-radius:8px; background:#f5f7f9; color:#69737f; font-size:11px; }
.processing-tool-status.error { background:#fff2f2; color:#9d3030; }
.processing-quick-help { display:flex; align-items:center; gap:7px; color:#68727d; font-size:11px; white-space:nowrap; }
.processing-quick-help span { width:22px; height:22px; border-radius:50%; display:inline-grid; place-items:center; background:#eef2f5; color:#3d4853; font-weight:850; }
.processing-quick-help i { color:#a1a8b0; font-style:normal; }
.processing-modern-table { min-width:1320px; }
.processing-modern-table thead th { background:#fafbfc; color:#606b76; font-size:11px; font-weight:800; text-transform:none; }
.processing-modern-table tbody tr:hover { background:#f9fbfd; }
.processing-modern-table td { vertical-align:top; }
.processing-order-cell { min-width:145px; }
.processing-product-list { min-width:300px; max-width:430px; }
.processing-cabinet { display:inline-flex; max-width:220px; padding:6px 9px; border-radius:9px; background:#f0f2f5; color:#35404b; font-size:12px; font-weight:800; }
.marketplace-pill { display:inline-flex; align-items:center; width:max-content; padding:5px 8px; border-radius:8px; background:#eff1f3; color:#46515d; font-size:11px; font-weight:900; }
.marketplace-wb { background:#f0e9ff; color:#6d30c6; }
.marketplace-ozon { background:#e8f2ff; color:#1767b1; }
.marketplace-yandex { background:#fff1db; color:#9a5a00; }
.processing-scheme { display:block; margin-top:5px; color:var(--muted); font-size:11px; font-weight:700; }
.processing-platform-status { display:inline-block; max-width:220px; padding:6px 8px; border-radius:8px; background:#f4f6f8; color:#596570; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.processing-print-cell { min-width:118px; }
.processing-print-state { display:block; width:max-content; margin-bottom:5px; padding:4px 7px; border-radius:7px; background:#f0f2f4; color:#707985; font-size:10px; font-weight:800; }
.processing-print-state.done { background:#e7f5ec; color:#1d7541; }
.processing-modern-empty { padding:54px 20px; }
.processing-empty-icon { width:54px; height:54px; margin:0 auto 12px; border-radius:16px; display:grid; place-items:center; background:#eef4f8; font-size:24px; }

@media (max-width:1300px) {
  .processing-modern-filters { grid-template-columns:1fr 1fr 1fr; }
  .processing-modern-search { grid-column:span 2; }
  .processing-modern-toolbar { align-items:flex-start; flex-direction:column; }
  .processing-main-actions { justify-content:flex-start; }
  .processing-wb-grid { grid-template-columns:1fr 1fr; }
  .processing-quick-help { white-space:normal; }
}
@media (max-width:760px) {
  .processing-tabs { padding:0 6px; }
  .processing-tab { min-width:105px; }
  .processing-modern-filters { grid-template-columns:1fr; }
  .processing-modern-search { grid-column:auto; }
  .processing-wb-grid { grid-template-columns:1fr; }
  .processing-market-tools-row { padding:10px; }
  .processing-quick-help { display:none; }
}


/* v2.31: быстрое глобальное переименование внутреннего артикула */
.internal-article-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.article-rename-button {
  min-width: 30px;
  padding: 4px 8px;
  opacity: .72;
}
.internal-article-cell:hover .article-rename-button,
.article-rename-button:focus {
  opacity: 1;
}
.modal-card-compact {
  max-width: 520px;
}
.article-rename-note {
  padding: 12px 14px;
  border: 1px solid var(--border, #d9dee7);
  border-radius: 10px;
  background: rgba(127, 127, 127, .06);
  font-size: 13px;
  line-height: 1.45;
}


/* v2.32: сворачиваемые служебные блоки + завершение EDBS по коду */
.collapsible-panel { padding:0; overflow:hidden; }
.collapse-summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 18px; user-select:none; background:var(--panel, #fff);
}
.collapse-summary::-webkit-details-marker { display:none; }
.collapse-summary > span:first-child { display:grid; gap:3px; }
.collapse-summary strong { font-size:16px; color:var(--text, #1c232b); }
.collapse-summary small { color:var(--muted, #747e89); font-size:12px; font-weight:500; }
.collapse-arrow { color:#7b8590; font-size:20px; transition:transform .16s ease; }
.collapsible-panel[open] .collapse-arrow { transform:rotate(180deg); }
.collapse-body { padding:0 18px 18px; border-top:1px solid var(--line, #e7e9ec); }
.collapse-body > .help:first-child, .collapse-body > .muted:first-child { margin-top:14px; }

.express-delivery-confirm {
  margin-top:10px; padding-top:10px; border-top:1px solid var(--line, #e5e8ec); display:grid; gap:6px; min-width:190px;
}
.express-delivery-confirm label { color:var(--muted, #6f7882); font-size:11px; font-weight:800; }
.express-delivery-confirm input { width:100%; min-width:0; padding:8px 9px; font-size:12px; }
.express-delivery-confirm-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.express-delivery-confirm-actions .btn { width:100%; justify-content:center; padding-left:8px; padding-right:8px; }
.btn-success { background:#198754; border-color:#198754; color:#fff; }
.btn-success:hover { background:#157347; border-color:#146c43; }
.btn-danger { background:#fff0f0; border:1px solid #e1a5a5; color:#a02c2c; }
.btn-danger:hover { background:#ffe5e5; }

/* v2.33 — рабочее место возвратов */
.returns-summary { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.returns-control-panel { padding: 0; margin-bottom: 16px; overflow: hidden; }
.returns-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); background: #fafbfc; }
.returns-tab { min-width: 170px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5f6b78; border-right: 1px solid var(--line); font-weight: 800; }
.returns-tab b { min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: #eef1f4; color: #27313c; }
.returns-tab.active { background: #fff; color: var(--text); box-shadow: inset 0 -3px 0 #171b21; }
.returns-tab.active b { background: #171b21; color: #fff; }
.returns-filters { padding: 14px; display: grid; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.6fr) auto auto; gap: 10px; align-items: end; }
.returns-filters label, .returns-add-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; color: #596574; }
.returns-add-panel { margin-bottom: 16px; padding: 0; overflow: hidden; }
.returns-add-panel > summary { cursor: pointer; list-style: none; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-weight: 850; }
.returns-add-panel > summary::-webkit-details-marker { display: none; }
.returns-add-panel > summary small { color: var(--muted); font-weight: 500; }
.returns-add-panel[open] > summary { border-bottom: 1px solid var(--line); }
.returns-add-form { padding: 16px 18px 18px; display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr 110px; gap: 12px; align-items: end; }
.returns-add-form .returns-reason-input { grid-column: 1 / -2; }
.returns-table { min-width: 1450px; }
.returns-table td { vertical-align: top; }
.return-article-cell { min-width: 220px; }
.return-article-cell strong, .return-number-cell strong { display: block; font-size: 15px; }
.return-article-cell small, .return-number-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.return-cabinet { display: inline-block; max-width: 220px; font-weight: 750; }
.return-platform { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; background: #eef1f4; }
.return-platform.platform-wb { background: #f0eaff; color: #4f23aa; }
.return-platform.platform-ozon { background: #eaf1ff; color: #0b47ba; }
.return-platform.platform-yandex { background: #ffeded; color: #a91e1e; }
.return-qty { white-space: nowrap; font-size: 16px; }
.return-reason-cell { max-width: 320px; color: #53606e; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.return-status-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.return-status-badge.pending { background: #fff2d5; color: #7d5200; }
.return-status-badge.restocked { background: #e6f7ed; color: #176c3d; }
.return-status-badge.markdown { background: #eaf1ff; color: #1558a4; }
.return-status-badge.defect { background: #ffeded; color: #a02731; }
.returns-actions-col { min-width: 235px; }
.return-decision-actions { display: grid; gap: 6px; }
.return-decision-actions .btn { width: 100%; }
.btn-markdown { background: #eaf1ff; color: #1558a4; border: 1px solid #c6d9f4; }
.btn-markdown:hover { background: #dceaff; }
.returns-empty-icon { font-size: 34px; margin-bottom: 8px; }
@media (max-width: 1050px) {
  .returns-summary { grid-template-columns: repeat(2, 1fr); }
  .returns-filters { grid-template-columns: 1fr 1fr; }
  .returns-add-form { grid-template-columns: 1fr 1fr; }
  .returns-add-form .returns-reason-input { grid-column: auto; }
}
@media (max-width: 650px) {
  .returns-summary, .returns-filters, .returns-add-form { grid-template-columns: 1fr; }
  .returns-tab { min-width: 155px; }
  .returns-add-panel > summary { align-items: flex-start; flex-direction: column; }
}

/* v2.34 — возвраты WB через ПВЗ */
.returns-summary-v234 { grid-template-columns: repeat(5, minmax(155px, 1fr)); }
.summary-card.pickup-accent { border-color: #d8c7ff; background: linear-gradient(180deg, #fbf8ff 0%, #fff 100%); }
.summary-card.pickup-accent strong { color: #5b2bc4; }
.returns-filters-v234 { border-bottom: 0; }
.pvz-pickup-panel, .markdown-stock-panel { margin-bottom: 16px; padding: 0; overflow: hidden; }
.section-heading-row { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.section-heading-row h2 { margin: 0 0 5px; font-size: 18px; }
.section-heading-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; max-width: 900px; }
.section-heading-row.compact-heading { border-bottom: 1px solid var(--line); }
.pickup-heading-stats, .markdown-total { min-width: 115px; display: grid; justify-items: end; gap: 2px; }
.pickup-heading-stats strong, .markdown-total strong { font-size: 22px; line-height: 1; }
.pickup-heading-stats span, .markdown-total span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.pvz-pickup-table { min-width: 1350px; }
.pvz-pickup-table td { vertical-align: top; }
.pvz-address-cell { min-width: 290px; max-width: 380px; }
.pvz-address-cell strong { display: block; line-height: 1.4; }
.pvz-address-cell small { display: block; margin-top: 4px; color: var(--muted); }
.return-status-badge.pvz { background: #efe7ff; color: #5626b8; }
.deadline-text { white-space: nowrap; }
.deadline-text.urgent { color: #a75b00; }
.deadline-text.expired { color: #b3212e; }
.pvz-pickup-row.deadline-urgent { background: #fffdf6; }
.pvz-pickup-row.deadline-expired { background: #fff7f7; }
.compact-empty-state { padding: 24px 18px; display: grid; gap: 5px; color: var(--muted); }
.compact-empty-state strong { color: var(--text); font-size: 14px; }
.return-decisions-panel { padding: 0; }
.return-decisions-panel .returns-tabs { border-bottom: 0; }
.markdown-stock-table { min-width: 900px; }
.markdown-stock-qty { display: inline-flex; min-width: 70px; justify-content: center; padding: 6px 10px; border-radius: 999px; background: #eaf1ff; color: #1558a4; font-size: 14px; }

@media (max-width: 1200px) {
  .returns-summary-v234 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .returns-summary-v234 { grid-template-columns: 1fr 1fr; }
  .section-heading-row { align-items: flex-start; }
  .pickup-heading-stats, .markdown-total { min-width: auto; }
}
@media (max-width: 520px) {
  .returns-summary-v234 { grid-template-columns: 1fr; }
  .section-heading-row { flex-direction: column; }
  .pickup-heading-stats, .markdown-total { justify-items: start; }
}

/* v2.46 — комментарий покупателя в EXPRESS */
.express-buyer-comment{margin-top:8px;padding:7px 9px;border:1px solid #e5e7eb;border-radius:8px;background:#fafafa;display:flex;flex-direction:column;gap:2px;max-width:360px}
.express-buyer-comment small{color:#6b7280;font-size:11px}
.express-buyer-comment strong{font-size:12px;line-height:1.35;white-space:normal}

/* v2.47 EXPRESS WB + Ozon */
.express-market-title{margin:22px 0 10px;font-size:20px}.express-market-title.ozon-title{display:flex;align-items:center;gap:10px;margin-top:34px}.express-section-anchor{scroll-margin-top:20px}.ozon-express-panel{border-top:3px solid #126bff}.ozon-express-orders{margin-bottom:40px}.ozon-cabinet{background:#eaf2ff!important;color:#075dcc!important}.ozon-courier-code{min-width:210px}.ozon-courier-code small{display:block;margin:4px 0 8px;color:#6b7280}.express-table-detailed td{vertical-align:top}

/* v2.49 — просмотр состава WB FBS поставки */
.wb-supply-summary-panel{padding:18px 20px}.wb-supply-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:12px}.wb-supply-summary-grid>div{background:#f7f8fb;border:1px solid #e5e8ef;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:5px}.wb-supply-summary-grid small{color:#77808f;font-size:12px}.wb-supply-summary-grid strong{font-size:14px;overflow-wrap:anywhere}.wb-supply-meta-line{display:flex;flex-wrap:wrap;gap:18px;margin-top:14px;color:#697382;font-size:13px}.supply-active{color:#16834f}.supply-closed{color:#7d8795}.wb-supply-missing{display:inline-block;margin-top:6px;padding:4px 7px;border-radius:7px;font-size:11px}.wb-supply-orders-table .processing-platform-status{max-width:220px;display:inline-block}.muted{color:#8b93a1}@media(max-width:1200px){.wb-supply-summary-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}}@media(max-width:720px){.wb-supply-summary-grid{grid-template-columns:1fr 1fr}}


/* v2.52: readable Ozon EXPRESS delivery details */
.ozon-delivery-cell{min-width:330px;max-width:430px;gap:8px!important}
.delivery-line{display:flex;flex-direction:column;gap:2px;padding-bottom:7px;border-bottom:1px solid #eef0f4}
.delivery-line:last-child{border-bottom:0}.delivery-line small{font-size:10px!important;text-transform:uppercase;letter-spacing:.04em;color:#8a93a2!important;font-weight:800}
.delivery-line span,.delivery-line strong,.delivery-line a{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.delivery-badge{display:inline-flex;width:max-content;max-width:100%;padding:5px 8px;border-radius:8px;background:#edf4ff;color:#075dcc;font-size:11px;font-weight:850}

/* v2.52: offline sales */
.offline-entry-panel{padding:20px;margin-bottom:16px}.offline-entry-head h2{margin:0 0 4px}.offline-entry-head p{margin:0 0 16px;color:var(--muted);font-size:13px}
.offline-sale-form{display:grid;grid-template-columns:1.5fr .8fr .65fr .8fr 1fr 1fr;gap:12px;align-items:end}
.offline-sale-form label{display:grid;gap:6px;font-size:12px;font-weight:750;color:#4c5665}.offline-sale-form input,.offline-sale-form select,.offline-sale-form textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:#fff;color:#111827;font:inherit}.offline-comment-field{grid-column:1 / span 5}.offline-submit{align-self:end;min-height:42px}
.offline-filter-form{display:flex;gap:10px;align-items:center;width:100%}.offline-filter-form input{flex:1;min-width:260px}.offline-filter-form select{min-width:190px}.offline-filter-form input,.offline-filter-form select{border:1px solid var(--line);border-radius:9px;padding:9px 10px;background:#fff}
.offline-sales-table{min-width:1100px}.offline-sales-table td{vertical-align:top}.offline-qty{display:inline-block;margin-left:7px;padding:3px 6px;border-radius:7px;background:#f1f3f6;font-size:11px;font-weight:850}.offline-platform-badge{display:inline-block;padding:5px 8px;border-radius:8px;background:#f3efff;color:#6c2bd9;font-weight:800}.offline-comment{max-width:360px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1200px){.offline-sale-form{grid-template-columns:repeat(3,1fr)}.offline-comment-field{grid-column:1 / span 2}}
@media(max-width:760px){.offline-sale-form{grid-template-columns:1fr}.offline-comment-field{grid-column:auto}.offline-filter-form{flex-direction:column;align-items:stretch}.offline-filter-form input,.offline-filter-form select{min-width:0}}

/* v2.53 — отдельный контур уценённых SKU */
.markdown-ozon-cell { min-width: 380px; }
.markdown-match-form { display: grid; grid-template-columns: minmax(145px, .9fr) minmax(150px, 1fr) auto; gap: 6px; margin-top: 8px; align-items: center; }
.markdown-match-form select, .markdown-match-form input { min-width: 0; }
.markdown-mapping-list { display: grid; gap: 5px; }
.markdown-mapping-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #f2f7ff; color: #174f91; font-size: 12px; }
.markdown-mapping-chip form { margin: 0; }
.markdown-sale-badge { display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: #eaf1ff; color: #1558a4; font-size: 10px; font-weight: 800; text-transform: uppercase; }
@media (max-width: 900px) { .markdown-match-form { grid-template-columns: 1fr; } .markdown-ozon-cell { min-width: 300px; } }


/* v2.54 — закупочные цены */
.purchase-price-summary{grid-template-columns:repeat(4,minmax(170px,1fr))}
.purchase-price-toolbar{margin-bottom:16px}.purchase-price-search{display:flex;align-items:center;gap:10px;width:100%}.purchase-price-search input{flex:1;min-width:280px;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:#fff}
.purchase-price-panel{padding:0;overflow:hidden}.purchase-price-form{margin:0}.purchase-price-savebar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;border-bottom:1px solid var(--line);background:#fbfcfe}.purchase-price-savebar>div{display:grid;gap:3px}.purchase-price-savebar small{color:var(--muted);font-size:11px}.bottom-savebar{border-top:1px solid var(--line);border-bottom:0}
.purchase-price-table{min-width:1050px}.purchase-price-table td{vertical-align:middle}.purchase-product-name{min-width:280px;white-space:normal}.purchase-price-input-cell{min-width:190px}.purchase-price-input-cell input{width:150px;box-sizing:border-box;border:1px solid #d9dde5;border-radius:9px;padding:9px 10px;font:inherit;font-weight:750}.purchase-price-input-cell input:focus{outline:2px solid #ddd1ff;border-color:#7c3aed}.purchase-normal-badge{display:inline-flex;padding:3px 7px;border-radius:999px;background:#f1f3f6;color:#4b5563;font-size:10px;font-weight:800;text-transform:uppercase}
@media(max-width:900px){.purchase-price-summary{grid-template-columns:1fr 1fr}.purchase-price-savebar{align-items:flex-start}.purchase-price-search{flex-wrap:wrap}.purchase-price-search input{min-width:100%;}}
@media(max-width:560px){.purchase-price-summary{grid-template-columns:1fr}.purchase-price-savebar{flex-direction:column}.purchase-price-savebar .btn{width:100%}}

/* v2.55: grouped sidebar navigation */
.nav-group { width: 100%; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-summary { user-select: none; }
.nav-group-summary strong { flex: 1; font-size: inherit; }
.nav-group-summary.group-active { color: #fff; }
.nav-group-arrow { width: 18px; margin-left: auto; color: #7f8996; text-align: center; font-size: 15px; line-height: 1; transition: transform .16s ease; }
.nav-group[open] .nav-group-arrow { transform: rotate(180deg); }
.nav-group-links { display: grid; gap: 4px; margin: 4px 0 2px 15px; padding-left: 12px; border-left: 1px solid #303640; }
.nav-sub-link { padding: 10px 11px; font-size: 13px; border-radius: 9px; }
.nav-sub-link span { width: 17px; color: #818b98; }
.nav-sub-link.active span { color: #fff; }
.nav-group[open] > .nav-group-summary { color: #fff; }
@media (max-width: 760px) {
  .nav-group { min-width: 0; }
  .nav-group-summary { justify-content: center; }
  .nav-group-summary strong { flex: 0; }
  .nav-group-summary .nav-group-arrow { display: none; }
  .nav-group-links { margin: 4px 0 0; padding: 0; border-left: 0; }
  .nav-sub-link { justify-content: flex-start; font-size: 11px; padding: 8px 9px; }
}

/* v2.56 — Финансы / расходы */
.finance-kicker{display:inline-flex;margin-bottom:7px;padding:4px 8px;border-radius:7px;background:#111827;color:#fff;font-size:10px;font-weight:900;letter-spacing:.08em}.finance-page-header{margin-bottom:12px}
.finance-tabs{display:flex;gap:8px;margin-bottom:16px;border-bottom:1px solid var(--line)}.finance-tab{display:flex;align-items:center;gap:8px;padding:11px 15px;border-bottom:3px solid transparent;color:#687383;font-weight:750}.finance-tab.active{border-bottom-color:#111827;color:#111827}.finance-tab span{font-size:12px}
.finance-summary-grid{grid-template-columns:repeat(4,minmax(170px,1fr));margin-bottom:16px}.finance-payer-card.vlad{border-color:#d8c9ff;background:linear-gradient(180deg,#fbf8ff,#fff)}.finance-payer-card.vlad strong{color:#5c2bc5}.finance-payer-card.serega{border-color:#bfd9ff;background:linear-gradient(180deg,#f7fbff,#fff)}.finance-payer-card.serega strong{color:#1762b4}.finance-difference-card small{font-weight:750}
.finance-entry-panel,.finance-history-panel{padding:0;overflow:hidden;margin-bottom:16px}.finance-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:17px 18px;border-bottom:1px solid var(--line)}.finance-section-head.compact{padding:15px 17px}.finance-section-head h2{margin:0 0 4px;font-size:18px}.finance-section-head p{margin:0;color:var(--muted);font-size:12px}
.finance-expense-form{display:grid;grid-template-columns:.75fr 1.25fr .8fr .8fr 1fr;gap:12px;padding:18px;align-items:end}.finance-expense-form label,.finance-filter-form label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#566170}.finance-expense-form input,.finance-expense-form select,.finance-expense-form textarea,.finance-filter-form input,.finance-filter-form select{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:#fff;color:#111827;font:inherit}.finance-comment-field{grid-column:1 / span 4}.finance-expense-submit{min-height:43px}
.finance-spb-fields{grid-column:1 / -1;display:grid;grid-template-columns:1.6fr .7fr 1fr 1fr .9fr;gap:12px;padding:14px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;align-items:end}.finance-spb-fields[hidden]{display:none}.finance-spb-total{min-height:43px;border:1px solid #dbe4ee;border-radius:10px;background:#fff;padding:8px 11px;display:grid;align-content:center}.finance-spb-total span,.finance-spb-total small{font-size:10px;color:#64748b;font-weight:700}.finance-spb-total strong{font-size:17px;line-height:1.2}.finance-calculated-field input{background:#f1f5f9;color:#475569}.finance-spb-journal-detail{display:grid;gap:2px;margin-bottom:4px}.finance-spb-journal-detail strong{font-size:12px}.finance-spb-journal-detail span{font-size:11px;color:#64748b}
.finance-filter-panel{padding:14px 16px;margin-bottom:16px}.finance-filter-form{display:grid;grid-template-columns:.75fr .75fr .8fr 1.2fr 1fr 1.5fr auto auto;gap:9px;align-items:end}.finance-filter-form .finance-search-field{min-width:220px}
.finance-breakdown-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.finance-breakdown-panel{padding:0;overflow:hidden}.finance-breakdown-table{min-width:640px}.finance-breakdown-table td{vertical-align:top}
.finance-expense-table{min-width:1250px}.finance-expense-table td{vertical-align:top}.finance-category-badge{display:inline-flex;padding:5px 8px;border-radius:8px;background:#f2f4f7;color:#344050;font-weight:750}.finance-payer-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900}.finance-payer-badge.vlad{background:#eee7ff;color:#5726b7}.finance-payer-badge.serega{background:#e8f2ff;color:#145ba6}.finance-amount-cell{white-space:nowrap;font-size:15px}.finance-comment-cell{min-width:260px;max-width:430px;white-space:normal;overflow-wrap:anywhere;color:#596474}.finance-delete-cell{width:90px}.finance-delete-cell form{margin:0}.btn-sm{padding:6px 9px;font-size:11px}
@media(max-width:1250px){.finance-summary-grid{grid-template-columns:1fr 1fr}.finance-expense-form{grid-template-columns:repeat(3,1fr)}.finance-spb-fields{grid-template-columns:repeat(2,1fr)}.finance-comment-field{grid-column:1 / span 2}.finance-filter-form{grid-template-columns:repeat(4,1fr)}.finance-breakdown-grid{grid-template-columns:1fr}}
@media(max-width:760px){.finance-summary-grid,.finance-expense-form,.finance-filter-form,.finance-spb-fields{grid-template-columns:1fr}.finance-comment-field{grid-column:auto}.finance-filter-form .finance-search-field{min-width:0}.finance-breakdown-grid{grid-template-columns:1fr}}


/* v2.57 — закупки партиями */
.purchase-expense-hint{margin:14px 18px 0;padding:11px 13px;border:1px solid #dbe6ff;border-radius:10px;background:#f6f9ff;color:#536174;font-size:12px}.purchase-expense-hint strong{color:#172033}.purchase-expense-hint a{font-weight:850;color:#4f46e5}
.purchase-batch-panel,.purchase-history-panel,.purchase-average-panel{padding:0;overflow:hidden;margin-bottom:16px}.purchase-batch-header{display:grid;grid-template-columns:.8fr 1.1fr .8fr 2fr;gap:12px;padding:18px}.purchase-batch-header label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#566170}.purchase-batch-header input,.purchase-batch-header select,.purchase-lines-table input,.purchase-lines-table select{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:#fff;color:#111827;font:inherit}
.purchase-lines-wrap{border-top:1px solid var(--line)}.purchase-lines-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#fafbfc}.purchase-lines-head>div{display:grid;gap:3px}.purchase-lines-head small{font-size:11px;color:var(--muted)}.purchase-lines-table{min-width:930px}.purchase-lines-table td{vertical-align:middle}.purchase-lines-table td:first-child{min-width:350px}.purchase-lines-table td:nth-child(2){width:150px}.purchase-lines-table td:nth-child(3){width:210px}.purchase-lines-table td:nth-child(4){width:170px}.purchase-line-total{white-space:nowrap}.purchase-batch-footer{display:flex;align-items:center;justify-content:flex-end;gap:20px;padding:15px 18px;border-top:1px solid var(--line);background:#fbfcfe}.purchase-batch-footer>div{display:grid;grid-template-columns:auto auto;gap:2px 12px;align-items:baseline}.purchase-batch-footer>div span{font-size:11px;color:var(--muted);font-weight:800}.purchase-batch-footer>div strong{font-size:20px}.purchase-batch-footer>div small{grid-column:2;color:var(--muted)}.purchase-stock-note{margin:0 18px 18px;padding:11px 13px;border-radius:10px;background:#fff8e8;border:1px solid #f5dfaa;color:#6e5a25;font-size:12px}
.purchase-filter-form{grid-template-columns:.9fr .9fr 1fr 1.2fr auto auto}.purchase-batch-list{display:grid}.purchase-batch-card{border-bottom:1px solid var(--line)}.purchase-batch-card:last-child{border-bottom:0}.purchase-batch-card>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;background:#fff}.purchase-batch-card>summary::-webkit-details-marker{display:none}.purchase-batch-card[open]>summary{background:#fafbfc}.purchase-batch-title{display:grid;gap:3px}.purchase-batch-title span{font-size:11px;color:var(--muted);font-weight:750}.purchase-batch-meta{display:flex;align-items:center;gap:12px;white-space:nowrap}.purchase-batch-meta>span:first-child{color:var(--muted);font-size:12px}.purchase-batch-meta>strong{font-size:16px}.purchase-batch-details{padding:0 18px 16px;background:#fafbfc}.purchase-batch-note{margin-bottom:10px;padding:9px 11px;background:#fff;border:1px solid var(--line);border-radius:8px;color:#596474;font-size:12px}.purchase-history-table{min-width:800px;background:#fff}.purchase-batch-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.purchase-batch-actions small{color:var(--muted)}.purchase-batch-actions form{margin:0}.purchase-average-table{min-width:900px}.actual-purchase-average{color:#146c43}
@media(max-width:1000px){.purchase-batch-header{grid-template-columns:1fr 1fr}.purchase-batch-comment{grid-column:1 / span 2}.purchase-filter-form{grid-template-columns:1fr 1fr 1fr}.purchase-batch-card>summary{align-items:flex-start;flex-direction:column}.purchase-batch-meta{width:100%;justify-content:space-between}}
@media(max-width:650px){.purchase-batch-header,.purchase-filter-form{grid-template-columns:1fr}.purchase-batch-comment{grid-column:auto}.purchase-lines-head,.purchase-batch-footer,.purchase-batch-actions{align-items:stretch;flex-direction:column}.purchase-batch-footer>div{align-self:flex-end}}

/* v2.59 — сворачиваемые фильтры финансов + совместная оплата закупки */
.finance-filter-details{padding:0;overflow:hidden}
.finance-filter-summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:#fff;user-select:none}
.finance-filter-summary::-webkit-details-marker{display:none}
.finance-filter-summary>div{display:grid;gap:2px}
.finance-filter-summary strong{font-size:14px;color:#1d2733}
.finance-filter-summary span{font-size:11px;color:var(--muted)}
.finance-filter-details[open] .finance-filter-summary{border-bottom:1px solid var(--line);background:#fafbfc}
.finance-filter-details .finance-filter-form{padding:14px 16px}
.finance-filter-chevron{font-size:20px!important;color:#7d8794!important;transition:transform .15s ease}
.finance-filter-details[open] .finance-filter-chevron{transform:rotate(180deg)}

.purchase-payment-split{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;padding:10px 11px;border:1px solid #dce2ea;border-radius:11px;background:#f8fafc;align-self:stretch}
.purchase-payment-title{grid-column:1/-1;font-size:11px;font-weight:900;color:#313d4b;text-transform:uppercase;letter-spacing:.03em}
.purchase-payment-split label{display:grid;gap:5px!important}
.purchase-payment-split small{grid-column:1/-1;color:#697585;font-size:10px;line-height:1.35}
.purchase-payment-badges{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.purchase-payment-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;padding:9px 11px;background:#fff;border:1px solid var(--line);border-radius:9px;font-size:12px}
.purchase-payment-summary>strong{margin-right:2px}
@media(max-width:1000px){.purchase-payment-split{grid-column:1/-1}.purchase-payment-badges{justify-content:flex-start}}
@media(max-width:650px){.purchase-payment-split{grid-template-columns:1fr}.purchase-payment-title,.purchase-payment-split small{grid-column:auto}}

/* v2.60 — доставка закупочной партии, поиск артикулов и месячная сводка финансов */
.purchase-summary-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.purchase-delivery-card{border-color:#ffd8a8;background:linear-gradient(180deg,#fffaf3,#fff)}.purchase-delivery-card strong{color:#b75b00}
.purchase-batch-header{grid-template-columns:.8fr 1fr 1.35fr 1.35fr 1.3fr}.purchase-delivery-box{display:grid;gap:8px;padding:10px 11px;border:1px solid #f0d8b6;border-radius:11px;background:#fffaf4;align-self:stretch}.purchase-delivery-box>label{display:grid;gap:5px}.purchase-delivery-live{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 9px;border-radius:8px;background:#fff;border:1px solid #f2e1c8}.purchase-delivery-live span{font-size:10px;font-weight:800;color:#7d6c52}.purchase-delivery-live strong{color:#a45300}.purchase-delivery-payers{display:grid;grid-template-columns:1fr 1fr;gap:8px}.purchase-delivery-box>small{font-size:10px;line-height:1.35;color:#7a6d5c}.purchase-batch-comment{align-self:stretch}
.purchase-product-search{font-weight:750}.purchase-product-search-hint{display:block;margin-top:4px;color:var(--muted);font-size:10px}.purchase-product-unresolved .purchase-product-search{border-color:#e28b37!important;box-shadow:0 0 0 2px rgba(226,139,55,.12)}
.purchase-batch-footer{justify-content:flex-end;flex-wrap:wrap}.purchase-footer-total{display:grid!important;grid-template-columns:auto!important;gap:2px!important;min-width:130px;padding:8px 12px;border-left:1px solid var(--line)}.purchase-footer-total:first-child{border-left:0}.purchase-footer-total span{font-size:10px!important;text-transform:uppercase;letter-spacing:.03em}.purchase-footer-total strong{font-size:17px!important}.purchase-footer-total small{grid-column:auto!important}.purchase-footer-total.all-in strong{font-size:20px!important;color:#111827}
.purchase-batch-delivery-mini{font-size:10px;color:var(--muted)}.purchase-delivery-summary{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:10px;margin-bottom:10px;padding:10px 11px;border:1px solid #f0d8b6;border-radius:9px;background:#fffaf4}.purchase-delivery-summary>div{display:grid;gap:3px}.purchase-delivery-summary span{font-size:10px;color:#7a6d5c;font-weight:800}.purchase-delivery-summary strong{font-size:14px}.purchase-delivery-payment-list b{font-size:11px;font-weight:800}.purchase-batch-meta{flex-wrap:wrap}
.finance-month-panel{padding:0;overflow:hidden;margin-bottom:14px}.finance-month-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fbfcfe}.finance-month-head>div{display:grid;text-align:center;gap:2px}.finance-month-head>div strong{font-size:16px}.finance-month-head>div span{font-size:10px;color:var(--muted)}.finance-year-nav{display:inline-flex;align-items:center;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#273245;text-decoration:none;font-size:11px;font-weight:850}.finance-month-strip{display:grid;grid-template-columns:repeat(12,minmax(78px,1fr));gap:5px;padding:9px 10px;overflow-x:auto;background:#fff}.finance-month-tab{display:flex;justify-content:center;align-items:center;padding:8px 7px;border:1px solid transparent;border-radius:8px;color:#697585;text-decoration:none;font-size:10px;font-weight:850;white-space:nowrap}.finance-month-tab:hover{background:#f4f1ff;color:#5c2bc5}.finance-month-tab.active{background:#6d38e8;color:#fff;border-color:#6d38e8;box-shadow:0 3px 9px rgba(109,56,232,.16)}.finance-period-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:-3px 2px 9px;padding:0 4px;color:#5d6878;font-size:11px}.finance-period-title strong{font-size:13px;color:#1e293b}.finance-month-summary-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.finance-delivery-unit-card{border-color:#f4d0a4;background:linear-gradient(180deg,#fffaf3,#fff)}.finance-delivery-unit-card strong{color:#aa5600}
@media(max-width:1200px){.purchase-batch-header{grid-template-columns:1fr 1fr}.purchase-payment-split,.purchase-delivery-box{grid-column:auto}.purchase-batch-comment{grid-column:1/-1}.finance-month-strip{grid-template-columns:repeat(12,minmax(92px,1fr))}}
@media(max-width:700px){.purchase-batch-header{grid-template-columns:1fr}.purchase-batch-comment{grid-column:auto}.purchase-delivery-payers,.purchase-delivery-summary{grid-template-columns:1fr}.purchase-footer-total{border-left:0;border-top:1px solid var(--line);width:100%}.finance-month-head>div span{display:none}.finance-period-title{align-items:flex-start;flex-direction:column}.finance-month-strip{grid-template-columns:repeat(12,minmax(100px,1fr))}}

/* v2.62 — январь 2026: полное сопоставление + физические единицы комплектов */
.january-import-panel{border:1px solid rgba(75,118,255,.22);background:linear-gradient(180deg,rgba(75,118,255,.055),rgba(255,255,255,.01));}
.january-import-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.january-import-head h2{margin:3px 0 4px}.january-import-head p{margin:0;color:var(--muted);max-width:850px}.january-import-kicker{font-size:11px;font-weight:850;letter-spacing:.12em;color:var(--primary)}
.january-import-status{white-space:nowrap;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800}.january-import-status.done{background:rgba(52,168,83,.13);color:#2f8b4f}.january-import-status.ready{background:rgba(75,118,255,.13);color:var(--primary)}.january-import-status.warn{background:rgba(226,139,55,.14);color:#b46822}
.january-import-totals{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin-bottom:14px}.january-import-totals>div{padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--panel)}.january-import-totals span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.january-import-totals strong{font-size:18px}
.january-import-message{padding:10px 12px;margin:8px 0 12px;border-radius:10px;background:rgba(75,118,255,.08);font-size:13px}.january-import-message.success{background:rgba(52,168,83,.1)}.january-import-message.error{background:rgba(210,65,65,.08)}.january-import-unresolved{display:grid;gap:6px;margin-top:8px}.january-import-unresolved code{display:block;padding:7px 9px;border-radius:8px;background:var(--bg);white-space:normal;overflow-wrap:anywhere}
@media(max-width:900px){.january-import-head{display:block}.january-import-status{display:inline-block;margin-top:10px}.january-import-totals{grid-template-columns:repeat(2,minmax(130px,1fr))}}

/* v2.70 — Финансы / Экспресс EDBS */
.finance-express-header{align-items:flex-end}.finance-express-header form{margin:0}.finance-express-filter-panel{padding:13px 15px;margin-bottom:14px}.finance-express-filters{display:grid;grid-template-columns:1.05fr 1.5fr auto auto;gap:9px;align-items:end}.finance-express-filters label{display:grid;gap:5px;font-size:11px;font-weight:850;color:#596575}.finance-express-filters select,.finance-express-filters input{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;background:#fff;padding:10px 11px;font:inherit}.finance-express-summary-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin-bottom:15px}.finance-express-delivery-card{border-color:#bcdcff;background:linear-gradient(180deg,#f5fbff,#fff)}.finance-express-delivery-card strong{color:#1762b4}.finance-express-profit-card{border-color:#bfe5ca;background:linear-gradient(180deg,#f5fff8,#fff)}.finance-express-profit-card strong{color:#158044}.finance-express-profit-card.negative{border-color:#f2bebe;background:#fff7f7}.finance-express-profit-card.negative strong{color:#b52e2e}.finance-express-table-panel{padding:0;overflow:hidden}.finance-express-table{min-width:1460px}.finance-express-table th{white-space:nowrap}.finance-express-table td{vertical-align:top}.finance-express-article{min-width:225px}.finance-express-article strong{display:block}.finance-express-article small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.finance-express-group{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.finance-express-edit-cell{min-width:125px}.finance-express-inline-form{display:contents}.finance-express-money-input{width:94px;box-sizing:border-box;border:1px solid #d8dee7;border-radius:7px;padding:7px 8px;background:#fff;font:inherit;font-size:12px;text-align:right}.finance-express-money-input.empty{border-style:dashed;color:#8a94a1}.finance-express-money-input.missing{border-color:#e29048;background:#fffaf5}.finance-express-save{margin-left:4px;border:0;border-radius:7px;padding:7px 8px;background:#edf3ff;color:#225fba;font-weight:900;cursor:pointer}.finance-express-delivery-cell small,.finance-express-profit small{display:block;margin-top:3px;color:#8a6670;font-size:9px}.finance-express-profit{white-space:nowrap}.finance-express-profit strong{font-size:14px;color:#157d43}.finance-express-profit.negative strong{color:#b52e2e}.finance-express-negative-row{background:#fffafa}.finance-express-note{margin-top:14px;font-size:12px;line-height:1.55;color:#536070}.finance-express-note strong{color:#1f2937}.nowrap{white-space:nowrap}
@media(max-width:850px){.finance-express-filters{grid-template-columns:1fr 1fr}.finance-express-header{align-items:flex-start;flex-direction:column}.finance-express-header form{width:100%}.finance-express-header button{width:100%}}
@media(max-width:560px){.finance-express-filters{grid-template-columns:1fr}}

/* v2.71 Finance Express */
.finance-express-address{min-width:280px;max-width:360px;white-space:normal;line-height:1.35}
.finance-express-table td small{display:block;margin-top:4px;color:var(--muted,#77808c);font-size:11px}
.finance-express-table th{white-space:nowrap}
.finance-express-table .finance-express-edit-cell small{max-width:150px;white-space:normal}

/* v2.73 Finance Express cancellation audit */
.finance-express-cancel-audit{margin-bottom:14px;padding:12px 15px;border:1px solid #b8d6c0;background:#f6fff8;line-height:1.45}.finance-express-cancel-audit small{display:block;margin-top:4px;color:#597061}.finance-express-cancel-audit b{font-size:15px}


/* v2.82 · Поставки FBO / FBW */
.supply-page-header{align-items:flex-end;gap:20px}
.supply-summary-grid{grid-template-columns:repeat(5,minmax(150px,1fr));margin-bottom:18px}
.supply-warning-card{border-color:#f2c46d;background:linear-gradient(180deg,#fffaf0,#fff)}
.supply-filter-panel{padding:16px 18px;margin-bottom:18px}
.supply-filter-form{display:grid;grid-template-columns:150px 180px minmax(220px,1fr) minmax(260px,1.3fr) auto auto;gap:12px;align-items:end}
.supply-filter-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#697386}
.supply-filter-form input,.supply-filter-form select{height:42px;border:1px solid #dbe2ea;border-radius:10px;padding:0 11px;background:#fff;color:#18212f}
.supply-history-table{min-width:1180px}
.supply-history-table th:nth-child(1){width:135px}.supply-history-table th:nth-child(2){width:190px}.supply-history-table th:nth-child(3){width:150px}.supply-history-table th:nth-child(4){width:270px}.supply-history-table th:nth-child(5){width:190px}.supply-history-table th:nth-child(6){width:110px}
.supply-platform-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;background:#eef2f7;color:#344054}
.supply-platform-badge.wb{background:#f4eaff;color:#7a2fba}.supply-platform-badge.ozon{background:#e9f0ff;color:#265ccf}
.supply-number{font-variant-numeric:tabular-nums}.supply-address{max-width:320px;white-space:normal;line-height:1.35;margin-top:3px}
.supply-state{display:inline-flex;padding:5px 8px;border-radius:8px;background:#eef7f0;color:#28743a;font-size:11px;font-weight:800}
.supply-unmapped-row{background:#fffaf1}.supply-unmapped-badge{display:inline-flex;margin-top:5px;padding:3px 6px;border-radius:7px;background:#fff0cf;color:#8d5f00;font-size:10px;font-weight:800}.supply-error{color:#9b5c00;white-space:normal;line-height:1.3}
@media(max-width:1200px){.supply-summary-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.supply-filter-form{grid-template-columns:repeat(2,minmax(200px,1fr))}}

/* v2.85: grouped FBO supplies */
.supply-filter-form-v285{grid-template-columns:130px 150px minmax(190px,1fr) minmax(220px,1.2fr) minmax(200px,1fr) minmax(230px,1.2fr) auto auto}
.supply-grouped-table{min-width:1260px}.supply-grouped-table th:nth-child(1){width:140px}.supply-grouped-table th:nth-child(2){width:190px}.supply-grouped-table th:nth-child(3){width:190px}.supply-grouped-table th:nth-child(4){width:330px}.supply-grouped-table th:nth-child(5){width:130px}.supply-grouped-table th:nth-child(6){width:210px}.supply-grouped-table th:nth-child(7){width:54px}
.supply-number-button{border:0;background:transparent;padding:0;color:#2156c7;font:inherit;font-weight:850;cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}.supply-number-button:hover{color:#173f98}
.supply-expand-button{width:34px;height:34px;border:1px solid #dbe2ea;border-radius:9px;background:#fff;color:#4f5d70;cursor:pointer;font-size:20px;line-height:1;transition:.15s}.supply-expand-button[aria-expanded="true"]{transform:rotate(180deg);background:#f4f7fb}
.supply-lines-row>td{padding:0 14px 16px!important;background:#f8fafc}.supply-lines-box{border:1px solid #dde5ee;border-radius:12px;background:#fff;padding:14px 16px;margin-top:4px}.supply-lines-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;color:#263142}.supply-lines-head span{font-size:12px;color:#667085;font-weight:800}
.supply-lines-table{width:100%;border-collapse:collapse}.supply-lines-table th,.supply-lines-table td{text-align:left;padding:9px 10px;border-bottom:1px solid #edf1f5;font-size:12px}.supply-lines-table th{color:#6d7786;font-size:11px;text-transform:uppercase;letter-spacing:.03em}.supply-lines-table tr:last-child td{border-bottom:0}.supply-mapped-badge{display:inline-flex;padding:3px 7px;border-radius:7px;background:#eaf8ef;color:#24733d;font-size:10px;font-weight:800}
.supply-destination-label{display:block;color:#8a93a0;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px}.supply-destination-second{margin-top:7px}.supply-summary-row td{vertical-align:top}.supply-summary-row:hover{background:#fbfcfe}
@media(max-width:1450px){.supply-filter-form-v285{grid-template-columns:repeat(3,minmax(190px,1fr))}}
@media(max-width:900px){.supply-filter-form-v285{grid-template-columns:1fr 1fr}}
