.mp-local .mp-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 200px) minmax(155px, 210px) auto auto;
  border-radius: 14px 14px 0 0;
}
.mp-local .mp-filters > :is(select, button) {
  margin: 0;
  min-width: 0;
}
.mp-local .mp-sku,
.mp-local .mp-issue {
  display: inline-block;
  margin: 3px 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.mp-local .mp-sku {
  color: var(--muted);
}
.mp-local .mp-issue {
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  padding: 1px 5px;
}
@media (min-width: 821px) {
  .mp-price-catalog .price-item-row {
    height: 23px;
  }
}
.mp-order-catalog :is(th:nth-child(2), td.mp-offer-name) {
  text-align: left;
}
.mp-order-catalog .mp-offer-name {
  max-width: 64ch;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mp-order-catalog .price-description:not([open]) {
  display: inline-block;
}
.mp-order-catalog .mp-issue {
  margin: 0 0 0 4px;
}
.mp-order-catalog .mp-order-sku,
.mp-order-catalog [data-label="Остаток"] {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mp-order-catalog .mp-order-sku {
  font-size: 11px;
  white-space: nowrap;
}
.mp-order-catalog .mp-sku {
  display: block;
  margin: 1px 0 0;
  font-weight: 400;
}
.mp-local .mp-empty {
  padding: 18px;
  text-align: center;
}
.mp-local .mp-client-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.mp-local .mp-client-picker label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  white-space: nowrap;
  font-size: 13px;
}
.mp-local .mp-client-picker > span {
  color: var(--muted);
  font-size: 13px;
}
.mp-local .mp-client-picker select {
  max-width: 100%;
  min-width: 0;
}
.mp-local .inventory-table {
  min-width: 0;
  width: 100%;
}
.mp-local .inventory-table th,
.mp-local .inventory-table td {
  padding: 5px 8px;
  line-height: 1.25;
}
.mp-local .inventory-table thead th,
.mp-local .mp-price-catalog thead th {
  top: 139px;
}
.mp-local .inventory-table .inventory-sticky-name {
  width: 55%;
  white-space: normal;
}
.mp-local .inventory-table th:last-child {
  width: 12%;
}
.mp-local .inventory-table td small {
  display: inline-block;
}
.mp-local .crm-client-table {
  min-width: 0;
}
.mp-local .crm-client-table:not(.crm-client-table--with-amount) th:first-child {
  width: 47%;
}
.mp-local .crm-client-table:not(.crm-client-table--with-amount) th:nth-child(2) {
  width: 25%;
}
.mp-local .crm-client-table:not(.crm-client-table--with-amount) th:last-child {
  width: 28%;
}
.mp-local .mp-section-heading {
  margin: 18px 0 8px;
  font-size: 16px;
}
.mp-local .crm-client-workspace-header {
  overflow: visible;
  margin-bottom: 12px;
  border-radius: 16px;
}
.mp-local .crm-client-workspace-header:has(+ .crm-client-summary-strip) {
  margin-bottom: 0;
  border-radius: 16px 16px 0 0;
}
.mp-company-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 16px 12px;
}
.mp-company-links strong, .mp-company-code {
  color: var(--muted);
  font-size: 13px;
}
.mp-company-links strong { margin-right: 6px; }
.mp-company-links a, .mp-company-links [aria-current] {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mp-company-links [aria-current] {
  background: color-mix(in srgb, var(--blue) 10%, var(--card));
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 650px) {
  .mp-company-links strong { flex-basis: 100%; }
}
.mp-local .crm-client-summary-strip {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.mp-local .crm-client-panel .card {
  min-width: 0;
}
.mp-local .mp-companies summary {
  grid-template-columns: minmax(0, 1fr) auto;
}
.mp-local .crm-client-directory-editor > summary {
  justify-content: flex-start;
  gap: 7px;
  color: var(--blue);
  min-height: 36px;
}
.mp-local .crm-client-directory-editor > summary::after {
  content: '›';
  font-size: 16px;
}
.mp-local .crm-client-directory-editor[open] > summary::after {
  transform: rotate(90deg);
}
.mp-local .mp-companies .crm-client-legal-summary strong {
  white-space: normal;
  overflow-wrap: anywhere;
}
.mp-local .mp-directory-form {
  padding: 12px 0 0;
  align-items: stretch;
  gap: 12px 14px;
}
.mp-local .mp-directory-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  text-transform: none;
  font-size: 12px;
  font-weight: 600;
}
.mp-local .mp-directory-form label > :is(input, select, textarea) {
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--form-control-border);
  border-radius: 10px;
  background-color: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 450;
  line-height: 20px;
}
.mp-local .mp-directory-form textarea {
  field-sizing: content;
  resize: vertical;
}
.mp-local .mp-directory-form button {
  grid-column: 1 / -1;
  margin: 2px 0 0;
}
.mp-local .mp-companies .mp-directory-form {
  padding: 8px 12px 12px;
}
.mp-local .crm-client-form.crm-client-note-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 15px 16px;
}
.mp-local .crm-client-note-card h2 {
  margin: 0;
  font-size: 16px;
}
.mp-note-history {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-note-history li + li {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.mp-note-history :is(strong, small) {
  display: block;
  overflow-wrap: anywhere;
}
.mp-note-history small {
  color: var(--muted);
}
.mp-note-history p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .mp-local .mp-directory-form { grid-template-columns: minmax(0, 1fr); }
  .mp-local .mp-directory-form label > :is(input, select, textarea) { min-height: 44px; font-size: 16px; }
}
.mp-local .crm-client-panel .muted {
  margin: 4px 0 0;
  line-height: 1.45;
}
.mp-local .crm-client-contact-item {
  grid-template-columns: minmax(70px, .42fr) minmax(0, 1fr);
}
.mp-local .crm-client-contact-item strong,
.mp-local .crm-client-data-list :is(span, strong) {
  white-space: normal;
  overflow-wrap: anywhere;
}
.mp-local .crm-client-contact-item a {
  font-size: inherit;
}
.mp-local .mp-shipment-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.mp-local .mp-shipment-summary strong {
  margin-left: auto;
}
.mp-local .mp-shipment-summary small {
  color: var(--muted);
}
.mp-purchase-report .crm-heading {
  flex-wrap: wrap;
  gap: 6px 16px;
}
.mp-purchase-report table {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.mp-purchase-report tbody th {
  text-align: left;
  font-weight: 500;
  background: transparent;
}
.mp-purchase-meta { display: none; }
.mp-payment-layout {
  display: grid;
  grid-template-columns: minmax(290px, .75fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
}
.mp-payment-layout > .card { min-width: 0; }
.mp-payment-layout table { min-width: 0; }
.mp-local #purchases :is(.crm-metric-panel, .mp-payment-layout) .crm-column-chart-scroll {
  overflow-x: auto;
}
.mp-local #purchases :is(.crm-metric-panel, .mp-payment-layout) .crm-column-chart {
  gap: 6px;
}
.mp-local #purchases :is(.crm-metric-panel, .mp-payment-layout) .crm-column {
  min-width: max-content;
}
.mp-local #purchases :is(.crm-metric-panel, .mp-payment-layout) .crm-column :is(span, small) {
  font-size: 11px;
  overflow: visible;
}
.mp-local #purchases :is([data-crm-metric-panel="amount"], .mp-payment-layout) .crm-column:not(.future) > span::after {
  content: " ₽";
}
.mp-purchase-report tr > :last-child {
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .mp-local .crm-client-purchase-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .mp-local .crm-client-purchase-nav a { justify-content: center; }
  .mp-local [data-purchase-section="products"] table {
    min-width: 0;
    font-size: 13px;
  }
  .mp-local [data-purchase-section="products"] tr > :is(:nth-child(2), :nth-child(3)) { display: none; }
  .mp-local [data-purchase-section="products"] :is(td, th) { padding: 7px 4px; }
  .mp-local [data-purchase-section="products"] tr > :first-child { overflow-wrap: anywhere; }
  .mp-local [data-purchase-section="products"] tr > :nth-last-child(-n+2) {
    width: 1%;
    text-align: right;
    white-space: nowrap;
  }
  .mp-purchase-meta {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
  }
}
@media (max-width: 900px) {
  .mp-payment-layout { grid-template-columns: minmax(0, 1fr); }
}
.mp-shipment > summary {
  color: var(--blue);
  cursor: pointer;
  list-style: none;
}
.mp-shipment > summary::-webkit-details-marker {
  display: none;
}
.mp-shipment > summary::before {
  content: "›";
  font-size: 18px;
}
.mp-shipment[open] > summary::before {
  transform: rotate(90deg);
}
.mp-shipment-items {
  width: 100%;
  margin-block: 4px 10px;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mp-shipment-items :is(th, td) {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.mp-shipment-items :is(th, td):not(:first-child) {
  width: 1%;
  white-space: nowrap;
}
.mp-shipment-items th:first-child {
  text-align: left;
  overflow-wrap: anywhere;
}
.mp-shipment-items th[scope="row"] {
  font-weight: 500;
}
@media (min-width: 901px) {
  .mp-shipment-items :is(th, td):not(:first-child) {
    width: 13%;
    min-width: 88px;
    padding-inline: 12px;
    text-align: right;
  }
}
.mp-local .mp-dealer-terms {
  padding: 15px 16px;
  border-radius: 16px;
}
.mp-dealer-terms h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.mp-dealer-terms form {
  display: grid;
  gap: 10px;
}
.mp-dealer-terms label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.mp-dealer-terms form :is(input, select, button) {
  min-width: 0;
  min-height: 40px;
  margin: 0;
}
.mp-dealer-terms form button {
  justify-self: start;
}
.mp-dealer-terms form:not(:has(option[value="markup"]:checked)) .mp-dealer-percent {
  display: none;
}
.mp-local.mp-client-card .crm-client-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 11px;
  border-radius: 9px;
  background: #315ce2;
  color: white;
  font-size: 13px;
}
.mp-local.mp-client-card .crm-client-back:hover {
  background: #254cba;
}
.mp-client-events .crm-client-event-list li {
  grid-template-columns: 9px minmax(0, 1fr) auto;
  padding-block: 12px;
}
.mp-client-events .crm-client-event-list a {
  display: inline-block;
  font-size: 12px;
}
.mp-client-events .crm-client-event-list strong {
  font-size: 14px;
}
.mp-client-events .crm-client-event-list span {
  font-size: 12px;
}
.mp-client-events .crm-client-section-heading h2 {
  margin: 0;
}

.mp-local .order-detail-table small {
  display: block;
  color: var(--muted);
}
.mp-local :is(.order-detail, .order-history-card) .crm-data-table-scroll {
  overflow-x: auto;
}
.mp-local .order-detail-table,
.mp-local .mp-history {
  min-width: 0;
  width: 100%;
}
.mp-local .crm-heading h2 {
  margin: 0;
}
.mp-local .notice[role="status"] {
  border-left: 3px solid #d97706;
  padding: 10px 14px;
}
@media (max-width: 900px) {
  .mp-local .mp-filters {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .mp-local .mp-filters .crm-search-field {
    grid-column: 1 / -1;
  }
  .mp-local .mp-filters select {
    width: 100%;
    max-width: 100%;
  }
  .mp-local .mp-catalog-filters {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  }
  .mp-local .mp-catalog-filters select {
    padding-inline: 6px 2px;
    font-size: 13px;
  }
  .mp-local .mp-filters .price-filter-reset {
    justify-self: stretch;
  }
  .mp-local .inventory-table thead th {
    top: 64px;
  }
}
@media (max-width: 820px) {
  .mp-local .inventory-table .inventory-sticky-name {
    width: 43%;
    min-width: 0;
  }
  .mp-local .inventory-table .inventory-sticky-sku {
    width: 17%;
    min-width: 0;
  }
  .mp-local .inventory-table td,
  .mp-local .inventory-table th {
    padding: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mp-local .inventory-table th:last-child {
    width: 16%;
  }
  .mp-local .crm-client-table-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .mp-local .crm-client-table td[data-label]::before {
    display: inline;
    margin-right: 6px;
  }
  .mp-local .mp-history,
  .mp-local .order-detail-table {
    font-size: 11px;
  }
  .mp-local .mp-history :is(th, td),
  .mp-local .order-detail-table :is(th, td) {
    padding: 6px 4px;
    white-space: normal;
  }
}
@media (min-width: 901px) {
  .mp-local .mp-catalog-filters select {
    padding-inline: 10px 4px;
  }
  .mp-local .mp-catalog-filters {
    grid-template-columns: minmax(140px, 1.5fr) minmax(105px, 1fr) minmax(190px, 1.35fr) repeat(2, minmax(105px, 1fr)) auto auto;
    gap: 6px;
    padding-inline: 10px;
  }
}
.mp-local.crm-page {
  min-height: calc(100vh - 72px);
}
.mp-local .crm-data-table thead th {
  position: static;
}
@media (max-width: 820px) {
  body:has(main.mp-local) .brand-title {
    max-width: calc(100vw - 126px);
  }
  .mp-local .inventory-table thead th {
    position: static;
  }
  .mp-local .crm-client-hero,
  .mp-local .crm-client-title-copy-row {
    display: grid;
    gap: 6px;
  }
  .mp-local .crm-client-hero {
    justify-content: stretch;
  }
  .mp-local .crm-client-title-line h2 {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mp-local .crm-client-title-copy-row .crm-dealer-badge {
    justify-self: start;
  }
  .mp-local .crm-client-header-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .mp-local .crm-client-header-actions .ghost {
    display: inline-flex;
  }
  .mp-local .crm-client-header-actions a {
    min-height: 40px;
    font-size: 12px;
  }
}
@media (max-width: 650px) {
  .mp-local .crm-client-workspace-header {
    position: static;
  }
  .mp-local .crm-client-title-copy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .mp-local .crm-client-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding-inline: 3px;
  }
  .mp-local .crm-client-tabs button {
    justify-content: center;
    min-height: 42px;
    padding: 5px 3px;
    text-align: center;
    white-space: normal;
  }
  .mp-local .crm-client-contact-item > span {
    grid-column: auto;
  }
}
.mp-local .order-cart-stock-summary {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.mp-local .order-cart-stock-summary p {
  margin: 4px 0;
}
.mp-local .order-cart-item-name strong {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 820px) {
  .mp-order-catalog {
    --mp-order-tracks: 52px minmax(0, 1fr) 65px 92px 76px;
    width: 100%;
  }
  .mp-order-catalog thead,
  .mp-order-catalog .price-brand-row th {
    display: block;
  }
  .mp-order-catalog thead tr,
  .mp-order-catalog .order-item-row {
    display: grid !important;
    grid-template-columns: var(--mp-order-tracks) !important;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .mp-order-catalog thead th {
    position: static;
    font-size: 9px;
  }
  .mp-order-catalog thead th,
  .mp-order-catalog .order-item-row td[data-label] {
    align-content: center;
    min-width: 0;
    width: auto;
    padding: 3px;
    border: solid var(--line);
    border-width: 0 1px 0 0;
  }
  .mp-order-catalog .order-item-row td.mp-offer-name {
    font-size: 12px;
    white-space: normal !important;
  }
  .mp-order-catalog .order-item-row td.mp-order-sku {
    font-size: 11px;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .mp-order-catalog .order-line-control {
    min-width: 0;
    justify-content: center;
  }
}
@media (max-width: 560px) {
  .mp-order-catalog {
    --mp-order-tracks: 34px minmax(0, 1fr) 50px 64px 44px;
  }
  .mp-price-catalog {
    --mp-order-tracks: 34px minmax(0, 1fr) 52px 62px 66px;
  }
  .mp-order-catalog .order-item-row:has(.order-stepper:not([hidden])) td:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 2 / -1;
    padding-right: 4px;
  }
  .mp-order-catalog .order-item-row:has(.order-stepper:not([hidden])) td:last-child::before {
    display: inline !important;
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    text-transform: none;
  }
}
.operations-card .operation-disabled {
  display: block;
  padding-block: 12px;
  color: var(--muted);
}
.operations-card .operation-unavailable {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--muted);
}

@container (min-width: 751px) {
  .mp-local .product-sales-filters {
    grid-template-columns: minmax(210px, 280px) repeat(3, minmax(112px, 176px)) auto minmax(0, 1fr);
  }
}

@media (max-width: 650px) {
  .mp-local .section-tabs[aria-label="Отчёты по товарам"] {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp-sku-report .crm-data-table:not(.crm-products-table) {
    table-layout: fixed;
    width: 100%;
    font-size: 13px;
  }

  .mp-sku-report .crm-data-table:not(.crm-products-table) :is(th, td) {
    padding: 8px 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .mp-sku-report .crm-data-table:not(.crm-products-table) th {
    font-size: 10px;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
  }

  .mp-sku-report .crm-data-table:not(.crm-products-table) th:nth-child(1) { width: 29%; }
  .mp-sku-report .crm-data-table:not(.crm-products-table) th:nth-child(2) { width: 25%; }
  .mp-sku-report .crm-data-table:not(.crm-products-table) th:nth-child(3) { width: 13%; }
  .mp-sku-report .crm-data-table:not(.crm-products-table) th:nth-child(4) { width: 19%; }
  .mp-sku-report .crm-data-table:not(.crm-products-table) th:nth-child(5) { width: 14%; }
}

.mp-local .mp-control-status {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.25;
}
.mp-control-supplier {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  font-weight: 600;
}
.mp-control-supplier input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  font: inherit;
}

.mp-credit { background: #f5f8fc; border: 1px solid #d5deeb; border-radius: 12px; padding: 14px 18px; margin: 12px 0; color: #17283e; }
.mp-credit h2 { font-size: 17px; margin: 0; }
.mp-credit p, .mp-credit-settings p { color: #485b71; font-size: 14px; margin: 5px 0; overflow-wrap: anywhere; }
.mp-credit dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; margin: 14px 0 0; }
.mp-credit dt { color: #485b71; font-size: 13px; }
.mp-credit dd { font-weight: 700; font-size: 18px; margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.mp-credit-settings { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin: 10px 0; }
.mp-credit-settings details { flex-basis: 100%; }
.mp-credit-settings summary { cursor: pointer; color: #2649aa; font-weight: 650; }
.mp-credit-settings form { display: grid; justify-items: start; gap: 8px; margin-top: 12px; }
.mp-credit-settings input { box-sizing: border-box; width: min(100%, 16rem); padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.mp-credit-settings label { display: grid; gap: 4px; }

.mp-credit small { display: block; margin-top: 10px; color: #485b71; font-size: 12px; }

.mp-local.mp-stock-page {
  max-width: 860px;
  margin-right: auto;
}
.mp-stock-page .inventory-table .mp-stock-name {
  width: 52%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.mp-stock-page .inventory-table th:last-child { width: auto; }
.mp-stock-page .inventory-table-scroll.months-visible { overflow-x: auto; }
@media (min-width: 901px) {
  .mp-stock-page .mp-filters {
    grid-template-columns: minmax(160px, 250px) minmax(140px, 180px) minmax(135px, 155px) auto auto;
    justify-content: start;
  }
}
@media (max-width: 820px) {
  .mp-stock-page .inventory-table .inventory-balance { width: 19%; white-space: nowrap; overflow-wrap: normal; }
  .mp-stock-page .inventory-table .inventory-sticky-sku { width: 14%; }
  .mp-stock-page .inventory-table .mp-stock-name { width: 42%; }
  .mp-stock-page .inventory-table th:last-child { width: 25%; }
}


.mp-local.mp-stock-page:has(.months-visible) { max-width: none; }
.mp-stock-page .months-visible {
  --sku: 62px;
  --name: 245px;
  --balance: 78px;
  --category: 150px;
}
.mp-stock-page .months-visible .inventory-table {
  min-width: calc(var(--sku) + var(--name) + var(--balance) + var(--category) + 444px);
  width: 100%; table-layout: fixed;
}
.mp-stock-page .months-visible .inventory-table thead th { position: static; top: auto; width: auto; }
.mp-stock-page .months-visible .inventory-table td.inventory-sticky-sku { position: static; }
.mp-stock-page .months-visible .inventory-table td:nth-child(4) { white-space: normal; overflow-wrap: anywhere; }
.mp-stock-page .months-visible .inventory-table th:nth-child(1) { width: var(--sku); }
.mp-stock-page .months-visible .inventory-table th:nth-child(2) { width: var(--name); }
.mp-stock-page .months-visible .inventory-table th:nth-child(3) { width: var(--balance); }
.mp-stock-page .months-visible .inventory-table th:nth-child(4) { width: var(--category); }
@media (max-width: 820px) {
  .mp-stock-page .months-visible {
    --sku: 13vw; --name: 36vw; --balance: 18vw; --category: 24vw;
  }
}


.mp-local.mp-reference { max-width: 62rem; }
.mp-local.mp-reference h1 { margin: 0 0 1rem; }
.mp-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.mp-reference-group, .mp-guide-article, .mp-health-ok { padding: 1.1rem 1.25rem; }
.mp-reference-group h2, .mp-guide-article h2 { font-size: 1.12rem; margin: 0 0 .65rem; }
.mp-reference-group ul { list-style: none; padding: 0; margin: 0; }
.mp-reference-group li { padding: .5rem 0; border-top: 1px solid var(--line); }
.mp-reference-group li:first-child { border: 0; }
.mp-guide-article { margin-top: 1rem; max-width: 48rem; }
.mp-guide-article section + section, .mp-guide-article footer { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.mp-guide-article p { margin: 0; line-height: 1.55; }
.mp-guide-article footer { display: flex; align-items: center; gap: 1rem; }
.mp-local .operations-card li:has(.mp-guide-link) { display: flex; align-items: center; gap: .45rem; }
.mp-local .operations-card li > a:first-child { flex: 1; min-width: 0; }
.mp-local .operations-card li > .mp-guide-link, .topbar .mp-guide-link { font-size: .8rem; color: var(--blue); }
.mp-local .operations-card li > .mp-guide-link { width: auto; padding: .5rem .3rem; }
.system-alert-card a { display: inline-block; margin-top: .35rem; }
.mp-client-picker .mp-retail-note { flex-basis: 100%; line-height: 1.45; color: var(--muted); }
.mp-retail-note[hidden] { display: none; }
@media (max-width: 600px) {
  .topbar .mp-guide-link { max-width: 5rem; line-height: 1.15; }
}

.mp-local.price-page:has(.mp-order-catalog) { max-width: 74rem; }
.mp-local .mp-order-catalog { width: 100%; }
@media (max-width: 600px) {
  .topbar .mp-guide-link { white-space: nowrap; }
  body:has(main.mp-local) .brand-title:has(.brand-section) :is(.brand-root,.brand-separator) { display: none; }
}

.mp-clients-page {
  --branch-tint: color-mix(in srgb, #289d5e 8%, var(--card));
  --branch-divider: color-mix(in srgb, #289d5e 15%, var(--line));
}
.mp-clients-page .crm-client-table { width: 100%; }
.mp-clients-page .crm-client-table thead th { width: auto; }
.mp-clients-page .crm-client-table thead th:first-child { width: 5.5%; }
.mp-clients-page .crm-client-table thead th:nth-child(2) { width: 28%; }
.mp-clients-page .crm-client-table thead th:nth-child(3) { width: 11%; }
.mp-clients-page .crm-client-table thead th:nth-child(4) { width: 7%; }
.mp-clients-page .crm-client-table thead th:nth-child(5) { width: 17.5%; }
.mp-clients-page .crm-client-table tr[hidden] { display: none; }
.mp-clients-page .mp-entity-summary .crm-money-cell small { white-space: normal; }
.mp-clients-page #crm-new-card-hint { font-size: .75rem; }
.mp-clients-page .mp-client-sheet-link {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--card));
  color: #047857;
}
.mp-clients-page .mp-client-sheet-link:hover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 16%, var(--card));
  color: #047857;
}
.mp-clients-page .mp-client-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 26px; padding: 2px .55rem;
  border: 1px solid transparent; border-radius: .5rem;
  background: #2563eb; color: #fff; box-shadow: none;
  font-size: .73rem; font-weight: 650;
}
.mp-clients-page .mp-client-toggle:hover { background: #1d4ed8; }
.mp-client-chevron {
  width: .43rem; height: .43rem;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.mp-client-toggle[aria-expanded="true"] .mp-client-chevron { transform: rotate(45deg); }
.mp-clients-page .mp-entity-child > td {
  background: var(--branch-tint);
  border-bottom-color: var(--branch-divider);
}
.mp-clients-page .mp-entity-child > .crm-client-name-cell { position: relative; padding-inline-start: 2rem; }
.mp-clients-page .mp-entity-child > .crm-client-name-cell::before {
  content: ""; position: absolute; inset: .72rem auto auto .68rem;
  width: .72rem; height: .55rem; border: solid var(--muted);
  border-width: 0 0 1px 1px; border-bottom-left-radius: 2px;
}
.mp-clients-page .crm-client-name-line { flex-wrap: wrap; gap: .22rem .45rem; }
.mp-clients-page .crm-client-name-line > a { white-space: normal; }
.mp-clients-page .mp-entity-role, .mp-clients-page .mp-entity-actions { flex-basis: 100%; }
.mp-clients-page .mp-entity-role span {
  display: inline-block; padding: 1px .45rem; border-radius: 1rem;
  background: color-mix(in srgb, var(--muted) 15%, var(--card)); color: var(--text);
  font-weight: 600; font-size: .68rem;
}
.mp-clients-page .mp-entity-actions { font-size: .74rem; color: var(--muted); }
.mp-clients-page .mp-entity-actions a { color: var(--blue); }
.mp-clients-page .mp-credit-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .1rem .25rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mp-clients-page .mp-credit-amounts strong { color: var(--text); }
.mp-clients-page .mp-credit-track {
  display: block;
  width: min(100%, 12rem);
  height: 4px;
  margin: .35rem auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.mp-clients-page .mp-credit-track > span { display: block; height: 100%; background: var(--blue); }
.mp-clients-page .mp-credit-track--over > span { background: var(--red); }
.mp-clients-page .crm-client-table .mp-credit-cell small { white-space: normal; }
.mp-clients-page .crm-client-table .mp-credit-over { color: var(--red); font-weight: 700; }
@media (min-width: 1241px) {
  .mp-clients-page .crm-client-table thead th {
    position: sticky; top: var(--mp-clients-sticky-top, 138px); z-index: 4;
  }
}
@media (min-width: 701px) and (max-width: 1240px) {
  .mp-clients-page .crm-data-table-scroll {
    max-height: max(14rem, calc(100dvh - var(--mp-clients-sticky-top, 138px) - 5.5rem));
    overflow: auto;
  }
  .mp-local.mp-clients-page .crm-client-table { min-width: 1020px; }
  .mp-clients-page .crm-client-table thead th { position: sticky; top: 0; z-index: 4; }
  .mp-clients-page .crm-client-table :is(th:first-child, .mp-entity-number) {
    position: sticky;
    left: 0;
    border-right: 1px solid var(--line);
  }
  .mp-clients-page .crm-client-table thead th:first-child { z-index: 5; }
  .mp-clients-page .crm-client-table .mp-entity-number { z-index: 1; background: var(--card); }
  .mp-clients-page .crm-client-table .mp-entity-child > .mp-entity-number { background: var(--branch-tint); }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .mp-clients-page .crm-period { flex-wrap: wrap; }
  .mp-clients-page .crm-period-navigation { flex-basis: 100%; }
  .mp-clients-page .crm-period-presets { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .mp-clients-page .crm-client-table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .2rem .7rem;
  }
  .mp-clients-page .mp-entity-child { background: var(--branch-tint); }
  .mp-clients-page .crm-client-table .mp-entity-number {
    grid-column: 1 / -1; padding: 0; text-align: left; font-size: .78rem;
  }
  .mp-clients-page .crm-client-table .mp-entity-number::before {
    content: "№"; display: inline; position: static; transform: none;
    opacity: 1; background: none; margin-right: .25rem;
  }
  .mp-clients-page .crm-client-table :is(.crm-client-name-cell, .crm-client-city) { text-align: left; }
  .mp-clients-page .crm-client-table .crm-client-name-line { justify-content: flex-start; }
  .mp-clients-page .mp-client-toggle { min-height: 34px; }
  .mp-clients-page .crm-client-table .mp-credit-cell {
    grid-column: 1 / -1; grid-row: 3; text-align: left; padding-block: .4rem;
    border-block: 1px solid var(--line);
  }
  .mp-clients-page .mp-credit-amounts { justify-content: flex-start; }
  .mp-clients-page .mp-credit-track { margin-inline: 0; }
}
.mp-auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--app-bg, #f3f6fa);
}
.mp-auth-card { width: min(100%, 27rem); padding: clamp(1.25rem, 5vw, 2rem); }
.mp-auth-brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; margin-bottom: 1.25rem; }
.mp-auth-card h1 { margin: 0 0 .45rem; font-size: 1.65rem; }
.mp-auth-card p { margin: 0 0 1.2rem; }
.mp-auth-card form, .mp-auth-card label { display: grid; gap: .45rem; }
.mp-auth-card form { gap: .95rem; }
.mp-auth-card label { font-weight: 650; }
.mp-auth-card input {
  width: 100%;
  min-height: 44px;
  padding: .6rem .75rem;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: .65rem;
  font: inherit;
}
.mp-auth-link { display: inline-block; margin-top: 1.2rem; }
.mp-account-bar { display: flex; align-items: center; gap: .55rem; margin: 0; }
.mp-account-bar button { min-height: 2rem; padding: .38rem .6rem; }
.mp-local.mp-staff-page { max-width: 70rem; margin-right: auto; }
.mp-staff-page h1, .mp-staff-section h2 { margin: 0; }
.mp-staff-section { margin-top: 1rem; padding: 1.1rem 1.25rem; }
.mp-staff-section h2 { font-size: 1.12rem; margin-bottom: .65rem; }
.mp-staff-section p { margin: .65rem 0; }
.mp-staff-scroll { overflow-x: auto; }
.mp-staff-table { min-width: 36rem; }
.mp-staff-table th, .mp-staff-table td { text-align: left; }
.mp-staff-table tbody th { color: inherit; background: transparent; text-transform: none; }
.mp-staff-table small, .mp-code-list small { display: block; color: var(--muted, #526175); margin-top: .2rem; }
.mp-staff-table ul, .mp-code-list { margin: 0; padding: 0; list-style: none; }
.mp-staff-table li + li { margin-top: .55rem; }
.mp-code-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line, #dbe3ee);
}
.mp-code-list code { font-size: 1.1rem; letter-spacing: .06em; user-select: all; }
.mp-staff-section summary { cursor: pointer; color: var(--danger, #ad273b); font-weight: 650; }
@media (max-width: 620px) {
  .mp-account-bar span { display: none; }
  .mp-staff-section { padding: .85rem; }
  .mp-staff-table :is(thead, tbody) th:first-child {
    position: sticky;
    top: auto;
    left: 0;
    z-index: 3;
    background: var(--card);
    box-shadow: 1px 0 var(--line);
  }
}

.mp-operation-job .operation-workspace.is-succeeded .operation-workspace-progress > span {
    transition: none;
}

body:has(.mp-client-card) .system-alert-toast {
    position: relative;
    z-index: auto;
    inset: auto;
    margin: 8px 22px 0 auto;
}

@media (max-width: 720px) {
    body:has(.mp-operation-job, .mp-client-card) .system-alert-toast {
        position: relative;
        z-index: auto;
        inset: auto;
        margin: 0 auto 12px;
    }
}

@media (max-width: 720px) {
  .mp-local.crm-calls-page .crm-call-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .mp-local.crm-calls-page .crm-call-filters select {
    width: 100%;
    min-width: 0;
  }
}
